index.vue 111 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733
  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="'Custom.Activity.Single'"></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. import { useFilters } from '@/composables/useFilters'
  814. const { numberDecimal } = useFilters()
  815. // 国家列表
  816. const countries = [
  817. "DZ", "AO", "BJ", "BW", "BF", "CM", "CG", "CD", "CI", "DJ", "EG", "ET",
  818. "GA", "GM", "GH", "GN", "KE", "MG", "MW", "ML", "MR", "MA", "MZ", "NA",
  819. "NE", "NG", "RW", "SN", "SL", "SO", "ZA", "SS", "SD", "TZ", "TG", "TN",
  820. "UG", "ZM", "ZW", "LS", "BH", "IR", "IQ", "IL", "JO", "KW", "LB", "OM",
  821. "PS", "QA", "SA", "SY", "TR", "AE", "YE", "AR", "BO", "BR", "CL", "CO",
  822. "EC", "GY", "PY", "PE", "SR", "UY", "VE", "BZ", "CR", "SV", "GT", "HN",
  823. "NI", "PA", "AU", "CA", "AL", "AD", "AM", "AT", "AZ", "BY", "BE", "BA",
  824. "BG", "HR", "CY", "CZ", "DK", "EE", "FI", "FR", "GE", "DE", "GR", "HU",
  825. "IS", "IE", "IT", "XK", "LV", "LI", "LT", "LU", "MT", "MD", "MC", "ME",
  826. "NL", "MK", "NO", "PL", "PT", "RO", "RU", "SM", "RS", "SK", "SI", "ES",
  827. "SE", "CH", "UA", "VA",
  828. ]
  829. // ==================== 响应式数据 ====================
  830. const monthlyGive = ref(false) // 是否可以参加CWG Markets 月赏礼遇活动
  831. const selectedAccount = ref<any>(null)
  832. const valueInfo = ref<any>(null)
  833. const loginOptions1 = ref<any[]>([])
  834. const standard = ref(true)
  835. const limitedStatus = ref<any>(null)
  836. const flag = ref(false)
  837. const pictLoading = ref(false)
  838. const openType = ref("")
  839. const dialogInfoTradingAdd = ref(false) //新增
  840. const dialogInfoTradingAdd1 = ref(false) //新增
  841. const imgUrl = ref(Host05)
  842. const show = ref(false)
  843. const dialogTableVisible = ref(false)
  844. const formInfo = ref({}) //传给弹窗的值
  845. const information = reactive({
  846. id: "",
  847. title: "",
  848. login: "",
  849. participationNote: "",
  850. })
  851. const hot = ref("")
  852. const singleData = ref({})
  853. const anshiClose = ref(true)
  854. const tableData1 = ref<any>({}) //20赠金活动
  855. const interval = ref<any>(null) //倒计时方法
  856. const isCountDown = ref("") //倒计时
  857. const isCashBack = ref(false) //返现按钮
  858. const tableData2 = ref<any>(true) //2023迎新活动
  859. const tableData2Flag = ref(false) //2023迎新活动
  860. const isTransform = ref<any>(null) //转换按钮
  861. const isRealization = ref<any>(null) //变现按钮
  862. const dialogChinaUnionPay = ref(false)
  863. const dialogChinaUnionPay1 = ref(false)
  864. const loginOptions = ref<any[]>([])
  865. const dialogDealResult = ref(false)
  866. const dialogDealResult_form = reactive({ login: "" })
  867. const tableData3Flag = ref(false) //匠鑫学院cwg活动
  868. const tableData3 = ref<any>(true) //匠鑫学院cwg活动
  869. const isRealizationJx = ref<any>(null) //变现按钮
  870. const dialogDealResultJx = ref(false)
  871. const dialogDealResultJx_form = reactive({ login: "" })
  872. const dialogChinaUnionPayJX = ref(false)
  873. const tableData3FlagVip = ref(false) //匠鑫学院cwg活动
  874. const tableData3Vip = ref<any>(true) //匠鑫学院cwg活动
  875. const isRealizationJxVip = ref<any>(null) //变现按钮
  876. const dialogDealResultJxVip = ref(false)
  877. const dialogDealResultJx_formVip = reactive({ login: "" })
  878. const dialogChinaUnionPayJXVip = ref(false)
  879. const tableData3FlagJYB = ref(false) //24精英杯cwg活动
  880. const tableData3JYB = ref<any>(true) //24精英杯cwg活动
  881. const isRealizationJxJYB = ref<any>(null) //变现按钮
  882. const dialogDealResultJxJYB = ref(false)
  883. const dialogDealResultJx_formJYB = reactive({ login: "" })
  884. const dialogChinaUnionPayJXJYB = ref(false)
  885. const tableData4Flag = ref(false) //年中赠金活动
  886. const tableData4 = ref<any>(true) //年中赠金活动
  887. const tableData4TwoFlag = ref(false) //年中赠金活动-20
  888. const tableData4Two = ref<any>(true) //年中赠金活动-20
  889. const tableDataCptFlag = ref(false) //交易大赛活动
  890. const tableDataCpt = ref<any>(true) //交易大赛活动
  891. const dialogDealResultCpt = ref(false)
  892. const dialogDealResultCpt_form = reactive({
  893. login: "",
  894. address: "",
  895. cptId: "",
  896. mobile: "",
  897. nickname: "",
  898. recipient: "",
  899. })
  900. const dialogChinaUnionPayCpt = ref(false)
  901. const tableDataCptFlagCode = ref("")
  902. const isZh = computed(() => ['cn', 'zh', 'zhHant'].includes(locale.value))
  903. //CWG 现金嘉年华-抽奖
  904. const newTask = ref(false) //新任务
  905. const newTaskList = ref({ endTime: "", tradeVolume: "", raffleNumber: "" }) //新任务列表
  906. const dialogNewTask = ref(false) //新任务弹窗
  907. const dialogNewTaskDraw = ref(false) //打开抽奖弹窗
  908. const LuckyDrawsNumber = ref("0") //抽奖次数
  909. const choujiaClose = ref(false)
  910. const tableDataNoWorriesFlag = ref(false) //24无忧交易
  911. const tableDataNoWorries = ref<any>(false) //24无忧交易
  912. const isRealizationNoWorries = ref<any>(null) //变现按钮
  913. const dialogDealResultNoWorries = ref(false)
  914. const dialogDeal_formNoWorries = reactive({ login: "" })
  915. const dialogNoWorries = ref(false)
  916. const dialogNoWorriesApply = ref(false)
  917. const tableDataNewYear24Flag = ref(false) //24新年庆典
  918. const tableDataNewYear24 = ref<any>(false) //24新年庆典
  919. const openCalculatorFlag = ref(false)
  920. const NewYear24DataBalance = ref("")
  921. const NewYear24Data = reactive({
  922. balance: 0,
  923. income: 0,
  924. })
  925. const dialogSurplusActivity1 = ref(false) // CWG Markets 月赏礼遇活动弹框
  926. const surplusActivityOptions1 = ref<any[]>([]) // CWG Markets 月赏礼遇活动下拉框选项
  927. const selectedSurplusActivity1 = ref<any>(null) // 选中的CWG Markets 月赏礼遇活动
  928. const surplusActivityLoading1 = ref(false) // 加载状态
  929. const surplusGive1 = ref(false) // 是否可以参加CWG Markets 月赏礼遇活动
  930. // Surplus活动相关
  931. const dialogSurplusActivity = ref(false) // surplus活动弹框
  932. const surplusActivityOptions = ref<any[]>([]) // surplus活动下拉框选项
  933. const selectedSurplusActivity = ref<any>(null) // 选中的surplus活动
  934. const surplusActivityLoading = ref(false) // 加载状态
  935. const surplusGive = ref(false) // 是否可以参加surplus活动
  936. const activityShowsInfo = ref<any>(null) // 活动显示信息
  937. const tableData = ref<any[]>([])
  938. const search = reactive({
  939. date: [] as any[],
  940. startDate: "",
  941. endDate: "",
  942. type: 1,
  943. })
  944. //分页
  945. const pagerInfo = reactive({ row: 10, current: 1, pageTotal: 0, rowTotal: 0 })
  946. const tableDataGive = ref<any[]>([])
  947. // 验证规则
  948. const rules = reactive({
  949. login: [
  950. {
  951. required: true,
  952. message: t("vaildate.select.empty"),
  953. trigger: "change",
  954. },
  955. ],
  956. address: [
  957. {
  958. required: true,
  959. message: t("vaildate.input.empty"),
  960. trigger: "blur",
  961. },
  962. ],
  963. mobile: [
  964. {
  965. required: true,
  966. message: t("vaildate.input.empty"),
  967. trigger: "blur",
  968. },
  969. ],
  970. nickname: [
  971. {
  972. required: true,
  973. message: t("vaildate.input.empty"),
  974. trigger: "blur",
  975. },
  976. ],
  977. recipient: [
  978. {
  979. required: true,
  980. message: t("vaildate.input.empty"),
  981. trigger: "blur",
  982. },
  983. ],
  984. })
  985. // ==================== 计算属性 ====================
  986. const country = computed(() => {
  987. return userStore?.userInfo?.customInfo?.country
  988. })
  989. const myCid = computed(() => {
  990. return userStore?.userInfo?.customInfo?.cId
  991. })
  992. const isSupportedCountry = computed(() => {
  993. try {
  994. const country = userStore?.userInfo?.customInfo?.country
  995. return countries.includes(country)
  996. } catch {
  997. return false
  998. }
  999. })
  1000. const dollarActivity = computed(() => {
  1001. const info = activityShowsInfo.value;
  1002. if (!info || !info.dollar) {
  1003. return null;
  1004. }
  1005. const d = info.dollar;
  1006. if (Number(d.show) !== 1) {
  1007. return null;
  1008. }
  1009. return d;
  1010. })
  1011. const dollarCoverSrc = computed(() => {
  1012. const d = dollarActivity.value;
  1013. if (!d || !d.coverUrl) {
  1014. return "";
  1015. }
  1016. const u = String(d.coverUrl);
  1017. if (/^https?:\/\//i.test(u)) {
  1018. return u;
  1019. }
  1020. return Host05 + u;
  1021. })
  1022. const dollarActivityDate = computed(() => {
  1023. const d = dollarActivity.value;
  1024. if (!d) {
  1025. return "";
  1026. }
  1027. const raw =
  1028. d.revokeDate ||
  1029. d.activityEndTime ||
  1030. d.endDate ||
  1031. d.endTime ||
  1032. d.activityStartTime ||
  1033. "";
  1034. if (!raw) {
  1035. return "";
  1036. }
  1037. return String(raw).split(" ")[0];
  1038. })
  1039. const dollarParticipateEnabled = computed(() => {
  1040. return dollarActivity.value && Number(dollarActivity.value.customApply) === 1
  1041. })
  1042. const isGuoQin = computed(() => {
  1043. let flag = false
  1044. let startTime1 = "2024/10/01 00:00:00"
  1045. let endTime1 = "2024/10/07 23:59:59"
  1046. let timezone = 8
  1047. let offset_GMT = new Date().getTimezoneOffset()
  1048. let nowDate = new Date().getTime()
  1049. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  1050. let end = new Date(endTime1).getTime()
  1051. let start = new Date(startTime1).getTime()
  1052. if (now > start && now < end) {
  1053. flag = true
  1054. }
  1055. return flag
  1056. })
  1057. const showMonthlyActivity2026 = computed(() => {
  1058. let targetTime = "2026/01/01 00:00:00"
  1059. let timezone = 8
  1060. let offset_GMT = new Date().getTimezoneOffset()
  1061. let nowDate = new Date().getTime()
  1062. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  1063. let target = new Date(targetTime).getTime()
  1064. return now >= target
  1065. })
  1066. // ==================== 工具方法 ====================
  1067. //时间补0
  1068. const getzero = (time: number | string) => {
  1069. return time > "9" ? time : "0" + time
  1070. }
  1071. //时间格式转换
  1072. const timeConvert = (val: string) => {
  1073. if (val) {
  1074. var datetime = new Date(val.replace(/-/g, "/"))
  1075. var year = datetime.getFullYear()
  1076. var month = datetime.getMonth() + 1
  1077. var date = datetime.getDate()
  1078. if (month < 10) {
  1079. month = "0" + month
  1080. }
  1081. if (date < 10) {
  1082. date = "0" + date
  1083. }
  1084. var time = year + "年" + month + "月" + date + "日"
  1085. return time
  1086. }
  1087. return ""
  1088. }
  1089. //判断匠鑫活动是否报名结束
  1090. const timeExpireJx = (endTime: string) => {
  1091. let endTime1 = endTime.replace(/-/g, "/").split(" ")[0]
  1092. let timezone = 2
  1093. let offset_GMT = new Date().getTimezoneOffset()
  1094. let nowDate = new Date().getTime()
  1095. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  1096. let end = new Date(endTime1).getTime()
  1097. return now < end
  1098. }
  1099. //判断活动是否结束
  1100. const overdue = (startTime: string, endTime: string) => {
  1101. let startTime1 = startTime.replace(/-/g, "/").split(" ")[0]
  1102. let endTime1 = endTime.replace(/-/g, "/").split(" ")[0]
  1103. let timezone = 2
  1104. let offset_GMT = new Date().getTimezoneOffset()
  1105. let nowDate = new Date().getTime()
  1106. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  1107. let start = new Date(startTime1).getTime()
  1108. let end = new Date(endTime1).getTime()
  1109. return start < now && now < end
  1110. }
  1111. const isAfterJuly21 = () => {
  1112. const currentDate = new Date()
  1113. const july21 = new Date(currentDate.getFullYear(), 6, 21)
  1114. return currentDate >= july21
  1115. }
  1116. // 判断是否在9月30日晚上12点之后,用于隐藏特定活动
  1117. const isAfterSeptember30 = () => {
  1118. return true
  1119. }
  1120. const standardTime = () => {
  1121. standard.value = false
  1122. }
  1123. const groupCurrency = (type: string) => {
  1124. if (type == "GBP") {
  1125. return ": £"
  1126. } else if (type == "USD") {
  1127. return ": $"
  1128. } else if (type == "EUR") {
  1129. return ": €"
  1130. } else if (type == "USC") {
  1131. return ": ¢"
  1132. } else {
  1133. return ": $"
  1134. }
  1135. }
  1136. const groupCurrency1 = (type: string) => {
  1137. if (type == "GBP") {
  1138. return "£"
  1139. } else if (type == "USD") {
  1140. return "$"
  1141. } else if (type == "EUR") {
  1142. return "€"
  1143. } else if (type == "USC") {
  1144. return "¢"
  1145. } else {
  1146. return "$"
  1147. }
  1148. }
  1149. const groupTypeName = (type: string) => {
  1150. if (type == "1") {
  1151. return t("AccountType.ClassicAccount")
  1152. } else if (type == "2") {
  1153. return t("AccountType.SeniorAccount")
  1154. } else if (type == "3") {
  1155. return isAfterJuly28() ? "--" : t("AccountType.AgencyAccount")
  1156. } else if (type == "5") {
  1157. return t("AccountType.SpeedAccount")
  1158. } else if (type == "6") {
  1159. return t("AccountType.SpeedAccount")
  1160. } else if (type == "7") {
  1161. return t("AccountType.StandardAccount")
  1162. } else if (type == "8") {
  1163. return t("AccountType.CentAccount")
  1164. }
  1165. return ""
  1166. }
  1167. // ==================== API 请求方法 ====================
  1168. const loginComboxOptions = computed(() => {
  1169. return loginOptions1.value.map((item) => ({
  1170. text: item.label,
  1171. value: item.login
  1172. }))
  1173. })
  1174. //获取账户信息
  1175. const getDateList = async () => {
  1176. let res = await customApi.DropdownlusActivityOptions({ platform: "" })
  1177. if (res.code == Code.StatusOK) {
  1178. // loginOptions1.value = res.data
  1179. loginOptions1.value = res.data.map(item => ({
  1180. ...item,
  1181. label: `${item.login} - ${groupTypeName(item.type)} - ${t('Custom.Deposit.AvailableBalance')}${groupCurrency(item.currency)}${numberDecimal(item.balance)}`,
  1182. disable: item.closeFunctions.includes('1')
  1183. }))
  1184. } else {
  1185. uni.showToast({ title: res.msg, icon: "none" })
  1186. }
  1187. }
  1188. //获取list
  1189. const searchFunc = async () => {
  1190. if (flag.value) {
  1191. return
  1192. } else {
  1193. flag.value = true
  1194. }
  1195. pictLoading.value = true
  1196. let res = await activityApi.ActivityExtensionIist({
  1197. hot: hot.value,
  1198. tag: 1,
  1199. lang: ["cn", "zhHant"].indexOf(locale.value) !== -1 ? "cn" : "en",
  1200. page: {
  1201. current: pagerInfo.current,
  1202. row: pagerInfo.row,
  1203. },
  1204. })
  1205. if (res.code == Code.StatusOK) {
  1206. tableData.value = res.data
  1207. pagerInfo.rowTotal = res.page.rowTotal
  1208. pagerInfo.pageTotal = res.page.pageTotal
  1209. flag.value = false
  1210. } else {
  1211. uni.showToast({ title: res.msg, icon: "none" })
  1212. flag.value = false
  1213. }
  1214. pictLoading.value = false
  1215. }
  1216. //获取list-赠金活动列表
  1217. const searchFunc1 = async () => {
  1218. pictLoading.value = true
  1219. let res = await activityApi.ActivityExtensionGiveList({
  1220. page: {
  1221. current: pagerInfo.current,
  1222. row: pagerInfo.row,
  1223. },
  1224. })
  1225. if (res.code == Code.StatusOK) {
  1226. tableDataGive.value = res.data
  1227. pagerInfo.rowTotal = res.page.rowTotal
  1228. pagerInfo.pageTotal = res.page.pageTotal
  1229. } else {
  1230. uni.showToast({ title: res.msg, icon: "none" })
  1231. }
  1232. pictLoading.value = false
  1233. }
  1234. //详情
  1235. const getSingle = async (id: string) => {
  1236. let res = await activityApi.ActivitySingle({
  1237. id: id,
  1238. })
  1239. if (res.code == Code.StatusOK) {
  1240. singleData.value = res.data
  1241. } else {
  1242. uni.showToast({ title: res.msg, icon: "none" })
  1243. }
  1244. }
  1245. //获取客户申请活动列表
  1246. const Api = async () => {
  1247. let res = await activityApi.ActivityApplyList({
  1248. page: {
  1249. current: pagerInfo.current,
  1250. row: pagerInfo.row,
  1251. },
  1252. })
  1253. if (res.code == Code.StatusOK) {
  1254. pagerInfo.rowTotal = res.page.rowTotal
  1255. pagerInfo.pageTotal = res.page.pageTotal
  1256. } else {
  1257. uni.showToast({ title: res.msg, icon: "none" })
  1258. }
  1259. }
  1260. //20赠金活动数据
  1261. const getActivityPercentageGiveInfo = async () => {
  1262. let res = await activityApi.ActivityPercentageGiveInfo({})
  1263. if (res.code == Code.StatusOK) {
  1264. tableData1.value = res.data
  1265. if (typeof tableData1.value == "object") {
  1266. let timezone = 2
  1267. let offset_GMT = new Date().getTimezoneOffset()
  1268. let nowDate = new Date().getTime()
  1269. let nowTime = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
  1270. let startTime = new Date(tableData1.value.activityStartTime.replace(/-/g, "/")).getTime()
  1271. if (nowTime < startTime) {
  1272. interval.value = setInterval(() => {
  1273. let timezone = 2
  1274. let offset_GMT = new Date().getTimezoneOffset()
  1275. let nowDate = new Date().getTime()
  1276. let nowTime = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
  1277. let sec = 1000,
  1278. min = 60 * sec,
  1279. hour = min * 60,
  1280. day = 24 * hour
  1281. let time = startTime - nowTime
  1282. let DAY = getzero(Math.floor(time / day))
  1283. let HOUR = getzero(Math.floor((time % day) / hour))
  1284. let MIN = getzero(Math.floor((time % hour) / min))
  1285. let SEC = getzero(Math.floor((time % min) / sec))
  1286. isCountDown.value = `${DAY}${t("Label.Day")}${HOUR}:${MIN}:${SEC}`
  1287. if (nowTime >= startTime) {
  1288. clearInterval(interval.value)
  1289. getActivityPercentageGiveInfo()
  1290. }
  1291. }, 1000)
  1292. } else if (nowTime > startTime && tableData1.value.status == 0) {
  1293. isCashBack.value = true
  1294. }
  1295. }
  1296. } else {
  1297. uni.showToast({ title: res.msg, icon: "none" })
  1298. }
  1299. }
  1300. //返现
  1301. const cashBack = async () => {
  1302. let res = await activityApi.ActivityPercentageGiveApply({})
  1303. if (res.code == Code.StatusOK) {
  1304. uni.showToast({ title: t("Msg.Application"), icon: "success" })
  1305. } else {
  1306. uni.showToast({ title: res.msg, icon: "none" })
  1307. }
  1308. }
  1309. //20赠金活动申请
  1310. const toDeposit = () => {
  1311. uni.navigateTo({ url: "/pages/customer/deposit/index" })
  1312. }
  1313. //2023迎新活动数据
  1314. const Activity23HundredInfo = async () => {
  1315. let res = await activityApi.Activity23HundredInfo({})
  1316. if (res.code == Code.StatusOK) {
  1317. tableData2.value = res.data
  1318. if (typeof tableData2.value == "object") {
  1319. tableData2Flag.value = true
  1320. let timezone = 2
  1321. let offset_GMT = new Date().getTimezoneOffset()
  1322. let nowDate = new Date().getTime()
  1323. let nowTime = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
  1324. let startTime = new Date(tableData2.value.activityStartTime.replace(/-/g, "/")).getTime()
  1325. let endTime = new Date(tableData2.value.activityEndTime.replace(/-/g, "/")).getTime()
  1326. if (nowTime < endTime && nowTime > startTime) {
  1327. if (tableData2.value.status == 2 && tableData2.value.activityStatus == 0) {
  1328. isTransform.value = 1
  1329. } else if (
  1330. tableData2.value.status == 2 &&
  1331. (tableData2.value.activityStatus == 1 ||
  1332. (tableData2.value.balanceStatus != 2 && tableData2.value.creditStatus != 2))
  1333. ) {
  1334. isTransform.value = 2
  1335. } else if (tableData2.value.status == 2 && tableData2.value.activityStatus == 3) {
  1336. isTransform.value = 2
  1337. }
  1338. } else {
  1339. isTransform.value = 2
  1340. }
  1341. if (tableData2.value.status == 2 && tableData2.value.activityStatus == 2) {
  1342. isTransform.value = null
  1343. if (tableData2.value.realizationStatus == 0) {
  1344. isRealization.value = 1
  1345. } else if (
  1346. tableData2.value.realizationStatus == 1 ||
  1347. (tableData2.value.realizationCreditStatus != 2 && tableData2.value.realizationBalanceStatus != 2)
  1348. ) {
  1349. isRealization.value = 2
  1350. } else if (tableData2.value.realizationStatus == 3) {
  1351. isRealization.value = 2
  1352. }
  1353. } else {
  1354. isRealization.value = null
  1355. }
  1356. } else {
  1357. if (tableData2.value) {
  1358. tableData2Flag.value = true
  1359. }
  1360. }
  1361. } else {
  1362. uni.showToast({ title: res.msg, icon: "none" })
  1363. tableData2.value = true
  1364. }
  1365. }
  1366. //获取交易账户的下拉列表
  1367. const toApply23Open = async () => {
  1368. pictLoading.value = true
  1369. let res = await activityApi.Activity23Login({})
  1370. if (res.code == Code.StatusOK) {
  1371. loginOptions.value = res.data
  1372. dialogDealResult.value = true
  1373. } else {
  1374. uni.showToast({ title: res.msg, icon: "none" })
  1375. }
  1376. pictLoading.value = false
  1377. }
  1378. //2023迎新活动申请
  1379. const toApply23 = async () => {
  1380. if (flag.value) {
  1381. return
  1382. } else {
  1383. flag.value = true
  1384. }
  1385. let res = await activityApi.Activity23HundredApply({
  1386. login: dialogDealResult_form.login,
  1387. })
  1388. if (res.code == Code.StatusOK) {
  1389. toApply23Cancel()
  1390. Activity23HundredInfo()
  1391. uni.showToast({ title: res.msg, icon: "success" })
  1392. } else {
  1393. uni.showToast({ title: res.msg, icon: "none" })
  1394. }
  1395. }
  1396. const toApply23Cancel = () => {
  1397. dialogDealResult_form.login = ""
  1398. dialogDealResult.value = false
  1399. }
  1400. //盈利转换
  1401. const toTransform = () => {
  1402. dialogChinaUnionPay.value = true
  1403. }
  1404. const toTransformActive = async () => {
  1405. let res = await activityApi.Activity23HundredTransform({})
  1406. if (res.code == Code.StatusOK) {
  1407. dialogChinaUnionPay.value = false
  1408. Activity23HundredInfo()
  1409. uni.showToast({ title: res.msg, icon: "success" })
  1410. } else {
  1411. uni.showToast({ title: res.msg, icon: "none" })
  1412. }
  1413. }
  1414. //盈利变现
  1415. const toRealization = () => {
  1416. dialogChinaUnionPay1.value = true
  1417. }
  1418. const toRealizationActive = async () => {
  1419. let res = await activityApi.Activity23HundredRealization({})
  1420. if (res.code == Code.StatusOK) {
  1421. dialogChinaUnionPay1.value = false
  1422. Activity23HundredInfo()
  1423. uni.showToast({ title: res.msg, icon: "success" })
  1424. } else {
  1425. uni.showToast({ title: res.msg, icon: "none" })
  1426. }
  1427. }
  1428. //2023匠鑫活动数据
  1429. const Activity23JiangxinInfo = async () => {
  1430. let res = await activityApi.Activity23JiangxinInfo({})
  1431. if (res.code == Code.StatusOK) {
  1432. tableData3.value = res.data
  1433. if (tableData3.value.show == 1) {
  1434. tableData3Flag.value = true
  1435. } else if (tableData3.value.show == 0) {
  1436. tableData3Flag.value = false
  1437. } else if (!tableData3.value.show) {
  1438. tableData3Flag.value = true
  1439. let timezone = 2
  1440. let offset_GMT = new Date().getTimezoneOffset()
  1441. let nowDate = new Date().getTime()
  1442. let nowTime = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
  1443. let endTime = tableData3.value.activityEndTime
  1444. ? new Date(tableData3.value.activityEndTime.replace(/-/g, "/")).getTime()
  1445. : null
  1446. if (
  1447. tableData3.value.status == 2 &&
  1448. tableData3.value.realizationStatus == 0 &&
  1449. endTime &&
  1450. nowTime > endTime
  1451. ) {
  1452. isRealizationJx.value = 1
  1453. } else {
  1454. isRealizationJx.value = 2
  1455. }
  1456. }
  1457. } else {
  1458. uni.showToast({ title: res.msg, icon: "none" })
  1459. }
  1460. }
  1461. //获取交易账户的下拉列表
  1462. const toApply23JxOpen = async () => {
  1463. pictLoading.value = true
  1464. let res = await activityApi.Activity23JxLogin({})
  1465. if (res.code == Code.StatusOK) {
  1466. loginOptions.value = res.data
  1467. dialogDealResultJx.value = true
  1468. } else {
  1469. uni.showToast({ title: res.msg, icon: "none" })
  1470. }
  1471. pictLoading.value = false
  1472. }
  1473. //2023迎新活动申请
  1474. const toApply23Jx = async () => {
  1475. if (flag.value) {
  1476. return
  1477. } else {
  1478. flag.value = true
  1479. }
  1480. let res = await activityApi.Activity23JiangxinApply({
  1481. login: dialogDealResultJx_form.login,
  1482. })
  1483. if (res.code == Code.StatusOK) {
  1484. toApply23JxCancel()
  1485. Activity23JiangxinInfo()
  1486. uni.showToast({ title: res.msg, icon: "success" })
  1487. } else {
  1488. uni.showToast({ title: res.msg, icon: "none" })
  1489. }
  1490. }
  1491. const toApply23JxCancel = () => {
  1492. dialogDealResultJx_form.login = ""
  1493. dialogDealResultJx.value = false
  1494. }
  1495. //盈利变现
  1496. const toRealizationJx = async () => {
  1497. let res = await activityApi.Activity23JiangxinRealization({
  1498. id: tableData3.value.id,
  1499. })
  1500. if (res.code == Code.StatusOK) {
  1501. Activity23JiangxinInfo()
  1502. uni.showToast({ title: res.msg, icon: "success" })
  1503. } else {
  1504. uni.showToast({ title: res.msg, icon: "none" })
  1505. }
  1506. }
  1507. //2023匠鑫活动数据Vip
  1508. const Activity23JiangxinInfoVip = async () => {
  1509. let res = await activityApi.Activity23JiangxinInfoVip({})
  1510. if (res.code == Code.StatusOK) {
  1511. tableData3Vip.value = res.data
  1512. if (tableData3Vip.value.show == 1) {
  1513. tableData3FlagVip.value = true
  1514. } else if (tableData3Vip.value.show == 0) {
  1515. tableData3FlagVip.value = false
  1516. } else if (!tableData3Vip.value.show) {
  1517. tableData3FlagVip.value = true
  1518. let timezone = 2
  1519. let offset_GMT = new Date().getTimezoneOffset()
  1520. let nowDate = new Date().getTime()
  1521. let nowTime = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
  1522. let endTime = tableData3Vip.value.activityEndTime
  1523. ? new Date(tableData3Vip.value.activityEndTime.replace(/-/g, "/")).getTime()
  1524. : null
  1525. if (
  1526. tableData3Vip.value.status == 2 &&
  1527. tableData3Vip.value.realizationStatus == 0 &&
  1528. endTime &&
  1529. nowTime > endTime
  1530. ) {
  1531. isRealizationJxVip.value = 1
  1532. } else {
  1533. isRealizationJxVip.value = 2
  1534. }
  1535. }
  1536. } else {
  1537. uni.showToast({ title: res.msg, icon: "none" })
  1538. }
  1539. }
  1540. //获取交易账户的下拉列表Vip
  1541. const toApply23JxOpenVip = async () => {
  1542. pictLoading.value = true
  1543. let res = await activityApi.Activity23JxLoginVip({})
  1544. if (res.code == Code.StatusOK) {
  1545. loginOptions.value = res.data
  1546. dialogDealResultJxVip.value = true
  1547. } else {
  1548. uni.showToast({ title: res.msg, icon: "none" })
  1549. }
  1550. pictLoading.value = false
  1551. }
  1552. //2023迎新活动申请Vip
  1553. const toApply23JxVip = async () => {
  1554. if (flag.value) {
  1555. return
  1556. } else {
  1557. flag.value = true
  1558. }
  1559. let res = await activityApi.Activity23JiangxinApplyVip({
  1560. login: dialogDealResultJx_formVip.login,
  1561. })
  1562. if (res.code == Code.StatusOK) {
  1563. toApply23JxCancelVip()
  1564. Activity23JiangxinInfoVip()
  1565. uni.showToast({ title: res.msg, icon: "success" })
  1566. } else {
  1567. uni.showToast({ title: res.msg, icon: "none" })
  1568. }
  1569. }
  1570. const toApply23JxCancelVip = () => {
  1571. dialogDealResultJx_formVip.login = ""
  1572. dialogDealResultJxVip.value = false
  1573. }
  1574. //盈利变现Vip
  1575. const toRealizationJxVip = async () => {
  1576. let res = await activityApi.Activity23JiangxinRealizationVip({
  1577. id: tableData3Vip.value.id,
  1578. })
  1579. if (res.code == Code.StatusOK) {
  1580. Activity23JiangxinInfoVip()
  1581. uni.showToast({ title: res.msg, icon: "success" })
  1582. } else {
  1583. uni.showToast({ title: res.msg, icon: "none" })
  1584. }
  1585. }
  1586. //2023年中赠金活动数据-10
  1587. const Activity24nianzhongInfo = async () => {
  1588. let res = await activityApi.Activity23nianzhongInfo({})
  1589. if (res.code == Code.StatusOK) {
  1590. tableData4.value = res.data
  1591. if (tableData4.value.show == 1) {
  1592. tableData4Flag.value = true
  1593. } else if (tableData4.value.show == 0) {
  1594. tableData4Flag.value = false
  1595. }
  1596. } else {
  1597. uni.showToast({ title: res.msg, icon: "none" })
  1598. }
  1599. }
  1600. //2023年中赠金活动跳转
  1601. const toActivity24nianzhong = () => {
  1602. uni.navigateTo({ url: "/pages/customer/deposit-select" })
  1603. }
  1604. //标准账户交易奖励跳转
  1605. const toActivity24Trading = () => {
  1606. uni.navigateTo({ url: "/pages/customer/new/index" })
  1607. }
  1608. //2023年中赠金活动数据-20
  1609. const Activity24nianzhongTwoInfo = async () => {
  1610. let res = await activityApi.Activity23nianzhongTwoInfo({})
  1611. if (res.code == Code.StatusOK) {
  1612. tableData4Two.value = res.data
  1613. if (tableData4Two.value.show == 1) {
  1614. tableData4TwoFlag.value = true
  1615. } else if (tableData4Two.value.show == 0) {
  1616. tableData4TwoFlag.value = false
  1617. }
  1618. } else {
  1619. uni.showToast({ title: res.msg, icon: "none" })
  1620. }
  1621. }
  1622. //交易大赛数据-参数
  1623. const GetActivityCptCode = async () => {
  1624. let res = await activityApi.ActivityCptinfoGetCode({})
  1625. if (res.code == Code.StatusOK) {
  1626. tableDataCptFlagCode.value = res.data.code
  1627. if (tableDataCptFlagCode.value) {
  1628. ActivityCptInfo(tableDataCptFlagCode.value)
  1629. }
  1630. } else {
  1631. uni.showToast({ title: res.msg, icon: "none" })
  1632. }
  1633. }
  1634. //交易大赛数据
  1635. const ActivityCptInfo = async (code: string) => {
  1636. let res = await activityApi.ActivityCptinfoCode({
  1637. infoCode: code,
  1638. })
  1639. if (res.code == Code.StatusOK) {
  1640. tableDataCpt.value = res.data
  1641. if (tableDataCpt.value == null) {
  1642. tableDataCptFlag.value = false
  1643. } else {
  1644. tableDataCptFlag.value = true
  1645. }
  1646. } else {
  1647. uni.showToast({ title: res.msg, icon: "none" })
  1648. }
  1649. }
  1650. //获取交易账户的下拉列表
  1651. const toApplyCptOpen = async () => {
  1652. pictLoading.value = true
  1653. let res = await activityApi.ActivityCptInfoLogins({
  1654. cptId: tableDataCpt.value.id,
  1655. })
  1656. if (res.code == Code.StatusOK) {
  1657. loginOptions.value = res.data
  1658. dialogDealResultCpt.value = true
  1659. } else {
  1660. uni.showToast({ title: res.msg, icon: "none" })
  1661. }
  1662. pictLoading.value = false
  1663. }
  1664. //交易大赛申请
  1665. const toApplyCpt = async () => {
  1666. if (flag.value) {
  1667. return
  1668. } else {
  1669. flag.value = true
  1670. }
  1671. let res = await activityApi.ActivityCptInfoAdd({
  1672. cptId: tableDataCpt.value.id,
  1673. login: dialogDealResultCpt_form.login,
  1674. nickname: dialogDealResultCpt_form.nickname,
  1675. mobile: dialogDealResultCpt_form.mobile,
  1676. address: dialogDealResultCpt_form.address,
  1677. recipient: dialogDealResultCpt_form.recipient,
  1678. })
  1679. if (res.code == Code.StatusOK) {
  1680. toApplyCptCancel()
  1681. GetActivityCptCode()
  1682. uni.showToast({ title: res.msg, icon: "success" })
  1683. } else {
  1684. uni.showToast({ title: res.msg, icon: "none" })
  1685. }
  1686. }
  1687. const toApplyCptCancel = () => {
  1688. dialogDealResultCpt_form.login = ""
  1689. dialogDealResultCpt_form.nickname = ""
  1690. dialogDealResultCpt_form.mobile = ""
  1691. dialogDealResultCpt_form.address = ""
  1692. dialogDealResultCpt_form.recipient = ""
  1693. dialogDealResultCpt.value = false
  1694. }
  1695. const toOpenSingle = (pageAddress: string) => {
  1696. let link = ""
  1697. if (pageAddress.indexOf("html?") == -1) {
  1698. link = "?code=" + tableDataCptFlagCode.value
  1699. }
  1700. if (pageAddress.indexOf("html?") > -1 && pageAddress.indexOf("code") == -1) {
  1701. link = "&code=" + tableDataCptFlagCode.value
  1702. }
  1703. plus.runtime.openURL(imgUrl.value + pageAddress + link)
  1704. }
  1705. //CWG 现金嘉年华-新任务
  1706. const ActivitYdepositRaffleAim = async () => {
  1707. let res = await activityApi.ActivitYdepositRaffleAim({})
  1708. if (res.code == Code.StatusOK) {
  1709. if (res.data == null) {
  1710. newTask.value = false
  1711. } else {
  1712. newTask.value = true
  1713. newTaskList.value = res.data
  1714. }
  1715. } else {
  1716. uni.showToast({ title: res.msg, icon: "none" })
  1717. }
  1718. }
  1719. //CWG 现金嘉年华-抽奖次数
  1720. const ActivitYdepositRaffleinfo = async () => {
  1721. let res = await activityApi.ActivitYdepositRaffleinfo({})
  1722. if (res.code == Code.StatusOK) {
  1723. if (res.data == null) {
  1724. LuckyDrawsNumber.value = "0"
  1725. } else {
  1726. LuckyDrawsNumber.value = res.data.raffleResidueNumber || "0"
  1727. }
  1728. } else {
  1729. uni.showToast({ title: res.msg, icon: "none" })
  1730. }
  1731. }
  1732. //现金嘉年华跳转抽奖历史
  1733. const toHistoryLuckyDraw = () => {
  1734. uni.navigateTo({ url: "/pages/customer/history/lucky/draw/index" })
  1735. }
  1736. //现金嘉年华跳转任务列表
  1737. const toTaskList = () => {
  1738. uni.navigateTo({ url: "/pages/customer/task/list/index" })
  1739. }
  1740. const UtoTaskList = () => {
  1741. uni.navigateTo({ url: "/pages/customer/Utask/list/index" })
  1742. }
  1743. const goSurplusTaskList = () => {
  1744. uni.navigateTo({ url: "/pages/activities/surplus-list" })
  1745. }
  1746. const goMonthlyTaskList = () => {
  1747. uni.navigateTo({ url: "/pages/activities/monthly-list" })
  1748. }
  1749. const toOpenTask = () => {
  1750. dialogNewTaskDraw.value = true
  1751. }
  1752. //新任务弹窗
  1753. const toNewTask = () => {
  1754. dialogNewTask.value = true
  1755. }
  1756. const closedialogNewTaskDraw = () => {
  1757. dialogNewTaskDraw.value = false
  1758. ActivitYdepositRaffleinfo()
  1759. }
  1760. //分页返回数据
  1761. const handleCurrentChange = (val: number) => {
  1762. pagerInfo.current = val
  1763. searchFunc()
  1764. searchFunc1()
  1765. }
  1766. //20赠金是否到期-4月30号23:59:59的时候关闭申请
  1767. const is20Open = () => {
  1768. let endTime1 = "2023/04/30 23:59:59"
  1769. let timezone = 2
  1770. let offset_GMT = new Date().getTimezoneOffset()
  1771. let nowDate = new Date().getTime()
  1772. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  1773. let end = new Date(endTime1).getTime()
  1774. if (now > end) {
  1775. anshiClose.value = false
  1776. }
  1777. }
  1778. //抽抽奖是否到期-2023-11-25 00:00:00-2023-12-31 23:59:59
  1779. const isRaffleOpen = () => {
  1780. let endTime1 = "2025/9/30 23:59:59"
  1781. let startTime1 = "2025/7/1 00:00:00"
  1782. let timezone = 2
  1783. let offset_GMT = new Date().getTimezoneOffset()
  1784. let nowDate = new Date().getTime()
  1785. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  1786. let end = new Date(endTime1).getTime()
  1787. let start = new Date(startTime1).getTime()
  1788. if (now < end && start < now) {
  1789. choujiaClose.value = true
  1790. ActivitYdepositRaffleAim()
  1791. ActivitYdepositRaffleinfo()
  1792. }
  1793. }
  1794. //24精英杯活动
  1795. const Activity24JYBInfoVip = async () => {
  1796. let res = await activityApi.Activity24JYBInfoVip({})
  1797. if (res.code == Code.StatusOK) {
  1798. tableData3JYB.value = res.data
  1799. if (tableData3JYB.value.show == 1) {
  1800. tableData3FlagJYB.value = true
  1801. } else if (tableData3JYB.value.show == 0) {
  1802. tableData3FlagJYB.value = false
  1803. } else if (!tableData3JYB.value.show) {
  1804. tableData3FlagJYB.value = true
  1805. let timezone = 2
  1806. let offset_GMT = new Date().getTimezoneOffset()
  1807. let nowDate = new Date().getTime()
  1808. let nowTime = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
  1809. let endTime = tableData3JYB.value.activityEndTime
  1810. ? new Date(tableData3JYB.value.activityEndTime.replace(/-/g, "/")).getTime()
  1811. : null
  1812. if (
  1813. tableData3JYB.value.status == 2 &&
  1814. tableData3JYB.value.realizationStatus == 0 &&
  1815. endTime &&
  1816. nowTime > endTime
  1817. ) {
  1818. isRealizationJxJYB.value = 1
  1819. } else {
  1820. isRealizationJxJYB.value = 2
  1821. }
  1822. }
  1823. } else {
  1824. uni.showToast({ title: res.msg, icon: "none" })
  1825. }
  1826. }
  1827. //获取交易账户的下拉列表Vip
  1828. const toApply24JYBOpenVip = async () => {
  1829. pictLoading.value = true
  1830. let res = await activityApi.Activity24JYBLoginVip({})
  1831. if (res.code == Code.StatusOK) {
  1832. loginOptions.value = res.data
  1833. dialogDealResultJxJYB.value = true
  1834. } else {
  1835. uni.showToast({ title: res.msg, icon: "none" })
  1836. }
  1837. pictLoading.value = false
  1838. }
  1839. //24精英杯活动申请
  1840. const toApply24JYBVip = async () => {
  1841. //this.$refs["dialogDealResultJx_formJYB"].validate
  1842. if (flag.value) {
  1843. return
  1844. } else {
  1845. flag.value = true
  1846. }
  1847. let res = await activityApi.Activity24JYBApplyVip({
  1848. login: dialogDealResultJx_formJYB.login,
  1849. })
  1850. if (res.code == Code.StatusOK) {
  1851. toApply24JYBCancelVip()
  1852. Activity24JYBInfoVip()
  1853. uni.showToast({ title: res.msg, icon: "success" })
  1854. } else {
  1855. uni.showToast({ title: res.msg, icon: "none" })
  1856. }
  1857. }
  1858. const toApply24JYBCancelVip = () => {
  1859. dialogDealResultJx_formJYB.login = ""
  1860. dialogDealResultJxJYB.value = false
  1861. }
  1862. //24精英杯活动盈利变现
  1863. const toRealization24JYBVip = async () => {
  1864. let res = await activityApi.Activity24JYBRealizationVip({
  1865. id: tableData3JYB.value.id,
  1866. })
  1867. if (res.code == Code.StatusOK) {
  1868. Activity24JYBInfoVip()
  1869. uni.showToast({ title: res.msg, icon: "success" })
  1870. } else {
  1871. uni.showToast({ title: res.msg, icon: "none" })
  1872. }
  1873. }
  1874. //24无忧交易
  1875. const ActivityNoWorriesInfo = async () => {
  1876. let res = await activityApi.ActivityNoWorriesInfo({})
  1877. if (res.code == Code.StatusOK) {
  1878. tableDataNoWorries.value = res.data
  1879. if (typeof tableDataNoWorries.value == "object") {
  1880. tableDataNoWorriesFlag.value = true
  1881. let timezone = 2
  1882. let offset_GMT = new Date().getTimezoneOffset()
  1883. let nowDate = new Date().getTime()
  1884. let nowTime = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
  1885. let startTime = new Date(tableDataNoWorries.value.compensateTime.replace(/-/g, "/")).getTime()
  1886. let endTime = new Date(tableDataNoWorries.value.revokeTime.replace(/-/g, "/")).getTime()
  1887. if (
  1888. nowTime < endTime &&
  1889. nowTime > startTime &&
  1890. (tableDataNoWorries.value.status == 0 ||
  1891. tableDataNoWorries.value.status == 3) &&
  1892. tableDataNoWorries.value.compensateStatus == 2 &&
  1893. tableDataNoWorries.value.activityStatus == 1
  1894. ) {
  1895. isRealizationNoWorries.value = 1
  1896. } else {
  1897. isRealizationNoWorries.value = null
  1898. }
  1899. } else {
  1900. if (tableDataNoWorries.value) {
  1901. tableDataNoWorriesFlag.value = true
  1902. }
  1903. }
  1904. } else {
  1905. uni.showToast({ title: res.msg, icon: "none" })
  1906. }
  1907. }
  1908. //获取交易账户的下拉列表
  1909. const toApplyNoWorriesOpen = async () => {
  1910. pictLoading.value = true
  1911. let res = await activityApi.ActivityNoWorriesLogin({})
  1912. if (res.code == Code.StatusOK) {
  1913. loginOptions.value = res.data
  1914. dialogDealResultNoWorries.value = true
  1915. } else {
  1916. uni.showToast({ title: res.msg, icon: "none" })
  1917. }
  1918. pictLoading.value = false
  1919. }
  1920. //24无忧交易申请
  1921. const toApplyNoWorries = async () => {
  1922. if (flag.value) {
  1923. return
  1924. } else {
  1925. flag.value = true
  1926. }
  1927. let res = await activityApi.ActivityNoWorriesApply({
  1928. login: dialogDeal_formNoWorries.login,
  1929. })
  1930. if (res.code == Code.StatusOK) {
  1931. dialogNoWorriesApply.value = true
  1932. toApplyNoWorriesCancel()
  1933. ActivityNoWorriesInfo()
  1934. uni.showToast({ title: res.msg, icon: "success" })
  1935. } else {
  1936. uni.showToast({ title: res.msg, icon: "none" })
  1937. }
  1938. }
  1939. const toApplyNoWorriesCancel = () => {
  1940. // this.$refs["dialogDeal_formNoWorries"] &&
  1941. // this.$refs["dialogDeal_formNoWorries"].resetFields();
  1942. dialogDeal_formNoWorries.login = ""
  1943. dialogDealResultNoWorries.value = false
  1944. }
  1945. //盈利变现
  1946. const toRealizationNoWorries = () => {
  1947. dialogNoWorries.value = true
  1948. }
  1949. //24无忧交易盈利变现
  1950. const realizationNoWorries = async () => {
  1951. let res = await activityApi.ActivityNoWorriesRealization({
  1952. id: tableDataNoWorries.value.id,
  1953. })
  1954. if (res.code == Code.StatusOK) {
  1955. dialogNoWorries.value = false
  1956. ActivityNoWorriesInfo()
  1957. uni.showToast({ title: res.msg, icon: "success" })
  1958. } else {
  1959. uni.showToast({ title: res.msg, icon: "none" })
  1960. }
  1961. }
  1962. //24新年庆典
  1963. const isNewYear24Open = () => {
  1964. let endTime1 = "2025/3/31 23:59:59"
  1965. let startTime1 = "2025/1/1 00:00:00"
  1966. let timezone = 2
  1967. let offset_GMT = new Date().getTimezoneOffset()
  1968. let nowDate = new Date().getTime()
  1969. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  1970. let end = new Date(endTime1).getTime()
  1971. let start = new Date(startTime1).getTime()
  1972. if (now < end && start < now) {
  1973. ActivityNewYear24()
  1974. }
  1975. }
  1976. const ActivityNewYear24 = async () => {
  1977. let res = await activityApi.ActivityNewYear24({})
  1978. if (res.code == Code.StatusOK) {
  1979. tableDataNewYear24.value = res.data
  1980. if (typeof tableDataNewYear24.value == "object") {
  1981. tableDataNewYear24Flag.value = true
  1982. } else {
  1983. if (tableDataNewYear24.value) {
  1984. tableDataNewYear24Flag.value = true
  1985. }
  1986. }
  1987. } else {
  1988. uni.showToast({ title: res.msg, icon: "none" })
  1989. }
  1990. }
  1991. const openCalculator = () => {
  1992. openCalculatorFlag.value = true
  1993. }
  1994. const calculateIncome = () => {
  1995. NewYear24Data.balance = Number(NewYear24DataBalance.value) || 0
  1996. let rate = 0
  1997. tableDataNewYear24.value.details.forEach((item: any) => {
  1998. if (
  1999. NewYear24Data.balance > item.min &&
  2000. NewYear24Data.balance <= item.max
  2001. ) {
  2002. rate = item.rate
  2003. } else if (
  2004. NewYear24Data.balance > item.min &&
  2005. NewYear24Data.balance >= item.max &&
  2006. item.max == 0
  2007. ) {
  2008. rate = item.rate
  2009. }
  2010. })
  2011. NewYear24Data.income = (
  2012. ((NewYear24Data.balance * rate) / 100 / 365) *
  2013. 30
  2014. ).toFixed(2)
  2015. }
  2016. //限时活动
  2017. const ActivityRequiteInfo = async () => {
  2018. let res = await activityApi.ActivityRequiteInfo({})
  2019. if (res.code == Code.StatusOK) {
  2020. limitedStatus.value = res.data
  2021. } else {
  2022. uni.showToast({ title: res.msg, icon: "none" })
  2023. }
  2024. }
  2025. // 获取活动显示信息
  2026. const getActivityShowsInfo = async () => {
  2027. try {
  2028. let res = await activityApi.ActivityShowsInfo()
  2029. if (res.code == Code.StatusOK) {
  2030. activityShowsInfo.value = res.data
  2031. surplusGive.value = res.data.surplusGive || false
  2032. monthlyGive.value = res.data.monthlyGive || false
  2033. } else {
  2034. uni.showToast({ title: res.msg, icon: "none" })
  2035. surplusGive.value = false
  2036. monthlyGive.value = false
  2037. }
  2038. } catch (error) {
  2039. uni.showToast({ title: "获取活动信息失败", icon: "none" })
  2040. surplusGive.value = false
  2041. monthlyGive.value = false
  2042. }
  2043. }
  2044. // 打开surplus活动弹框
  2045. const openSurplusActivityDialog = async () => {
  2046. console.log(surplusGive.value)
  2047. if (!surplusGive.value) {
  2048. return
  2049. }
  2050. dialogSurplusActivity.value = true
  2051. surplusActivityLoading.value = true
  2052. selectedSurplusActivity.value = null
  2053. }
  2054. const openSurplusActivityDialog1 = async () => {
  2055. if (!monthlyGive.value) {
  2056. return
  2057. }
  2058. dialogSurplusActivity1.value = true
  2059. surplusActivityLoading1.value = true
  2060. selectedSurplusActivity1.value = null
  2061. getMonthlyActivityOptions()
  2062. }
  2063. const getSurplusActivityOptions = async () => {
  2064. let res = await activityApi.ActivitySurplusDepositAmount({
  2065. login: selectedAccount.value.login,
  2066. platform: selectedAccount.value.platform,
  2067. })
  2068. if (res.code == Code.StatusOK) {
  2069. surplusActivityOptions.value = res.data.map((item: any, index: number) => ({
  2070. id: index,
  2071. value: item.level,
  2072. text: `${t("AmountLabel.item1")}: ${item.amount} | ${t("AmountLabel.item2")}: ${item.needVolume}`,
  2073. giveFlag: item.giveFlag,
  2074. }))
  2075. } else {
  2076. uni.showToast({ title: res.msg, icon: "none" })
  2077. }
  2078. surplusActivityLoading.value = false
  2079. }
  2080. const getMonthlyActivityOptions = async () => {
  2081. let res = await activityApi.ActivityMonthlyDepositAmount({})
  2082. if (res.code == Code.StatusOK) {
  2083. surplusActivityOptions1.value = res.data.map((item: any, index: number) => ({
  2084. id: index,
  2085. value: item.level,
  2086. label: `${t("入金量")}: ${item.needAmount} | ${t("入金手数")}: ${item.needVolume}`,
  2087. }))
  2088. } else {
  2089. uni.showToast({ title: res.msg, icon: "none" })
  2090. }
  2091. surplusActivityLoading1.value = false
  2092. }
  2093. // 关闭surplus活动弹框
  2094. const closeSurplusActivityDialog = () => {
  2095. dialogSurplusActivity.value = false
  2096. selectedSurplusActivity.value = null
  2097. surplusActivityOptions.value = []
  2098. valueInfo.value = null
  2099. }
  2100. // 确认参加surplus活动
  2101. const confirmSurplusActivity = async () => {
  2102. try {
  2103. surplusActivityLoading.value = true
  2104. let res = await activityApi.ActivitySurplusAdd({
  2105. login: selectedAccount.value.login,
  2106. platform: selectedAccount.value.platform,
  2107. level: selectedSurplusActivity.value,
  2108. })
  2109. if (res.code == Code.StatusOK) {
  2110. uni.showToast({ title: res.msg, icon: "success" })
  2111. closeSurplusActivityDialog()
  2112. surplusActivityLoading.value = false
  2113. getActivityShowsInfo()
  2114. } else {
  2115. uni.showToast({ title: res.msg, icon: "none" })
  2116. }
  2117. } catch (error) {
  2118. uni.showToast({ title: error?.msg, icon: "none" })
  2119. }
  2120. }
  2121. // 关闭surplus活动弹框
  2122. const closeSurplusActivityDialog1 = () => {
  2123. dialogSurplusActivity1.value = false
  2124. selectedSurplusActivity1.value = null
  2125. surplusActivityOptions1.value = []
  2126. valueInfo.value = null
  2127. }
  2128. // 确认参加月度豪礼活动
  2129. const confirmSurplusActivity1 = async () => {
  2130. try {
  2131. surplusActivityLoading1.value = true
  2132. let res = await activityApi.ActivityMonthlyAdd({})
  2133. if (res.code == Code.StatusOK) {
  2134. uni.showToast({ title: res.msg, icon: "success" })
  2135. closeSurplusActivityDialog1()
  2136. surplusActivityLoading1.value = false
  2137. getActivityShowsInfo()
  2138. } else {
  2139. uni.showToast({ title: res.msg, icon: "none" })
  2140. }
  2141. } catch (error) {
  2142. uni.showToast({ title: error?.msg, icon: "none" })
  2143. }
  2144. }
  2145. //搜索
  2146. const handleSearch = () => {
  2147. pagerInfo.current = 1
  2148. searchFunc()
  2149. searchFunc1()
  2150. }
  2151. //新增
  2152. const closeDiaAdd = () => {
  2153. dialogInfoTradingAdd.value = false
  2154. dialogInfoTradingAdd1.value = false
  2155. }
  2156. const closeAdd = (val: boolean) => {
  2157. dialogInfoTradingAdd.value = false
  2158. dialogInfoTradingAdd1.value = false
  2159. }
  2160. const confirmToReload = () => {
  2161. dialogInfoTradingAdd.value = false
  2162. dialogInfoTradingAdd1.value = false
  2163. searchFunc()
  2164. }
  2165. //获取客户申请活动列表
  2166. //点击操作的回调
  2167. const tableRef = ref(null)
  2168. const handleCommand = (command) => {
  2169. if (command.type == "check") {
  2170. ActivityComplete(command.id);
  2171. }
  2172. }
  2173. const ActivityComplete = async (id: number) => {
  2174. await confirm({
  2175. content: t("news_add_field.ApplicationDialog.ActivitiesDes"),
  2176. title: t("Msg.SystemPrompt"),
  2177. confirmText: t("Btn.item6"),
  2178. cancelText: t("Btn.item7"),
  2179. })
  2180. if (flag.value) {
  2181. return;
  2182. } else {
  2183. flag.value = true;
  2184. }
  2185. let res = await activityApi.ActivityComplete({ id: id });
  2186. if (res.code == Code.StatusOK) {
  2187. tableRef.value?.reload()
  2188. uni.showToast({
  2189. title: t("Msg.Success"),
  2190. icon: "success",
  2191. })
  2192. flag.value = false;
  2193. } else {
  2194. uni.showToast({
  2195. title: res.msg,
  2196. icon: "none",
  2197. })
  2198. flag.value = false;
  2199. }
  2200. }
  2201. // 表格列配置(支持插槽和格式化)
  2202. const columns = computed(() => [
  2203. {
  2204. prop: 'login',
  2205. label: t('Drawer.Label.TradingAccount'),
  2206. align: 'center',
  2207. formatter: ({ row }) => row.login || '--'
  2208. },
  2209. {
  2210. prop: 'addTime',
  2211. label: t('Drawer.Label.Date'),
  2212. align: 'center',
  2213. formatter: ({ row }) => row.addTime || '--'
  2214. },
  2215. {
  2216. prop: 'status',
  2217. label: t('Drawer.Label.Status'),
  2218. align: 'center',
  2219. slot: 'status'
  2220. },
  2221. {
  2222. label: t('Label.Note'),
  2223. align: 'center',
  2224. type: 'note'
  2225. },
  2226. {
  2227. prop: 'action',
  2228. label: t('Label.Action'),
  2229. align: 'center',
  2230. slot: 'action'
  2231. }
  2232. ])
  2233. //获取申请活动所需数据
  2234. const getStatus = async () => {
  2235. let res = await activityApi.ActivityInfo({
  2236. activityId: information.id,
  2237. });
  2238. if (res.code == Code.StatusOK) {
  2239. loginOptions.value = res.data.map((item: any) => ({
  2240. text: item.login,
  2241. value: item.login,
  2242. disable: item.status == 1 ||
  2243. information.groupTypes.indexOf(item.groupType) == '-1' ||
  2244. information.loginTypes.indexOf(item.type) == '-1'
  2245. }))
  2246. } else {
  2247. uni.showToast({
  2248. title: res.msg,
  2249. icon: "none",
  2250. })
  2251. }
  2252. }
  2253. //申请活动
  2254. const activityApply = async () => {
  2255. if (!information.agree) {
  2256. uni.showToast({
  2257. title: t("Msg.SystemPrompt"),
  2258. icon: "none",
  2259. })
  2260. return;
  2261. }
  2262. if (flag.value) {
  2263. return;
  2264. } else {
  2265. flag.value = true;
  2266. }
  2267. try {
  2268. let res = await activityApi.ActivityApply({
  2269. activityId: information.id,
  2270. ...information,
  2271. });
  2272. if (res.code == Code.StatusOK) {
  2273. confirmToReload();
  2274. uni.showToast({
  2275. title: t("Msg.Success"),
  2276. icon: "none",
  2277. })
  2278. flag.value = false;
  2279. } else {
  2280. uni.showToast({
  2281. title: res.msg,
  2282. icon: "none",
  2283. })
  2284. flag.value = false;
  2285. }
  2286. } catch (error) {
  2287. uni.showToast({
  2288. title: error?.msg,
  2289. icon: "none",
  2290. })
  2291. flag.value = false;
  2292. }
  2293. }
  2294. const getApplyListApi = ref(null)
  2295. const search1 = reactive({
  2296. activityId: ''
  2297. })
  2298. //申请列表弹出
  2299. const checkActivity = (val: any) => {
  2300. information.id = val.id
  2301. information.title = val.title
  2302. dialogInfoTradingAdd1.value = true
  2303. getApplyListApi.value = activityApi.ActivityApplyList
  2304. search1.activityId = information.id
  2305. }
  2306. //回显
  2307. const onAgreeChange = (e) => {
  2308. information.agree = e.detail.value.length > 0
  2309. }
  2310. //申请活动弹出
  2311. const applications = (val: any) => {
  2312. information.id = val.id
  2313. information.title = val.title
  2314. getStatus()
  2315. let loginType: any[] = []
  2316. val.loginTypes.forEach((item: any) => {
  2317. loginType.push(item.loginType)
  2318. })
  2319. let groupType: any[] = []
  2320. val.groupTypes.forEach((item: any) => {
  2321. groupType.push(item.groupType)
  2322. })
  2323. information.loginTypes = loginType
  2324. information.groupTypes = groupType
  2325. information.myType12 = 1
  2326. console.log(information, 1212);
  2327. dialogInfoTradingAdd.value = true
  2328. }
  2329. //详情
  2330. const toSingle = (id: string, listID?: string) => {
  2331. if (
  2332. id == "20zj" ||
  2333. id == "23yx" ||
  2334. id == "23jx" ||
  2335. id == "23nz" ||
  2336. id == "23nzTwo" ||
  2337. id == "23jxVip" ||
  2338. id == "23xinjia" ||
  2339. id == "23jnhcj" ||
  2340. id == "23nz_zx" ||
  2341. id == "24JYB" ||
  2342. id == "NoWorries" ||
  2343. id == "NewYear24"
  2344. ) {
  2345. if (id == "23jx") {
  2346. uni.navigateTo({
  2347. 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}`,
  2348. })
  2349. } else if (id == "23jxVip") {
  2350. uni.navigateTo({
  2351. 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}`,
  2352. })
  2353. } else if (id == "24JYB") {
  2354. uni.navigateTo({
  2355. 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}`,
  2356. })
  2357. } else if (id == "23nz") {
  2358. uni.navigateTo({
  2359. 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}`,
  2360. })
  2361. } else if (id == "23nzTwo") {
  2362. uni.navigateTo({
  2363. 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)}`,
  2364. })
  2365. } else if (id == "NoWorries") {
  2366. uni.navigateTo({
  2367. url: `/pages/activities/content?id=&type=1&active=${id}`,
  2368. })
  2369. } else if (id == "NewYear24") {
  2370. uni.navigateTo({
  2371. url: `/pages/activities/content?id=&type=1&active=${id}`,
  2372. })
  2373. } else {
  2374. uni.navigateTo({
  2375. url: `/pages/activities/content?id=&type=1&active=${id}`,
  2376. })
  2377. }
  2378. } else if (id == "newList") {
  2379. uni.navigateTo({
  2380. url: `/pages/activities/content?id=${listID}&type=1&active=newList`,
  2381. })
  2382. } else {
  2383. uni.navigateTo({
  2384. url: `/pages/activities/content?id=${id}&type=1`,
  2385. })
  2386. }
  2387. }
  2388. const goDollarActivityDetail = () => {
  2389. uni.navigateTo({
  2390. url: `/pages/activities/content?id=&type=1&active=dollar`,
  2391. })
  2392. }
  2393. const goDollarTaskList = () => {
  2394. uni.navigateTo({
  2395. url: `/pages/activities/dollar-list`,
  2396. })
  2397. }
  2398. const openDollarParticipate = async () => {
  2399. if (!dollarParticipateEnabled.value) {
  2400. return;
  2401. }
  2402. try {
  2403. await confirm({
  2404. content: t("DollarActivity.confirmParticipate"),
  2405. title: t("Msg.SystemPrompt"),
  2406. confirmText: t("Btn.Confirm"),
  2407. cancelText: t("Btn.Cancel"),
  2408. })
  2409. } catch {
  2410. return;
  2411. }
  2412. if (flag.value) {
  2413. return;
  2414. } else {
  2415. flag.value = true;
  2416. }
  2417. let res = await activityApi.ActivityDollarAdd({});
  2418. if (res.code == Code.StatusOK) {
  2419. uni.showToast({
  2420. title: res.msg,
  2421. icon: "success",
  2422. })
  2423. getActivityShowsInfo();
  2424. flag.value = false;
  2425. tableRef.value?.reload()
  2426. } else {
  2427. uni.showToast({
  2428. title: res.msg,
  2429. icon: "none",
  2430. })
  2431. flag.value = false;
  2432. }
  2433. }
  2434. const handleValueInfoChange = (value: any) => {
  2435. const selectedAccountObj = loginOptions1.value.find((item) => item.login === value)
  2436. console.log("选中的账户对象:", selectedAccountObj)
  2437. selectedAccount.value = selectedAccountObj
  2438. getSurplusActivityOptions()
  2439. }
  2440. // ==================== 监听器 ====================
  2441. watch(NewYear24DataBalance, (newVal) => {
  2442. NewYear24Data.balance = Number(newVal) || 0
  2443. })
  2444. watch(dialogSurplusActivity, (newVal) => {
  2445. if (!newVal) { closeSurplusActivityDialog() }
  2446. })
  2447. watch(dialogSurplusActivity1, (newVal) => {
  2448. if (!newVal) { closeSurplusActivityDialog1() }
  2449. })
  2450. // ==================== 生命周期 ====================
  2451. onMounted(() => {
  2452. getDateList()
  2453. // 2025-07-31 00:00:00 之后关闭 standard
  2454. const endTime = new Date("2025/07/31 00:00:00").getTime()
  2455. const timezone = 3
  2456. const offset_GMT = new Date().getTimezoneOffset()
  2457. const nowDate = new Date().getTime()
  2458. const now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  2459. if (now >= endTime) {
  2460. standard.value = false
  2461. }
  2462. is20Open()
  2463. searchFunc()
  2464. searchFunc1()
  2465. getActivityPercentageGiveInfo()
  2466. Activity23HundredInfo()
  2467. // Activity23JiangxinInfo()
  2468. Activity23JiangxinInfoVip()
  2469. Activity24nianzhongInfo()
  2470. Activity24nianzhongTwoInfo()
  2471. GetActivityCptCode()
  2472. Activity24JYBInfoVip()
  2473. ActivityNoWorriesInfo()
  2474. isRaffleOpen()
  2475. isNewYear24Open()
  2476. ActivityRequiteInfo()
  2477. getActivityShowsInfo()
  2478. })
  2479. onUnmounted(() => {
  2480. if (interval.value) {
  2481. clearInterval(interval.value)
  2482. }
  2483. })
  2484. onShow(async (options) => {
  2485. showPage.value = false
  2486. await nextTick()
  2487. setTimeout(async () => {
  2488. showPage.value = true
  2489. await nextTick()
  2490. }, 100)
  2491. })
  2492. onPullDownRefresh(() => {
  2493. // 下拉刷新
  2494. searchFunc()
  2495. searchFunc1()
  2496. uni.stopPullDownRefresh()
  2497. })
  2498. onReachBottom(() => {
  2499. // 上拉加载更多
  2500. if (pagerInfo.current < pagerInfo.pageTotal) {
  2501. pagerInfo.current++
  2502. searchFunc()
  2503. }
  2504. })
  2505. // ==================== 导出 ====================
  2506. // 由于使用 <script setup>,所有顶层绑定都会自动暴露给模板
  2507. </script>
  2508. <style scoped lang="scss">
  2509. @import "@/uni.scss";
  2510. .card {
  2511. color: var(--cwg-gray-color);
  2512. }
  2513. // 弹窗样式优化
  2514. .dia-content {
  2515. .content {
  2516. padding: 0 !important;
  2517. }
  2518. .form-item {
  2519. display: flex;
  2520. flex-direction: column;
  2521. align-items: flex-start;
  2522. justify-content: flex-start;
  2523. margin-bottom: 20px;
  2524. gap: 16px;
  2525. .form-label {
  2526. width: 120px;
  2527. font-weight: 500;
  2528. color: var(--bs-heading-color);
  2529. font-size: px2rpx(16);
  2530. }
  2531. :deep(.cwg-combox) {
  2532. flex: 1;
  2533. width: 100%;
  2534. .el-input__wrapper {
  2535. border-radius: 4px;
  2536. }
  2537. &.disabled {
  2538. .el-input__wrapper {
  2539. background-color: #f5f5f5;
  2540. cursor: not-allowed;
  2541. }
  2542. }
  2543. }
  2544. }
  2545. }
  2546. .btn-outline-dark1 {
  2547. background-color: var(--btn-color) !important;
  2548. color: var(--bs-emphasis-color) !important;
  2549. }
  2550. .surplusActivityDialog {
  2551. height: 300px;
  2552. }
  2553. .dollar-activity-html {
  2554. word-break: break-word;
  2555. :deep(p) {
  2556. margin: 0 0 6px;
  2557. }
  2558. }
  2559. </style>