## 北大

loginType = 1 分享注册用户
 只展示升级专区 改名为 (会员专区)
 隐藏推广tab
 我的
 隐藏订单以上
 隐藏市场动态
 其他
 钱包
 自助购票
 自助服务
 银行信息
 收益区域
 活动专区
 --------------------------------
 下单
 升级专区 -> 会员专区
 会员信息 -> 升级改会员
 待支付 -> 隐藏钱包
This commit is contained in:
sangelxiu1 2025-09-16 14:37:35 +08:00
parent de5fa75abe
commit a8ecc34db8
16 changed files with 1842 additions and 115 deletions

View File

@ -156,6 +156,7 @@ import { canOrder } from '@/config/order'
export default { export default {
data() { data() {
return { return {
newShareMember: false,
isSelectAll: [], isSelectAll: [],
shopCarList: [], shopCarList: [],
isLoading: false, isLoading: false,
@ -213,6 +214,8 @@ export default {
// this.getCarList() // this.getCarList()
}, },
onShow() { onShow() {
this.newShareMember = uni.getStorageSync('User')?.loginType !== 0
console.log('this.nerShareMember', this.newShareMember)
// this.getCarList() // this.getCarList()
}, },
methods: { methods: {
@ -377,13 +380,25 @@ export default {
shoppingId: item, shoppingId: item,
}) })
}) })
uni.navigateTo({ // sangelxiu1
url: this.newShareMember = uni.getStorageSync('User')?.loginType !== 0
'/pages/regiest/index?specialArea=' + if(this.newShareMember){
this.goodsCheck[0].specialArea + uni.navigateTo({
'&shoppArr=' + url:
JSON.stringify(shoppArr), '/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) { } else if (this.goodsCheck[0].specialArea == 21) {
if ( if (
this.userInfo.registerShare == 0 || this.userInfo.registerShare == 0 ||

View File

@ -34,6 +34,7 @@
class="tabbar-item center-item" class="tabbar-item center-item"
:class="{ active: current === 2 }" :class="{ active: current === 2 }"
@click="tabbarChange(2)" @click="tabbarChange(2)"
v-if="!newShareMember"
> >
<view class="center-icon-wrapper"> <view class="center-icon-wrapper">
<view class="center-icon"> <view class="center-icon">
@ -88,8 +89,12 @@ export default {
default: 0, default: 0,
}, },
}, },
mounted() {
this.newShareMember = uni.getStorageSync('User')?.loginType !== 0
},
data() { data() {
return { return {
newShareMember: false,
// //
list: [ list: [
{ {

View File

@ -194,6 +194,7 @@ export default {
) )
if (province) { if (province) {
if (!province.children) { if (!province.children) {
console.log(item)
province.children = [item] province.children = [item]
} else { } else {
province.children.push(item) province.children.push(item)

View File

@ -2,3 +2,20 @@ const http = uni.$u.http
export const getShareCode = params => export const getShareCode = params =>
http.get('/member/api/share/get-shared-img', { 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)

View File

@ -318,6 +318,12 @@
"navigationBarTitleText": "注册专区" "navigationBarTitleText": "注册专区"
} }
}, },
{
"path": "pages/regiest/shareRegister",
"style": {
"navigationBarTitleText": "会员专区"
}
},
{ {
"path": "pages/shareArea/haiShare", "path": "pages/shareArea/haiShare",
"style": { "style": {

View File

@ -199,6 +199,7 @@ export default {
}, },
data() { data() {
return { return {
newShareMember: false,
promptFlag: false, promptFlag: false,
promptMsg: '', promptMsg: '',
confirmText: '', 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() { onShow() {
this.$store.dispatch('getCarLength') this.$store.dispatch('getCarLength')
this.user = uni.getStorageSync('User')
this.newShareMember = this.user?.loginType !== 0
}, },
onPullDownRefresh() { onPullDownRefresh() {
let that = this let that = this
@ -458,6 +474,13 @@ export default {
getAreaGoods() { getAreaGoods() {
getAreaGoods().then(res => { getAreaGoods().then(res => {
this.recommendSpecialAreaList = res.data?.recommendSpecialAreaList || [] 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() { toDel() {
@ -596,7 +619,6 @@ export default {
tapx = index tapx = index
} }
}) })
if (tapx == -1) { if (tapx == -1) {
this.zoneList.forEach((items, index) => { this.zoneList.forEach((items, index) => {
items.children.forEach(ctem => { items.children.forEach(ctem => {

View File

@ -89,6 +89,26 @@
@click="toLogin">{{'登录'}}</u-button> @click="toLogin">{{'登录'}}</u-button>
<view class="paswwrod_btn" <view class="paswwrod_btn"
@click="submit">{{'忘记密码'}}</view> @click="submit">{{'忘记密码'}}</view>
<view class="beian-container">
<div style="height: 25px;"> </div>
<div class="beian-content">
<a class="beian-link jicpb"
href="https://beian.miit.gov.cn/#/Integrated/index"
target="_blank"
title="工信部备案查询">
京ICP备17001692号-8
</a>
<span class="beian-separator">|</span>
<a class="beian-link jgawb"
href="https://beian.mps.gov.cn/#/query/webSearch?code=11022902000496"
target="_blank"
title="公安部备案查询">
京公网安备11022902000496号
</a>
</div>
</view>
</view> </view>
</template> </template>
@ -329,4 +349,84 @@ body {
.pa { .pa {
padding: 7px 20rpx; padding: 7px 20rpx;
} }
/* 备案容器 */
.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;
}
</style> </style>

View File

@ -53,7 +53,7 @@
</view> </view>
</view> </view>
<view class="ju_grade" v-if="!ifSpecial"> <view class="ju_grade" v-if="!ifSpecial && !newShareMember" >
<!-- <view v-if="awards.tarAwardsName" class="awards-progress-summary" style="text-align: center;"> <!-- <view v-if="awards.tarAwardsName" class="awards-progress-summary" style="text-align: center;">
<span class="descriptive-text">当前距离</span> <span class="descriptive-text">当前距离</span>
<span class="highlight-name"> <span class="highlight-name">
@ -233,7 +233,7 @@
</view> </view>
<!-- 市场动态 --> <!-- 市场动态 -->
<view class="my_order" v-if="actMenu"> <view class="my_order" v-if="actMenu && !newShareMember">
<view class="my_title"> <view class="my_title">
<text class="thetitle">{{ '市场动态' }}</text> <text class="thetitle">{{ '市场动态' }}</text>
</view> </view>
@ -541,13 +541,13 @@ export default {
iHonorAward: false, iHonorAward: false,
ifSpecial: false, ifSpecial: false,
awardsList: '', awardsList: '',
newShareMember: false,
} }
}, },
onShow() { onShow() {
this.getInfo() this.getInfo()
this.orderNum() this.orderNum()
this.getUserAwardss() this.getUserAwardss()
this.getMemberBalance()
}, },
computed: { computed: {
@ -666,6 +666,9 @@ export default {
return `${(Math.floor(valueInWan * 100) / 100).toFixed(2)}` return `${(Math.floor(valueInWan * 100) / 100).toFixed(2)}`
}, },
getMemberBalance() { getMemberBalance() {
if(this.newShareMember){
return;
}
getMemberBalance().then(res => { getMemberBalance().then(res => {
console.log('🌈res', res) console.log('🌈res', res)
if (res.code === 200 && res.data) { if (res.code === 200 && res.data) {
@ -726,7 +729,9 @@ export default {
api.getInfo().then(res => { api.getInfo().then(res => {
if (res) { if (res) {
this.userInfo = res.data || {} 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.ifSpecial = true
this.otherMenuList = [ 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 { } else {
this.ifSpecial = false this.ifSpecial = false
} }
} }
this.getMemberBalance()
}) })
api.getData().then(res => { api.getData().then(res => {
if (res.code == 200) { if (res.code == 200) {

View File

@ -20,7 +20,7 @@
<u-icon name="arrow-down"></u-icon> <u-icon name="arrow-down"></u-icon>
</view> </view>
</u-form-item> --> </u-form-item> -->
<view v-if="specialArea != 2 && specialArea != 25 && specialArea != 27"> <view v-if="(specialArea != 2 && specialArea != 25 && specialArea != 27) || newShareMember">
<u-form-item <u-form-item
:label="'会员编号'" :label="'会员编号'"
required required
@ -43,7 +43,7 @@
</u-form-item> </u-form-item>
</view> </view>
<view v-if="specialArea == 2 || specialArea == 25 || specialArea == 27"> <view v-if="(specialArea == 2 || specialArea == 25 || specialArea == 27) && !newShareMember">
<u-form-item <u-form-item
:label="'升级编号'" :label="'升级编号'"
required required
@ -460,6 +460,7 @@ export default {
}, },
data() { data() {
return { return {
newShareMember: false,
isDeliveryWay: true, isDeliveryWay: true,
isDp: false, isDp: false,
storehouseList: [], storehouseList: [],
@ -670,6 +671,12 @@ export default {
onShow() { onShow() {
// //
this.getAddressList() this.getAddressList()
this.newShareMember = uni.getStorageSync('User')?.loginType !== 0
if(this.newShareMember){
uni.setNavigationBarTitle({
title: '会员专区',
})
}
}, },
methods: { methods: {
toAgree() { toAgree() {

View File

@ -39,7 +39,7 @@
<u-collapse-item <u-collapse-item
name="1" name="1"
v-if=" v-if="
!isRecharge && !isShare && userInfo.memberCode != 'BD68880628' !isRecharge && !isShare && userInfo.memberCode != 'BD68880628' && !newShareMember
" "
> >
<view slot="title" class="pf"> <view slot="title" class="pf">
@ -470,15 +470,15 @@
<div class="tit4">{{ '升级会员信息' }}</div> <div class="tit4">{{ '升级会员信息' }}</div>
<div class="quan"> <div class="quan">
<div class="kuang_i"> <div class="kuang_i">
<div>{{ '升级编号' }}</div> <div>{{ newShareMember ? '会员编号' : '升级编号' }}</div>
<div>{{ orderData.memberCode }}</div> <div>{{ orderData.memberCode }}</div>
</div> </div>
<div class="kuang_i"> <div class="kuang_i">
<div>{{ '升级姓名' }}</div> <div>{{ newShareMember ? '会员姓名' : '升级姓名' }}</div>
<div>{{ orderData.memberName }}</div> <div>{{ orderData.memberName }}</div>
</div> </div>
<div class="kuang_i"> <div class="kuang_i">
<div>{{ '升级级别' }}</div> <div>{{ newShareMember ? '会员级别' : '升级级别' }}</div>
<div>{{ orderData.pkGradeVal }}</div> <div>{{ orderData.pkGradeVal }}</div>
</div> </div>
<div class="kuang_i"> <div class="kuang_i">
@ -506,7 +506,7 @@
</div> </div>
</div> </div>
</div> </div>
<div v-show="[14, 3, 26, 28].includes(specialArea)"> <div v-show="[14, 3, 26, 28, 41].includes(specialArea)">
<div class="tit4">{{ '购买人信息' }}</div> <div class="tit4">{{ '购买人信息' }}</div>
<div class="quan"> <div class="quan">
<div class="kuang_i"> <div class="kuang_i">
@ -778,6 +778,7 @@ export default {
}, },
data() { data() {
return { return {
newShareMember: false,
PAY_TYPE, PAY_TYPE,
PAY_AUTH, PAY_AUTH,
payList: {}, payList: {},
@ -887,6 +888,7 @@ export default {
onShow() { onShow() {
// //
// this.getBankList() // this.getBankList()
this.newShareMember = uni.getStorageSync('User')?.loginType !== 0
}, },
methods: { methods: {
toUnBind() { toUnBind() {
@ -987,6 +989,7 @@ export default {
this.specialArea == 1 || this.specialArea == 1 ||
this.specialArea == 7 || this.specialArea == 7 ||
this.specialArea == 24 this.specialArea == 24
|| this.specialArea == 41
) { ) {
url = api.payRegOrder url = api.payRegOrder
} else { } else {
@ -1277,7 +1280,9 @@ export default {
if (navigator.userAgent.includes('MicroMessenger')) { if (navigator.userAgent.includes('MicroMessenger')) {
window.location.href = url window.location.href = url
} else { } else {
window.open(url) requestAnimationFrame(()=>{
window.open(url)
});
} }
}) })
}, },
@ -1366,10 +1371,30 @@ export default {
api.payConfig().then(res => { api.payConfig().then(res => {
this.payList = res.data this.payList = res.data
console.log(this.payList) 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) 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() { getBankList() {
api.jdBankList().then(res => { api.jdBankList().then(res => {
this.jdList = res.data this.jdList = res.data
@ -1391,10 +1416,11 @@ export default {
.orderInfo({ .orderInfo({
specialArea: this.specialArea, specialArea: this.specialArea,
orderCode: this.orderCode, orderCode: this.orderCode,
pkSettleCountry: this.pkCountry, pkSettleCountry: this.pkCountry || 1,
}) })
.then(res => { .then(res => {
this.orderData = res.data this.orderData = res.data
this.specialArea = res.data.specialArea
resolve(res.data) resolve(res.data)
this.downTime() this.downTime()
}) })

File diff suppressed because it is too large Load Diff

View File

@ -10,55 +10,49 @@
<!-- <view class="index_header"> <!-- <view class="index_header">
<view>注册</view> <view>注册</view>
</view> --> </view> -->
<view class="title">欢迎注册</view>
<!-- <view class="tit" v-if="!pkCountry">{{ '嗨粉扫天下' }}</view> --> <!-- <view class="tit" v-if="!pkCountry">{{ '嗨粉扫天下' }}</view> -->
<!-- 海粉 --> <!-- 海粉 -->
<view class="formed1"> <view class="formed1">
<u-form :model="form" labelWidth="80px" ref="uForm" :rules="rules"> <u-form :model="form" labelWidth="90px" ref="uForm" :rules="rules">
<u-form-item label="" prop="memberCode"> <u-form-item label="推荐编号" prop="parentCode">
<u-input v-model="form.memberCode" type="number" disabled> <u-input v-model="form.parentCode" disabled> </u-input>
<u--text
:text="howHeader"
slot="prefix"
margin="0 3px 0 0"
type="tips"
></u--text>
</u-input>
</u-form-item> </u-form-item>
<u-form-item label="" prop="memberName"> <u-form-item label="会员姓名" prop="memberName">
<u-input <u-input
v-model="form.memberName" v-model="form.memberName"
:placeholder="'请输入会员姓名'" :placeholder="'请输入会员姓名'"
/> />
</u-form-item> </u-form-item>
<u-form-item label="" prop="phone"> <u-form-item label="联系方式" prop="phone">
<u-input <u-input
v-model="form.phone" v-model="form.phone"
@blur="setMemberCode"
:placeholder="'请输入联系方式'" :placeholder="'请输入联系方式'"
type="number" type="number"
maxlength="20" maxlength="20"
/> />
</u-form-item> </u-form-item>
<u-form-item label="" prop="loginPassword"> <!--
<u-form-item label="登录密码" prop="loginPwd">
<u-input <u-input
:password="isPwd" :password="isPwd"
:placeholder="'请输入登录密码'" :placeholder="'请输入登录密码'"
v-model="form.loginPassword" v-model="form.loginPwd"
> >
<template slot="suffix"> <template #suffix>
<u-icon name="eye" @tap="isPwd = !isPwd" v-if="!isPwd"></u-icon> <u-icon name="eye" @tap="isPwd = !isPwd" v-if="!isPwd"></u-icon>
<u-icon name="eye-off" @tap="isPwd = !isPwd" v-else></u-icon> <u-icon name="eye-off" @tap="isPwd = !isPwd" v-else></u-icon>
</template> </template>
</u-input> </u-input>
</u-form-item> </u-form-item>
<u-form-item label="" prop="payPassword"> <u-form-item label="支付密码" prop="payPwd">
<u-input <u-input
:password="isPwd2" :password="isPwd2"
:placeholder="'请输入支付密码'" :placeholder="'请输入支付密码'"
v-model="form.payPassword" v-model="form.payPwd"
> >
<template slot="suffix"> <template #suffix>
<u-icon <u-icon
name="eye" name="eye"
@tap="isPwd2 = !isPwd2" @tap="isPwd2 = !isPwd2"
@ -68,13 +62,14 @@
</template> </template>
</u-input> </u-input>
</u-form-item> </u-form-item>
<u-form-item label="" prop="code"> <u-form-item label="验证码" prop="smsCode">
<u-input v-model="form.code" :placeholder="'请输入验证码'"> <u-input v-model="form.smsCode" :placeholder="'请输入验证码'">
<template slot="suffix"> <template #suffix>
<view class="getCode" @tap="getVilCode">{{ getCode }}</view> <view class="getCode" @tap="getVilCode">{{ getCode }}</view>
</template> </template>
</u-input> </u-input>
</u-form-item> </u-form-item>
-->
</u-form> </u-form>
<u-button <u-button
type="success" type="success"
@ -137,10 +132,10 @@
</view> </view>
</u-form-item> </u-form-item>
<u-form-item label="" <u-form-item label=""
prop="loginPassword"> prop="loginPwd">
<u-input :password="isPwd1" <u-input :password="isPwd1"
:placeholder="'请输入登录密码'" :placeholder="'请输入登录密码'"
v-model="form.loginPassword"> v-model="form.loginPwd">
<template slot="suffix"> <template slot="suffix">
<u-icon name="eye" <u-icon name="eye"
@tap="isPwd1=!isPwd1" @tap="isPwd1=!isPwd1"
@ -152,10 +147,10 @@
</u-input> </u-input>
</u-form-item> </u-form-item>
<u-form-item label="" <u-form-item label=""
prop="payPassword"> prop="payPwd">
<u-input :password="isPwd2" <u-input :password="isPwd2"
:placeholder="'请输入支付密码'" :placeholder="'请输入支付密码'"
v-model="form.payPassword"> v-model="form.payPwd">
<template slot="suffix"> <template slot="suffix">
<u-icon name="eye" <u-icon name="eye"
@tap="isPwd2=!isPwd2" @tap="isPwd2=!isPwd2"
@ -183,12 +178,56 @@
</view> --> </view> -->
</view> </view>
<view class="mask" v-if="isTrue"> </view> <u-modal
:show="showSuccessModal"
title="注册成功"
:show-cancel-button="true"
cancel-text="复制"
confirm-text="自动登录"
@confirm="onModalConfirm"
@cancel="onModalCancel"
@close="showSuccessModal = false"
>
<view class="slot-content" v-if="successData">
<view class="success-item">
<text class="item-label">会员编号:</text>
<text class="item-value">{{ successData.memberCode }}</text>
</view>
<view class="success-item">
<text class="item-label">会员姓名:</text>
<text class="item-value">{{ successData.memberName }}</text>
</view>
<view class="success-item">
<text class="item-label">联系方式:</text>
<text class="item-value">{{ successData.phone }}</text>
</view>
<view class="success-item">
<text class="item-label">登录密码:</text>
<text class="item-value">{{ successData.loginPassword }}</text>
</view>
<view class="success-item">
<text class="item-label">支付密码:</text>
<text class="item-value">{{ successData.payPassword }}</text>
</view>
<view class="success-item">
<text class="item-label">登录地址:</text>
<text class="item-value">{{ successData.urlAddress }}</text>
</view>
</view>
</u-modal>
</view> </view>
</template> </template>
<script> <script>
import * as api from '@/config/goods' import * as api from '@/config/goods'
import {
getMemberCode,
getPhoneCode,
getRegister,
autoLogin,
} from '@/config/share'
import { setToken } from '@/config/auth.js'
import store from '@/store'
export default { export default {
components: {}, components: {},
data() { data() {
@ -198,6 +237,11 @@ export default {
pkParent: '', pkParent: '',
form: { form: {
memberName: '', memberName: '',
smsCode: '',
loginPwd: '',
payPwd: '',
parentCode: '',
phone: '',
}, },
isLoading: false, isLoading: false,
getCode: '获取验证码', getCode: '获取验证码',
@ -210,11 +254,13 @@ export default {
isPwd: true, isPwd: true,
isPwd1: true, isPwd1: true,
isPwd2: true, isPwd2: true,
showSuccessModal: false,
successData: null,
rules: { rules: {
memberCode: [ parentCode: [
{ {
required: true, required: true,
asyncValidator: this.memberCodeRule, message: '请输入推荐编号',
trigger: ['blur'], trigger: ['blur'],
}, },
], ],
@ -231,22 +277,29 @@ export default {
message: '请输入联系方式', message: '请输入联系方式',
trigger: ['blur'], trigger: ['blur'],
}, },
{
validator: (rule, value, callback) => {
return this.$u.test.mobile(value);
},
message: "手机号格式不正确",
trigger: ["blur"],
},
], ],
code: [ smsCode: [
{ {
required: true, required: true,
message: '请输入验证码', message: '请输入验证码',
trigger: ['blur'], trigger: ['blur'],
}, },
], ],
loginPassword: [ loginPwd: [
{ {
required: true, required: true,
message: '请输入登录密码', message: '请输入登录密码',
trigger: ['blur'], trigger: ['blur'],
}, },
], ],
payPassword: [ payPwd: [
{ {
required: true, required: true,
message: '请输入支付密码', message: '请输入支付密码',
@ -276,14 +329,14 @@ export default {
trigger: ['change', 'blur'], trigger: ['change', 'blur'],
}, },
], ],
loginPassword: [ loginPwd: [
{ {
required: true, required: true,
message: '请输入登录密码', message: '请输入登录密码',
trigger: ['change', 'blur'], trigger: ['change', 'blur'],
}, },
], ],
payPassword: [ payPwd: [
{ {
required: true, required: true,
message: '请输入支付密码', message: '请输入支付密码',
@ -296,15 +349,14 @@ export default {
onReady() {}, onReady() {},
onLoad(options) { onLoad(options) {
this.pkParent = options.code this.pkParent = options.code
this.pkCountry = 1 this.pkCountry = options.country || ''
this.getGenerate()
if (this.pkCountry) { if (this.pkCountry) {
this.getCountry() // this.getCountry()
this.form.pkCountry = this.pkCountry this.form.pkCountry = this.pkCountry
uni.setStorageSync('pkCountry', this.pkCountry) uni.setStorageSync('pkCountry', this.pkCountry)
uni.redirectTo({ // uni.redirectTo({
url: '/pages/shareArea/hiList?pkParent=' + this.pkParent, // url: '/pages/shareArea/hiList?pkParent=' + this.pkParent,
}) // })
// this.$refs.uForm1.setRules(this.rules1) // this.$refs.uForm1.setRules(this.rules1)
} else { } else {
// //
@ -315,11 +367,22 @@ export default {
}, },
onShow() {}, onShow() {},
methods: { methods: {
setMemberCode() { getUseInfo() {
// this.form.memberCode = this.form.phone getUseInfo().then(res => {
this.$set(this.form, 'memberCode', this.form.phone) this.userInfo = res.data
})
},
selCountry() {
uni.showModal({
title: '提示',
content: '确认更换自然国',
success: res => {
if (res.confirm) {
this.isCountry = true
}
},
})
}, },
memberCodeRule(rule, value, callback) { memberCodeRule(rule, value, callback) {
if (!value) { if (!value) {
callback(new Error('请输入会员编号')) callback(new Error('请输入会员编号'))
@ -338,44 +401,102 @@ export default {
} }
}, },
getHeader() { getHeader() {
api.checkShare().then(res => { getMemberCode(this.pkParent).then(res => {
if (res.code != 200) { this.$set(this.form, 'parentCode', res.data)
this.isTrue = true console.log(this.form)
} else {
this.isTrue = false
}
}) })
// api.prefix(this.pkParent).then((res) => { // api.prefix(this.pkParent).then((res) => {
// this.howHeader = res.msg // this.howHeader = res.msg
// }) // })
}, },
getGenerate() { getGenerate() {
return new Promise((resolve, reject) => { api.generate().then(res => {
api.generate().then(res => { uni.setStorageSync('mToken', res.msg)
resolve(res)
uni.setStorageSync('mToken', res.msg)
})
}) })
}, },
toLogin() { toLogin() {
this.$refs.uForm.validate().then(res => { this.$refs.uForm.validate().then(() => {
this.isLoading = true this.isLoading = true
api // getRegister(Object.assign({}, this.form, { parentCode: this.pkParent }))
.regShareMember( getRegister(this.form)
Object.assign({}, this.form, { parent: this.pkParent })
)
.then(res => { .then(res => {
this.isLoading = false this.isLoading = false
if (res.code == 200) { if (res.code == 200) {
uni.redirectTo({ this.successData = res.data
url: this.showSuccessModal = true
'/pages/shareRegist/success?allData=' + } else {
JSON.stringify(res.data), uni.showToast({
title: res.msg || '注册失败',
icon: 'none',
}) })
} }
}) })
.catch(() => {
this.isLoading = false
uni.showToast({
title: '注册请求失败',
icon: 'none',
})
})
}) })
}, },
onModalConfirm() {
if (this.successData) {
this.handleAutoLogin(this.successData)
}
},
onModalCancel() {
if (this.successData) {
const modalContent = `会员编号: ${this.successData.memberCode}\n会员姓名: ${this.successData.memberName}\n联系方式: ${this.successData.phone}\n登录密码: ${this.successData.loginPassword}\n支付密码: ${this.successData.payPassword}\n登录地址: ${this.successData.urlAddress}`
uni.setClipboardData({
data: modalContent,
success: function () {
uni.showToast({
title: '复制成功',
icon: 'success',
})
},
})
}
},
handleAutoLogin(loginData) {
autoLogin({
username: loginData.memberCode,
password: loginData.loginPassword,
uuid: loginData.uuid,
})
.then(loginRes => {
if (loginRes.code === 200) {
uni.showToast({
title: '登录成功',
icon: 'success',
duration: 1500,
})
setToken(loginRes.data.access_token)
store.dispatch('GetInfo').then(res => {
uni.switchTab({ url: '/pages/index/index' })
})
// setTimeout(() => {
// uni.reLaunch({
// url: '/pages/index/index',
// })
// }, 1500)
} else {
uni.showToast({
title: loginRes.msg || '自动登录失败',
icon: 'none',
})
}
})
.catch(err => {
console.log(err)
uni.showToast({
title: '自动登录请求失败',
icon: 'none',
})
})
},
hiLogin() { hiLogin() {
this.$refs.uForm1.validate().then(res => { this.$refs.uForm1.validate().then(res => {
this.isLoading = true this.isLoading = true
@ -419,10 +540,10 @@ export default {
// //
getVilCode() { getVilCode() {
this.startTime() this.startTime()
api getPhoneCode({
.verification({ phone: this.form.phone,
phone: this.form.phone, parentCode: this.pkParent,
}) })
.then(res => {}) .then(res => {})
.catch(err => { .catch(err => {
this.beginTime = 0 this.beginTime = 0
@ -451,10 +572,11 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.content1 { .content1 {
background-image: url('@/static/images/haiRgeiest1.jpg'); background: linear-gradient(-45deg, #005bac, #0077c2, #0099e0, #00bfff);
background-size: 100%; background-size: 400% 400%;
background-repeat: no-repeat; animation: gradient 15s ease infinite;
height: 100vh; height: 100vh;
overflow: auto;
} }
.content { .content {
background-image: url('@/static/images/huan.jpg'); background-image: url('@/static/images/huan.jpg');
@ -464,14 +586,13 @@ export default {
background-position: center; background-position: center;
height: 100vh; height: 100vh;
} }
.tit { .title {
font-size: 48px; font-size: 48rpx;
font-family: PangMenZhengDao-Regular, PangMenZhengDao; font-weight: bold;
font-weight: 400; color: #333;
color: #ffffff;
text-align: center; text-align: center;
padding-top: 80px; padding-top: 120rpx;
margin-bottom: 20px; padding-bottom: 80rpx;
} }
.index_header { .index_header {
background: #f9f9f9; background: #f9f9f9;
@ -490,8 +611,10 @@ export default {
padding: 0 120rpx; padding: 0 120rpx;
} }
.formed1 { .formed1 {
padding: 0 120rpx; margin: 0 40rpx;
padding-top: 550rpx; padding: 40rpx 30rpx;
background-color: rgba(255, 255, 255, 0.85);
border-radius: 16rpx;
} }
.getCode { .getCode {
font-size: 10px; font-size: 10px;
@ -525,4 +648,37 @@ export default {
height: 100vh; height: 100vh;
top: 0; top: 0;
} }
@keyframes gradient {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
.slot-content {
padding: 30rpx 20rpx;
font-size: 28rpx;
}
.success-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10rpx 0;
}
.item-label {
color: #606266;
margin-right: 20rpx;
flex-shrink: 0;
}
.item-value {
color: #303133;
word-break: break-all;
text-align: right;
}
</style> </style>

View File

@ -189,6 +189,7 @@ export default {
}, },
data() { data() {
return { return {
newShareMember: false,
isSelectAll: [], isSelectAll: [],
shopCarList: [], shopCarList: [],
isLoading: false, isLoading: false,
@ -227,6 +228,8 @@ export default {
onShow() { onShow() {
this.getCarList() this.getCarList()
this.initCarList() this.initCarList()
this.newShareMember = uni.getStorageSync('User')?.loginType !== 0
console.log('this.nerShareMember', this.newShareMember)
}, },
methods: { methods: {
tableTrue() { tableTrue() {
@ -351,13 +354,25 @@ export default {
shoppingId: item, shoppingId: item,
}) })
}) })
uni.navigateTo({ // sangelxiu1
url: this.newShareMember = uni.getStorageSync('User')?.loginType !== 0
'/pages/regiest/index?specialArea=' + if(this.newShareMember){
this.goodsCheck[0].specialArea + uni.navigateTo({
'&shoppArr=' + url:
JSON.stringify(shoppArr), '/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) { } else if (this.goodsCheck[0].specialArea == 21) {
uni.setStorageSync( uni.setStorageSync(
'haiConfirm', 'haiConfirm',
@ -571,6 +586,13 @@ export default {
}) })
}) })
this.shopCarList = res.data this.shopCarList = res.data
if(this.newShareMember){
if(this.shopCarList){
this.shopCarList = this.shopCarList.filter(car => car.specialArea === 41);
let subCar = this.shopCarList.find(car => car.specialArea === 41)
this.$set(subCar, 'specialAreaVal', '会员专区')
}
}
}) })
}, },
}, },

View File

@ -43,6 +43,7 @@ export default {
}, },
data() { data() {
return { return {
newShareMember: false,
user: '', user: '',
goodsList: [], goodsList: [],
specialImg: require('@/static/images/two2.jpg'), specialImg: require('@/static/images/two2.jpg'),
@ -245,6 +246,7 @@ export default {
}, },
onShow() { onShow() {
this.user = uni.getStorageSync('User') this.user = uni.getStorageSync('User')
this.newShareMember = this.user?.loginType !== 0
// user.registerShare // user.registerShare
}, },
methods: { methods: {
@ -330,9 +332,13 @@ export default {
} }
}, },
getGoodsInfo() { getGoodsInfo() {
let userInfo = uni.getStorageSync('User')
getAreaGoods().then(res => { getAreaGoods().then(res => {
this.goodsList = res.data this.goodsList = res.data
if(this.newShareMember){
let obj = this.goodsList.recommendSpecialAreaList.find(item => item.specialArea === 41)
this.$set(obj, 'specialAreaName', '会员专区')
this.goodsList.recommendSpecialAreaList = this.goodsList.recommendSpecialAreaList.filter(item => item.specialArea === 41)
}
this.$forceUpdate() this.$forceUpdate()
}) })
}, },

View File

@ -32,7 +32,8 @@
</view> </view>
</u-scroll-list> </u-scroll-list>
<view class="index_btm"> <view class="index_btm">
<view class="index_l"> <!-- sangelxiu1 会员专区 隐藏分类-->
<view class="index_l" v-if="!newShareMember">
<view <view
v-for="item in oneList" v-for="item in oneList"
:class="['classIfy', oneId == item.pkId ? 'actOne' : '']" :class="['classIfy', oneId == item.pkId ? 'actOne' : '']"
@ -45,7 +46,7 @@
>{{ item.classifyName }}</view >{{ item.classifyName }}</view
> >
</view> </view>
<view class="index_r"> <view :class="newShareMember ? 'index_r_2': 'index_r'">
<u-scroll-list :indicator="false" class="tabList"> <u-scroll-list :indicator="false" class="tabList">
<view class="tab"> <view class="tab">
<view <view
@ -261,6 +262,7 @@ export default {
}, },
data() { data() {
return { return {
newShareMember: false,
specialArea: 1, specialArea: 1,
oneList: [], oneList: [],
oneId: '', oneId: '',
@ -346,6 +348,7 @@ export default {
}) })
}, },
onShow() { onShow() {
this.newShareMember = uni.getStorageSync('User')?.loginType !== 0
let that = this let that = this
uni.$on('returnData', function (data) { uni.$on('returnData', function (data) {
that.specialArea = data.value that.specialArea = data.value
@ -491,6 +494,7 @@ export default {
pkId: pkId, pkId: pkId,
}) })
this.twoList = res.data this.twoList = res.data
this.twoList = this.twoList.filter(item => 'classifyName' in item)
this.twoId = pkId this.twoId = pkId
}) })
}, },
@ -636,6 +640,13 @@ export default {
margin-left: 198rpx; // padding: 20rpx; margin-left: 198rpx; // padding: 20rpx;
// display: flex; // display: flex;
} }
.index_r_2 {
// flex: 1;
background: #fff;
margin-left: 20rpx; // padding: 20rpx;
// display: flex;
}
} }
.classIfy { .classIfy {