This commit is contained in:
DESKTOP-GMUNQ1B\k 2024-04-02 14:46:49 +08:00
parent 5bf33c61c0
commit 4e9e9862db
12 changed files with 1071 additions and 924 deletions

94
App.vue
View File

@ -16,13 +16,11 @@
checkLogin checkLogin
} from "./libs/login"; } from "./libs/login";
import { import {
getUserInfo getUserInfo
} from '@/api/user.js'; } from '@/api/user.js';
import { import {
parseToken parseToken
} from "@/api/appLet.js"; } from "@/api/appLet.js";
import { import {
HTTP_REQUEST_URL HTTP_REQUEST_URL
} from './config/app'; } from './config/app';
@ -32,7 +30,9 @@
history history
} from '@/api/public.js' } from '@/api/public.js'
import Routine from './libs/routine.js'; import Routine from './libs/routine.js';
import { Toast } from "./libs/uniApi"; import {
Toast
} from "./libs/uniApi";
export default { export default {
data() { data() {
@ -97,47 +97,47 @@
key: 'launchFlag' key: 'launchFlag'
}) })
// //
// parseToken({ // parseToken({
// token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjZXNoaS1taWRkbGUubGloYWluay5jbiIsImF1ZCI6ImNlc2hpLW1pZGRsZS5saWhhaW5rLmNuIiwiaWF0IjoxNzAwNjIwMjUxLCJuYmYiOjE3MDA2MjAyNTEsImV4cCI6MTcwMTIyNTA1MSwiZGF0YSI6eyJ1aWQiOjUsInBob25lIjoiMTc2ODUxNTE2NDMiLCJhdmF0YXIiOiIvcmVzb3VyY2UvaW1hZ2UvYWRtaW5hcGkvZGVmYXVsdC9kZWZhdWx0X2F2YXRhci5wbmciLCJuaWNrbmFtZSI6Ilx1NzUyOFx1NjIzNzE3Njg1MTUxNjQzIn19.sTWAHCScRY9FExwJw1MReHTnRBcK7tYu1AMSia_Sm4M' // token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjZXNoaS1taWRkbGUubGloYWluay5jbiIsImF1ZCI6ImNlc2hpLW1pZGRsZS5saWhhaW5rLmNuIiwiaWF0IjoxNzAwNjIwMjUxLCJuYmYiOjE3MDA2MjAyNTEsImV4cCI6MTcwMTIyNTA1MSwiZGF0YSI6eyJ1aWQiOjUsInBob25lIjoiMTc2ODUxNTE2NDMiLCJhdmF0YXIiOiIvcmVzb3VyY2UvaW1hZ2UvYWRtaW5hcGkvZGVmYXVsdC9kZWZhdWx0X2F2YXRhci5wbmciLCJuaWNrbmFtZSI6Ilx1NzUyOFx1NjIzNzE3Njg1MTUxNjQzIn19.sTWAHCScRY9FExwJw1MReHTnRBcK7tYu1AMSia_Sm4M'
// }).then((res)=>{ // }).then((res)=>{
// this.$store.commit("LOGIN", { // this.$store.commit("LOGIN", {
// 'token': res.data.token, // 'token': res.data.token,
// 'time': 604800 // 'time': 604800
// }); // });
// this.$isResolve() // this.$isResolve()
// }).catch((err)=>{ // }).catch((err)=>{
// if(err==''){ // if(err==''){
// this.$store.commit("LOGIN", { // this.$store.commit("LOGIN", {
// 'token': option.referrerInfo?.extraData?.uniMP, // 'token': option.referrerInfo?.extraData?.uniMP,
// 'time': 604800 // 'time': 604800
// }); // });
// }else { // }else {
// Toast(err); // Toast(err);
// } // }
// this.$isResolve() // this.$isResolve()
// }) // })
if (option?.referrerInfo?.extraData?.uniMP) { if (option?.referrerInfo?.extraData?.uniMP) {
uni.setStorageSync('uniMP', option.referrerInfo?.extraData?.uniMP); uni.setStorageSync('uniMP', option.referrerInfo?.extraData?.uniMP);
parseToken({ parseToken({
token: option.referrerInfo?.extraData?.token token: option.referrerInfo?.extraData?.token
}).then((res)=>{ }).then((res) => {
this.$store.commit("LOGIN", { this.$store.commit("LOGIN", {
'token': res.data.token, 'token': res.data.token,
'time': 604800 'time': 604800
}); });
this.$isResolve() this.$isResolve()
}).catch((err)=>{ }).catch((err) => {
this.$store.commit("LOGIN", { this.$store.commit("LOGIN", {
'token': option.referrerInfo?.extraData?.token, 'token': option.referrerInfo?.extraData?.token,
'time': 604800 'time': 604800
}); });
this.$isResolve() this.$isResolve()
}) })
}else { } else {
this.$isResolve() this.$isResolve()
} }
// #ifdef APP-PLUS // #ifdef APP-PLUS
// #endif // #endif
@ -431,6 +431,12 @@
box-sizing: border-box; box-sizing: border-box;
} }
.c_active {
&:active {
opacity: .8;
}
}
.custom_style { .custom_style {
color: #fff; color: #fff;
display: flex; display: flex;

View File

@ -1,5 +1,16 @@
import request from "@/utils/request.js"; import request from "@/utils/request.js";
/**
* 获取商铺云商品列表
* @param {Object} id 商铺 id
* @param {Object} data 商铺商品列表数据
*/
export function getStoreCloudGoods(id, data) {
return request.get("product/spu/merchant/" + id + "/merCloudProduct", data, {
noAuth: true
});
}
/** /**
* 扫码查询商品 * 扫码查询商品
* *
@ -595,8 +606,7 @@ export function vicinityStoreApi(data) {
商家入驻 -- 获取商户入驻申请协议内容 商家入驻 -- 获取商户入驻申请协议内容
*/ */
export function agreeiness(data) { export function agreeiness(data) {
return request.get(`business/agree`, data, { noAuth: true }); return request.get(`business/agree`, data, {
noAuth: true
});
} }

View File

@ -12,6 +12,14 @@ import request1 from "@/utils/requestb.js";
import Cache from '@/utils/cache' import Cache from '@/utils/cache'
/**
* 报错信息记录
*/
export function errorReport(data) {
return request.post(`api/err/report`, data);
}
/** /**
* 提现----查询单条信息 * 提现----查询单条信息
*/ */

View File

@ -78,6 +78,12 @@
"scrollIndicator": false // "scrollIndicator": false //
} }
} }
}, {
"path": "pages/index/unregist",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
}, },
{ {
"path": "pages/nongKe/supply_chain/shopping_trolley", "path": "pages/nongKe/supply_chain/shopping_trolley",

View File

@ -901,7 +901,20 @@
handleToWithDraw(item, index) { handleToWithDraw(item, index) {
if (index == 4) return; if (index == 4) return;
let url; let url;
if (index == 0) url = "/pages/users/embody/embody?mer_id=" + this.userInfoData.service.mer_id; if (index == 0) {
progressBankList(this.userInfoData.service.mer_id).then(res => {
const data = res.data.list || [];
if ((data.length == 1 && data[0].is_check === 0) || (data.length == 2 && data[
0].is_check === 0 && data[1].is_check === 0)) {
url = '/pages/withdrawal/progress?mer_id=' + this.userInfoData.service.mer_id
} else {
url = '/pages/withdrawal/index?mer_id=' + this.userInfoData.service.mer_id
}
return uni.navigateTo({
url: url
})
})
}
if (index == 2) url = `/pages/admin/orderList/index?merId=${this.userInfoData.service.mer_id}&types=`; if (index == 2) url = `/pages/admin/orderList/index?merId=${this.userInfoData.service.mer_id}&types=`;
if (index == 3) url = "/pages/activeCode/subsidy"; if (index == 3) url = "/pages/activeCode/subsidy";
@ -1333,17 +1346,21 @@
this.isgShow = true this.isgShow = true
} }
if (res.data.mer_info.length == 0) { if (res.data.mer_info.length == 0) {
uni.showModal({ //
title: '暂未开通商户', uni.reLaunch({
complete(res) { url: "/pages/index/unregist"
// #ifdef APP-PLUS
uni.sendHostEvent('closeApp', (ret) => {
//
console.log('关闭应用' + JSON.stringify(ret));
});
// #endif
}
}) })
// uni.showModal({
// title: '',
// complete(res) {
// // #ifdef APP-PLUS
// uni.sendHostEvent('closeApp', (ret) => {
// //
// console.log('' + JSON.stringify(ret));
// });
// // #endif
// }
// })
} else { } else {
this.getindex() this.getindex()
this.getGoods(true) this.getGoods(true)
@ -1482,9 +1499,6 @@
// //
progressBankList(this.userInfoData.service.mer_id).then(res => { progressBankList(this.userInfoData.service.mer_id).then(res => {
const data = res.data.list || []; const data = res.data.list || [];
console.log(data.length == 1 && data[0].is_check === 0)
if ((data.length == 1 && data[0].is_check === 0) || (data.length == 2 && data[ if ((data.length == 1 && data[0].is_check === 0) || (data.length == 2 && data[
0].is_check === 0 && data[1].is_check === 0)) { 0].is_check === 0 && data[1].is_check === 0)) {
uni.navigateTo({ uni.navigateTo({

106
pages/index/unregist.vue Normal file
View File

@ -0,0 +1,106 @@
<!-- 未开通商户 -->
<template>
<view class="unregist">
<view class="head">
<image src="@/static/images/f.png"></image>
<text>暂无信息</text>
</view>
<view class="con">
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e70e7202404021040448288.png"></image>
<text class="empty">暂无数据</text>
<text class="no_shop">您还没有开通商户</text>
</view>
<view class="btn c_active" @click="handleOpen">
<text>点击开通</text>
</view>
</view>
</template>
<script>
export default {
methods: {
handleOpen() {
// #ifdef APP-PLUS
uni.sendHostEvent('closeAppToOpenShop', (ret) => {
//
console.log('关闭应用' + JSON.stringify(ret));
});
// #endif
}
}
}
</script>
<style lang="scss">
.unregist {
.head {
display: flex;
align-items: center;
width: 100%;
height: 360rpx;
background-image: url(https://lihai001.oss-cn-chengdu.aliyuncs.com/def/a2e04202404021019436262.webp);
background-size: cover;
background-repeat: no-repeat;
background-position: center;
margin-bottom: 200rpx;
image {
width: 112rpx;
height: 112rpx;
border-radius: 50%;
margin: 0 12rpx 0 60rpx;
}
text {
font-size: 28rpx;
color: #FFFFFF;
}
}
.con {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
image {
width: 512rpx;
height: 334rpx;
margin: 0 auto;
}
.empty {
margin-bottom: 16rpx;
font-size: 34rpx;
color: #000000;
}
.no_shop {
font-size: 24rpx;
color: #999999;
line-height: 0rpx;
}
}
.btn {
position: fixed;
left: 50%;
transform: translateX(-50%);
bottom: 80rpx;
width: 650rpx;
height: 88rpx;
line-height: 88rpx;
background: linear-gradient(359deg, #72BE53 0%, #46B03A 100%);
border-radius: 88rpx;
text-align: center;
text {
font-weight: 600;
font-size: 30rpx;
color: #F5F5F5;
}
}
}
</style>

View File

@ -18,18 +18,26 @@
<view class="shop-type-con"> <view class="shop-type-con">
<view class="shop-type-con-title">点击选择变更的商户类型</view> <view class="shop-type-con-title">点击选择变更的商户类型</view>
<view class="pifa" @click="handleChoose(1)"> <view class="pifa" @click="handleChoose(1)">
<view class="pifa-title">
<view class="main-title">升级为批发商户</view>
<view class="sub-title">备注:批发商户仅能销售批发价产品产品仅展示在批发-供销云市场批发类目</view>
</view>
<image v-if="selected == '' || selected == 2" <image v-if="selected == '' || selected == 2"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/b0811202403191613185951.webp" mode=""> src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/d8a38202404011735139115.webp" mode="">
</image> </image>
<image v-if="selected == 1" <image v-if="selected == 1"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/d7d97202403191611433157.webp" mode=""></image> src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/145e2202404011734207958.webp" mode=""></image>
</view> </view>
<view class="pifalingshou" @click="handleChoose(2)"> <view class="pifalingshou" @click="handleChoose(2)">
<view class="pifa-title">
<view class="main-title">升级为批发/零售商户</view>
<view class="sub-title">备注:批发/零售商户可以进行批发与零售交易产品可在供销云市场全面展示</view>
</view>
<image v-if="selected == '' || selected == 1" <image v-if="selected == '' || selected == 1"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/39776202403191612456811.webp" mode=""> src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/a9447202404011734582066.webp" mode="">
</image> </image>
<image v-if="selected == 2" <image v-if="selected == 2"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/40592202403191613498205.webp" mode=""></image> src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/19c0b202404011735289980.webp" mode=""></image>
</view> </view>
</view> </view>
@ -52,12 +60,10 @@
}, },
onLoad(opt) { onLoad(opt) {
if (opt.mer_id) if (opt.mer_id) this.mer_id = opt.mer_id;
this.mer_id = opt.mer_id;
}, },
methods: { methods: {
handleToRecord() { handleToRecord() {
uni.navigateTo({ uni.navigateTo({
url: "/pages/product/shop_type_change/list?mer_id=" + this.mer_id, url: "/pages/product/shop_type_change/list?mer_id=" + this.mer_id,
@ -173,20 +179,43 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
margin-bottom: 30rpx; margin-bottom: 30rpx;
position: relative;
image { image {
width: 690rpx; width: 690rpx;
height: 178rpx; height: 200rpx;
} }
} }
.pifalingshou { .pifalingshou {
position: relative;
display: flex; display: flex;
justify-content: center; justify-content: center;
image { image {
width: 690rpx; width: 690rpx;
height: 178rpx; height: 200rpx;
}
}
.pifa-title {
position: absolute;
z-index: 10;
padding-top: 36rpx;
margin-left: 202rpx;
width: 464rpx;
.main-title {
margin-bottom: 14rpx;
font-weight: 600;
font-size: 30rpx;
color: #333333;
}
.sub-title {
font-size: 24rpx;
color: #555555;
line-height: 45rpx;
} }
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -335,47 +335,46 @@
let that = this; let that = this;
loginMpPhone({ loginMpPhone({
iv: e.detail.iv, iv: e.detail.iv,
encryptedData: e.detail.encryptedData, encryptedData: e.detail.encryptedData,
code: that.codeVal, code: that.codeVal,
auth_token: uni.getStorageSync('auth_token'), auth_token: uni.getStorageSync('auth_token'),
}).then(({ }).then(({
data data
}) => { }) => {
const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index"; const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
that.$Cache.clear(BACK_URL); that.$Cache.clear(BACK_URL);
that.$store.commit("LOGIN", { that.$store.commit("LOGIN", {
'token': data.token, 'token': data.token,
'time': data.exp 'time': data.exp
});
that.$store.commit("SETUID", data.user.uid);
that.$store.commit('UPDATE_USERINFO', data.user);
let method
let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart',
'/pages/goods_cate/goods_cate',
'/pages/user/index', '/pages/plant_grass/index'
]
if (indexPat.includes(this.getPath(backUrl))) {
method = 'switchTab'
} else {
method = 'navigateTo'
}
if (this.getPath(backUrl) === '/pages/users/login/index') {
uni.switchTab({
url: '/pages/index/index'
});
return
}
uni[method]({
url: backUrl
});
})
.catch(res => {
that.$util.Tips({
title: res
});
}); });
that.$store.commit("SETUID", data.user.uid);
that.$store.commit('UPDATE_USERINFO', data.user);
let method
let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart',
'/pages/goods_cate/goods_cate',
'/pages/user/index', '/pages/plant_grass/index'
]
if (indexPat.includes(this.getPath(backUrl))) {
method = 'switchTab'
} else {
method = 'navigateTo'
}
if (this.getPath(backUrl) === '/pages/users/login/index') {
uni.switchTab({
url: '/pages/index/index'
});
return
}
uni[method]({
url: backUrl
});
}).catch(res => {
that.$util.Tips({
title: res
});
});
}, },
// #endif // #endif
goCopyUrl() { goCopyUrl() {
@ -436,12 +435,12 @@
}); });
}, },
fail(error) { fail(error) {
that.$utils.error("苹果登录/uni.login", JSON.stringify(error))
uni.showToast({ uni.showToast({
title: '获取用户信息失败', title: '获取用户信息失败',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
// console.log(error)
} }
}) })
}, },
@ -493,6 +492,7 @@
that.auth_token = res.data.result.key; that.auth_token = res.data.result.key;
} }
}).catch(res => { }).catch(res => {
that.$utils.error("微信登录/auth", JSON.stringify(res))
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({
title: res.message || res, title: res.message || res,
@ -520,6 +520,7 @@
self.wxLoginApi() self.wxLoginApi()
}, },
fail(error) { fail(error) {
self.$utils.error("微信登录/uni.login", JSON.stringify(error))
uni.showToast({ uni.showToast({
title: '登录失败', title: '登录失败',
icon: 'none', icon: 'none',
@ -583,6 +584,7 @@
uni.hideLoading(); uni.hideLoading();
}).catch(res => { }).catch(res => {
uni.hideLoading(); uni.hideLoading();
that.$utils.error("微信登录/auth", JSON.stringify(res))
uni.showToast({ uni.showToast({
title: res.message || res, title: res.message || res,
icon: 'none', icon: 'none',

View File

@ -44,7 +44,7 @@
<view class="withdrawal-form-item"> <view class="withdrawal-form-item">
<view class="withdrawal-form-item-label">持卡人</view> <view class="withdrawal-form-item-label">持卡人</view>
<view class="withdrawal-form-item-val"> <view class="withdrawal-form-item-val">
<input v-model="bindForm.name" type="text" placeholder="请输入持卡人姓名" <input v-model="bindForm.name" type="text" placeholder="请输入持卡人姓名" :disabled="true"
placeholder-class="placeholderClass"> placeholder-class="placeholderClass">
</view> </view>
</view> </view>
@ -126,7 +126,7 @@
<view class="withdrawal-form-item"> <view class="withdrawal-form-item">
<view class="withdrawal-form-item-label">账户名称</view> <view class="withdrawal-form-item-label">账户名称</view>
<view class="withdrawal-form-item-val"> <view class="withdrawal-form-item-val">
<input v-model="bindForm.name" type="text" placeholder="请输入账户名称" <input v-model="bindForm.name" type="text" placeholder="请输入账户名称" :disabled="true"
placeholder-class="placeholderClass"> placeholder-class="placeholderClass">
</view> </view>
</view> </view>
@ -188,7 +188,8 @@
extractBank, extractBank,
addBank, addBank,
searchBank, searchBank,
getById getById,
getUserInfo
} from "@/api/user.js"; } from "@/api/user.js";
export default { export default {
data() { data() {
@ -226,19 +227,33 @@
name: '对公账户' name: '对公账户'
}]; }];
this.bindForm.is_own = 1; this.bindForm.is_own = 1;
//
this.bindForm.name = JSON.parse(this.$Cache.get("USER_INFO")).mer_info.company_name;
} else if (opt.hasOwnProperty('isOwn') && opt.isOwn == 1) { } else if (opt.hasOwnProperty('isOwn') && opt.isOwn == 1) {
this.list = [{ this.list = [{
name: '法人账户' name: '法人账户'
}]; }];
this.bindForm.is_own = 0; this.bindForm.is_own = 0;
//
this.bindForm.name = JSON.parse(this.$Cache.get("USER_INFO")).mer_info.mer_name;
} else { } else {
this.bindForm.is_own = 0; this.bindForm.is_own = 0;
//
this.bindForm.name = JSON.parse(this.$Cache.get("USER_INFO")).mer_info.mer_name;
this.list = [{ this.list = [{
name: '对公账户' name: '对公账户'
}, { }, {
name: '法人账户' name: '法人账户'
}] }]
} }
// , is_company =0
const isCompany = JSON.parse(this.$Cache.get("USER_INFO")).mer_info.is_company;
if (isCompany != 1) {
this.list = [{
name: '法人账户'
}];
}
} }
}, },
@ -260,8 +275,15 @@
// //
handleSelected(e) { handleSelected(e) {
this.show = false; this.show = false;
if (e.name == '法人账户') this.bindForm.is_own = 0; if (e.name == '法人账户') {
if (e.name == '对公账户') this.bindForm.is_own = 1; this.bindForm.is_own = 0;
this.bindForm.name = JSON.parse(this.$Cache.get("USER_INFO")).mer_info.mer_name;
}
if (e.name == '对公账户') {
//
this.bindForm.is_own = 1;
this.bindForm.name = JSON.parse(this.$Cache.get("USER_INFO")).mer_info.company_name;
}
}, },
// //

View File

@ -11,14 +11,21 @@
</view> </view>
<view class="withdrawal-con"> <view class="withdrawal-con">
<view class="withdrawal"> <view class="withdrawal">
<view class="withdrawal-left" @click="handleAddAccount"> <view class="withdrawal-left">
<text class="withdrawal-left-to">提现至</text> <text class="withdrawal-left-to">提现至</text>
<text <text
class="withdrawal-left-empty">{{!bankInfo?'请绑定账户': bankInfo.is_own === 0 ? '法人账户' : '对公账户'}}</text> class="withdrawal-left-empty">{{!bankInfo?'请绑定账户': bankInfo.is_own === 0 ? '法人账户' : '对公账户'}}</text>
</view> </view>
<view class="withdrawal-right" v-if="bankList.length < 2 " @click="handleToAdd">
<text <view class="withdrawal-right" @click.stop="handleToAdd" v-if="isShowAdd()">
class="withdrawal-right-add">{{(bankList.length == 0 || bankList.length ==1)?'添加账户' :''}}</text> <text class="withdrawal-right-add">添加账户</text>
<u-icon name="arrow-right" size="14" color="#40AE36"></u-icon>
</view>
<view class="withdrawal-right"
v-if="!isShowAdd() && userInfo.mer_info.is_company == 1 && bankList.length == 2"
@click="handleAddAccount">
<text class="withdrawal-right-add">切换账户</text>
<u-icon name="arrow-right" size="14" color="#40AE36"></u-icon> <u-icon name="arrow-right" size="14" color="#40AE36"></u-icon>
</view> </view>
</view> </view>
@ -34,10 +41,6 @@
<view class="withdrawal-form-item-label">持卡人</view> <view class="withdrawal-form-item-label">持卡人</view>
<view class="withdrawal-form-item-val">{{bankInfo.financial_account.name}}</view> <view class="withdrawal-form-item-val">{{bankInfo.financial_account.name}}</view>
</view> </view>
<view class="withdrawal-form-item">
<view class="withdrawal-form-item-label">身份证</view>
<view class="withdrawal-form-item-val">{{bankInfo.financial_account.id_card}}</view>
</view>
<view class="withdrawal-form-item"> <view class="withdrawal-form-item">
<view class="withdrawal-form-item-label">银行账号</view> <view class="withdrawal-form-item-label">银行账号</view>
<view class="withdrawal-form-item-val">{{bankInfo.financial_account.bank_code}}</view> <view class="withdrawal-form-item-val">{{bankInfo.financial_account.bank_code}}</view>
@ -126,6 +129,9 @@
</view> </view>
</view> </view>
<!-- 明细按钮 -->
<view class="saomaCode" @click="navigator(`/pages/users/gather_list/index?mer_id=${mer_id}`)">明细</view>
<!-- 提现提示 --> <!-- 提现提示 -->
<u-modal :show="tipShow" title="提示" <u-modal :show="tipShow" title="提示"
content='工作日当日10点前提现当日12点到账, 当日16点前提现当日18点到账, 当日18点后提现次日12点到账, 周末节假日提现, 下一工作日18点前到账' content='工作日当日10点前提现当日12点到账, 当日16点前提现当日18点到账, 当日18点后提现次日12点到账, 周末节假日提现, 下一工作日18点前到账'
@ -174,15 +180,27 @@
ot_margin: '', // ot_margin: '', //
extract_money: '', // extract_money: '', //
lock_money: '', // lock_money: '', //
userInfo: {}
} }
}, },
onLoad(opt) { onLoad(opt) {
this.mer_id = opt.mer_id; this.mer_id = opt.mer_id;
this.getBankInfo(); this.getBankInfo();
//
this.userInfo = JSON.parse(this.$Cache.get("USER_INFO"));
console.log(this.userInfo.mer_info.is_company)
}, },
methods: { methods: {
//
isShowAdd() {
if (this.bankList.length == 0) return true;
if (this.bankList.length == 1 && this.userInfo.mer_info.is_company == 1) return true;
return false;
},
// //
handlePreview() { handlePreview() {
let that = this; let that = this;
@ -196,6 +214,10 @@
// //
handleToAdd() { handleToAdd() {
// , is_company =0
const isCompany = JSON.parse(this.$Cache.get("USER_INFO")).mer_info.is_company;
if (isCompany != 1 && this.bankInfo && this.bankInfo.is_own === 0) return;
let strUrl = "?mer_id=" + this.mer_id; let strUrl = "?mer_id=" + this.mer_id;
if (this.bankInfo) strUrl += "&isOwn=" + this.bankInfo.is_own if (this.bankInfo) strUrl += "&isOwn=" + this.bankInfo.is_own
uni.navigateTo({ uni.navigateTo({
@ -223,23 +245,9 @@
// //
handleAddAccount() { handleAddAccount() {
if (this.bankList.length == 0) return this.$util.Tips({ if (this.bankList.length == 0) return this.$util.Tips({
title: "请先添加一个账户!" title: "请先添加一个账户!"
}) });
if (this.bankList.length < 2) {
let isOwn = this.bankList[0].financial_account.is_own;
if (isOwn === 0) {
return this.$util.Tips({
title: "您还没有添加对公账户!"
})
} else {
return this.$util.Tips({
title: "您还没有添加法人账户!"
})
}
}
if (this.type === 0) if (this.type === 0)
this.type = 1; this.type = 1;
@ -344,6 +352,13 @@
}) })
}, },
//
navigator(url, t) {
uni.navigateTo({
url: url
})
},
handleBack() { handleBack() {
uni.navigateBack() uni.navigateBack()
} }
@ -470,6 +485,7 @@
font-size: 30rpx; font-size: 30rpx;
color: #333333; color: #333333;
text-align: left; text-align: left;
white-space: nowrap;
} }
.withdrawal-form-item-val { .withdrawal-form-item-val {
@ -519,4 +535,18 @@
} }
} }
} }
.saomaCode {
z-index: 1;
position: fixed;
bottom: 190rpx;
right: 28.07rpx;
width: 87.72rpx;
height: 87.72rpx;
border-radius: 175.44rpx;
background-image: linear-gradient(359deg, #72BE53 0%, #46B03A 100%);
color: #fff;
text-align: center;
line-height: 87.72rpx;
}
</style> </style>

View File

@ -21,7 +21,20 @@ import {
// #ifdef APP-PLUS // #ifdef APP-PLUS
import permision from "./permission.js" import permision from "./permission.js"
// #endif // #endif
import {
errorReport
} from "@/api/user.js";
export default { export default {
errorSave: function(a, b) {
errorReport({
route: a,
msg: b
})
},
// 是否设置密码 // 是否设置密码
checkPassword: async function(e) { checkPassword: async function(e) {
e = e ? e : ''; e = e ? e : '';