feat(specialArea): 专区接口调整
This commit is contained in:
parent
a3e005655c
commit
5527a30484
|
@ -1,65 +1,164 @@
|
||||||
<!--
|
<!--
|
||||||
* @Descripttion:
|
* @Descripttion:
|
||||||
* @version:
|
* @version:
|
||||||
* @Author: kBank
|
* @Author: kBank
|
||||||
* @Date: 2022-11-21 15:11:22
|
* @Date: 2022-11-21 15:11:22
|
||||||
-->
|
-->
|
||||||
<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 {
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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')
|
||||||
|
|
|
@ -1,273 +1,378 @@
|
||||||
<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"
|
||||||
</u-form-item>
|
:rules="rules"
|
||||||
<u-form-item borderBottom label-width="200rpx" :label="'银行名称'" prop="bankName"
|
ref="uForm"
|
||||||
@click="showAmount = true; " ref="item1">
|
>
|
||||||
<u--input v-model="dataForm.bankName" disabledColor="#ffffff" :placeholder="'请选择'"
|
<u-form-item
|
||||||
border="none"></u--input>
|
label-width="200rpx"
|
||||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
:label="'银行卡号'"
|
||||||
</u-form-item>
|
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-code
|
||||||
<u--input v-model="dataForm.subBankName" disabledColor="#F5F5F5;" border="none"></u--input>
|
:seconds="seconds"
|
||||||
</u-form-item>
|
@end="end"
|
||||||
<u-form-item label-width="200rpx" :label="'真实姓名'" prop="accountName" borderBottom ref="item1">
|
@start="start"
|
||||||
<u--input :placeholder="'请输入'" v-model="dataForm.accountName" border="none"></u--input>
|
ref="uCode"
|
||||||
</u-form-item>
|
@change="codeChange"
|
||||||
<u-form-item label-width="200rpx" :label="'证件号码'" prop="idCard" borderBottom ref="item1">
|
></u-code>
|
||||||
<u--input v-model="dataForm.idCard" :placeholder="'请输入'" disabledColor="#F5F5F5;"
|
<u-picker
|
||||||
border="none"></u--input>
|
@cancel="showAmount = false"
|
||||||
</u-form-item>
|
:show="showAmount"
|
||||||
<u-form-item label-width="200rpx" :label="'联系方式'" prop="phone" borderBottom ref="item1">
|
ref="uPicker"
|
||||||
<u--input v-model="dataForm.phone" :placeholder="'请输入'" maxlength="20" border="none"></u--input>
|
:columns="bankCardChioceList"
|
||||||
</u-form-item>
|
@confirm="confirm"
|
||||||
<u-form-item v-if="userInfo.pkCountry==1&&cancode" label-width="200rpx" :label="'验证码'"
|
keyName="bankName"
|
||||||
prop="verificationCode" borderBottom ref="item1">
|
></u-picker>
|
||||||
<u--input v-model="dataForm.verificationCode" :placeholder="'请输入'" border="none"></u--input>
|
</u--form>
|
||||||
<u-button @tap='getCode' class="getcodes" type="primary" shape="circle" :text="tips"
|
</view>
|
||||||
color="#2FBC42"></u-button>
|
<view class="btnbox">
|
||||||
</u-form-item>
|
<u-button class="subbtn" @click="submit">{{ '确定' }}</u-button>
|
||||||
|
</view>
|
||||||
<u-code :seconds="seconds" @end="end" @start="start" ref="uCode" @change="codeChange"></u-code>
|
<u-toast ref="uToast"></u-toast>
|
||||||
<u-picker @cancel='showAmount=false' :show="showAmount" ref="uPicker" :columns="bankCardChioceList"
|
</view>
|
||||||
@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>
|
</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: [],
|
||||||
|
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
|
||||||
bankCardChioceList: [],
|
if (this.userInfo.pkCountry == 1) {
|
||||||
rules: {
|
if (this.cancode) {
|
||||||
cardNumber: [{
|
ban
|
||||||
type: 'string',
|
.verifyBankCard(this.dataForm)
|
||||||
required: true,
|
.then(res => {
|
||||||
message: '请输入',
|
if (res.code == 200) {
|
||||||
trigger: ['blur', 'change']
|
this.ifpass = true
|
||||||
}],
|
this.bindBank()
|
||||||
subBankName: [{
|
} else {
|
||||||
type: 'string',
|
this.ifpass = false
|
||||||
required: true,
|
uni.$u.toast(res.msg)
|
||||||
message: '请输入',
|
}
|
||||||
trigger: ['blur', 'change']
|
})
|
||||||
}],
|
.catch(err => {
|
||||||
accountName: [{
|
this.ifpass = false
|
||||||
type: 'string',
|
})
|
||||||
required: true,
|
} else {
|
||||||
message: '请输入',
|
this.ifpass = true
|
||||||
trigger: ['blur', 'change']
|
this.bindBank()
|
||||||
}],
|
}
|
||||||
idCard: [{
|
} else {
|
||||||
type: 'string',
|
this.bindBank()
|
||||||
required: true,
|
}
|
||||||
message: '请输入',
|
})
|
||||||
trigger: ['blur', 'change']
|
.catch(errors => {
|
||||||
}],
|
uni.$u.toast('校验失败')
|
||||||
phone: [{
|
return false
|
||||||
type: 'string',
|
})
|
||||||
required: true,
|
},
|
||||||
message: '请输入',
|
confirm(e) {
|
||||||
trigger: ['blur', 'change']
|
this.dataForm.bankName = e.value[0].bankName
|
||||||
}],
|
this.dataForm.pkBank = e.value[0].pkId
|
||||||
verificationCode: [{
|
this.showAmount = false
|
||||||
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
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</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 {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
margin-left: 200rpx;
|
margin-left: 200rpx;
|
||||||
font-family: Source Han Sans CN;
|
font-family: Source Han Sans CN;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
.btnbox {
|
||||||
|
margin-top: 38rpx;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
|
||||||
.btnbox {
|
.subbtn {
|
||||||
margin-top: 38rpx;
|
background: #005bac;
|
||||||
padding: 0 20rpx;
|
border-radius: 46rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-family: Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.subbtn {
|
.getcodes {
|
||||||
background: #005BAC;
|
width: 197rpx;
|
||||||
border-radius: 46rpx;
|
height: 76rpx;
|
||||||
font-size: 30rpx;
|
background: #2fbc42;
|
||||||
font-family: Source Han Sans CN;
|
border-radius: 38rpx;
|
||||||
font-weight: 400;
|
color: #fff;
|
||||||
color: #FFFFFF;
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.getcodes {
|
|
||||||
width: 197rpx;
|
|
||||||
height: 76rpx;
|
|
||||||
background: #2FBC42;
|
|
||||||
border-radius: 38rpx;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,79 +1,62 @@
|
||||||
<!--
|
<!--
|
||||||
* @Descripttion:
|
* @Descripttion:
|
||||||
* @version:
|
* @version:
|
||||||
* @Author: kBank
|
* @Author: kBank
|
||||||
* @Date: 2022-11-21 15:11:22
|
* @Date: 2022-11-21 15:11:22
|
||||||
-->
|
-->
|
||||||
<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>
|
||||||
</u-form>
|
</u-form>
|
||||||
<div class="tips" v-if="bank=='hf'">
|
<div class="tips" v-if="bank == 'hf'">
|
||||||
<p>1、目前汇付支付支持绑定信用卡、储蓄卡</p>
|
<p>1、目前汇付支付支持绑定信用卡、储蓄卡</p>
|
||||||
<p>2、当绑定信用卡时,“安全码”、“有效期”两栏为必填项</p>
|
<p>2、当绑定信用卡时,“安全码”、“有效期”两栏为必填项</p>
|
||||||
<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
|
||||||
class="uBtn"
|
type="success"
|
||||||
shape="circle"
|
class="uBtn"
|
||||||
color="linear-gradient(to right, #005BAC, #005BAC )"
|
shape="circle"
|
||||||
:loading="isLoading"
|
color="linear-gradient(to right, #005BAC, #005BAC )"
|
||||||
:loadingText="'绑定中'"
|
:loading="isLoading"
|
||||||
@click="toBind">{{ '立即绑定' }}</u-button>
|
:loadingText="'绑定中'"
|
||||||
|
@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,14 +192,13 @@ 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 {
|
||||||
this.beginTime = 0
|
this.beginTime = 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 倒计时
|
// 倒计时
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -275,9 +259,9 @@ export default {
|
||||||
.uBtn {
|
.uBtn {
|
||||||
margin-top: 120rpx;
|
margin-top: 120rpx;
|
||||||
}
|
}
|
||||||
.tips{
|
.tips {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
p{
|
p {
|
||||||
// line-height: 10px;
|
// line-height: 10px;
|
||||||
}
|
}
|
||||||
color: #d5251d;
|
color: #d5251d;
|
||||||
|
|
|
@ -1,24 +1,60 @@
|
||||||
<!--
|
<!--
|
||||||
* @Descripttion:
|
* @Descripttion:
|
||||||
* @version:
|
* @version:
|
||||||
* @Author: kBank
|
* @Author: kBank
|
||||||
* @Date: 2022-11-21 15:11:22
|
* @Date: 2022-11-21 15:11:22
|
||||||
-->
|
-->
|
||||||
<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="goods-view">
|
||||||
>
|
<area-product-list
|
||||||
<view class="bg-color"></view>
|
:list="registList"
|
||||||
|
:title="regist.name"
|
||||||
<area-product-list v-if="item.waresList && item.waresList.length > 0" :list="item.waresList" :title="item.specialAreaName"></area-product-list>
|
></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: {
|
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() {
|
getGoodsInfo() {
|
||||||
let userInfo = uni.getStorageSync('User')
|
const params = {
|
||||||
getAreaGoods().then((res) => {
|
pageNum: 1,
|
||||||
this.goodsList = res.data
|
pageSize: 3,
|
||||||
this.$forceUpdate()
|
}
|
||||||
})
|
const queryArea = [
|
||||||
},
|
REGIEST_AREA.id,
|
||||||
getMenuList() {
|
UPGRADE_AREA.id,
|
||||||
api.menuList().then((res) => {
|
REPURCHASE_AREA.id,
|
||||||
res.data.forEach((item) => {
|
REISSUE_AREA.id,
|
||||||
this.zoneList.forEach((ctem) => {
|
]
|
||||||
if (ctem.name == item.menuKey) {
|
if (this.user.memberSign === 1) {
|
||||||
ctem.isShow = true
|
queryArea.shift()
|
||||||
}
|
}
|
||||||
if (ctem.children.length > 0) {
|
const queryList = queryArea.map(areaId => {
|
||||||
ctem.children.forEach((stem) => {
|
return getAreaGoods({
|
||||||
if (stem.name == item.menuKey) {
|
pageNum: 1,
|
||||||
stem.isShow = true
|
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>
|
||||||
|
|
|
@ -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