From 427f32ded734b319efe91e2e8fedaee02583ec5d Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Fri, 6 Mar 2026 14:09:13 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=85=A8=E6=B0=91=E8=82=A1?=
=?UTF-8?q?=E4=B8=9C=E5=BC=B9=E7=AA=97=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/api/account/index.js | 11 +++++++++
components/registermember.vue | 38 +++++++++++++++++++++++++-----
distribution/shop-detail/index.vue | 30 +++++++++++++++++++----
user/vip/buy-vip.vue | 2 +-
4 files changed, 70 insertions(+), 11 deletions(-)
create mode 100644 common/api/account/index.js
diff --git a/common/api/account/index.js b/common/api/account/index.js
new file mode 100644
index 0000000..71751a1
--- /dev/null
+++ b/common/api/account/index.js
@@ -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
+ })
+}
diff --git a/components/registermember.vue b/components/registermember.vue
index 003736f..b705871 100644
--- a/components/registermember.vue
+++ b/components/registermember.vue
@@ -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(() => {
diff --git a/distribution/shop-detail/index.vue b/distribution/shop-detail/index.vue
index 495cc2b..1899160 100644
--- a/distribution/shop-detail/index.vue
+++ b/distribution/shop-detail/index.vue
@@ -223,7 +223,9 @@
+
@@ -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;
+ }
\ No newline at end of file
diff --git a/user/vip/buy-vip.vue b/user/vip/buy-vip.vue
index 92b0ece..8cff02d 100644
--- a/user/vip/buy-vip.vue
+++ b/user/vip/buy-vip.vue
@@ -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 => {