增加全民股东弹窗页面

This commit is contained in:
2026-03-06 14:09:13 +08:00
parent a6174a036c
commit 427f32ded7
4 changed files with 70 additions and 11 deletions

View File

@@ -0,0 +1,11 @@
// 引入 request 文件
import request from '@/common/api/request.js'
import {prveUrl} from './config.js'
export const shopUserConfirm = (data) => {
return request({
url: prveUrl + '/user/shopUser/confirm',
method: 'post',
data: data
})
}

View File

@@ -105,7 +105,9 @@
APIshopUser,
APIshopUserInfo
} from '@/common/api/member.js'
import {
shopUserConfirm
} from '@/common/api/account/index.js'
import {
APIuserphone
} from '@/common/api/api.js'
@@ -126,7 +128,7 @@
});
const show=defineModel(false)
// 定义事件发射器
const emits = defineEmits(['emitsmemberOpen']);
const emits = defineEmits(['emitsmemberOpen','update']);
// 定义要触发的事件
@@ -139,7 +141,7 @@
const userHeadImg = ref('')
watchEffect(()=>{
formInfo.nickName= `${props.shopUserInfo.nickName}`.trim() ==='微信用户' ? '' :''
formInfo.nickName= `${props.shopUserInfo.nickName}`.trim() ==='微信用户' ? '' :(props.shopUserInfo.nickName||'')
formInfo.telephone=props.shopUserInfo.phone||''
formInfo.birthDay=props.shopUserInfo.birthDay||''
formInfo.sex=props.shopUserInfo.sex||1
@@ -179,7 +181,8 @@
// 返回
const showClose = () => {
uni.navigateBack()
// uni.navigateBack()
show.value=false
}
//
@@ -349,6 +352,17 @@
});
return;
}
let idSet = new Set(
props.shopUserInfo.shopConfirm
? props.shopUserInfo.shopConfirm.split(',')
: []
);
const shopIdToAdd = props.shopId || uni.cache.get('shopId');
if (shopIdToAdd) {
idSet.add(shopIdToAdd);
}
let idArr = Array.from(idSet).filter(v=>v!=='');
const submitForm={
// id: uni.cache.get('userInfo').id,
shopId: props.shopId||uni.cache.get('shopId'),
@@ -356,9 +370,20 @@
headImg: userHeadImg.value,
phone: formInfo.telephone,
birthDay: formInfo.birthDay,
sex:formInfo.sex
sex:formInfo.sex,
shopConfirm:idArr.join(',')
}
await APIshopUser(submitForm)
// await APIshopUser(submitForm)
await shopUserConfirm({
id:props.shopUserInfo.id,
shopId: props.shopId||uni.cache.get('shopId'),
nickName: formInfo.nickName,
headImg: userHeadImg.value,
phone: formInfo.telephone,
birthDay: formInfo.birthDay,
sex:formInfo.sex,
shopConfirm:idArr.join(',')
})
let APIshopUserInfores = await APIshopUserInfo({
shopId: props.shopId||uni.cache.get('shopId')
})
@@ -369,6 +394,7 @@
title:props.shopUserInfo.phone? '修改成功': '注册成功',
icon: 'none'
})
emits('update',APIshopUserInfores)
show.value=false
// 定义自定义事件
// setTimeout(() => {

View File

@@ -223,7 +223,9 @@
<rulePopup v-model="showRule" :config="config" :distributionUser="state.distributionUser"></rulePopup>
<popupDistributionGroupCode :group="state.group" v-model="showGroup"></popupDistributionGroupCode>
<ymf-share-popup></ymf-share-popup>
<view class="screen_mask" v-if="screen_mask_show" @click="memberOpen=true"></view>
<registermember v-model="memberOpen" @close="memberPopupClose" :shopUserInfo="shopUserInfo"
@update="shopUserInfoUpdate"
:shopId="options.shopId"></registermember>
</view>
</template>
@@ -293,6 +295,10 @@
});
}
function shopUserInfoUpdate(e){
shopUserInfo.value=e
}
function questionClick(title) {
if (title == '总收益') {
tipsType.value = '总收益';
@@ -643,9 +649,8 @@
console.log(options);
await init();
getRecoders();
if (!shopUserInfo.value || (shopUserInfo.value.nickName === '微信用户' || !shopUserInfo.value
.nickName) || !shopUserInfo.value.phone) {
const arr=shopUserInfo.value.shopConfirm.split(',')
if (!arr.includes(options.shopId)) {
memberOpen.value = true
}
@@ -654,6 +659,14 @@
}
});
const screen_mask_show=computed(()=>{
const arr=shopUserInfo.value.shopConfirm.split(',')
if (!arr.includes(options.shopId)) {
return true
}
return false
})
onReachBottom(async () => {
if (!isEnd.value) {
query.page++;
@@ -947,4 +960,13 @@
color: #02bbf3;
text-align: center;
}
.screen_mask{
position: fixed;
left: 0;
right:0;
top:0;
bottom: 0;
z-index: 9;
background: transparent;
}
</style>

View File

@@ -303,7 +303,7 @@
}
if (res.memberConfig.isSubmitInfo && (shopUserInfo.value.sex === null || shopUserInfo.value.sex ===
undefined || !shopUserInfo.value.nickName || !shopUserInfo.value.birthDay || !shopUserInfo.value
.phone)) {
.phone||shopUserInfo.value.nickName==='微信用户')) {
memberOpen.value = true;
}
conditionList.value = res.memberConfig.conditionList.map(v => {