更新
This commit is contained in:
parent
a1f904e97c
commit
561f525dd1
12
App.vue
12
App.vue
@ -72,6 +72,17 @@
|
|||||||
},
|
},
|
||||||
onLaunch: function(option) {
|
onLaunch: function(option) {
|
||||||
uni.hideTabBar();
|
uni.hideTabBar();
|
||||||
|
uni.setTabBarItem({
|
||||||
|
index: 1,
|
||||||
|
visible: false
|
||||||
|
})
|
||||||
|
// #ifdef H5
|
||||||
|
uni.setTabBarItem({
|
||||||
|
index: 2,
|
||||||
|
visible: false
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
|
||||||
this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
|
this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
|
||||||
this.globalData.uid = this.$store.state.app.uid;
|
this.globalData.uid = this.$store.state.app.uid;
|
||||||
|
|
||||||
@ -192,6 +203,7 @@
|
|||||||
that.getConfigData();
|
that.getConfigData();
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
|
||||||
let that = this
|
let that = this
|
||||||
that.$store.commit('SETUUID', uni.getStorageSync('uuid') || that.randomString());
|
that.$store.commit('SETUUID', uni.getStorageSync('uuid') || that.randomString());
|
||||||
// 记录H5和公众号
|
// 记录H5和公众号
|
||||||
|
@ -253,6 +253,12 @@ export function getBrokerageRank(q) {
|
|||||||
export function extractCash(data) {
|
export function extractCash(data) {
|
||||||
return request.post('user/extract/create', data)
|
return request.post('user/extract/create', data)
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 申请提现
|
||||||
|
*/
|
||||||
|
export function getAdminApplyAPI(merId, data) {
|
||||||
|
return request.get(`admin/${merId}/apply`, data);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 提现银行/提现最低金额
|
* 提现银行/提现最低金额
|
||||||
*
|
*
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
"name" : "惠农生活",
|
"name" : "惠农生活",
|
||||||
"appid" : "__UNI__3A527D1",
|
"appid" : "__UNI__3A527D1",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "2.0.0",
|
"versionName" : "2.0.02",
|
||||||
"versionCode" : 200,
|
"versionCode" : 2002,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
@ -372,6 +372,7 @@
|
|||||||
import {
|
import {
|
||||||
HTTP_REQUEST_URL
|
HTTP_REQUEST_URL
|
||||||
} from '@/config/app';
|
} from '@/config/app';
|
||||||
|
import {showTab} from "@/utils/showTab.js";
|
||||||
export default {
|
export default {
|
||||||
computed: configMap({
|
computed: configMap({
|
||||||
hide_mer_status: 0,
|
hide_mer_status: 0,
|
||||||
@ -581,12 +582,15 @@
|
|||||||
that.isScrolled = res[0].top <= -60
|
that.isScrolled = res[0].top <= -60
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
if (this.isLogin) {
|
||||||
|
this.getUserInfo();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onHide() {
|
onHide() {
|
||||||
uni.setStorageSync('isIntegral', false)
|
uni.setStorageSync('isIntegral', false)
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
globalDatas(nVal, oVal) {
|
globalDatas(nVal, oVal) {
|
||||||
@ -686,7 +690,7 @@
|
|||||||
},
|
},
|
||||||
getNav() {
|
getNav() {
|
||||||
getNavigation().then(res => {
|
getNavigation().then(res => {
|
||||||
this.newData = res.data
|
this.newData = res.data;
|
||||||
if (this.newData.status && this.newData.status.status) {
|
if (this.newData.status && this.newData.status.status) {
|
||||||
uni.hideTabBar()
|
uni.hideTabBar()
|
||||||
} else {
|
} else {
|
||||||
@ -942,6 +946,7 @@
|
|||||||
getUserInfo: function() {
|
getUserInfo: function() {
|
||||||
let that = this;
|
let that = this;
|
||||||
getUserInfo().then(res => {
|
getUserInfo().then(res => {
|
||||||
|
showTab(res.data);
|
||||||
that.userInfo = res.data;
|
that.userInfo = res.data;
|
||||||
this.$store.commit('SET_USERINFO', res.data);
|
this.$store.commit('SET_USERINFO', res.data);
|
||||||
});
|
});
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
|
|
||||||
<view class="packet_card">
|
<view class="packet_card">
|
||||||
<view class="p_d_item" @click="authTo('/pages/users/user_money/index')">
|
<!-- <view class="p_d_item" @click="authTo('/pages/users/user_money/index')">
|
||||||
<view class="p_d_count">
|
<view class="p_d_count">
|
||||||
<image
|
<image
|
||||||
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e41f4202401201745498894.png">
|
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e41f4202401201745498894.png">
|
||||||
@ -90,8 +90,8 @@
|
|||||||
<view>¥{{userInfo.now_money||"0.00"}}</view>
|
<view>¥{{userInfo.now_money||"0.00"}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view>我的余额 (元)</view>
|
<view>我的余额 (元)</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="p_d_item" @click="authTo('/pages/redpacket/redpack_type')">
|
<!-- <view class="p_d_item" @click="authTo('/pages/redpacket/redpack_type')">
|
||||||
<view class="p_d_count">
|
<view class="p_d_count">
|
||||||
<image
|
<image
|
||||||
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/d2868202401201750014779.png">
|
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/d2868202401201750014779.png">
|
||||||
@ -99,7 +99,20 @@
|
|||||||
<view>¥{{userInfo.red_pack_balance||"0.00"}}</view>
|
<view>¥{{userInfo.red_pack_balance||"0.00"}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view>补贴余额 (元)</view>
|
<view>补贴余额 (元)</view>
|
||||||
</view>
|
</view> -->
|
||||||
|
<view class="p_d_item" @click="authTo('/pages/users/user_money/index')">
|
||||||
|
<view class="p_d_count">
|
||||||
|
<image
|
||||||
|
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e41f4202401201745498894.png">
|
||||||
|
</image>
|
||||||
|
<view style="font-size: 30rpx;">我的余额 (元)</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="p_d_item" @click="authTo('/pages/users/user_money/index')">
|
||||||
|
<view class="p_d_count">
|
||||||
|
<view>¥{{userInfo.now_money||"0.00"}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view @click="goSvip" class="cardVipA acea-row row-between-wrapper" v-if="svip_switch_status == 1">
|
<view @click="goSvip" class="cardVipA acea-row row-between-wrapper" v-if="svip_switch_status == 1">
|
||||||
@ -291,6 +304,7 @@
|
|||||||
import {
|
import {
|
||||||
toLogin
|
toLogin
|
||||||
} from '@/libs/login.js';
|
} from '@/libs/login.js';
|
||||||
|
import {showTab} from "@/utils/showTab.js";
|
||||||
const app = getApp();
|
const app = getApp();
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -621,6 +635,7 @@
|
|||||||
getUserInfo: function() {
|
getUserInfo: function() {
|
||||||
let that = this;
|
let that = this;
|
||||||
getUserInfo().then(res => {
|
getUserInfo().then(res => {
|
||||||
|
showTab(res.data);
|
||||||
that.userInfo = res.data;
|
that.userInfo = res.data;
|
||||||
that.is_promoter = res.data.is_promoter;
|
that.is_promoter = res.data.is_promoter;
|
||||||
that.extension_status = res.data.extension_status;
|
that.extension_status = res.data.extension_status;
|
||||||
|
@ -374,6 +374,9 @@
|
|||||||
<block v-if="item.value == 'balance'">
|
<block v-if="item.value == 'balance'">
|
||||||
{{userInfo.now_money}}
|
{{userInfo.now_money}}
|
||||||
</block>
|
</block>
|
||||||
|
<block v-else-if="item.value == 'merBalance'">
|
||||||
|
{{moneyInfo.extract_money}}
|
||||||
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
@ -388,7 +391,10 @@
|
|||||||
<view class='tip'>
|
<view class='tip'>
|
||||||
{{item.title}}
|
{{item.title}}
|
||||||
<block v-if="item.value == 'balance'">
|
<block v-if="item.value == 'balance'">
|
||||||
{{userInfo.now_money}}
|
{{userInfo.now_money}}
|
||||||
|
</block>
|
||||||
|
<block v-else-if="item.value == 'merBalance'">
|
||||||
|
{{moneyInfo.extract_money}}
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -502,6 +508,7 @@
|
|||||||
getAddressDetail,
|
getAddressDetail,
|
||||||
getAddressList,
|
getAddressList,
|
||||||
getUserInfo,
|
getUserInfo,
|
||||||
|
getAdminApplyAPI,
|
||||||
getAgreementApi
|
getAgreementApi
|
||||||
} from '@/api/user.js';
|
} from '@/api/user.js';
|
||||||
import {
|
import {
|
||||||
@ -596,13 +603,21 @@
|
|||||||
title: '可用余额:',
|
title: '可用余额:',
|
||||||
payStatus: this.$store.getters.globalData.yue_pay_status,
|
payStatus: this.$store.getters.globalData.yue_pay_status,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "商户余额",
|
||||||
|
"icon": "icon-yue2",
|
||||||
|
value: 'merBalance',
|
||||||
|
title: '可用余额:',
|
||||||
|
payStatus: 2,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "线下支付",
|
"name": "线下支付",
|
||||||
"icon": "icon-yinhangqia",
|
"icon": "icon-yinhangqia",
|
||||||
value: 'offline',
|
value: 'offline',
|
||||||
title: '线下支付',
|
title: '线下支付',
|
||||||
payStatus: 2,
|
payStatus: 2,
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
"name": "对公转账",
|
"name": "对公转账",
|
||||||
"icon": "icon-yinhangqia",
|
"icon": "icon-yinhangqia",
|
||||||
value: 'public',
|
value: 'public',
|
||||||
@ -614,7 +629,8 @@
|
|||||||
img: 'width:100%;display:block;',
|
img: 'width:100%;display:block;',
|
||||||
video: 'width:100%;'
|
video: 'width:100%;'
|
||||||
},
|
},
|
||||||
radioList: [{
|
radioList: [
|
||||||
|
{
|
||||||
title: this.deliveryName,
|
title: this.deliveryName,
|
||||||
check: true
|
check: true
|
||||||
},
|
},
|
||||||
@ -728,6 +744,7 @@
|
|||||||
addressInfoArea: [],
|
addressInfoArea: [],
|
||||||
timeranges: [],
|
timeranges: [],
|
||||||
isShow: false,
|
isShow: false,
|
||||||
|
moneyInfo: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -785,7 +802,7 @@
|
|||||||
this.getaddressInfo();
|
this.getaddressInfo();
|
||||||
this.$nextTick(function() {
|
this.$nextTick(function() {
|
||||||
this.$refs.addressWindow.getAddressList();
|
this.$refs.addressWindow.getAddressList();
|
||||||
this.getUserInfo()
|
this.getUserInfo();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
uni.setStorage({
|
uni.setStorage({
|
||||||
@ -798,6 +815,7 @@
|
|||||||
* 生命周期函数--监听页面显示
|
* 生命周期函数--监听页面显示
|
||||||
*/
|
*/
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
|
|
||||||
let that = this;
|
let that = this;
|
||||||
uni.$on("handClick", res => {
|
uni.$on("handClick", res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
@ -876,7 +894,14 @@
|
|||||||
// 获取个人信息
|
// 获取个人信息
|
||||||
getUserInfo() {
|
getUserInfo() {
|
||||||
getUserInfo().then(res => {
|
getUserInfo().then(res => {
|
||||||
this.userInfo = res.data
|
this.userInfo = res.data;
|
||||||
|
//获取账户金额以及冻结金额 重新调了一次接口
|
||||||
|
if(this.userInfo.service&&this.userInfo.service.mer_id) getAdminApplyAPI(this.userInfo.service.mer_id).then(res => {
|
||||||
|
this.moneyInfo = res.data;
|
||||||
|
this.cartArr.forEach(item=>{
|
||||||
|
if(item.value=='merBalance') item.payStatus=1;
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/*获取发票说明*/
|
/*获取发票说明*/
|
||||||
|
23
utils/showTab.js
Normal file
23
utils/showTab.js
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
// 控制tabbar是否显示
|
||||||
|
import store from "@/store/index.js"
|
||||||
|
|
||||||
|
export const showTab = (data)=>{
|
||||||
|
let user = data || store.state.app.userInfo;
|
||||||
|
if(user.mer_info&&user.mer_info.mer_settlement_agree_status){
|
||||||
|
uni.setTabBarItem({
|
||||||
|
index: 1,
|
||||||
|
visible: true,
|
||||||
|
fail:(e)=>{
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
uni.setTabBarItem({
|
||||||
|
index: 1,
|
||||||
|
visible: false,
|
||||||
|
fail:(e)=>{
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user