dev-hxf
脆皮鸭 1 year ago
commit 79236493e6
  1. 16
      src/App.vue
  2. 97
      src/jtools/store/user.js
  3. 377
      src/pages/index/videoVip.vue
  4. 236
      src/pages/login/login.vue
  5. 43
      src/pages/me/index.vue

@ -1,16 +1,21 @@
<script> <script>
import useUserStore from '@/jtools/store/user' import useUserStore from '@/jtools/store/user'
import useQuestionStore from '@/jtools/store/question' //store import useQuestionStore from '@/jtools/store/question' //store
import storage from './jtools/storage'
export default { export default {
onLaunch: function () { onLaunch: function (options) {
// id
if (options.query?.scene) {
storage.set('companyId', options.query?.scene)
}
useUserStore().queryVipList() useUserStore().queryVipList()
if(useUserStore().isLogin) { if (useUserStore().isLogin) {
useUserStore().getUserInfo() useUserStore().getUserInfo()
useUserStore().searchUserVip() useUserStore().searchUserVip()
} }
}, },
onShow: function () { onShow: function () {
useQuestionStore().getAllQuestion() useQuestionStore().getAllQuestion()
console.log('App Show') console.log('App Show')
}, },
onHide: function () { onHide: function () {
@ -23,5 +28,8 @@ export default {
/*每个页面公共css */ /*每个页面公共css */
@import "uni_modules/uview-plus/index.scss"; @import "uni_modules/uview-plus/index.scss";
@import "static/style/index.scss"; @import "static/style/index.scss";
button::after{ border: none;}
button::after {
border: none;
}
</style> </style>

@ -1,6 +1,6 @@
import { defineStore } from 'pinia'; import { defineStore } from 'pinia';
import { login,logout,getInfo } from '@/jtools/api/login'; import { login, logout, getInfo } from '@/jtools/api/login';
import { queryVip,getVipList } from '@/jtools/api/vip' import { queryVip, getVipList } from '@/jtools/api/vip';
import constants from '@/jtools/constants'; import constants from '@/jtools/constants';
import storage from '@/jtools/storage'; import storage from '@/jtools/storage';
@ -16,76 +16,77 @@ const useUserStore = defineStore({
}), }),
actions: { actions: {
login(params) { login(params) {
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
const resp = await login(params); const resp = await login(params);
if (resp.code === '0000') { if (resp.code === '0000') {
// 保存登录信息,用于重新登录 // 保存登录信息,用于重新登录
this.isLogin = true; this.isLogin = true;
this.token = resp.data.token; this.token = resp.data.token;
this.userInfo = resp.data this.userInfo = resp.data;
storage.set('isLogin', true) storage.set('isLogin', true);
storage.set('token', resp.data.token) storage.set('token', resp.data.token);
storage.set('userInfo', resp.data) storage.set('userInfo', resp.data);
resolve(resp.data); storage.remove('companyId');
} else { resolve(resp.data);
reject(); } else {
} reject();
}); }
}, });
},
// 登出 // 登出
logout(force = false) { logout(force = false) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.resetUserData(); this.resetUserData();
uni.redirectTo({ uni.redirectTo({
url: '/pages/login/login' url: '/pages/login/login'
}) });
resolve(); resolve();
}) });
},
//过期登出
logoutWithoutToken(force = false) {
return new Promise((resolve, reject) => {
this.resetUserData();
resolve();
});
}, },
//过期登出
logoutWithoutToken(force = false) {
return new Promise((resolve, reject) => {
this.resetUserData();
resolve();
})
},
// 获取用户信息 // 获取用户信息
getUserInfo() { getUserInfo() {
getInfo().then(resp => { getInfo().then(resp => {
if(resp.code == '0000') { if (resp.code == '0000') {
this.userInfo = resp.data this.userInfo = resp.data;
storage.set('userInfo', resp.data) storage.set('userInfo', resp.data);
} }
}) });
}, },
resetUserData() { resetUserData() {
this.isLogin = false; this.isLogin = false;
this.token = ''; this.token = '';
this.userInfo = {} this.userInfo = {};
this.vipOnList = [] this.vipOnList = [];
storage.remove('isLogin') storage.remove('isLogin');
storage.remove('token') storage.remove('token');
storage.remove('userInfo') storage.remove('userInfo');
}, },
// 查询当前用户的vip开通情况 // 查询当前用户的vip开通情况
async searchUserVip() { async searchUserVip() {
this.currentCartype=storage.get('carType') || '1001' this.currentCartype = storage.get('carType') || '1001';
const resp=await queryVip({ carTypeId: this.currentCartype,memberId: null, subject:'' }) const resp = await queryVip({ carTypeId: this.currentCartype, memberId: null, subject: '' });
if(resp.code == '0000') { if (resp.code == '0000') {
this.vipOnList = resp.data this.vipOnList = resp.data;
} }
}, },
// 查询所有的vip // 查询所有的vip
queryVipList() { queryVipList() {
this.currentCartype= storage.get('carType') || '1001' this.currentCartype = storage.get('carType') || '1001';
getVipList({ carTypeId: this.currentCartype,memberId: null, subject:'' }).then(resp => { getVipList({ carTypeId: this.currentCartype, memberId: null, subject: '' }).then(resp => {
if(resp.code == '0000') { if (resp.code == '0000') {
this.vipAllList = resp.data this.vipAllList = resp.data;
} }
}) });
} }
}, }
}); });
export default useUserStore; export default useUserStore;

@ -4,12 +4,15 @@
<image style="width: 100%;height: 600rpx;" src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/vip%E9%A2%98%E5%BA%93_20230911211532.png"></image> <image style="width: 100%;height: 600rpx;" src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/vip%E9%A2%98%E5%BA%93_20230911211532.png"></image>
<view style="margin-bottom: 100px;"> <view style="margin-bottom: 100px;">
<view class="flex jc-fa ai-c wp100 p14"> <view class="flex jc-fa ai-c wp100 p14">
<view style="width: 33.3%;" v-for="(item,index) of priceList" :key="index"> <view style="width: 33.3%;" v-for="(item, index) of priceList" :key="index">
<view class="option_tem relative" :class="checkedId===item.memberId?'checked_item':''" @click="checkPrice(item.memberId,item.price)"> <view class="option_tem relative" :class="checkedId === item.memberId ? 'checked_item' : ''" @click="checkPrice(item.memberId, item.price)">
<text class="fw600 fs12 cor-333">{{item.memberName}}</text> <text class="fw600 fs12 cor-333">{{ item.memberName }}</text>
<view class="mt5"> <view class="mt5" v-if="!isIOS">
<text class="fs14" style="color: #FF6E02;">¥</text> <text class="fs14" style="color: #FF6E02;">¥</text>
<text class="fs30 fw600" style="color: #FF6E02;">{{item.price}}</text> <text class="fs30 fw600" style="color: #FF6E02;">{{ item.price }}</text>
</view>
<view v-else class="mt5">
<text class="fs14" style="color: #FF6E02;">iOS暂不支持</text>
</view> </view>
<text class="fs12 cor-999">一年有效</text> <text class="fs12 cor-999">一年有效</text>
<!-- <view class="bottom_box fs12 cor-333" :class="checkedId===item.memberId?'checked_bottom':''">赠送vip题库</view> --> <!-- <view class="bottom_box fs12 cor-333" :class="checkedId===item.memberId?'checked_bottom':''">赠送vip题库</view> -->
@ -21,12 +24,12 @@
</view> </view>
<view class="intr_box p14"> <view class="intr_box p14">
<view class="fw600 fs16 cor-000">尊享以下权益</view> <view class="fw600 fs16 cor-000">尊享以下权益</view>
<view class="flex ai-c jc-sb mt15" v-if="subject=='1'||subject=='4'"> <view class="flex ai-c jc-sb mt15" v-if="subject == '1' || subject == '4'">
<view class="text-center" style="width: 33%"> <view class="text-center" style="width: 33%">
<view class="wp100 flex ai-c jc-c mb5"> <view class="wp100 flex ai-c jc-c mb5">
<image style="width: 63rpx;height: 63rpx;margin-right: 5px;" src="../../static/image/index/vip500.png"></image> <image style="width: 63rpx;height: 63rpx;margin-right: 5px;" src="../../static/image/index/vip500.png"></image>
</view> </view>
<text>精简{{titleNum}}</text> <text>精简{{ titleNum }}</text>
</view> </view>
<view class="text-center" style="width: 33%;"> <view class="text-center" style="width: 33%;">
<view class="wp100 flex ai-c jc-c mb5"> <view class="wp100 flex ai-c jc-c mb5">
@ -59,14 +62,14 @@
</view> </view>
</view> </view>
</view> </view>
<view class="wp100 mt15" v-if="subject=='1'||subject=='4'"> <view class="wp100 mt15" v-if="subject == '1' || subject == '4'">
<image class="wp100" mode="widthFix" :src="picUrl"></image> <image class="wp100" mode="widthFix" :src="picUrl"></image>
</view> </view>
</view> </view>
</view> </view>
<view class="wp100 p14" style="position: absolute;left: 0;bottom:20px" @tap="handlePay()"> <view v-if="!isIOS" class="wp100 p14" style="position: absolute;left: 0;bottom:20px" @tap="handlePay()">
<view class="sub_btn flex ai-c jc-sb"> <view class="sub_btn flex ai-c jc-sb">
<text class="cor-fff fs14">¥<text class="fs24 cor-fff">{{nowPrice}}</text></text> <text class="cor-fff fs14">¥<text class="fs24 cor-fff">{{ nowPrice }}</text></text>
<image style="width: 276rpx;height: 88rpx;margin-top: -5px;" src="../../static/image/index/buy.png"></image> <image style="width: 276rpx;height: 88rpx;margin-top: -5px;" src="../../static/image/index/buy.png"></image>
</view> </view>
</view> </view>
@ -74,187 +77,197 @@
</template> </template>
<script> <script>
import { import {
mapState, mapState,
mapActions mapActions
} from 'pinia' // } from 'pinia' //
import { getVipList } from '@/jtools/api/vip' import { getVipList } from '@/jtools/api/vip'
import { querySysConfig } from '@/jtools/api/question'; import { querySysConfig } from '@/jtools/api/question';
import storage from '@/jtools/storage'; import storage from '@/jtools/storage';
import Pay from '@/jtools/pay/index.js'; import Pay from '@/jtools/pay/index.js';
import useUserStore from '@/jtools/store/user' import useUserStore from '@/jtools/store/user'
export default { export default {
data(){ data() {
return{ return {
picUrl:'', picUrl: '',
titleNum:500, titleNum: 500,
subject:'1', subject: '1',
loading:true, loading: true,
nowPrice:168, nowPrice: 168,
checkedId:0, checkedId: 0,
priceList:[], priceList: [],
order:{ order: {
money:0, money: 0,
description:'会员充值' description: '会员充值'
},
isIOS: true
}
},
onLoad(op) {
this.isIOS = this.$platform.device().includes('ios')
if (op.subject) {
this.subject = op.subject
}
this.loading = true
this.getVipList()
this.getWXOpenId()
this.getTitle()
this.getPic()
this.$set(this.order, 'userId', this.userInfo.userId);
},
computed: {
...mapState(useUserStore, ["userInfo"])
},
methods: {
getPic() {
const currentCartype = storage.get('carType') || '1001'
querySysConfig(currentCartype, 'VipDescImageUrl').then(res => {
this.picUrl = JSON.parse(res.data.configJson).url
})
},
getTitle() {
const carId = storage.get('carType') || '1001'
querySysConfig(carId, 'SimplifyQuestionNum').then(resp => {
if (resp.code === '0000') {
const list = JSON.parse(resp.data.configJson)
this.titleNum = list.find(item => item.subject == this.subject).num
} }
} })
}, },
onLoad(op){ async handlePay() {
if(op.subject){ if (this.loading) {
this.subject=op.subject this.loading = false
await this.getWXOpenId()
new Pay('wechat', this.order);
this.loading = true
} }
this.loading=true
this.getVipList()
this.getWXOpenId()
this.getTitle()
this.getPic()
this.$set(this.order, 'userId', this.userInfo.userId);
}, },
computed: { getWXOpenId() {
...mapState(useUserStore, ["userInfo"]) const that = this
uni.login({
success(res) {
that.$set(that.order, 'code', res.code);
}
})
}, },
methods:{ getVipList() {
getPic(){ getVipList({
const currentCartype = storage.get('carType') || '1001' carTypeId: storage.get('carType') || '1001',
querySysConfig(currentCartype, 'VipDescImageUrl').then(res => { subject: this.subject
this.picUrl = JSON.parse(res.data.configJson).url }).then(resp => {
if (resp.code === '0000') {
this.priceList = resp.data
this.checkedId = this.priceList[0].memberId
this.order.outTradeNo = this.priceList[0].memberId
this.order.money = this.priceList[0].price
this.nowPrice = this.priceList[0].price
this.priceList.forEach(item => {
if (item.subjects.length > 1) {
item.all = true
}
}) })
},
getTitle(){
const carId=storage.get('carType') || '1001'
querySysConfig(carId,'SimplifyQuestionNum').then(resp=>{
if(resp.code==='0000'){
const list = JSON.parse(resp.data.configJson)
this.titleNum=list.find(item=>item.subject==this.subject).num
}
})
},
async handlePay(){
if(this.loading){
this.loading=false
await this.getWXOpenId()
new Pay('wechat', this.order);
this.loading=true
} }
}, })
getWXOpenId() { },
const that = this checkPrice(val, price) {
uni.login({ this.checkedId = val
success(res) { this.order.outTradeNo = val
that.$set(that.order, 'code', res.code); this.nowPrice = price
} this.order.money = price
})
},
getVipList(){
getVipList({
carTypeId: storage.get('carType') || '1001',
subject:this.subject
}).then(resp=>{
if(resp.code==='0000'){
this.priceList=resp.data
this.checkedId=this.priceList[0].memberId
this.order.outTradeNo=this.priceList[0].memberId
this.order.money=this.priceList[0].price
this.nowPrice=this.priceList[0].price
this.priceList.forEach(item=>{
if(item.subjects.length>1){
item.all=true
}
})
}
})
},
checkPrice(val,price){
this.checkedId=val
this.order.outTradeNo=val
this.nowPrice=price
this.order.money=price
}
}
} }
}
}
</script> </script>
<style scoped> <style scoped>
.option_tem{ .option_tem {
width: 220rpx; width: 220rpx;
height: 241rpx; height: 241rpx;
text-align: center; text-align: center;
background: #FFFFFF; background: #FFFFFF;
border: 2px solid #D8D8D8; border: 2px solid #D8D8D8;
border-radius: 16rpx 46rpx 16rpx 16rpx; border-radius: 16rpx 46rpx 16rpx 16rpx;
padding: 14px; padding: 14px;
} }
.checked_item{
background: #FFF0E5; .checked_item {
border: 4px solid #FF6E02; background: #FFF0E5;
} border: 4px solid #FF6E02;
.bottom_box{ }
width: 214rpx;
height: 40rpx; .bottom_box {
line-height: 40rpx; width: 214rpx;
text-align: center; height: 40rpx;
background: rgb(239,239,239); line-height: 40rpx;
border-radius: 0 0 16rpx 16rpx; text-align: center;
position: absolute; background: rgb(239, 239, 239);
bottom: 0; border-radius: 0 0 16rpx 16rpx;
left: 0; position: absolute;
} bottom: 0;
.checked_bottom{ left: 0;
width: 218rpx; }
border-radius: 0 0 16rpx 5rpx;
background-color: #FF6E02; .checked_bottom {
color:#fff width: 218rpx;
} border-radius: 0 0 16rpx 5rpx;
.tag{ background-color: #FF6E02;
padding:0 5px; color: #fff
height: 36rpx; }
background: linear-gradient(90deg, #E66501 0%, #F8A42C 100%);
border-radius: 8rpx 20rpx 8rpx 8rpx; .tag {
line-height: 36rpx; padding: 0 5px;
text-align: center; height: 36rpx;
font-size: 12px; background: linear-gradient(90deg, #E66501 0%, #F8A42C 100%);
color: #FFFC27; border-radius: 8rpx 20rpx 8rpx 8rpx;
position: absolute; line-height: 36rpx;
left: 10rpx; text-align: center;
top:-18rpx font-size: 12px;
} color: #FFFC27;
.intr_box{ position: absolute;
width: 100%; left: 10rpx;
text-align: center; top: -18rpx
padding: 40rpx; }
background: #FFF0E5;
border-radius: 16rpx; .intr_box {
} width: 100%;
.vip_item{ text-align: center;
width: 208rpx; padding: 40rpx;
height: 54rpx; background: #FFF0E5;
line-height: 54rpx; border-radius: 16rpx;
text-align: center; }
font-size: 14px;
background: #F3D7C2; .vip_item {
border-radius: 0rpx 10rpx 10rpx 10rpx; width: 208rpx;
} height: 54rpx;
.sub_btn{ line-height: 54rpx;
width:100%; text-align: center;
height: 110rpx; font-size: 14px;
border: 4px solid #F59B26; background: #F3D7C2;
background: linear-gradient(0deg, #E66501 0%, #F8A42C 100%); border-radius: 0rpx 10rpx 10rpx 10rpx;
box-shadow: 0rpx 16rpx 20rpx 1rpx rgba(245,155,38,0.78); }
border-radius: 55rpx;
padding: 14rpx; .sub_btn {
} width: 100%;
.contain-box { height: 110rpx;
width: 344rpx; border: 4px solid #F59B26;
height: 196rpx; background: linear-gradient(0deg, #E66501 0%, #F8A42C 100%);
background: #00B74F; box-shadow: 0rpx 16rpx 20rpx 1rpx rgba(245, 155, 38, 0.78);
border-radius: 16rpx; border-radius: 55rpx;
} padding: 14rpx;
}
.play_btn_2 {
width: 65rpx; .contain-box {
height: 65rpx; width: 344rpx;
position: absolute; height: 196rpx;
left: 165.5rpx; background: #00B74F;
top: 78rpx border-radius: 16rpx;
} }
.play_btn_2 {
width: 65rpx;
height: 65rpx;
position: absolute;
left: 165.5rpx;
top: 78rpx
}
</style> </style>

@ -13,7 +13,7 @@
<view class="list-call"> <view class="list-call">
<u-input class="sl-input" v-model="login.code" type="text" maxlength="6" border="none" placeholder="输入验证码"> <u-input class="sl-input" v-model="login.code" type="text" maxlength="6" border="none" placeholder="输入验证码">
<template #suffix> <template #suffix>
<text class="fs14 mr10" style="color: #05C341;" @tap="getCode">{{countDown==0?'获取验证码':countDown}}</text> <text class="fs14 mr10" style="color: #05C341;" @tap="getCode">{{ countDown == 0 ? '获取验证码' : countDown }}</text>
</template> </template>
</u-input> </u-input>
</view> </view>
@ -27,138 +27,142 @@
</template> </template>
<script> <script>
import { import {
isPhone isPhone
} from '@/jtools/utils/validate.js' } from '@/jtools/utils/validate.js'
import { import {
getCode, getCode,
login login
} from '@/jtools/api/login' } from '@/jtools/api/login'
import useUserStore from '@/jtools/store/user' import useUserStore from '@/jtools/store/user'
export default { import storage from '@/jtools/storage';
data() { export default {
return { data() {
login: { return {
phone: '', login: {
code: '' phone: '',
}, code: ''
countDown: 0,
js: undefined
};
},
onShow() {
if(useUserStore().isLogin) {
this.toHome()
}
},
methods: {
getCode() {
if (isPhone(this.login.phone) && this.countDown == 0) {
getCode({
phone: this.login.phone
}).then(resp => {
// if (resp.code == '0000') {
uni.showToast({
title: '发送成功!',
icon: 'none'
})
this.countDown = 60
this.js = setInterval(() => {
this.countDown--;
if (this.countDown == 0) {
this.clear()
}
}, 1000)
// }
})
}
},
clear() {
clearInterval(js)
this.js = null
this.countDown = 0
}, },
bindLogin() { countDown: 0,
if(isPhone(this.login.phone) && this.login.code) { js: undefined
useUserStore().login(this.login).then(resp => { };
if(resp.userId) { },
useUserStore().getUserInfo() onShow() {
useUserStore().searchUserVip() if (useUserStore().isLogin) {
this.toHome() this.toHome()
} }
},
methods: {
getCode() {
if (isPhone(this.login.phone) && this.countDown == 0) {
getCode({
phone: this.login.phone
}).then(resp => {
// if (resp.code == '0000') {
uni.showToast({
title: '发送成功!',
icon: 'none'
}) })
this.countDown = 60
this.js = setInterval(() => {
this.countDown--;
if (this.countDown == 0) {
this.clear()
}
}, 1000)
// }
})
}
},
clear() {
clearInterval(js)
this.js = null
this.countDown = 0
},
bindLogin() {
if (isPhone(this.login.phone) && this.login.code) {
let params = { ...this.login }
if (storage.get('companyId')) {
params.id = storage.get('companyId')
} }
}, useUserStore().login(params).then(resp => {
toHome() { if (resp.userId) {
uni.switchTab({ useUserStore().getUserInfo()
url: '/pages/index/index' useUserStore().searchUserVip()
this.toHome()
}
}) })
} }
},
toHome() {
uni.switchTab({
url: '/pages/index/index'
})
} }
} }
}
</script> </script>
<style> <style>
page { page {
background-color: #fff; background-color: #fff;
} }
.content {
display: flex;
flex-direction: column;
justify-content: center;
}
.header { .content {
margin-top: 166rpx; display: flex;
margin-left: auto; flex-direction: column;
margin-right: auto; justify-content: center;
letter-spacing: 10rpx; }
}
.header image { .header {
width: 383rpx; margin-top: 166rpx;
} margin-left: auto;
margin-right: auto;
letter-spacing: 10rpx;
}
.list { .header image {
display: flex; width: 383rpx;
flex-direction: column; }
padding-top: 120rpx;
padding-left: 90rpx;
padding-right: 90rpx;
}
.list-call { .list {
display: flex; display: flex;
flex-direction: row; flex-direction: column;
justify-content: space-between; padding-top: 120rpx;
align-items: center; padding-left: 90rpx;
height: 100rpx; padding-right: 90rpx;
color: #333333; }
border-bottom: 0.5px solid #e2e2e2;
}
.list-call {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
height: 100rpx;
color: #333333;
border-bottom: 0.5px solid #e2e2e2;
}
.list-call .sl-input {
flex: 1;
text-align: left;
font-size: 32rpx;
margin-left: 16rpx;
}
.button-login { .list-call .sl-input {
color: #FFFFFF; flex: 1;
font-size: 34rpx; text-align: left;
width: 560rpx; font-size: 32rpx;
height: 100rpx; margin-left: 16rpx;
background: linear-gradient(90deg, #11DF20 0%, #00B74F 100%); }
border-radius: 50rpx;
line-height: 100rpx;
text-align: center;
margin-top: 100rpx;
margin-left: auto;
margin-right: auto;
}
.button-login {
color: #FFFFFF;
font-size: 34rpx;
width: 560rpx;
height: 100rpx;
background: linear-gradient(90deg, #11DF20 0%, #00B74F 100%);
border-radius: 50rpx;
line-height: 100rpx;
text-align: center;
margin-top: 100rpx;
margin-left: auto;
margin-right: auto;
}
</style> </style>

@ -40,7 +40,7 @@
<view v-if="!isLogin || !vipOn.length" class="text-center"> <view v-if="!isLogin || !vipOn.length" class="text-center">
<view class="fs18 fwb" style="color: #7E4012FF;">开通VIP尊享以下权益</view> <view class="fs18 fwb" style="color: #7E4012FF;">开通VIP尊享以下权益</view>
<view class="fs15" style="color: #7E4012FF;">精选500题 / 真是模考 / 考前密卷</view> <view class="fs15" style="color: #7E4012FF;">精选500题 / 真是模考 / 考前密卷</view>
<view class="study fs16 text-center" style="margin: 25px auto 0;color: #F6E99FFF;">立即开通</view> <view class="study fs16 text-center" style="margin: 25px auto 0;color: #F6E99FFF;">{{ isIOS ? 'iOS暂不可用' : '立即开通' }}</view>
</view> </view>
<view v-else-if="vipOn.length" class="text-center"> <view v-else-if="vipOn.length" class="text-center">
<view class="fs18 fwb" style="color: #7E4012FF;">{{ vipText }}</view> <view class="fs18 fwb" style="color: #7E4012FF;">{{ vipText }}</view>
@ -135,26 +135,31 @@ export default {
} }
} }
}, },
data(){ data() {
return{ return {
carName:storage.get('carName') || '小车C1/C2/C3' carName: storage.get('carName') || '小车C1/C2/C3',
} isIOS: true
}, }
},
onShow() { onShow() {
this.carName=storage.get('carName') || '小车C1/C2/C3' this.isIOS = this.$platform.device().includes('ios')
this.carName = storage.get('carName') || '小车C1/C2/C3'
}, },
methods: { methods: {
toChangeCarType(){ toChangeCarType() {
uni.navigateTo({ uni.navigateTo({
url:"/pages/me/changeCarType" url: "/pages/me/changeCarType"
}) })
}, },
handleVip() { handleVip() {
if (this.isIOS) {
return
}
if (this.isLogin) { if (this.isLogin) {
// if (this.vipOn.length) { // if (this.vipOn.length) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/me/vip' url: '/pages/me/vip'
}) })
// } else { // } else {
// uni.navigateTo({ // uni.navigateTo({
// url: '/pages/index/videoVip' // url: '/pages/index/videoVip'
@ -192,10 +197,10 @@ export default {
// uni.navigateTo({ // uni.navigateTo({
// url: '/pages/me/tijian' // url: '/pages/me/tijian'
// }) // })
uni.showToast({ uni.showToast({
title:'敬请期待', title: '敬请期待',
icon:'none' icon: 'none'
}) })
} else { } else {
this.toLogin() this.toLogin()
} }

Loading…
Cancel
Save