index.vue 101 KB

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