From a8ecc34db8ab34837531d0495cd475084bb413f9 Mon Sep 17 00:00:00 2001 From: sangelxiu1 <15781802@163.com> Date: Tue, 16 Sep 2025 14:37:35 +0800 Subject: [PATCH] =?UTF-8?q?##=20=E5=8C=97=E5=A4=A7=20=20loginType=20=3D=20?= =?UTF-8?q?1=20=E5=88=86=E4=BA=AB=E6=B3=A8=E5=86=8C=E7=94=A8=E6=88=B7=20?= =?UTF-8?q?=20=E5=8F=AA=E5=B1=95=E7=A4=BA=E5=8D=87=E7=BA=A7=E4=B8=93?= =?UTF-8?q?=E5=8C=BA=20=E6=94=B9=E5=90=8D=E4=B8=BA=20(=E4=BC=9A=E5=91=98?= =?UTF-8?q?=E4=B8=93=E5=8C=BA)=20=20=E9=9A=90=E8=97=8F=E6=8E=A8=E5=B9=BFta?= =?UTF-8?q?b=20=20=E6=88=91=E7=9A=84=20=20=E9=9A=90=E8=97=8F=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E4=BB=A5=E4=B8=8A=20=20=E9=9A=90=E8=97=8F=E5=B8=82?= =?UTF-8?q?=E5=9C=BA=E5=8A=A8=E6=80=81=20=20=E5=85=B6=E4=BB=96=20=20?= =?UTF-8?q?=E9=92=B1=E5=8C=85=20=20=E8=87=AA=E5=8A=A9=E8=B4=AD=E7=A5=A8=20?= =?UTF-8?q?=20=E8=87=AA=E5=8A=A9=E6=9C=8D=E5=8A=A1=20=20=E9=93=B6=E8=A1=8C?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=20=20=E6=94=B6=E7=9B=8A=E5=8C=BA=E5=9F=9F=20?= =?UTF-8?q?=20=E6=B4=BB=E5=8A=A8=E4=B8=93=E5=8C=BA=20=20------------------?= =?UTF-8?q?--------------=20=20=E4=B8=8B=E5=8D=95=20=20=E5=8D=87=E7=BA=A7?= =?UTF-8?q?=E4=B8=93=E5=8C=BA=20->=20=E4=BC=9A=E5=91=98=E4=B8=93=E5=8C=BA?= =?UTF-8?q?=20=20=E4=BC=9A=E5=91=98=E4=BF=A1=E6=81=AF=20->=20=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=E6=94=B9=E4=BC=9A=E5=91=98=20=20=E5=BE=85=E6=94=AF?= =?UTF-8?q?=E4=BB=98=20->=20=E9=9A=90=E8=97=8F=E9=92=B1=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/cartBall.vue | 4 +- components/cartBtmList.vue | 29 +- components/raised-tabbar.vue | 5 + components/region-select/index.vue | 1 + config/share.js | 17 + pages.json | 6 + pages/index/index.vue | 24 +- pages/login/index.vue | 104 ++- pages/mine/index.vue | 39 +- pages/other/index.vue | 11 +- pages/pay/index.vue | 40 +- pages/regiest/shareRegister.vue | 1302 ++++++++++++++++++++++++++++ pages/shareRegist/index.vue | 316 +++++-- pages/shoppingCar/index.vue | 36 +- pages/specialArea/index.vue | 8 +- pages/specialArea/list.vue | 15 +- 16 files changed, 1842 insertions(+), 115 deletions(-) create mode 100644 pages/regiest/shareRegister.vue diff --git a/components/cartBall.vue b/components/cartBall.vue index 0680ddb..86c9997 100644 --- a/components/cartBall.vue +++ b/components/cartBall.vue @@ -59,7 +59,7 @@ export default { this.downShow = false this.getCar() }, - + getCar() { this.$store.dispatch('getCarLength', this.specialArea) }, @@ -120,4 +120,4 @@ export default { ::v-deep .u-popup__content { overflow: hidden; } - \ No newline at end of file + diff --git a/components/cartBtmList.vue b/components/cartBtmList.vue index 427b781..7e4732c 100644 --- a/components/cartBtmList.vue +++ b/components/cartBtmList.vue @@ -156,6 +156,7 @@ import { canOrder } from '@/config/order' export default { data() { return { + newShareMember: false, isSelectAll: [], shopCarList: [], isLoading: false, @@ -213,6 +214,8 @@ export default { // this.getCarList() }, onShow() { + this.newShareMember = uni.getStorageSync('User')?.loginType !== 0 + console.log('this.nerShareMember', this.newShareMember) // this.getCarList() }, methods: { @@ -377,13 +380,25 @@ export default { shoppingId: item, }) }) - uni.navigateTo({ - url: - '/pages/regiest/index?specialArea=' + - this.goodsCheck[0].specialArea + - '&shoppArr=' + - JSON.stringify(shoppArr), - }) + // sangelxiu1 + this.newShareMember = uni.getStorageSync('User')?.loginType !== 0 + if(this.newShareMember){ + uni.navigateTo({ + url: + '/pages/regiest/shareRegister?specialArea=' + + 41 + + '&shoppArr=' + + JSON.stringify(shoppArr), + }) + }else{ + uni.navigateTo({ + url: + '/pages/regiest/index?specialArea=' + + this.goodsCheck[0].specialArea + + '&shoppArr=' + + JSON.stringify(shoppArr), + }) + } } else if (this.goodsCheck[0].specialArea == 21) { if ( this.userInfo.registerShare == 0 || diff --git a/components/raised-tabbar.vue b/components/raised-tabbar.vue index 4174757..c6bc1a9 100644 --- a/components/raised-tabbar.vue +++ b/components/raised-tabbar.vue @@ -34,6 +34,7 @@ class="tabbar-item center-item" :class="{ active: current === 2 }" @click="tabbarChange(2)" + v-if="!newShareMember" > @@ -88,8 +89,12 @@ export default { default: 0, }, }, + mounted() { + this.newShareMember = uni.getStorageSync('User')?.loginType !== 0 + }, data() { return { + newShareMember: false, // 完整的路由列表 list: [ { diff --git a/components/region-select/index.vue b/components/region-select/index.vue index e151678..59824a0 100644 --- a/components/region-select/index.vue +++ b/components/region-select/index.vue @@ -194,6 +194,7 @@ export default { ) if (province) { if (!province.children) { + console.log(item) province.children = [item] } else { province.children.push(item) diff --git a/config/share.js b/config/share.js index e825d35..cc377ad 100644 --- a/config/share.js +++ b/config/share.js @@ -2,3 +2,20 @@ const http = uni.$u.http export const getShareCode = params => http.get('/member/api/share/get-shared-img', { params }) + +// 根据短码获取memberCode +export const getMemberCode = code => + http.get(`/member/api/share/find-share-code/${code}`) + +// 获取手机验证码 +export const getPhoneCode = params => + http.get('/member/api/share/share-sms-code', { params }) + +// 注册 +export const getRegister = data => + http.post('/member/api/share/share-register', data) + +// 自动登录 +export const autoLogin = data => + // http.post('/retail-member/api/retail-auth/auto-login', data) + http.post('/member/auth/api/share-login', data) diff --git a/pages.json b/pages.json index 3313612..9879e48 100644 --- a/pages.json +++ b/pages.json @@ -318,6 +318,12 @@ "navigationBarTitleText": "注册专区" } }, + { + "path": "pages/regiest/shareRegister", + "style": { + "navigationBarTitleText": "会员专区" + } + }, { "path": "pages/shareArea/haiShare", "style": { diff --git a/pages/index/index.vue b/pages/index/index.vue index 8ffc1a2..0118eb6 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -199,6 +199,7 @@ export default { }, data() { return { + newShareMember: false, promptFlag: false, promptMsg: '', confirmText: '', @@ -394,6 +395,19 @@ export default { }, ], }, + { + label: '会员专区', + value: 41, + name: 'membersOnly', + children: [ + { + label: '自营专区', + value: 41, + name: 'regiestArea', + isShow: true, + }, + ], + }, ], } }, @@ -413,6 +427,8 @@ export default { }, onShow() { this.$store.dispatch('getCarLength') + this.user = uni.getStorageSync('User') + this.newShareMember = this.user?.loginType !== 0 }, onPullDownRefresh() { let that = this @@ -458,6 +474,13 @@ export default { getAreaGoods() { getAreaGoods().then(res => { this.recommendSpecialAreaList = res.data?.recommendSpecialAreaList || [] + if(this.newShareMember){ + let obj = this.recommendSpecialAreaList.find(item => item.specialArea === 41) + if(obj){ + this.$set(obj, 'specialAreaName', '会员专区') + } + this.recommendSpecialAreaList = this.recommendSpecialAreaList.filter(item => item.specialArea === 41) + } }) }, toDel() { @@ -596,7 +619,6 @@ export default { tapx = index } }) - if (tapx == -1) { this.zoneList.forEach((items, index) => { items.children.forEach(ctem => { diff --git a/pages/login/index.vue b/pages/login/index.vue index 6f4e897..f15974d 100644 --- a/pages/login/index.vue +++ b/pages/login/index.vue @@ -9,7 +9,7 @@ ref="uForm"> @@ -89,6 +89,26 @@ @click="toLogin">{{'登录'}} {{'忘记密码'}} + + + +
+ +
@@ -329,4 +349,84 @@ body { .pa { padding: 7px 20rpx; } - \ No newline at end of file + + +/* 备案容器 */ +.beian-container { + background-color: #ffffff; /* 深色背景 */ + padding: 16px 0; + text-align: center; + font-size: 12px; + line-height: 1.5; + margin-top: 20px; + border-radius: 8px 8px 0 0; +} + +/* 备案内容 */ +.beian-content { + display: flex; + justify-content: center; + align-items: center; + flex-wrap: wrap; + gap: 12px; + max-width: 1200px; + margin: 0 auto; + padding: 0 16px; +} + +/* 备案链接 */ +.beian-link { + color: #749AE3; + text-decoration: none; + padding: 4px 8px; + border-radius: 4px; + transition: all 0.3s ease; + display: inline-block; +} + +/* 悬停效果 */ +.beian-link:hover { + color: #fff; + background-color: rgba(116, 154, 227, 0.2); + transform: translateY(-1px); + box-shadow: 0 2px 8px rgba(116, 154, 227, 0.3); +} + +/* 分隔符 */ +.beian-separator { + color: #749AE3; + opacity: 0.6; +} + +/* 响应式设计 */ +@media screen and (max-width: 480px) { + .beian-content { + flex-direction: column; + gap: 8px; + } + + .beian-separator { + display: none; + } + + .beian-link { + font-size: 11px; + } +} + +/* 动画效果 */ +@keyframes fadeIn { + from { + opacity: 0; + transform: translateY(10px); + } + to { + opacity: 1; + transform: translateY(0); + } +} + +.beian-container { + animation: fadeIn 0.5s ease-out; +} + diff --git a/pages/mine/index.vue b/pages/mine/index.vue index bf55c43..5d5e116 100644 --- a/pages/mine/index.vue +++ b/pages/mine/index.vue @@ -53,7 +53,7 @@
- + - + {{ '市场动态' }} @@ -541,13 +541,13 @@ export default { iHonorAward: false, ifSpecial: false, awardsList: '', + newShareMember: false, } }, onShow() { this.getInfo() this.orderNum() this.getUserAwardss() - this.getMemberBalance() }, computed: { @@ -666,6 +666,9 @@ export default { return `${(Math.floor(valueInWan * 100) / 100).toFixed(2)}` }, getMemberBalance() { + if(this.newShareMember){ + return; + } getMemberBalance().then(res => { console.log('🌈res', res) if (res.code === 200 && res.data) { @@ -726,7 +729,9 @@ export default { api.getInfo().then(res => { if (res) { this.userInfo = res.data || {} - if (this.userInfo.memberCode == 'BD68880628') { + console.log(this.userInfo) + this.newShareMember = (this.userInfo?.loginType !== 0); + if (this.userInfo.memberCode == 'BD68880628' || this.newShareMember) { this.ifSpecial = true this.otherMenuList = [ { @@ -830,10 +835,36 @@ export default { // }, ] + if(this.newShareMember){ + this.otherMenuList = [ + { + url: '/pages/pickupArea/pickupArea', + name: '提货专区', + imgurl: '../../static/images/my_icon3.png', + menuKey: 'pickGoods', + ifshow: true, + }, + { + url: '/pages/userSecure/index', + name: '账号安全', + imgurl: '../../static/images/my_icon8.png', + menuKey: '', + ifshow: true, + }, + { + url: '/pages/addressList/index', + name: '地址管理', + imgurl: '../../static/images/my_icon9.png', + menuKey: '', + ifshow: true, + }, + ] + } } else { this.ifSpecial = false } } + this.getMemberBalance() }) api.getData().then(res => { if (res.code == 200) { diff --git a/pages/other/index.vue b/pages/other/index.vue index 311e2ae..d4364f9 100644 --- a/pages/other/index.vue +++ b/pages/other/index.vue @@ -20,7 +20,7 @@ --> - + - + @@ -470,15 +470,15 @@
{{ '升级会员信息' }}
-
{{ '升级编号' }}
+
{{ newShareMember ? '会员编号' : '升级编号' }}
{{ orderData.memberCode }}
-
{{ '升级姓名' }}
+
{{ newShareMember ? '会员姓名' : '升级姓名' }}
{{ orderData.memberName }}
-
{{ '升级级别' }}
+
{{ newShareMember ? '会员级别' : '升级级别' }}
{{ orderData.pkGradeVal }}
@@ -506,7 +506,7 @@
-
+
{{ '购买人信息' }}
@@ -778,6 +778,7 @@ export default { }, data() { return { + newShareMember: false, PAY_TYPE, PAY_AUTH, payList: {}, @@ -887,6 +888,7 @@ export default { onShow() { // 获取银行卡 // this.getBankList() + this.newShareMember = uni.getStorageSync('User')?.loginType !== 0 }, methods: { toUnBind() { @@ -987,6 +989,7 @@ export default { this.specialArea == 1 || this.specialArea == 7 || this.specialArea == 24 + || this.specialArea == 41 ) { url = api.payRegOrder } else { @@ -1277,7 +1280,9 @@ export default { if (navigator.userAgent.includes('MicroMessenger')) { window.location.href = url } else { - window.open(url) + requestAnimationFrame(()=>{ + window.open(url) + }); } }) }, @@ -1366,10 +1371,30 @@ export default { api.payConfig().then(res => { this.payList = res.data console.log(this.payList) + console.log(this.PAY_AUTH) + const firstPayType = this.getFirstTrueProperty(this.payList); + const payKeyName = this.getKeyByValue(PAY_AUTH, firstPayType) + if(this.newShareMember){ + this.$set(this, 'activeNames', 2); + this.$set(this, 'whatPay', payKeyName); + } resolve(res.data) + // payList[PAY_AUTH[PAY_TYPE.JING_DONG_H5]] }) }) }, + getKeyByValue(obj, value) { + const foundEntry = Object.entries(obj).find(([key, val]) => val === value); + return foundEntry ? foundEntry[0] : null; + }, + getFirstTrueProperty(obj) { + for (const key in obj) { + if (obj.hasOwnProperty(key) && obj[key] === true) { + return key; + } + } + return null; + }, getBankList() { api.jdBankList().then(res => { this.jdList = res.data @@ -1391,10 +1416,11 @@ export default { .orderInfo({ specialArea: this.specialArea, orderCode: this.orderCode, - pkSettleCountry: this.pkCountry, + pkSettleCountry: this.pkCountry || 1, }) .then(res => { this.orderData = res.data + this.specialArea = res.data.specialArea resolve(res.data) this.downTime() }) diff --git a/pages/regiest/shareRegister.vue b/pages/regiest/shareRegister.vue new file mode 100644 index 0000000..4c1b6e2 --- /dev/null +++ b/pages/regiest/shareRegister.vue @@ -0,0 +1,1302 @@ + + + + + + diff --git a/pages/shareRegist/index.vue b/pages/shareRegist/index.vue index beb499c..7e1b4be 100644 --- a/pages/shareRegist/index.vue +++ b/pages/shareRegist/index.vue @@ -10,55 +10,49 @@ + 欢迎注册 - - - - - + + + - + - + - + + prop="loginPwd"> + v-model="form.loginPwd">