index.vue 111 KB

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