|
|
@ -7,7 +7,7 @@ |
|
|
|
<u-avatar class="br-p50 overflow-h" :size="64" mp-avatar shape="circle"></u-avatar> |
|
|
|
<u-avatar class="br-p50 overflow-h" :size="64" mp-avatar shape="circle"></u-avatar> |
|
|
|
<view class="ml12"> |
|
|
|
<view class="ml12"> |
|
|
|
<view class="flex ai-c fs18 cor-333 fwb"> |
|
|
|
<view class="flex ai-c fs18 cor-333 fwb"> |
|
|
|
<text class="mr10">{{ user.userName }}{{user.userId}}</text> |
|
|
|
<text class="mr10">{{ user.userName }}{{ user.userId }}</text> |
|
|
|
<image v-if="vipOn.length" src="/static/image/mine/vip.png" mode="widthFix" style="width: 18px;"></image> |
|
|
|
<image v-if="vipOn.length" src="/static/image/mine/vip.png" mode="widthFix" style="width: 18px;"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="mt5 fs14 cor-666">陪您学车 第{{ user.days }}天</view> |
|
|
|
<view class="mt5 fs14 cor-666">陪您学车 第{{ user.days }}天</view> |
|
|
@ -33,22 +33,26 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<text class="ml5 fs16 fwb" style="color: #7E4012FF;">VIP会员</text> |
|
|
|
<text class="ml5 fs16 fwb" style="color: #7E4012FF;">VIP会员</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<text v-if="vipOn.length" class="fs12" style="color: #7E4012FF;">{{expireTime}}到期</text> |
|
|
|
<text v-if="!isLogin || !vipOn.length" class="fs12" style="color: #7E4012FF;">您还不是VIP会员</text> |
|
|
|
|
|
|
|
<text v-else-if="vipOn.length" class="fs12" style="color: #7E4012FF;">{{ expireTime }}到期</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="absolute flex ai-c jc-c" style="left: 0;top: 40px;right: 0;bottom: 0;"> |
|
|
|
<view class="absolute flex ai-c jc-c" style="left: 0;top: 40px;right: 0;bottom: 0;"> |
|
|
|
<view class="text-center"> |
|
|
|
<view v-if="!isLogin || !vipOn.length" class="text-center"> |
|
|
|
<view v-if="vipOn.length" class="fs18 fwb" style="color: #7E4012FF;">{{vipText}}</view> |
|
|
|
<view class="fs18 fwb" style="color: #7E4012FF;">开通VIP尊享以下权益</view> |
|
|
|
<view class="study fs16 text-center" style="margin: 25px auto 0;color: #F6E99FFF;"> |
|
|
|
<view class="fs15" style="color: #7E4012FF;">精选500题 / 真是模考 / 考前密卷</view> |
|
|
|
{{ vipOn.length?'马上学习':'开通会员'}} |
|
|
|
<view class="study fs16 text-center" style="margin: 25px auto 0;color: #F6E99FFF;">立即开通</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view v-else-if="vipOn.length" class="text-center"> |
|
|
|
|
|
|
|
<view class="fs18 fwb" style="color: #7E4012FF;">{{ vipText }}</view> |
|
|
|
|
|
|
|
<view class="study fs16 text-center" style="margin: 25px auto 0;color: #F6E99FFF;">马上学习</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="br8 bc-fff p15 z-index2"> |
|
|
|
<view v-if="isLogin" class="br8 bc-fff p15 z-index2"> |
|
|
|
<text class="fs16 cor-333">我的驾校</text> |
|
|
|
<text class="fs16 cor-333">我的驾校</text> |
|
|
|
<view v-if="user.schoolId"> |
|
|
|
<view v-if="user?.schoolId"> |
|
|
|
<div class="mt12 flex ai-c jc-sb"> |
|
|
|
<div class="mt12 flex ai-c jc-sb"> |
|
|
|
<text class="fs18 cor-000 fwb">{{user.schoolName}}</text> |
|
|
|
<text class="fs18 cor-000 fwb">{{ user.schoolName }}</text> |
|
|
|
<u-button text="切换驾校" shape="circle" @click="handleChangeSchool"></u-button> |
|
|
|
<u-button text="切换驾校" shape="circle" @click="handleChangeSchool"></u-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<u-line margin="14px 0 18px 0"></u-line> |
|
|
|
<u-line margin="14px 0 18px 0"></u-line> |
|
|
@ -57,10 +61,11 @@ |
|
|
|
<img src="/static/image/mine/phone.png" style="width: 12px;height: 12px;"> |
|
|
|
<img src="/static/image/mine/phone.png" style="width: 12px;height: 12px;"> |
|
|
|
<text class="ml2 fs12 cor-fff">客服热线</text> |
|
|
|
<text class="ml2 fs12 cor-fff">客服热线</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<text class="ml5 fs26 cor-333 fwb" style="line-height: 26px;">{{user.schoolPhone}}</text> |
|
|
|
<text class="ml5 fs26 cor-333 fwb" style="line-height: 26px;">{{ user.schoolPhone }}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view v-else class="pt30 pb15"> |
|
|
|
<view v-else class="p15tb flex ai-c jc-sb"> |
|
|
|
|
|
|
|
<view class="fs20 cor-333 fwb">尚未绑定驾校</view> |
|
|
|
<u-button text="绑定驾校" shape="circle" @click="handleChangeSchool"></u-button> |
|
|
|
<u-button text="绑定驾校" shape="circle" @click="handleChangeSchool"></u-button> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -104,27 +109,27 @@ export default { |
|
|
|
return useUserStore().vipOnList |
|
|
|
return useUserStore().vipOnList |
|
|
|
}, |
|
|
|
}, |
|
|
|
expireTime() { |
|
|
|
expireTime() { |
|
|
|
if(this.vipOn.length) { |
|
|
|
if (this.vipOn.length) { |
|
|
|
const t = this.vipOn.reduce((pre, cur) => { |
|
|
|
const t = this.vipOn.reduce((pre, cur) => { |
|
|
|
if(Date.parse(pre) > Date.parse(cur.endDate)) { |
|
|
|
if (Date.parse(pre) > Date.parse(cur.endDate)) { |
|
|
|
return cur.endDate |
|
|
|
return cur.endDate |
|
|
|
} |
|
|
|
} |
|
|
|
return pre |
|
|
|
return pre |
|
|
|
}, '2099-12-31') |
|
|
|
}, '2099-12-31') |
|
|
|
return t.split(' ')[0] |
|
|
|
return t.split(' ')[0] |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
return '' |
|
|
|
return '' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
vipText() { |
|
|
|
vipText() { |
|
|
|
if(this.vipOn.length) { |
|
|
|
if (this.vipOn.length) { |
|
|
|
const t = this.vipOn.reduce((pre, cur) => { |
|
|
|
const t = this.vipOn.reduce((pre, cur) => { |
|
|
|
return [...pre, ...cur.subjects.split(',').map(it =>['','一','二','三','四'][it])] |
|
|
|
return [...pre, ...cur.subjects.split(',').map(it => ['', '一', '二', '三', '四'][it])] |
|
|
|
}, []) |
|
|
|
}, []) |
|
|
|
let val = Array.from(new Set(t)) |
|
|
|
let val = Array.from(new Set(t)) |
|
|
|
val = val.length == 4 ? val.join('')+'全部':val.join('') |
|
|
|
val = val.length == 4 ? val.join('') + '全部' : val.join('') |
|
|
|
return `尊享科目${val}付费权益` |
|
|
|
return `尊享科目${val}付费权益` |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
return '' |
|
|
|
return '' |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -137,16 +142,16 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
handleVip() { |
|
|
|
handleVip() { |
|
|
|
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' |
|
|
|
}) |
|
|
|
// }) |
|
|
|
} |
|
|
|
// } |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.toLogin() |
|
|
|
this.toLogin() |
|
|
|
} |
|
|
|
} |
|
|
@ -157,7 +162,7 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleChangeSchool() { |
|
|
|
handleChangeSchool() { |
|
|
|
if(this.isLogin) { |
|
|
|
if (this.isLogin) { |
|
|
|
uni.navigateTo({ |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages/me/school' |
|
|
|
url: '/pages/me/school' |
|
|
|
}) |
|
|
|
}) |
|
|
@ -166,7 +171,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleInfo() { |
|
|
|
handleInfo() { |
|
|
|
if(this.isLogin) { |
|
|
|
if (this.isLogin) { |
|
|
|
uni.navigateTo({ |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages/me/info' |
|
|
|
url: '/pages/me/info' |
|
|
|
}) |
|
|
|
}) |
|
|
@ -175,7 +180,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleTJ() { |
|
|
|
handleTJ() { |
|
|
|
if(this.isLogin) { |
|
|
|
if (this.isLogin) { |
|
|
|
uni.navigateTo({ |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages/me/tijian' |
|
|
|
url: '/pages/me/tijian' |
|
|
|
}) |
|
|
|
}) |
|
|
|