index.vue 102 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528
  1. <template>
  2. <cwg-page-wrapper class="create-page" :isHeaderFixed="true">
  3. <view class="container">
  4. <view
  5. class="app-page-head card-header d-flex gap-3 flex-wrap align-items-center justify-content-between border-0">
  6. <view class="app-page-head mb-0">
  7. <h1 class="app-page-title" v-t="'Home.page_customer.item6'"></h1>
  8. </view>
  9. </view>
  10. <view class="table-loading-mask">
  11. <uni-loading v-if="pictLoading" />
  12. </view>
  13. <view class="col-xxl-12 mb-4" v-if="!pictLoading">
  14. <view class="row">
  15. <!-- <view class="col-12 m-b30">
  16. <view class="card card-action action-elevate action-border-primary">
  17. <view class="row g-0">
  18. <view class="col-md-4">
  19. <view class="card-header border-0 p-0 m-2 position-relative overflow-hidden">
  20. <image src="/static/images/vu/promotion-1.jpg" alt=""
  21. class="img-fluid rounded" mode="widthFix" />
  22. <view
  23. class="position-absolute action-visible top-0 start-0 h-100 w-100 bg-dark bg-opacity-50 rounded d-flex align-items-center justify-content-center">
  24. <a href="#"
  25. class="btn btn-icon btn-lg btn-secondary rounded-circle waves-effect waves-light">
  26. →</a>
  27. </view>
  28. </view>
  29. </view>
  30. <view class="col-md-8 py-3 d-flex flex-column">
  31. <view class="card-body px-3 py-2"> <a href="#"
  32. class="badge badge-sm bg-secondary mb-1">28 Apr, 2026</a>
  33. <h4> <a href="#" class="text-dark">Monthly Trading Challenge</a> </h4>
  34. <view>Complete Trading Targets · Enjoy Multi-Tier Exclusive Gifts</view>
  35. <button type="submit" value="Submit"
  36. class="btn btn-danger mb-3 waves-effect waves-light">Join Now</button>
  37. <button type="submit" value="Submit"
  38. class="btn btn-outline-dark1 mb-3 waves-effect waves-light">Event
  39. Terms</button>
  40. <button type="submit" value="Submit"
  41. class="btn btn-outline-dark1 mb-3 waves-effect waves-light">Participation
  42. Method</button>
  43. <button type="submit" value="Submit"
  44. class="btn btn-outline-dark1 mb-3 waves-effect waves-light">Mission
  45. List</button>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. <view class="col-12 m-b30">
  52. <view class="card card-action action-elevate action-border-primary">
  53. <view class="row g-0">
  54. <view class="col-md-4">
  55. <view class="card-header border-0 p-0 m-2 position-relative overflow-hidden">
  56. <image src="/static/images/vu/promotion.png" alt="" class="img-fluid rounded" mode="widthFix" />
  57. <view
  58. class="position-absolute action-visible top-0 start-0 h-100 w-100 bg-dark bg-opacity-50 rounded d-flex align-items-center justify-content-center">
  59. <a href="#"
  60. class="btn btn-icon btn-lg btn-secondary rounded-circle waves-effect waves-light">
  61. →</a>
  62. </view>
  63. </view>
  64. </view>
  65. <view class="col-md-8 py-3 d-flex flex-column">
  66. <view class="card-body px-3 py-2"><a href="#"
  67. class="badge badge-sm bg-secondary mb-1">28 Apr, 2026</a>
  68. <h4> <a href="#" class="text-dark">CWG Monthly Premium Bonus</a> </h4>
  69. <view>Deposit now to receive generous bonuses of up to $5000! The more you
  70. deposit,
  71. the higher the reward, making every investment more valuable!</view>
  72. <button type="submit" value="Submit"
  73. class="btn btn-danger mb-3 waves-effect waves-light">Join Now</button>
  74. <button type="submit" value="Submit"
  75. class="btn btn-outline-dark1 mb-3 waves-effect waves-light">Event
  76. Terms</button>
  77. <button type="submit" value="Submit"
  78. class="btn btn-outline-dark1 mb-3 waves-effect waves-light">Participation
  79. Method</button>
  80. <button type="submit" value="Submit"
  81. class="btn btn-outline-dark1 mb-3 waves-effect waves-light">Mission
  82. List</button>
  83. </view>
  84. </view>
  85. </view>
  86. </view>
  87. </view> -->
  88. <!-- 月度活动 -->
  89. <view class="col-12 m-b30" v-if="country == 'CN'">
  90. <view class="card card-action action-elevate action-border-primary">
  91. <view class="row g-0">
  92. <view class="col-md-4">
  93. <view class="card-header border-0 p-0 m-2 position-relative overflow-hidden">
  94. <image src="/static/images/yue.jpg" alt="" class="img-fluid rounded"
  95. mode="widthFix" />
  96. <view
  97. class="position-absolute action-visible top-0 start-0 h-100 w-100 bg-dark bg-opacity-50 rounded d-flex align-items-center justify-content-center">
  98. <a @click="openSurplusActivityDialog1()"
  99. class="btn btn-icon btn-lg btn-secondary rounded-circle waves-effect waves-light">
  100. →</a>
  101. </view>
  102. </view>
  103. </view>
  104. <view class="col-md-8 py-3 d-flex flex-column">
  105. <view class="card-body px-3 py-2">
  106. <h4> <text class="text-dark crm-one-font"
  107. v-t="'MonthlyActivities.item1'"></text> </h4>
  108. <view class="crm-one-font"></view>
  109. <view class="d-flex flex-wrap gap-2">
  110. <view
  111. :class="['btn waves-effect waves-light', monthlyGive ? 'btn-danger' : 'disabled']"
  112. @click="openSurplusActivityDialog1()">
  113. <text v-t="'news_add_field1.activities10_trading_aoyun.item3'"></text>
  114. </view>
  115. <cwg-link type="pdf" class="btn btn-outline-dark1 waves-effect waves-light"
  116. target="_blank" title="wallet.item15"
  117. :url="`pdf/pdf13/CWG Prime Bonus-cn.pdf`" />
  118. <cwg-link type="pdf" class="btn btn-outline-dark1 waves-effect waves-light"
  119. target="_blank" title="Transfer.item7"
  120. :url="`pdf/pdf13/CWG Markets Prime Bonus Application Process-cn.pdf`" />
  121. <view class="btn btn-outline-dark1 waves-effect waves-light"
  122. @click="goMonthlyTaskList()">
  123. <text v-t="'wallet.item14'"></text>
  124. </view>
  125. </view>
  126. </view>
  127. </view>
  128. </view>
  129. </view>
  130. </view>
  131. <!-- 赠金活动 -->
  132. <view class="col-12 m-b30">
  133. <view class="card card-action action-elevate action-border-primary">
  134. <view class="row g-0">
  135. <view class="col-md-4">
  136. <view class="card-header border-0 p-0 m-2 position-relative overflow-hidden">
  137. <image src="/static/images/su.png" alt="" class="img-fluid rounded"
  138. mode="widthFix" />
  139. <view
  140. class="position-absolute action-visible top-0 start-0 h-100 w-100 bg-dark bg-opacity-50 rounded d-flex align-items-center justify-content-center">
  141. <a @click="openSurplusActivityDialog()"
  142. class="btn btn-icon btn-lg btn-secondary rounded-circle waves-effect waves-light">
  143. →</a>
  144. </view>
  145. </view>
  146. </view>
  147. <view class="col-md-8 py-3 d-flex flex-column">
  148. <view class="card-body px-3 py-2">
  149. <h4> <text class="text-dark crm-one-font" v-t="'surplusList.item1'"></text>
  150. </h4>
  151. <p class="crm-one-font" v-t="'surplusList.item2'"></p>
  152. <view class="d-flex flex-wrap gap-2">
  153. <view
  154. :class="['btn mb-3 waves-effect waves-light', surplusGive ? 'btn-danger' : 'disabled']"
  155. @click="openSurplusActivityDialog()">
  156. <text v-t="'news_add_field1.activities10_trading_aoyun.item3'"></text>
  157. </view>
  158. <cwg-link type="pdf"
  159. class="btn btn-outline-dark1 mb-3 waves-effect waves-light"
  160. target="_blank" title="wallet.item15"
  161. :url="`pdf/pdf12/CWG Prime Bonus-${locale}.pdf`" />
  162. <cwg-link type="pdf"
  163. v-if="locale == 'cn' || locale == 'zhHant' || locale == 'en'"
  164. class="btn btn-outline-dark1 mb-3 waves-effect waves-light"
  165. target="_blank" title="Transfer.item7"
  166. :url="`pdf/pdf12/CWG Markets Prime Bonus Application Process-${locale}.pdf`" />
  167. <cwg-link type="pdf" v-else
  168. class="btn btn-outline-dark1 mb-3 waves-effect waves-light"
  169. target="_blank" title="Transfer.item7"
  170. :url="`pdf/pdf12/CWG Markets Prime Bonus Application Process-en.pdf`" />
  171. <view class="btn btn-outline-dark1 mb-3 waves-effect waves-light"
  172. @click="goSurplusTaskList()">
  173. <text v-t="'wallet.item14'"></text>
  174. </view>
  175. </view>
  176. </view>
  177. </view>
  178. </view>
  179. </view>
  180. </view>
  181. <!-- 交易大赛 -->
  182. <view class="col-12 m-b30" v-if="tableDataCptFlag">
  183. <view class="card card-action action-elevate action-border-primary">
  184. <view class="row g-0">
  185. <view class="col-md-4">
  186. <view class="card-header border-0 p-0 m-2 position-relative overflow-hidden">
  187. <image src="/static/images/banner.jpg" alt="" class="img-fluid rounded"
  188. mode="widthFix" />
  189. <view
  190. class="position-absolute action-visible top-0 start-0 h-100 w-100 bg-dark bg-opacity-50 rounded d-flex align-items-center justify-content-center">
  191. <a @click="toApplyCptOpen()"
  192. class="btn btn-icon btn-lg btn-secondary rounded-circle waves-effect waves-light">
  193. →</a>
  194. </view>
  195. </view>
  196. </view>
  197. <view class="col-md-8 py-3 d-flex flex-column">
  198. <view class="card-body px-3 py-2">
  199. <h4> <text class="text-dark crm-one-font"
  200. v-t="'news_add_field1.activitiesJYDS2025.item1'"></text> </h4>
  201. <p class="crm-one-font" v-t="'news_add_field1.activitiesJYDS2025.item2'">
  202. </p>
  203. <view class="d-flex flex-wrap gap-2">
  204. <view class="btn btn-danger waves-effect waves-light"
  205. v-if="tableDataCpt.signStatus == 0" @click="toApplyCptOpen()">
  206. <text v-t="'news_add_field1.activitiesJYDS.item3'"></text>
  207. </view>
  208. <view class="btn disabled waves-effect waves-light"
  209. v-if="tableDataCpt.signStatus == 1">
  210. <text v-t="'news_add_field1.activitiesJYDS.item3_1'"></text>
  211. </view>
  212. <view class="btn btn-outline-dark1 waves-effect waves-light"
  213. @click="toSingle('23xinjia')">
  214. <text v-t="'news_add_field1.activitiesJYDS.item4'"></text>
  215. </view>
  216. <view class="btn btn-outline-dark1 waves-effect waves-light"
  217. @click="toOpenSingle(tableDataCpt.pageAddress)">
  218. <text v-t="'news_add_field1.activitiesJYDS.item4_1'"></text>
  219. </view>
  220. </view>
  221. </view>
  222. </view>
  223. </view>
  224. </view>
  225. </view>
  226. <!-- 赠送活动列表2 -->
  227. <view class="col-12 m-b30" v-for="(item, index) in tableDataGive" :key="index + 'give'">
  228. <view class="card card-action action-elevate action-border-primary">
  229. <view class="row g-0">
  230. <view class="col-md-4" v-if="item.coverUrl">
  231. <view class="card-header border-0 p-0 m-2 position-relative overflow-hidden">
  232. <image :src="imgUrl + item.coverUrl" alt="" class="img-fluid rounded"
  233. mode="widthFix" />
  234. <view
  235. class="position-absolute action-visible top-0 start-0 h-100 w-100 bg-dark bg-opacity-50 rounded d-flex align-items-center justify-content-center">
  236. <a @click="toActivity24nianzhong()"
  237. class="btn btn-icon btn-lg btn-secondary rounded-circle waves-effect waves-light">
  238. →</a>
  239. </view>
  240. </view>
  241. </view>
  242. <view class="col-md-8 py-3 d-flex flex-column">
  243. <view class="card-body px-3 py-2">
  244. <h4> <text class="text-dark crm-one-font">{{ item.title }}</text> </h4>
  245. <p class="crm-one-font">{{ item.subTitle }}</p>
  246. <view class="d-flex flex-wrap gap-2">
  247. <view
  248. :class="['btn waves-effect waves-light', item.valid == 1 ? 'btn-danger' : 'disabled']"
  249. @click="toActivity24nianzhong()">
  250. <text v-t="'Custom.Activity.Apply'"></text>
  251. </view>
  252. <view class="btn btn-outline-dark1 waves-effect waves-light"
  253. @click="toSingle('newList', item.id)">
  254. <text v-t="'Custom.Activity.Single'"></text>
  255. </view>
  256. </view>
  257. </view>
  258. </view>
  259. </view>
  260. </view>
  261. </view>
  262. <!-- 活动列表 -->
  263. <view class="col-12 m-b30" v-for="(item, index) in tableData" :key="index + 'tttt'">
  264. <view class="card card-action action-elevate action-border-primary">
  265. <view class="row g-0">
  266. <view class="col-md-4" v-if="item.coverUrl">
  267. <view class="card-header border-0 p-0 m-2 position-relative overflow-hidden">
  268. <image :src="imgUrl + item.coverUrl" alt="" class="img-fluid rounded"
  269. mode="widthFix" />
  270. <view
  271. class="position-absolute action-visible top-0 start-0 h-100 w-100 bg-dark bg-opacity-50 rounded d-flex align-items-center justify-content-center">
  272. <a @click="applications(item)"
  273. class="btn btn-icon btn-lg btn-secondary rounded-circle waves-effect waves-light">
  274. →</a>
  275. </view>
  276. </view>
  277. </view>
  278. <view class="col-md-8 py-3 d-flex flex-column">
  279. <view class="card-body px-3 py-2">
  280. <h4> <text class="text-dark crm-one-font">{{ item.title }}</text> </h4>
  281. <p class="crm-one-font">{{ item.subTitle }}</p>
  282. <view class="d-flex flex-wrap gap-2">
  283. <view
  284. :class="['btn mb-3 waves-effect waves-light', overdue(item.startTime, item.endTime) ? 'btn-danger' : 'disabled']"
  285. @click="applications(item)">
  286. <text v-t="'Custom.Activity.Apply'"></text>
  287. </view>
  288. <view type="submit" value="Submit"
  289. class="btn btn-outline-dark1 mb-3 waves-effect waves-light"
  290. @click="checkActivity(item)">
  291. <text v-t="'Custom.Activity.List'"></text>
  292. </view>
  293. <view type="submit" value="Submit"
  294. class="btn btn-outline-dark1 mb-3 waves-effect waves-light"
  295. @click="toSingle(item.id)">
  296. <text v-t="'Custom.Activity.Single'"></text>
  297. </view>
  298. </view>
  299. </view>
  300. </view>
  301. </view>
  302. </view>
  303. </view>
  304. </view>
  305. </view>
  306. </view>
  307. <!--弹出框-->
  308. <cwg-popup v-model:visible="dialogChinaUnionPay" type="center" :mask-click="false" :show-footers="true">
  309. <view class="dia-content">
  310. <view class="des1" style="font-size: 16px; line-height: 1.6; margin: 30px 0 50px"
  311. v-html="t('news_add_field1.activities.item11')"></view>
  312. </view>
  313. <template #footer>
  314. <button type="primary" @click="toTransformActive">{{ t('Btn.Confirm') }}</button>
  315. <button @click="dialogChinaUnionPay = false">{{ t('Btn.Cancel') }}</button>
  316. </template>
  317. </cwg-popup>
  318. <!-- 23匠鑫活动过期弹出框 -->
  319. <cwg-popup v-model:visible="dialogChinaUnionPayJX" type="center" :mask-click="false" :show-footers="true">
  320. <view class="dia-content">
  321. <view class="des1" style="font-size: 16px; line-height: 1.6; margin: 30px 0 50px"
  322. v-html="t('news_add_field1.activitiesJX.item24')"></view>
  323. </view>
  324. <template #footer>
  325. <button type="primary" @click="dialogChinaUnionPayJX = false">{{ t('Btn.Confirm') }}</button>
  326. <button @click="dialogChinaUnionPayJX = false">{{ t('Btn.Cancel') }}</button>
  327. </template>
  328. </cwg-popup>
  329. <!--弹出框-->
  330. <cwg-popup v-model:visible="dialogChinaUnionPay1" type="center" :mask-click="false" :show-footers="true">
  331. <view class="dia-content">
  332. <view class="des1" style="font-size: 16px; line-height: 1.6; margin: 30px 0 50px"
  333. v-html="t('news_add_field1.activities.item12')"></view>
  334. </view>
  335. <template #footer>
  336. <button type="primary" @click="toRealizationActive">{{ t('Btn.Confirm') }}</button>
  337. <button @click="dialogChinaUnionPay1 = false">{{ t('Btn.Cancel') }}</button>
  338. </template>
  339. </cwg-popup>
  340. <!--23活动申请弹出-->
  341. <cwg-popup v-model:visible="dialogDealResult" type="center" :mask-click="false" :show-footers="true">
  342. <view class="dia-content">
  343. <view class="content" style="font-size: 14px; text-align: left">
  344. <form :rules="rules" :model="dialogDealResult_form" label-position="top">
  345. <view class="form-item">
  346. <view class="form-label">{{ t('Label.TradingAccount') }}</view>
  347. <picker mode="selector" :range="loginOptions" :range-key="'label'"
  348. @change="onDialogDealResultLoginChange">
  349. <view class="picker-input">
  350. {{ dialogDealResult_form.login || t('placeholder.choose') }}
  351. </view>
  352. </picker>
  353. </view>
  354. </form>
  355. </view>
  356. </view>
  357. <template #footer>
  358. <button type="primary" @click="toApply23">{{ t('Btn.Confirm') }}</button>
  359. <button @click="toApply23Cancel">{{ t('Btn.Cancel') }}</button>
  360. </template>
  361. </cwg-popup>
  362. <!--23匠鑫活动申请弹出-->
  363. <cwg-popup v-model:visible="dialogDealResultJx" type="center" :mask-click="false" :show-footers="true">
  364. <view class="dia-content">
  365. <view class="content" style="font-size: 14px; text-align: left">
  366. <form :rules="rules" :model="dialogDealResultJx_form" label-position="top">
  367. <view class="form-item">
  368. <view class="form-label">{{ t('Label.TradingAccount') }}</view>
  369. <picker mode="selector" :range="loginOptions" :range-key="'label'"
  370. @change="onDialogDealResultJxLoginChange">
  371. <view class="picker-input">
  372. {{ dialogDealResultJx_form.login || t('placeholder.choose') }}
  373. </view>
  374. </picker>
  375. </view>
  376. </form>
  377. </view>
  378. </view>
  379. <template #footer>
  380. <button type="primary" @click="toApply23Jx">{{ t('Btn.Confirm') }}</button>
  381. <button @click="toApply23JxCancel">{{ t('Btn.Cancel') }}</button>
  382. </template>
  383. </cwg-popup>
  384. <!--23匠鑫活动申请弹出-->
  385. <cwg-popup v-model:visible="dialogDealResultJxVip" type="center" :mask-click="false" :show-footers="true">
  386. <view class="dia-content">
  387. <view class="content" style="font-size: 14px; text-align: left">
  388. <form :rules="rules" :model="dialogDealResultJx_formVip" label-position="top">
  389. <view class="form-item">
  390. <view class="form-label">{{ t('Label.TradingAccount') }}</view>
  391. <picker mode="selector" :range="loginOptions" :range-key="'label'"
  392. @change="onDialogDealResultJxVipLoginChange">
  393. <view class="picker-input">
  394. {{ dialogDealResultJx_formVip.login || t('placeholder.choose') }}
  395. </view>
  396. </picker>
  397. </view>
  398. </form>
  399. </view>
  400. </view>
  401. <template #footer>
  402. <button type="primary" @click="toApply23JxVip">{{ t('Btn.Confirm') }}</button>
  403. <button @click="toApply23JxCancelVip">{{ t('Btn.Cancel') }}</button>
  404. </template>
  405. </cwg-popup>
  406. <!--交易大赛活动申请弹出-->
  407. <cwg-popup v-model:visible="dialogDealResultCpt" type="center" :mask-click="false" :show-footers="true">
  408. <view class="dia-content">
  409. <view class="content" style="font-size: 14px; text-align: left">
  410. <form :rules="rules" :model="dialogDealResultCpt_form" label-position="top">
  411. <view class="form-item">
  412. <view class="form-label">{{ t('Label.TradingAccount') }}</view>
  413. <picker mode="selector" :range="loginOptions" :range-key="'label'"
  414. @change="onDialogDealResultCptLoginChange">
  415. <view class="picker-input">
  416. {{ dialogDealResultCpt_form.login || t('placeholder.choose') }}
  417. </view>
  418. </picker>
  419. </view>
  420. <view class="form-item">
  421. <view class="form-label">{{ t('Documentary.console.item20') }}</view>
  422. <input class="form-input" v-model="dialogDealResultCpt_form.nickname" type="text" />
  423. </view>
  424. <view class="form-item">
  425. <view class="form-label">{{ t('news_add_field1.activitiesJYDS.item4_3') }}</view>
  426. <input class="form-input" v-model="dialogDealResultCpt_form.recipient" type="text" />
  427. </view>
  428. <view class="form-item">
  429. <view class="form-label">{{ t('news_add_field1.activitiesJYDS.item4_2') }}</view>
  430. <input class="form-input" v-model="dialogDealResultCpt_form.mobile" type="text" />
  431. </view>
  432. <view class="form-item">
  433. <view class="form-label">{{ t('Shop.Address.DetailedAddress') }}</view>
  434. <input class="form-input" v-model="dialogDealResultCpt_form.address" type="text" />
  435. </view>
  436. <view v-html="t('news_add_field1.activitiesJYDS.item4_4')"></view>
  437. </form>
  438. </view>
  439. </view>
  440. <template #footer>
  441. <button type="primary" @click="toApplyCpt">{{ t('Btn.Confirm') }}</button>
  442. <button @click="toApplyCptCancel">{{ t('Btn.Cancel') }}</button>
  443. </template>
  444. </cwg-popup>
  445. <!--任务提示弹出框-->
  446. <cwg-popup v-model:visible="dialogNewTask" :title="t('wallet.item16')" type="center" :mask-click="false"
  447. :show-footers="true">
  448. <view class="dia-content">
  449. <view class="des1" style="font-size: 14px; line-height: 1.6; margin: 30px 0 50px">
  450. <text v-html="t('wallet.item17')"></text>{{ newTaskList.endTime }}
  451. <text v-html="t('wallet.item18')"></text>{{ newTaskList.tradeVolume }}
  452. <text v-html="t('wallet.item19')"></text>{{ newTaskList.raffleNumber }}
  453. <text v-html="t('wallet.item20')"></text>
  454. </view>
  455. </view>
  456. <template #footer>
  457. <button type="primary" @click="dialogNewTask = false">{{ t('Btn.Confirm') }}</button>
  458. <button @click="dialogNewTask = false">{{ t('Home.msg.item3') }}</button>
  459. </template>
  460. </cwg-popup>
  461. <!--抽奖弹出框-->
  462. <cwg-popup v-model:visible="dialogNewTaskDraw" :title="t('wallet.item65')" type="center" :mask-click="false"
  463. :show-footers="true" width="800px">
  464. <view class="dia-content">
  465. <DrawLotteryRaffle :curLuckyDrawTimesF="LuckyDrawsNumber"></DrawLotteryRaffle>
  466. </view>
  467. <template #footer>
  468. <button @click="closedialogNewTaskDraw">{{ t('Home.msg.item3') }}</button>
  469. </template>
  470. </cwg-popup>
  471. <!--24精英杯活动申请弹出-->
  472. <cwg-popup v-model:visible="dialogDealResultJxJYB" type="center" :mask-click="false" :show-footers="true">
  473. <view class="dia-content">
  474. <view class="content" style="font-size: 14px; text-align: left">
  475. <form :rules="rules" :model="dialogDealResultJx_formJYB" label-position="top">
  476. <view class="form-item">
  477. <view class="form-label">{{ t('Label.TradingAccount') }}</view>
  478. <picker mode="selector" :range="loginOptions" :range-key="'label'"
  479. @change="onDialogDealResultJxJYBLoginChange">
  480. <view class="picker-input">
  481. {{ dialogDealResultJx_formJYB.login || t('placeholder.choose') }}
  482. </view>
  483. </picker>
  484. </view>
  485. </form>
  486. </view>
  487. </view>
  488. <template #footer>
  489. <button type="primary" @click="toApply24JYBVip">{{ t('Btn.Confirm') }}</button>
  490. <button @click="toApply24JYBCancelVip">{{ t('Btn.Cancel') }}</button>
  491. </template>
  492. </cwg-popup>
  493. <!--24无忧交易申请弹出-->
  494. <cwg-popup v-model:visible="dialogDealResultNoWorries" type="center" :mask-click="false" :show-footers="true">
  495. <view class="dia-content">
  496. <view class="content" style="font-size: 14px; text-align: left">
  497. <form :rules="rules" :model="dialogDeal_formNoWorries" label-position="top">
  498. <view class="form-item">
  499. <view class="form-label">{{ t('Label.TradingAccount') }}</view>
  500. <picker mode="selector" :range="loginOptions" :range-key="'label'"
  501. @change="onDialogDeal_formNoWorriesLoginChange">
  502. <view class="picker-input">
  503. {{ dialogDeal_formNoWorries.login || t('placeholder.choose') }}
  504. </view>
  505. </picker>
  506. </view>
  507. </form>
  508. </view>
  509. </view>
  510. <template #footer>
  511. <button type="primary" @click="toApplyNoWorries">{{
  512. t('news_add_field1.activitiesNoWorries.item6_1') }}</button>
  513. <button @click="toApplyNoWorriesCancel">{{ t('news_add_field1.activitiesNoWorries.item6_2')
  514. }}</button>
  515. </template>
  516. </cwg-popup>
  517. <!--盈利转换弹出框-->
  518. <cwg-popup v-model:visible="dialogNoWorries" type="center" :mask-click="false" :show-footers="true">
  519. <view class="dia-content">
  520. <view class="des1" style="font-size: 16px; line-height: 1.6; margin: 30px 0 50px"
  521. v-html="t('news_add_field1.activitiesNoWorries.item7')"></view>
  522. </view>
  523. <template #footer>
  524. <button type="primary" @click="realizationNoWorries">{{
  525. t('news_add_field1.activitiesNoWorries.item6_1') }}</button>
  526. <button @click="dialogNoWorries = false">{{ t('news_add_field1.activitiesNoWorries.item6_2')
  527. }}</button>
  528. </template>
  529. </cwg-popup>
  530. <!--申请成功弹出框-->
  531. <cwg-popup v-model:visible="dialogNoWorriesApply" type="center" :mask-click="false" :show-footers="true">
  532. <view class="dia-content">
  533. <view class="des1" style="font-size: 16px; line-height: 1.6; margin: 30px 0 50px"
  534. v-html="t('news_add_field1.activitiesNoWorries.item6')"></view>
  535. </view>
  536. <template #footer>
  537. <button type="primary" @click="dialogNoWorriesApply = false">{{
  538. t('news_add_field1.activitiesNoWorries.item6_1') }}</button>
  539. <button @click="dialogNoWorriesApply = false">{{ t('news_add_field1.activitiesNoWorries.item6_2')
  540. }}</button>
  541. </template>
  542. </cwg-popup>
  543. <!--收益模拟器弹出框-->
  544. <cwg-popup v-model:visible="openCalculatorFlag" :title="t('news_add_field1.NewYear24.item4')" type="center"
  545. :mask-click="false" :show-footers="true">
  546. <view class="dia-content NewYear_calculator">
  547. <view class="content">
  548. <view class="calculator-input">
  549. <view class="input-prefix">{{ t('news_add_field1.NewYear24.item5') }}</view>
  550. <input class="input-field" v-model="NewYear24DataBalance" type="digit" />
  551. </view>
  552. <view class="tip">
  553. <text v-html="t('news_add_field1.NewYear24.item6')"></text>
  554. <text class="red">${{ NewYear24Data.balance }}</text>
  555. <text v-html="t('news_add_field1.NewYear24.item7')"></text>
  556. <text class="red">${{ NewYear24Data.income }}</text>
  557. <text v-html="t('news_add_field1.NewYear24.item8')"></text>
  558. </view>
  559. </view>
  560. </view>
  561. <template #footer>
  562. <button type="primary" @click="calculateIncome">{{ t('news_add_field1.NewYear24.item8_1')
  563. }}</button>
  564. <button @click="openCalculatorFlag = false">{{ t('news_add_field1.NewYear24.item8_2') }}</button>
  565. </template>
  566. </cwg-popup>
  567. <!-- 现在有的活动 -->
  568. <!-- 11111111动态活动申请 -->
  569. <cwg-popup v-model:visible="dialogInfoTradingAdd" :title="t('surplusList.item1')" type="center"
  570. :mask-click="false" :show-footers="true" width="600px">
  571. <view class="dia-content surplusActivityDialog">
  572. <view class="content" style="padding: 20px">
  573. <view class="form-item">
  574. <view class="form-label">{{ t('Drawer.Label.ActivityName') }}:</view>
  575. <uni-easyinput :disabled="true" v-model="information.title"
  576. :placeholder="t('placeholder.choose')" type="text" />
  577. </view>
  578. <view class="form-item">
  579. <view class="form-label">{{
  580. t('Drawer.Label.ActivityLogin') }}:</view>
  581. <cwg-combox :clearable="false" v-model:value="information.login" :options="loginOptions"
  582. :placeholder="t('placeholder.choose')" />
  583. </view>
  584. <view class="form-item">
  585. <view class="form-label">{{
  586. t('Label.Note') }}:</view>
  587. <uni-easyinput v-model="information.participationNote" :placeholder="t('placeholder.choose')"
  588. type="textarea" autoHeight />
  589. </view>
  590. <view class="form-item">
  591. <checkbox-group :value="information.agree ? ['1'] : []" @change="onAgreeChange">
  592. <label class="checkbox">
  593. <checkbox value="1" :checked="information.agree" />
  594. <view class="crm-cursor" style="display: inline-block; margin-left: 10px;">
  595. <text>
  596. <text v-if="!isZh.value" v-t="'Drawer.msg.activityAgree1'"></text>
  597. <text v-if="locale == 'en'" v-t="'Drawer.msg.activityAgree1'"></text>
  598. <text v-if="locale == 'en'" v-t="'Drawer.msg.activityAgree2'"></text>
  599. <text v-t="'Drawer.msg.activityTerms'" @click.stop="toSingle(information.id)"
  600. style="font-weight: bold; text-decoration: underline;"
  601. class="crm-cursor"></text>
  602. <text v-if="!isZh.value" v-t="'Drawer.msg.activityAgree2'"></text>
  603. </text>
  604. </view>
  605. </label>
  606. </checkbox-group>
  607. </view>
  608. </view>
  609. </view>
  610. <template #footer>
  611. <button @click="closeAdd">{{ t('Btn.Cancel') }}</button>
  612. <button type="primary" @click="activityApply" :disabled="!information.login || !information.agree">
  613. {{ t('Btn.Confirm') }}
  614. </button>
  615. </template>
  616. </cwg-popup>
  617. <!-- 11111111动态活动账户操作 -->
  618. <cwg-popup v-model:visible="dialogInfoTradingAdd1" :title="t('surplusList.item1')" type="center"
  619. :mask-click="false" :show-footers="true" width="600px">
  620. <view class="dia-content surplusActivityDialog">
  621. <view class="content" style="padding: 20px">
  622. <view class="form-item">
  623. <view class="form-label">{{ t('Drawer.Label.ActivityName') }}:</view>
  624. <uni-easyinput :disabled="true" v-model="information.title"
  625. :placeholder="t('placeholder.choose')" type="text" />
  626. </view>
  627. <view class="form-item">
  628. <view class="form-label">{{
  629. t('Drawer.Label.ActivityList') }}:</view>
  630. </view>
  631. <cwg-tabel ref="tableRef" :columns="columns" :mobilePrimaryFields="mobilePrimaryFields"
  632. :queryParams="search1" :api="getApplyListApi">
  633. <template #status="{ row }">
  634. <text v-if="row.status == 1" v-t="'State.ToBeProcessed'"></text>
  635. <text v-if="row.status == 2 && row.completeStatus == 0" v-t="'State.Ongoing'"></text>
  636. <text v-if="row.status == 2 && row.completeStatus == 1"
  637. v-t="'State.InTheProcessing'"></text>
  638. <text v-if="row.status == 2 && row.completeStatus == 2" v-t="'State.Completed'"></text>
  639. <text style="display: block" v-if="row.status == 3">
  640. <text style="display: block" v-t="'State.Refused'"></text>
  641. <text style="display: block">(<text v-t="'State.Participate'"></text>)</text>
  642. </text>
  643. <text style="display: block" v-if="row.completeStatus == 3">
  644. <text style="display: block" v-t="'State.Refused'"></text>
  645. <text style="display: block">(<text v-t="'State.Complete'"></text>)</text>
  646. </text>
  647. </template>
  648. <template #action="{ row }">
  649. <text class="crm-cursor status-tag status-completed" v-if="
  650. row.status == 2 && row.completeStatus == 0
  651. " v-t="'State.Complete'" @click="handleCommand(row)">{{ row.participationNote }}</text>
  652. <text v-else>{{ row.participationNote }}</text>
  653. </template>
  654. </cwg-tabel>
  655. </view>
  656. </view>
  657. <template #footer>
  658. <button @click="closeAdd">{{ t('Btn.Cancel') }}</button>
  659. <button type="primary" @click="activityApply" :disabled="!information.login">
  660. {{ t('Btn.Confirm') }}
  661. </button>
  662. </template>
  663. </cwg-popup>
  664. <!-- 11111111Surplus活动弹框 -->
  665. <cwg-popup v-model:visible="dialogSurplusActivity" :title="t('surplusList.item1')" type="center"
  666. :mask-click="false" :show-footers="true" width="600px">
  667. <view class="dia-content surplusActivityDialog">
  668. <view class="content" style="padding: 20px">
  669. <view class="form-item">
  670. <view class="form-label">{{
  671. t('Custom.Deposit.Title1') }}:</view>
  672. <cwg-combox :clearable="false" v-model:value="valueInfo" :options="loginComboxOptions"
  673. :placeholder="t('placeholder.choose')" @change="handleValueInfoChange" />
  674. </view>
  675. <view class="form-item">
  676. <view class="form-label">{{
  677. t('surplusList.item3') }}:</view>
  678. <cwg-combox :class="{ disabled: surplusActivityLoading }" :clearable="false"
  679. v-model:value="selectedSurplusActivity" :options="surplusActivityOptions"
  680. :placeholder="t('placeholder.choose')" />
  681. </view>
  682. </view>
  683. </view>
  684. <template #footer>
  685. <button @click="closeSurplusActivityDialog">{{ t('Btn.Cancel') }}</button>
  686. <button type="primary" @click="confirmSurplusActivity"
  687. :disabled="!selectedSurplusActivity || !valueInfo">
  688. {{ t('Btn.Confirm') }}
  689. </button>
  690. </template>
  691. </cwg-popup>
  692. <!-- 111111月赏礼遇活动弹框 -->
  693. <cwg-popup v-model:visible="dialogSurplusActivity1" :title="t('MonthlyActivities.item1')" type="center"
  694. :mask-click="false" :show-footers="true" width="600px">
  695. <view class="dia-content">
  696. <view class="content" style="padding: 20px; font-size: 16px">
  697. <strong v-t="'MonthlyActivities.item8'"></strong>
  698. </view>
  699. </view>
  700. <template #footer>
  701. <button @click="closeSurplusActivityDialog1">{{ t('Btn.Cancel') }}</button>
  702. <button type="primary" @click="confirmSurplusActivity1">{{ t('Btn.Confirm') }}</button>
  703. </template>
  704. </cwg-popup>
  705. <cwg-confirm-popup />
  706. </cwg-page-wrapper>
  707. </template>
  708. <script setup lang="ts">
  709. import { ref, reactive, computed, onMounted, onUnmounted, watch } from 'vue'
  710. import { onLoad, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
  711. import { useI18n } from 'vue-i18n'
  712. import ActivityCard from './components/ActivityCard.vue'
  713. import ActivityDialogs from './components/ActivityDialogs.vue'
  714. import { activityApi } from "@/service/activity"
  715. import { customApi } from "@/service/custom"
  716. import Config from '@/config/index'
  717. import useUserStore from "@/stores/use-user-store";
  718. const userStore = useUserStore();
  719. import { isAfterJuly28 } from "@/utils/dateUtils"
  720. import { useConfirm } from '@/hooks/useConfirm'
  721. const confirm = useConfirm()
  722. const { t, locale } = useI18n()
  723. let { Code, Host05 } = Config
  724. // 国家列表
  725. const countries = [
  726. "DZ", "AO", "BJ", "BW", "BF", "CM", "CG", "CD", "CI", "DJ", "EG", "ET",
  727. "GA", "GM", "GH", "GN", "KE", "MG", "MW", "ML", "MR", "MA", "MZ", "NA",
  728. "NE", "NG", "RW", "SN", "SL", "SO", "ZA", "SS", "SD", "TZ", "TG", "TN",
  729. "UG", "ZM", "ZW", "LS", "BH", "IR", "IQ", "IL", "JO", "KW", "LB", "OM",
  730. "PS", "QA", "SA", "SY", "TR", "AE", "YE", "AR", "BO", "BR", "CL", "CO",
  731. "EC", "GY", "PY", "PE", "SR", "UY", "VE", "BZ", "CR", "SV", "GT", "HN",
  732. "NI", "PA", "AU", "CA", "AL", "AD", "AM", "AT", "AZ", "BY", "BE", "BA",
  733. "BG", "HR", "CY", "CZ", "DK", "EE", "FI", "FR", "GE", "DE", "GR", "HU",
  734. "IS", "IE", "IT", "XK", "LV", "LI", "LT", "LU", "MT", "MD", "MC", "ME",
  735. "NL", "MK", "NO", "PL", "PT", "RO", "RU", "SM", "RS", "SK", "SI", "ES",
  736. "SE", "CH", "UA", "VA",
  737. ]
  738. // ==================== 响应式数据 ====================
  739. const monthlyGive = ref(false) // 是否可以参加CWG Markets 月赏礼遇活动
  740. const selectedAccount = ref<any>(null)
  741. const valueInfo = ref<any>(null)
  742. const loginOptions1 = ref<any[]>([])
  743. const standard = ref(true)
  744. const limitedStatus = ref<any>(null)
  745. const flag = ref(false)
  746. const pictLoading = ref(false)
  747. const openType = ref("")
  748. const dialogInfoTradingAdd = ref(false) //新增
  749. const dialogInfoTradingAdd1 = ref(false) //新增
  750. const imgUrl = ref(Host05)
  751. const show = ref(false)
  752. const dialogTableVisible = ref(false)
  753. const formInfo = ref({}) //传给弹窗的值
  754. const information = reactive({
  755. id: "",
  756. title: "",
  757. login: "",
  758. participationNote: "",
  759. })
  760. const hot = ref("")
  761. const singleData = ref({})
  762. const anshiClose = ref(true)
  763. const tableData1 = ref<any>({}) //20赠金活动
  764. const interval = ref<any>(null) //倒计时方法
  765. const isCountDown = ref("") //倒计时
  766. const isCashBack = ref(false) //返现按钮
  767. const tableData2 = ref<any>(true) //2023迎新活动
  768. const tableData2Flag = ref(false) //2023迎新活动
  769. const isTransform = ref<any>(null) //转换按钮
  770. const isRealization = ref<any>(null) //变现按钮
  771. const dialogChinaUnionPay = ref(false)
  772. const dialogChinaUnionPay1 = ref(false)
  773. const loginOptions = ref<any[]>([])
  774. const dialogDealResult = ref(false)
  775. const dialogDealResult_form = reactive({ login: "" })
  776. const tableData3Flag = ref(false) //匠鑫学院cwg活动
  777. const tableData3 = ref<any>(true) //匠鑫学院cwg活动
  778. const isRealizationJx = ref<any>(null) //变现按钮
  779. const dialogDealResultJx = ref(false)
  780. const dialogDealResultJx_form = reactive({ login: "" })
  781. const dialogChinaUnionPayJX = ref(false)
  782. const tableData3FlagVip = ref(false) //匠鑫学院cwg活动
  783. const tableData3Vip = ref<any>(true) //匠鑫学院cwg活动
  784. const isRealizationJxVip = ref<any>(null) //变现按钮
  785. const dialogDealResultJxVip = ref(false)
  786. const dialogDealResultJx_formVip = reactive({ login: "" })
  787. const dialogChinaUnionPayJXVip = ref(false)
  788. const tableData3FlagJYB = ref(false) //24精英杯cwg活动
  789. const tableData3JYB = ref<any>(true) //24精英杯cwg活动
  790. const isRealizationJxJYB = ref<any>(null) //变现按钮
  791. const dialogDealResultJxJYB = ref(false)
  792. const dialogDealResultJx_formJYB = reactive({ login: "" })
  793. const dialogChinaUnionPayJXJYB = ref(false)
  794. const tableData4Flag = ref(false) //年中赠金活动
  795. const tableData4 = ref<any>(true) //年中赠金活动
  796. const tableData4TwoFlag = ref(false) //年中赠金活动-20
  797. const tableData4Two = ref<any>(true) //年中赠金活动-20
  798. const tableDataCptFlag = ref(false) //交易大赛活动
  799. const tableDataCpt = ref<any>(true) //交易大赛活动
  800. const dialogDealResultCpt = ref(false)
  801. const dialogDealResultCpt_form = reactive({
  802. login: "",
  803. address: "",
  804. cptId: "",
  805. mobile: "",
  806. nickname: "",
  807. recipient: "",
  808. })
  809. const dialogChinaUnionPayCpt = ref(false)
  810. const tableDataCptFlagCode = ref("")
  811. const isZh = computed(() => ['cn', 'zh', 'zhHant'].includes(locale.value))
  812. //CWG 现金嘉年华-抽奖
  813. const newTask = ref(false) //新任务
  814. const newTaskList = ref({ endTime: "", tradeVolume: "", raffleNumber: "" }) //新任务列表
  815. const dialogNewTask = ref(false) //新任务弹窗
  816. const dialogNewTaskDraw = ref(false) //打开抽奖弹窗
  817. const LuckyDrawsNumber = ref("0") //抽奖次数
  818. const choujiaClose = ref(false)
  819. const tableDataNoWorriesFlag = ref(false) //24无忧交易
  820. const tableDataNoWorries = ref<any>(false) //24无忧交易
  821. const isRealizationNoWorries = ref<any>(null) //变现按钮
  822. const dialogDealResultNoWorries = ref(false)
  823. const dialogDeal_formNoWorries = reactive({ login: "" })
  824. const dialogNoWorries = ref(false)
  825. const dialogNoWorriesApply = ref(false)
  826. const tableDataNewYear24Flag = ref(false) //24新年庆典
  827. const tableDataNewYear24 = ref<any>(false) //24新年庆典
  828. const openCalculatorFlag = ref(false)
  829. const NewYear24DataBalance = ref("")
  830. const NewYear24Data = reactive({
  831. balance: 0,
  832. income: 0,
  833. })
  834. const dialogSurplusActivity1 = ref(false) // CWG Markets 月赏礼遇活动弹框
  835. const surplusActivityOptions1 = ref<any[]>([]) // CWG Markets 月赏礼遇活动下拉框选项
  836. const selectedSurplusActivity1 = ref<any>(null) // 选中的CWG Markets 月赏礼遇活动
  837. const surplusActivityLoading1 = ref(false) // 加载状态
  838. const surplusGive1 = ref(false) // 是否可以参加CWG Markets 月赏礼遇活动
  839. // Surplus活动相关
  840. const dialogSurplusActivity = ref(false) // surplus活动弹框
  841. const surplusActivityOptions = ref<any[]>([]) // surplus活动下拉框选项
  842. const selectedSurplusActivity = ref<any>(null) // 选中的surplus活动
  843. const surplusActivityLoading = ref(false) // 加载状态
  844. const surplusGive = ref(false) // 是否可以参加surplus活动
  845. const activityShowsInfo = ref<any>(null) // 活动显示信息
  846. const tableData = ref<any[]>([])
  847. const search = reactive({
  848. date: [] as any[],
  849. startDate: "",
  850. endDate: "",
  851. type: 1,
  852. })
  853. //分页
  854. const pagerInfo = reactive({ row: 10, current: 1, pageTotal: 0, rowTotal: 0 })
  855. const tableDataGive = ref<any[]>([])
  856. // 验证规则
  857. const rules = reactive({
  858. login: [
  859. {
  860. required: true,
  861. message: t("vaildate.select.empty"),
  862. trigger: "change",
  863. },
  864. ],
  865. address: [
  866. {
  867. required: true,
  868. message: t("vaildate.input.empty"),
  869. trigger: "blur",
  870. },
  871. ],
  872. mobile: [
  873. {
  874. required: true,
  875. message: t("vaildate.input.empty"),
  876. trigger: "blur",
  877. },
  878. ],
  879. nickname: [
  880. {
  881. required: true,
  882. message: t("vaildate.input.empty"),
  883. trigger: "blur",
  884. },
  885. ],
  886. recipient: [
  887. {
  888. required: true,
  889. message: t("vaildate.input.empty"),
  890. trigger: "blur",
  891. },
  892. ],
  893. })
  894. // ==================== 计算属性 ====================
  895. const country = computed(() => {
  896. return userStore?.userInfo?.customInfo?.country
  897. })
  898. const myCid = computed(() => {
  899. return userStore?.userInfo?.customInfo?.cId
  900. })
  901. const isSupportedCountry = computed(() => {
  902. try {
  903. const country = userStore?.userInfo?.customInfo?.country
  904. return countries.includes(country)
  905. } catch {
  906. return false
  907. }
  908. })
  909. const isGuoQin = computed(() => {
  910. let flag = false
  911. let startTime1 = "2024/10/01 00:00:00"
  912. let endTime1 = "2024/10/07 23:59:59"
  913. let timezone = 8
  914. let offset_GMT = new Date().getTimezoneOffset()
  915. let nowDate = new Date().getTime()
  916. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  917. let end = new Date(endTime1).getTime()
  918. let start = new Date(startTime1).getTime()
  919. if (now > start && now < end) {
  920. flag = true
  921. }
  922. return flag
  923. })
  924. const showMonthlyActivity2026 = computed(() => {
  925. let targetTime = "2026/01/01 00:00:00"
  926. let timezone = 8
  927. let offset_GMT = new Date().getTimezoneOffset()
  928. let nowDate = new Date().getTime()
  929. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  930. let target = new Date(targetTime).getTime()
  931. return now >= target
  932. })
  933. // ==================== 工具方法 ====================
  934. //时间补0
  935. const getzero = (time: number | string) => {
  936. return time > "9" ? time : "0" + time
  937. }
  938. //时间格式转换
  939. const timeConvert = (val: string) => {
  940. if (val) {
  941. var datetime = new Date(val.replace(/-/g, "/"))
  942. var year = datetime.getFullYear()
  943. var month = datetime.getMonth() + 1
  944. var date = datetime.getDate()
  945. if (month < 10) {
  946. month = "0" + month
  947. }
  948. if (date < 10) {
  949. date = "0" + date
  950. }
  951. var time = year + "年" + month + "月" + date + "日"
  952. return time
  953. }
  954. return ""
  955. }
  956. //判断匠鑫活动是否报名结束
  957. const timeExpireJx = (endTime: string) => {
  958. let endTime1 = endTime.replace(/-/g, "/").split(" ")[0]
  959. let timezone = 2
  960. let offset_GMT = new Date().getTimezoneOffset()
  961. let nowDate = new Date().getTime()
  962. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  963. let end = new Date(endTime1).getTime()
  964. return now < end
  965. }
  966. //判断活动是否结束
  967. const overdue = (startTime: string, endTime: string) => {
  968. let startTime1 = startTime.replace(/-/g, "/").split(" ")[0]
  969. let endTime1 = endTime.replace(/-/g, "/").split(" ")[0]
  970. let timezone = 2
  971. let offset_GMT = new Date().getTimezoneOffset()
  972. let nowDate = new Date().getTime()
  973. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  974. let start = new Date(startTime1).getTime()
  975. let end = new Date(endTime1).getTime()
  976. return start < now && now < end
  977. }
  978. const isAfterJuly21 = () => {
  979. const currentDate = new Date()
  980. const july21 = new Date(currentDate.getFullYear(), 6, 21)
  981. return currentDate >= july21
  982. }
  983. // 判断是否在9月30日晚上12点之后,用于隐藏特定活动
  984. const isAfterSeptember30 = () => {
  985. return true
  986. }
  987. const standardTime = () => {
  988. standard.value = false
  989. }
  990. const groupCurrency = (type: string) => {
  991. if (type == "GBP") {
  992. return ": £"
  993. } else if (type == "USD") {
  994. return ": $"
  995. } else if (type == "EUR") {
  996. return ": €"
  997. } else if (type == "USC") {
  998. return ": ¢"
  999. } else {
  1000. return ": $"
  1001. }
  1002. }
  1003. const groupCurrency1 = (type: string) => {
  1004. if (type == "GBP") {
  1005. return "£"
  1006. } else if (type == "USD") {
  1007. return "$"
  1008. } else if (type == "EUR") {
  1009. return "€"
  1010. } else if (type == "USC") {
  1011. return "¢"
  1012. } else {
  1013. return "$"
  1014. }
  1015. }
  1016. const groupTypeName = (type: string) => {
  1017. if (type == "1") {
  1018. return t("AccountType.ClassicAccount")
  1019. } else if (type == "2") {
  1020. return t("AccountType.SeniorAccount")
  1021. } else if (type == "3") {
  1022. return isAfterJuly28() ? "--" : t("AccountType.AgencyAccount")
  1023. } else if (type == "5") {
  1024. return t("AccountType.SpeedAccount")
  1025. } else if (type == "6") {
  1026. return t("AccountType.SpeedAccount")
  1027. } else if (type == "7") {
  1028. return t("AccountType.StandardAccount")
  1029. } else if (type == "8") {
  1030. return t("AccountType.CentAccount")
  1031. }
  1032. return ""
  1033. }
  1034. // ==================== API 请求方法 ====================
  1035. const loginComboxOptions = computed(() => {
  1036. return loginOptions1.value.map((item) => ({
  1037. text: item.label,
  1038. value: item.login
  1039. }))
  1040. })
  1041. //获取账户信息
  1042. const getDateList = async () => {
  1043. let res = await customApi.DropdownlusActivityOptions({ platform: "" })
  1044. if (res.code == Code.StatusOK) {
  1045. // loginOptions1.value = res.data
  1046. loginOptions1.value = res.data.map(item => ({
  1047. ...item,
  1048. label: `${item.login} - ${groupTypeName(item.type)} - ${t('Custom.Deposit.AvailableBalance')}${groupCurrency(item.currency)}${item.balance}`
  1049. }))
  1050. } else {
  1051. uni.showToast({ title: res.msg, icon: "none" })
  1052. }
  1053. }
  1054. //获取list
  1055. const searchFunc = async () => {
  1056. if (flag.value) {
  1057. return
  1058. } else {
  1059. flag.value = true
  1060. }
  1061. pictLoading.value = true
  1062. let res = await activityApi.ActivityExtensionIist({
  1063. hot: hot.value,
  1064. tag: 1,
  1065. lang: ["cn", "zhHant"].indexOf(locale.value) !== -1 ? "cn" : "en",
  1066. page: {
  1067. current: pagerInfo.current,
  1068. row: pagerInfo.row,
  1069. },
  1070. })
  1071. if (res.code == Code.StatusOK) {
  1072. tableData.value = res.data
  1073. pagerInfo.rowTotal = res.page.rowTotal
  1074. pagerInfo.pageTotal = res.page.pageTotal
  1075. flag.value = false
  1076. } else {
  1077. uni.showToast({ title: res.msg, icon: "none" })
  1078. flag.value = false
  1079. }
  1080. pictLoading.value = false
  1081. }
  1082. //获取list-赠金活动列表
  1083. const searchFunc1 = async () => {
  1084. pictLoading.value = true
  1085. let res = await activityApi.ActivityExtensionGiveList({
  1086. page: {
  1087. current: pagerInfo.current,
  1088. row: pagerInfo.row,
  1089. },
  1090. })
  1091. if (res.code == Code.StatusOK) {
  1092. tableDataGive.value = res.data
  1093. pagerInfo.rowTotal = res.page.rowTotal
  1094. pagerInfo.pageTotal = res.page.pageTotal
  1095. } else {
  1096. uni.showToast({ title: res.msg, icon: "none" })
  1097. }
  1098. pictLoading.value = false
  1099. }
  1100. //详情
  1101. const getSingle = async (id: string) => {
  1102. let res = await activityApi.ActivitySingle({
  1103. id: id,
  1104. })
  1105. if (res.code == Code.StatusOK) {
  1106. singleData.value = res.data
  1107. } else {
  1108. uni.showToast({ title: res.msg, icon: "none" })
  1109. }
  1110. }
  1111. //获取客户申请活动列表
  1112. const Api = async () => {
  1113. let res = await activityApi.ActivityApplyList({
  1114. page: {
  1115. current: pagerInfo.current,
  1116. row: pagerInfo.row,
  1117. },
  1118. })
  1119. if (res.code == Code.StatusOK) {
  1120. pagerInfo.rowTotal = res.page.rowTotal
  1121. pagerInfo.pageTotal = res.page.pageTotal
  1122. } else {
  1123. uni.showToast({ title: res.msg, icon: "none" })
  1124. }
  1125. }
  1126. //20赠金活动数据
  1127. const getActivityPercentageGiveInfo = async () => {
  1128. let res = await activityApi.ActivityPercentageGiveInfo({})
  1129. if (res.code == Code.StatusOK) {
  1130. tableData1.value = res.data
  1131. if (typeof tableData1.value == "object") {
  1132. let timezone = 2
  1133. let offset_GMT = new Date().getTimezoneOffset()
  1134. let nowDate = new Date().getTime()
  1135. let nowTime = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
  1136. let startTime = new Date(tableData1.value.activityStartTime.replace(/-/g, "/")).getTime()
  1137. if (nowTime < startTime) {
  1138. interval.value = setInterval(() => {
  1139. let timezone = 2
  1140. let offset_GMT = new Date().getTimezoneOffset()
  1141. let nowDate = new Date().getTime()
  1142. let nowTime = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
  1143. let sec = 1000,
  1144. min = 60 * sec,
  1145. hour = min * 60,
  1146. day = 24 * hour
  1147. let time = startTime - nowTime
  1148. let DAY = getzero(Math.floor(time / day))
  1149. let HOUR = getzero(Math.floor((time % day) / hour))
  1150. let MIN = getzero(Math.floor((time % hour) / min))
  1151. let SEC = getzero(Math.floor((time % min) / sec))
  1152. isCountDown.value = `${DAY}${t("Label.Day")}${HOUR}:${MIN}:${SEC}`
  1153. if (nowTime >= startTime) {
  1154. clearInterval(interval.value)
  1155. getActivityPercentageGiveInfo()
  1156. }
  1157. }, 1000)
  1158. } else if (nowTime > startTime && tableData1.value.status == 0) {
  1159. isCashBack.value = true
  1160. }
  1161. }
  1162. } else {
  1163. uni.showToast({ title: res.msg, icon: "none" })
  1164. }
  1165. }
  1166. //返现
  1167. const cashBack = async () => {
  1168. let res = await activityApi.ActivityPercentageGiveApply({})
  1169. if (res.code == Code.StatusOK) {
  1170. uni.showToast({ title: t("Msg.Application"), icon: "success" })
  1171. } else {
  1172. uni.showToast({ title: res.msg, icon: "none" })
  1173. }
  1174. }
  1175. //20赠金活动申请
  1176. const toDeposit = () => {
  1177. uni.navigateTo({ url: "/pages/customer/deposit/index" })
  1178. }
  1179. //2023迎新活动数据
  1180. const Activity23HundredInfo = async () => {
  1181. let res = await activityApi.Activity23HundredInfo({})
  1182. if (res.code == Code.StatusOK) {
  1183. tableData2.value = res.data
  1184. if (typeof tableData2.value == "object") {
  1185. tableData2Flag.value = true
  1186. let timezone = 2
  1187. let offset_GMT = new Date().getTimezoneOffset()
  1188. let nowDate = new Date().getTime()
  1189. let nowTime = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
  1190. let startTime = new Date(tableData2.value.activityStartTime.replace(/-/g, "/")).getTime()
  1191. let endTime = new Date(tableData2.value.activityEndTime.replace(/-/g, "/")).getTime()
  1192. if (nowTime < endTime && nowTime > startTime) {
  1193. if (tableData2.value.status == 2 && tableData2.value.activityStatus == 0) {
  1194. isTransform.value = 1
  1195. } else if (
  1196. tableData2.value.status == 2 &&
  1197. (tableData2.value.activityStatus == 1 ||
  1198. (tableData2.value.balanceStatus != 2 && tableData2.value.creditStatus != 2))
  1199. ) {
  1200. isTransform.value = 2
  1201. } else if (tableData2.value.status == 2 && tableData2.value.activityStatus == 3) {
  1202. isTransform.value = 2
  1203. }
  1204. } else {
  1205. isTransform.value = 2
  1206. }
  1207. if (tableData2.value.status == 2 && tableData2.value.activityStatus == 2) {
  1208. isTransform.value = null
  1209. if (tableData2.value.realizationStatus == 0) {
  1210. isRealization.value = 1
  1211. } else if (
  1212. tableData2.value.realizationStatus == 1 ||
  1213. (tableData2.value.realizationCreditStatus != 2 && tableData2.value.realizationBalanceStatus != 2)
  1214. ) {
  1215. isRealization.value = 2
  1216. } else if (tableData2.value.realizationStatus == 3) {
  1217. isRealization.value = 2
  1218. }
  1219. } else {
  1220. isRealization.value = null
  1221. }
  1222. } else {
  1223. if (tableData2.value) {
  1224. tableData2Flag.value = true
  1225. }
  1226. }
  1227. } else {
  1228. uni.showToast({ title: res.msg, icon: "none" })
  1229. tableData2.value = true
  1230. }
  1231. }
  1232. //获取交易账户的下拉列表
  1233. const toApply23Open = async () => {
  1234. pictLoading.value = true
  1235. let res = await activityApi.Activity23Login({})
  1236. if (res.code == Code.StatusOK) {
  1237. loginOptions.value = res.data
  1238. dialogDealResult.value = true
  1239. } else {
  1240. uni.showToast({ title: res.msg, icon: "none" })
  1241. }
  1242. pictLoading.value = false
  1243. }
  1244. //2023迎新活动申请
  1245. const toApply23 = async () => {
  1246. if (flag.value) {
  1247. return
  1248. } else {
  1249. flag.value = true
  1250. }
  1251. let res = await activityApi.Activity23HundredApply({
  1252. login: dialogDealResult_form.login,
  1253. })
  1254. if (res.code == Code.StatusOK) {
  1255. toApply23Cancel()
  1256. Activity23HundredInfo()
  1257. uni.showToast({ title: res.msg, icon: "success" })
  1258. } else {
  1259. uni.showToast({ title: res.msg, icon: "none" })
  1260. }
  1261. }
  1262. const toApply23Cancel = () => {
  1263. dialogDealResult_form.login = ""
  1264. dialogDealResult.value = false
  1265. }
  1266. //盈利转换
  1267. const toTransform = () => {
  1268. dialogChinaUnionPay.value = true
  1269. }
  1270. const toTransformActive = async () => {
  1271. let res = await activityApi.Activity23HundredTransform({})
  1272. if (res.code == Code.StatusOK) {
  1273. dialogChinaUnionPay.value = false
  1274. Activity23HundredInfo()
  1275. uni.showToast({ title: res.msg, icon: "success" })
  1276. } else {
  1277. uni.showToast({ title: res.msg, icon: "none" })
  1278. }
  1279. }
  1280. //盈利变现
  1281. const toRealization = () => {
  1282. dialogChinaUnionPay1.value = true
  1283. }
  1284. const toRealizationActive = async () => {
  1285. let res = await activityApi.Activity23HundredRealization({})
  1286. if (res.code == Code.StatusOK) {
  1287. dialogChinaUnionPay1.value = false
  1288. Activity23HundredInfo()
  1289. uni.showToast({ title: res.msg, icon: "success" })
  1290. } else {
  1291. uni.showToast({ title: res.msg, icon: "none" })
  1292. }
  1293. }
  1294. //2023匠鑫活动数据
  1295. const Activity23JiangxinInfo = async () => {
  1296. let res = await activityApi.Activity23JiangxinInfo({})
  1297. if (res.code == Code.StatusOK) {
  1298. tableData3.value = res.data
  1299. if (tableData3.value.show == 1) {
  1300. tableData3Flag.value = true
  1301. } else if (tableData3.value.show == 0) {
  1302. tableData3Flag.value = false
  1303. } else if (!tableData3.value.show) {
  1304. tableData3Flag.value = true
  1305. let timezone = 2
  1306. let offset_GMT = new Date().getTimezoneOffset()
  1307. let nowDate = new Date().getTime()
  1308. let nowTime = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
  1309. let endTime = tableData3.value.activityEndTime
  1310. ? new Date(tableData3.value.activityEndTime.replace(/-/g, "/")).getTime()
  1311. : null
  1312. if (
  1313. tableData3.value.status == 2 &&
  1314. tableData3.value.realizationStatus == 0 &&
  1315. endTime &&
  1316. nowTime > endTime
  1317. ) {
  1318. isRealizationJx.value = 1
  1319. } else {
  1320. isRealizationJx.value = 2
  1321. }
  1322. }
  1323. } else {
  1324. uni.showToast({ title: res.msg, icon: "none" })
  1325. }
  1326. }
  1327. //获取交易账户的下拉列表
  1328. const toApply23JxOpen = async () => {
  1329. pictLoading.value = true
  1330. let res = await activityApi.Activity23JxLogin({})
  1331. if (res.code == Code.StatusOK) {
  1332. loginOptions.value = res.data
  1333. dialogDealResultJx.value = true
  1334. } else {
  1335. uni.showToast({ title: res.msg, icon: "none" })
  1336. }
  1337. pictLoading.value = false
  1338. }
  1339. //2023迎新活动申请
  1340. const toApply23Jx = async () => {
  1341. if (flag.value) {
  1342. return
  1343. } else {
  1344. flag.value = true
  1345. }
  1346. let res = await activityApi.Activity23JiangxinApply({
  1347. login: dialogDealResultJx_form.login,
  1348. })
  1349. if (res.code == Code.StatusOK) {
  1350. toApply23JxCancel()
  1351. Activity23JiangxinInfo()
  1352. uni.showToast({ title: res.msg, icon: "success" })
  1353. } else {
  1354. uni.showToast({ title: res.msg, icon: "none" })
  1355. }
  1356. }
  1357. const toApply23JxCancel = () => {
  1358. dialogDealResultJx_form.login = ""
  1359. dialogDealResultJx.value = false
  1360. }
  1361. //盈利变现
  1362. const toRealizationJx = async () => {
  1363. let res = await activityApi.Activity23JiangxinRealization({
  1364. id: tableData3.value.id,
  1365. })
  1366. if (res.code == Code.StatusOK) {
  1367. Activity23JiangxinInfo()
  1368. uni.showToast({ title: res.msg, icon: "success" })
  1369. } else {
  1370. uni.showToast({ title: res.msg, icon: "none" })
  1371. }
  1372. }
  1373. //2023匠鑫活动数据Vip
  1374. const Activity23JiangxinInfoVip = async () => {
  1375. let res = await activityApi.Activity23JiangxinInfoVip({})
  1376. if (res.code == Code.StatusOK) {
  1377. tableData3Vip.value = res.data
  1378. if (tableData3Vip.value.show == 1) {
  1379. tableData3FlagVip.value = true
  1380. } else if (tableData3Vip.value.show == 0) {
  1381. tableData3FlagVip.value = false
  1382. } else if (!tableData3Vip.value.show) {
  1383. tableData3FlagVip.value = true
  1384. let timezone = 2
  1385. let offset_GMT = new Date().getTimezoneOffset()
  1386. let nowDate = new Date().getTime()
  1387. let nowTime = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
  1388. let endTime = tableData3Vip.value.activityEndTime
  1389. ? new Date(tableData3Vip.value.activityEndTime.replace(/-/g, "/")).getTime()
  1390. : null
  1391. if (
  1392. tableData3Vip.value.status == 2 &&
  1393. tableData3Vip.value.realizationStatus == 0 &&
  1394. endTime &&
  1395. nowTime > endTime
  1396. ) {
  1397. isRealizationJxVip.value = 1
  1398. } else {
  1399. isRealizationJxVip.value = 2
  1400. }
  1401. }
  1402. } else {
  1403. uni.showToast({ title: res.msg, icon: "none" })
  1404. }
  1405. }
  1406. //获取交易账户的下拉列表Vip
  1407. const toApply23JxOpenVip = async () => {
  1408. pictLoading.value = true
  1409. let res = await activityApi.Activity23JxLoginVip({})
  1410. if (res.code == Code.StatusOK) {
  1411. loginOptions.value = res.data
  1412. dialogDealResultJxVip.value = true
  1413. } else {
  1414. uni.showToast({ title: res.msg, icon: "none" })
  1415. }
  1416. pictLoading.value = false
  1417. }
  1418. //2023迎新活动申请Vip
  1419. const toApply23JxVip = async () => {
  1420. if (flag.value) {
  1421. return
  1422. } else {
  1423. flag.value = true
  1424. }
  1425. let res = await activityApi.Activity23JiangxinApplyVip({
  1426. login: dialogDealResultJx_formVip.login,
  1427. })
  1428. if (res.code == Code.StatusOK) {
  1429. toApply23JxCancelVip()
  1430. Activity23JiangxinInfoVip()
  1431. uni.showToast({ title: res.msg, icon: "success" })
  1432. } else {
  1433. uni.showToast({ title: res.msg, icon: "none" })
  1434. }
  1435. }
  1436. const toApply23JxCancelVip = () => {
  1437. dialogDealResultJx_formVip.login = ""
  1438. dialogDealResultJxVip.value = false
  1439. }
  1440. //盈利变现Vip
  1441. const toRealizationJxVip = async () => {
  1442. let res = await activityApi.Activity23JiangxinRealizationVip({
  1443. id: tableData3Vip.value.id,
  1444. })
  1445. if (res.code == Code.StatusOK) {
  1446. Activity23JiangxinInfoVip()
  1447. uni.showToast({ title: res.msg, icon: "success" })
  1448. } else {
  1449. uni.showToast({ title: res.msg, icon: "none" })
  1450. }
  1451. }
  1452. //2023年中赠金活动数据-10
  1453. const Activity24nianzhongInfo = async () => {
  1454. let res = await activityApi.Activity23nianzhongInfo({})
  1455. if (res.code == Code.StatusOK) {
  1456. tableData4.value = res.data
  1457. if (tableData4.value.show == 1) {
  1458. tableData4Flag.value = true
  1459. } else if (tableData4.value.show == 0) {
  1460. tableData4Flag.value = false
  1461. }
  1462. } else {
  1463. uni.showToast({ title: res.msg, icon: "none" })
  1464. }
  1465. }
  1466. //2023年中赠金活动跳转
  1467. const toActivity24nianzhong = () => {
  1468. uni.navigateTo({ url: "/pages/customer/deposit/index" })
  1469. }
  1470. //标准账户交易奖励跳转
  1471. const toActivity24Trading = () => {
  1472. uni.navigateTo({ url: "/pages/customer/new/index" })
  1473. }
  1474. //2023年中赠金活动数据-20
  1475. const Activity24nianzhongTwoInfo = async () => {
  1476. let res = await activityApi.Activity23nianzhongTwoInfo({})
  1477. if (res.code == Code.StatusOK) {
  1478. tableData4Two.value = res.data
  1479. if (tableData4Two.value.show == 1) {
  1480. tableData4TwoFlag.value = true
  1481. } else if (tableData4Two.value.show == 0) {
  1482. tableData4TwoFlag.value = false
  1483. }
  1484. } else {
  1485. uni.showToast({ title: res.msg, icon: "none" })
  1486. }
  1487. }
  1488. //交易大赛数据-参数
  1489. const GetActivityCptCode = async () => {
  1490. let res = await activityApi.ActivityCptinfoGetCode({})
  1491. if (res.code == Code.StatusOK) {
  1492. tableDataCptFlagCode.value = res.data.code
  1493. if (tableDataCptFlagCode.value) {
  1494. ActivityCptInfo(tableDataCptFlagCode.value)
  1495. }
  1496. } else {
  1497. uni.showToast({ title: res.msg, icon: "none" })
  1498. }
  1499. }
  1500. //交易大赛数据
  1501. const ActivityCptInfo = async (code: string) => {
  1502. let res = await activityApi.ActivityCptinfoCode({
  1503. infoCode: code,
  1504. })
  1505. if (res.code == Code.StatusOK) {
  1506. tableDataCpt.value = res.data
  1507. if (tableDataCpt.value == null) {
  1508. tableDataCptFlag.value = false
  1509. } else {
  1510. tableDataCptFlag.value = true
  1511. }
  1512. } else {
  1513. uni.showToast({ title: res.msg, icon: "none" })
  1514. }
  1515. }
  1516. //获取交易账户的下拉列表
  1517. const toApplyCptOpen = async () => {
  1518. pictLoading.value = true
  1519. let res = await activityApi.ActivityCptInfoLogins({
  1520. cptId: tableDataCpt.value.id,
  1521. })
  1522. if (res.code == Code.StatusOK) {
  1523. loginOptions.value = res.data
  1524. dialogDealResultCpt.value = true
  1525. } else {
  1526. uni.showToast({ title: res.msg, icon: "none" })
  1527. }
  1528. pictLoading.value = false
  1529. }
  1530. //交易大赛申请
  1531. const toApplyCpt = async () => {
  1532. if (flag.value) {
  1533. return
  1534. } else {
  1535. flag.value = true
  1536. }
  1537. let res = await activityApi.ActivityCptInfoAdd({
  1538. cptId: tableDataCpt.value.id,
  1539. login: dialogDealResultCpt_form.login,
  1540. nickname: dialogDealResultCpt_form.nickname,
  1541. mobile: dialogDealResultCpt_form.mobile,
  1542. address: dialogDealResultCpt_form.address,
  1543. recipient: dialogDealResultCpt_form.recipient,
  1544. })
  1545. if (res.code == Code.StatusOK) {
  1546. toApplyCptCancel()
  1547. GetActivityCptCode()
  1548. uni.showToast({ title: res.msg, icon: "success" })
  1549. } else {
  1550. uni.showToast({ title: res.msg, icon: "none" })
  1551. }
  1552. }
  1553. const toApplyCptCancel = () => {
  1554. dialogDealResultCpt_form.login = ""
  1555. dialogDealResultCpt_form.nickname = ""
  1556. dialogDealResultCpt_form.mobile = ""
  1557. dialogDealResultCpt_form.address = ""
  1558. dialogDealResultCpt_form.recipient = ""
  1559. dialogDealResultCpt.value = false
  1560. }
  1561. const toOpenSingle = (pageAddress: string) => {
  1562. let link = ""
  1563. if (pageAddress.indexOf("html?") == -1) {
  1564. link = "?code=" + tableDataCptFlagCode.value
  1565. }
  1566. if (pageAddress.indexOf("html?") > -1 && pageAddress.indexOf("code") == -1) {
  1567. link = "&code=" + tableDataCptFlagCode.value
  1568. }
  1569. plus.runtime.openURL(imgUrl.value + pageAddress + link)
  1570. }
  1571. //CWG 现金嘉年华-新任务
  1572. const ActivitYdepositRaffleAim = async () => {
  1573. let res = await activityApi.ActivitYdepositRaffleAim({})
  1574. if (res.code == Code.StatusOK) {
  1575. if (res.data == null) {
  1576. newTask.value = false
  1577. } else {
  1578. newTask.value = true
  1579. newTaskList.value = res.data
  1580. }
  1581. } else {
  1582. uni.showToast({ title: res.msg, icon: "none" })
  1583. }
  1584. }
  1585. //CWG 现金嘉年华-抽奖次数
  1586. const ActivitYdepositRaffleinfo = async () => {
  1587. let res = await activityApi.ActivitYdepositRaffleinfo({})
  1588. if (res.code == Code.StatusOK) {
  1589. if (res.data == null) {
  1590. LuckyDrawsNumber.value = "0"
  1591. } else {
  1592. LuckyDrawsNumber.value = res.data.raffleResidueNumber || "0"
  1593. }
  1594. } else {
  1595. uni.showToast({ title: res.msg, icon: "none" })
  1596. }
  1597. }
  1598. //现金嘉年华跳转抽奖历史
  1599. const toHistoryLuckyDraw = () => {
  1600. uni.navigateTo({ url: "/pages/customer/history/lucky/draw/index" })
  1601. }
  1602. //现金嘉年华跳转任务列表
  1603. const toTaskList = () => {
  1604. uni.navigateTo({ url: "/pages/customer/task/list/index" })
  1605. }
  1606. const UtoTaskList = () => {
  1607. uni.navigateTo({ url: "/pages/customer/Utask/list/index" })
  1608. }
  1609. const goSurplusTaskList = () => {
  1610. uni.navigateTo({ url: "/pages/activities/surplus-list" })
  1611. }
  1612. const goMonthlyTaskList = () => {
  1613. uni.navigateTo({ url: "/pages/activities/monthly-list" })
  1614. }
  1615. const toOpenTask = () => {
  1616. dialogNewTaskDraw.value = true
  1617. }
  1618. //新任务弹窗
  1619. const toNewTask = () => {
  1620. dialogNewTask.value = true
  1621. }
  1622. const closedialogNewTaskDraw = () => {
  1623. dialogNewTaskDraw.value = false
  1624. ActivitYdepositRaffleinfo()
  1625. }
  1626. //分页返回数据
  1627. const handleCurrentChange = (val: number) => {
  1628. pagerInfo.current = val
  1629. searchFunc()
  1630. searchFunc1()
  1631. }
  1632. //20赠金是否到期-4月30号23:59:59的时候关闭申请
  1633. const is20Open = () => {
  1634. let endTime1 = "2023/04/30 23:59:59"
  1635. let timezone = 2
  1636. let offset_GMT = new Date().getTimezoneOffset()
  1637. let nowDate = new Date().getTime()
  1638. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  1639. let end = new Date(endTime1).getTime()
  1640. if (now > end) {
  1641. anshiClose.value = false
  1642. }
  1643. }
  1644. //抽抽奖是否到期-2023-11-25 00:00:00-2023-12-31 23:59:59
  1645. const isRaffleOpen = () => {
  1646. let endTime1 = "2025/9/30 23:59:59"
  1647. let startTime1 = "2025/7/1 00:00:00"
  1648. let timezone = 2
  1649. let offset_GMT = new Date().getTimezoneOffset()
  1650. let nowDate = new Date().getTime()
  1651. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  1652. let end = new Date(endTime1).getTime()
  1653. let start = new Date(startTime1).getTime()
  1654. if (now < end && start < now) {
  1655. choujiaClose.value = true
  1656. ActivitYdepositRaffleAim()
  1657. ActivitYdepositRaffleinfo()
  1658. }
  1659. }
  1660. //24精英杯活动
  1661. const Activity24JYBInfoVip = async () => {
  1662. let res = await activityApi.Activity24JYBInfoVip({})
  1663. if (res.code == Code.StatusOK) {
  1664. tableData3JYB.value = res.data
  1665. if (tableData3JYB.value.show == 1) {
  1666. tableData3FlagJYB.value = true
  1667. } else if (tableData3JYB.value.show == 0) {
  1668. tableData3FlagJYB.value = false
  1669. } else if (!tableData3JYB.value.show) {
  1670. tableData3FlagJYB.value = true
  1671. let timezone = 2
  1672. let offset_GMT = new Date().getTimezoneOffset()
  1673. let nowDate = new Date().getTime()
  1674. let nowTime = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
  1675. let endTime = tableData3JYB.value.activityEndTime
  1676. ? new Date(tableData3JYB.value.activityEndTime.replace(/-/g, "/")).getTime()
  1677. : null
  1678. if (
  1679. tableData3JYB.value.status == 2 &&
  1680. tableData3JYB.value.realizationStatus == 0 &&
  1681. endTime &&
  1682. nowTime > endTime
  1683. ) {
  1684. isRealizationJxJYB.value = 1
  1685. } else {
  1686. isRealizationJxJYB.value = 2
  1687. }
  1688. }
  1689. } else {
  1690. uni.showToast({ title: res.msg, icon: "none" })
  1691. }
  1692. }
  1693. //获取交易账户的下拉列表Vip
  1694. const toApply24JYBOpenVip = async () => {
  1695. pictLoading.value = true
  1696. let res = await activityApi.Activity24JYBLoginVip({})
  1697. if (res.code == Code.StatusOK) {
  1698. loginOptions.value = res.data
  1699. dialogDealResultJxJYB.value = true
  1700. } else {
  1701. uni.showToast({ title: res.msg, icon: "none" })
  1702. }
  1703. pictLoading.value = false
  1704. }
  1705. //24精英杯活动申请
  1706. const toApply24JYBVip = async () => {
  1707. //this.$refs["dialogDealResultJx_formJYB"].validate
  1708. if (flag.value) {
  1709. return
  1710. } else {
  1711. flag.value = true
  1712. }
  1713. let res = await activityApi.Activity24JYBApplyVip({
  1714. login: dialogDealResultJx_formJYB.login,
  1715. })
  1716. if (res.code == Code.StatusOK) {
  1717. toApply24JYBCancelVip()
  1718. Activity24JYBInfoVip()
  1719. uni.showToast({ title: res.msg, icon: "success" })
  1720. } else {
  1721. uni.showToast({ title: res.msg, icon: "none" })
  1722. }
  1723. }
  1724. const toApply24JYBCancelVip = () => {
  1725. dialogDealResultJx_formJYB.login = ""
  1726. dialogDealResultJxJYB.value = false
  1727. }
  1728. //24精英杯活动盈利变现
  1729. const toRealization24JYBVip = async () => {
  1730. let res = await activityApi.Activity24JYBRealizationVip({
  1731. id: tableData3JYB.value.id,
  1732. })
  1733. if (res.code == Code.StatusOK) {
  1734. Activity24JYBInfoVip()
  1735. uni.showToast({ title: res.msg, icon: "success" })
  1736. } else {
  1737. uni.showToast({ title: res.msg, icon: "none" })
  1738. }
  1739. }
  1740. //24无忧交易
  1741. const ActivityNoWorriesInfo = async () => {
  1742. let res = await activityApi.ActivityNoWorriesInfo({})
  1743. if (res.code == Code.StatusOK) {
  1744. tableDataNoWorries.value = res.data
  1745. if (typeof tableDataNoWorries.value == "object") {
  1746. tableDataNoWorriesFlag.value = true
  1747. let timezone = 2
  1748. let offset_GMT = new Date().getTimezoneOffset()
  1749. let nowDate = new Date().getTime()
  1750. let nowTime = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
  1751. let startTime = new Date(tableDataNoWorries.value.compensateTime.replace(/-/g, "/")).getTime()
  1752. let endTime = new Date(tableDataNoWorries.value.revokeTime.replace(/-/g, "/")).getTime()
  1753. if (
  1754. nowTime < endTime &&
  1755. nowTime > startTime &&
  1756. (tableDataNoWorries.value.status == 0 ||
  1757. tableDataNoWorries.value.status == 3) &&
  1758. tableDataNoWorries.value.compensateStatus == 2 &&
  1759. tableDataNoWorries.value.activityStatus == 1
  1760. ) {
  1761. isRealizationNoWorries.value = 1
  1762. } else {
  1763. isRealizationNoWorries.value = null
  1764. }
  1765. } else {
  1766. if (tableDataNoWorries.value) {
  1767. tableDataNoWorriesFlag.value = true
  1768. }
  1769. }
  1770. } else {
  1771. uni.showToast({ title: res.msg, icon: "none" })
  1772. }
  1773. }
  1774. //获取交易账户的下拉列表
  1775. const toApplyNoWorriesOpen = async () => {
  1776. pictLoading.value = true
  1777. let res = await activityApi.ActivityNoWorriesLogin({})
  1778. if (res.code == Code.StatusOK) {
  1779. loginOptions.value = res.data
  1780. dialogDealResultNoWorries.value = true
  1781. } else {
  1782. uni.showToast({ title: res.msg, icon: "none" })
  1783. }
  1784. pictLoading.value = false
  1785. }
  1786. //24无忧交易申请
  1787. const toApplyNoWorries = async () => {
  1788. if (flag.value) {
  1789. return
  1790. } else {
  1791. flag.value = true
  1792. }
  1793. let res = await activityApi.ActivityNoWorriesApply({
  1794. login: dialogDeal_formNoWorries.login,
  1795. })
  1796. if (res.code == Code.StatusOK) {
  1797. dialogNoWorriesApply.value = true
  1798. toApplyNoWorriesCancel()
  1799. ActivityNoWorriesInfo()
  1800. uni.showToast({ title: res.msg, icon: "success" })
  1801. } else {
  1802. uni.showToast({ title: res.msg, icon: "none" })
  1803. }
  1804. }
  1805. const toApplyNoWorriesCancel = () => {
  1806. // this.$refs["dialogDeal_formNoWorries"] &&
  1807. // this.$refs["dialogDeal_formNoWorries"].resetFields();
  1808. dialogDeal_formNoWorries.login = ""
  1809. dialogDealResultNoWorries.value = false
  1810. }
  1811. //盈利变现
  1812. const toRealizationNoWorries = () => {
  1813. dialogNoWorries.value = true
  1814. }
  1815. //24无忧交易盈利变现
  1816. const realizationNoWorries = async () => {
  1817. let res = await activityApi.ActivityNoWorriesRealization({
  1818. id: tableDataNoWorries.value.id,
  1819. })
  1820. if (res.code == Code.StatusOK) {
  1821. dialogNoWorries.value = false
  1822. ActivityNoWorriesInfo()
  1823. uni.showToast({ title: res.msg, icon: "success" })
  1824. } else {
  1825. uni.showToast({ title: res.msg, icon: "none" })
  1826. }
  1827. }
  1828. //24新年庆典
  1829. const isNewYear24Open = () => {
  1830. let endTime1 = "2025/3/31 23:59:59"
  1831. let startTime1 = "2025/1/1 00:00:00"
  1832. let timezone = 2
  1833. let offset_GMT = new Date().getTimezoneOffset()
  1834. let nowDate = new Date().getTime()
  1835. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  1836. let end = new Date(endTime1).getTime()
  1837. let start = new Date(startTime1).getTime()
  1838. if (now < end && start < now) {
  1839. ActivityNewYear24()
  1840. }
  1841. }
  1842. const ActivityNewYear24 = async () => {
  1843. let res = await activityApi.ActivityNewYear24({})
  1844. if (res.code == Code.StatusOK) {
  1845. tableDataNewYear24.value = res.data
  1846. if (typeof tableDataNewYear24.value == "object") {
  1847. tableDataNewYear24Flag.value = true
  1848. } else {
  1849. if (tableDataNewYear24.value) {
  1850. tableDataNewYear24Flag.value = true
  1851. }
  1852. }
  1853. } else {
  1854. uni.showToast({ title: res.msg, icon: "none" })
  1855. }
  1856. }
  1857. const openCalculator = () => {
  1858. openCalculatorFlag.value = true
  1859. }
  1860. const calculateIncome = () => {
  1861. NewYear24Data.balance = Number(NewYear24DataBalance.value) || 0
  1862. let rate = 0
  1863. tableDataNewYear24.value.details.forEach((item: any) => {
  1864. if (
  1865. NewYear24Data.balance > item.min &&
  1866. NewYear24Data.balance <= item.max
  1867. ) {
  1868. rate = item.rate
  1869. } else if (
  1870. NewYear24Data.balance > item.min &&
  1871. NewYear24Data.balance >= item.max &&
  1872. item.max == 0
  1873. ) {
  1874. rate = item.rate
  1875. }
  1876. })
  1877. NewYear24Data.income = (
  1878. ((NewYear24Data.balance * rate) / 100 / 365) *
  1879. 30
  1880. ).toFixed(2)
  1881. }
  1882. //限时活动
  1883. const ActivityRequiteInfo = async () => {
  1884. let res = await activityApi.ActivityRequiteInfo({})
  1885. if (res.code == Code.StatusOK) {
  1886. limitedStatus.value = res.data
  1887. } else {
  1888. uni.showToast({ title: res.msg, icon: "none" })
  1889. }
  1890. }
  1891. // 获取活动显示信息
  1892. const getActivityShowsInfo = async () => {
  1893. try {
  1894. let res = await activityApi.ActivityShowsInfo()
  1895. if (res.code == Code.StatusOK) {
  1896. activityShowsInfo.value = res.data
  1897. surplusGive.value = res.data.surplusGive || false
  1898. monthlyGive.value = res.data.monthlyGive || false
  1899. } else {
  1900. uni.showToast({ title: res.msg, icon: "none" })
  1901. surplusGive.value = false
  1902. monthlyGive.value = false
  1903. }
  1904. } catch (error) {
  1905. uni.showToast({ title: "获取活动信息失败", icon: "none" })
  1906. surplusGive.value = false
  1907. monthlyGive.value = false
  1908. }
  1909. }
  1910. // 打开surplus活动弹框
  1911. const openSurplusActivityDialog = async () => {
  1912. console.log(surplusGive.value)
  1913. if (!surplusGive.value) {
  1914. return
  1915. }
  1916. dialogSurplusActivity.value = true
  1917. surplusActivityLoading.value = true
  1918. selectedSurplusActivity.value = null
  1919. }
  1920. const openSurplusActivityDialog1 = async () => {
  1921. if (!monthlyGive.value) {
  1922. return
  1923. }
  1924. dialogSurplusActivity1.value = true
  1925. surplusActivityLoading1.value = true
  1926. selectedSurplusActivity1.value = null
  1927. getMonthlyActivityOptions()
  1928. }
  1929. const getSurplusActivityOptions = async () => {
  1930. let res = await activityApi.ActivitySurplusDepositAmount({
  1931. login: selectedAccount.value.login,
  1932. platform: selectedAccount.value.platform,
  1933. })
  1934. if (res.code == Code.StatusOK) {
  1935. surplusActivityOptions.value = res.data.map((item: any, index: number) => ({
  1936. id: index,
  1937. value: item.level,
  1938. text: `${t("AmountLabel.item1")}: ${item.amount} | ${t("AmountLabel.item2")}: ${item.needVolume}`,
  1939. giveFlag: item.giveFlag,
  1940. }))
  1941. } else {
  1942. uni.showToast({ title: res.msg, icon: "none" })
  1943. }
  1944. surplusActivityLoading.value = false
  1945. }
  1946. const getMonthlyActivityOptions = async () => {
  1947. let res = await activityApi.ActivityMonthlyDepositAmount({})
  1948. if (res.code == Code.StatusOK) {
  1949. surplusActivityOptions1.value = res.data.map((item: any, index: number) => ({
  1950. id: index,
  1951. value: item.level,
  1952. label: `${t("入金量")}: ${item.needAmount} | ${t("入金手数")}: ${item.needVolume}`,
  1953. }))
  1954. } else {
  1955. uni.showToast({ title: res.msg, icon: "none" })
  1956. }
  1957. surplusActivityLoading1.value = false
  1958. }
  1959. // 关闭surplus活动弹框
  1960. const closeSurplusActivityDialog = () => {
  1961. dialogSurplusActivity.value = false
  1962. selectedSurplusActivity.value = null
  1963. surplusActivityOptions.value = []
  1964. valueInfo.value = null
  1965. }
  1966. // 确认参加surplus活动
  1967. const confirmSurplusActivity = async () => {
  1968. try {
  1969. surplusActivityLoading.value = true
  1970. let res = await activityApi.ActivitySurplusAdd({
  1971. login: selectedAccount.value.login,
  1972. platform: selectedAccount.value.platform,
  1973. level: selectedSurplusActivity.value,
  1974. })
  1975. if (res.code == Code.StatusOK) {
  1976. uni.showToast({ title: res.msg, icon: "success" })
  1977. closeSurplusActivityDialog()
  1978. surplusActivityLoading.value = false
  1979. getActivityShowsInfo()
  1980. } else {
  1981. uni.showToast({ title: res.msg, icon: "none" })
  1982. }
  1983. } catch (error) {
  1984. uni.showToast({ title: error?.msg, icon: "none" })
  1985. }
  1986. }
  1987. // 关闭surplus活动弹框
  1988. const closeSurplusActivityDialog1 = () => {
  1989. dialogSurplusActivity1.value = false
  1990. selectedSurplusActivity1.value = null
  1991. surplusActivityOptions1.value = []
  1992. valueInfo.value = null
  1993. }
  1994. // 确认参加月度豪礼活动
  1995. const confirmSurplusActivity1 = async () => {
  1996. try {
  1997. surplusActivityLoading1.value = true
  1998. let res = await activityApi.ActivityMonthlyAdd({})
  1999. if (res.code == Code.StatusOK) {
  2000. uni.showToast({ title: res.msg, icon: "success" })
  2001. closeSurplusActivityDialog1()
  2002. surplusActivityLoading1.value = false
  2003. getActivityShowsInfo()
  2004. } else {
  2005. uni.showToast({ title: res.msg, icon: "none" })
  2006. }
  2007. } catch (error) {
  2008. uni.showToast({ title: error?.msg, icon: "none" })
  2009. }
  2010. }
  2011. //搜索
  2012. const handleSearch = () => {
  2013. pagerInfo.current = 1
  2014. searchFunc()
  2015. searchFunc1()
  2016. }
  2017. //新增
  2018. const closeDiaAdd = () => {
  2019. dialogInfoTradingAdd.value = false
  2020. dialogInfoTradingAdd1.value = false
  2021. }
  2022. const closeAdd = (val: boolean) => {
  2023. dialogInfoTradingAdd.value = false
  2024. dialogInfoTradingAdd1.value = false
  2025. }
  2026. const confirmToReload = () => {
  2027. dialogInfoTradingAdd.value = false
  2028. dialogInfoTradingAdd1.value = false
  2029. searchFunc()
  2030. }
  2031. //获取客户申请活动列表
  2032. //点击操作的回调
  2033. const tableRef = ref(null)
  2034. const handleCommand = (command) => {
  2035. if (command.type == "check") {
  2036. ActivityComplete(command.id);
  2037. }
  2038. }
  2039. const ActivityComplete = async (id: number) => {
  2040. await confirm({
  2041. title: t("news_add_field.ApplicationDialog.ActivitiesDes"),
  2042. content: t("Msg.SystemPrompt"),
  2043. confirmText: t("Btn.item6"),
  2044. cancelText: t("Btn.item7"),
  2045. })
  2046. if (flag.value) {
  2047. return;
  2048. } else {
  2049. flag.value = true;
  2050. }
  2051. let res = await activityApi.ActivityComplete({ id: id });
  2052. if (res.code == Code.StatusOK) {
  2053. tableRef.value?.reload()
  2054. uni.showToast({
  2055. title: t("Msg.Success"),
  2056. icon: "success",
  2057. })
  2058. flag.value = false;
  2059. } else {
  2060. uni.showToast({
  2061. title: res.msg,
  2062. icon: "none",
  2063. })
  2064. flag.value = false;
  2065. }
  2066. }
  2067. // 表格列配置(支持插槽和格式化)
  2068. const columns = computed(() => [
  2069. {
  2070. prop: 'login',
  2071. label: t('Drawer.Label.TradingAccount'),
  2072. align: 'center',
  2073. formatter: ({ row }) => row.login || '--'
  2074. },
  2075. {
  2076. prop: 'addTime',
  2077. label: t('Drawer.Label.Date'),
  2078. align: 'center',
  2079. formatter: ({ row }) => row.addTime || '--'
  2080. },
  2081. {
  2082. prop: 'status',
  2083. label: t('Drawer.Label.Status'),
  2084. align: 'center',
  2085. slot: 'status'
  2086. },
  2087. {
  2088. label: t('Label.Note'),
  2089. align: 'center',
  2090. type: 'note'
  2091. },
  2092. {
  2093. prop: 'action',
  2094. label: t('Label.Action'),
  2095. align: 'center',
  2096. slot: 'action'
  2097. }
  2098. ])
  2099. //获取申请活动所需数据
  2100. const getStatus = async () => {
  2101. let res = await activityApi.ActivityInfo({
  2102. activityId: information.id,
  2103. });
  2104. if (res.code == Code.StatusOK) {
  2105. loginOptions.value = res.data.map((item: any) => ({
  2106. text: item.login,
  2107. value: item.login,
  2108. disable: item.status == 1 ||
  2109. information.groupTypes.indexOf(item.groupType) == '-1' ||
  2110. information.loginTypes.indexOf(item.type) == '-1'
  2111. }))
  2112. } else {
  2113. uni.showToast({
  2114. title: res.msg,
  2115. icon: "none",
  2116. })
  2117. }
  2118. }
  2119. //申请活动
  2120. const activityApply = async () => {
  2121. if (!information.agree) {
  2122. uni.showToast({
  2123. title: t("Msg.SystemPrompt"),
  2124. icon: "none",
  2125. })
  2126. return;
  2127. }
  2128. if (flag.value) {
  2129. return;
  2130. } else {
  2131. flag.value = true;
  2132. }
  2133. try {
  2134. let res = await activityApi.ActivityApply({
  2135. activityId: information.id,
  2136. ...information,
  2137. });
  2138. if (res.code == Code.StatusOK) {
  2139. confirmToReload();
  2140. uni.showToast({
  2141. title: t("Msg.Success"),
  2142. icon: "none",
  2143. })
  2144. flag.value = false;
  2145. } else {
  2146. uni.showToast({
  2147. title: res.msg,
  2148. icon: "none",
  2149. })
  2150. flag.value = false;
  2151. }
  2152. } catch (error) {
  2153. uni.showToast({
  2154. title: error?.msg,
  2155. icon: "none",
  2156. })
  2157. flag.value = false;
  2158. }
  2159. }
  2160. const getApplyListApi = ref(null)
  2161. const search1 = reactive({
  2162. activityId: ''
  2163. })
  2164. //申请列表弹出
  2165. const checkActivity = (val: any) => {
  2166. information.id = val.id
  2167. information.title = val.title
  2168. dialogInfoTradingAdd1.value = true
  2169. getApplyListApi.value = activityApi.ActivityApplyList
  2170. search1.activityId = information.id
  2171. }
  2172. //回显
  2173. const onAgreeChange = (e) => {
  2174. information.agree = e.detail.value.length > 0
  2175. }
  2176. //申请活动弹出
  2177. const applications = (val: any) => {
  2178. information.id = val.id
  2179. information.title = val.title
  2180. getStatus()
  2181. let loginType: any[] = []
  2182. val.loginTypes.forEach((item: any) => {
  2183. loginType.push(item.loginType)
  2184. })
  2185. let groupType: any[] = []
  2186. val.groupTypes.forEach((item: any) => {
  2187. groupType.push(item.groupType)
  2188. })
  2189. information.loginTypes = loginType
  2190. information.groupTypes = groupType
  2191. information.myType12 = 1
  2192. console.log(information, 1212);
  2193. dialogInfoTradingAdd.value = true
  2194. }
  2195. //详情
  2196. const toSingle = (id: string, listID?: string) => {
  2197. if (
  2198. id == "20zj" ||
  2199. id == "23yx" ||
  2200. id == "23jx" ||
  2201. id == "23nz" ||
  2202. id == "23nzTwo" ||
  2203. id == "23jxVip" ||
  2204. id == "23xinjia" ||
  2205. id == "23jnhcj" ||
  2206. id == "23nz_zx" ||
  2207. id == "24JYB" ||
  2208. id == "NoWorries" ||
  2209. id == "NewYear24"
  2210. ) {
  2211. if (id == "23jx") {
  2212. uni.navigateTo({
  2213. url: `/pages/activities/content?id=&type=1&active=${id}&data1=${tableData3.value.show ? tableData3.value.activityStartTime : tableData3.value.showActivityStartTime}&data2=${tableData3.value.show ? tableData3.value.activityEndTime : tableData3.value.showActivityEndTime}&data3=${tableData3.value.show ? tableData3.value.applicationStartTime : tableData3.value.showApplicationStartTime}&data4=${tableData3.value.show ? tableData3.value.applicationEndTime : tableData3.value.showApplicationEndTime}`,
  2214. })
  2215. } else if (id == "23jxVip") {
  2216. uni.navigateTo({
  2217. url: `/pages/activities/content?id=&type=1&active=${id}&data1=${tableData3Vip.value.show ? tableData3Vip.value.activityStartTime : tableData3Vip.value.showActivityStartTime}&data2=${tableData3Vip.value.show ? tableData3Vip.value.activityEndTime : tableData3Vip.value.showActivityEndTime}&data3=${tableData3Vip.value.show ? tableData3Vip.value.applicationStartTime : tableData3Vip.value.showApplicationStartTime}&data4=${tableData3Vip.value.show ? tableData3Vip.value.applicationEndTime : tableData3Vip.value.showApplicationEndTime}`,
  2218. })
  2219. } else if (id == "24JYB") {
  2220. uni.navigateTo({
  2221. url: `/pages/activities/content?id=&type=1&active=${id}&data1=${tableData3JYB.value.show ? tableData3JYB.value.activityStartTime : tableData3JYB.value.showActivityStartTime}&data2=${tableData3JYB.value.show ? tableData3JYB.value.activityEndTime : tableData3JYB.value.showActivityEndTime}&data3=${tableData3JYB.value.show ? tableData3JYB.value.applicationStartTime : tableData3JYB.value.showApplicationStartTime}&data4=${tableData3JYB.value.show ? tableData3JYB.value.applicationEndTime : tableData3JYB.value.showApplicationEndTime}`,
  2222. })
  2223. } else if (id == "23nz") {
  2224. uni.navigateTo({
  2225. url: `/pages/activities/content?id=&type=1&active=${id}&data3=${tableData4.value.show ? tableData4.value.applicationStartTime : tableData4.value.showApplicationStartTime}&data4=${tableData4.value.show ? tableData4.value.applicationEndTime : tableData4.value.showApplicationEndTime}`,
  2226. })
  2227. } else if (id == "23nzTwo") {
  2228. uni.navigateTo({
  2229. url: `/pages/activities/content?id=&type=1&active=${id}&data3=${tableData4Two.value.show ? timeConvert(tableData4Two.value.applicationStartTime) : timeConvert(tableData4Two.value.showApplicationStartTime)}&data4=${tableData4Two.value.show ? timeConvert(tableData4Two.value.applicationEndTime) : timeConvert(tableData4Two.value.showApplicationEndTime)}`,
  2230. })
  2231. } else if (id == "NoWorries") {
  2232. uni.navigateTo({
  2233. url: `/pages/activities/content?id=&type=1&active=${id}`,
  2234. })
  2235. } else if (id == "NewYear24") {
  2236. uni.navigateTo({
  2237. url: `/pages/activities/content?id=&type=1&active=${id}`,
  2238. })
  2239. } else {
  2240. uni.navigateTo({
  2241. url: `/pages/activities/content?id=&type=1&active=${id}`,
  2242. })
  2243. }
  2244. } else if (id == "newList") {
  2245. uni.navigateTo({
  2246. url: `/pages/activities/content?id=${listID}&type=1&active=newList`,
  2247. })
  2248. } else {
  2249. uni.navigateTo({
  2250. url: `/pages/activities/content?id=${id}&type=1`,
  2251. })
  2252. }
  2253. }
  2254. const handleValueInfoChange = (value: any) => {
  2255. const selectedAccountObj = loginOptions1.value.find((item) => item.login === value)
  2256. console.log("选中的账户对象:", selectedAccountObj)
  2257. selectedAccount.value = selectedAccountObj
  2258. getSurplusActivityOptions()
  2259. }
  2260. // ==================== 监听器 ====================
  2261. watch(NewYear24DataBalance, (newVal) => {
  2262. NewYear24Data.balance = Number(newVal) || 0
  2263. })
  2264. watch(dialogSurplusActivity, (newVal) => {
  2265. if (!newVal) { closeSurplusActivityDialog() }
  2266. })
  2267. watch(dialogSurplusActivity1, (newVal) => {
  2268. if (!newVal) { closeSurplusActivityDialog1() }
  2269. })
  2270. // ==================== 生命周期 ====================
  2271. onMounted(() => {
  2272. getDateList()
  2273. // 2025-07-31 00:00:00 之后关闭 standard
  2274. const endTime = new Date("2025/07/31 00:00:00").getTime()
  2275. const timezone = 3
  2276. const offset_GMT = new Date().getTimezoneOffset()
  2277. const nowDate = new Date().getTime()
  2278. const now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  2279. if (now >= endTime) {
  2280. standard.value = false
  2281. }
  2282. is20Open()
  2283. searchFunc()
  2284. searchFunc1()
  2285. getActivityPercentageGiveInfo()
  2286. Activity23HundredInfo()
  2287. // Activity23JiangxinInfo()
  2288. Activity23JiangxinInfoVip()
  2289. Activity24nianzhongInfo()
  2290. Activity24nianzhongTwoInfo()
  2291. GetActivityCptCode()
  2292. Activity24JYBInfoVip()
  2293. ActivityNoWorriesInfo()
  2294. isRaffleOpen()
  2295. isNewYear24Open()
  2296. ActivityRequiteInfo()
  2297. getActivityShowsInfo()
  2298. })
  2299. onUnmounted(() => {
  2300. if (interval.value) {
  2301. clearInterval(interval.value)
  2302. }
  2303. })
  2304. // UniApp 页面生命周期
  2305. onLoad((options) => {
  2306. // 页面加载时的逻辑
  2307. })
  2308. onPullDownRefresh(() => {
  2309. // 下拉刷新
  2310. searchFunc()
  2311. searchFunc1()
  2312. uni.stopPullDownRefresh()
  2313. })
  2314. onReachBottom(() => {
  2315. // 上拉加载更多
  2316. if (pagerInfo.current < pagerInfo.pageTotal) {
  2317. pagerInfo.current++
  2318. searchFunc()
  2319. }
  2320. })
  2321. // ==================== 导出 ====================
  2322. // 由于使用 <script setup>,所有顶层绑定都会自动暴露给模板
  2323. </script>
  2324. <style scoped lang="scss">
  2325. @import "@/uni.scss";
  2326. // 弹窗样式优化
  2327. .dia-content {
  2328. .content {
  2329. padding: 20px !important;
  2330. }
  2331. .form-item {
  2332. display: flex;
  2333. flex-direction: column;
  2334. align-items: flex-start;
  2335. justify-content: flex-start;
  2336. margin-bottom: 20px;
  2337. gap: 16px;
  2338. .form-label {
  2339. width: 120px;
  2340. font-weight: 500;
  2341. color: var(--bs-heading-color);
  2342. font-size: 14px;
  2343. }
  2344. :deep(.cwg-combox) {
  2345. flex: 1;
  2346. width: 100%;
  2347. .el-input__wrapper {
  2348. border-radius: 4px;
  2349. }
  2350. &.disabled {
  2351. .el-input__wrapper {
  2352. background-color: #f5f5f5;
  2353. cursor: not-allowed;
  2354. }
  2355. }
  2356. }
  2357. }
  2358. }
  2359. .btn-outline-dark1{
  2360. background-color: var(--btn-color) !important;
  2361. color: var(--bs-emphasis-color) !important;
  2362. }
  2363. .surplusActivityDialog {
  2364. height: 300px;
  2365. }
  2366. </style>