增加全民股东弹窗页面

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

@@ -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(() => {