index.vue 102 KB

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