增加全民股东弹窗页面
This commit is contained in:
11
common/api/account/index.js
Normal file
11
common/api/account/index.js
Normal 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
|
||||
})
|
||||
}
|
||||
@@ -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(() => {
|
||||
|
||||
@@ -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>
|
||||
@@ -292,6 +294,10 @@
|
||||
url: '/distribution/income-details/index?name=' + name + '&shopId=' + options.shopId
|
||||
});
|
||||
}
|
||||
|
||||
function shopUserInfoUpdate(e){
|
||||
shopUserInfo.value=e
|
||||
}
|
||||
|
||||
function questionClick(title) {
|
||||
if (title == '总收益') {
|
||||
@@ -629,7 +635,7 @@
|
||||
query
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
onLoad(async (opt) => {
|
||||
try {
|
||||
await handleMixinOnLoad(opt);
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -653,6 +658,14 @@
|
||||
console.log(error);
|
||||
}
|
||||
});
|
||||
|
||||
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) {
|
||||
@@ -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>
|
||||
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user