index.vue 99 KB

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