index.vue 110 KB

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