uniapp 会员权益判断

pull/2/head
Jruome 2023-05-23 18:08:01 +08:00
parent 9a6e45053c
commit f9c4d2b102
9 changed files with 167 additions and 150 deletions

View File

@ -3,7 +3,7 @@
v-if="dialogVisible" v-if="dialogVisible"
title="运费模板" title="运费模板"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="1000px" width="70%"
:before-close="handleClose" :before-close="handleClose"
> >
<el-form ref="ruleForm" :model="ruleForm" label-width="120px" size="mini" v-if="dialogVisible" :rules="rules"> <el-form ref="ruleForm" :model="ruleForm" label-width="120px" size="mini" v-if="dialogVisible" :rules="rules">
@ -140,9 +140,9 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
<el-form-item v-if="ruleForm.noDelivery" class="noBox" prop="shippingTemplatesNoDeliveryRespVOS"> <el-form-item v-if="ruleForm.noDelivery" class="noBox" prop="noRegion">
<el-cascader <el-cascader
v-model="ruleForm.shippingTemplatesNoDeliveryRespVOS" v-model="ruleForm.noRegion"
placeholder="请选择不配送区域" placeholder="请选择不配送区域"
:options="cityList" :options="cityList"
:props="props" :props="props"
@ -183,7 +183,7 @@ const defaultRole = {
noDelivery: false, noDelivery: false,
free: [], free: [],
undelives: {}, undelives: {},
shippingTemplatesNoDeliveryRespVOS: [] noRegion: []
} }
const kg = '重量kg' const kg = '重量kg'
const m = '体积' const m = '体积'
@ -230,7 +230,7 @@ export default {
region: [ region: [
{ required: true, message: '请选择活动区域', trigger: 'change' } { required: true, message: '请选择活动区域', trigger: 'change' }
], ],
shippingTemplatesNoDeliveryRespVOS: [ noRegion: [
{ type: 'array', required: true, message: '请至少选择一个地区', trigger: 'change' } { type: 'array', required: true, message: '请至少选择一个地区', trigger: 'change' }
], ],
first: [ first: [
@ -302,7 +302,7 @@ export default {
noDelivery: false, noDelivery: false,
free: [], free: [],
undelives: {}, undelives: {},
shippingTemplatesNoDeliveryRespVOS: [] noRegion: []
} }
}, },
changeRegion(value) { changeRegion(value) {
@ -442,36 +442,60 @@ export default {
// shippingTemplatesNoDeliveryRespVOS: [] // shippingTemplatesNoDeliveryRespVOS: []
} }
this.ruleForm.region.forEach((el, index) => { this.ruleForm.region.forEach((el, index) => {
el.title = el.city_ids.length > 0 ? JSON.stringify(el.city_ids) : JSON.stringify([[0, 0]]) if(el.city_ids.length > 0){
for (var i = 0; i < el.city_ids.length; i++) { el.cityId = el.city_ids.map(item => {
el.city_ids[i].shift() return item[2]
}).join(',')
}else{
el.cityId = 'all'
} }
el.cityId = el.city_ids.length > 0 ? el.city_ids.join(',') : 'all'
}) })
param.shippingTemplatesRegionRespVOList = this.ruleForm.region param.shippingTemplatesRegionRespVOList = this.ruleForm.region
param.shippingTemplatesRegionRespVOList.forEach((el, index) => {
// delete el.city_ids // this.ruleForm.region.forEach((el, index) => {
// delete el.city_id // el.title = el.city_ids.length > 0 ? JSON.stringify(el.city_ids) : JSON.stringify([[0, 0]])
}) // for (var i = 0; i < el.city_ids.length; i++) {
// el.city_ids[i].shift()
// }
// el.cityId = el.city_ids.length > 0 ? el.city_ids.join(',') : 'all'
// })
// param.shippingTemplatesRegionRespVOList = this.ruleForm.region
// param.shippingTemplatesRegionRespVOList.forEach((el, index) => {
// // delete el.city_ids
// // delete el.city_id
// })
if (this.ruleForm.appoint) { if (this.ruleForm.appoint) {
this.ruleForm.free.forEach((el, index) => { this.ruleForm.free.forEach((el, index) => {
el.title = el.city_ids.length > 0 ? JSON.stringify(el.city_ids) : JSON.stringify([[0, 0]]) if(el.city_ids.length > 0){
for (var i = 0; i < el.city_ids.length; i++) { el.cityId = el.city_ids.map(item => {
el.city_ids[i].shift() return item[2]
}).join(',')
}else{
el.cityId = 'all'
} }
el.cityId = el.city_ids.length > 0 ? el.city_ids.join(',') : 'all'
}) })
param.shippingTemplatesFreeRespVOList = this.ruleForm.free param.shippingTemplatesFreeRespVOList = this.ruleForm.free
param.shippingTemplatesFreeRespVOList.forEach((el, index) => { // this.ruleForm.free.forEach((el, index) => {
// delete el.city_ids // el.title = el.city_ids.length > 0 ? JSON.stringify(el.city_ids) : JSON.stringify([[0, 0]])
// delete el.city_id // for (var i = 0; i < el.city_ids.length; i++) {
}) // el.city_ids[i].shift()
// }
// el.cityId = el.city_ids.length > 0 ? el.city_ids.join(',') : 'all'
// })
// param.shippingTemplatesFreeRespVOList = this.ruleForm.free
// param.shippingTemplatesFreeRespVOList.forEach((el, index) => {
// // delete el.city_ids
// // delete el.city_id
// })
} }
if (this.ruleForm.noDelivery) { if (this.ruleForm.noDelivery) {
param.shippingTemplatesNoDeliveryRespVOS = this.ruleForm.shippingTemplatesNoDeliveryRespVOS.map(a => { param.shippingTemplatesNoDeliveryRespVOS = [{
console.log(a) cityId:[],
return a.slice(1, 3).join(',') }]
}).join(',') this.ruleForm.noRegion.forEach((item,index) => {
param.shippingTemplatesNoDeliveryRespVOS[0].cityId.push(item[2])
})
param.shippingTemplatesNoDeliveryRespVOS[0].cityId = param.shippingTemplatesNoDeliveryRespVOS[0].cityId.join(",")
} }
if (this.type === 0) { if (this.type === 0) {
logistics.shippingSave(param).then(res => { logistics.shippingSave(param).then(res => {

View File

@ -31,15 +31,6 @@
id: 0 id: 0
}, },
onLaunch: function(option) { onLaunch: function(option) {
// const res = memberGradeInfo().then((res) =>{
// if(res.data.some((item) => !!parseInt(item.isExist))){
// uni.setTabBarItem({
// index: 2,
// pagePath: '/pages/member_equity/index'
// })
// }
// })
let that = this; let that = this;
// #ifdef H5 // #ifdef H5
uni.getSystemInfo({ uni.getSystemInfo({
@ -258,7 +249,17 @@
}); });
} }
}, },
onShow: function() { onShow:async function() {
// const res = await memberGradeInfo()
// if(res.data.some((item) => !!parseInt(item.isExist))){
// uni.setTabBarItem({
// index: 0,
// pagePath: '/pages/member_equity/index'
// })
// uni.switchTab({
// url:'/pages/member_equity/index'
// })
// }
// #ifdef H5 // #ifdef H5
uni.getSystemInfo({ uni.getSystemInfo({
success(e) { success(e) {

View File

@ -5,11 +5,11 @@ import request from "@/utils/request.js";
* @param numType boolean true 购物车数量,false=购物车产品数量 * @param numType boolean true 购物车数量,false=购物车产品数量
*/ */
export function getCartCounts(numType,type) { export function getCartCounts(numType,type) {
return request.get("cart/count?numType=" + numType + "&type=" + type); return request.get("front/cart/count?numType=" + numType + "&type=" + type);
} }
/** /**
* 获取购物车列表 * 获取购物车列表
* *
*/ */
export function getCartList(data) { export function getCartList(data) {
return request.get("cart/list", data); return request.get("cart/list", data);
@ -40,7 +40,7 @@ export function cartDel(ids) {
/** /**
* 购物车重选提交 * 购物车重选提交
* *
*/ */
export function getResetCart(data) { export function getResetCart(data) {
return request.post('cart/resetcart', data); return request.post('cart/resetcart', data);
@ -56,7 +56,7 @@ export function getOrderList(data) {
/** /**
* 订单产品信息 * 订单产品信息
* @param string unique * @param string unique
*/ */
export function orderProduct(data) { export function orderProduct(data) {
return request.post('order/product', data); return request.post('order/product', data);
@ -65,7 +65,7 @@ export function orderProduct(data) {
/** /**
* 订单评价 * 订单评价
* @param object data * @param object data
* *
*/ */
export function orderComment(data) { export function orderComment(data) {
return request.post('order/comment', data); return request.post('order/comment', data);
@ -89,7 +89,7 @@ export function orderData() {
/** /**
* 订单取消 * 订单取消
* @param string id * @param string id
* *
*/ */
export function orderCancel(id) { export function orderCancel(id) {
return request.post('order/cancel', { return request.post('order/cancel', {
@ -100,7 +100,7 @@ export function orderCancel(id) {
/** /**
* 删除已完成订单 * 删除已完成订单
* @param string uni * @param string uni
* *
*/ */
export function orderDel(uni) { export function orderDel(uni) {
return request.post('order/del', { return request.post('order/del', {
@ -110,7 +110,7 @@ export function orderDel(uni) {
/** /**
* 订单详情 * 订单详情
* @param string uni * @param string uni
*/ */
export function getOrderDetail(uni) { export function getOrderDetail(uni) {
return request.get('order/detail/' + uni); return request.get('order/detail/' + uni);
@ -119,7 +119,7 @@ export function getOrderDetail(uni) {
/** /**
* 再次下单 * 再次下单
* @param string uni * @param string uni
* *
*/ */
export function orderAgain(uni) { export function orderAgain(uni) {
return request.post('order/again', { return request.post('order/again', {
@ -130,7 +130,7 @@ export function orderAgain(uni) {
/** /**
* 订单收货 * 订单收货
* @param string uni * @param string uni
* *
*/ */
export function orderTake(uni) { export function orderTake(uni) {
return request.post('order/take', { return request.post('order/take', {
@ -148,7 +148,7 @@ export function express(uni) {
/** /**
* 获取退款理由 * 获取退款理由
* *
*/ */
export function ordeRefundReason() { export function ordeRefundReason() {
return request.get('order/refund/reason'); return request.get('order/refund/reason');
@ -180,7 +180,7 @@ export function orderConfirm(cartId, isNew, addAgain,secKill,combination,bargain
/** /**
* 获取当前金额能使用的优惠卷 * 获取当前金额能使用的优惠卷
* @param string price * @param string price
* *
*/ */
export function getCouponsOrderPrice(preOrderNo) { export function getCouponsOrderPrice(preOrderNo) {
return request.get(`coupons/order/${preOrderNo}`) return request.get(`coupons/order/${preOrderNo}`)
@ -190,7 +190,7 @@ export function getCouponsOrderPrice(preOrderNo) {
* 订单创建 * 订单创建
* @param string key * @param string key
* @param object data * @param object data
* *
*/ */
export function orderCreate(data) { export function orderCreate(data) {
return request.post('order/create', data); return request.post('order/create', data);
@ -243,7 +243,7 @@ export function applyRefund(orderId) {
* @param object data * @param object data
*/ */
export function preOrderApi(data) { export function preOrderApi(data) {
return request.post(`order/pre/order`, data); return request.post(`front/order/pre/order`, data);
} }
/** /**
@ -252,4 +252,4 @@ export function preOrderApi(data) {
*/ */
export function loadPreOrderApi(preOrderNo) { export function loadPreOrderApi(preOrderNo) {
return request.get(`order/load/pre/${preOrderNo}`); return request.get(`order/load/pre/${preOrderNo}`);
} }

View File

@ -6,7 +6,7 @@ import request from "@/utils/request.js";
* *
*/ */
export function getProductDetail(id, type) { export function getProductDetail(id, type) {
return request.get('product/detail/' + id + '?type=' + type, {}, { return request.get('front/product/detail/' + id + '?type=' + type, {}, {
noAuth: true noAuth: true
}); });
} }
@ -17,12 +17,12 @@ export function getProductDetail(id, type) {
*/ */
// #ifndef MP // #ifndef MP
export function getProductCode(id) { export function getProductCode(id) {
return request.get('product/code/' + id, {}); return request.get('front/product/code/' + id, {});
} }
// #endif // #endif
// #ifdef MP // #ifdef MP
export function getProductCode(id) { export function getProductCode(id) {
return request.get('product/code/' + id, { return request.get('front/product/code/' + id, {
user_type: 'routine' user_type: 'routine'
}); });
} }
@ -34,7 +34,7 @@ export function getProductCode(id) {
* @param string category product=普通产品,product_seckill=秒杀产品 * @param string category product=普通产品,product_seckill=秒杀产品
*/ */
export function collectAdd(id, category) { export function collectAdd(id, category) {
return request.post('collect/add', { return request.post('front/collect/add', {
id: id, id: id,
'category': category === undefined ? 'product' : category 'category': category === undefined ? 'product' : category
}); });
@ -62,7 +62,7 @@ export function collectDelete(ids) {
* *
*/ */
export function postCartAdd(data) { export function postCartAdd(data) {
return request.post('cart/save', data, {}); return request.post('front/cart/save', data, {});
} }
/** /**
@ -146,7 +146,7 @@ export function getReplyList(id, data) {
* @param int id * @param int id
*/ */
export function getReplyConfig(id) { export function getReplyConfig(id) {
return request.get('reply/config/' + id,{},{ return request.get('front/reply/config/' + id,{},{
noAuth: true noAuth: true
}); });
} }
@ -175,7 +175,7 @@ export function storeListApi(data) {
* @param object data * @param object data
*/ */
export function getProductGood() { export function getProductGood() {
return request.get('product/good'); return request.get('front/product/good');
} }
/** /**
@ -185,7 +185,7 @@ export function getProductGood() {
* *
*/ */
export function getReplyProduct(id) { export function getReplyProduct(id) {
return request.get('reply/product/' + id, { return request.get('front/reply/product/' + id, {
noAuth: true noAuth: true
}) })
} }

View File

@ -1,51 +1,8 @@
{ {
"name": "yudao-ui-app", "name": "yudao-ui-app",
"version": "1.0.0", "version": "1.0.0",
"lockfileVersion": 2, "lockfileVersion": 1,
"requires": true, "requires": true,
"packages": {
"": {
"name": "yudao-ui-app",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"clipboard": "^2.0.11"
}
},
"node_modules/clipboard": {
"version": "2.0.11",
"resolved": "https://registry.npmmirror.com/clipboard/-/clipboard-2.0.11.tgz",
"integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==",
"dependencies": {
"good-listener": "^1.2.2",
"select": "^1.1.2",
"tiny-emitter": "^2.0.0"
}
},
"node_modules/delegate": {
"version": "3.2.0",
"resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz",
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
},
"node_modules/good-listener": {
"version": "1.2.2",
"resolved": "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz",
"integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==",
"dependencies": {
"delegate": "^3.1.2"
}
},
"node_modules/select": {
"version": "1.1.2",
"resolved": "https://registry.npmmirror.com/select/-/select-1.1.2.tgz",
"integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA=="
},
"node_modules/tiny-emitter": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
}
},
"dependencies": { "dependencies": {
"clipboard": { "clipboard": {
"version": "2.0.11", "version": "2.0.11",

View File

@ -574,34 +574,41 @@
"borderStyle": "white", "borderStyle": "white",
"backgroundColor": "#ffffff", "backgroundColor": "#ffffff",
"list": [ "list": [
{ // {
"pagePath": "pages/index/index", // "pagePath": "pages/index/index",
"iconPath": "static/images/tabbar/nav_icon_shop.png", // "iconPath": "static/images/tabbar/nav_icon_shop.png",
"selectedIconPath": "static/images/tabbar/nav_icon_shop_active.png", // "selectedIconPath": "static/images/1-002.png",
"text": "商城" // "text": "商城"
}, // },
{ // {
"pagePath": "pages/goods_cate/goods_cate", // "pagePath": "pages/goods_cate/goods_cate",
"iconPath": "static/images/tabbar/nav_icon_sort.png", // "iconPath": "static/images/tabbar/nav_icon_sort.png",
"selectedIconPath": "static/images/tabbar/nav_icon_sort_active.png", // "selectedIconPath": "static/images/2-002.png",
"text": "分类" // "text": "分类"
}, // },
{ {
"pagePath": "pages/member_application/index", "pagePath": "pages/member_application/index",
"iconPath": "static/images/tabbar/nav_icon_member.png", "iconPath": "static/images/2-001.png",
"selectedIconPath": "static/images/tabbar/nav_icon_member_active.png", "selectedIconPath": "static/images/tabbar/nav_icon_member_active.png",
"text": "会员申请" "text": "会员申请"
}, },
{ {
"pagePath": "pages/order_addcart/order_addcart", "pagePath": "pages/member_equity/index",
"iconPath": "static/images/tabbar/nav_icon_cart.png", "iconPath": "static/images/2-001.png",
"selectedIconPath": "static/images/tabbar/nav_icon_cart_active.png", "selectedIconPath": "static/images/tabbar/nav_icon_member_active.png",
"text": "购物车" "text": "会员申请",
}, "visible":false
},
// {
// "pagePath": "pages/order_addcart/order_addcart",
// "iconPath": "static/images/tabbar/nav_icon_cart.png",
// "selectedIconPath": "static/images/3-002.png",
// "text": "购物车"
// },
{ {
"pagePath": "pages/user/index", "pagePath": "pages/user/index",
"iconPath": "static/images/tabbar/nav_icon_my.png", "iconPath": "static/images/tabbar/nav_icon_my.png",
"selectedIconPath": "static/images/tabbar/nav_icon_my_active.png", "selectedIconPath": "static/images/4-002.png",
"text": "我的" "text": "我的"
} }
] ]

View File

@ -90,7 +90,7 @@
</view> </view>
<view class='iconfont icon-jiantou'></view> <view class='iconfont icon-jiantou'></view>
</view> </view>
<view class='userEvaluation' id="past1"> <!-- <view class='userEvaluation' id="past1">
<view class='title acea-row row-between-wrapper' <view class='title acea-row row-between-wrapper'
:style="replyCount==0?'border-bottom-left-radius:14rpx;border-bottom-right-radius:14rpx;':''"> :style="replyCount==0?'border-bottom-left-radius:14rpx;border-bottom-right-radius:14rpx;':''">
<view>用户评价<i>({{replyCount}})</i></view> <view>用户评价<i>({{replyCount}})</i></view>
@ -103,7 +103,7 @@
<block v-if="replyCount"> <block v-if="replyCount">
<userEvaluation :reply="reply"></userEvaluation> <userEvaluation :reply="reply"></userEvaluation>
</block> </block>
</view> </view> -->
<!-- 优品推荐 --> <!-- 优品推荐 -->
<view class="superior borRadius14" if='good_list.length' id="past2"> <view class="superior borRadius14" if='good_list.length' id="past2">
<view class="title acea-row row-center-wrapper"> <view class="title acea-row row-center-wrapper">
@ -463,7 +463,7 @@
setTimeout(()=>{ setTimeout(()=>{
spread(mapeMpQrCodeValue.spread).then(res => {}).catch(res => {}) spread(mapeMpQrCodeValue.spread).then(res => {}).catch(res => {})
},2000) },2000)
} else { } else {
this.id = options.id; this.id = options.id;
} }
@ -560,7 +560,7 @@
}, },
/** /**
* 购物车手动填写 * 购物车手动填写
* *
*/ */
iptCartNum: function(e) { iptCartNum: function(e) {
this.$set(this.attr.productSelect, 'cart_num', e ? e : 1); this.$set(this.attr.productSelect, 'cart_num', e ? e : 1);
@ -598,7 +598,7 @@
} }
}, },
/* /*
*去商品详情页 *去商品详情页
*/ */
goDetail(item) { goDetail(item) {
if (!item.activityH5) { if (!item.activityH5) {
@ -646,7 +646,7 @@
}, },
/** /**
* 购物车数量加和数量减 * 购物车数量加和数量减
* *
*/ */
ChangeCartNum: function(changeValue) { ChangeCartNum: function(changeValue) {
//changeValue: | //changeValue: |
@ -679,7 +679,7 @@
}, },
/** /**
* 属性变动赋值 * 属性变动赋值
* *
*/ */
ChangeAttr: function(res) { ChangeAttr: function(res) {
let productSelect = this.productValue[res]; let productSelect = this.productValue[res];
@ -723,7 +723,7 @@
}, },
/** /**
* 优品推荐 * 优品推荐
* *
*/ */
getGoods() { getGoods() {
getProductGood().then(res => { getProductGood().then(res => {
@ -751,7 +751,7 @@
}, },
/** /**
* 获取产品详情 * 获取产品详情
* *
*/ */
getGoodsDetails: function() { getGoodsDetails: function() {
let that = this; let that = this;
@ -859,7 +859,7 @@
}, },
/** /**
* 打开地图 * 打开地图
* *
*/ */
showMaoLocation: function() { showMaoLocation: function() {
if (!this.systemStore.latitude || !this.systemStore.longitude) return this.$util.Tips({ if (!this.systemStore.latitude || !this.systemStore.longitude) return this.$util.Tips({
@ -876,7 +876,7 @@
}, },
/** /**
* 默认选中属性 * 默认选中属性
* *
*/ */
DefaultSelect: function() { DefaultSelect: function() {
let productAttr = this.attr.productAttr; let productAttr = this.attr.productAttr;
@ -939,7 +939,7 @@
}, },
/** /**
* 获取优惠券 * 获取优惠券
* *
*/ */
getCouponList(type) { getCouponList(type) {
let that = this, let that = this,
@ -969,9 +969,9 @@
that.$set(that.coupon, 'list', that.coupon.list); that.$set(that.coupon, 'list', that.coupon.list);
that.$set(that.coupon, 'coupon', false); that.$set(that.coupon, 'coupon', false);
}, },
/** /**
* *
* *
* 收藏商品 * 收藏商品
*/ */
setCollect: function() { setCollect: function() {
@ -1015,7 +1015,7 @@
}, },
/** /**
* 打开属性加入购物车 * 打开属性加入购物车
* *
*/ */
joinCart: function(e) { joinCart: function(e) {
// //
@ -1125,7 +1125,7 @@
}, },
/** /**
* 分享打开 * 分享打开
* *
*/ */
listenerActionSheet: function() { listenerActionSheet: function() {
if (this.isLogin === false) { if (this.isLogin === false) {

View File

@ -107,15 +107,23 @@
}); });
try{ try{
const res = await memberGradeInfo() const res = await memberGradeInfo()
if(res.data.some((item) => !!parseInt(item.isExist))){ if(res.data.some((item) => !!parseInt(item.isExist))){
uni.setTabBarItem({ uni.setTabBarItem({
index: 0, index: 0,
pagePath: '/pages/member_equity/index' pagePath: '/pages/member_equity/index'
}) })
uni.switchTab({ uni.switchTab({
url:'/pages/member_equity/index' url:'/pages/member_equity/index'
}) })
} }else{
uni.setTabBarItem({
index: 0,
pagePath: '/pages/member_application/index'
})
uni.switchTab({
url:'/pages/member_application/index'
})
}
this.memberData = res.data this.memberData = res.data
} finally{ } finally{
uni.hideLoading(); uni.hideLoading();

View File

@ -62,7 +62,8 @@
<script> <script>
import { import {
memberHeadInfo memberHeadInfo,
memberGradeInfo
} from '@/api/member.js'; } from '@/api/member.js';
import { import {
mapGetters mapGetters
@ -89,6 +90,25 @@
}, },
computed: mapGetters(['userInfo']), computed: mapGetters(['userInfo']),
async onLoad() { async onLoad() {
const resful = await memberGradeInfo()
if(resful.data.some((item) => !!parseInt(item.isExist))){
uni.setTabBarItem({
index: 0,
pagePath: '/pages/member_equity/index'
})
uni.switchTab({
url:'/pages/member_equity/index'
})
}else{
uni.setTabBarItem({
index: 0,
pagePath: '/pages/member_application/index'
})
uni.switchTab({
url:'/pages/member_application/index'
})
}
const res = await memberHeadInfo() const res = await memberHeadInfo()
this.memberDetail = res.data this.memberDetail = res.data
}, },