index.vue 111 KB

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