index.vue 106 KB

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