feat(specialArea): 专区接口调整
This commit is contained in:
parent
a3e005655c
commit
5527a30484
|
@ -1,65 +1,164 @@
|
|||
<!--
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: kBank
|
||||
* @Date: 2022-11-21 15:11:22
|
||||
-->
|
||||
<template>
|
||||
<view>
|
||||
<!-- v-if="user.skin == 0" -->
|
||||
<u-tabbar v-if="systemSkin === 0" :value="current ? current : 0" @change="tabbarChange" :fixed="true" :placeholder="false"
|
||||
:border="false" :safeAreaInsetBottom="true" inactiveColor="#666666" activeColor="#333333">
|
||||
<u-tabbar
|
||||
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="'首页'">
|
||||
<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>
|
||||
<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 :text="'站内信'">
|
||||
<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>
|
||||
<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 :text="'会员专区'">
|
||||
<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>
|
||||
<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 :text="'购物车'" :badge="shopCarLength">
|
||||
<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>
|
||||
<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 :text="'我的'">
|
||||
<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>
|
||||
<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>
|
||||
<u-tabbar :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
|
||||
: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="'首页'">
|
||||
<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>
|
||||
<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 :text="'站内信'">
|
||||
<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>
|
||||
<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 :text="'会员专区'">
|
||||
<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>
|
||||
<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 :text="'购物车'" :badge="shopCarLength">
|
||||
<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>
|
||||
<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 :text="'我的'">
|
||||
<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>
|
||||
<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>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from "vuex";
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
props: {
|
||||
current: Number,
|
||||
|
@ -94,8 +193,8 @@ export default {
|
|||
computed: {
|
||||
...mapGetters(['shopCarLength', 'user']),
|
||||
systemSkin() {
|
||||
return this.user.skin || 0
|
||||
}
|
||||
return this.user?.skin || 0
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
tabbarChange(e) {
|
||||
|
@ -131,7 +230,7 @@ export default {
|
|||
}
|
||||
|
||||
::v-deep .u-tabbar__content__item-wrapper {
|
||||
height: 80px
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
::v-deep .u-tabbar-item {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
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)
|
||||
|
|
|
@ -142,7 +142,7 @@
|
|||
></directrank-popup>
|
||||
-->
|
||||
|
||||
<u-modal
|
||||
<!-- <u-modal
|
||||
:show="promptFlag"
|
||||
title="提示"
|
||||
:closeOnClickOverlay="true"
|
||||
|
@ -153,7 +153,7 @@
|
|||
@cancel="promptFlag = false"
|
||||
@confirm="toDel"
|
||||
:content="promptMsg"
|
||||
></u-modal>
|
||||
></u-modal> -->
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -401,7 +401,7 @@ export default {
|
|||
this.getGoodsInfo()
|
||||
this.getAreaGoods()
|
||||
// this.getLanguage();
|
||||
this.getService()
|
||||
// this.getService()
|
||||
},
|
||||
onShow() {
|
||||
this.$store.dispatch('getCarLength')
|
||||
|
|
|
@ -1,273 +1,378 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="theform">
|
||||
<u--form labelPosition="left" :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 borderBottom label-width="200rpx" :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-form-item>
|
||||
<view class="content">
|
||||
<view class="theform">
|
||||
<u--form
|
||||
labelPosition="left"
|
||||
: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
|
||||
borderBottom
|
||||
label-width="200rpx"
|
||||
: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-form-item>
|
||||
|
||||
<u-form-item
|
||||
label-width="200rpx"
|
||||
:label="'开户支行'"
|
||||
prop="subBankName"
|
||||
borderBottom
|
||||
ref="item1"
|
||||
>
|
||||
<u--input
|
||||
v-model="dataForm.subBankName"
|
||||
disabledColor="#F5F5F5;"
|
||||
border="none"
|
||||
></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item
|
||||
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
|
||||
label-width="200rpx"
|
||||
: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
|
||||
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
|
||||
v-if="userInfo.pkCountry == 1 && cancode"
|
||||
label-width="200rpx"
|
||||
:label="'验证码'"
|
||||
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 label-width="200rpx" :label="'开户支行'" prop="subBankName" borderBottom ref="item1">
|
||||
<u--input v-model="dataForm.subBankName" disabledColor="#F5F5F5;" border="none"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item 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 label-width="200rpx" :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 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 v-if="userInfo.pkCountry==1&&cancode" label-width="200rpx" :label="'验证码'"
|
||||
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-code :seconds="seconds" @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>
|
||||
|
||||
</view>
|
||||
<view class="btnbox">
|
||||
<u-button class="subbtn" @click="submit">{{'确定'}}</u-button>
|
||||
</view>
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
</view>
|
||||
<u-code
|
||||
:seconds="seconds"
|
||||
@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>
|
||||
</view>
|
||||
<view class="btnbox">
|
||||
<u-button class="subbtn" @click="submit">{{ '确定' }}</u-button>
|
||||
</view>
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as ban from "@/config/balance.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showAmount: false,
|
||||
dataForm: {
|
||||
bankName: "",
|
||||
cardNumber: "",
|
||||
pkBank: "",
|
||||
subBankName: "",
|
||||
accountName: "",
|
||||
idCard: "",
|
||||
import * as ban from '@/config/balance.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showAmount: false,
|
||||
dataForm: {
|
||||
bankName: '',
|
||||
cardNumber: '',
|
||||
pkBank: '',
|
||||
subBankName: '',
|
||||
accountName: '',
|
||||
idCard: '',
|
||||
},
|
||||
bankCardChioceList: [],
|
||||
rules: {
|
||||
cardNumber: [
|
||||
{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
subBankName: [
|
||||
{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
accountName: [
|
||||
{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
idCard: [
|
||||
{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
phone: [
|
||||
{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
verificationCode: [
|
||||
{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
bankName: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择',
|
||||
trigger: ['change'],
|
||||
},
|
||||
],
|
||||
},
|
||||
tips: '',
|
||||
// refCode: null,
|
||||
seconds: 60,
|
||||
ifpass: false,
|
||||
userInfo: {},
|
||||
cancode: true, //判断是否是白名单
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.userInfo = uni.getStorageSync('User')
|
||||
this.getList()
|
||||
this.checkIfWhite()
|
||||
},
|
||||
methods: {
|
||||
checkIfWhite() {
|
||||
ban.checkIfWhite().then(res => {
|
||||
if (res.code == 200 && res.flag == 'N') {
|
||||
this.cancode = true
|
||||
} else if (res.code == 200 && res.flag == 'Y') {
|
||||
this.cancode = false
|
||||
}
|
||||
})
|
||||
},
|
||||
codeChange(text) {
|
||||
this.tips = text
|
||||
},
|
||||
getCode() {
|
||||
if (this.dataForm.phone && this.$u.test.mobile(this.dataForm.phone)) {
|
||||
if (this.$refs.uCode.canGetCode) {
|
||||
// 模拟向后端请求验证码
|
||||
uni.showLoading({
|
||||
title: '正在获取验证码',
|
||||
})
|
||||
ban
|
||||
.getVerification({
|
||||
phone: this.dataForm.phone,
|
||||
})
|
||||
.then(res => {
|
||||
uni.hideLoading()
|
||||
// 这里此提示会被this.start()方法中的提示覆盖
|
||||
uni.$u.toast('验证码已发送')
|
||||
// 通知验证码组件内部开始倒计时
|
||||
this.$refs.uCode.start()
|
||||
})
|
||||
} else {
|
||||
uni.$u.toast('倒计时结束后再发送')
|
||||
}
|
||||
} else {
|
||||
uni.$u.toast(
|
||||
this.dataForm.phone ? '手机号格式不正确' : '请先输入手机号'
|
||||
)
|
||||
return
|
||||
}
|
||||
},
|
||||
end() {
|
||||
// uni.$u.toast('倒计时结束');
|
||||
},
|
||||
start() {
|
||||
// uni.$u.toast('倒计时开始');
|
||||
},
|
||||
getList() {
|
||||
ban.getBankCardChoiceList().then(res => {
|
||||
this.bankCardChioceList = [res.data]
|
||||
})
|
||||
},
|
||||
bindBank() {
|
||||
if (!this.ifpass && this.cancode && this.userInfo.pkCountry == 1) {
|
||||
uni.$u.toast('验证码错误')
|
||||
return
|
||||
}
|
||||
ban.bindWalletBankAdd(this.dataForm).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.$u.toast(res.msg)
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
this.$refs.uForm
|
||||
.validate()
|
||||
.then(res => {
|
||||
// 没有三方接口 临机写死
|
||||
this.ifpass = true
|
||||
this.bindBank()
|
||||
|
||||
},
|
||||
bankCardChioceList: [],
|
||||
rules: {
|
||||
cardNumber: [{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
subBankName: [{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
accountName: [{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
idCard: [{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
phone: [{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
verificationCode: [{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
bankName: [{
|
||||
required: true,
|
||||
message: '请选择',
|
||||
trigger: ['change']
|
||||
}],
|
||||
},
|
||||
tips: '',
|
||||
// refCode: null,
|
||||
seconds: 60,
|
||||
ifpass: false,
|
||||
userInfo: {},
|
||||
cancode: true, //判断是否是白名单
|
||||
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.userInfo = uni.getStorageSync('User')
|
||||
this.getList()
|
||||
this.checkIfWhite();
|
||||
|
||||
},
|
||||
methods: {
|
||||
checkIfWhite() {
|
||||
ban.checkIfWhite().then((res) => {
|
||||
if (res.code == 200 && res.flag == "N") {
|
||||
this.cancode = true;
|
||||
} else if (res.code == 200 && res.flag == "Y") {
|
||||
this.cancode = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
codeChange(text) {
|
||||
this.tips = text;
|
||||
},
|
||||
getCode() {
|
||||
if (this.dataForm.phone && this.$u.test.mobile(this.dataForm.phone)) {
|
||||
if (this.$refs.uCode.canGetCode) {
|
||||
// 模拟向后端请求验证码
|
||||
uni.showLoading({
|
||||
title: '正在获取验证码'
|
||||
})
|
||||
ban.getVerification({
|
||||
phone: this.dataForm.phone
|
||||
}).then((res) => {
|
||||
uni.hideLoading();
|
||||
// 这里此提示会被this.start()方法中的提示覆盖
|
||||
uni.$u.toast('验证码已发送');
|
||||
// 通知验证码组件内部开始倒计时
|
||||
this.$refs.uCode.start();
|
||||
})
|
||||
} else {
|
||||
uni.$u.toast('倒计时结束后再发送');
|
||||
}
|
||||
} else {
|
||||
uni.$u.toast(this.dataForm.phone ? '手机号格式不正确' : '请先输入手机号')
|
||||
return
|
||||
}
|
||||
},
|
||||
end() {
|
||||
// uni.$u.toast('倒计时结束');
|
||||
},
|
||||
start() {
|
||||
// uni.$u.toast('倒计时开始');
|
||||
},
|
||||
getList() {
|
||||
ban.getBankCardChoiceList().then(res => {
|
||||
this.bankCardChioceList = [res.data]
|
||||
})
|
||||
|
||||
},
|
||||
bindBank() {
|
||||
if (!this.ifpass &&this.cancode &&this.userInfo.pkCountry == 1) {
|
||||
uni.$u.toast('验证码错误')
|
||||
return
|
||||
}
|
||||
ban.bindWalletBankAdd(this.dataForm).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.$u.toast(res.msg)
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
submit() {
|
||||
this.$refs.uForm.validate().then(res => {
|
||||
// 没有三方接口 临时写死
|
||||
this.ifpass = true;
|
||||
this.bindBank();
|
||||
|
||||
return
|
||||
if (this.userInfo.pkCountry == 1) {
|
||||
if(this.cancode){
|
||||
ban.verifyBankCard(this.dataForm).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.ifpass = true;
|
||||
this.bindBank();
|
||||
} else {
|
||||
this.ifpass = false;
|
||||
uni.$u.toast(res.msg)
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
this.ifpass = false;
|
||||
});
|
||||
}else{
|
||||
this.ifpass = true;
|
||||
this.bindBank();
|
||||
}
|
||||
} else {
|
||||
this.bindBank()
|
||||
}
|
||||
|
||||
}).catch(errors => {
|
||||
uni.$u.toast('校验失败')
|
||||
return false
|
||||
})
|
||||
},
|
||||
confirm(e) {
|
||||
this.dataForm.bankName = e.value[0].bankName
|
||||
this.dataForm.pkBank = e.value[0].pkId
|
||||
this.showAmount = false
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
return
|
||||
if (this.userInfo.pkCountry == 1) {
|
||||
if (this.cancode) {
|
||||
ban
|
||||
.verifyBankCard(this.dataForm)
|
||||
.then(res => {
|
||||
if (res.code == 200) {
|
||||
this.ifpass = true
|
||||
this.bindBank()
|
||||
} else {
|
||||
this.ifpass = false
|
||||
uni.$u.toast(res.msg)
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
this.ifpass = false
|
||||
})
|
||||
} else {
|
||||
this.ifpass = true
|
||||
this.bindBank()
|
||||
}
|
||||
} else {
|
||||
this.bindBank()
|
||||
}
|
||||
})
|
||||
.catch(errors => {
|
||||
uni.$u.toast('校验失败')
|
||||
return false
|
||||
})
|
||||
},
|
||||
confirm(e) {
|
||||
this.dataForm.bankName = e.value[0].bankName
|
||||
this.dataForm.pkBank = e.value[0].pkId
|
||||
this.showAmount = false
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
background: #F2F2F2;
|
||||
.content {
|
||||
background: #f2f2f2;
|
||||
|
||||
.theform {
|
||||
margin-top: 6rpx;
|
||||
background: #FFFFFF;
|
||||
padding: 20rpx 23rpx 0rpx 23rpx;
|
||||
.theform {
|
||||
margin-top: 6rpx;
|
||||
background: #ffffff;
|
||||
padding: 20rpx 23rpx 0rpx 23rpx;
|
||||
|
||||
.contentye {
|
||||
font-size: 28rpx;
|
||||
margin-left: 200rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
}
|
||||
.contentye {
|
||||
font-size: 28rpx;
|
||||
margin-left: 200rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.btnbox {
|
||||
margin-top: 38rpx;
|
||||
padding: 0 20rpx;
|
||||
|
||||
.btnbox {
|
||||
margin-top: 38rpx;
|
||||
padding: 0 20rpx;
|
||||
.subbtn {
|
||||
background: #005bac;
|
||||
border-radius: 46rpx;
|
||||
font-size: 30rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.subbtn {
|
||||
background: #005BAC;
|
||||
border-radius: 46rpx;
|
||||
font-size: 30rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
.getcodes {
|
||||
width: 197rpx;
|
||||
height: 76rpx;
|
||||
background: #2FBC42;
|
||||
border-radius: 38rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
.getcodes {
|
||||
width: 197rpx;
|
||||
height: 76rpx;
|
||||
background: #2fbc42;
|
||||
border-radius: 38rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,79 +1,62 @@
|
|||
<!--
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: kBank
|
||||
* @Date: 2022-11-21 15:11:22
|
||||
-->
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="index_header">
|
||||
|
||||
</view>
|
||||
<view class="index_header"> </view>
|
||||
<view class="contxt">
|
||||
<view class="kuang">
|
||||
<u-form :model="form"
|
||||
labelWidth="auto"
|
||||
:rules="rules"
|
||||
ref="uForm">
|
||||
<u-form-item :label="'银行卡号'"
|
||||
required
|
||||
prop="bankNo">
|
||||
<u-input v-model="form.bankNo"
|
||||
:placeholder="'请输入银行卡卡号'" />
|
||||
<u-form :model="form" labelWidth="auto" :rules="rules" ref="uForm">
|
||||
<u-form-item :label="'银行卡号'" required prop="bankNo">
|
||||
<u-input v-model="form.bankNo" :placeholder="'请输入银行卡卡号'" />
|
||||
</u-form-item>
|
||||
<u-form-item :label="'姓名'"
|
||||
required
|
||||
prop="name">
|
||||
<u-input v-model="form.name"
|
||||
:placeholder="'请输入姓名'" />
|
||||
<u-form-item :label="'姓名'" required prop="name">
|
||||
<u-input v-model="form.name" :placeholder="'请输入姓名'" />
|
||||
</u-form-item>
|
||||
<u-form-item :label="'身份证'"
|
||||
required
|
||||
prop="idCard">
|
||||
<u-input v-model="form.idCard"
|
||||
:placeholder="'请输入身份证号码'" />
|
||||
<u-form-item :label="'身份证'" required prop="idCard">
|
||||
<u-input v-model="form.idCard" :placeholder="'请输入身份证号码'" />
|
||||
</u-form-item>
|
||||
<u-form-item :label="'手机号'"
|
||||
required
|
||||
prop="phone">
|
||||
<u-input v-model="form.phone"
|
||||
maxlength="20"
|
||||
type="number"
|
||||
:placeholder="'请输入银行预留手机号'" />
|
||||
<u-form-item :label="'手机号'" required prop="phone">
|
||||
<u-input
|
||||
v-model="form.phone"
|
||||
maxlength="20"
|
||||
type="number"
|
||||
:placeholder="'请输入银行预留手机号'"
|
||||
/>
|
||||
</u-form-item>
|
||||
<u-form-item label="有效期">
|
||||
<u-input v-model="form.validdate"
|
||||
:placeholder="'请输入'" />
|
||||
<u-input v-model="form.validdate" :placeholder="'请输入'" />
|
||||
</u-form-item>
|
||||
<u-form-item label="安全码">
|
||||
<u-input v-model="form.cvv2"
|
||||
:placeholder="'请输入'" />
|
||||
<u-input v-model="form.cvv2" :placeholder="'请输入'" />
|
||||
</u-form-item>
|
||||
<u-form-item :label="'验证码'"
|
||||
required
|
||||
prop="smsCode">
|
||||
<u-input v-model="form.smsCode"
|
||||
:placeholder="'请输入验证码'">
|
||||
<u-form-item :label="'验证码'" required prop="smsCode">
|
||||
<u-input v-model="form.smsCode" :placeholder="'请输入验证码'">
|
||||
<template slot="suffix">
|
||||
<view class="getCode"
|
||||
@tap="submitForm">{{ getCode }}</view>
|
||||
<view class="getCode" @tap="submitForm">{{ getCode }}</view>
|
||||
</template>
|
||||
</u-input>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<div class="tips" v-if="bank=='hf'">
|
||||
<p>1、目前汇付支付支持绑定信用卡、储蓄卡</p>
|
||||
<p>2、当绑定信用卡时,“安全码”、“有效期”两栏为必填项</p>
|
||||
<p>3、安全码为信用卡背面签名栏后3位数字;</p>
|
||||
<p>4、信用卡有效期格式不加/,例信用卡有效期10/24,请输入:1024</p>
|
||||
</div>
|
||||
<u-button type="success"
|
||||
class="uBtn"
|
||||
shape="circle"
|
||||
color="linear-gradient(to right, #005BAC, #005BAC )"
|
||||
:loading="isLoading"
|
||||
:loadingText="'绑定中'"
|
||||
@click="toBind">{{ '立即绑定' }}</u-button>
|
||||
<div class="tips" v-if="bank == 'hf'">
|
||||
<p>1、目前汇付支付支持绑定信用卡、储蓄卡</p>
|
||||
<p>2、当绑定信用卡时,“安全码”、“有效期”两栏为必填项</p>
|
||||
<p>3、安全码为信用卡背面签名栏后3位数字;</p>
|
||||
<p>4、信用卡有效期格式不加/,例信用卡有效期10/24,请输入:1024</p>
|
||||
</div>
|
||||
<u-button
|
||||
type="success"
|
||||
class="uBtn"
|
||||
shape="circle"
|
||||
color="linear-gradient(to right, #005BAC, #005BAC )"
|
||||
:loading="isLoading"
|
||||
:loadingText="'绑定中'"
|
||||
@click="toBind"
|
||||
>{{ '立即绑定' }}</u-button
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -159,7 +142,7 @@ export default {
|
|||
url({
|
||||
bindCode: this.bankCode,
|
||||
smsCode: this.form.smsCode,
|
||||
}).then((res) => {
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '绑卡成功',
|
||||
|
@ -186,7 +169,7 @@ export default {
|
|||
},
|
||||
// 绑卡获取验证码
|
||||
submitForm() {
|
||||
this.$refs.uForm.validate().then((res) => {
|
||||
this.$refs.uForm.validate().then(res => {
|
||||
if (!this.areBothValuesSet(this.form.validdate, this.form.cvv2)) {
|
||||
uni.showToast({
|
||||
title: '请输入安全码及有效期',
|
||||
|
@ -209,14 +192,13 @@ export default {
|
|||
} else if (this.bank == 'hf') {
|
||||
url = pay.bindHf
|
||||
}
|
||||
url(this.form)
|
||||
.then((res) => {
|
||||
if(res.code == 200){
|
||||
url(this.form).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.bankCode = res.data
|
||||
}else{
|
||||
} else {
|
||||
this.beginTime = 0
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 倒计时
|
||||
|
@ -262,7 +244,9 @@ export default {
|
|||
}
|
||||
.getCode {
|
||||
font-size: 10px;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-family:
|
||||
PingFang SC-Regular,
|
||||
PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #18acff;
|
||||
}
|
||||
|
@ -275,9 +259,9 @@ export default {
|
|||
.uBtn {
|
||||
margin-top: 120rpx;
|
||||
}
|
||||
.tips{
|
||||
.tips {
|
||||
font-size: 12px;
|
||||
p{
|
||||
p {
|
||||
// line-height: 10px;
|
||||
}
|
||||
color: #d5251d;
|
||||
|
|
|
@ -1,24 +1,60 @@
|
|||
<!--
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: kBank
|
||||
* @Date: 2022-11-21 15:11:22
|
||||
-->
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="goods-sort">
|
||||
<view class="goods-flexs">
|
||||
<view
|
||||
class="goods-view"
|
||||
@click="navTap(item)"
|
||||
v-for="item in goodsList.recommendSpecialAreaList "
|
||||
:key="item.pkWares"
|
||||
>
|
||||
<view class="bg-color"></view>
|
||||
|
||||
<area-product-list v-if="item.waresList && item.waresList.length > 0" :list="item.waresList" :title="item.specialAreaName"></area-product-list>
|
||||
<!-- 注册 -->
|
||||
<view
|
||||
v-if="registList.length > 0 && user.memberSign !== 1"
|
||||
class="goods-flexs"
|
||||
>
|
||||
<view class="goods-view">
|
||||
<area-product-list
|
||||
:list="registList"
|
||||
:title="regist.name"
|
||||
></area-product-list>
|
||||
</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>
|
||||
<cl-tabbar :current="2"></cl-tabbar>
|
||||
</view>
|
||||
|
@ -31,329 +67,60 @@ import * as apis from '@/config/index.js'
|
|||
import clTabbar from '@/components/cl-tabbar.vue'
|
||||
import * as ban from '@/config/balance.js'
|
||||
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 {
|
||||
components: {
|
||||
'cl-tabbar': clTabbar,
|
||||
'area-product-list': areaProductList,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['user']),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
user: '',
|
||||
goodsList: [],
|
||||
specialImg: require('@/static/images/two2.jpg'),
|
||||
zoneList: [
|
||||
{
|
||||
label: '注册专区',
|
||||
value: 1,
|
||||
name: 'regiest',
|
||||
children: [
|
||||
{
|
||||
label: '自营专区',
|
||||
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: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
registList: [],
|
||||
upgradeList: [],
|
||||
repurchaseList: [],
|
||||
rescissionList: [],
|
||||
regist: REGIEST_AREA,
|
||||
upgrade: UPGRADE_AREA,
|
||||
repurchase: REPURCHASE_AREA,
|
||||
rescission: REISSUE_AREA,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
// this.getMenuList()
|
||||
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),
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
getGoodsInfo() {
|
||||
let userInfo = uni.getStorageSync('User')
|
||||
getAreaGoods().then((res) => {
|
||||
this.goodsList = res.data
|
||||
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) {
|
||||
ctem.children.forEach((stem) => {
|
||||
if (stem.name == item.menuKey) {
|
||||
stem.isShow = true
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
const params = {
|
||||
pageNum: 1,
|
||||
pageSize: 3,
|
||||
}
|
||||
const queryArea = [
|
||||
REGIEST_AREA.id,
|
||||
UPGRADE_AREA.id,
|
||||
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;
|
||||
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 {
|
||||
padding-bottom: 130rpx;
|
||||
.goods-flexs {
|
||||
padding: 30rpx 20rpx 20rpx;
|
||||
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>
|
||||
|
|
|
@ -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: '复购专区',
|
||||
}
|
Loading…
Reference in New Issue