feat(specialArea): 专区接口调整

This commit is contained in:
woody 2025-06-09 14:39:09 +08:00
parent a3e005655c
commit 5527a30484
7 changed files with 649 additions and 768 deletions

View File

@ -7,59 +7,158 @@
<template> <template>
<view> <view>
<!-- v-if="user.skin == 0" --> <!-- v-if="user.skin == 0" -->
<u-tabbar v-if="systemSkin === 0" :value="current ? current : 0" @change="tabbarChange" :fixed="true" :placeholder="false" <u-tabbar
:border="false" :safeAreaInsetBottom="true" inactiveColor="#666666" activeColor="#333333"> v-if="systemSkin === 0"
:value="current ? current : 0"
@change="tabbarChange"
:fixed="true"
:placeholder="false"
:border="false"
:safeAreaInsetBottom="true"
inactiveColor="#666666"
activeColor="#333333"
>
<u-tabbar-item :text="'首页'"> <u-tabbar-item :text="'首页'">
<image class="u-page__item__slot-icon" slot="active-icon" src="@/static/images/one1.png"></image> <image
<image class="u-page__item__slot-icon" slot="inactive-icon" src="@/static/images/one2.png"></image> class="u-page__item__slot-icon"
slot="active-icon"
src="@/static/images/one1.png"
></image>
<image
class="u-page__item__slot-icon"
slot="inactive-icon"
src="@/static/images/one2.png"
></image>
</u-tabbar-item> </u-tabbar-item>
<u-tabbar-item :text="'站内信'"> <u-tabbar-item :text="'站内信'">
<image class="u-page__item__slot-icon" slot="active-icon" src="@/static/images/two1.png"></image> <image
<image class="u-page__item__slot-icon" slot="inactive-icon" src="@/static/images/two2.png"></image> class="u-page__item__slot-icon"
slot="active-icon"
src="@/static/images/two1.png"
></image>
<image
class="u-page__item__slot-icon"
slot="inactive-icon"
src="@/static/images/two2.png"
></image>
</u-tabbar-item> </u-tabbar-item>
<u-tabbar-item :text="'会员专区'"> <u-tabbar-item :text="'会员专区'">
<image class="u-page__item__slot-icon" slot="active-icon" src="@/static/images/five1.jpg"></image> <image
<image class="u-page__item__slot-icon" slot="inactive-icon" src="@/static/images/five2.jpg"></image> class="u-page__item__slot-icon"
slot="active-icon"
src="@/static/images/five1.jpg"
></image>
<image
class="u-page__item__slot-icon"
slot="inactive-icon"
src="@/static/images/five2.jpg"
></image>
</u-tabbar-item> </u-tabbar-item>
<u-tabbar-item :text="'购物车'" :badge="shopCarLength"> <u-tabbar-item :text="'购物车'" :badge="shopCarLength">
<image class="u-page__item__slot-icon" slot="active-icon" src="@/static/images/three1.png"></image> <image
<image class="u-page__item__slot-icon" slot="inactive-icon" src="@/static/images/three2.png"></image> class="u-page__item__slot-icon"
slot="active-icon"
src="@/static/images/three1.png"
></image>
<image
class="u-page__item__slot-icon"
slot="inactive-icon"
src="@/static/images/three2.png"
></image>
</u-tabbar-item> </u-tabbar-item>
<u-tabbar-item :text="'我的'"> <u-tabbar-item :text="'我的'">
<image class="u-page__item__slot-icon" slot="active-icon" src="@/static/images/fore1.png"></image> <image
<image class="u-page__item__slot-icon" slot="inactive-icon" src="@/static/images/fore2.png"></image> class="u-page__item__slot-icon"
slot="active-icon"
src="@/static/images/fore1.png"
></image>
<image
class="u-page__item__slot-icon"
slot="inactive-icon"
src="@/static/images/fore2.png"
></image>
</u-tabbar-item> </u-tabbar-item>
</u-tabbar> </u-tabbar>
<u-tabbar :value="current ? current : 0" class="greenEd" v-if="systemSkin === 2" @change="tabbarChange" :fixed="true" <u-tabbar
:placeholder="false" :border="false" :safeAreaInsetBottom="true" inactiveColor="#666666" activeColor="#333333"> :value="current ? current : 0"
class="greenEd"
v-if="systemSkin === 2"
@change="tabbarChange"
:fixed="true"
:placeholder="false"
:border="false"
:safeAreaInsetBottom="true"
inactiveColor="#666666"
activeColor="#333333"
>
<u-tabbar-item :text="'首页'"> <u-tabbar-item :text="'首页'">
<image class="u-page__item__slot-icon1" slot="active-icon" src="@/static/images/one11.jpg"></image> <image
<image class="u-page__item__slot-icon1" slot="inactive-icon" src="@/static/images/one11.jpg"></image> class="u-page__item__slot-icon1"
slot="active-icon"
src="@/static/images/one11.jpg"
></image>
<image
class="u-page__item__slot-icon1"
slot="inactive-icon"
src="@/static/images/one11.jpg"
></image>
</u-tabbar-item> </u-tabbar-item>
<u-tabbar-item :text="'站内信'"> <u-tabbar-item :text="'站内信'">
<image class="u-page__item__slot-icon1" slot="active-icon" src="@/static/images/two11.jpg"></image> <image
<image class="u-page__item__slot-icon1" slot="inactive-icon" src="@/static/images/two11.jpg"></image> class="u-page__item__slot-icon1"
slot="active-icon"
src="@/static/images/two11.jpg"
></image>
<image
class="u-page__item__slot-icon1"
slot="inactive-icon"
src="@/static/images/two11.jpg"
></image>
</u-tabbar-item> </u-tabbar-item>
<u-tabbar-item :text="'会员专区'"> <u-tabbar-item :text="'会员专区'">
<image class="u-page__item__slot-icon2" slot="active-icon" src="@/static/images/five11.jpg"></image> <image
<image class="u-page__item__slot-icon2" slot="inactive-icon" src="@/static/images/five11.jpg"></image> class="u-page__item__slot-icon2"
slot="active-icon"
src="@/static/images/five11.jpg"
></image>
<image
class="u-page__item__slot-icon2"
slot="inactive-icon"
src="@/static/images/five11.jpg"
></image>
</u-tabbar-item> </u-tabbar-item>
<u-tabbar-item :text="'购物车'" :badge="shopCarLength"> <u-tabbar-item :text="'购物车'" :badge="shopCarLength">
<image class="u-page__item__slot-icon1" slot="active-icon" src="@/static/images/three11.jpg"></image> <image
<image class="u-page__item__slot-icon1" slot="inactive-icon" src="@/static/images/three11.jpg"></image> class="u-page__item__slot-icon1"
slot="active-icon"
src="@/static/images/three11.jpg"
></image>
<image
class="u-page__item__slot-icon1"
slot="inactive-icon"
src="@/static/images/three11.jpg"
></image>
</u-tabbar-item> </u-tabbar-item>
<u-tabbar-item :text="'我的'"> <u-tabbar-item :text="'我的'">
<image class="u-page__item__slot-icon1" slot="active-icon" src="@/static/images/fore11.jpg"></image> <image
<image class="u-page__item__slot-icon1" slot="inactive-icon" src="@/static/images/fore11.jpg"></image> class="u-page__item__slot-icon1"
slot="active-icon"
src="@/static/images/fore11.jpg"
></image>
<image
class="u-page__item__slot-icon1"
slot="inactive-icon"
src="@/static/images/fore11.jpg"
></image>
</u-tabbar-item> </u-tabbar-item>
</u-tabbar> </u-tabbar>
</view> </view>
</template> </template>
<script> <script>
import { mapGetters } from "vuex"; import { mapGetters } from 'vuex'
export default { export default {
props: { props: {
current: Number, current: Number,
@ -94,8 +193,8 @@ export default {
computed: { computed: {
...mapGetters(['shopCarLength', 'user']), ...mapGetters(['shopCarLength', 'user']),
systemSkin() { systemSkin() {
return this.user.skin || 0 return this.user?.skin || 0
} },
}, },
methods: { methods: {
tabbarChange(e) { tabbarChange(e) {
@ -131,7 +230,7 @@ export default {
} }
::v-deep .u-tabbar__content__item-wrapper { ::v-deep .u-tabbar__content__item-wrapper {
height: 80px height: 80px;
} }
::v-deep .u-tabbar-item { ::v-deep .u-tabbar-item {

View File

@ -1,4 +1,5 @@
const http = uni.$u.http const http = uni.$u.http
//会员专区商品列表 //会员专区商品列表
export const getAreaGoods = (params) => http.get('/sale/api/wares/list-wares', params) export const getAreaGoods = params =>
http.post('/sale/api/retail-wares/wares-list', params)

View File

@ -142,7 +142,7 @@
></directrank-popup> ></directrank-popup>
--> -->
<u-modal <!-- <u-modal
:show="promptFlag" :show="promptFlag"
title="提示" title="提示"
:closeOnClickOverlay="true" :closeOnClickOverlay="true"
@ -153,7 +153,7 @@
@cancel="promptFlag = false" @cancel="promptFlag = false"
@confirm="toDel" @confirm="toDel"
:content="promptMsg" :content="promptMsg"
></u-modal> ></u-modal> -->
</div> </div>
</view> </view>
</view> </view>
@ -401,7 +401,7 @@ export default {
this.getGoodsInfo() this.getGoodsInfo()
this.getAreaGoods() this.getAreaGoods()
// this.getLanguage(); // this.getLanguage();
this.getService() // this.getService()
}, },
onShow() { onShow() {
this.$store.dispatch('getCarLength') this.$store.dispatch('getCarLength')

View File

@ -1,43 +1,135 @@
<template> <template>
<view class="content"> <view class="content">
<view class="theform"> <view class="theform">
<u--form labelPosition="left" :model="dataForm" :rules="rules" ref="uForm"> <u--form
<u-form-item label-width="200rpx" :label="'银行卡号'" borderBottom prop="cardNumber" ref="item1"> labelPosition="left"
<u--input v-model="dataForm.cardNumber" disabledColor="#F5F5F5;" border="none"></u--input> :model="dataForm"
:rules="rules"
ref="uForm"
>
<u-form-item
label-width="200rpx"
:label="'银行卡号'"
borderBottom
prop="cardNumber"
ref="item1"
>
<u--input
v-model="dataForm.cardNumber"
disabledColor="#F5F5F5;"
border="none"
></u--input>
</u-form-item> </u-form-item>
<u-form-item borderBottom label-width="200rpx" :label="'银行名称'" prop="bankName" <u-form-item
@click="showAmount = true; " ref="item1"> borderBottom
<u--input v-model="dataForm.bankName" disabledColor="#ffffff" :placeholder="'请选择'" label-width="200rpx"
border="none"></u--input> :label="'银行名称'"
prop="bankName"
@click="showAmount = true"
ref="item1"
>
<u--input
v-model="dataForm.bankName"
disabledColor="#ffffff"
:placeholder="'请选择'"
border="none"
></u--input>
<u-icon slot="right" name="arrow-right"></u-icon> <u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>
<u-form-item
<u-form-item label-width="200rpx" :label="'开户支行'" prop="subBankName" borderBottom ref="item1"> label-width="200rpx"
<u--input v-model="dataForm.subBankName" disabledColor="#F5F5F5;" border="none"></u--input> :label="'开户支行'"
prop="subBankName"
borderBottom
ref="item1"
>
<u--input
v-model="dataForm.subBankName"
disabledColor="#F5F5F5;"
border="none"
></u--input>
</u-form-item> </u-form-item>
<u-form-item label-width="200rpx" :label="'真实姓名'" prop="accountName" borderBottom ref="item1"> <u-form-item
<u--input :placeholder="'请输入'" v-model="dataForm.accountName" border="none"></u--input> label-width="200rpx"
:label="'真实姓名'"
prop="accountName"
borderBottom
ref="item1"
>
<u--input
:placeholder="'请输入'"
v-model="dataForm.accountName"
border="none"
></u--input>
</u-form-item> </u-form-item>
<u-form-item label-width="200rpx" :label="'证件号码'" prop="idCard" borderBottom ref="item1"> <u-form-item
<u--input v-model="dataForm.idCard" :placeholder="'请输入'" disabledColor="#F5F5F5;" label-width="200rpx"
border="none"></u--input> :label="'证件号码'"
prop="idCard"
borderBottom
ref="item1"
>
<u--input
v-model="dataForm.idCard"
:placeholder="'请输入'"
disabledColor="#F5F5F5;"
border="none"
></u--input>
</u-form-item> </u-form-item>
<u-form-item label-width="200rpx" :label="'联系方式'" prop="phone" borderBottom ref="item1"> <u-form-item
<u--input v-model="dataForm.phone" :placeholder="'请输入'" maxlength="20" border="none"></u--input> label-width="200rpx"
:label="'联系方式'"
prop="phone"
borderBottom
ref="item1"
>
<u--input
v-model="dataForm.phone"
:placeholder="'请输入'"
maxlength="20"
border="none"
></u--input>
</u-form-item> </u-form-item>
<u-form-item v-if="userInfo.pkCountry==1&&cancode" label-width="200rpx" :label="'验证码'" <u-form-item
prop="verificationCode" borderBottom ref="item1"> v-if="userInfo.pkCountry == 1 && cancode"
<u--input v-model="dataForm.verificationCode" :placeholder="'请输入'" border="none"></u--input> label-width="200rpx"
<u-button @tap='getCode' class="getcodes" type="primary" shape="circle" :text="tips" :label="'验证码'"
color="#2FBC42"></u-button> prop="verificationCode"
borderBottom
ref="item1"
>
<u--input
v-model="dataForm.verificationCode"
:placeholder="'请输入'"
border="none"
></u--input>
<u-button
@tap="getCode"
class="getcodes"
type="primary"
shape="circle"
:text="tips"
color="#2FBC42"
></u-button>
</u-form-item> </u-form-item>
<u-code :seconds="seconds" @end="end" @start="start" ref="uCode" @change="codeChange"></u-code> <u-code
<u-picker @cancel='showAmount=false' :show="showAmount" ref="uPicker" :columns="bankCardChioceList" :seconds="seconds"
@confirm="confirm" keyName='bankName'></u-picker> @end="end"
@start="start"
ref="uCode"
@change="codeChange"
></u-code>
<u-picker
@cancel="showAmount = false"
:show="showAmount"
ref="uPicker"
:columns="bankCardChioceList"
@confirm="confirm"
keyName="bankName"
></u-picker>
</u--form> </u--form>
</view> </view>
<view class="btnbox"> <view class="btnbox">
<u-button class="subbtn" @click="submit">{{ '确定' }}</u-button> <u-button class="subbtn" @click="submit">{{ '确定' }}</u-button>
@ -47,63 +139,76 @@
</template> </template>
<script> <script>
import * as ban from "@/config/balance.js" import * as ban from '@/config/balance.js'
export default { export default {
data() { data() {
return { return {
showAmount: false, showAmount: false,
dataForm: { dataForm: {
bankName: "", bankName: '',
cardNumber: "", cardNumber: '',
pkBank: "", pkBank: '',
subBankName: "", subBankName: '',
accountName: "", accountName: '',
idCard: "", idCard: '',
}, },
bankCardChioceList: [], bankCardChioceList: [],
rules: { rules: {
cardNumber: [{ cardNumber: [
{
type: 'string', type: 'string',
required: true, required: true,
message: '请输入', message: '请输入',
trigger: ['blur', 'change'] trigger: ['blur', 'change'],
}], },
subBankName: [{ ],
subBankName: [
{
type: 'string', type: 'string',
required: true, required: true,
message: '请输入', message: '请输入',
trigger: ['blur', 'change'] trigger: ['blur', 'change'],
}], },
accountName: [{ ],
accountName: [
{
type: 'string', type: 'string',
required: true, required: true,
message: '请输入', message: '请输入',
trigger: ['blur', 'change'] trigger: ['blur', 'change'],
}], },
idCard: [{ ],
idCard: [
{
type: 'string', type: 'string',
required: true, required: true,
message: '请输入', message: '请输入',
trigger: ['blur', 'change'] trigger: ['blur', 'change'],
}], },
phone: [{ ],
phone: [
{
type: 'string', type: 'string',
required: true, required: true,
message: '请输入', message: '请输入',
trigger: ['blur', 'change'] trigger: ['blur', 'change'],
}], },
verificationCode: [{ ],
verificationCode: [
{
type: 'string', type: 'string',
required: true, required: true,
message: '请输入', message: '请输入',
trigger: ['blur', 'change'] trigger: ['blur', 'change'],
}], },
bankName: [{ ],
bankName: [
{
required: true, required: true,
message: '请选择', message: '请选择',
trigger: ['change'] trigger: ['change'],
}], },
],
}, },
tips: '', tips: '',
// refCode: null, // refCode: null,
@ -111,49 +216,51 @@
ifpass: false, ifpass: false,
userInfo: {}, userInfo: {},
cancode: true, // cancode: true, //
} }
}, },
onLoad() { onLoad() {
this.userInfo = uni.getStorageSync('User') this.userInfo = uni.getStorageSync('User')
this.getList() this.getList()
this.checkIfWhite(); this.checkIfWhite()
}, },
methods: { methods: {
checkIfWhite() { checkIfWhite() {
ban.checkIfWhite().then((res) => { ban.checkIfWhite().then(res => {
if (res.code == 200 && res.flag == "N") { if (res.code == 200 && res.flag == 'N') {
this.cancode = true; this.cancode = true
} else if (res.code == 200 && res.flag == "Y") { } else if (res.code == 200 && res.flag == 'Y') {
this.cancode = false; this.cancode = false
} }
}); })
}, },
codeChange(text) { codeChange(text) {
this.tips = text; this.tips = text
}, },
getCode() { getCode() {
if (this.dataForm.phone && this.$u.test.mobile(this.dataForm.phone)) { if (this.dataForm.phone && this.$u.test.mobile(this.dataForm.phone)) {
if (this.$refs.uCode.canGetCode) { if (this.$refs.uCode.canGetCode) {
// //
uni.showLoading({ uni.showLoading({
title: '正在获取验证码' title: '正在获取验证码',
}) })
ban.getVerification({ ban
phone: this.dataForm.phone .getVerification({
}).then((res) => { phone: this.dataForm.phone,
uni.hideLoading(); })
.then(res => {
uni.hideLoading()
// this.start() // this.start()
uni.$u.toast('验证码已发送'); uni.$u.toast('验证码已发送')
// //
this.$refs.uCode.start(); this.$refs.uCode.start()
}) })
} else { } else {
uni.$u.toast('倒计时结束后再发送'); uni.$u.toast('倒计时结束后再发送')
} }
} else { } else {
uni.$u.toast(this.dataForm.phone ? '手机号格式不正确' : '请先输入手机号') uni.$u.toast(
this.dataForm.phone ? '手机号格式不正确' : '请先输入手机号'
)
return return
} }
}, },
@ -167,7 +274,6 @@
ban.getBankCardChoiceList().then(res => { ban.getBankCardChoiceList().then(res => {
this.bankCardChioceList = [res.data] this.bankCardChioceList = [res.data]
}) })
}, },
bindBank() { bindBank() {
if (!this.ifpass && this.cancode && this.userInfo.pkCountry == 1) { if (!this.ifpass && this.cancode && this.userInfo.pkCountry == 1) {
@ -182,38 +288,41 @@
}, 1000) }, 1000)
} }
}) })
}, },
submit() { submit() {
this.$refs.uForm.validate().then(res => { this.$refs.uForm
// .validate()
this.ifpass = true; .then(res => {
this.bindBank(); //
this.ifpass = true
this.bindBank()
return return
if (this.userInfo.pkCountry == 1) { if (this.userInfo.pkCountry == 1) {
if (this.cancode) { if (this.cancode) {
ban.verifyBankCard(this.dataForm).then((res) => { ban
.verifyBankCard(this.dataForm)
.then(res => {
if (res.code == 200) { if (res.code == 200) {
this.ifpass = true; this.ifpass = true
this.bindBank(); this.bindBank()
} else { } else {
this.ifpass = false; this.ifpass = false
uni.$u.toast(res.msg) uni.$u.toast(res.msg)
} }
}) })
.catch((err) => { .catch(err => {
this.ifpass = false; this.ifpass = false
}); })
} else { } else {
this.ifpass = true; this.ifpass = true
this.bindBank(); this.bindBank()
} }
} else { } else {
this.bindBank() this.bindBank()
} }
})
}).catch(errors => { .catch(errors => {
uni.$u.toast('校验失败') uni.$u.toast('校验失败')
return false return false
}) })
@ -223,18 +332,17 @@
this.dataForm.pkBank = e.value[0].pkId this.dataForm.pkBank = e.value[0].pkId
this.showAmount = false this.showAmount = false
}, },
},
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content { .content {
background: #F2F2F2; background: #f2f2f2;
.theform { .theform {
margin-top: 6rpx; margin-top: 6rpx;
background: #FFFFFF; background: #ffffff;
padding: 20rpx 23rpx 0rpx 23rpx; padding: 20rpx 23rpx 0rpx 23rpx;
.contentye { .contentye {
@ -243,7 +351,6 @@
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
font-weight: 400; font-weight: 400;
} }
} }
.btnbox { .btnbox {
@ -251,23 +358,21 @@
padding: 0 20rpx; padding: 0 20rpx;
.subbtn { .subbtn {
background: #005BAC; background: #005bac;
border-radius: 46rpx; border-radius: 46rpx;
font-size: 30rpx; font-size: 30rpx;
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #ffffff;
} }
} }
.getcodes { .getcodes {
width: 197rpx; width: 197rpx;
height: 76rpx; height: 76rpx;
background: #2FBC42; background: #2fbc42;
border-radius: 38rpx; border-radius: 38rpx;
color: #fff; color: #fff;
} }
} }
</style> </style>

View File

@ -6,57 +6,37 @@
--> -->
<template> <template>
<view class="content"> <view class="content">
<view class="index_header"> <view class="index_header"> </view>
</view>
<view class="contxt"> <view class="contxt">
<view class="kuang"> <view class="kuang">
<u-form :model="form" <u-form :model="form" labelWidth="auto" :rules="rules" ref="uForm">
labelWidth="auto" <u-form-item :label="'银行卡号'" required prop="bankNo">
:rules="rules" <u-input v-model="form.bankNo" :placeholder="'请输入银行卡卡号'" />
ref="uForm">
<u-form-item :label="'银行卡号'"
required
prop="bankNo">
<u-input v-model="form.bankNo"
:placeholder="'请输入银行卡卡号'" />
</u-form-item> </u-form-item>
<u-form-item :label="'姓名'" <u-form-item :label="'姓名'" required prop="name">
required <u-input v-model="form.name" :placeholder="'请输入姓名'" />
prop="name">
<u-input v-model="form.name"
:placeholder="'请输入姓名'" />
</u-form-item> </u-form-item>
<u-form-item :label="'身份证'" <u-form-item :label="'身份证'" required prop="idCard">
required <u-input v-model="form.idCard" :placeholder="'请输入身份证号码'" />
prop="idCard">
<u-input v-model="form.idCard"
:placeholder="'请输入身份证号码'" />
</u-form-item> </u-form-item>
<u-form-item :label="'手机号'" <u-form-item :label="'手机号'" required prop="phone">
required <u-input
prop="phone"> v-model="form.phone"
<u-input v-model="form.phone"
maxlength="20" maxlength="20"
type="number" type="number"
:placeholder="'请输入银行预留手机号'" /> :placeholder="'请输入银行预留手机号'"
/>
</u-form-item> </u-form-item>
<u-form-item label="有效期"> <u-form-item label="有效期">
<u-input v-model="form.validdate" <u-input v-model="form.validdate" :placeholder="'请输入'" />
:placeholder="'请输入'" />
</u-form-item> </u-form-item>
<u-form-item label="安全码"> <u-form-item label="安全码">
<u-input v-model="form.cvv2" <u-input v-model="form.cvv2" :placeholder="'请输入'" />
:placeholder="'请输入'" />
</u-form-item> </u-form-item>
<u-form-item :label="'验证码'" <u-form-item :label="'验证码'" required prop="smsCode">
required <u-input v-model="form.smsCode" :placeholder="'请输入验证码'">
prop="smsCode">
<u-input v-model="form.smsCode"
:placeholder="'请输入验证码'">
<template slot="suffix"> <template slot="suffix">
<view class="getCode" <view class="getCode" @tap="submitForm">{{ getCode }}</view>
@tap="submitForm">{{ getCode }}</view>
</template> </template>
</u-input> </u-input>
</u-form-item> </u-form-item>
@ -67,13 +47,16 @@
<p>3安全码为信用卡背面签名栏后3位数字</p> <p>3安全码为信用卡背面签名栏后3位数字</p>
<p>4信用卡有效期格式不加/例信用卡有效期10/24请输入1024</p> <p>4信用卡有效期格式不加/例信用卡有效期10/24请输入1024</p>
</div> </div>
<u-button type="success" <u-button
type="success"
class="uBtn" class="uBtn"
shape="circle" shape="circle"
color="linear-gradient(to right, #005BAC, #005BAC )" color="linear-gradient(to right, #005BAC, #005BAC )"
:loading="isLoading" :loading="isLoading"
:loadingText="'绑定中'" :loadingText="'绑定中'"
@click="toBind">{{ '立即绑定' }}</u-button> @click="toBind"
>{{ '立即绑定' }}</u-button
>
</view> </view>
</view> </view>
</view> </view>
@ -159,7 +142,7 @@ export default {
url({ url({
bindCode: this.bankCode, bindCode: this.bankCode,
smsCode: this.form.smsCode, smsCode: this.form.smsCode,
}).then((res) => { }).then(res => {
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ uni.showToast({
title: '绑卡成功', title: '绑卡成功',
@ -186,7 +169,7 @@ export default {
}, },
// //
submitForm() { submitForm() {
this.$refs.uForm.validate().then((res) => { this.$refs.uForm.validate().then(res => {
if (!this.areBothValuesSet(this.form.validdate, this.form.cvv2)) { if (!this.areBothValuesSet(this.form.validdate, this.form.cvv2)) {
uni.showToast({ uni.showToast({
title: '请输入安全码及有效期', title: '请输入安全码及有效期',
@ -209,8 +192,7 @@ export default {
} else if (this.bank == 'hf') { } else if (this.bank == 'hf') {
url = pay.bindHf url = pay.bindHf
} }
url(this.form) url(this.form).then(res => {
.then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.bankCode = res.data this.bankCode = res.data
} else { } else {
@ -262,7 +244,9 @@ export default {
} }
.getCode { .getCode {
font-size: 10px; font-size: 10px;
font-family: PingFang SC-Regular, PingFang SC; font-family:
PingFang SC-Regular,
PingFang SC;
font-weight: 400; font-weight: 400;
color: #18acff; color: #18acff;
} }

View File

@ -7,18 +7,54 @@
<template> <template>
<view class="content"> <view class="content">
<view class="goods-sort"> <view class="goods-sort">
<view class="goods-flexs"> <!-- 注册 -->
<view <view
class="goods-view" v-if="registList.length > 0 && user.memberSign !== 1"
@click="navTap(item)" class="goods-flexs"
v-for="item in goodsList.recommendSpecialAreaList "
:key="item.pkWares"
> >
<view class="bg-color"></view> <view class="goods-view">
<area-product-list
<area-product-list v-if="item.waresList && item.waresList.length > 0" :list="item.waresList" :title="item.specialAreaName"></area-product-list> :list="registList"
:title="regist.name"
></area-product-list>
</view> </view>
</view> </view>
<!-- 升级 -->
<view
v-if="upgradeList.length > 0 && user.memberSign === 1"
class="goods-flexs"
>
<view class="goods-view">
<area-product-list
:list="upgradeList"
:title="upgrade.name"
></area-product-list>
</view>
</view>
<!-- 复购 -->
<view
v-if="repurchaseList.length > 0 && user.memberSign === 1"
class="goods-flexs"
>
<view class="goods-view">
<area-product-list
:list="repurchaseList"
:title="repurchase.name"
></area-product-list>
</view>
</view>
</view>
<!-- 重消 -->
<view
v-if="rescissionList.length > 0 && user.memberSign === 1"
class="goods-flexs"
>
<view class="goods-view">
<area-product-list
:list="rescissionList"
:title="rescission.name"
></area-product-list>
</view>
</view> </view>
<cl-tabbar :current="2"></cl-tabbar> <cl-tabbar :current="2"></cl-tabbar>
</view> </view>
@ -31,329 +67,60 @@ import * as apis from '@/config/index.js'
import clTabbar from '@/components/cl-tabbar.vue' import clTabbar from '@/components/cl-tabbar.vue'
import * as ban from '@/config/balance.js' import * as ban from '@/config/balance.js'
import areaProductList from '@/components/area-product-list/index.vue' import areaProductList from '@/components/area-product-list/index.vue'
import { mapGetters } from 'vuex'
import {
REGIEST_AREA,
UPGRADE_AREA,
REPURCHASE_AREA,
REISSUE_AREA,
} from '@/util/specialAreaMap'
export default { export default {
components: { components: {
'cl-tabbar': clTabbar, 'cl-tabbar': clTabbar,
'area-product-list': areaProductList, 'area-product-list': areaProductList,
}, },
computed: {
...mapGetters(['user']),
},
data() { data() {
return { return {
user: '',
goodsList: [], goodsList: [],
specialImg: require('@/static/images/two2.jpg'), specialImg: require('@/static/images/two2.jpg'),
zoneList: [ registList: [],
{ upgradeList: [],
label: '注册专区', repurchaseList: [],
value: 1, rescissionList: [],
name: 'regiest', regist: REGIEST_AREA,
children: [ upgrade: UPGRADE_AREA,
{ repurchase: REPURCHASE_AREA,
label: '自营专区', rescission: REISSUE_AREA,
value: 1,
name: 'regiestArea',
isShow: true,
},
{
label: '注册专区',
value: 24,
name: 'ezLearnReg',
isShow: true,
},
],
},
{
label: '升级专区',
value: 2,
name: 'upgrade',
children: [
{
label: '自营专区',
value: 2,
name: 'upgradeArea',
isShow: true,
},
{
label: '升级专区',
value: 25,
name: 'ezLearnUp',
isShow: true,
},
{
label: '海粉专区',
value: 27,
name: 'haiFunUpd',
isShow: true,
},
],
},
{
label: '复购专区',
value: 3,
name: 'repurchase',
children: [
{
label: '自营专区',
value: 3,
name: 'self',
isShow: true,
},
{
label: '乐学甄选',
value: 26,
name: 'ezLearnRep',
isShow: true,
},
{
label: '免费注册',
value: 21,
name: 'haiFans',
isShow: true,
},
{
label: '复购合作',
value: 22,
name: 'cooperation',
isShow: true,
},
{
label: '直播专区',
value: 14,
name: 'live',
isShow: true,
},
{
label: '工具流',
value: 12,
name: 'gongju',
isShow: true,
},
],
},
{
label: '福利专区',
value: 13,
children: [],
name: 'welfare',
},
{
label: '积分专区',
value: 11,
children: [],
name: 'integral',
},
{
label: '重消专区',
value: 10,
children: [],
name: 'rescission',
},
{
label: '专供专区',
value: 31,
children: [],
name: "wolesaleArea",
},
{
label: '续约专区',
value: 30,
children: [],
name: "renewalArea",
},
{
label: '创客空间专区',
value:28,
children: [],
isShow: true,
name: "makerArea",
},
{
label: '架构管理',
value: 6,
name: 'frame',
children: [
{
label: '安置架构',
value: 6,
name: 'architecture',
isShow: true,
},
{
label: '推荐架构',
value: 7,
name: 'recommend',
isShow: true,
},
],
},
{
label: '分享专区',
value: 7,
name: 'share',
children: [
{
label: '海粉分享',
value: 7,
name: 'hiFans',
isShow: true,
},
{
label: '免费注册',
value: 21,
name: 'haiFans',
isShow: true,
},
],
},
{
label: '创客礼包',
value: 18,
isShow: true,
children: [
{
label: '创客礼包',
value: 18,
isShow: true,
children: [],
},
{
label: '赋能礼包',
value: 19,
isShow: true,
children: [],
},
],
},
],
} }
}, },
onLoad() { onLoad() {
// this.getMenuList()
this.getGoodsInfo() this.getGoodsInfo()
}, },
onShow() {
this.user = uni.getStorageSync('User')
// user.registerShare
},
methods: {
goUrl() {
ban.agreementName().then((res) => {
if (res.data==0) {
uni.navigateTo({
url:
"/pages/specialArea/list?label=续约专区" +
"&specialArea=30" +
"&children=[]",
});
} else {
uni.showModal({
title: '提示',
content: '请先进行实名认证',
success: (res) => {
if (res.confirm) {
uni.navigateTo({
url: '/pages/selfService/realName/realName',
})
}
},
})
}
})
},
navTap(item) {
if (item.isShare) {
uni.navigateTo({
url: '/pages/specialArea/share?specialArea=21',
})
return false
} else {
let tapx = -1
this.zoneList.forEach((items, index) => {
if (items.value == item.specialArea) {
tapx = index
}
})
if (tapx == -1) {
this.zoneList.forEach((items, index) => {
items.children.forEach((ctem) => {
if (ctem.value == item.specialArea) {
if (item.specialArea == 21) {
uni.navigateTo({
url:
'/pages/specialArea/haIndex?label=' +
item.specialAreaName +
'&specialArea=21',
})
} else {
uni.navigateTo({
url:
'/pages/specialArea/list?label=' +
items.label +
'&specialArea=' +
items.value +
'&childArea=' +
item.specialArea +
'&children=' +
JSON.stringify(items.children),
})
}
}
})
})
} else {
if(item.specialArea == 30){
this.goUrl()
}else{
uni.navigateTo({
url:
'/pages/specialArea/list?label=' +
item.specialAreaName +
'&specialArea=' +
item.specialArea +
'&children=' +
JSON.stringify(this.zoneList[tapx].children),
})
}
} methods: {
}
},
getGoodsInfo() { getGoodsInfo() {
let userInfo = uni.getStorageSync('User') const params = {
getAreaGoods().then((res) => { pageNum: 1,
this.goodsList = res.data pageSize: 3,
this.$forceUpdate()
})
},
getMenuList() {
api.menuList().then((res) => {
res.data.forEach((item) => {
this.zoneList.forEach((ctem) => {
if (ctem.name == item.menuKey) {
ctem.isShow = true
} }
if (ctem.children.length > 0) { const queryArea = [
ctem.children.forEach((stem) => { REGIEST_AREA.id,
if (stem.name == item.menuKey) { UPGRADE_AREA.id,
stem.isShow = true REPURCHASE_AREA.id,
REISSUE_AREA.id,
]
if (this.user.memberSign === 1) {
queryArea.shift()
} }
const queryList = queryArea.map(areaId => {
return getAreaGoods({
pageNum: 1,
pageSize: 3,
specialArea: areaId,
}) })
}
})
})
this.$forceUpdate()
})
},
goGoodList(item) {
uni.navigateTo({
url:
'/pages/specialArea/list?specialArea=' +
item.value +
'&label=' +
item.label +
'&children=' +
JSON.stringify(item.children),
}) })
}, },
}, },
@ -366,105 +133,12 @@ export default {
// padding: 0 20rpx; // padding: 0 20rpx;
min-height: 94vh; min-height: 94vh;
} }
.kuang {
padding-top: 28rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.kuang_i {
background: #ffffff;
border-radius: 20px;
padding: 46rpx 23rpx;
margin-bottom: 25rpx;
width: 42%;
display: flex;
align-items: center;
justify-content: space-between;
img {
width: 55rpx;
height: 55rpx;
}
}
.goods-sort { .goods-sort {
padding-bottom: 130rpx; padding-bottom: 130rpx;
.goods-flexs { .goods-flexs {
padding: 30rpx 20rpx 20rpx; padding: 30rpx 20rpx 20rpx;
position: relative; position: relative;
.bg-color {
width: 100%;
background: linear-gradient(
-180deg,
rgba(255, 226, 226, 0.85) 0%,
rgba(254, 240, 229, 0.45) 38%
);
border-radius: 15rpx 15rpx 0 0;
position: absolute;
top: 0;
left: 0rpx;
}
.goods-view {
position: relative;
background: #ffffff;
border-radius: 15rpx;
margin-bottom: 20rpx;
.goods-top {
z-index: 1;
position: relative;
display: flex;
.title {
color: #333;
font-size: 32rpx;
font-weight: bold;
}
.lables {
height: 28rpx;
background: #f82c1a;
border-radius: 10rpx;
line-height: 24rpx;
font-size: 22rpx;
padding: 5rpx 15rpx;
color: #fff;
max-width: 100rpx;
margin: 5rpx 0 0 10rpx;
}
}
}
.lefts {
margin-left: 15rpx;
}
}
.goods-cen {
display: flex;
margin-top: 20rpx;
justify-content: space-between;
}
.goods-list {
// display: flex;
margin-right: 20rpx;
}
.goods-content {
width: 140rpx;
text-align: center;
.goods {
image {
width: 140rpx;
height: 140rpx;
}
}
}
.price {
height: 40rpx;
line-height: 40rpx;
background: #fde9e9;
border-radius: 14rpx;
color: #e7141a;
font-size: 22rpx;
text-align: center;
width: max-content;
padding: 0 10rpx;
margin: 0 auto;
} }
} }
</style> </style>

18
util/specialAreaMap.js Normal file
View File

@ -0,0 +1,18 @@
export const REGIEST_AREA = {
id: 41,
name: '注册专区',
}
export const UPGRADE_AREA = {
id: 42,
name: '升级专区',
}
export const REISSUE_AREA = {
id: 43,
name: '重消专区',
}
export const REPURCHASE_AREA = {
id: 44,
name: '复购专区',
}