index.vue 109 KB

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