| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532 |
- <template>
- <cwg-page-wrapper class="create-page" :isHeaderFixed="true">
- <view class="container">
- <view
- class="app-page-head card-header d-flex gap-3 flex-wrap align-items-center justify-content-between border-0">
- <view class="app-page-head mb-0">
- <h1 class="app-page-title" v-t="'Home.page_customer.item6'"></h1>
- </view>
- </view>
- <view class="table-loading-mask">
- <uni-loading v-if="pictLoading" />
- </view>
- <view class="col-xxl-12 mb-4" v-if="!pictLoading">
- <view class="row">
- <!-- <view class="col-12 m-b30">
- <view class="card card-action action-elevate action-border-primary">
- <view class="row g-0">
- <view class="col-md-4">
- <view class="card-header border-0 p-0 m-2 position-relative overflow-hidden">
- <image src="/static/images/vu/promotion-1.jpg" alt=""
- class="img-fluid rounded" mode="widthFix" />
- <view
- class="position-absolute action-visible top-0 start-0 h-100 w-100 bg-dark bg-opacity-50 rounded d-flex align-items-center justify-content-center">
- <a href="#"
- class="btn btn-icon btn-lg btn-secondary rounded-circle waves-effect waves-light">
- →</a>
- </view>
- </view>
- </view>
- <view class="col-md-8 py-3 d-flex flex-column">
- <view class="card-body px-3 py-2"> <a href="#"
- class="badge badge-sm bg-secondary mb-1">28 Apr, 2026</a>
- <h4> <a href="#" class="text-dark">Monthly Trading Challenge</a> </h4>
- <view>Complete Trading Targets · Enjoy Multi-Tier Exclusive Gifts</view>
- <button type="submit" value="Submit"
- class="btn btn-danger mb-3 waves-effect waves-light">Join Now</button>
- <button type="submit" value="Submit"
- class="btn btn-outline-dark1 mb-3 waves-effect waves-light">Event
- Terms</button>
- <button type="submit" value="Submit"
- class="btn btn-outline-dark1 mb-3 waves-effect waves-light">Participation
- Method</button>
- <button type="submit" value="Submit"
- class="btn btn-outline-dark1 mb-3 waves-effect waves-light">Mission
- List</button>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="col-12 m-b30">
- <view class="card card-action action-elevate action-border-primary">
- <view class="row g-0">
- <view class="col-md-4">
- <view class="card-header border-0 p-0 m-2 position-relative overflow-hidden">
- <image src="/static/images/vu/promotion.png" alt="" class="img-fluid rounded" mode="widthFix" />
- <view
- class="position-absolute action-visible top-0 start-0 h-100 w-100 bg-dark bg-opacity-50 rounded d-flex align-items-center justify-content-center">
- <a href="#"
- class="btn btn-icon btn-lg btn-secondary rounded-circle waves-effect waves-light">
- →</a>
- </view>
- </view>
- </view>
- <view class="col-md-8 py-3 d-flex flex-column">
- <view class="card-body px-3 py-2"><a href="#"
- class="badge badge-sm bg-secondary mb-1">28 Apr, 2026</a>
- <h4> <a href="#" class="text-dark">CWG Monthly Premium Bonus</a> </h4>
- <view>Deposit now to receive generous bonuses of up to $5000! The more you
- deposit,
- the higher the reward, making every investment more valuable!</view>
- <button type="submit" value="Submit"
- class="btn btn-danger mb-3 waves-effect waves-light">Join Now</button>
- <button type="submit" value="Submit"
- class="btn btn-outline-dark1 mb-3 waves-effect waves-light">Event
- Terms</button>
- <button type="submit" value="Submit"
- class="btn btn-outline-dark1 mb-3 waves-effect waves-light">Participation
- Method</button>
- <button type="submit" value="Submit"
- class="btn btn-outline-dark1 mb-3 waves-effect waves-light">Mission
- List</button>
- </view>
- </view>
- </view>
- </view>
- </view> -->
- <!-- 月度活动 -->
- <view class="col-12 m-b30" v-if="country == 'CN'">
- <view class="card card-action action-elevate action-border-primary">
- <view class="row g-0">
- <view class="col-md-4">
- <view class="card-header border-0 p-0 m-2 position-relative overflow-hidden">
- <image src="/static/images/yue.jpg" alt="" class="img-fluid rounded"
- mode="widthFix" />
- <view
- class="position-absolute action-visible top-0 start-0 h-100 w-100 bg-dark bg-opacity-50 rounded d-flex align-items-center justify-content-center">
- <a @click="openSurplusActivityDialog1()"
- class="btn btn-icon btn-lg btn-secondary rounded-circle waves-effect waves-light">
- →</a>
- </view>
- </view>
- </view>
- <view class="col-md-8 py-3 d-flex flex-column">
- <view class="card-body px-3 py-2">
- <h4> <text class="text-dark crm-one-font"
- v-t="'MonthlyActivities.item1'"></text> </h4>
- <view class="crm-one-font"></view>
- <view class="d-flex flex-wrap gap-2">
- <view
- :class="['btn btn-dark waves-effect waves-light', monthlyGive ? 'btn-danger' : 'disabled']"
- @click="openSurplusActivityDialog1()">
- <text v-t="'news_add_field1.activities10_trading_aoyun.item3'"></text>
- </view>
- <cwg-link type="pdf" class="btn btn-outline-dark1 waves-effect waves-light"
- target="_blank" title="wallet.item15"
- :url="`pdf/pdf13/CWG Prime Bonus-cn.pdf`" />
- <cwg-link type="pdf" class="btn btn-outline-dark1 waves-effect waves-light"
- target="_blank" title="Transfer.item7"
- :url="`pdf/pdf13/CWG Markets Prime Bonus Application Process-cn.pdf`" />
- <view class="btn btn-outline-dark1 waves-effect waves-light"
- @click="goMonthlyTaskList()">
- <text v-t="'wallet.item14'"></text>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <!-- 赠金活动 -->
- <view class="col-12 m-b30">
- <view class="card card-action action-elevate action-border-primary">
- <view class="row g-0">
- <view class="col-md-4">
- <view class="card-header border-0 p-0 m-2 position-relative overflow-hidden">
- <image src="/static/images/su.png" alt="" class="img-fluid rounded"
- mode="widthFix" />
- <view
- class="position-absolute action-visible top-0 start-0 h-100 w-100 bg-dark bg-opacity-50 rounded d-flex align-items-center justify-content-center">
- <a @click="openSurplusActivityDialog()"
- class="btn btn-icon btn-lg btn-secondary rounded-circle waves-effect waves-light">
- →</a>
- </view>
- </view>
- </view>
- <view class="col-md-8 py-3 d-flex flex-column">
- <view class="card-body px-3 py-2">
- <h4> <text class="text-dark crm-one-font" v-t="'surplusList.item1'"></text>
- </h4>
- <p class="crm-one-font" v-t="'surplusList.item2'"></p>
- <view class="d-flex flex-wrap gap-2">
- <view
- :class="['btn btn-dark waves-effect waves-light', surplusGive ? 'btn-danger' : 'disabled']"
- @click="openSurplusActivityDialog()">
- <text v-t="'news_add_field1.activities10_trading_aoyun.item3'"></text>
- </view>
- <cwg-link type="pdf" class="btn btn-outline-dark1 waves-effect waves-light"
- target="_blank" title="wallet.item15"
- :url="`pdf/pdf12/CWG Prime Bonus-${locale}.pdf`" />
- <cwg-link type="pdf"
- v-if="locale == 'cn' || locale == 'zhHant' || locale == 'en'"
- class="btn btn-outline-dark1 waves-effect waves-light" target="_blank"
- title="Transfer.item7"
- :url="`pdf/pdf12/CWG Markets Prime Bonus Application Process-${locale}.pdf`" />
- <cwg-link type="pdf" v-else
- class="btn btn-outline-dark1 waves-effect waves-light" target="_blank"
- title="Transfer.item7"
- :url="`pdf/pdf12/CWG Markets Prime Bonus Application Process-en.pdf`" />
- <view class="btn btn-outline-dark1 waves-effect waves-light"
- @click="goSurplusTaskList()">
- <text v-t="'wallet.item14'"></text>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <!-- 交易大赛 -->
- <view class="col-12 m-b30" v-if="tableDataCptFlag">
- <view class="card card-action action-elevate action-border-primary">
- <view class="row g-0">
- <view class="col-md-4">
- <view class="card-header border-0 p-0 m-2 position-relative overflow-hidden">
- <image src="/static/images/banner.jpg" alt="" class="img-fluid rounded"
- mode="widthFix" />
- <view
- class="position-absolute action-visible top-0 start-0 h-100 w-100 bg-dark bg-opacity-50 rounded d-flex align-items-center justify-content-center">
- <a @click="toApplyCptOpen()"
- class="btn btn-icon btn-lg btn-secondary rounded-circle waves-effect waves-light">
- →</a>
- </view>
- </view>
- </view>
- <view class="col-md-8 py-3 d-flex flex-column">
- <view class="card-body px-3 py-2">
- <h4> <text class="text-dark crm-one-font"
- v-t="'news_add_field1.activitiesJYDS2025.item1'"></text> </h4>
- <p class="crm-one-font" v-t="'news_add_field1.activitiesJYDS2025.item2'">
- </p>
- <view class="d-flex flex-wrap gap-2">
- <view class="btn btn-danger waves-effect waves-light"
- v-if="tableDataCpt.signStatus == 0" @click="toApplyCptOpen()">
- <text v-t="'news_add_field1.activitiesJYDS.item3'"></text>
- </view>
- <view class="btn btn-dark waves-effect waves-light"
- v-if="tableDataCpt.signStatus == 1">
- <text v-t="'news_add_field1.activitiesJYDS.item3_1'"></text>
- </view>
- <view class="btn btn-outline-dark1 waves-effect waves-light"
- @click="toSingle('23xinjia')">
- <text v-t="'news_add_field1.activitiesJYDS.item4'"></text>
- </view>
- <view class="btn btn-outline-dark1 waves-effect waves-light"
- @click="toOpenSingle(tableDataCpt.pageAddress)">
- <text v-t="'news_add_field1.activitiesJYDS.item4_1'"></text>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <!-- 赠送活动列表2 -->
- <view class="col-12 m-b30" v-for="(item, index) in tableDataGive" :key="index + 'give'">
- <view class="card card-action action-elevate action-border-primary">
- <view class="row g-0">
- <view class="col-md-4" v-if="item.coverUrl">
- <view class="card-header border-0 p-0 m-2 position-relative overflow-hidden">
- <image :src="imgUrl + item.coverUrl" alt="" class="img-fluid rounded"
- mode="widthFix" />
- <view
- class="position-absolute action-visible top-0 start-0 h-100 w-100 bg-dark bg-opacity-50 rounded d-flex align-items-center justify-content-center">
- <a @click="toActivity24nianzhong()"
- class="btn btn-icon btn-lg btn-secondary rounded-circle waves-effect waves-light">
- →</a>
- </view>
- </view>
- </view>
- <view class="col-md-8 py-3 d-flex flex-column">
- <view class="card-body px-3 py-2">
- <h4> <text class="text-dark crm-one-font">{{ item.title }}</text> </h4>
- <p class="crm-one-font">{{ item.subTitle }}</p>
- <view class="d-flex flex-wrap gap-2">
- <view
- :class="['btn btn-dark waves-effect waves-light', item.valid == 1 ? 'btn-danger' : 'disabled']"
- @click="toActivity24nianzhong()">
- <text v-t="'Custom.Activity.Apply'"></text>
- </view>
- <view class="btn btn-outline-dark1 waves-effect waves-light"
- @click="toSingle('newList', item.id)">
- <text v-t="'Custom.Activity.Single'"></text>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <!-- 活动列表 -->
- <view class="col-12 m-b30" v-for="(item, index) in tableData" :key="index + 'tttt'">
- <view class="card card-action action-elevate action-border-primary">
- <view class="row g-0">
- <view class="col-md-4" v-if="item.coverUrl">
- <view class="card-header border-0 p-0 m-2 position-relative overflow-hidden">
- <image :src="imgUrl + item.coverUrl" alt="" class="img-fluid rounded"
- mode="widthFix" />
- <view
- class="position-absolute action-visible top-0 start-0 h-100 w-100 bg-dark bg-opacity-50 rounded d-flex align-items-center justify-content-center">
- <a @click="applications(item)"
- class="btn btn-icon btn-lg btn-secondary rounded-circle waves-effect waves-light">
- →</a>
- </view>
- </view>
- </view>
- <view class="col-md-8 py-3 d-flex flex-column">
- <view class="card-body px-3 py-2">
- <h4> <text class="text-dark crm-one-font">{{ item.title }}</text> </h4>
- <p class="crm-one-font">{{ item.subTitle }}</p>
- <view class="d-flex flex-wrap gap-2">
- <view
- :class="['btn btn-dark waves-effect waves-light', overdue(item.startTime, item.endTime) ? 'btn-danger' : 'disabled']"
- @click="applications(item)">
- <text v-t="'Custom.Activity.Apply'"></text>
- </view>
- <view type="submit" value="Submit"
- class="btn btn-outline-dark1 waves-effect waves-light"
- @click="checkActivity(item)">
- <text v-t="'Custom.Activity.List'"></text>
- </view>
- <view type="submit" value="Submit"
- class="btn btn-outline-dark1 waves-effect waves-light"
- @click="toSingle(item.id)">
- <text v-t="'Custom.Activity.Single'"></text>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <!--弹出框-->
- <cwg-popup v-model:visible="dialogChinaUnionPay" type="center" :mask-click="false" :show-footers="true">
- <view class="dia-content">
- <view class="des1" style="font-size: 16px; line-height: 1.6; margin: 30px 0 50px"
- v-html="t('news_add_field1.activities.item11')"></view>
- </view>
- <template #footer>
- <button type="primary" @click="toTransformActive">{{ t('Btn.Confirm') }}</button>
- <button @click="dialogChinaUnionPay = false">{{ t('Btn.Cancel') }}</button>
- </template>
- </cwg-popup>
- <!-- 23匠鑫活动过期弹出框 -->
- <cwg-popup v-model:visible="dialogChinaUnionPayJX" type="center" :mask-click="false" :show-footers="true">
- <view class="dia-content">
- <view class="des1" style="font-size: 16px; line-height: 1.6; margin: 30px 0 50px"
- v-html="t('news_add_field1.activitiesJX.item24')"></view>
- </view>
- <template #footer>
- <button type="primary" @click="dialogChinaUnionPayJX = false">{{ t('Btn.Confirm') }}</button>
- <button @click="dialogChinaUnionPayJX = false">{{ t('Btn.Cancel') }}</button>
- </template>
- </cwg-popup>
- <!--弹出框-->
- <cwg-popup v-model:visible="dialogChinaUnionPay1" type="center" :mask-click="false" :show-footers="true">
- <view class="dia-content">
- <view class="des1" style="font-size: 16px; line-height: 1.6; margin: 30px 0 50px"
- v-html="t('news_add_field1.activities.item12')"></view>
- </view>
- <template #footer>
- <button type="primary" @click="toRealizationActive">{{ t('Btn.Confirm') }}</button>
- <button @click="dialogChinaUnionPay1 = false">{{ t('Btn.Cancel') }}</button>
- </template>
- </cwg-popup>
- <!--23活动申请弹出-->
- <cwg-popup v-model:visible="dialogDealResult" type="center" :mask-click="false" :show-footers="true">
- <view class="dia-content">
- <view class="content" style="font-size: 14px; text-align: left">
- <form :rules="rules" :model="dialogDealResult_form" label-position="top">
- <view class="form-item">
- <view class="form-label">{{ t('Label.TradingAccount') }}</view>
- <picker mode="selector" :range="loginOptions" :range-key="'label'"
- @change="onDialogDealResultLoginChange">
- <view class="picker-input">
- {{ dialogDealResult_form.login || t('placeholder.choose') }}
- </view>
- </picker>
- </view>
- </form>
- </view>
- </view>
- <template #footer>
- <button type="primary" @click="toApply23">{{ t('Btn.Confirm') }}</button>
- <button @click="toApply23Cancel">{{ t('Btn.Cancel') }}</button>
- </template>
- </cwg-popup>
- <!--23匠鑫活动申请弹出-->
- <cwg-popup v-model:visible="dialogDealResultJx" type="center" :mask-click="false" :show-footers="true">
- <view class="dia-content">
- <view class="content" style="font-size: 14px; text-align: left">
- <form :rules="rules" :model="dialogDealResultJx_form" label-position="top">
- <view class="form-item">
- <view class="form-label">{{ t('Label.TradingAccount') }}</view>
- <picker mode="selector" :range="loginOptions" :range-key="'label'"
- @change="onDialogDealResultJxLoginChange">
- <view class="picker-input">
- {{ dialogDealResultJx_form.login || t('placeholder.choose') }}
- </view>
- </picker>
- </view>
- </form>
- </view>
- </view>
- <template #footer>
- <button type="primary" @click="toApply23Jx">{{ t('Btn.Confirm') }}</button>
- <button @click="toApply23JxCancel">{{ t('Btn.Cancel') }}</button>
- </template>
- </cwg-popup>
- <!--23匠鑫活动申请弹出-->
- <cwg-popup v-model:visible="dialogDealResultJxVip" type="center" :mask-click="false" :show-footers="true">
- <view class="dia-content">
- <view class="content" style="font-size: 14px; text-align: left">
- <form :rules="rules" :model="dialogDealResultJx_formVip" label-position="top">
- <view class="form-item">
- <view class="form-label">{{ t('Label.TradingAccount') }}</view>
- <picker mode="selector" :range="loginOptions" :range-key="'label'"
- @change="onDialogDealResultJxVipLoginChange">
- <view class="picker-input">
- {{ dialogDealResultJx_formVip.login || t('placeholder.choose') }}
- </view>
- </picker>
- </view>
- </form>
- </view>
- </view>
- <template #footer>
- <button type="primary" @click="toApply23JxVip">{{ t('Btn.Confirm') }}</button>
- <button @click="toApply23JxCancelVip">{{ t('Btn.Cancel') }}</button>
- </template>
- </cwg-popup>
- <!--交易大赛活动申请弹出-->
- <cwg-popup v-model:visible="dialogDealResultCpt" type="center" :mask-click="false" :show-footers="true">
- <view class="dia-content">
- <view class="content" style="font-size: 14px; text-align: left">
- <form :rules="rules" :model="dialogDealResultCpt_form" label-position="top">
- <view class="form-item">
- <view class="form-label">{{ t('Label.TradingAccount') }}</view>
- <picker mode="selector" :range="loginOptions" :range-key="'label'"
- @change="onDialogDealResultCptLoginChange">
- <view class="picker-input">
- {{ dialogDealResultCpt_form.login || t('placeholder.choose') }}
- </view>
- </picker>
- </view>
- <view class="form-item">
- <view class="form-label">{{ t('Documentary.console.item20') }}</view>
- <input class="form-input" v-model="dialogDealResultCpt_form.nickname" type="text" />
- </view>
- <view class="form-item">
- <view class="form-label">{{ t('news_add_field1.activitiesJYDS.item4_3') }}</view>
- <input class="form-input" v-model="dialogDealResultCpt_form.recipient" type="text" />
- </view>
- <view class="form-item">
- <view class="form-label">{{ t('news_add_field1.activitiesJYDS.item4_2') }}</view>
- <input class="form-input" v-model="dialogDealResultCpt_form.mobile" type="text" />
- </view>
- <view class="form-item">
- <view class="form-label">{{ t('Shop.Address.DetailedAddress') }}</view>
- <input class="form-input" v-model="dialogDealResultCpt_form.address" type="text" />
- </view>
- <view v-html="t('news_add_field1.activitiesJYDS.item4_4')"></view>
- </form>
- </view>
- </view>
- <template #footer>
- <button type="primary" @click="toApplyCpt">{{ t('Btn.Confirm') }}</button>
- <button @click="toApplyCptCancel">{{ t('Btn.Cancel') }}</button>
- </template>
- </cwg-popup>
- <!--任务提示弹出框-->
- <cwg-popup v-model:visible="dialogNewTask" :title="t('wallet.item16')" type="center" :mask-click="false"
- :show-footers="true">
- <view class="dia-content">
- <view class="des1" style="font-size: 14px; line-height: 1.6; margin: 30px 0 50px">
- <text v-html="t('wallet.item17')"></text>{{ newTaskList.endTime }}
- <text v-html="t('wallet.item18')"></text>{{ newTaskList.tradeVolume }}
- <text v-html="t('wallet.item19')"></text>{{ newTaskList.raffleNumber }}
- <text v-html="t('wallet.item20')"></text>
- </view>
- </view>
- <template #footer>
- <button type="primary" @click="dialogNewTask = false">{{ t('Btn.Confirm') }}</button>
- <button @click="dialogNewTask = false">{{ t('Home.msg.item3') }}</button>
- </template>
- </cwg-popup>
- <!--抽奖弹出框-->
- <cwg-popup v-model:visible="dialogNewTaskDraw" :title="t('wallet.item65')" type="center" :mask-click="false"
- :show-footers="true" width="800px">
- <view class="dia-content">
- <DrawLotteryRaffle :curLuckyDrawTimesF="LuckyDrawsNumber"></DrawLotteryRaffle>
- </view>
- <template #footer>
- <button @click="closedialogNewTaskDraw">{{ t('Home.msg.item3') }}</button>
- </template>
- </cwg-popup>
- <!--24精英杯活动申请弹出-->
- <cwg-popup v-model:visible="dialogDealResultJxJYB" type="center" :mask-click="false" :show-footers="true">
- <view class="dia-content">
- <view class="content" style="font-size: 14px; text-align: left">
- <form :rules="rules" :model="dialogDealResultJx_formJYB" label-position="top">
- <view class="form-item">
- <view class="form-label">{{ t('Label.TradingAccount') }}</view>
- <picker mode="selector" :range="loginOptions" :range-key="'label'"
- @change="onDialogDealResultJxJYBLoginChange">
- <view class="picker-input">
- {{ dialogDealResultJx_formJYB.login || t('placeholder.choose') }}
- </view>
- </picker>
- </view>
- </form>
- </view>
- </view>
- <template #footer>
- <button type="primary" @click="toApply24JYBVip">{{ t('Btn.Confirm') }}</button>
- <button @click="toApply24JYBCancelVip">{{ t('Btn.Cancel') }}</button>
- </template>
- </cwg-popup>
- <!--24无忧交易申请弹出-->
- <cwg-popup v-model:visible="dialogDealResultNoWorries" type="center" :mask-click="false" :show-footers="true">
- <view class="dia-content">
- <view class="content" style="font-size: 14px; text-align: left">
- <form :rules="rules" :model="dialogDeal_formNoWorries" label-position="top">
- <view class="form-item">
- <view class="form-label">{{ t('Label.TradingAccount') }}</view>
- <picker mode="selector" :range="loginOptions" :range-key="'label'"
- @change="onDialogDeal_formNoWorriesLoginChange">
- <view class="picker-input">
- {{ dialogDeal_formNoWorries.login || t('placeholder.choose') }}
- </view>
- </picker>
- </view>
- </form>
- </view>
- </view>
- <template #footer>
- <button type="primary" @click="toApplyNoWorries">{{
- t('news_add_field1.activitiesNoWorries.item6_1') }}</button>
- <button @click="toApplyNoWorriesCancel">{{ t('news_add_field1.activitiesNoWorries.item6_2')
- }}</button>
- </template>
- </cwg-popup>
- <!--盈利转换弹出框-->
- <cwg-popup v-model:visible="dialogNoWorries" type="center" :mask-click="false" :show-footers="true">
- <view class="dia-content">
- <view class="des1" style="font-size: 16px; line-height: 1.6; margin: 30px 0 50px"
- v-html="t('news_add_field1.activitiesNoWorries.item7')"></view>
- </view>
- <template #footer>
- <button type="primary" @click="realizationNoWorries">{{
- t('news_add_field1.activitiesNoWorries.item6_1') }}</button>
- <button @click="dialogNoWorries = false">{{ t('news_add_field1.activitiesNoWorries.item6_2')
- }}</button>
- </template>
- </cwg-popup>
- <!--申请成功弹出框-->
- <cwg-popup v-model:visible="dialogNoWorriesApply" type="center" :mask-click="false" :show-footers="true">
- <view class="dia-content">
- <view class="des1" style="font-size: 16px; line-height: 1.6; margin: 30px 0 50px"
- v-html="t('news_add_field1.activitiesNoWorries.item6')"></view>
- </view>
- <template #footer>
- <button type="primary" @click="dialogNoWorriesApply = false">{{
- t('news_add_field1.activitiesNoWorries.item6_1') }}</button>
- <button @click="dialogNoWorriesApply = false">{{ t('news_add_field1.activitiesNoWorries.item6_2')
- }}</button>
- </template>
- </cwg-popup>
- <!--收益模拟器弹出框-->
- <cwg-popup v-model:visible="openCalculatorFlag" :title="t('news_add_field1.NewYear24.item4')" type="center"
- :mask-click="false" :show-footers="true">
- <view class="dia-content NewYear_calculator">
- <view class="content">
- <view class="calculator-input">
- <view class="input-prefix">{{ t('news_add_field1.NewYear24.item5') }}</view>
- <input class="input-field" v-model="NewYear24DataBalance" type="digit" />
- </view>
- <view class="tip">
- <text v-html="t('news_add_field1.NewYear24.item6')"></text>
- <text class="red">${{ NewYear24Data.balance }}</text>
- <text v-html="t('news_add_field1.NewYear24.item7')"></text>
- <text class="red">${{ NewYear24Data.income }}</text>
- <text v-html="t('news_add_field1.NewYear24.item8')"></text>
- </view>
- </view>
- </view>
- <template #footer>
- <button type="primary" @click="calculateIncome">{{ t('news_add_field1.NewYear24.item8_1')
- }}</button>
- <button @click="openCalculatorFlag = false">{{ t('news_add_field1.NewYear24.item8_2') }}</button>
- </template>
- </cwg-popup>
- <!-- 现在有的活动 -->
- <!-- 11111111动态活动申请 -->
- <cwg-popup v-model:visible="dialogInfoTradingAdd" :title="t('surplusList.item1')" type="center"
- :mask-click="false" :show-footers="true" width="600px">
- <view class="dia-content surplusActivityDialog">
- <view class="content" style="padding: 20px">
- <view class="form-item">
- <view class="form-label">{{ t('Drawer.Label.ActivityName') }}:</view>
- <uni-easyinput :disabled="true" v-model="information.title"
- :placeholder="t('placeholder.choose')" type="text" />
- </view>
- <view class="form-item">
- <view class="form-label">{{
- t('Drawer.Label.ActivityLogin') }}:</view>
- <cwg-combox :clearable="false" v-model:value="information.login" :options="loginOptions"
- :placeholder="t('placeholder.choose')" />
- </view>
- <view class="form-item">
- <view class="form-label">{{
- t('Label.Note') }}:</view>
- <uni-easyinput v-model="information.participationNote" :placeholder="t('placeholder.choose')"
- type="textarea" autoHeight />
- </view>
- <view class="form-item">
- <checkbox-group :value="information.agree ? ['1'] : []" @change="onAgreeChange">
- <label class="checkbox">
- <checkbox value="1" :checked="information.agree" />
- <view class="crm-cursor" style="display: inline-block; margin-left: 10px;">
- <text>
- <text v-if="!isZh.value" v-t="'Drawer.msg.activityAgree1'"></text>
- <text v-if="locale == 'en'" v-t="'Drawer.msg.activityAgree1'"></text>
- <text v-if="locale == 'en'" v-t="'Drawer.msg.activityAgree2'"></text>
- <text v-t="'Drawer.msg.activityTerms'" @click.stop="toSingle(information.id)"
- style="font-weight: bold; text-decoration: underline;"
- class="crm-cursor"></text>
- <text v-if="!isZh.value" v-t="'Drawer.msg.activityAgree2'"></text>
- </text>
- </view>
- </label>
- </checkbox-group>
- </view>
- </view>
- </view>
- <template #footer>
- <button @click="closeAdd">{{ t('Btn.Cancel') }}</button>
- <button type="primary" @click="activityApply" :disabled="!information.login || !information.agree">
- {{ t('Btn.Confirm') }}
- </button>
- </template>
- </cwg-popup>
- <!-- 11111111动态活动账户操作 -->
- <cwg-popup v-model:visible="dialogInfoTradingAdd1" :title="t('surplusList.item1')" type="center"
- :mask-click="false" :show-footers="true" width="600px">
- <view class="dia-content surplusActivityDialog">
- <view class="content" style="padding: 20px">
- <view class="form-item">
- <view class="form-label">{{ t('Drawer.Label.ActivityName') }}:</view>
- <uni-easyinput :disabled="true" v-model="information.title"
- :placeholder="t('placeholder.choose')" type="text" />
- </view>
- <view class="form-item">
- <view class="form-label">{{
- t('Drawer.Label.ActivityList') }}:</view>
- </view>
- <cwg-tabel ref="tableRef" :columns="columns" :mobilePrimaryFields="mobilePrimaryFields"
- :queryParams="search1" :api="getApplyListApi">
- <template #status="{ row }">
- <text v-if="row.status == 1" v-t="'State.ToBeProcessed'"></text>
- <text v-if="row.status == 2 && row.completeStatus == 0" v-t="'State.Ongoing'"></text>
- <text v-if="row.status == 2 && row.completeStatus == 1"
- v-t="'State.InTheProcessing'"></text>
- <text v-if="row.status == 2 && row.completeStatus == 2" v-t="'State.Completed'"></text>
- <text style="display: block" v-if="row.status == 3">
- <text style="display: block" v-t="'State.Refused'"></text>
- <text style="display: block">(<text v-t="'State.Participate'"></text>)</text>
- </text>
- <text style="display: block" v-if="row.completeStatus == 3">
- <text style="display: block" v-t="'State.Refused'"></text>
- <text style="display: block">(<text v-t="'State.Complete'"></text>)</text>
- </text>
- </template>
- <template #action="{ row }">
- <text class="crm-cursor status-tag status-completed" v-if="
- row.status == 2 && row.completeStatus == 0
- " v-t="'State.Complete'" @click="handleCommand(row)">{{ row.participationNote }}</text>
- <text v-else>{{ row.participationNote }}</text>
- </template>
- </cwg-tabel>
- </view>
- </view>
- <template #footer>
- <button @click="closeAdd">{{ t('Btn.Cancel') }}</button>
- <button type="primary" @click="activityApply" :disabled="!information.login">
- {{ t('Btn.Confirm') }}
- </button>
- </template>
- </cwg-popup>
- <!-- 11111111Surplus活动弹框 -->
- <cwg-popup v-model:visible="dialogSurplusActivity" :title="t('surplusList.item1')" type="center"
- :mask-click="false" :show-footers="true" width="600px">
- <view class="dia-content surplusActivityDialog">
- <view class="content" style="padding: 20px">
- <view class="form-item">
- <view class="form-label">{{
- t('Custom.Deposit.Title1') }}:</view>
- <cwg-combox :clearable="false" v-model:value="valueInfo" :options="loginComboxOptions"
- :placeholder="t('placeholder.choose')" @change="handleValueInfoChange" />
- </view>
- <view class="form-item">
- <view class="form-label">{{
- t('surplusList.item3') }}:</view>
- <cwg-combox :class="{ disabled: surplusActivityLoading }" :clearable="false"
- v-model:value="selectedSurplusActivity" :options="surplusActivityOptions"
- :placeholder="t('placeholder.choose')" />
- </view>
- </view>
- </view>
- <template #footer>
- <button @click="closeSurplusActivityDialog">{{ t('Btn.Cancel') }}</button>
- <button type="primary" @click="confirmSurplusActivity"
- :disabled="!selectedSurplusActivity || !valueInfo">
- {{ t('Btn.Confirm') }}
- </button>
- </template>
- </cwg-popup>
- <!-- 111111月赏礼遇活动弹框 -->
- <cwg-popup v-model:visible="dialogSurplusActivity1" :title="t('MonthlyActivities.item1')" type="center"
- :mask-click="false" :show-footers="true" width="600px">
- <view class="dia-content">
- <view class="content" style="padding: 20px; font-size: 16px">
- <strong v-t="'MonthlyActivities.item8'"></strong>
- </view>
- </view>
- <template #footer>
- <button @click="closeSurplusActivityDialog1">{{ t('Btn.Cancel') }}</button>
- <button type="primary" @click="confirmSurplusActivity1">{{ t('Btn.Confirm') }}</button>
- </template>
- </cwg-popup>
- <cwg-confirm-popup v-if="showPage" />
- </cwg-page-wrapper>
- </template>
- <script setup lang="ts">
- import { ref, reactive, computed, onMounted, onUnmounted, watch, nextTick } from 'vue'
- import { onShow, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
- import { useI18n } from 'vue-i18n'
- import ActivityCard from './components/ActivityCard.vue'
- import ActivityDialogs from './components/ActivityDialogs.vue'
- import { activityApi } from "@/service/activity"
- import { customApi } from "@/service/custom"
- import Config from '@/config/index'
- import useUserStore from "@/stores/use-user-store";
- const userStore = useUserStore();
- import { isAfterJuly28 } from "@/utils/dateUtils"
- import { useConfirm } from '@/hooks/useConfirm'
- const confirm = useConfirm()
- const { t, locale } = useI18n()
- let { Code, Host05 } = Config
- const showPage = ref(false)
- // 国家列表
- const countries = [
- "DZ", "AO", "BJ", "BW", "BF", "CM", "CG", "CD", "CI", "DJ", "EG", "ET",
- "GA", "GM", "GH", "GN", "KE", "MG", "MW", "ML", "MR", "MA", "MZ", "NA",
- "NE", "NG", "RW", "SN", "SL", "SO", "ZA", "SS", "SD", "TZ", "TG", "TN",
- "UG", "ZM", "ZW", "LS", "BH", "IR", "IQ", "IL", "JO", "KW", "LB", "OM",
- "PS", "QA", "SA", "SY", "TR", "AE", "YE", "AR", "BO", "BR", "CL", "CO",
- "EC", "GY", "PY", "PE", "SR", "UY", "VE", "BZ", "CR", "SV", "GT", "HN",
- "NI", "PA", "AU", "CA", "AL", "AD", "AM", "AT", "AZ", "BY", "BE", "BA",
- "BG", "HR", "CY", "CZ", "DK", "EE", "FI", "FR", "GE", "DE", "GR", "HU",
- "IS", "IE", "IT", "XK", "LV", "LI", "LT", "LU", "MT", "MD", "MC", "ME",
- "NL", "MK", "NO", "PL", "PT", "RO", "RU", "SM", "RS", "SK", "SI", "ES",
- "SE", "CH", "UA", "VA",
- ]
- // ==================== 响应式数据 ====================
- const monthlyGive = ref(false) // 是否可以参加CWG Markets 月赏礼遇活动
- const selectedAccount = ref<any>(null)
- const valueInfo = ref<any>(null)
- const loginOptions1 = ref<any[]>([])
- const standard = ref(true)
- const limitedStatus = ref<any>(null)
- const flag = ref(false)
- const pictLoading = ref(false)
- const openType = ref("")
- const dialogInfoTradingAdd = ref(false) //新增
- const dialogInfoTradingAdd1 = ref(false) //新增
- const imgUrl = ref(Host05)
- const show = ref(false)
- const dialogTableVisible = ref(false)
- const formInfo = ref({}) //传给弹窗的值
- const information = reactive({
- id: "",
- title: "",
- login: "",
- participationNote: "",
- })
- const hot = ref("")
- const singleData = ref({})
- const anshiClose = ref(true)
- const tableData1 = ref<any>({}) //20赠金活动
- const interval = ref<any>(null) //倒计时方法
- const isCountDown = ref("") //倒计时
- const isCashBack = ref(false) //返现按钮
- const tableData2 = ref<any>(true) //2023迎新活动
- const tableData2Flag = ref(false) //2023迎新活动
- const isTransform = ref<any>(null) //转换按钮
- const isRealization = ref<any>(null) //变现按钮
- const dialogChinaUnionPay = ref(false)
- const dialogChinaUnionPay1 = ref(false)
- const loginOptions = ref<any[]>([])
- const dialogDealResult = ref(false)
- const dialogDealResult_form = reactive({ login: "" })
- const tableData3Flag = ref(false) //匠鑫学院cwg活动
- const tableData3 = ref<any>(true) //匠鑫学院cwg活动
- const isRealizationJx = ref<any>(null) //变现按钮
- const dialogDealResultJx = ref(false)
- const dialogDealResultJx_form = reactive({ login: "" })
- const dialogChinaUnionPayJX = ref(false)
- const tableData3FlagVip = ref(false) //匠鑫学院cwg活动
- const tableData3Vip = ref<any>(true) //匠鑫学院cwg活动
- const isRealizationJxVip = ref<any>(null) //变现按钮
- const dialogDealResultJxVip = ref(false)
- const dialogDealResultJx_formVip = reactive({ login: "" })
- const dialogChinaUnionPayJXVip = ref(false)
- const tableData3FlagJYB = ref(false) //24精英杯cwg活动
- const tableData3JYB = ref<any>(true) //24精英杯cwg活动
- const isRealizationJxJYB = ref<any>(null) //变现按钮
- const dialogDealResultJxJYB = ref(false)
- const dialogDealResultJx_formJYB = reactive({ login: "" })
- const dialogChinaUnionPayJXJYB = ref(false)
- const tableData4Flag = ref(false) //年中赠金活动
- const tableData4 = ref<any>(true) //年中赠金活动
- const tableData4TwoFlag = ref(false) //年中赠金活动-20
- const tableData4Two = ref<any>(true) //年中赠金活动-20
- const tableDataCptFlag = ref(false) //交易大赛活动
- const tableDataCpt = ref<any>(true) //交易大赛活动
- const dialogDealResultCpt = ref(false)
- const dialogDealResultCpt_form = reactive({
- login: "",
- address: "",
- cptId: "",
- mobile: "",
- nickname: "",
- recipient: "",
- })
- const dialogChinaUnionPayCpt = ref(false)
- const tableDataCptFlagCode = ref("")
- const isZh = computed(() => ['cn', 'zh', 'zhHant'].includes(locale.value))
- //CWG 现金嘉年华-抽奖
- const newTask = ref(false) //新任务
- const newTaskList = ref({ endTime: "", tradeVolume: "", raffleNumber: "" }) //新任务列表
- const dialogNewTask = ref(false) //新任务弹窗
- const dialogNewTaskDraw = ref(false) //打开抽奖弹窗
- const LuckyDrawsNumber = ref("0") //抽奖次数
- const choujiaClose = ref(false)
- const tableDataNoWorriesFlag = ref(false) //24无忧交易
- const tableDataNoWorries = ref<any>(false) //24无忧交易
- const isRealizationNoWorries = ref<any>(null) //变现按钮
- const dialogDealResultNoWorries = ref(false)
- const dialogDeal_formNoWorries = reactive({ login: "" })
- const dialogNoWorries = ref(false)
- const dialogNoWorriesApply = ref(false)
- const tableDataNewYear24Flag = ref(false) //24新年庆典
- const tableDataNewYear24 = ref<any>(false) //24新年庆典
- const openCalculatorFlag = ref(false)
- const NewYear24DataBalance = ref("")
- const NewYear24Data = reactive({
- balance: 0,
- income: 0,
- })
- const dialogSurplusActivity1 = ref(false) // CWG Markets 月赏礼遇活动弹框
- const surplusActivityOptions1 = ref<any[]>([]) // CWG Markets 月赏礼遇活动下拉框选项
- const selectedSurplusActivity1 = ref<any>(null) // 选中的CWG Markets 月赏礼遇活动
- const surplusActivityLoading1 = ref(false) // 加载状态
- const surplusGive1 = ref(false) // 是否可以参加CWG Markets 月赏礼遇活动
- // Surplus活动相关
- const dialogSurplusActivity = ref(false) // surplus活动弹框
- const surplusActivityOptions = ref<any[]>([]) // surplus活动下拉框选项
- const selectedSurplusActivity = ref<any>(null) // 选中的surplus活动
- const surplusActivityLoading = ref(false) // 加载状态
- const surplusGive = ref(false) // 是否可以参加surplus活动
- const activityShowsInfo = ref<any>(null) // 活动显示信息
- const tableData = ref<any[]>([])
- const search = reactive({
- date: [] as any[],
- startDate: "",
- endDate: "",
- type: 1,
- })
- //分页
- const pagerInfo = reactive({ row: 10, current: 1, pageTotal: 0, rowTotal: 0 })
- const tableDataGive = ref<any[]>([])
- // 验证规则
- const rules = reactive({
- login: [
- {
- required: true,
- message: t("vaildate.select.empty"),
- trigger: "change",
- },
- ],
- address: [
- {
- required: true,
- message: t("vaildate.input.empty"),
- trigger: "blur",
- },
- ],
- mobile: [
- {
- required: true,
- message: t("vaildate.input.empty"),
- trigger: "blur",
- },
- ],
- nickname: [
- {
- required: true,
- message: t("vaildate.input.empty"),
- trigger: "blur",
- },
- ],
- recipient: [
- {
- required: true,
- message: t("vaildate.input.empty"),
- trigger: "blur",
- },
- ],
- })
- // ==================== 计算属性 ====================
- const country = computed(() => {
- return userStore?.userInfo?.customInfo?.country
- })
- const myCid = computed(() => {
- return userStore?.userInfo?.customInfo?.cId
- })
- const isSupportedCountry = computed(() => {
- try {
- const country = userStore?.userInfo?.customInfo?.country
- return countries.includes(country)
- } catch {
- return false
- }
- })
- const isGuoQin = computed(() => {
- let flag = false
- let startTime1 = "2024/10/01 00:00:00"
- let endTime1 = "2024/10/07 23:59:59"
- let timezone = 8
- let offset_GMT = new Date().getTimezoneOffset()
- let nowDate = new Date().getTime()
- let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
- let end = new Date(endTime1).getTime()
- let start = new Date(startTime1).getTime()
- if (now > start && now < end) {
- flag = true
- }
- return flag
- })
- const showMonthlyActivity2026 = computed(() => {
- let targetTime = "2026/01/01 00:00:00"
- let timezone = 8
- let offset_GMT = new Date().getTimezoneOffset()
- let nowDate = new Date().getTime()
- let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
- let target = new Date(targetTime).getTime()
- return now >= target
- })
- // ==================== 工具方法 ====================
- //时间补0
- const getzero = (time: number | string) => {
- return time > "9" ? time : "0" + time
- }
- //时间格式转换
- const timeConvert = (val: string) => {
- if (val) {
- var datetime = new Date(val.replace(/-/g, "/"))
- var year = datetime.getFullYear()
- var month = datetime.getMonth() + 1
- var date = datetime.getDate()
- if (month < 10) {
- month = "0" + month
- }
- if (date < 10) {
- date = "0" + date
- }
- var time = year + "年" + month + "月" + date + "日"
- return time
- }
- return ""
- }
- //判断匠鑫活动是否报名结束
- const timeExpireJx = (endTime: string) => {
- let endTime1 = endTime.replace(/-/g, "/").split(" ")[0]
- let timezone = 2
- let offset_GMT = new Date().getTimezoneOffset()
- let nowDate = new Date().getTime()
- let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
- let end = new Date(endTime1).getTime()
- return now < end
- }
- //判断活动是否结束
- const overdue = (startTime: string, endTime: string) => {
- let startTime1 = startTime.replace(/-/g, "/").split(" ")[0]
- let endTime1 = endTime.replace(/-/g, "/").split(" ")[0]
- let timezone = 2
- let offset_GMT = new Date().getTimezoneOffset()
- let nowDate = new Date().getTime()
- let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
- let start = new Date(startTime1).getTime()
- let end = new Date(endTime1).getTime()
- return start < now && now < end
- }
- const isAfterJuly21 = () => {
- const currentDate = new Date()
- const july21 = new Date(currentDate.getFullYear(), 6, 21)
- return currentDate >= july21
- }
- // 判断是否在9月30日晚上12点之后,用于隐藏特定活动
- const isAfterSeptember30 = () => {
- return true
- }
- const standardTime = () => {
- standard.value = false
- }
- const groupCurrency = (type: string) => {
- if (type == "GBP") {
- return ": £"
- } else if (type == "USD") {
- return ": $"
- } else if (type == "EUR") {
- return ": €"
- } else if (type == "USC") {
- return ": ¢"
- } else {
- return ": $"
- }
- }
- const groupCurrency1 = (type: string) => {
- if (type == "GBP") {
- return "£"
- } else if (type == "USD") {
- return "$"
- } else if (type == "EUR") {
- return "€"
- } else if (type == "USC") {
- return "¢"
- } else {
- return "$"
- }
- }
- const groupTypeName = (type: string) => {
- if (type == "1") {
- return t("AccountType.ClassicAccount")
- } else if (type == "2") {
- return t("AccountType.SeniorAccount")
- } else if (type == "3") {
- return isAfterJuly28() ? "--" : t("AccountType.AgencyAccount")
- } else if (type == "5") {
- return t("AccountType.SpeedAccount")
- } else if (type == "6") {
- return t("AccountType.SpeedAccount")
- } else if (type == "7") {
- return t("AccountType.StandardAccount")
- } else if (type == "8") {
- return t("AccountType.CentAccount")
- }
- return ""
- }
- // ==================== API 请求方法 ====================
- const loginComboxOptions = computed(() => {
- return loginOptions1.value.map((item) => ({
- text: item.label,
- value: item.login
- }))
- })
- //获取账户信息
- const getDateList = async () => {
- let res = await customApi.DropdownlusActivityOptions({ platform: "" })
- if (res.code == Code.StatusOK) {
- // loginOptions1.value = res.data
- loginOptions1.value = res.data.map(item => ({
- ...item,
- label: `${item.login} - ${groupTypeName(item.type)} - ${t('Custom.Deposit.AvailableBalance')}${groupCurrency(item.currency)}${item.balance}`
- }))
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- //获取list
- const searchFunc = async () => {
- if (flag.value) {
- return
- } else {
- flag.value = true
- }
- pictLoading.value = true
- let res = await activityApi.ActivityExtensionIist({
- hot: hot.value,
- tag: 1,
- lang: ["cn", "zhHant"].indexOf(locale.value) !== -1 ? "cn" : "en",
- page: {
- current: pagerInfo.current,
- row: pagerInfo.row,
- },
- })
- if (res.code == Code.StatusOK) {
- tableData.value = res.data
- pagerInfo.rowTotal = res.page.rowTotal
- pagerInfo.pageTotal = res.page.pageTotal
- flag.value = false
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- flag.value = false
- }
- pictLoading.value = false
- }
- //获取list-赠金活动列表
- const searchFunc1 = async () => {
- pictLoading.value = true
- let res = await activityApi.ActivityExtensionGiveList({
- page: {
- current: pagerInfo.current,
- row: pagerInfo.row,
- },
- })
- if (res.code == Code.StatusOK) {
- tableDataGive.value = res.data
- pagerInfo.rowTotal = res.page.rowTotal
- pagerInfo.pageTotal = res.page.pageTotal
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- pictLoading.value = false
- }
- //详情
- const getSingle = async (id: string) => {
- let res = await activityApi.ActivitySingle({
- id: id,
- })
- if (res.code == Code.StatusOK) {
- singleData.value = res.data
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- //获取客户申请活动列表
- const Api = async () => {
- let res = await activityApi.ActivityApplyList({
- page: {
- current: pagerInfo.current,
- row: pagerInfo.row,
- },
- })
- if (res.code == Code.StatusOK) {
- pagerInfo.rowTotal = res.page.rowTotal
- pagerInfo.pageTotal = res.page.pageTotal
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- //20赠金活动数据
- const getActivityPercentageGiveInfo = async () => {
- let res = await activityApi.ActivityPercentageGiveInfo({})
- if (res.code == Code.StatusOK) {
- tableData1.value = res.data
- if (typeof tableData1.value == "object") {
- let timezone = 2
- let offset_GMT = new Date().getTimezoneOffset()
- let nowDate = new Date().getTime()
- let nowTime = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
- let startTime = new Date(tableData1.value.activityStartTime.replace(/-/g, "/")).getTime()
- if (nowTime < startTime) {
- interval.value = setInterval(() => {
- let timezone = 2
- let offset_GMT = new Date().getTimezoneOffset()
- let nowDate = new Date().getTime()
- let nowTime = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
- let sec = 1000,
- min = 60 * sec,
- hour = min * 60,
- day = 24 * hour
- let time = startTime - nowTime
- let DAY = getzero(Math.floor(time / day))
- let HOUR = getzero(Math.floor((time % day) / hour))
- let MIN = getzero(Math.floor((time % hour) / min))
- let SEC = getzero(Math.floor((time % min) / sec))
- isCountDown.value = `${DAY}${t("Label.Day")}${HOUR}:${MIN}:${SEC}`
- if (nowTime >= startTime) {
- clearInterval(interval.value)
- getActivityPercentageGiveInfo()
- }
- }, 1000)
- } else if (nowTime > startTime && tableData1.value.status == 0) {
- isCashBack.value = true
- }
- }
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- //返现
- const cashBack = async () => {
- let res = await activityApi.ActivityPercentageGiveApply({})
- if (res.code == Code.StatusOK) {
- uni.showToast({ title: t("Msg.Application"), icon: "success" })
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- //20赠金活动申请
- const toDeposit = () => {
- uni.navigateTo({ url: "/pages/customer/deposit/index" })
- }
- //2023迎新活动数据
- const Activity23HundredInfo = async () => {
- let res = await activityApi.Activity23HundredInfo({})
- if (res.code == Code.StatusOK) {
- tableData2.value = res.data
- if (typeof tableData2.value == "object") {
- tableData2Flag.value = true
- let timezone = 2
- let offset_GMT = new Date().getTimezoneOffset()
- let nowDate = new Date().getTime()
- let nowTime = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
- let startTime = new Date(tableData2.value.activityStartTime.replace(/-/g, "/")).getTime()
- let endTime = new Date(tableData2.value.activityEndTime.replace(/-/g, "/")).getTime()
- if (nowTime < endTime && nowTime > startTime) {
- if (tableData2.value.status == 2 && tableData2.value.activityStatus == 0) {
- isTransform.value = 1
- } else if (
- tableData2.value.status == 2 &&
- (tableData2.value.activityStatus == 1 ||
- (tableData2.value.balanceStatus != 2 && tableData2.value.creditStatus != 2))
- ) {
- isTransform.value = 2
- } else if (tableData2.value.status == 2 && tableData2.value.activityStatus == 3) {
- isTransform.value = 2
- }
- } else {
- isTransform.value = 2
- }
- if (tableData2.value.status == 2 && tableData2.value.activityStatus == 2) {
- isTransform.value = null
- if (tableData2.value.realizationStatus == 0) {
- isRealization.value = 1
- } else if (
- tableData2.value.realizationStatus == 1 ||
- (tableData2.value.realizationCreditStatus != 2 && tableData2.value.realizationBalanceStatus != 2)
- ) {
- isRealization.value = 2
- } else if (tableData2.value.realizationStatus == 3) {
- isRealization.value = 2
- }
- } else {
- isRealization.value = null
- }
- } else {
- if (tableData2.value) {
- tableData2Flag.value = true
- }
- }
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- tableData2.value = true
- }
- }
- //获取交易账户的下拉列表
- const toApply23Open = async () => {
- pictLoading.value = true
- let res = await activityApi.Activity23Login({})
- if (res.code == Code.StatusOK) {
- loginOptions.value = res.data
- dialogDealResult.value = true
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- pictLoading.value = false
- }
- //2023迎新活动申请
- const toApply23 = async () => {
- if (flag.value) {
- return
- } else {
- flag.value = true
- }
- let res = await activityApi.Activity23HundredApply({
- login: dialogDealResult_form.login,
- })
- if (res.code == Code.StatusOK) {
- toApply23Cancel()
- Activity23HundredInfo()
- uni.showToast({ title: res.msg, icon: "success" })
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- const toApply23Cancel = () => {
- dialogDealResult_form.login = ""
- dialogDealResult.value = false
- }
- //盈利转换
- const toTransform = () => {
- dialogChinaUnionPay.value = true
- }
- const toTransformActive = async () => {
- let res = await activityApi.Activity23HundredTransform({})
- if (res.code == Code.StatusOK) {
- dialogChinaUnionPay.value = false
- Activity23HundredInfo()
- uni.showToast({ title: res.msg, icon: "success" })
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- //盈利变现
- const toRealization = () => {
- dialogChinaUnionPay1.value = true
- }
- const toRealizationActive = async () => {
- let res = await activityApi.Activity23HundredRealization({})
- if (res.code == Code.StatusOK) {
- dialogChinaUnionPay1.value = false
- Activity23HundredInfo()
- uni.showToast({ title: res.msg, icon: "success" })
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- //2023匠鑫活动数据
- const Activity23JiangxinInfo = async () => {
- let res = await activityApi.Activity23JiangxinInfo({})
- if (res.code == Code.StatusOK) {
- tableData3.value = res.data
- if (tableData3.value.show == 1) {
- tableData3Flag.value = true
- } else if (tableData3.value.show == 0) {
- tableData3Flag.value = false
- } else if (!tableData3.value.show) {
- tableData3Flag.value = true
- let timezone = 2
- let offset_GMT = new Date().getTimezoneOffset()
- let nowDate = new Date().getTime()
- let nowTime = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
- let endTime = tableData3.value.activityEndTime
- ? new Date(tableData3.value.activityEndTime.replace(/-/g, "/")).getTime()
- : null
- if (
- tableData3.value.status == 2 &&
- tableData3.value.realizationStatus == 0 &&
- endTime &&
- nowTime > endTime
- ) {
- isRealizationJx.value = 1
- } else {
- isRealizationJx.value = 2
- }
- }
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- //获取交易账户的下拉列表
- const toApply23JxOpen = async () => {
- pictLoading.value = true
- let res = await activityApi.Activity23JxLogin({})
- if (res.code == Code.StatusOK) {
- loginOptions.value = res.data
- dialogDealResultJx.value = true
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- pictLoading.value = false
- }
- //2023迎新活动申请
- const toApply23Jx = async () => {
- if (flag.value) {
- return
- } else {
- flag.value = true
- }
- let res = await activityApi.Activity23JiangxinApply({
- login: dialogDealResultJx_form.login,
- })
- if (res.code == Code.StatusOK) {
- toApply23JxCancel()
- Activity23JiangxinInfo()
- uni.showToast({ title: res.msg, icon: "success" })
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- const toApply23JxCancel = () => {
- dialogDealResultJx_form.login = ""
- dialogDealResultJx.value = false
- }
- //盈利变现
- const toRealizationJx = async () => {
- let res = await activityApi.Activity23JiangxinRealization({
- id: tableData3.value.id,
- })
- if (res.code == Code.StatusOK) {
- Activity23JiangxinInfo()
- uni.showToast({ title: res.msg, icon: "success" })
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- //2023匠鑫活动数据Vip
- const Activity23JiangxinInfoVip = async () => {
- let res = await activityApi.Activity23JiangxinInfoVip({})
- if (res.code == Code.StatusOK) {
- tableData3Vip.value = res.data
- if (tableData3Vip.value.show == 1) {
- tableData3FlagVip.value = true
- } else if (tableData3Vip.value.show == 0) {
- tableData3FlagVip.value = false
- } else if (!tableData3Vip.value.show) {
- tableData3FlagVip.value = true
- let timezone = 2
- let offset_GMT = new Date().getTimezoneOffset()
- let nowDate = new Date().getTime()
- let nowTime = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
- let endTime = tableData3Vip.value.activityEndTime
- ? new Date(tableData3Vip.value.activityEndTime.replace(/-/g, "/")).getTime()
- : null
- if (
- tableData3Vip.value.status == 2 &&
- tableData3Vip.value.realizationStatus == 0 &&
- endTime &&
- nowTime > endTime
- ) {
- isRealizationJxVip.value = 1
- } else {
- isRealizationJxVip.value = 2
- }
- }
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- //获取交易账户的下拉列表Vip
- const toApply23JxOpenVip = async () => {
- pictLoading.value = true
- let res = await activityApi.Activity23JxLoginVip({})
- if (res.code == Code.StatusOK) {
- loginOptions.value = res.data
- dialogDealResultJxVip.value = true
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- pictLoading.value = false
- }
- //2023迎新活动申请Vip
- const toApply23JxVip = async () => {
- if (flag.value) {
- return
- } else {
- flag.value = true
- }
- let res = await activityApi.Activity23JiangxinApplyVip({
- login: dialogDealResultJx_formVip.login,
- })
- if (res.code == Code.StatusOK) {
- toApply23JxCancelVip()
- Activity23JiangxinInfoVip()
- uni.showToast({ title: res.msg, icon: "success" })
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- const toApply23JxCancelVip = () => {
- dialogDealResultJx_formVip.login = ""
- dialogDealResultJxVip.value = false
- }
- //盈利变现Vip
- const toRealizationJxVip = async () => {
- let res = await activityApi.Activity23JiangxinRealizationVip({
- id: tableData3Vip.value.id,
- })
- if (res.code == Code.StatusOK) {
- Activity23JiangxinInfoVip()
- uni.showToast({ title: res.msg, icon: "success" })
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- //2023年中赠金活动数据-10
- const Activity24nianzhongInfo = async () => {
- let res = await activityApi.Activity23nianzhongInfo({})
- if (res.code == Code.StatusOK) {
- tableData4.value = res.data
- if (tableData4.value.show == 1) {
- tableData4Flag.value = true
- } else if (tableData4.value.show == 0) {
- tableData4Flag.value = false
- }
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- //2023年中赠金活动跳转
- const toActivity24nianzhong = () => {
- uni.navigateTo({ url: "/pages/customer/deposit/index" })
- }
- //标准账户交易奖励跳转
- const toActivity24Trading = () => {
- uni.navigateTo({ url: "/pages/customer/new/index" })
- }
- //2023年中赠金活动数据-20
- const Activity24nianzhongTwoInfo = async () => {
- let res = await activityApi.Activity23nianzhongTwoInfo({})
- if (res.code == Code.StatusOK) {
- tableData4Two.value = res.data
- if (tableData4Two.value.show == 1) {
- tableData4TwoFlag.value = true
- } else if (tableData4Two.value.show == 0) {
- tableData4TwoFlag.value = false
- }
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- //交易大赛数据-参数
- const GetActivityCptCode = async () => {
- let res = await activityApi.ActivityCptinfoGetCode({})
- if (res.code == Code.StatusOK) {
- tableDataCptFlagCode.value = res.data.code
- if (tableDataCptFlagCode.value) {
- ActivityCptInfo(tableDataCptFlagCode.value)
- }
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- //交易大赛数据
- const ActivityCptInfo = async (code: string) => {
- let res = await activityApi.ActivityCptinfoCode({
- infoCode: code,
- })
- if (res.code == Code.StatusOK) {
- tableDataCpt.value = res.data
- if (tableDataCpt.value == null) {
- tableDataCptFlag.value = false
- } else {
- tableDataCptFlag.value = true
- }
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- //获取交易账户的下拉列表
- const toApplyCptOpen = async () => {
- pictLoading.value = true
- let res = await activityApi.ActivityCptInfoLogins({
- cptId: tableDataCpt.value.id,
- })
- if (res.code == Code.StatusOK) {
- loginOptions.value = res.data
- dialogDealResultCpt.value = true
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- pictLoading.value = false
- }
- //交易大赛申请
- const toApplyCpt = async () => {
- if (flag.value) {
- return
- } else {
- flag.value = true
- }
- let res = await activityApi.ActivityCptInfoAdd({
- cptId: tableDataCpt.value.id,
- login: dialogDealResultCpt_form.login,
- nickname: dialogDealResultCpt_form.nickname,
- mobile: dialogDealResultCpt_form.mobile,
- address: dialogDealResultCpt_form.address,
- recipient: dialogDealResultCpt_form.recipient,
- })
- if (res.code == Code.StatusOK) {
- toApplyCptCancel()
- GetActivityCptCode()
- uni.showToast({ title: res.msg, icon: "success" })
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- const toApplyCptCancel = () => {
- dialogDealResultCpt_form.login = ""
- dialogDealResultCpt_form.nickname = ""
- dialogDealResultCpt_form.mobile = ""
- dialogDealResultCpt_form.address = ""
- dialogDealResultCpt_form.recipient = ""
- dialogDealResultCpt.value = false
- }
- const toOpenSingle = (pageAddress: string) => {
- let link = ""
- if (pageAddress.indexOf("html?") == -1) {
- link = "?code=" + tableDataCptFlagCode.value
- }
- if (pageAddress.indexOf("html?") > -1 && pageAddress.indexOf("code") == -1) {
- link = "&code=" + tableDataCptFlagCode.value
- }
- plus.runtime.openURL(imgUrl.value + pageAddress + link)
- }
- //CWG 现金嘉年华-新任务
- const ActivitYdepositRaffleAim = async () => {
- let res = await activityApi.ActivitYdepositRaffleAim({})
- if (res.code == Code.StatusOK) {
- if (res.data == null) {
- newTask.value = false
- } else {
- newTask.value = true
- newTaskList.value = res.data
- }
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- //CWG 现金嘉年华-抽奖次数
- const ActivitYdepositRaffleinfo = async () => {
- let res = await activityApi.ActivitYdepositRaffleinfo({})
- if (res.code == Code.StatusOK) {
- if (res.data == null) {
- LuckyDrawsNumber.value = "0"
- } else {
- LuckyDrawsNumber.value = res.data.raffleResidueNumber || "0"
- }
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- //现金嘉年华跳转抽奖历史
- const toHistoryLuckyDraw = () => {
- uni.navigateTo({ url: "/pages/customer/history/lucky/draw/index" })
- }
- //现金嘉年华跳转任务列表
- const toTaskList = () => {
- uni.navigateTo({ url: "/pages/customer/task/list/index" })
- }
- const UtoTaskList = () => {
- uni.navigateTo({ url: "/pages/customer/Utask/list/index" })
- }
- const goSurplusTaskList = () => {
- uni.navigateTo({ url: "/pages/activities/surplus-list" })
- }
- const goMonthlyTaskList = () => {
- uni.navigateTo({ url: "/pages/activities/monthly-list" })
- }
- const toOpenTask = () => {
- dialogNewTaskDraw.value = true
- }
- //新任务弹窗
- const toNewTask = () => {
- dialogNewTask.value = true
- }
- const closedialogNewTaskDraw = () => {
- dialogNewTaskDraw.value = false
- ActivitYdepositRaffleinfo()
- }
- //分页返回数据
- const handleCurrentChange = (val: number) => {
- pagerInfo.current = val
- searchFunc()
- searchFunc1()
- }
- //20赠金是否到期-4月30号23:59:59的时候关闭申请
- const is20Open = () => {
- let endTime1 = "2023/04/30 23:59:59"
- let timezone = 2
- let offset_GMT = new Date().getTimezoneOffset()
- let nowDate = new Date().getTime()
- let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
- let end = new Date(endTime1).getTime()
- if (now > end) {
- anshiClose.value = false
- }
- }
- //抽抽奖是否到期-2023-11-25 00:00:00-2023-12-31 23:59:59
- const isRaffleOpen = () => {
- let endTime1 = "2025/9/30 23:59:59"
- let startTime1 = "2025/7/1 00:00:00"
- let timezone = 2
- let offset_GMT = new Date().getTimezoneOffset()
- let nowDate = new Date().getTime()
- let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
- let end = new Date(endTime1).getTime()
- let start = new Date(startTime1).getTime()
- if (now < end && start < now) {
- choujiaClose.value = true
- ActivitYdepositRaffleAim()
- ActivitYdepositRaffleinfo()
- }
- }
- //24精英杯活动
- const Activity24JYBInfoVip = async () => {
- let res = await activityApi.Activity24JYBInfoVip({})
- if (res.code == Code.StatusOK) {
- tableData3JYB.value = res.data
- if (tableData3JYB.value.show == 1) {
- tableData3FlagJYB.value = true
- } else if (tableData3JYB.value.show == 0) {
- tableData3FlagJYB.value = false
- } else if (!tableData3JYB.value.show) {
- tableData3FlagJYB.value = true
- let timezone = 2
- let offset_GMT = new Date().getTimezoneOffset()
- let nowDate = new Date().getTime()
- let nowTime = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
- let endTime = tableData3JYB.value.activityEndTime
- ? new Date(tableData3JYB.value.activityEndTime.replace(/-/g, "/")).getTime()
- : null
- if (
- tableData3JYB.value.status == 2 &&
- tableData3JYB.value.realizationStatus == 0 &&
- endTime &&
- nowTime > endTime
- ) {
- isRealizationJxJYB.value = 1
- } else {
- isRealizationJxJYB.value = 2
- }
- }
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- //获取交易账户的下拉列表Vip
- const toApply24JYBOpenVip = async () => {
- pictLoading.value = true
- let res = await activityApi.Activity24JYBLoginVip({})
- if (res.code == Code.StatusOK) {
- loginOptions.value = res.data
- dialogDealResultJxJYB.value = true
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- pictLoading.value = false
- }
- //24精英杯活动申请
- const toApply24JYBVip = async () => {
- //this.$refs["dialogDealResultJx_formJYB"].validate
- if (flag.value) {
- return
- } else {
- flag.value = true
- }
- let res = await activityApi.Activity24JYBApplyVip({
- login: dialogDealResultJx_formJYB.login,
- })
- if (res.code == Code.StatusOK) {
- toApply24JYBCancelVip()
- Activity24JYBInfoVip()
- uni.showToast({ title: res.msg, icon: "success" })
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- const toApply24JYBCancelVip = () => {
- dialogDealResultJx_formJYB.login = ""
- dialogDealResultJxJYB.value = false
- }
- //24精英杯活动盈利变现
- const toRealization24JYBVip = async () => {
- let res = await activityApi.Activity24JYBRealizationVip({
- id: tableData3JYB.value.id,
- })
- if (res.code == Code.StatusOK) {
- Activity24JYBInfoVip()
- uni.showToast({ title: res.msg, icon: "success" })
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- //24无忧交易
- const ActivityNoWorriesInfo = async () => {
- let res = await activityApi.ActivityNoWorriesInfo({})
- if (res.code == Code.StatusOK) {
- tableDataNoWorries.value = res.data
- if (typeof tableDataNoWorries.value == "object") {
- tableDataNoWorriesFlag.value = true
- let timezone = 2
- let offset_GMT = new Date().getTimezoneOffset()
- let nowDate = new Date().getTime()
- let nowTime = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
- let startTime = new Date(tableDataNoWorries.value.compensateTime.replace(/-/g, "/")).getTime()
- let endTime = new Date(tableDataNoWorries.value.revokeTime.replace(/-/g, "/")).getTime()
- if (
- nowTime < endTime &&
- nowTime > startTime &&
- (tableDataNoWorries.value.status == 0 ||
- tableDataNoWorries.value.status == 3) &&
- tableDataNoWorries.value.compensateStatus == 2 &&
- tableDataNoWorries.value.activityStatus == 1
- ) {
- isRealizationNoWorries.value = 1
- } else {
- isRealizationNoWorries.value = null
- }
- } else {
- if (tableDataNoWorries.value) {
- tableDataNoWorriesFlag.value = true
- }
- }
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- //获取交易账户的下拉列表
- const toApplyNoWorriesOpen = async () => {
- pictLoading.value = true
- let res = await activityApi.ActivityNoWorriesLogin({})
- if (res.code == Code.StatusOK) {
- loginOptions.value = res.data
- dialogDealResultNoWorries.value = true
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- pictLoading.value = false
- }
- //24无忧交易申请
- const toApplyNoWorries = async () => {
- if (flag.value) {
- return
- } else {
- flag.value = true
- }
- let res = await activityApi.ActivityNoWorriesApply({
- login: dialogDeal_formNoWorries.login,
- })
- if (res.code == Code.StatusOK) {
- dialogNoWorriesApply.value = true
- toApplyNoWorriesCancel()
- ActivityNoWorriesInfo()
- uni.showToast({ title: res.msg, icon: "success" })
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- const toApplyNoWorriesCancel = () => {
- // this.$refs["dialogDeal_formNoWorries"] &&
- // this.$refs["dialogDeal_formNoWorries"].resetFields();
- dialogDeal_formNoWorries.login = ""
- dialogDealResultNoWorries.value = false
- }
- //盈利变现
- const toRealizationNoWorries = () => {
- dialogNoWorries.value = true
- }
- //24无忧交易盈利变现
- const realizationNoWorries = async () => {
- let res = await activityApi.ActivityNoWorriesRealization({
- id: tableDataNoWorries.value.id,
- })
- if (res.code == Code.StatusOK) {
- dialogNoWorries.value = false
- ActivityNoWorriesInfo()
- uni.showToast({ title: res.msg, icon: "success" })
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- //24新年庆典
- const isNewYear24Open = () => {
- let endTime1 = "2025/3/31 23:59:59"
- let startTime1 = "2025/1/1 00:00:00"
- let timezone = 2
- let offset_GMT = new Date().getTimezoneOffset()
- let nowDate = new Date().getTime()
- let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
- let end = new Date(endTime1).getTime()
- let start = new Date(startTime1).getTime()
- if (now < end && start < now) {
- ActivityNewYear24()
- }
- }
- const ActivityNewYear24 = async () => {
- let res = await activityApi.ActivityNewYear24({})
- if (res.code == Code.StatusOK) {
- tableDataNewYear24.value = res.data
- if (typeof tableDataNewYear24.value == "object") {
- tableDataNewYear24Flag.value = true
- } else {
- if (tableDataNewYear24.value) {
- tableDataNewYear24Flag.value = true
- }
- }
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- const openCalculator = () => {
- openCalculatorFlag.value = true
- }
- const calculateIncome = () => {
- NewYear24Data.balance = Number(NewYear24DataBalance.value) || 0
- let rate = 0
- tableDataNewYear24.value.details.forEach((item: any) => {
- if (
- NewYear24Data.balance > item.min &&
- NewYear24Data.balance <= item.max
- ) {
- rate = item.rate
- } else if (
- NewYear24Data.balance > item.min &&
- NewYear24Data.balance >= item.max &&
- item.max == 0
- ) {
- rate = item.rate
- }
- })
- NewYear24Data.income = (
- ((NewYear24Data.balance * rate) / 100 / 365) *
- 30
- ).toFixed(2)
- }
- //限时活动
- const ActivityRequiteInfo = async () => {
- let res = await activityApi.ActivityRequiteInfo({})
- if (res.code == Code.StatusOK) {
- limitedStatus.value = res.data
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- }
- // 获取活动显示信息
- const getActivityShowsInfo = async () => {
- try {
- let res = await activityApi.ActivityShowsInfo()
- if (res.code == Code.StatusOK) {
- activityShowsInfo.value = res.data
- surplusGive.value = res.data.surplusGive || false
- monthlyGive.value = res.data.monthlyGive || false
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- surplusGive.value = false
- monthlyGive.value = false
- }
- } catch (error) {
- uni.showToast({ title: "获取活动信息失败", icon: "none" })
- surplusGive.value = false
- monthlyGive.value = false
- }
- }
- // 打开surplus活动弹框
- const openSurplusActivityDialog = async () => {
- console.log(surplusGive.value)
- if (!surplusGive.value) {
- return
- }
- dialogSurplusActivity.value = true
- surplusActivityLoading.value = true
- selectedSurplusActivity.value = null
- }
- const openSurplusActivityDialog1 = async () => {
- if (!monthlyGive.value) {
- return
- }
- dialogSurplusActivity1.value = true
- surplusActivityLoading1.value = true
- selectedSurplusActivity1.value = null
- getMonthlyActivityOptions()
- }
- const getSurplusActivityOptions = async () => {
- let res = await activityApi.ActivitySurplusDepositAmount({
- login: selectedAccount.value.login,
- platform: selectedAccount.value.platform,
- })
- if (res.code == Code.StatusOK) {
- surplusActivityOptions.value = res.data.map((item: any, index: number) => ({
- id: index,
- value: item.level,
- text: `${t("AmountLabel.item1")}: ${item.amount} | ${t("AmountLabel.item2")}: ${item.needVolume}`,
- giveFlag: item.giveFlag,
- }))
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- surplusActivityLoading.value = false
- }
- const getMonthlyActivityOptions = async () => {
- let res = await activityApi.ActivityMonthlyDepositAmount({})
- if (res.code == Code.StatusOK) {
- surplusActivityOptions1.value = res.data.map((item: any, index: number) => ({
- id: index,
- value: item.level,
- label: `${t("入金量")}: ${item.needAmount} | ${t("入金手数")}: ${item.needVolume}`,
- }))
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- surplusActivityLoading1.value = false
- }
- // 关闭surplus活动弹框
- const closeSurplusActivityDialog = () => {
- dialogSurplusActivity.value = false
- selectedSurplusActivity.value = null
- surplusActivityOptions.value = []
- valueInfo.value = null
- }
- // 确认参加surplus活动
- const confirmSurplusActivity = async () => {
- try {
- surplusActivityLoading.value = true
- let res = await activityApi.ActivitySurplusAdd({
- login: selectedAccount.value.login,
- platform: selectedAccount.value.platform,
- level: selectedSurplusActivity.value,
- })
- if (res.code == Code.StatusOK) {
- uni.showToast({ title: res.msg, icon: "success" })
- closeSurplusActivityDialog()
- surplusActivityLoading.value = false
- getActivityShowsInfo()
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- } catch (error) {
- uni.showToast({ title: error?.msg, icon: "none" })
- }
- }
- // 关闭surplus活动弹框
- const closeSurplusActivityDialog1 = () => {
- dialogSurplusActivity1.value = false
- selectedSurplusActivity1.value = null
- surplusActivityOptions1.value = []
- valueInfo.value = null
- }
- // 确认参加月度豪礼活动
- const confirmSurplusActivity1 = async () => {
- try {
- surplusActivityLoading1.value = true
- let res = await activityApi.ActivityMonthlyAdd({})
- if (res.code == Code.StatusOK) {
- uni.showToast({ title: res.msg, icon: "success" })
- closeSurplusActivityDialog1()
- surplusActivityLoading1.value = false
- getActivityShowsInfo()
- } else {
- uni.showToast({ title: res.msg, icon: "none" })
- }
- } catch (error) {
- uni.showToast({ title: error?.msg, icon: "none" })
- }
- }
- //搜索
- const handleSearch = () => {
- pagerInfo.current = 1
- searchFunc()
- searchFunc1()
- }
- //新增
- const closeDiaAdd = () => {
- dialogInfoTradingAdd.value = false
- dialogInfoTradingAdd1.value = false
- }
- const closeAdd = (val: boolean) => {
- dialogInfoTradingAdd.value = false
- dialogInfoTradingAdd1.value = false
- }
- const confirmToReload = () => {
- dialogInfoTradingAdd.value = false
- dialogInfoTradingAdd1.value = false
- searchFunc()
- }
- //获取客户申请活动列表
- //点击操作的回调
- const tableRef = ref(null)
- const handleCommand = (command) => {
- if (command.type == "check") {
- ActivityComplete(command.id);
- }
- }
- const ActivityComplete = async (id: number) => {
- await confirm({
- title: t("news_add_field.ApplicationDialog.ActivitiesDes"),
- content: t("Msg.SystemPrompt"),
- confirmText: t("Btn.item6"),
- cancelText: t("Btn.item7"),
- })
- if (flag.value) {
- return;
- } else {
- flag.value = true;
- }
- let res = await activityApi.ActivityComplete({ id: id });
- if (res.code == Code.StatusOK) {
- tableRef.value?.reload()
- uni.showToast({
- title: t("Msg.Success"),
- icon: "success",
- })
- flag.value = false;
- } else {
- uni.showToast({
- title: res.msg,
- icon: "none",
- })
- flag.value = false;
- }
- }
- // 表格列配置(支持插槽和格式化)
- const columns = computed(() => [
- {
- prop: 'login',
- label: t('Drawer.Label.TradingAccount'),
- align: 'center',
- formatter: ({ row }) => row.login || '--'
- },
- {
- prop: 'addTime',
- label: t('Drawer.Label.Date'),
- align: 'center',
- formatter: ({ row }) => row.addTime || '--'
- },
- {
- prop: 'status',
- label: t('Drawer.Label.Status'),
- align: 'center',
- slot: 'status'
- },
- {
- label: t('Label.Note'),
- align: 'center',
- type: 'note'
- },
- {
- prop: 'action',
- label: t('Label.Action'),
- align: 'center',
- slot: 'action'
- }
- ])
- //获取申请活动所需数据
- const getStatus = async () => {
- let res = await activityApi.ActivityInfo({
- activityId: information.id,
- });
- if (res.code == Code.StatusOK) {
- loginOptions.value = res.data.map((item: any) => ({
- text: item.login,
- value: item.login,
- disable: item.status == 1 ||
- information.groupTypes.indexOf(item.groupType) == '-1' ||
- information.loginTypes.indexOf(item.type) == '-1'
- }))
- } else {
- uni.showToast({
- title: res.msg,
- icon: "none",
- })
- }
- }
- //申请活动
- const activityApply = async () => {
- if (!information.agree) {
- uni.showToast({
- title: t("Msg.SystemPrompt"),
- icon: "none",
- })
- return;
- }
- if (flag.value) {
- return;
- } else {
- flag.value = true;
- }
- try {
- let res = await activityApi.ActivityApply({
- activityId: information.id,
- ...information,
- });
- if (res.code == Code.StatusOK) {
- confirmToReload();
- uni.showToast({
- title: t("Msg.Success"),
- icon: "none",
- })
- flag.value = false;
- } else {
- uni.showToast({
- title: res.msg,
- icon: "none",
- })
- flag.value = false;
- }
- } catch (error) {
- uni.showToast({
- title: error?.msg,
- icon: "none",
- })
- flag.value = false;
- }
- }
- const getApplyListApi = ref(null)
- const search1 = reactive({
- activityId: ''
- })
- //申请列表弹出
- const checkActivity = (val: any) => {
- information.id = val.id
- information.title = val.title
- dialogInfoTradingAdd1.value = true
- getApplyListApi.value = activityApi.ActivityApplyList
- search1.activityId = information.id
- }
- //回显
- const onAgreeChange = (e) => {
- information.agree = e.detail.value.length > 0
- }
- //申请活动弹出
- const applications = (val: any) => {
- information.id = val.id
- information.title = val.title
- getStatus()
- let loginType: any[] = []
- val.loginTypes.forEach((item: any) => {
- loginType.push(item.loginType)
- })
- let groupType: any[] = []
- val.groupTypes.forEach((item: any) => {
- groupType.push(item.groupType)
- })
- information.loginTypes = loginType
- information.groupTypes = groupType
- information.myType12 = 1
- console.log(information, 1212);
- dialogInfoTradingAdd.value = true
- }
- //详情
- const toSingle = (id: string, listID?: string) => {
- if (
- id == "20zj" ||
- id == "23yx" ||
- id == "23jx" ||
- id == "23nz" ||
- id == "23nzTwo" ||
- id == "23jxVip" ||
- id == "23xinjia" ||
- id == "23jnhcj" ||
- id == "23nz_zx" ||
- id == "24JYB" ||
- id == "NoWorries" ||
- id == "NewYear24"
- ) {
- if (id == "23jx") {
- uni.navigateTo({
- 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}`,
- })
- } else if (id == "23jxVip") {
- uni.navigateTo({
- 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}`,
- })
- } else if (id == "24JYB") {
- uni.navigateTo({
- 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}`,
- })
- } else if (id == "23nz") {
- uni.navigateTo({
- 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}`,
- })
- } else if (id == "23nzTwo") {
- uni.navigateTo({
- 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)}`,
- })
- } else if (id == "NoWorries") {
- uni.navigateTo({
- url: `/pages/activities/content?id=&type=1&active=${id}`,
- })
- } else if (id == "NewYear24") {
- uni.navigateTo({
- url: `/pages/activities/content?id=&type=1&active=${id}`,
- })
- } else {
- uni.navigateTo({
- url: `/pages/activities/content?id=&type=1&active=${id}`,
- })
- }
- } else if (id == "newList") {
- uni.navigateTo({
- url: `/pages/activities/content?id=${listID}&type=1&active=newList`,
- })
- } else {
- uni.navigateTo({
- url: `/pages/activities/content?id=${id}&type=1`,
- })
- }
- }
- const handleValueInfoChange = (value: any) => {
- const selectedAccountObj = loginOptions1.value.find((item) => item.login === value)
- console.log("选中的账户对象:", selectedAccountObj)
- selectedAccount.value = selectedAccountObj
- getSurplusActivityOptions()
- }
- // ==================== 监听器 ====================
- watch(NewYear24DataBalance, (newVal) => {
- NewYear24Data.balance = Number(newVal) || 0
- })
- watch(dialogSurplusActivity, (newVal) => {
- if (!newVal) { closeSurplusActivityDialog() }
- })
- watch(dialogSurplusActivity1, (newVal) => {
- if (!newVal) { closeSurplusActivityDialog1() }
- })
- // ==================== 生命周期 ====================
- onMounted(() => {
- getDateList()
- // 2025-07-31 00:00:00 之后关闭 standard
- const endTime = new Date("2025/07/31 00:00:00").getTime()
- const timezone = 3
- const offset_GMT = new Date().getTimezoneOffset()
- const nowDate = new Date().getTime()
- const now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
- if (now >= endTime) {
- standard.value = false
- }
- is20Open()
- searchFunc()
- searchFunc1()
- getActivityPercentageGiveInfo()
- Activity23HundredInfo()
- // Activity23JiangxinInfo()
- Activity23JiangxinInfoVip()
- Activity24nianzhongInfo()
- Activity24nianzhongTwoInfo()
- GetActivityCptCode()
- Activity24JYBInfoVip()
- ActivityNoWorriesInfo()
- isRaffleOpen()
- isNewYear24Open()
- ActivityRequiteInfo()
- getActivityShowsInfo()
- })
- onUnmounted(() => {
- if (interval.value) {
- clearInterval(interval.value)
- }
- })
- onShow(async (options) => {
- showPage.value = false
- await nextTick()
- setTimeout(async () => {
- showPage.value = true
- await nextTick()
- }, 100)
- })
- onPullDownRefresh(() => {
- // 下拉刷新
- searchFunc()
- searchFunc1()
- uni.stopPullDownRefresh()
- })
- onReachBottom(() => {
- // 上拉加载更多
- if (pagerInfo.current < pagerInfo.pageTotal) {
- pagerInfo.current++
- searchFunc()
- }
- })
- // ==================== 导出 ====================
- // 由于使用 <script setup>,所有顶层绑定都会自动暴露给模板
- </script>
- <style scoped lang="scss">
- @import "@/uni.scss";
- // 弹窗样式优化
- .dia-content {
- .content {
- padding: 20px !important;
- }
- .form-item {
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- justify-content: flex-start;
- margin-bottom: 20px;
- gap: 16px;
- .form-label {
- width: 120px;
- font-weight: 500;
- color: var(--bs-heading-color);
- font-size: 14px;
- }
- :deep(.cwg-combox) {
- flex: 1;
- width: 100%;
- .el-input__wrapper {
- border-radius: 4px;
- }
- &.disabled {
- .el-input__wrapper {
- background-color: #f5f5f5;
- cursor: not-allowed;
- }
- }
- }
- }
- }
- .btn-outline-dark1 {
- background-color: var(--btn-color) !important;
- color: var(--bs-emphasis-color) !important;
- }
- .surplusActivityDialog {
- height: 300px;
- }
- </style>
|