index.vue 105 KB

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