diff --git a/components/cl-tabbar.vue b/components/cl-tabbar.vue index 3d7b54d..a5961b1 100644 --- a/components/cl-tabbar.vue +++ b/components/cl-tabbar.vue @@ -1,65 +1,164 @@ - + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + diff --git a/pages/pay/bindBank.vue b/pages/pay/bindBank.vue index c03f26c..381e88a 100644 --- a/pages/pay/bindBank.vue +++ b/pages/pay/bindBank.vue @@ -1,79 +1,62 @@ - - - + - - - + + + - - + + - - + + - - + + - + - + - - + + - {{ getCode }} + {{ getCode }} - - 1、目前汇付支付支持绑定信用卡、储蓄卡 - 2、当绑定信用卡时,“安全码”、“有效期”两栏为必填项 - 3、安全码为信用卡背面签名栏后3位数字; - 4、信用卡有效期格式不加/,例信用卡有效期10/24,请输入:1024 - - {{ '立即绑定' }} + + 1、目前汇付支付支持绑定信用卡、储蓄卡 + 2、当绑定信用卡时,“安全码”、“有效期”两栏为必填项 + 3、安全码为信用卡背面签名栏后3位数字; + 4、信用卡有效期格式不加/,例信用卡有效期10/24,请输入:1024 + + {{ '立即绑定' }} @@ -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; diff --git a/pages/specialArea/index.vue b/pages/specialArea/index.vue index ef77e7c..be62d38 100644 --- a/pages/specialArea/index.vue +++ b/pages/specialArea/index.vue @@ -1,24 +1,60 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -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; } } diff --git a/util/specialAreaMap.js b/util/specialAreaMap.js new file mode 100644 index 0000000..9b17100 --- /dev/null +++ b/util/specialAreaMap.js @@ -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: '复购专区', +}
1、目前汇付支付支持绑定信用卡、储蓄卡
2、当绑定信用卡时,“安全码”、“有效期”两栏为必填项
3、安全码为信用卡背面签名栏后3位数字;
4、信用卡有效期格式不加/,例信用卡有效期10/24,请输入:1024