This commit is contained in:
DESKTOP-GMUNQ1B\k 2024-03-08 18:01:53 +08:00
parent b54845aba6
commit 245b77895a
3 changed files with 132 additions and 118 deletions

View File

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

View File

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

View File

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