This commit is contained in:
wpf 2024-03-08 18:10:01 +08:00
commit e06d250588
3 changed files with 132 additions and 118 deletions

View File

@ -840,7 +840,9 @@
},
async submit() {
if (this.saveNum < 2) return
if (this.saveNum < 2) return this.$util.Tips({
title: '请至少填写两项!'
})
let that = this
uni.request({
url: HTTP_REQUEST_URL_SIX + (that.mode == 'add' ? '/api/index/addVillagerInfo' :
@ -881,10 +883,10 @@
this.SaveList.splice(index, 1, true);
this.open(index)
},
edit(index) {
this.SaveList.splice(index, 1, false);
},
}
}
}
</script>

View File

@ -1,8 +1,8 @@
<template>
<view class="box" style="position: relative;">
<image @click="back" class="bg_back"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
<image @click="back" class="bg_back"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
<view class="li" @click="navSw('/pages/index/index')">
<u--image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/edf53202401271436507555.png" width="690rpx"
height="200rpx" style="position: absolute;" />
@ -23,19 +23,19 @@
<script>
export default {
methods: {
back(){
uni.navigateBack();
},
back() {
uni.navigateBack();
},
navgo(url) {
uni.navigateTo({
url
})
},
navSw(url){
uni.switchTab({
url:url
})
}
navSw(url) {
uni.switchTab({
url: url
})
}
}
}
</script>
@ -74,11 +74,12 @@
}
}
.bg_back {
height: 34rpx;
width: 20rpx;
position: absolute;
top: calc(var(--status-bar-height) + 30rpx);
left: 30rpx;
}
.bg_back {
height: 34rpx;
width: 20rpx;
position: absolute;
top: calc(var(--status-bar-height) + 30rpx);
left: 30rpx;
}
</style>

View File

@ -17,7 +17,8 @@
<!-- 自定义顶部背景颜色 -->
<view class="new-users skeleton" :style="{visibility: showSkeleton ? 'hidden' : 'visible'}">
<view class="head">
<view class="user-card" style="padding-bottom: 0;" :class="userInfo.svip_open && svip_switch_status == 1 ? 'svip-card' : ''">
<view class="user-card" style="padding-bottom: 0;"
:class="userInfo.svip_open && svip_switch_status == 1 ? 'svip-card' : ''">
<view class="bg"></view>
<view class="user-info">
<view class="avatar-box" :class="{on:userInfo.is_svip > 0 && svip_switch_status == 1}">
@ -84,22 +85,26 @@
<view class="txt">购物券</view>
</view>
</view> -->
<view class="packet_card">
<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>{{userInfo.now_money||"0.00"}}</view>
</view>
<view>我的余额 ()</view>
</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"></image>
<view>{{userInfo.red_pack_balance||"0.00"}}</view>
</view>
<view>补贴余额 ()</view>
</view>
</view>
<view class="packet_card">
<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>{{userInfo.now_money||"0.00"}}</view>
</view>
<view>我的余额 ()</view>
</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">
</image>
<view>{{userInfo.red_pack_balance||"0.00"}}</view>
</view>
<view>补贴余额 ()</view>
</view>
</view>
<navigator hover-class="none"
:url="userInfo.is_svip > 0 ? '/pages/annex/vip_center/index' : '/pages/annex/vip_paid/index'"
class="cardVipA acea-row row-between-wrapper"
@ -220,11 +225,7 @@
<view class="">增值电信营业许可证号:川B2-20221250</view>
<view class="" style="margin-top: 10rpx;">{{ appVersion }}</view>
</view>
<!-- <view v-else class="copy-right">
<view class="iconfont icon-crmeb"></view>
<view class="text">众邦科技提供技术支持</view>
</view> -->
<view style="height: 50rpx;"></view>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"
:isGoIndex="false"></authorize>
@ -248,7 +249,7 @@
</view>
</view>
<!-- <m-tabbar native>
<!-- <m-tabbar native>
<template v-slot:tabbar_index_2>
<view class="custom_style">
<view class="custom_style_icon"></view>
@ -270,7 +271,7 @@
} from '@/api/user.js';
import {
getVersion,
getconfig
getconfig
} from "@/api/public";
import {
orderData
@ -290,7 +291,7 @@
import Auth from '../../libs/wechat';
import {
HTTP_REQUEST_URL,
ENV
ENV
} from '@/config/app';
const app = getApp();
export default {
@ -441,17 +442,17 @@
newData: {},
activeRouter: '',
sysHeight: sysHeight,
appVersion: ''
appVersion: ''
}
},
onLoad() {
// #ifdef APP-PLUS
this.appVersion = 'V ' + uni.getSystemInfoSync().appWgtVersion;
// #endif
// #ifdef H5
this.appVersion = 'V ' + uni.getSystemInfoSync().appVersion;
// #endif
if(ENV != 'prod') this.appVersion+=" Beta"
// #ifdef APP-PLUS
this.appVersion = 'V ' + uni.getSystemInfoSync().appWgtVersion;
// #endif
// #ifdef H5
this.appVersion = 'V ' + uni.getSystemInfoSync().appVersion;
// #endif
if (ENV != 'prod') this.appVersion += " Beta"
},
onReady() {
this.isNodes++;
@ -465,7 +466,7 @@
let curRoute = routes[routes.length - 1].route
this.activeRouter = '/' + curRoute
this.getNav();
this.getConfigData();
this.getConfigData();
if (that.isLogin) {
this.getUserInfo();
this.orderNum();
@ -543,7 +544,7 @@
else if (item.url == '/pages/users/user_grade/index') item.isShow = that.member_status == 1
else if (item.url == '/pages/users/user_integral/index') item.isShow = that.integral_status == 1
else item.isShow = true
},
showMenu(menu) {
return !menu || ['integral', 'service', 'admin_order', 'verify_order', 'intention', 'promoter', 'balance']
@ -622,15 +623,17 @@
that.is_promoter = res.data.is_promoter;
that.extension_status = res.data.extension_status;
that.getMyMenus();
that.$store.commit('SET_USERINFO', that.userInfo);
that.$store.commit('SET_USERINFO', that.userInfo);
});
},
//
orderNum() {
orderData({source: 103}).then(({
orderData({
source: 103
}).then(({
data
}) => {
// console.log(data);
// console.log(data);
this.orderMenu.forEach((item, index) => {
// console.log(item)
switch (item.title) {
@ -665,19 +668,21 @@
that.personalMenu = []
res.data.menu.forEach((item, index) => {
that.filterMenus(item);
//
let query = [];
let flag = false;
let rooms = item.url.split('?'); //
if(rooms[1]) query = rooms[1].split('&'); //
query.forEach(item=>{ //
let t = item.split('='); //
if(t.length>1 && t[0]=='type_code' ){ // , type_code
let x = t[1].split(','); //
if(!x.includes(this.$store.state.app.userInfo.mer_info.type_code)) flag = true;
}
})
if(!flag) that.personalMenu.push(item);
//
let query = [];
let flag = false;
let rooms = item.url.split('?'); //
if (rooms[1]) query = rooms[1].split('&'); //
query.forEach(item => { //
let t = item.split('='); //
if (t.length > 1 && t[0] ==
'type_code') { // , type_code
let x = t[1].split(','); //
if (!x.includes(this.$store.state.app.userInfo.mer_info
.type_code)) flag = true;
}
})
if (!flag) that.personalMenu.push(item);
})
that.imgUrls = res.data.banner
});
@ -717,13 +722,13 @@
this.openAuto()
}
},
//
getConfigData() {
getconfig().then(res => {
uni.$emit('update', res.data)
this.$store.commit('GLOBAL_DATA', res.data);
}).catch(err => {});
},
//
getConfigData() {
getconfig().then(res => {
uni.$emit('update', res.data)
this.$store.commit('GLOBAL_DATA', res.data);
}).catch(err => {});
},
}
}
</script>
@ -1353,44 +1358,50 @@
font-size: 24rpx;
}
}
.packet_card{
height: 140rpx;
width: 710rpx;
background-color: rgba(#fff, 0.3);
margin: 0 auto;
border-radius: 20rpx 20rpx 0 0;
margin-top: 20rpx;
position: relative;
color: #fff;
display: flex;
justify-content: space-between;
.p_d_item{
position: absolute;
font-size: 26rpx;
font-weight: bold;
width: 300rpx;
height: 100rpx;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
&:nth-child(1){
top: 20rpx;
left: 30rpx;
}
&:nth-child(2){
top: 20rpx;
right: 30rpx;
}
.p_d_count{
display: flex;
align-items: center;
font-size: 38rpx;
image{
width: 53rpx;
height: 53rpx;
}
}
}
}
.packet_card {
height: 140rpx;
width: 710rpx;
background-color: rgba(#fff, 0.3);
margin: 0 auto;
border-radius: 20rpx 20rpx 0 0;
margin-top: 20rpx;
position: relative;
color: #fff;
display: flex;
justify-content: space-between;
.p_d_item {
position: absolute;
font-size: 26rpx;
font-weight: bold;
width: 300rpx;
height: 100rpx;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
&:nth-child(1) {
top: 20rpx;
left: 30rpx;
}
&:nth-child(2) {
top: 20rpx;
right: 30rpx;
}
.p_d_count {
display: flex;
align-items: center;
font-size: 38rpx;
image {
width: 53rpx;
height: 53rpx;
}
}
}
}
</style>