Commit e7e373e7 authored by leiqingsong's avatar leiqingsong

修改

parent a2451632
......@@ -77,16 +77,14 @@ export function getBankList() {
});
}
/**
* 获取扣稅説明
* @returns
*/
export function getTaxRate(params) {
return request({
url: "/bank/getTaxRate",
method: "get",
params
});
return request({
url: "/bank/getTaxRate",
method: "get",
params
});
}
......@@ -68,7 +68,9 @@ class bridgeToAppFun {
const referrer = document.referrer;
if (referrer !== "") {
console.log("reffer不为空", referrer);
// location.href = referrer;
const home_url =
"https://shop92680967.youzan.com/v2/showcase/homepage?alias=6aFsQ4vCp7";
location.href = home_url;
} else {
console.log("调用navigateBack");
window.android.navigateBack();
......
......@@ -12,6 +12,7 @@
<van-field
v-model="form.cardNumber"
type="number"
maxlength="19"
label="银行卡卡号"
placeholder="请输入"
size="large"
......@@ -83,12 +84,23 @@ export default {
});
},
addAndEditBankInfo() {
if (!this.form.bankName) {
this.$toast.fail("请填写所属银行");
return;
} else if (!this.form.cardNumber) {
this.$toast.fail("请填写银行卡号");
return;
} else if (!this.form.name) {
this.$$toast.fail("请填写姓名");
return;
}
const params = this.form;
if (this.form.id) {
editUserBankInfo(params)
.then(res => {
if (res.code === 0) {
this.$toast.success("编辑成功");
this.$router.go(-1);
} else {
this.$toast.fail("编辑失败");
}
......@@ -99,10 +111,13 @@ export default {
);
});
} else {
addUserBankInfo()
const addParams = params;
addParams.userId = this.$userId;
addUserBankInfo(params)
.then(res => {
if (res.code === 0) {
this.$toast.success("添加成功");
this.$router.go(-1);
} else {
this.$toast.fail("添加失败");
}
......
......@@ -38,7 +38,7 @@
/>
</p>
<p class="explain">
<span>{{this.textName}}</span>
<span>{{ this.textName }}</span>
</p>
</div>
</div>
......@@ -89,7 +89,7 @@
<script>
import { getWithdrawalAmount } from "@/api/wallet";
import { getUserBankInfo, sendSms, cashOut,getTaxRate } from "@/api/bank";
import { getUserBankInfo, sendSms, cashOut, getTaxRate } from "@/api/bank";
import BaseDialog from "@/components/BaseDialog.vue";
export default {
components: { BaseDialog },
......@@ -106,7 +106,7 @@ export default {
resultDialogTip: "",
resultDialogImg: "",
resultDialog: false,
textName:'',
textName: "",
validCodeDialogShow: false,
validCode: null
};
......@@ -164,16 +164,16 @@ export default {
this.validCode = null;
this.validCodeDialogShow = true;
},
taxtClick(){
const params = {
money: 1
}
getTaxRate(params).then(res => {
if (res.code === 0) {
this.textName = res.data.taxDesc
}
});
},
taxtClick() {
const params = {
money: 1
};
getTaxRate(params).then(res => {
if (res.code === 0) {
this.textName = res.data.taxDesc;
}
});
},
getUserInfo() {
const params = {
userId: this.$userId
......
<template>
<div class="register-container">
<van-icon name="arrow-left" @click="$router.go(-1)" />
<!-- <van-icon name="arrow-left" @click="$router.go(-1)" /> -->
<img src="@/assets/images/logo.png" class="logo-img" alt="" />
<div class="form-content">
<van-cell-group>
......
<template>
<div class="settings">
<van-cell-group class="group-1">
<van-cell title="用户名" :value="$userId" />
<van-cell title="用户名" :value="userName" />
<van-cell is-link center title="头像" @click="onModefy">
<img class="avatar-img" :src="imgBaseUrl + avatar" alt="头像" />
</van-cell>
......@@ -55,6 +55,7 @@ export default {
name: "Settings",
data() {
return {
userName: "",
imgBaseUrl: "",
avatar: "",
fileList: [],
......@@ -63,7 +64,7 @@ export default {
inviteeCodeDialog: false
};
},
mounted() {
created() {
this.imgBaseUrl = process.env.VUE_APP_BASE_URL;
this.getUser();
},
......@@ -77,6 +78,7 @@ export default {
if (res.userId) {
localStorage.setItem("user", JSON.stringify(res));
this.$nextTick(() => {
this.userName = res.userId;
this.inviteeCode = res.beInvitedCode;
this.avatar = res.headImage;
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment