index.vue 102 KB

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