index.vue 97 KB

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