|
@@ -3,7 +3,7 @@
|
|
* @Author: 欧阳承珺
|
|
* @Author: 欧阳承珺
|
|
* @LastEditors: 欧阳承珺
|
|
* @LastEditors: 欧阳承珺
|
|
* @Date: 2022-10-17 15:19:11
|
|
* @Date: 2022-10-17 15:19:11
|
|
- * @LastEditTime: 2022-10-26 16:24:26
|
|
|
|
|
|
+ * @LastEditTime: 2022-11-02 16:32:44
|
|
-->
|
|
-->
|
|
<template>
|
|
<template>
|
|
<div class="h-80px flex relative z-3 justify-between px-[10%] border-b-1 border-b-[#f0f0f0] border-b-solid">
|
|
<div class="h-80px flex relative z-3 justify-between px-[10%] border-b-1 border-b-[#f0f0f0] border-b-solid">
|
|
@@ -30,7 +30,8 @@
|
|
<div class="px-24px pt-24px min-w-300px">
|
|
<div class="px-24px pt-24px min-w-300px">
|
|
<div class="flex pb-22px cursor-pointer" style="border-bottom: 1px solid #f0f0f0;">
|
|
<div class="flex pb-22px cursor-pointer" style="border-bottom: 1px solid #f0f0f0;">
|
|
<a href="/members/me/expenses">
|
|
<a href="/members/me/expenses">
|
|
- <img class="w-64px rounded-1/2" src="http://user-file.17pdf.com/avatars/2020/11/16/0577b907be980556bdafa23fb0be0732-jpg.jpg" >
|
|
|
|
|
|
+ <img v-if="userInfo?.memberInfo.subscriberType === 1" class="w-64px rounded-1/2" src="http://user-file.17pdf.com/avatars/2020/11/16/0577b907be980556bdafa23fb0be0732-jpg.jpg" >
|
|
|
|
+ <img v-else class="w-64px rounded-1/2" src="http://user-file.17pdf.com/avatars/2018/01/02/f183029426a996325853fa244e7df661-jpg.jpg" >
|
|
</a>
|
|
</a>
|
|
<div class="pl-20px">
|
|
<div class="pl-20px">
|
|
<p class="mt-15px mb-10px text-[#333]">{{userInfo?.memberInfo?.name}}</p>
|
|
<p class="mt-15px mb-10px text-[#333]">{{userInfo?.memberInfo?.name}}</p>
|
|
@@ -39,22 +40,21 @@
|
|
</div>
|
|
</div>
|
|
<div class="flex py-14px mt-20px justify-between">
|
|
<div class="flex py-14px mt-20px justify-between">
|
|
<div>
|
|
<div>
|
|
- <p class="text-18px text-[#333] leading-24px">17会员</p>
|
|
|
|
- <p class="text-12px text-[#999] leading-17px">剩余<span class="text-bg-$btn-color-primary">{{userInfo?.memberInfo?.day}}</span>天到期</p>
|
|
|
|
|
|
+ <p v-if="userInfo?.memberInfo.subscriberType === 1" class="text-18px text-[#333] leading-24px">17会员</p>
|
|
|
|
+ <p v-else class="text-18px text-[#333] leading-24px">免费用户</p>
|
|
|
|
+ <p v-if="userInfo?.memberInfo.subscriberType === 1" class="text-12px text-[#999] leading-17px">剩余<span class="text-bg-$btn-color-primary">{{userInfo?.memberInfo?.day}}</span>天到期</p>
|
|
|
|
+ <p v-else class="text-12px text-[#999] leading-17px">订阅会员免费格式转换</p>
|
|
</div>
|
|
</div>
|
|
- <el-button v-if="userInfo?.memberInfo.flag === 1" class="btn-renew">
|
|
|
|
- 续费
|
|
|
|
- </el-button>
|
|
|
|
- <el-button v-else>
|
|
|
|
- 订阅
|
|
|
|
- </el-button>
|
|
|
|
|
|
+ <button class="btn-renew" @click="$router.push('/pricing')">
|
|
|
|
+ {{userInfo?.memberInfo.subscriberType === 1 ? '续费' : '订阅会员'}}
|
|
|
|
+ </button>
|
|
</div>
|
|
</div>
|
|
<div class="flex py-14px my-8px justify-between" style="border-bottom: 1px solid #f0f0f0;">
|
|
<div class="flex py-14px my-8px justify-between" style="border-bottom: 1px solid #f0f0f0;">
|
|
<div>
|
|
<div>
|
|
<p class="text-18px text-[#333] leading-24px"><span class="text-500 text-bg-$btn-color-primary text-22px leading-18px tracking-1px">{{userInfo?.memberInfo?.points}}</span><span class="text-14px text-[rgba(0,0,0,0.8)] leading-18px">/{{userInfo?.memberInfo?.totalPoints}}</span></p>
|
|
<p class="text-18px text-[#333] leading-24px"><span class="text-500 text-bg-$btn-color-primary text-22px leading-18px tracking-1px">{{userInfo?.memberInfo?.points}}</span><span class="text-14px text-[rgba(0,0,0,0.8)] leading-18px">/{{userInfo?.memberInfo?.totalPoints}}</span></p>
|
|
<p class="text-12px text-[#999] leading-17px">转换券</p>
|
|
<p class="text-12px text-[#999] leading-17px">转换券</p>
|
|
</div>
|
|
</div>
|
|
- <el-button class="btn-recharge">充值</el-button>
|
|
|
|
|
|
+ <button class="btn-recharge" @click="handlerOpenLogin('ticket')">充值</button>
|
|
</div>
|
|
</div>
|
|
<div class="w-full h-64px leading-64px text-[#666] cursor-pointer hover:text-bg-$btn-color-primary" style="border-bottom: 1px solid #f0f0f0;" @click="handlerOpenLogin('manage')">
|
|
<div class="w-full h-64px leading-64px text-[#666] cursor-pointer hover:text-bg-$btn-color-primary" style="border-bottom: 1px solid #f0f0f0;" @click="handlerOpenLogin('manage')">
|
|
账号管理
|
|
账号管理
|
|
@@ -64,7 +64,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <img v-if="!!token" slot="reference" class="w-36px h-36px rounded-full mt-23px mr-0 md-0 ml-90px cursor-pointer" src="https://user-file.17pdf.com/avatars/2020/11/16/0577b907be980556bdafa23fb0be0732-jpg.jpg" />
|
|
|
|
|
|
+ <img v-if="!!token" slot="reference" class="w-36px h-36px rounded-full mt-23px mr-0 md-0 ml-90px cursor-pointer" :src="userInfo?.memberInfo.subscriberType === 1 ? 'https://user-file.17pdf.com/avatars/2020/11/16/0577b907be980556bdafa23fb0be0732-jpg.jpg' : 'http://user-file.17pdf.com/avatars/2018/01/02/f183029426a996325853fa244e7df661-jpg.jpg'" @click="$router.push('/members/me/expenses')" />
|
|
</el-popover>
|
|
</el-popover>
|
|
</no-ssr>
|
|
</no-ssr>
|
|
</div>
|
|
</div>
|
|
@@ -73,22 +73,24 @@
|
|
<button class="bg-$btn-color-primary rounded-4px ml-25px text-[#fff] w-70px h-42px leading-22px cursor-pointer hover:bg-[#f34545]" @click="handlerOpenLogin('register')">注册</button>
|
|
<button class="bg-$btn-color-primary rounded-4px ml-25px text-[#fff] w-70px h-42px leading-22px cursor-pointer hover:bg-[#f34545]" @click="handlerOpenLogin('register')">注册</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <no-ssr>
|
|
|
|
- <el-dialog
|
|
|
|
- :visible.sync="dialogVisiable"
|
|
|
|
- :close-on-click-modal="false"
|
|
|
|
- :close-on-press-escape="false"
|
|
|
|
- width="480px"
|
|
|
|
- append-to-body
|
|
|
|
- center
|
|
|
|
- :custom-class="interfaceType === 'manage' ? 'manage-dialog': 'login-dialog'"
|
|
|
|
- @close="handlerCloseDialog"
|
|
|
|
- >
|
|
|
|
- <login v-show="interfaceType === 'login'" ref="loginRef" @register="showChange" @close="handlerClose"></login>
|
|
|
|
- <register v-show="interfaceType === 'register'" ref="registerRef" @login="showChange" @close="handlerClose"></register>
|
|
|
|
- <UserManage v-show="interfaceType === 'manage'" ref="manageRef" @close="handlerClose"></UserManage>
|
|
|
|
- </el-dialog>
|
|
|
|
- </no-ssr>
|
|
|
|
|
|
+ <no-ssr>
|
|
|
|
+ <el-dialog
|
|
|
|
+ :visible="visiable"
|
|
|
|
+ :close-on-click-modal="false"
|
|
|
|
+ :close-on-press-escape="false"
|
|
|
|
+ :width="dialogWidth"
|
|
|
|
+ append-to-body
|
|
|
|
+ center
|
|
|
|
+ :custom-class="interface === 'manage' ? 'manage-dialog': 'login-dialog'"
|
|
|
|
+ @close="handlerCloseDialog"
|
|
|
|
+ >
|
|
|
|
+ <login v-show="interface === 'login'" ref="loginRef" @register="showChange" @close="handlerCloseDialog"></login>
|
|
|
|
+ <register v-show="interface === 'register'" ref="registerRef" @login="showChange" @close="handlerCloseDialog"></register>
|
|
|
|
+ <UserManage v-show="interface === 'manage'" ref="manageRef" @close="handlerCloseDialog"></UserManage>
|
|
|
|
+ <BuyVip v-if="interface === 'vip'" ref="vipRef" @close="handlerCloseDialog"></BuyVip>
|
|
|
|
+ <BuyTicket v-if="interface === 'ticket'" ref="ticketRef" @close="handlerCloseDialog"></BuyTicket>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ </no-ssr>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -98,22 +100,44 @@ import { mapState } from 'vuex'
|
|
import login from '~/components/LoginBar.vue'
|
|
import login from '~/components/LoginBar.vue'
|
|
import register from '~/components/RegisterBar.vue'
|
|
import register from '~/components/RegisterBar.vue'
|
|
import userManage from '~/components/UserManage.vue'
|
|
import userManage from '~/components/UserManage.vue'
|
|
|
|
+import BuyVip from '~/components/BuyVip.vue'
|
|
|
|
+import BuyTicket from '~/components/BuyTicket.vue'
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
login,
|
|
login,
|
|
register,
|
|
register,
|
|
- userManage
|
|
|
|
|
|
+ userManage,
|
|
|
|
+ BuyVip,
|
|
|
|
+ BuyTicket
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
dialogVisiable: false,
|
|
dialogVisiable: false,
|
|
- interfaceType: 'login',
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- computed: mapState([
|
|
|
|
- 'token',
|
|
|
|
- 'userInfo'
|
|
|
|
- ]),
|
|
|
|
|
|
+ computed: {
|
|
|
|
+ ...mapState([
|
|
|
|
+ 'token',
|
|
|
|
+ 'userInfo',
|
|
|
|
+ 'globalLoginVisiable',
|
|
|
|
+ 'globalInterfaceType'
|
|
|
|
+ ]),
|
|
|
|
+ visiable() {
|
|
|
|
+ return this.dialogVisiable || this.globalLoginVisiable
|
|
|
|
+ },
|
|
|
|
+ interface() {
|
|
|
|
+ return this.globalInterfaceType || 'login'
|
|
|
|
+ },
|
|
|
|
+ dialogWidth() {
|
|
|
|
+ if(this.interface === 'vip') {
|
|
|
|
+ return '512px'
|
|
|
|
+ }else if(this.interface === 'ticket') {
|
|
|
|
+ return '558px'
|
|
|
|
+ }else {
|
|
|
|
+ return '480px'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
mounted() {
|
|
mounted() {
|
|
if(localStorage.getItem('userInfo')) {
|
|
if(localStorage.getItem('userInfo')) {
|
|
this.$store.commit('setUser',JSON.parse(localStorage.getItem('userInfo')))
|
|
this.$store.commit('setUser',JSON.parse(localStorage.getItem('userInfo')))
|
|
@@ -123,14 +147,16 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
handlerOpenLogin(type) {
|
|
handlerOpenLogin(type) {
|
|
this.dialogVisiable = true
|
|
this.dialogVisiable = true
|
|
- this.interfaceType = type
|
|
|
|
|
|
+ this.$store.commit('SET_INTERFACE', type)
|
|
},
|
|
},
|
|
handlerCloseDialog() {
|
|
handlerCloseDialog() {
|
|
- this.$refs[`${this.interfaceType}Ref`].resetInterfaceStatus()
|
|
|
|
|
|
+ this.dialogVisiable = false
|
|
|
|
+ this.$store.commit('OPEN_LOGIN',false)
|
|
|
|
+ this.$refs[`${this.interface}Ref`].resetInterfaceStatus()
|
|
},
|
|
},
|
|
- // 展示注册界面
|
|
|
|
|
|
+ // 切换弹窗界面
|
|
showChange(type) {
|
|
showChange(type) {
|
|
- this.interfaceType = type
|
|
|
|
|
|
+ this.$store.commit('SET_INTERFACE', type)
|
|
},
|
|
},
|
|
handlerLogout() {
|
|
handlerLogout() {
|
|
localStorage.removeItem('token')
|
|
localStorage.removeItem('token')
|
|
@@ -138,9 +164,6 @@ export default {
|
|
this.$store.commit('DEL_TOKEN', '')
|
|
this.$store.commit('DEL_TOKEN', '')
|
|
this.$router.push('/')
|
|
this.$router.push('/')
|
|
},
|
|
},
|
|
- handlerClose() {
|
|
|
|
- this.dialogVisiable = false
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|