Commit 53976df1 authored by leiqingsong's avatar leiqingsong

Merge branch 'dev_lqs' into 'master'

修改

See merge request !95
parents a2451632 e7e373e7
...@@ -77,16 +77,14 @@ export function getBankList() { ...@@ -77,16 +77,14 @@ export function getBankList() {
}); });
} }
/** /**
* 获取扣稅説明 * 获取扣稅説明
* @returns * @returns
*/ */
export function getTaxRate(params) { export function getTaxRate(params) {
return request({ return request({
url: "/bank/getTaxRate", url: "/bank/getTaxRate",
method: "get", method: "get",
params params
}); });
} }
...@@ -68,7 +68,9 @@ class bridgeToAppFun { ...@@ -68,7 +68,9 @@ class bridgeToAppFun {
const referrer = document.referrer; const referrer = document.referrer;
if (referrer !== "") { if (referrer !== "") {
console.log("reffer不为空", 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 { } else {
console.log("调用navigateBack"); console.log("调用navigateBack");
window.android.navigateBack(); window.android.navigateBack();
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<van-field <van-field
v-model="form.cardNumber" v-model="form.cardNumber"
type="number" type="number"
maxlength="19"
label="银行卡卡号" label="银行卡卡号"
placeholder="请输入" placeholder="请输入"
size="large" size="large"
...@@ -83,12 +84,23 @@ export default { ...@@ -83,12 +84,23 @@ export default {
}); });
}, },
addAndEditBankInfo() { 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; const params = this.form;
if (this.form.id) { if (this.form.id) {
editUserBankInfo(params) editUserBankInfo(params)
.then(res => { .then(res => {
if (res.code === 0) { if (res.code === 0) {
this.$toast.success("编辑成功"); this.$toast.success("编辑成功");
this.$router.go(-1);
} else { } else {
this.$toast.fail("编辑失败"); this.$toast.fail("编辑失败");
} }
...@@ -99,10 +111,13 @@ export default { ...@@ -99,10 +111,13 @@ export default {
); );
}); });
} else { } else {
addUserBankInfo() const addParams = params;
addParams.userId = this.$userId;
addUserBankInfo(params)
.then(res => { .then(res => {
if (res.code === 0) { if (res.code === 0) {
this.$toast.success("添加成功"); this.$toast.success("添加成功");
this.$router.go(-1);
} else { } else {
this.$toast.fail("添加失败"); this.$toast.fail("添加失败");
} }
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
/> />
</p> </p>
<p class="explain"> <p class="explain">
<span>{{this.textName}}</span> <span>{{ this.textName }}</span>
</p> </p>
</div> </div>
</div> </div>
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
<script> <script>
import { getWithdrawalAmount } from "@/api/wallet"; 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"; import BaseDialog from "@/components/BaseDialog.vue";
export default { export default {
components: { BaseDialog }, components: { BaseDialog },
...@@ -106,7 +106,7 @@ export default { ...@@ -106,7 +106,7 @@ export default {
resultDialogTip: "", resultDialogTip: "",
resultDialogImg: "", resultDialogImg: "",
resultDialog: false, resultDialog: false,
textName:'', textName: "",
validCodeDialogShow: false, validCodeDialogShow: false,
validCode: null validCode: null
}; };
...@@ -164,16 +164,16 @@ export default { ...@@ -164,16 +164,16 @@ export default {
this.validCode = null; this.validCode = null;
this.validCodeDialogShow = true; this.validCodeDialogShow = true;
}, },
taxtClick(){ taxtClick() {
const params = { const params = {
money: 1 money: 1
} };
getTaxRate(params).then(res => { getTaxRate(params).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.textName = res.data.taxDesc this.textName = res.data.taxDesc;
} }
}); });
}, },
getUserInfo() { getUserInfo() {
const params = { const params = {
userId: this.$userId userId: this.$userId
......
<template> <template>
<div class="register-container"> <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="" /> <img src="@/assets/images/logo.png" class="logo-img" alt="" />
<div class="form-content"> <div class="form-content">
<van-cell-group> <van-cell-group>
......
<template> <template>
<div class="settings"> <div class="settings">
<van-cell-group class="group-1"> <van-cell-group class="group-1">
<van-cell title="用户名" :value="$userId" /> <van-cell title="用户名" :value="userName" />
<van-cell is-link center title="头像" @click="onModefy"> <van-cell is-link center title="头像" @click="onModefy">
<img class="avatar-img" :src="imgBaseUrl + avatar" alt="头像" /> <img class="avatar-img" :src="imgBaseUrl + avatar" alt="头像" />
</van-cell> </van-cell>
...@@ -55,6 +55,7 @@ export default { ...@@ -55,6 +55,7 @@ export default {
name: "Settings", name: "Settings",
data() { data() {
return { return {
userName: "",
imgBaseUrl: "", imgBaseUrl: "",
avatar: "", avatar: "",
fileList: [], fileList: [],
...@@ -63,7 +64,7 @@ export default { ...@@ -63,7 +64,7 @@ export default {
inviteeCodeDialog: false inviteeCodeDialog: false
}; };
}, },
mounted() { created() {
this.imgBaseUrl = process.env.VUE_APP_BASE_URL; this.imgBaseUrl = process.env.VUE_APP_BASE_URL;
this.getUser(); this.getUser();
}, },
...@@ -77,6 +78,7 @@ export default { ...@@ -77,6 +78,7 @@ export default {
if (res.userId) { if (res.userId) {
localStorage.setItem("user", JSON.stringify(res)); localStorage.setItem("user", JSON.stringify(res));
this.$nextTick(() => { this.$nextTick(() => {
this.userName = res.userId;
this.inviteeCode = res.beInvitedCode; this.inviteeCode = res.beInvitedCode;
this.avatar = res.headImage; 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