| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550 |
- <template>
- <cwg-page-wrapper class="create-page" :isHeaderFixed="true">
- <view class="container">
- <view class="row">
- <view class="col-12">
- <view class="border-0 card-header">
- <view class="d-flex flex-wrap gap-3 align-items-center justify-content-between mb-3">
- <h3 class="mb-0" v-t="'Home.page_customer.item2'" />
- </view>
- </view>
- </view>
- <view class="col-lg-12">
- <view class="clearfix">
- <view class="card">
- <view class="card-header">
- <view class="col-12 mb-5">
- <view
- class="d-flex flex-wrap gap-3 align-items-center justify-content-between mb-3">
- <h5 class="mb-0" v-t="'Custom.Deposit.Title1'" />
- </view>
- <cwg-combox :clearable="false" v-model:value="loginValue"
- :options="loginComboxOptions" :placeholder="t('placeholder.choose')" />
- </view>
- <uni-loading v-if="step2 && currentTableData.length == 0" />
- <template v-if="step2 && currentTableData.length > 0">
- <view class="col-12 mb-5">
- <view
- class="d-flex flex-wrap gap-3 align-items-center justify-content-between mb-3">
- <h5 class="mb-0" v-t="'Custom.Deposit.Title2'" />
- </view>
- </view>
- <cwg-asset-tabs v-if="tabsConfig.length > 0" v-model="activeTab"
- :tabs="tabsConfig" />
- </template>
- </view>
- <view class="card-body" v-if="step2 && currentTableData.length > 0">
- <view class="tab-content">
- <view>
- <PaymentMethodsList :list="currentTableData" @select="isShowStep3" />
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <template v-if="step5">
- <cwg-header :title="t('Home.page_customer.item2')" />
- <view class="custom-deposit">
- <!-- 步骤1:选择账户 -->
- <view class="box box-step1">
- <view class="b-card">
- <view class="card-top">
- <text class="tit"><text class="iconfont icon-caret-right"></text>{{
- t('Custom.Deposit.Title1')
- }}</text>
- <cwg-combox :clearable="false" v-model:value="loginValue" :options="loginComboxOptions"
- :placeholder="t('placeholder.choose')" />
- </view>
- </view>
- </view>
- <!-- 步骤2:支付通道列表(卡片布局) -->
- <view class="box box-step2" v-if="step2">
- <view class="b-card">
- <view class="card-top">
- <text class="tit"><text class="iconfont icon-caret-right"></text>{{
- t('Custom.Deposit.Title2')
- }}</text>
- <uni-loading v-if="currentTableData.length == 0" />
- <template v-if="currentTableData.length">
- <cwg-asset-tabs v-if="tabsConfig.length > 0" v-model="activeTab" :tabs="tabsConfig" />
- <view>
- <PaymentMethodsList :list="currentTableData" @select="isShowStep3" />
- </view>
- </template>
- <!-- <view v-if="step3" class="reselect-btn">
- <button class="s-btn reselect" type="primary" @click="showTable">{{
- t('Custom.Deposit.Reselect') }}</button>
- </view> -->
- </view>
- </view>
- </view>
- <!-- 步骤3:填写入金信息 -->
- <view class="box box-step3" v-if="step3">
- <view class="b-card">
- <view class="card-top">
- <!-- 注意事项(第一步确认) -->
- <view v-if="!isStep3" class="step3-attention">
- <view class="tips" v-if="(introduce.introduce || introduce.enIntroduce)">
- <view>
- <cwg-rich-text class="attention"
- :nodes="isZh ? introduce.introduce : introduce.enIntroduce" />
- </view>
- </view>
- <view class="btn-bottom">
- <text class="btn crm-cursor" @click="isStep3Open()">{{ t('Btn.Confirm')
- }}</text>
- </view>
- </view>
- <!-- 表单(确认后显示) -->
- <uni-forms v-if="isStep3" ref="formRef" :model="params" :rules="rules" label-position="top"
- validate-trigger="submit" :label-width="300" class="base-info-form">
- <uni-row class="demo-uni-row uni-row1">
- <!-- 信用卡选择区域 -->
- <template v-if="isStep3 && channelData.confirmCreditCard == 1">
- <uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
- <view
- style="display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;">
- <text class="tit"><text class="iconfont icon-caret-right"></text>{{
- t('PersonalManagement.Label.selectCreditCard') }}</text>
- <view class="add-back">
- <text>{{ t('PersonalManagement.Label.addCreditCard') }}</text>
- <text class="add-btn crm-cursor" @click="openAddBankCard">{{
- t('Custom.Withdraw.addBank1') }}</text>
- </view>
- </view>
- </uni-col>
- <uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
- <uni-forms-item>
- <cwg-combox :clearable="false" v-model:value="myId"
- :options="creditCardOptions" :placeholder="t('placeholder.choose')"
- @change="selectCode" />
- </uni-forms-item>
- </uni-col>
- </template>
- <!-- 银行选择(如有) -->
- <template v-if="isStep3 && bankOptions.length">
- <uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
- <text class="tit"><text class="iconfont icon-caret-right"></text>{{
- t('news_add_field.Label.Title4')
- }}</text>
- </uni-col>
- <uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
- <uni-forms-item>
- <cwg-combox :clearable="false" v-model:value="code"
- :options="bankOptions" :placeholder="t('placeholder.choose')"
- @change="selectCode" />
- </uni-forms-item>
- </uni-col>
- </template>
- <!-- 特别提示(B2BINPAY) -->
- <uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24"
- v-if="isStep3 && bankOptions.length && channelData.code == 'B2BINPAY'">
- <text class="tit" style="margin: 10px 0 20px"><text
- class="iconfont iconi"></text>{{
- t('Custom.Deposit.Des') }}</text>
- </uni-col>
- <!-- 电汇信息展示 -->
- <template
- v-if="isStep3 && ['UNION_PAY_TELEGRAPHIC', 'UNION_PAY_TELEGRAPHIC_SPECIAL', 'UNION_PAY_TELEGRAPHIC_TWO'].includes(channelData.code)">
- <uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
- <text class="tit"><text class="iconfont icon-caret-right"></text>{{
- t('Custom.Deposit.Title5') }}</text>
- </uni-col>
- <uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
- <view class="wire-transfer-account">
- <view class="row"><text class="label SpecialColor">{{
- t('Custom.Deposit.bankUname') }}</text><text
- class="content SpecialColor">{{
- WireTransferAccount.bankUname || '--'
- }}</text></view>
- <view class="row"><text class="label">{{ t('Custom.Deposit.bankName')
- }}</text><text class="content">{{ WireTransferAccount.bankName
- ||
- '--'
- }}</text></view>
- <view class="row"><text class="label SpecialColor">{{
- t('Custom.Deposit.bankCardNum') }}</text><text
- class="content SpecialColor">{{
- WireTransferAccount.bankCardNum || '--'
- }}</text></view>
- <view class="row"><text class="label">{{ t('Custom.Deposit.bankAddr')
- }}</text><text class="content">{{ WireTransferAccount.bankAddr
- ||
- '--'
- }}</text></view>
- <view class="row"><text class="label SpecialColor">{{
- t('Custom.Deposit.swiftCode') }}</text><text
- class="content SpecialColor">{{
- WireTransferAccount.swiftCode || '--'
- }}</text></view>
- <view class="row"><text class="label">{{ t('Custom.Deposit.bankCode')
- }}</text><text class="content">{{ WireTransferAccount.bankCode
- ||
- '--'
- }}</text></view>
- <view class="row"><text class="label SpecialColor">{{
- t('Custom.Recording.Note')
- }}</text><text class="content SpecialColor">{{
- WireTransferAccount.bankMsg || '--' }}</text></view>
- </view>
- </uni-col>
- </template>
- <!-- 数字货币信息展示 -->
- <template
- v-if="isStep3 && channelData.code && channelData.code.indexOf('DIGITAL_PAY_TYPE_KEY') === 0">
- <uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
- <text class="tit"><text class="iconfont icon-caret-right"></text>{{
- t('Custom.Deposit.DigitalAcc') }}</text>
- </uni-col>
- <uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
- <view class="wire-transfer-account">
- <view class="row"><text class="label SpecialColor">{{
- t('Custom.Deposit.DigitalName') }}</text><text
- class="content SpecialColor">{{ WireTransferAccount.name
- + '-' +
- WireTransferAccount.type }}</text></view>
- <view class="row"><text class="label">{{ t('Custom.Withdraw.Title6')
- }}</text><text class="content">{{ WireTransferAccount.address ||
- '--'
- }}</text></view>
- <view class="row"><text class="label">QR Code</text>
- <image :src="Host05 + WireTransferAccount.url" mode="aspectFit"
- style="width: 100rpx; height: 100rpx;" />
- </view>
- </view>
- </uni-col>
- </template>
- <!-- 表单区域(含金额、预估金额、上传凭证、优惠码) -->
- <template v-if="isStep3">
- <uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
- <text class="tit"><text class="iconfont icon-caret-right"></text>{{
- t('Custom.Deposit.Title3') }}</text>
- </uni-col>
- <uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24"
- v-loading="pictLoadingImg">
- <!-- 金额输入 -->
- <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
- <uni-forms-item
- :label="t('Custom.Deposit.Title3') + '(' + channelData.currency + ')'"
- name="amount" :error-message="amountErrorMessage">
- <uni-easyinput type="number" v-model="params.amount"
- :placeholder="t('placeholder.input')" @blur="validateAmount" />
- </uni-forms-item>
- </uni-col>
- <!-- 预估金额(若有汇率) -->
- <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8" v-if="channelData.rate">
- <uni-forms-item>
- <template #label>
- <view class="label-with-icon">
- <text>{{ t('Custom.Deposit.EstimatedAmount') + '(' +
- channelData.transformCurrency + ')' }}</text>
- <uni-tooltip placement="top">
- <view class="item">?</view>
- <template #content>
- <text>{{ t('Custom.Deposit.des') }}</text>
- </template>
- </uni-tooltip>
- </view>
- </template>
- <uni-easyinput v-model="params.amount1" disabled
- :placeholder="t('placeholder.input')" />
- </uni-forms-item>
- </uni-col>
- <!-- 优惠码 -->
- <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
- <uni-forms-item name="promoCode">
- <template #label>
- <view class="label-with-icon">
- <text>{{ t('Custom.Deposit.PromoCode') }}</text>
- <uni-tooltip placement="top">
- <view class="item">?</view>
- <template #content>
- <text>{{ t('news_add_field.Des.item3') }}</text>
- </template>
- </uni-tooltip>
- </view>
- </template>
- <uni-easyinput v-model="params.promoCode"
- :placeholder="t('placeholder.input')" />
- </uni-forms-item>
- </uni-col>
- <!-- 上传汇款凭证(特定渠道) -->
- <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8" v-if="
- channelData.code == 'UNION_PAY_TELEGRAPHIC' ||
- channelData.code == 'UNION_PAY_TELEGRAPHIC_SPECIAL' ||
- channelData.code && channelData.code.indexOf('DIGITAL_PAY_TYPE_KEY') === 0 ||
- channelData.code == 'UNION_PAY_TELEGRAPHIC_TWO'
- ">
- <uni-forms-item :label="t('Custom.Deposit.UploadRemittanceVoucher')">
- <cwg-file-picker-wrapper v-model="imageUrl" :limit="1"
- :editable="true" :fileMediatype="'all'"
- uploadUrl="/wasabi/upload/file" :baseUrl="Host80" />
- </uni-forms-item>
- </uni-col>
- <!-- 电汇提示 -->
- <uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24"
- v-if="isStep3 && ['UNION_PAY_TELEGRAPHIC', 'UNION_PAY_TELEGRAPHIC_SPECIAL', 'UNION_PAY_TELEGRAPHIC_TWO'].includes(channelData.code)">
- <text>{{ t('Custom.Deposit.Tips') }}</text>
- </uni-col>
- <!-- ========== 赠金活动部分 ========== -->
- <!-- 10%赠金(年中赠金) -->
- <uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" v-if="tableData4Flag">
- <uni-forms-item class="agree" name="agree4">
- <label class="checkbox">
- <checkbox :checked="params.agree4"
- @click="params.agree4 = !params.agree4" />
- <text>{{ t('news_add_field1.activitiesNZ.itemDeposit1')
- }}</text>
- </label>
- <view style="line-height: 1.5; font-size: 14px">
- <text>{{ t('news_add_field1.activitiesNZ.itemDeposit2')
- }}</text>
- <text class="clause crm-cursor"
- @click="dialogClauseNZ = true">{{
- t('news_add_field1.activitiesNZ.itemDeposit3')
- }}</text>
- <text>{{ t('news_add_field1.activitiesNZ.itemDeposit4')
- }}</text>
- </view>
- </uni-forms-item>
- </uni-col>
- <!-- 20%赠金(年中赠金) -->
- <uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24"
- v-if="tableData4TwoFlag">
- <uni-forms-item class="agree" name="agree5">
- <label class="checkbox">
- <checkbox :checked="params.agree5"
- @click="params.agree5 = !params.agree5" />
- <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit1')
- }}</text>
- </label>
- <view style="line-height: 1.5; font-size: 14px">
- <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit2')
- }}</text>
- <text class="clause crm-cursor"
- @click="dialogClauseNZTwo = true">{{
- t('news_add_field1.activitiesNZTwo.itemDeposit3') }}</text>
- <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit4')
- }}</text>
- </view>
- </uni-forms-item>
- </uni-col>
- <!-- 赠送活动(动态) -->
- <uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24"
- v-if="tableDataNewListFlag">
- <uni-forms-item class="agree" name="agree6">
- <label>
- <checkbox :checked="params.agree6"
- @click="params.agree6 = !params.agree6" />
- <text>{{ tableDataNewList.title }}</text>
- </label>
- <view style="line-height: 1.5; font-size: 14px">
- <text>{{ t('news_add_field1.activitiesNewList.item1') }}</text>
- <text class="clause crm-cursor"
- @click="dialogClauseNewList = true">{{
- tableDataNewList.title }}</text>
- <text>{{ t('news_add_field1.activitiesNewList.item2') }}</text>
- </view>
- </uni-forms-item>
- </uni-col>
- <!-- 20%赠金申请(特定账户类型) -->
- <uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24"
- v-if="(ACCType == 1 || ACCType == 2 || ACCType == 5 || ACCType == 6 || ACCType == 7) && anshiClose">
- <uni-forms-item class="agree" name="agree3">
- <label class="checkbox">
- <checkbox :checked="params.agree3"
- @click="params.agree3 = !params.agree3" />
- <text>{{ t('news_add_field1.deposit.item3') }}</text>
- </label>
- <view style="line-height: 1.5; font-size: 14px">
- <text>{{ t('news_add_field1.deposit.item4') }}</text>
- <text class="clause crm-cursor" @click="dialogClause1 = true">{{
- t('news_add_field1.deposit.item5') }}</text>
- <text>{{ t('news_add_field1.deposit.item6') }}</text>
- </view>
- </uni-forms-item>
- </uni-col>
- <!-- 普通10%赠金(非年中、非特定账户) -->
- <uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24"
- v-if="!tableData4Flag && !tableData4TwoFlag && !tableDataNewListFlag && (country != 'CN' || (country == 'CN' && (ACCType == 1 || ACCType == 2 || ACCType == 7 || ACCType == 5 || ACCType == 6 || ACCType == 8))) && ACCType != 3">
- <template v-if="isSupportedCountry && (ACCType == 2 || ACCType == 7)">
- <uni-forms-item class="agree" name="agree2">
- <label>
- <checkbox :checked="params.agree2"
- @click="params.agree2 = !params.agree2" />
- <text>{{ t('news_add_field1.deposit.item2_1') }}</text>
- </label>
- <view style="line-height: 1.5; font-size: 14px">
- <text>{{ t('Custom.Deposit.agree21') }}</text>
- <cwg-link type="pdf" title="Custom.Deposit.agree22_2"
- :url="`pdf/pdf4/100Bonus-en.pdf`"
- style="color: black" />
- <text>{{ t('Custom.Deposit.agree23_2') }}</text>
- </view>
- </uni-forms-item>
- </template>
- <template
- v-else-if="!isSupportedCountry && ACCType != 8 && !isAfterSeptember30()">
- <uni-forms-item class="agree" name="agree2">
- <label>
- <checkbox :checked="params.agree2"
- @click="params.agree2 = !params.agree2" />
- <text>{{ t('news_add_field1.deposit.item1') }}</text>
- </label>
- <view style="line-height: 1.5; font-size: 14px">
- <text>{{ t('Custom.Deposit.agree21') }}</text>
- <cwg-link type="pdf" title="Custom.Deposit.agree22"
- :url="`pdf/pdf4/${langCN}.pdf`" style="color: black" />
- <text>{{ t('Custom.Deposit.agree23_1') }}</text>
- </view>
- </uni-forms-item>
- </template>
- </uni-col>
- </uni-col>
- </template>
- </uni-row>
- <button class="s-btn" type="primary" @click="submitConfirm">{{ t('Btn.Submit')
- }}</button>
- </uni-forms>
- </view>
- </view>
- </view>
- </view>
- </template>
- <!-- 不参加活动弹出框 -->
- <cwg-dont-active-popup v-model:visible="dialogDontActive" :showFooters="true" @confirm="tosubmitConfirm" />
- <!-- 新年24用户提示弹窗 -->
- <NewYear24Popup v-model:visible="tableDataNewYear24Flag" />
- <!-- 越南用户提示弹窗 -->
- <VietnamNoticePopup v-model:visible="dialogVietnamNotice" />
- <!-- 提交后确认弹窗 -->
- <cwg-check-confirm-popup v-model:visible="dialogCheckConfirm" :title="t('Home.page_customer.item2')"
- :channelData="channelData" :code="code" :selectCodes="selectCodes" :params="params" :userName="userName"
- :login="loginValue" :loginDoc="loginValueDoc" @confirm="submit" />
- <!--提交后的弹出框-->
- <CheckPopup v-model:visible="dialogCheckSuccess" :goPayLink="goPayLink" @close="closeDia" />
- <!-- 提交后失败弹窗 -->
- <cwg-error-popup v-model:visible="dialogCheckError" :responseMessage="RES" />
- <!-- 最后失败弹窗 -->
- <cwg-error-popup v-model:visible="dialogError" @confirm="closeDia" :responseMessage="RES" />
- <!-- 最后成功弹窗 -->
- <cwg-success-popup v-model:visible="dialogSuccess" @confirm="closeDia" />
- <!-- 等待弹窗 -->
- <cwg-wait-popup v-model:visible="dialogCheckWait" :showFooters="false" />
- <!-- 赠金协议 -->
- <ClausePopup v-model:visible="dialogClause" country="CN" :isGuoQin="isGuoQin" />
- <!-- 赠金协议20 -->
- <Clause20Popup v-model:visible="dialogClause1" />
- <!-- 赠金协议10年中 -->
- <ClauseNZPopup v-model:visible="dialogClauseNZ" :title="t('news_add_field1.activitiesNZ.item6')"
- :startDate="tableData4.applicationStartTime" :endDate="tableData4.applicationEndTime" />
- <!-- 赠金协议20年中 -->
- <ClauseNZTwoPopup v-model:visible="dialogClauseNZTwo" :title="t('news_add_field1.activitiesNZTwo.item6')"
- :startDate="tableData4Two.applicationStartTime" :endDate="tableData4Two.applicationEndTime" />
- <!-- 赠送活动详情-协议 -->
- <ClauseNewListPopup v-model:visible="dialogClauseNewList" :content="tableDataNewList.content"
- :title="tableDataNewList.title" />
- <!--提交后完成弹出框-->
- <ChinaUnionPayPopup v-model:visible="dialogChinaUnionPay" />
- <!-- 重新提交弹窗 -->
- <DealResultPopup v-model:visible="dialogDealResult" :responseMessage="responseMessage"
- :title="dialogDealResultTitle" :initialData="dialogDealResult_form" :type="DealResultType"
- @confirm="submitDealResult" />
- <!-- KYC成功弹窗 -->
- <cwg-kyc-popup v-model:visible="dialogKyc" :qrText="text1" />
- </cwg-page-wrapper>
- </template>
- <script setup>
- import { ref, reactive, computed, watch, onMounted, nextTick } from 'vue'
- import { useI18n } from 'vue-i18n'
- const { t, locale } = useI18n()
- import useUserStore from '@/stores/use-user-store'
- import { customApi } from '@/service/custom'
- import { financialApi } from '@/service/financial'
- import { activityApi } from '@/service/activity'
- import Config from '@/config/index'
- const { Code, Host80, Host04 } = Config
- import { initLink } from '@/utils/setUrl'
- import isImageType from '@/global/isImageType'
- import PaymentMethodsList from './components/PaymentMethodsList.vue'
- import CwgKycPopup from './components/KycPopup.vue'
- import DealResultPopup from './components/DealResultPopup.vue'
- import ChinaUnionPayPopup from './components/ChinaUnionPayPopup.vue'
- import ClauseNewListPopup from './components/ClauseNewListPopup.vue'
- import ClauseNZTwoPopup from './components/ClauseNZTwoPopup.vue'
- import ClauseNZPopup from './components/ClauseNZPopup.vue'
- import Clause20Popup from './components/Clause20Popup.vue'
- import ClausePopup from './components/ClausePopup.vue'
- import CheckPopup from './components/CheckPopup.vue'
- import CwgCheckConfirmPopup from './components/DepositCheckConfirmPopup.vue'
- import VietnamNoticePopup from './components/VietnamNoticePopup.vue'
- import NewYear24Popup from './components/NewYear24Popup.vue'
- import useRouter from '@/hooks/useRouter'
- const router = useRouter()
- // 假设原有导入路径保持不变
- import tool from "@/global/tool"
- import { object } from 'uview-plus/libs/function/test'
- // import { createUploadRequest } from "@/lib/upload"
- // 常量
- 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 userStore = useUserStore()
- const userInfo = computed(() => userStore.userInfo)
- // 获取全局 Session 等,假设它们挂载在 uni 或 global 上
- const Session = {
- Get: (key, parse = false) => {
- const val = uni.getStorageSync(key)
- return parse ? JSON.parse(val) : val
- }
- }
- const handleFileUpdate = (val, type) => {
- if (type == '1') {
- params.requiteVoucherUrl = val
- }
- }
- const isZh = computed(() => ['cn', 'zhHant'].includes(locale.value))
- function isPdf(url, image) {
- let res = !!url
- if (image) {
- return res && url.substr(-3, 3) == 'pdf' &&
- url.substr(-3, 3) == 'PDF'
- }
- return res && (url.substr(-3, 3) == 'pdf' ||
- url.substr(-3, 3) == 'PDF')
- }
- const $pigeon = {
- MessageError: (msg) => uni.showToast({ title: msg, icon: 'none' }),
- MessageOK: (msg) => uni.showToast({ title: msg, icon: 'success' }),
- MessageWarning: (msg) => uni.showToast({ title: msg, icon: 'none' }),
- MessageConfirm: (msg, title, confirmText, cancelText, onConfirm, onCancel, options = {}) => {
- uni.showModal({
- title,
- content: msg,
- confirmText,
- cancelText,
- success: (res) => {
- if (res.confirm) onConfirm && onConfirm()
- else if (res.cancel) onCancel && onCancel()
- }
- })
- }
- }
- const $route = { query: {} } // 需从外部注入
- // 响应式数据
- const loginValue = ref("")
- const loginValueDoc = ref("")
- const metaInfo = ref(null)
- const text1 = ref("")
- const dialogKyc = ref(false)
- const requiteVoucherUrl = ref("")
- const limitedStatus = ref(null)
- const limitedStatusCheck = ref(false)
- const pictLoadingImg = ref(false)
- const flag = ref(false)
- const RES = ref("")
- const imgUrl = ref(Host80)
- const Host05 = ref(Config.Host05)
- const loginOptions = ref([])
- const code = ref("")
- const selectCodes = ref("")
- const bankValid = ref("")
- const requestUrl = ref("")
- const isStep3 = ref(false)
- const step2 = ref(false)
- const step3 = ref(false)
- const value = ref("")
- const giveLoginJoin = ref("")
- const openType = ref("")
- const dialogInfoTradingAdd = ref(false)
- const ruleForm = reactive({
- bankInfo: [],
- bankWrit: [],
- bankCredit: []
- })
- const bankInfoList = ref([])
- const bank = ref("")
- const myId = ref(null)
- const bankPayType = ref("")
- const form = reactive({})
- const dialogDealResult = ref(false)
- const dialogDealResult_form = reactive({})
- const DealResultType = ref(null)
- const DealResultResult = ref("")
- const dialogDealResultTitle = ref("")
- const anshiClose = ref(true)
- const isChannel = ref(true)
- const pictLoading = ref(false)
- const tableData = reactive({
- International_Transfer: [],
- China_UnionPay: [],
- Digital_Currency: [],
- Electronic_Wallet: [],
- Ucard_Wallet: []
- })
- const tableData1 = reactive({
- International_Transfer: [],
- China_UnionPay: [],
- Digital_Currency: [],
- Electronic_Wallet: [],
- Ucard_Wallet: []
- })
- //通道table-选择前后
- const activeTab = ref(1)
- // 🔥 自动过滤掉空数据的 tab
- const tabsConfig = computed(() => {
- const allTabs = [
- { text: t('Custom.Deposit.Channel3'), value: 1, type: 'Digital_Currency' },
- { text: t('Custom.Deposit.Channel2'), value: 2, type: 'China_UnionPay' },
- { text: t('Custom.Deposit.Channel4'), value: 3, type: 'Electronic_Wallet' },
- { text: t('Custom.Deposit.Channel1'), value: 4, type: 'International_Transfer' },
- { text: t('card.title'), value: 5, type: 'Ucard_Wallet' },
- ]
- // ✅ 只保留有数据的 tab
- return allTabs.filter(tab => {
- console.log(tableData1[tab.type], tab.type);
- return tableData1[tab.type]?.length > 0
- })
- })
- // 当前选中的 tab 项
- const currentTab = computed(() => tabsConfig.value.find(t => t.value === activeTab.value))
- // 当前要渲染的表格数据
- const currentTableData = computed(() => {
- const type = currentTab.value?.type
- return type ? tableData[type] || [] : []
- })
- // ✅ 监听 tab 变化,自动选中第一个有数据的 tab
- watch(
- tabsConfig,
- (newTabs) => {
- if (newTabs.length > 0) {
- activeTab.value = newTabs[0].value // 选中第一个
- }
- },
- { immediate: true }
- )
- watch(
- currentTab,
- (newTabs) => {
- // showTable()
- },
- { immediate: true }
- )
- const bankDate = ref([])
- const channelData = reactive({})
- const WireTransferAccount = reactive({})
- const actionAdd1 = ref("")
- const actionAdd2 = ref(Host04 + "/activity/requite/voucher/upload")
- const imageUrl = ref("")
- const imageUrl1 = ref("")
- const introduce = reactive({
- introduce: "",
- enIntroduce: ""
- })
- const params = reactive({
- amount: "",
- amount1: "",
- promoCode: "",
- agree: false,
- agree2: false,
- agree3: false,
- agree4: false,
- agree5: false,
- agree6: false
- })
- const resetForm = () => {
- //表单重置后,需要手动重置一些状态
- params.amount = ""
- params.amount1 = ""
- params.promoCode = ""
- params.agree = false
- params.agree2 = false
- params.agree3 = false
- params.agree4 = false
- params.agree5 = false
- params.agree6 = false
- form.bankUname = undefined
- form.bankCardNum = undefined
- form.cvv = undefined
- form.expiryMonth = undefined
- form.expiryYear = undefined
- form.pin = undefined
- amountErrorMessage.value = ""
- }
- const formRef = ref(null)
- const mAmount = reactive({
- minAmount: "",
- maxAmount: ""
- })
- const dialogCheck = ref(false)
- const dialogVisible = ref(false)
- const dialogCheckWait = ref(false)
- const dialogCheckOK = ref(false)
- const goPayLink = ref("")
- const dialogCheckConfirm = ref(false)
- const dialogCheckConfirm_form = reactive({
- confirmName: "",
- confirmAreaCode: "",
- confirmPhone: ""
- })
- const dialogClause = ref(false)
- const dialogClause1 = ref(false)
- const dialogClauseNZ = ref(false)
- const dialogClauseNZTwo = ref(false)
- const dialogClauseNewList = ref(false)
- const ACCType = ref(null)
- const CheckExistSuccess = ref(false)
- const dialogChinaUnionPay = ref(false)
- const tableData4Flag = ref(false)
- const tableData4 = reactive({})
- const tableData4TwoFlag = ref(false)
- const tableData4Two = reactive({})
- const tableDataNewListFlag = ref(false)
- const tableDataNewList = reactive({})
- const dialogDontActive = ref(false)
- const dialogVietnamNotice = ref(false)
- const tableDataNewYear24Flag = ref(false)
- const tableDataNewYear24 = ref(false)
- const rules = computed(() => ({
- amount: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.amount.format1'),
- },
- {
- validateFunction: (rule, value, data, callback) => {
- // 空值处理:直接报格式错误
- if (!value) {
- callback(t('vaildate.amount.format1'))
- return false
- }
- // 范围校验
- if (
- mAmount.minAmount &&
- mAmount.maxAmount &&
- (Number(mAmount.minAmount) > Number(value) ||
- Number(mAmount.maxAmount) < Number(value))
- ) {
- callback(
- t('vaildate.amount.amount') +
- mAmount.minAmount +
- ' - ' +
- mAmount.maxAmount
- )
- return false
- }
- // 正整数校验(原正则)
- if (!/^[1-9]\d*$/.test(value)) {
- callback(t('vaildate.amount.format1'))
- return false
- }
- return true
- },
- trigger: 'change',
- },
- ],
- },
- agree: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.agree.empty'),
- trigger: 'change',
- },
- ],
- },
- confirmAreaCode: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.input.empty'),
- trigger: 'blur',
- },
- ],
- },
- confirmPhone: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.input.empty'),
- trigger: 'blur',
- },
- ],
- },
- myId: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.select.empty'),
- trigger: 'change',
- },
- ],
- },
- pin: {
- rules: [
- {
- required: true,
- errorMessage: t('PersonalManagement.Label.item1'),
- trigger: 'blur',
- },
- ],
- },
- phone: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.input.empty'),
- trigger: 'blur',
- },
- ],
- },
- otp: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.input.empty'),
- trigger: 'blur',
- },
- ],
- },
- state: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.input.empty'),
- trigger: 'blur',
- },
- ],
- },
- city: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.input.empty'),
- trigger: 'blur',
- },
- ],
- },
- country: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.select.empty'),
- trigger: 'change',
- },
- ],
- },
- address: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.input.empty'),
- trigger: 'blur',
- },
- ],
- },
- zipCode: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.input.empty'),
- trigger: 'blur',
- },
- ],
- },
- }))
- const amountErrorMessage = ref('')
- const validateAmount = (value) => {
- const amount = params.amount
- if (!amount && amount !== 0) {
- amountErrorMessage.value = t('vaildate.amount.format1')
- return false
- }
- if (mAmount.minAmount && mAmount.maxAmount) {
- const min = Number(mAmount.minAmount);
- const max = Number(mAmount.maxAmount);
- const numValue = Number(amount);
- if (numValue < min || numValue > max) {
- amountErrorMessage.value = t('vaildate.amount.amount') + min + '-' + max
- return false
- }
- }
- if (!/^[1-9]\d*$/.test(amount)) {
- amountErrorMessage.value = t('vaildate.amount.format1')
- return false
- }
- amountErrorMessage.value = ''
- return true
- }
- const NewYear24Data = reactive({
- balance: 0,
- income: 0,
- rate: 0,
- index: 0
- })
- const AccessToken = computed(() => ({
- "Access-Token": Session.Get("access_token")
- }))
- const lang = computed(() => {
- return locale.value == "en" && document.body.clientWidth < 1200
- })
- const langCN = computed(() => locale.value)
- const isSupportedCountry = computed(() => {
- try {
- const country = userInfo.value.customInfo.country
- return countries.includes(country)
- } catch {
- return false
- }
- })
- const country = computed(() => {
- return userInfo.value.customInfo.country
- })
- const userName = computed(() => {
- let first = userInfo.value.customInfo.firstName
- let last = userInfo.value.customInfo.lastName
- let middle = userInfo.value.customInfo.middle
- if (!first && !last && !middle) return false
- return (first ? first + " " : "") + (middle ? middle + " " : "") + (last ? last : "")
- })
- const areaCode = computed(() => userInfo.value.customInfo.areaCode)
- const phone = computed(() => userInfo.value.customInfo.phone)
- // 是否是国庆节
- 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 groupTitleMap = {
- 1: 'Custom.Deposit.Channel1',
- 2: 'Custom.Deposit.Channel2',
- 3: 'Custom.Deposit.Channel3',
- 4: 'Custom.Deposit.Channel4',
- 5: 'card.title'
- }
- // 排序表格数据
- const sortedTableData = computed(() => {
- const order = [
- tableData.Digital_Currency,
- tableData.China_UnionPay,
- tableData.Electronic_Wallet,
- tableData.International_Transfer,
- tableData.Ucard_Wallet
- ]
- return order.filter(item => item && item.length > 0)
- })
- // 方法
- const isAfterJuly21 = () => {
- const currentDate = new Date()
- const july21 = new Date(currentDate.getFullYear(), 6, 21)
- return currentDate >= july21
- }
- // 货币
- const groupCurrency = (type) => {
- if (type == "GBP") return ": £"
- else if (type == "USD") return ": $"
- else if (type == "EUR") return ": €"
- else if (type == "USC") return ": ¢"
- else return ": $"
- }
- // 货币符号
- const groupCurrency1 = (type) => {
- if (type == "GBP") return "£"
- else if (type == "USD") return "$"
- else if (type == "EUR") return "€"
- else if (type == "USC") return "¢"
- else return "$"
- }
- // 选择银行
- const selectCode = (codeVal) => {
- bankDate.value.forEach(item => {
- if (item.code == codeVal) {
- selectCodes.value = lang.value == "cn" ? item.name : item.enName
- mAmount.minAmount = item.minAmount || mAmount.minAmount
- mAmount.maxAmount = item.maxAmount || mAmount.maxAmount
- channelData.rate = item.rate || channelData.rate
- channelData.transformCurrency = item.currency || channelData.transformCurrency
- }
- })
- }
- // 账户类型
- const groupTypeName = (type) => {
- if (type == "1") return t("AccountType.ClassicAccount")
- else if (type == "2") return t("AccountType.SeniorAccount")
- 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")
- }
- const selectChange = () => {
- // 强制更新,在 Vue 3 中通常不需要
- }
- const handleProgress1 = () => {
- pictLoadingImg.value = true
- }
- const handleAvatarError1 = (err) => {
- let errorMessage = t("Msg.Fail")
- if (err && err.status) {
- switch (err.status) {
- case 400: errorMessage = t("Msg.UploadInvalidFormat"); break
- case 401: errorMessage = t("Msg.UploadUnauthorized"); break
- case 403: errorMessage = t("Msg.UploadForbidden"); break
- case 413: errorMessage = t("Msg.UploadFileTooLarge"); break
- case 500: errorMessage = t("Msg.UploadServerError"); break
- case 502:
- case 503:
- case 504: errorMessage = t("Msg.UploadNetworkError"); break
- default:
- if (err.message) errorMessage = err.message
- else if (err.response && err.response.data && err.response.data.msg) errorMessage = err.response.data.msg
- }
- } else if (err && err.message) {
- if (err.message.includes("Network Error") || err.message.includes("timeout")) errorMessage = t("Msg.UploadNetworkError")
- else if (err.message.includes("File too large")) errorMessage = t("Msg.UploadFileTooLarge")
- else errorMessage = err.message
- }
- $pigeon.MessageError(errorMessage)
- pictLoadingImg.value = false
- }
- const handleAvatarSuccess1 = (res) => {
- if (res.code == Code.StatusOK) {
- $pigeon.MessageOK(res.msg)
- imageUrl1.value = res.data
- requiteVoucherUrl.value = res.data
- } else {
- uni.showToast({ title: res.msg, icon: 'none' })
- }
- pictLoadingImg.value = false
- }
- // 上传凭证前校验
- const beforeAvatarUpload1 = (file) => {
- const isJPG = isImageType.checkFile(file.type)
- const isLt2M = isImageType.checkSize(file.size)
- if (!isJPG) $pigeon.MessageError(t("Msg.JPG"))
- if (!isLt2M) $pigeon.MessageError(t("Msg.3IMG"))
- return isJPG && isLt2M
- }
- // 上传凭证进度
- const handleProgress = () => {
- pictLoadingImg.value = true
- }
- // 上传凭证失败
- const handleAvatarError = (err) => {
- let errorMessage = t("Msg.Fail")
- if (err && err.status) {
- switch (err.status) {
- case 400: errorMessage = t("Msg.UploadInvalidFormat"); break
- case 401: errorMessage = t("Msg.UploadUnauthorized"); break
- case 403: errorMessage = t("Msg.UploadForbidden"); break
- case 413: errorMessage = t("Msg.UploadFileTooLarge"); break
- case 500: errorMessage = t("Msg.UploadServerError"); break
- case 502:
- case 503:
- case 504: errorMessage = t("Msg.UploadNetworkError"); break
- default:
- if (err.message) errorMessage = err.message
- else if (err.response && err.response.data && err.response.data.msg) errorMessage = err.response.data.msg
- }
- } else if (err && err.message) {
- if (err.message.includes("Network Error") || err.message.includes("timeout")) errorMessage = t("Msg.UploadNetworkError")
- else if (err.message.includes("File too large")) errorMessage = t("Msg.UploadFileTooLarge")
- else errorMessage = err.message
- }
- $pigeon.MessageError(errorMessage)
- pictLoadingImg.value = false
- }
- // 上传凭证
- const handleUploadDeposit = (options) => {
- const originalUrl = actionAdd1.value || Config.Host80 + "/common/upload"
- return createUploadRequest(originalUrl, AccessToken.value, 1)(options)
- }
- // 上传凭证成功
- const handleAvatarSuccess = (res) => {
- if (res.code == Code.StatusOK) {
- $pigeon.MessageOK(res.msg)
- imageUrl.value = res.data
- requiteVoucherUrl.value = res.data
- } else {
- uni.showToast({ title: res.msg, icon: 'none' })
- }
- pictLoadingImg.value = false
- }
- // 上传凭证前校验
- const beforeAvatarUpload = (file) => {
- const isJPG = isImageType.checkFile(file.type)
- const isLt2M = isImageType.checkSize(file.size)
- if (!isJPG) $pigeon.MessageError(t("Msg.JPG"))
- if (!isLt2M) $pigeon.MessageError(t("Msg.3IMG"))
- return isJPG && isLt2M
- }
- // 打开添加银行弹窗
- const openAddBankCard = () => {
- if (ruleForm.bankCredit.length == 2) {
- $pigeon.MessageConfirm(
- t("Msg.WireTransfers"),
- t("Msg.SystemPrompt"),
- t("Btn.Confirm"),
- t("Btn.Cancel"),
- async () => { },
- () => { }
- )
- } else {
- openType.value = "add_CreditCard"
- dialogInfoTradingAdd.value = true
- }
- }
- const closeDiaAdd = () => {
- dialogInfoTradingAdd.value = false
- }
- // 关闭添加银行弹窗
- const closeAdd = (val) => {
- dialogInfoTradingAdd.value = val
- }
- // 确认重新加载银行信息
- const confirmToReload = () => {
- dialogInfoTradingAdd.value = false
- getBankInfo()
- }
- // 获取银行信息
- const getBankInfo = async () => {
- let res = await financialApi.customBankList({})
- if (res.code == Code.StatusOK) {
- ruleForm.bankCredit = []
- res.data.forEach(item => {
- if (item.type == 3) {
- item.customBankCode = item.bankCode
- item.bankCode = null
- ruleForm.bankCredit.push(item)
- }
- if (item.defaultBank && item.type == 3) {
- myId.value = item.id
- form.bankUname = item.bankUname
- form.bankCardNum = item.bankCardNum
- form.cvv = item.cvv
- form.expiryMonth = item.expiryMonth
- form.expiryYear = item.expiryYear
- form.pin = item.pin
- }
- })
- } else {
- uni.showToast({ title: res.msg, icon: 'none' })
- }
- }
- // 选择银行
- const chooseBank = (item) => {
- if (formRef.value) formRef.value.clearValidate()
- form.bankUname = item.bankUname
- form.bankCardNum = item.bankCardNum
- form.cvv = item.cvv
- form.expiryMonth = item.expiryMonth
- form.expiryYear = item.expiryYear
- form.pin = item.pin
- }
- // 返回首页
- const toHome = () => {
- uni.switchTab({ url: "/pages/customer/index" })
- }
- // 提交确认信息弹窗
- const submitConfirm = async () => {
- console.log(params.requiteVoucherUrl, 1212);
- if (channelData.confirmCreditCard == 1 && !myId.value) {
- $pigeon.MessageWarning(t("PersonalManagement.Label.selectCreditCard"))
- return
- }
- if (channelData.bankValid == 1 && !code.value) {
- $pigeon.MessageWarning(t("vaildate.depositCurrency.empty"))
- return
- }
- if ((channelData.code == "UNION_PAY_TELEGRAPHIC" || channelData.code == "UNION_PAY_TELEGRAPHIC_SPECIAL" || channelData.code == "UNION_PAY_TELEGRAPHIC_TWO") && !imageUrl.value) {
- $pigeon.MessageWarning(t("vaildate.depositVoucher.empty"))
- return
- }
- if (params.promoCode && params.agree2) {
- $pigeon.MessageWarning(t("news_add_field.Des.item2"))
- return
- }
- if (params.promoCode && params.agree3) {
- $pigeon.MessageWarning(t("news_add_field.Des.item2"))
- return
- }
- if (params.promoCode && params.agree4) {
- $pigeon.MessageWarning(t("news_add_field.Des.item2"))
- return
- }
- if (params.promoCode && params.agree5) {
- $pigeon.MessageWarning(t("news_add_field.Des.item2"))
- return
- }
- if (params.promoCode && params.agree6) {
- $pigeon.MessageWarning(t("news_add_field.Des.item2"))
- return
- }
- if (channelData.code && channelData.code.indexOf('DIGITAL_PAY_TYPE_KEY') === 0 && !imageUrl.value) {
- $pigeon.MessageWarning(t("vaildate.depositVoucher.empty"))
- return
- }
- try {
- if (formRef.value) {
- await formRef.value.validate()
- openDontActive()
- }
- } catch (error) {
- if (error instanceof Array) {
- uni.showToast({ title: error[0].errorMessage, icon: 'none' });
- return
- } else {
- responseMessage.value = error.msg;
- }
- }
- }
- // 打开不参加活动弹窗
- const openDontActive = () => {
- if (!tableData4Flag.value && !tableData4TwoFlag.value && !tableDataNewListFlag.value && (country.value != "CN" || (country.value == "CN" && (ACCType.value == 1 || ACCType.value == 2 || ACCType.value == 7))) && ACCType.value != 3 && params.agree2) {
- tosubmitConfirm()
- return
- }
- if (tableData4Flag.value && params.agree4) {
- tosubmitConfirm()
- return
- }
- if (tableData4TwoFlag.value && params.agree5) {
- tosubmitConfirm()
- return
- }
- if (tableDataNewListFlag.value && params.agree6) {
- tosubmitConfirm()
- return
- }
- if (limitedStatus.value && limitedStatusCheck.value) {
- tosubmitConfirm()
- return
- }
- if ((ACCType.value == 1 || ACCType.value == 2 || ACCType.value == 5 || ACCType.value == 6 || ACCType.value == 7) && anshiClose.value && params.agree3) {
- tosubmitConfirm()
- return
- }
- tosubmitConfirm()
- }
- // 打开提交前信息弹窗
- const tosubmitConfirm = () => {
- dialogDontActive.value = false
- dialogCheckConfirm_form.confirmAreaCode = areaCode.value
- dialogCheckConfirm_form.confirmPhone = phone.value
- dialogCheckConfirm.value = true
- }
- // 最后确认
- const dialogSuccess = computed(() => dialogCheckOK.value && dialogVisible.value)
- // 最后失败
- const dialogError = computed(() => dialogCheckOK.value && !dialogVisible.value)
- // 提交后确认
- const dialogCheckSuccess = computed(() => dialogCheck.value && dialogVisible.value)
- // 提交后失败
- const dialogCheckError = computed(() => dialogCheck.value && !dialogVisible.value)
- // 提交申请
- const submit = async () => {
- if (flag.value) return
- flag.value = true
- dialogCheckConfirm.value = false
- dialogCheckWait.value = true
- try {
- if (channelData.code == "UNION_PAY_TELEGRAPHIC" || channelData.code == "UNION_PAY_TELEGRAPHIC_SPECIAL" || channelData.code == "UNION_PAY_TELEGRAPHIC_TWO") {
- let res = await financialApi.telegraphicPay({
- requiteVoucherUrl: imageUrl1.value,
- amount: params.amount,
- login: $route.query.login,
- voucherUrl: imageUrl.value,
- activityDeposit: params.agree2 ? 1 : 0,
- activityPercentageGive: params.agree3 ? 1 : 0,
- activityMidyearTenPercentGive: params.agree4 ? 1 : 0,
- activityTwoPercentGive: params.agree5 ? 1 : 0,
- activityGive: params.agree6 ? 1 : 0,
- promoCode: params.promoCode,
- code: channelData.code,
- bankMsg: WireTransferAccount.bankMsg || "",
- name: channelData.confirmName ? userName.value : null,
- areaCode: channelData.confirmAreaCode ? dialogCheckConfirm_form.confirmAreaCode : null,
- phone: channelData.confirmPhone ? dialogCheckConfirm_form.confirmPhone : null,
- ip: uni.getStorageSync("CLIENT")
- })
- dialogCheckWait.value = false
- if (res.code == Code.StatusOK) {
- imageUrl1.value = ""
- limitedStatusCheck.value = false
- dialogCheckOK.value = true
- dialogVisible.value = true
- flag.value = false
- } else {
- RES.value = res.msg
- dialogCheckOK.value = true
- dialogVisible.value = false
- flag.value = false
- }
- } else if (channelData.code && channelData.code.indexOf('DIGITAL_PAY_TYPE_KEY') === 0) {
- let res = await financialApi.digitalPay({
- requiteVoucherUrl: imageUrl1.value,
- amount: params.amount,
- login: $route.query.login,
- voucherUrl: imageUrl.value,
- activityDeposit: params.agree2 ? 1 : 0,
- activityPercentageGive: params.agree3 ? 1 : 0,
- activityMidyearTenPercentGive: params.agree4 ? 1 : 0,
- activityTwoPercentGive: params.agree5 ? 1 : 0,
- activityGive: params.agree6 ? 1 : 0,
- promoCode: params.promoCode,
- ip: uni.getStorageSync("CLIENT")
- })
- dialogCheckWait.value = false
- if (res.code == Code.StatusOK) {
- dialogCheckOK.value = true
- dialogVisible.value = true
- flag.value = false
- } else {
- RES.value = res.msg
- dialogCheckOK.value = true
- dialogVisible.value = false
- flag.value = false
- }
- } else {
- let par = ""
- if (channelData.bankValid == 1) {
- par = `${channelData.requestUrl}/${loginValue.value}/${params.amount}/${code.value}/${(params.agree2 ? 1 : 0)}`
- } else {
- par = `${channelData.requestUrl}/${loginValue.value}/${params.amount}/${(params.agree2 ? 1 : 0)}`
- }
- let res = await financialApi.PayBankCode(par, {
- requiteVoucherUrl: imageUrl1.value,
- promoCode: params.promoCode,
- name: channelData.confirmName ? userName.value : null,
- areaCode: channelData.confirmAreaCode ? dialogCheckConfirm_form.confirmAreaCode : null,
- phone: channelData.confirmPhone ? dialogCheckConfirm_form.confirmPhone : null,
- activityPercentageGive: params.agree3 ? 1 : 0,
- activityMidyearTenPercentGive: params.agree4 ? 1 : 0,
- activityTwoPercentGive: params.agree5 ? 1 : 0,
- activityGive: params.agree6 ? 1 : 0,
- ip: uni.getStorageSync("CLIENT"),
- ...form
- })
- dialogCheckWait.value = false
- if (res.code == Code.StatusOK) {
- if (res.data && (res.data.type == 3 || res.data.type == 4 || res.data.type == 6 || res.data.type == 7)) {
- dealResult(res.data)
- } else {
- if (res.data.type == 1) {
- goPayLink.value = res.data.result
- window.open(res.data.result)
- } else if (res.data.type == 2) {
- let token = AccessToken.value["Access-Token"]
- token = tool.tokenReplace(token)
- goPayLink.value = `${Host04}/finance/deposit/get?serial=${res.data.result}&Access-Token=${token}`
- window.open(goPayLink.value)
- } else if (res.data.type == 5) {
- $pigeon.MessageConfirm(
- t("PersonalManagement.Label.item2"),
- t("Msg.SystemPrompt"),
- t("Btn.Cancel"),
- t("Btn.Confirm"),
- async () => { },
- () => {
- goPayLink.value = res.data.result
- dialogCheck.value = true
- dialogVisible.value = true
- window.open(res.data.result)
- }
- )
- } else if (res.data.type == 8) {
- goPayLink.value = Host04 + res.data.result
- window.open(goPayLink.value)
- } else if (res.data.type == 9) {
- goPayLink.value = setCardUrl(res.data.result)
- window.open(goPayLink.value)
- } else if (res.data.type == 10) {
- goPayLink.value = Host80 + '/pay/onchainpay.html?params=' + res.data.result
- window.open(goPayLink.value)
- }
- if (res.data.type != 5) {
- dialogCheck.value = true
- dialogVisible.value = true
- }
- }
- flag.value = false
- } else {
- RES.value = res.msg
- dialogCheck.value = true
- dialogVisible.value = false
- flag.value = false
- }
- }
- } catch (error) {
- dialogCheckWait.value = false
- flag.value = false
- dialogCheckOK.value = true
- dialogVisible.value = false
- RES.value = error.msg
- }
- }
- const setCardUrl = (serial) => {
- let params = `${AccessToken.value["Access-Token"]}/${locale.value}/${serial}/1/pay`
- return initLink({ link: imgUrl.value + '/pay/paycard.html', params })
- }
- //处理申请返回result
- const dealResult = (data) => {
- DealResultType.value = data.type
- DealResultResult.value = data.result
- if (data.type == 3) {
- dialogDealResult_form.pin = ""
- } else if (data.type == 4) {
- dialogDealResult_form.otp = ""
- } else if (data.type == 6) {
- dialogDealResult_form.state = userInfo.value.state
- dialogDealResult_form.city = userInfo.value.city
- dialogDealResult_form.country = (["cn", "zhHant"].indexOf(locale.value) != -1) ? userInfo.value.countryName : userInfo.value.countryEnName
- dialogDealResult_form.address = (userInfo.value.addressLines && userInfo.value.addressLines[0]) || ""
- dialogDealResult_form.zipCode = userInfo.value.zipCode
- dialogDealResultTitle.value = t("PersonalManagement.Label.item3")
- } else if (data.type == 7) {
- dialogDealResult_form.phone = userInfo.value.phone
- dialogDealResultTitle.value = t("PersonalManagement.Label.item4")
- }
- dialogDealResult.value = true
- }
- //重新提交
- const submitDealResult = async () => {
- if (flag.value) return
- flag.value = true
- dialogCheckConfirm.value = false
- dialogCheckWait.value = true
- let par = Host04 + DealResultResult.value
- let dataList = {}
- if (DealResultType.value == 3) dataList = { pin: dialogDealResult_form.pin }
- else if (DealResultType.value == 4) dataList = { otp: dialogDealResult_form.otp }
- else if (DealResultType.value == 6) {
- dataList = {
- state: dialogDealResult_form.state,
- city: dialogDealResult_form.city,
- country: dialogDealResult_form.country,
- address: dialogDealResult_form.address,
- zipCode: dialogDealResult_form.zipCode
- }
- } else if (DealResultType.value == 7) dataList = { phone: dialogDealResult_form.phone }
- let res = await financialApi.PayDealResult(par, dataList)
- dialogCheckWait.value = false
- dialogDealResult.value = false
- if (res.code == Code.StatusOK) {
- if (res.data && (res.data.type == 3 || res.data.type == 4 || res.data.type == 6 || res.data.type == 7)) {
- dealResult(res.data)
- } else {
- if (res.data.type == 1) {
- goPayLink.value = res.data.result
- window.open(res.data.result)
- } else if (res.data.type == 2) {
- let token = AccessToken.value["Access-Token"]
- token = tool.tokenReplace(token)
- goPayLink.value = `${Host04}/finance/deposit/get?serial=${res.data.result}&Access-Token=${token}`
- window.open(goPayLink.value)
- } else if (res.data.type == 5) {
- $pigeon.MessageConfirm(
- t("PersonalManagement.Label.item2"),
- t("Msg.SystemPrompt"),
- t("Btn.Cancel"),
- t("Btn.Confirm"),
- async () => { },
- () => {
- goPayLink.value = res.data.result
- dialogCheck.value = true
- dialogVisible.value = true
- window.open(res.data.result)
- }
- )
- } else if (res.data.type == 8) {
- goPayLink.value = Host04 + res.data.result
- window.open(goPayLink.value)
- } else if (res.data.type == 9) {
- dialogCheckOK.value = true
- dialogVisible.value = true
- flag.value = false
- return
- }
- if (res.data.type != 5) {
- dialogCheck.value = true
- dialogVisible.value = true
- }
- }
- flag.value = false
- } else {
- RES.value = res.msg
- dialogCheck.value = true
- dialogVisible.value = false
- flag.value = false
- dialogDealResult.value = false
- }
- }
- const closeDia = () => {
- dialogCheck.value = false
- dialogVisible.value = false
- dialogCheckOK.value = false
- isStep3.value = false
- step2.value = false
- showTable()
- loginValue.value = ""
- }
- const isStep3Open = () => {
- isStep3.value = true
- //中国网银弹窗
- if (tableData.China_UnionPay.length && tableData.China_UnionPay[0].type == 2) {
- 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)
- let newTime = now.getHours().toString()
- if ((newTime.length == 1 && newTime >= 0 && newTime < 8) || (newTime.length == 2 && newTime >= 22 && newTime < 24)) {
- dialogChinaUnionPay.value = true
- }
- }
- }
- // 判断是否在9月30日晚上12点之后,用于隐藏特定活动
- const isAfterSeptember30 = () => {
- // const currentDate = new Date();
- // const september30 = new Date(
- // currentDate.getFullYear(),
- // 8,
- // 30,
- // 23,
- // 59,
- // 59
- // ); // 月份从0开始,8表示9月,设置为23:59:59
- // return currentDate > september30;
- return true
- }
- const getMetaInfo = () => {
- metaInfo.value = window.getMetaInfo()
- metaInfo.value = { ...metaInfo.value, deviceType: "h5" }
- }
- //获取kyc二维码
- const qrCode = async (depositChannelCode, row) => {
- getMetaInfo()
- let res = await activityApi.getWebsdkLink({
- depositChannelCode,
- metaInfo: metaInfo.value
- })
- if (res.code == Code.StatusOK) {
- if (res.data) {
- text1.value = JSON.parse(res.data).url
- dialogKyc.value = true
- flag.value = false
- } else {
- doShowStep3(row)
- }
- } else {
- flag.value = false
- uni.showToast({ title: res.msg, icon: 'none' })
- }
- }
- const doShowStep3 = (row) => {
- if (row.confirmCreditCard == 1) getBankInfo()
- getCheckExistSuccess()
- if (row.bankValid && isChannel.value) {
- getBankList(row)
- isChannel.value = false
- step3.value = true
- Object.assign(channelData, row)
- mAmount.minAmount = row.minAmount
- mAmount.maxAmount = row.maxAmount
- } else {
- step3.value = true
- bankDate.value = []
- Object.assign(channelData, row)
- mAmount.minAmount = row.minAmount
- mAmount.maxAmount = row.maxAmount
- }
- tableData.International_Transfer = []
- tableData.China_UnionPay = []
- tableData.Digital_Currency = []
- tableData.Electronic_Wallet = []
- tableData.Ucard_Wallet = []
- if (row.type == 1) tableData.International_Transfer[0] = row
- if (row.type == 2) tableData.China_UnionPay[0] = row
- if (row.type == 3) tableData.Digital_Currency[0] = row
- if (row.type == 4) tableData.Electronic_Wallet[0] = row
- if (row.type == 5) tableData.Ucard_Wallet[0] = row
- introduce.introduce = row.introduce
- introduce.enIntroduce = row.enIntroduce
- if (row.code == "UNION_PAY_TELEGRAPHIC" || row.code == "UNION_PAY_TELEGRAPHIC_SPECIAL" || row.code == "UNION_PAY_TELEGRAPHIC_TWO" || (row.code && row.code.indexOf('DIGITAL_PAY_TYPE_KEY') === 0)) {
- let pro = []
- if (row.property && row.property.substring(0, 1) == "[") {
- pro = JSON.parse(row.property)
- } else if (row.property && row.property.substring(0, 1) != "[") {
- let proper = "[" + row.property + "]"
- pro = JSON.parse(proper)
- }
- let ind = pro.length
- if (ind) {
- let index = parseInt(Math.random() * ind + 1)
- Object.assign(WireTransferAccount, pro[index - 1])
- actionAdd1.value = Host80 + "/common/upload"
- } else {
- Object.assign(WireTransferAccount, {})
- actionAdd1.value = Host80 + "/common/upload"
- }
- }
- }
- //选择支付方式
- const isShowStep3 = (row) => {
- userStore.savePaymentChannel(row.code)
- userStore.saveChannelList(tableData)
- router.push(`/pages/customer/deposit?login=${loginValue.value}`)
- return
- if (row.kycChannel != 1) {
- doShowStep3(row)
- } else {
- qrCode(row.code, row)
- }
- }
- //更换支付方式
- const showTable = () => {
- resetForm();
- dialogCheckWait.value = false;
- dialogVisible.value = false;
- flag.value = false;
- form.bankUname = undefined
- form.bankCardNum = undefined
- form.cvv = undefined
- form.expiryMonth = undefined
- form.expiryYear = undefined
- form.pin = undefined
- myId.value = null
- step3.value = false
- isStep3.value = false
- params.amount = ""
- params.amount1 = ""
- params.agree = false
- params.agree2 = false
- params.agree3 = false
- params.agree4 = false
- params.agree5 = false
- params.agree6 = false
- params.promoCode = ""
- isChannel.value = true
- imageUrl.value = ""
- bankDate.value = []
- code.value = ""
- WireTransferAccount.bankMsg = ""
- introduce.introduce = ""
- introduce.enIntroduce = ""
- Object.assign(tableData, tableData1)
- }
- const loginComboxOptions = computed(() => {
- return loginOptions.value.map((item) => ({
- text: item.label,
- value: item.login
- }))
- })
- const creditCardOptions = computed(() => {
- return ruleForm.bankCredit.map((item, index) => ({
- text: `${item.bankUname}-${item.bankCardNum}`,
- value: item.id
- }))
- })
- const bankOptions = computed(() => {
- return bankDate.value.map((item, index) => ({
- text: (locale.value === 'cn' || locale.value === 'zhHant') ? item.name : item.enName,
- value: item.code
- }))
- })
- const loading = ref(false)
- // 获取账户信息
- const getDateList = async () => {
- loading.value = true
- let res = await customApi.CustomDropdown({ platform: "" })
- if (res.code == Code.StatusOK) {
- loginOptions.value = res.data.map(item => ({
- ...item,
- label: `${item.login} - ${groupTypeName(item.type)} - ${t('Custom.Deposit.AvailableBalance')}${groupCurrency(item.currency)}${item.balance}`
- }))
- const pages = getCurrentPages()
- const route = pages[pages.length - 1].$page?.options || {}
- if (route.login) {
- const found = loginOptions.value.find(opt => opt.login === Number(route.login))
- loginValue.value = found.login
- loginValueDoc.value = found.label
- step2.value = true
- }
- } else {
- uni.showToast({ title: res.msg, icon: 'none' })
- }
- loading.value = false
- }
- //获取入金通道
- const getDepositList = async () => {
- pictLoading.value = true
- tableData.International_Transfer = []
- tableData.China_UnionPay = []
- tableData.Digital_Currency = []
- tableData.Electronic_Wallet = []
- tableData.Ucard_Wallet = []
- let res = await financialApi.RemittanceChannelList({})
- if (res.code == Code.StatusOK) {
- res.data.forEach(item => {
- if (item.type == 1) tableData.International_Transfer.push(item), tableData1.International_Transfer.push(item)
- if (item.type == 2) tableData.China_UnionPay.push(item), tableData1.China_UnionPay.push(item)
- if (item.type == 3) tableData.Digital_Currency.push(item), tableData1.Digital_Currency.push(item)
- if (item.type == 4) tableData.Electronic_Wallet.push(item), tableData1.Electronic_Wallet.push(item)
- if (item.type == 5) tableData.Ucard_Wallet.push(item), tableData1.Ucard_Wallet.push(item)
- })
- pictLoading.value = false
- } else {
- uni.showToast({ title: res.msg, icon: 'none' })
- pictLoading.value = false
- }
- }
- //获取银行列表
- const getBankList = async (row) => {
- let res = await financialApi.BankList({ channelCode: row.code })
- try {
- if (res.code == Code.StatusOK) {
- let bank = res.data
- let data = []
- bank.forEach(j => {
- if (!j.minAmount && j.minAmount != 0) j.minAmount = row.minAmount
- if (!j.maxAmount && j.maxAmount != 0) j.maxAmount = row.maxAmount
- j.bankValid = row.bankValid
- j.requestUrl = row.requestUrl
- data.push(j)
- })
- bankDate.value = data
- } else {
- uni.showToast({ title: res.msg, icon: 'none' })
- }
- } catch (error) {
- uni.showToast({ title: error.msg, icon: 'none' })
- }
- }
- //获取20赠金活动信息
- const getCheckExistSuccess = async () => {
- let res = await financialApi.depositCheckExistSuccess({})
- if (res.code == Code.StatusOK) {
- CheckExistSuccess.value = res.data
- } else {
- uni.showToast({ title: res.msg, icon: 'none' })
- }
- }
- //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
- }
- //限时活动
- 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' })
- }
- }
- //2023年中赠金活动数据-10
- const Activity24nianzhongInfo = async () => {
- let res = await activityApi.Activity23nianzhongInfo({})
- if (res.code == Code.StatusOK) {
- Object.assign(tableData4, res.data)
- // const Data4 = {
- // "activityEndTime": null,
- // "activityStartTime": null,
- // "applicationEndTime": null,
- // "applicationStartTime": null,
- // "loginTypes": [5, 6],
- // "show": 1,
- // "useApply": 1
- // };
- // Object.assign(tableData4, Data4)
- // tableData4Flag.value = tableData4.show == 1 && tableData4.useApply == 1
- } else {
- uni.showToast({ title: res.msg, icon: 'none' })
- }
- }
- //2023年中赠金活动数据-20
- const Activity24nianzhongTwoInfo = async () => {
- let res = await activityApi.Activity23nianzhongTwoInfo({})
- if (res.code == Code.StatusOK) {
- Object.assign(tableData4Two, res.data)
- // const Data4 = {
- // "activityEndTime": null,
- // "activityStartTime": null,
- // "applicationEndTime": null,
- // "applicationStartTime": null,
- // "loginTypes": [5, 6],
- // "show": 1,
- // "useApply": 1
- // };
- // Object.assign(tableData4Two, Data4)
- // tableData4Flag.value = tableData4Two.show == 1 && tableData4Two.useApply == 1
- } else {
- uni.showToast({ title: res.msg, icon: 'none' })
- }
- }
- //2023年中赠金活动权限
- const get23nianzhongTwoLogin = async (newVal) => {
- let res = await activityApi.Activity23nianzhongTwoLogin({ login: newVal })
- if (res.code == Code.StatusOK) {
- Object.assign(tableData4Two, res.data)
- tableData4TwoFlag.value = tableData4Two.show == 1
- } else {
- uni.showToast({ title: res.msg, icon: 'none' })
- }
- }
- const getActivityExtensionGiveLogin = async (newVal) => {
- let res = await activityApi.ActivityExtensionGiveLogin({ login: newVal })
- if (res.code == Code.StatusOK) {
- Object.assign(tableDataNewList, res.data)
- tableDataNewListFlag.value = tableDataNewList.show == 1
- } else {
- uni.showToast({ title: res.msg, icon: 'none' })
- }
- }
- const getActivityExtensionGiveLoginJoin = async (newVal) => {
- let res = await activityApi.ActivityExtensionGiveLoginJoin({ login: newVal })
- if (res.code == Code.StatusOK) {
- giveLoginJoin.value = res.data
- } else {
- uni.showToast({ title: res.msg, icon: 'none' })
- giveLoginJoin.value = ""
- }
- }
- //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") toIncome()
- } else {
- uni.showToast({ title: res.msg, icon: 'none' })
- }
- }
- const toIncome = () => {
- let balance = Number(tableDataNewYear24.value.balance) || 0
- tableDataNewYear24.value.details.forEach((item, index) => {
- if (balance > item.min && balance <= item.max) {
- NewYear24Data.rate = item.rate
- NewYear24Data.index = item.index
- NewYear24Data.balance = (Number(tableDataNewYear24.value.details[index + 1].min) - balance).toFixed(2)
- NewYear24Data.income = ((Number(tableDataNewYear24.value.details[index + 1].min) * Number(tableDataNewYear24.value.details[index + 1].rate) / 100 / 365) * 365).toFixed(2)
- tableDataNewYear24Flag.value = true
- } else if (balance > item.min && balance >= item.max && item.max == 0) {
- tableDataNewYear24Flag.value = false
- }
- })
- }
- //24新年庆典 结束
- // 生命周期
- onMounted(() => {
- getDateList()
- // Activity24nianzhongInfo();
- // Activity24nianzhongTwoInfo();
- // dealResult({ "type": 7, "result": "/krad/pin?serial=123123" })
- })
- watch(isStep3, async (newVal) => {
- if (newVal) {
- await nextTick();
- formRef.value?.clearValidate(); // 先清除旧错误
- resetForm(); // 再重置数据(重置数据可能触发新校验)
- await nextTick();
- formRef.value?.clearValidate(); // 再次清除可能因数据重置产生的新错误
- }
- });
- // Watch
- watch(loginValue, (login) => {
- if (login) {
- step2.value = true
- getDepositList()
- loginOptions.value.forEach(item => {
- if (item.login == login) ACCType.value = item.type
- })
- const found = loginOptions.value.find(opt => opt.login === Number(login))
- loginValueDoc.value = found.label
- }
- })
- watch(() => params.amount, (newVal) => {
- if (newVal && channelData.rate) {
- params.amount1 = (newVal * channelData.rate).toFixed(2)
- }
- })
- watch(() => imageUrl, (newVal) => {
- }, { deep: true })
- watch(() => params.agree3, (newVal) => {
- if (newVal) {
- params.agree2 = false
- params.agree4 = false
- params.agree5 = false
- params.agree6 = false
- }
- })
- watch(() => params.agree2, (newVal) => {
- if (newVal) {
- params.agree3 = false
- params.agree4 = false
- params.agree5 = false
- params.agree6 = false
- }
- })
- watch(() => params.agree4, (newVal) => {
- if (newVal) {
- params.agree3 = false
- params.agree2 = false
- params.agree5 = false
- params.agree6 = false
- }
- })
- watch(() => params.agree5, (newVal) => {
- if (newVal) {
- params.agree3 = false
- params.agree2 = false
- params.agree4 = false
- params.agree6 = false
- }
- })
- watch(() => params.agree6, (newVal) => {
- if (newVal) {
- params.agree3 = false
- params.agree2 = false
- params.agree4 = false
- params.agree5 = false
- if (giveLoginJoin.value.flag == false) {
- let tips = ""
- if (giveLoginJoin.value.promptType == 1) tips = t("surplusList.item10")
- else tips = t("surplusList.item11")
- if (giveLoginJoin.value.activityCategory == 1) {
- $pigeon.MessageConfirm(
- tips,
- t("Msg.SystemPrompt"),
- t("surplusList.item12"),
- t("Home.msg.item3"),
- () => {
- $pigeon.MessageConfirm(
- t("surplusList.item13"),
- t("Msg.SystemPrompt"),
- t("Btn.Confirm"),
- t("Btn.Cancel"),
- async () => {
- try {
- const res = await activityApi.ActivityGiveCancel({ login: $route.query.login })
- if (res.code == Code.StatusOK) $pigeon.MessageOK(res.msg || t("Msg.Success"))
- else uni.showToast({ title: res.msg, icon: 'none' })
- } catch (error) {
- $pigeon.MessageError(t("Msg.Fail"))
- }
- },
- () => { params.agree6 = false }
- )
- },
- () => { },
- { showCancelButton: true }
- )
- } else if (giveLoginJoin.value.activityCategory == 2) {
- $pigeon.MessageConfirm(
- tips,
- t("Msg.SystemPrompt"),
- "跳转",
- t("Btn.Cancel"),
- () => {
- $pigeon.MessageConfirm(
- "是否跳转到对应活动取消",
- t("Msg.SystemPrompt"),
- t("Btn.Confirm"),
- t("Btn.Cancel"),
- () => {
- uni.navigateTo({ url: "/pages/customer/monthly/list" })
- },
- () => { params.agree6 = false }
- )
- },
- () => { },
- { showCancelButton: false }
- )
- } else {
- $pigeon.MessageConfirm(
- tips,
- t("Msg.SystemPrompt"),
- t("Btn.Confirm"),
- t("Btn.Cancel")
- )
- }
- }
- }
- })
- </script>
- <style lang="scss" scoped>
- @import "@/uni.scss";
- .custom-deposit {
- .crm-title-box {
- margin-bottom: px2rpx(20);
- .tit {
- font-size: px2rpx(20);
- font-weight: 700;
- color: var(--bs-heading-color);
- }
- }
- .box {
- margin-bottom: px2rpx(20);
- .b-card {
- border: 1px solid var(--bs-border-color);
- border-radius: px2rpx(12);
- padding: px2rpx(20);
- box-shadow: 0 px2rpx(4) px2rpx(12) rgba(0, 0, 0, 0.03);
- .card-top {
- .tit {
- font-size: px2rpx(16);
- font-weight: 600;
- margin-bottom: px2rpx(16);
- display: flex;
- align-items: center;
- color: var(--bs-heading-color);
- position: relative;
- padding-left: 20px;
- &:after {
- content: '';
- position: absolute;
- left: 0;
- top: 50%;
- transform: translateY(-50%);
- width: 0;
- height: 0;
- border-top: 6px solid transparent;
- border-bottom: 6px solid transparent;
- border-left: 8px solid currentColor;
- }
- }
- }
- .channelType {
- font-size: px2rpx(15);
- font-weight: 600;
- margin: px2rpx(24) 0 px2rpx(12);
- color: var(--color-navy-700);
- padding-left: px2rpx(8);
- border-left: px2rpx(4) solid var(--color-primary);
- }
- }
- }
- .reselect-btn {
- margin-top: px2rpx(20);
- display: flex;
- justify-content: flex-end;
- .reselect {
- background-color: var(--color-zinc-100);
- color: var(--color-navy-700);
- border: none;
- font-size: px2rpx(14);
- padding: px2rpx(8) px2rpx(20);
- border-radius: px2rpx(8);
- &:active {
- background-color: var(--color-zinc-200);
- }
- }
- }
- .s-btn[type="primary"] {
- width: 100%;
- height: px2rpx(48);
- background-color: #cf1322;
- color: var(--bs-emphasis-color);
- border-radius: px2rpx(12);
- font-size: px2rpx(16);
- font-weight: 600;
- display: flex;
- align-items: center;
- justify-content: center;
- border: none;
- margin-top: px2rpx(30);
- transition: all 0.2s;
- &:active {
- transform: scale(0.98);
- background-color: #cf1322;
- }
- }
- .add-back {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: px2rpx(12);
- padding: px2rpx(12) px2rpx(16);
- background: var(--color-zinc-100);
- border-radius: px2rpx(8);
- text {
- font-size: px2rpx(14);
- color: var(--color-navy-700);
- font-weight: 500;
- }
- .add-btn {
- color: var(--color-primary);
- font-weight: 600;
- text-decoration: underline;
- &:active {
- opacity: 0.7;
- }
- }
- }
- .wire-transfer-account {
- background: var(--color-zinc-50);
- padding: px2rpx(16);
- border-radius: px2rpx(12);
- margin: px2rpx(16) 0;
- .row {
- display: flex;
- margin-bottom: px2rpx(12);
- font-size: px2rpx(14);
- &:last-child {
- margin-bottom: 0;
- }
- .label {
- width: px2rpx(120);
- color: var(--color-zinc-500);
- }
- .content {
- flex: 1;
- color: var(--bs-heading-color);
- font-weight: 500;
- }
- .SpecialColor {
- color: var(--color-error);
- }
- }
- }
- .activities {
- margin: px2rpx(24) 0;
- .checkbox {
- display: flex;
- align-items: flex-start;
- gap: px2rpx(8);
- margin-bottom: px2rpx(12);
- :deep(uni-checkbox .uni-checkbox-input) {
- border-radius: px2rpx(4);
- width: px2rpx(18);
- height: px2rpx(18);
- }
- text {
- font-size: px2rpx(14);
- color: var(--color-navy-700);
- font-weight: 500;
- line-height: 1.5;
- }
- }
- .clause-text {
- font-size: px2rpx(13);
- color: var(--color-zinc-500);
- line-height: 1.6;
- padding-left: px2rpx(26);
- .clause {
- color: var(--color-primary);
- text-decoration: underline;
- }
- }
- }
- .step3-attention {
- // background: var(--color-error-50, #fff1f0);
- border-radius: px2rpx(12);
- margin-bottom: px2rpx(20);
- .tips {
- line-height: 1.8;
- font-size: px2rpx(12);
- color: var(--bs-heading-color);
- background-color: rgba(var(--bs-body-bg-rgb), 1) !important;
- padding: px2rpx(12);
- border-radius: px2rpx(4);
- border-left: px2rpx(2) solid #cf1322;
- .title {
- font-weight: 600;
- margin-bottom: px2rpx(6);
- color: var(--bs-heading-color);
- }
- }
- .attention {
- font-size: px2rpx(14);
- // color: var(--color-error-600, #cf1322);
- line-height: 1.6;
- }
- .btn-bottom {
- margin-top: px2rpx(20);
- display: flex;
- justify-content: center;
- .btn {
- background: var(--color-error-600, #cf1322);
- color: var(--bs-emphasis-color);
- padding: px2rpx(10) px2rpx(48);
- border-radius: px2rpx(24);
- font-size: px2rpx(15);
- font-weight: 700;
- box-shadow: 0 px2rpx(4) px2rpx(10) rgba(207, 19, 34, 0.2);
- transition: all 0.2s;
- &:active {
- transform: scale(0.96);
- opacity: 0.8;
- }
- }
- }
- }
- .upload-box {
- display: flex;
- align-items: center;
- gap: px2rpx(12);
- .btn-upload {
- background: var(--color-zinc-100);
- border: px2rpx(1) dashed var(--color-zinc-300);
- border-radius: px2rpx(8);
- height: px2rpx(44);
- font-size: px2rpx(14);
- color: var(--color-zinc-600);
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 0 px2rpx(20);
- }
- .img-preview {
- width: px2rpx(44);
- height: px2rpx(44);
- border-radius: px2rpx(4);
- object-fit: cover;
- }
- }
- .label-with-icon {
- font-size: px2rpx(14);
- color: #606266;
- box-sizing: border-box;
- display: flex;
- align-items: center;
- padding: 0 0 8px;
- height: px2rpx(36);
- line-height: 1.5715;
- text-align: left;
- /* #ifndef APP-NVUE */
- white-space: initial;
- /* #endif */
- .help-icon {
- margin-left: px2rpx(8);
- width: px2rpx(16);
- height: px2rpx(16);
- background: var(--color-zinc-200);
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: px2rpx(12);
- color: var(--color-zinc-600);
- cursor: pointer;
- }
- }
- .tooltip-content {
- :deep(.uni-tooltip-popup) {
- background-color: #fff !important;
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1) !important;
- width: px2rpx(300) !important;
- color: var(--color-zinc-500);
- line-height: 1.6;
- }
- }
- .error {
- color: var(--color-error);
- font-size: px2rpx(12);
- margin-top: px2rpx(4);
- display: block;
- }
- :deep(.base-info-form) {
- .uni-row1 {
- .uni-col {
- padding: 0 px2rpx(10) !important;
- }
- .uni-forms-item {
- min-height: px2rpx(79);
- margin-bottom: px2rpx(10);
- position: relative;
- }
- .uni-select,
- .uni-combox,
- .uni-easyinput__content,
- .uni-date-editor--x {
- border: none !important;
- //background-color: var(--color-zinc-100) !important;
- border-radius: px2rpx(8) !important;
- }
- .uni-easyinput__content-input {
- height: px2rpx(35) !important;
- }
- }
- }
- .popup-content {
- background: #fff;
- border-radius: px2rpx(20);
- padding: px2rpx(24);
- width: px2rpx(320);
- text-align: center;
- .popup-title {
- font-size: px2rpx(18);
- font-weight: 700;
- margin-bottom: px2rpx(20);
- color: var(--bs-heading-color);
- display: block;
- }
- .popup-text {
- font-size: px2rpx(14);
- line-height: 1.6;
- color: var(--color-zinc-600);
- margin-bottom: px2rpx(20);
- display: block;
- }
- .popup-form {
- background: var(--color-zinc-50);
- border-radius: px2rpx(12);
- padding: px2rpx(16);
- margin-bottom: px2rpx(24);
- text-align: left;
- .popup-row {
- display: flex;
- justify-content: space-between;
- margin-bottom: px2rpx(12);
- font-size: px2rpx(14);
- &:last-child {
- margin-bottom: 0;
- }
- .label {
- color: var(--color-zinc-500);
- font-weight: 500;
- }
- text:not(.label) {
- color: var(--bs-heading-color);
- font-weight: 500;
- }
- .small-input {
- width: px2rpx(60);
- background: #fff;
- border: px2rpx(1) solid var(--color-zinc-200);
- border-radius: px2rpx(4);
- padding: 0 px2rpx(4);
- height: px2rpx(24);
- font-size: px2rpx(12);
- }
- }
- }
- .popup-buttons {
- display: flex;
- gap: px2rpx(12);
- button {
- flex: 1;
- height: px2rpx(44);
- border-radius: px2rpx(10);
- font-size: px2rpx(15);
- font-weight: 600;
- display: flex;
- align-items: center;
- justify-content: center;
- border: none;
- &[type="primary"] {
- background-color: #cf1322;
- color: var(--bs-emphasis-color);
- }
- &:not([type="primary"]) {
- background: var(--color-zinc-100);
- color: var(--color-zinc-600);
- }
- }
- }
- .result-icon {
- display: flex;
- justify-content: center;
- margin-bottom: px2rpx(16);
- .iconfont {
- font-size: px2rpx(48);
- &.iconchenggong {
- color: #52c41a;
- }
- &.iconjingshi {
- color: #faad14;
- }
- &.icondengdai {
- color: var(--color-primary);
- animation: rotate 2s linear infinite;
- }
- }
- }
- }
- @keyframes rotate {
- from {
- transform: rotate(0deg);
- }
- to {
- transform: rotate(360deg);
- }
- }
- .avatar-uploader {
- border: 1px dashed;
- width: px2rpx(200);
- height: px2rpx(150);
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- /*float: left;*/
- //overflow: hidden;
- }
- :deep(.files-button) {
- .file-item {
- .icon,
- .avatar {
- width: px2rpx(200);
- height: px2rpx(150);
- }
- }
- }
- }
- </style>
|