| | |
| | | </template> |
| | | </van-nav-bar> |
| | | <main> |
| | | <div> |
| | | <div class="form-block"> |
| | | <mt-field |
| | | :label="$t('充值')" |
| | | :placeholder="$t('请输入充值金额')" |
| | | type="text" |
| | | v-model="rechargeMoney" |
| | | > |
| | | </mt-field> |
| | | </div> |
| | | <div class="btnbox"> |
| | | <span class="text-center btnok loginout" @click="tosubmit">{{ |
| | | $t("确认") |
| | | }}</span> |
| | | <span class="text-center btnok loginout" @click="goOnline">{{ |
| | | $t("kf") |
| | | }}</span> |
| | | </div> |
| | | <!-- <div> |
| | | <div class="main-title">{{ $t("支持得支付渠道") }}</div> |
| | | <van-cell |
| | | is-link |
| | | :title="paymentSelectData.channelAccount || $t('請選擇')" |
| | | @click="paymentShow = true" |
| | | /> |
| | | <!-- paymentSelectData.channelMinLimit --> |
| | | <van-action-sheet |
| | | v-model="paymentShow" |
| | | :actions="paymentActions" |
| | |
| | | is-link |
| | | :title="$t(rechargeAccountData.key) || $t('請選擇')" |
| | | /> |
| | | <!-- @click="rechargeAccountShow = true" --> |
| | | <van-action-sheet |
| | | v-model="rechargeAccountShow" |
| | | :actions="rechargeAccountActions" |
| | | :cancel-text="$t('qx')" |
| | | /> |
| | | <!-- close-on-click-action --> |
| | | <!-- @select="rechargeAccountSelect" --> |
| | | <div class="main-title">{{ $t("請選擇充值金額") }}</div> |
| | | <div class="white-input"> |
| | | <input type="number" :value="value" @input="inputValue" /> |
| | |
| | | </el-upload> |
| | | </div> |
| | | </div> |
| | | <!-- :disabled="butFlg" --> |
| | | <van-button |
| | | class="but" |
| | | type="primary" |
| | |
| | | >{{ $t("hj172") }}</van-button |
| | | > |
| | | </template> |
| | | </div> |
| | | </div> --> |
| | | </main> |
| | | </div> |
| | | </template> |
| | |
| | | import { ActionSheet } from "vant"; |
| | | import ClipboardJS from "clipboard"; |
| | | import apiUrl from "@/axios/api.url.js"; |
| | | import { siteGetPayInfo, selCzFn } from "../../axios/api"; |
| | | import { siteGetPayInfo, selCzFn, saveUserRecharge } from "../../axios/api"; |
| | | import { Notify } from "vant"; |
| | | import { rechargeAccountActions } from "@/utils/rechargeActions"; |
| | | // baseURL |
| | |
| | | showBtn: true, |
| | | imgStatus: false, |
| | | form: { |
| | | img1key: "", |
| | | img1key: "" |
| | | }, |
| | | rechargeMoney: null |
| | | }; |
| | | }, |
| | | methods: { |
| | | async tosubmit() { |
| | | const data = await saveUserRecharge({ amt: this.rechargeMoney }); |
| | | if (data.status === 0) { |
| | | Toast(data.msg); |
| | | this.$router.push("/user"); |
| | | } else { |
| | | Toast(data.msg); |
| | | } |
| | | }, |
| | | goOnline() { |
| | | this.$router.push("/service"); |
| | | }, |
| | | judgeValue() { |
| | | console.log(this.form.img1key, this.value); |
| | | if (this.form.img1key && this.value) { |
| | |
| | | const res = await selCzFn({ |
| | | payTypeId: this.paymentSelectData.id, |
| | | payAmt: this.value, |
| | | img: this.form.img1key, |
| | | img: this.form.img1key |
| | | }); |
| | | if (res.status === 0) { |
| | | Notify({ type: "success", message: this.$t("hj182") }); |
| | |
| | | async getPayInfos() { |
| | | const res = await siteGetPayInfo(); |
| | | if (res.status === 0) { |
| | | res.data.map((item) => { |
| | | res.data.map(item => { |
| | | item.name = item.channelAccount; |
| | | }); |
| | | this.paymentActions = res.data; |
| | |
| | | }, |
| | | copyText(e, data) { |
| | | var clipboard = new ClipboardJS(".copy-button", { |
| | | text: () => data, |
| | | text: () => data |
| | | }); |
| | | |
| | | clipboard.on("success", () => { |
| | |
| | | }, |
| | | paymentSelect(e) { |
| | | this.paymentSelectData = e; |
| | | this.rechargeAccountActions.map((item) => { |
| | | this.rechargeAccountActions.map(item => { |
| | | if (item.key === e.assetsType) { |
| | | this.rechargeAccountData = item; |
| | | } |
| | | }); |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | |
| | | width: 2.740741rem; |
| | | height: 2.740741rem; |
| | | } |
| | | </style> |
| | | |
| | | .btnbox { |
| | | display: flex; |
| | | .loginout { |
| | | margin-right: 0.6rem; |
| | | } |
| | | } |
| | | </style> |