This commit is contained in:
weipengfei 2024-03-20 15:17:04 +08:00
parent a1f904e97c
commit 561f525dd1
7 changed files with 99 additions and 13 deletions

12
App.vue
View File

@ -72,6 +72,17 @@
},
onLaunch: function(option) {
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.uid = this.$store.state.app.uid;
@ -192,6 +203,7 @@
that.getConfigData();
},
onShow() {
let that = this
that.$store.commit('SETUUID', uni.getStorageSync('uuid') || that.randomString());
// H5

View File

@ -253,6 +253,12 @@ export function getBrokerageRank(q) {
export function extractCash(data) {
return request.post('user/extract/create', data)
}
/**
* 申请提现
*/
export function getAdminApplyAPI(merId, data) {
return request.get(`admin/${merId}/apply`, data);
}
/**
* 提现银行/提现最低金额
*

View File

@ -2,8 +2,8 @@
"name" : "惠农生活",
"appid" : "__UNI__3A527D1",
"description" : "",
"versionName" : "2.0.0",
"versionCode" : 200,
"versionName" : "2.0.02",
"versionCode" : 2002,
"transformPx" : false,
/* 5+App */
"app-plus" : {

View File

@ -372,6 +372,7 @@
import {
HTTP_REQUEST_URL
} from '@/config/app';
import {showTab} from "@/utils/showTab.js";
export default {
computed: configMap({
hide_mer_status: 0,
@ -581,12 +582,15 @@
that.isScrolled = res[0].top <= -60
})
})
if (this.isLogin) {
this.getUserInfo();
}
},
onHide() {
uni.setStorageSync('isIntegral', false)
},
onReady() {
},
watch: {
globalDatas(nVal, oVal) {
@ -686,7 +690,7 @@
},
getNav() {
getNavigation().then(res => {
this.newData = res.data
this.newData = res.data;
if (this.newData.status && this.newData.status.status) {
uni.hideTabBar()
} else {
@ -942,6 +946,7 @@
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
showTab(res.data);
that.userInfo = res.data;
this.$store.commit('SET_USERINFO', res.data);
});

View File

@ -82,7 +82,7 @@
</view> -->
<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">
<image
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e41f4202401201745498894.png">
@ -90,8 +90,8 @@
<view>{{userInfo.now_money||"0.00"}}</view>
</view>
<view>我的余额 ()</view>
</view>
<view class="p_d_item" @click="authTo('/pages/redpacket/redpack_type')">
</view> -->
<!-- <view class="p_d_item" @click="authTo('/pages/redpacket/redpack_type')">
<view class="p_d_count">
<image
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/d2868202401201750014779.png">
@ -99,7 +99,20 @@
<view>{{userInfo.red_pack_balance||"0.00"}}</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 @click="goSvip" class="cardVipA acea-row row-between-wrapper" v-if="svip_switch_status == 1">
@ -291,6 +304,7 @@
import {
toLogin
} from '@/libs/login.js';
import {showTab} from "@/utils/showTab.js";
const app = getApp();
export default {
components: {
@ -621,6 +635,7 @@
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
showTab(res.data);
that.userInfo = res.data;
that.is_promoter = res.data.is_promoter;
that.extension_status = res.data.extension_status;

View File

@ -374,6 +374,9 @@
<block v-if="item.value == 'balance'">
{{userInfo.now_money}}
</block>
<block v-else-if="item.value == 'merBalance'">
{{moneyInfo.extract_money}}
</block>
</view>
</view>
<!-- #endif -->
@ -388,7 +391,10 @@
<view class='tip'>
{{item.title}}
<block v-if="item.value == 'balance'">
{{userInfo.now_money}}
{{userInfo.now_money}}
</block>
<block v-else-if="item.value == 'merBalance'">
{{moneyInfo.extract_money}}
</block>
</view>
</view>
@ -502,6 +508,7 @@
getAddressDetail,
getAddressList,
getUserInfo,
getAdminApplyAPI,
getAgreementApi
} from '@/api/user.js';
import {
@ -596,13 +603,21 @@
title: '可用余额:',
payStatus: this.$store.getters.globalData.yue_pay_status,
},
{
"name": "商户余额",
"icon": "icon-yue2",
value: 'merBalance',
title: '可用余额:',
payStatus: 2,
},
{
"name": "线下支付",
"icon": "icon-yinhangqia",
value: 'offline',
title: '线下支付',
payStatus: 2,
}, {
},
{
"name": "对公转账",
"icon": "icon-yinhangqia",
value: 'public',
@ -614,7 +629,8 @@
img: 'width:100%;display:block;',
video: 'width:100%;'
},
radioList: [{
radioList: [
{
title: this.deliveryName,
check: true
},
@ -728,6 +744,7 @@
addressInfoArea: [],
timeranges: [],
isShow: false,
moneyInfo: {}
};
},
computed: {
@ -785,7 +802,7 @@
this.getaddressInfo();
this.$nextTick(function() {
this.$refs.addressWindow.getAddressList();
this.getUserInfo()
this.getUserInfo();
})
}
uni.setStorage({
@ -798,6 +815,7 @@
* 生命周期函数--监听页面显示
*/
onShow: function() {
let that = this;
uni.$on("handClick", res => {
if (res) {
@ -876,7 +894,14 @@
//
getUserInfo() {
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
View 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);
}
})
}
}