增加全民股东弹窗页面
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,
|
APIshopUser,
|
||||||
APIshopUserInfo
|
APIshopUserInfo
|
||||||
} from '@/common/api/member.js'
|
} from '@/common/api/member.js'
|
||||||
|
import {
|
||||||
|
shopUserConfirm
|
||||||
|
} from '@/common/api/account/index.js'
|
||||||
import {
|
import {
|
||||||
APIuserphone
|
APIuserphone
|
||||||
} from '@/common/api/api.js'
|
} from '@/common/api/api.js'
|
||||||
@@ -126,7 +128,7 @@
|
|||||||
});
|
});
|
||||||
const show=defineModel(false)
|
const show=defineModel(false)
|
||||||
// 定义事件发射器
|
// 定义事件发射器
|
||||||
const emits = defineEmits(['emitsmemberOpen']);
|
const emits = defineEmits(['emitsmemberOpen','update']);
|
||||||
|
|
||||||
// 定义要触发的事件
|
// 定义要触发的事件
|
||||||
|
|
||||||
@@ -139,7 +141,7 @@
|
|||||||
const userHeadImg = ref('')
|
const userHeadImg = ref('')
|
||||||
|
|
||||||
watchEffect(()=>{
|
watchEffect(()=>{
|
||||||
formInfo.nickName= `${props.shopUserInfo.nickName}`.trim() ==='微信用户' ? '' :''
|
formInfo.nickName= `${props.shopUserInfo.nickName}`.trim() ==='微信用户' ? '' :(props.shopUserInfo.nickName||'')
|
||||||
formInfo.telephone=props.shopUserInfo.phone||''
|
formInfo.telephone=props.shopUserInfo.phone||''
|
||||||
formInfo.birthDay=props.shopUserInfo.birthDay||''
|
formInfo.birthDay=props.shopUserInfo.birthDay||''
|
||||||
formInfo.sex=props.shopUserInfo.sex||1
|
formInfo.sex=props.shopUserInfo.sex||1
|
||||||
@@ -179,7 +181,8 @@
|
|||||||
|
|
||||||
// 返回
|
// 返回
|
||||||
const showClose = () => {
|
const showClose = () => {
|
||||||
uni.navigateBack()
|
// uni.navigateBack()
|
||||||
|
show.value=false
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -349,6 +352,17 @@
|
|||||||
});
|
});
|
||||||
return;
|
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={
|
const submitForm={
|
||||||
// id: uni.cache.get('userInfo').id,
|
// id: uni.cache.get('userInfo').id,
|
||||||
shopId: props.shopId||uni.cache.get('shopId'),
|
shopId: props.shopId||uni.cache.get('shopId'),
|
||||||
@@ -356,9 +370,20 @@
|
|||||||
headImg: userHeadImg.value,
|
headImg: userHeadImg.value,
|
||||||
phone: formInfo.telephone,
|
phone: formInfo.telephone,
|
||||||
birthDay: formInfo.birthDay,
|
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({
|
let APIshopUserInfores = await APIshopUserInfo({
|
||||||
shopId: props.shopId||uni.cache.get('shopId')
|
shopId: props.shopId||uni.cache.get('shopId')
|
||||||
})
|
})
|
||||||
@@ -369,6 +394,7 @@
|
|||||||
title:props.shopUserInfo.phone? '修改成功': '注册成功',
|
title:props.shopUserInfo.phone? '修改成功': '注册成功',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
|
emits('update',APIshopUserInfores)
|
||||||
show.value=false
|
show.value=false
|
||||||
// 定义自定义事件
|
// 定义自定义事件
|
||||||
// setTimeout(() => {
|
// setTimeout(() => {
|
||||||
|
|||||||
@@ -223,7 +223,9 @@
|
|||||||
<rulePopup v-model="showRule" :config="config" :distributionUser="state.distributionUser"></rulePopup>
|
<rulePopup v-model="showRule" :config="config" :distributionUser="state.distributionUser"></rulePopup>
|
||||||
<popupDistributionGroupCode :group="state.group" v-model="showGroup"></popupDistributionGroupCode>
|
<popupDistributionGroupCode :group="state.group" v-model="showGroup"></popupDistributionGroupCode>
|
||||||
<ymf-share-popup></ymf-share-popup>
|
<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"
|
<registermember v-model="memberOpen" @close="memberPopupClose" :shopUserInfo="shopUserInfo"
|
||||||
|
@update="shopUserInfoUpdate"
|
||||||
:shopId="options.shopId"></registermember>
|
:shopId="options.shopId"></registermember>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -292,6 +294,10 @@
|
|||||||
url: '/distribution/income-details/index?name=' + name + '&shopId=' + options.shopId
|
url: '/distribution/income-details/index?name=' + name + '&shopId=' + options.shopId
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function shopUserInfoUpdate(e){
|
||||||
|
shopUserInfo.value=e
|
||||||
|
}
|
||||||
|
|
||||||
function questionClick(title) {
|
function questionClick(title) {
|
||||||
if (title == '总收益') {
|
if (title == '总收益') {
|
||||||
@@ -629,7 +635,7 @@
|
|||||||
query
|
query
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
onLoad(async (opt) => {
|
onLoad(async (opt) => {
|
||||||
try {
|
try {
|
||||||
await handleMixinOnLoad(opt);
|
await handleMixinOnLoad(opt);
|
||||||
@@ -643,9 +649,8 @@
|
|||||||
console.log(options);
|
console.log(options);
|
||||||
await init();
|
await init();
|
||||||
getRecoders();
|
getRecoders();
|
||||||
|
const arr=shopUserInfo.value.shopConfirm.split(',')
|
||||||
if (!shopUserInfo.value || (shopUserInfo.value.nickName === '微信用户' || !shopUserInfo.value
|
if (!arr.includes(options.shopId)) {
|
||||||
.nickName) || !shopUserInfo.value.phone) {
|
|
||||||
memberOpen.value = true
|
memberOpen.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -653,6 +658,14 @@
|
|||||||
console.log(error);
|
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 () => {
|
onReachBottom(async () => {
|
||||||
if (!isEnd.value) {
|
if (!isEnd.value) {
|
||||||
@@ -947,4 +960,13 @@
|
|||||||
color: #02bbf3;
|
color: #02bbf3;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
.screen_mask{
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
right:0;
|
||||||
|
top:0;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 9;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -303,7 +303,7 @@
|
|||||||
}
|
}
|
||||||
if (res.memberConfig.isSubmitInfo && (shopUserInfo.value.sex === null || shopUserInfo.value.sex ===
|
if (res.memberConfig.isSubmitInfo && (shopUserInfo.value.sex === null || shopUserInfo.value.sex ===
|
||||||
undefined || !shopUserInfo.value.nickName || !shopUserInfo.value.birthDay || !shopUserInfo.value
|
undefined || !shopUserInfo.value.nickName || !shopUserInfo.value.birthDay || !shopUserInfo.value
|
||||||
.phone)) {
|
.phone||shopUserInfo.value.nickName==='微信用户')) {
|
||||||
memberOpen.value = true;
|
memberOpen.value = true;
|
||||||
}
|
}
|
||||||
conditionList.value = res.memberConfig.conditionList.map(v => {
|
conditionList.value = res.memberConfig.conditionList.map(v => {
|
||||||
|
|||||||
Reference in New Issue
Block a user