调整个人中心会员身份

This commit is contained in:
唐明明
2022-01-14 14:41:44 +08:00
parent e7d4e15459
commit a93a07a7e5
6 changed files with 33 additions and 272 deletions

View File

@@ -139,7 +139,6 @@
"app-plus": {
"titleNView": {
"backgroundColor": "#FFFFFF",
"titleSize": "16",
"buttons": [{
"float": "right",
"text": "\ue603",
@@ -206,53 +205,6 @@
"enablePullDownRefresh": false
}
},
{
"path": "pages/address/index",
"name": "Address",
"style": {
"navigationBarTitleText": "地址"
}
},
{
"path": "pages/address/edit",
"name": "AddressEdit",
"style": {
"navigationBarTitleText": "编辑",
"enablePullDownRefresh": false
}
},
{
"path": "pages/pay/pay",
"style": {
"navigationBarTitleText": "收银台",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/store/buy",
"name": "StoreBuy",
"style": {
"navigationBarTitleText": "确认订单",
"enablePullDownRefresh": false
}
},
{
"path": "pages/order/index",
"name": "Order",
"style": {
"navigationBarTitleText": "订单",
"navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": false
}
},
{
"path": "pages/order/details",
"name": "OrderDetails",
"style": {
"navigationBarTitleText": "订单详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/address/index",
"name": "Address",
@@ -270,7 +222,6 @@
},
{
"path": "pages/pay/pay",
"name": "Pay",
"style": {
"navigationBarTitleText": "收银台",
"navigationBarBackgroundColor": "#FFFFFF"
@@ -341,195 +292,17 @@
},
{
"path": "pages/topic/details",
"name": "topicDetails",
"style": {
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true
}
},
{
"path": "pages/ranking/index",
"name": "rankingIndex",
"style": {
"navigationBarTitleText": "食物排行",
"navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true
}
},
{
"path": "pages/ranking/list",
"name": "rankingList",
"style": {
"navigationBarTitleText": "食物榜单",
"navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true
}
},
{
"path": "pages/ranking/details",
"name": "rankingDetails",
"style": {
"navigationBarTitleText": "食物详情",
"navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true
}
},
{
"path": "pages/im/index",
"name": "IM",
"style": {
"navigationBarTitleText": "im",
"enablePullDownRefresh": false
}
},
{
"path": "pages/store/goods",
"name": "StoreGoods",
"style": {
"name": "topicDetails",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "详情",
"app-plus": {
"titleNView": {
"backgroundColor": "#FFFFFF",
"type": "transparent"
}
"navigationBarBackgroundColor": "#FFFFFF",
"app-plus": {
"titleNView": {
"type": "transparent"
}
}
}
},
{
"path": "pages/store/buy",
"name": "StoreBuy",
"style": {
"navigationBarTitleText": "确认订单",
"enablePullDownRefresh": false
}
},
{
"path": "pages/order/index",
"name": "Order",
"style": {
"navigationBarTitleText": "订单",
"navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": false
}
},
{
"path": "pages/order/details",
"name": "OrderDetails",
"style": {
"navigationBarTitleText": "订单详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/address/index",
"name": "Address",
"style": {
"navigationBarTitleText": "收货地址"
}
},
{
"path": "pages/address/edit",
"name": "AddressEdit",
"style": {
"navigationBarTitleText": "编辑",
"enablePullDownRefresh": false
}
},
{
"path": "pages/pay/pay",
"name": "Pay",
"style": {
"navigationBarTitleText": "收银台",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/store/list",
"name": "StoreList",
"style": {
"navigationBarTitleText": "商品",
"navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true,
"app-plus": {
"titleNView": {
"backgroundColor": "#FFFFFF",
"titleSize": "16",
"buttons": [{
"float": "right",
"text": "\ue603",
"fontSrc": "/static/iconfont.ttf",
"color": "#000",
"fontSize": "20px"
}]
}
}
}
},
{
"path": "pages/store/meals",
"name": "StoreMeals",
"style": {
"navigationBarTitleText": "套餐",
"navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true
}
},
{
"path": "pages/sign/index",
"name": "signIndex",
"style": {
"navigationBarTitleText": "每日签到",
"navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true
}
},
{
"path": "pages/menu/index",
"name": "menuIndex",
"style": {
"navigationBarTitleText": "食谱推荐",
"navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true
}
},
{
"path": "pages/menu/classify",
"name": "menuClassify",
"style": {
"navigationBarTitleText": "食谱推荐",
"navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true
}
},
{
"path": "pages/menu/details",
"name": "menuDetails",
"style": {
"navigationBarTitleText": "食谱详情",
"navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true
}
},
{
"path": "pages/topic/index",
"name": "topicIndex",
"style": {
"navigationBarTitleText": "话题广场",
"navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true
}
},
{
"path": "pages/topic/details",
"name": "topicDetails",
"style": {
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true
}
},
{
"path": "pages/ranking/index",
"name": "rankingIndex",
@@ -689,15 +462,6 @@
"enablePullDownRefresh": false
}
},
{
"path": "pages/service/index",
"name": "serviceIndex",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path": "pages/service/details",
"name": "serviceDetails",

View File

@@ -14,9 +14,6 @@
</view>
</block>
<block v-else>
<!-- <button type="default">连接</button> -->
<!-- <button type="default">发送</button> -->
<view v-for="(item, index) in messageArr" :key="index" class="mssage-box">
<view class="mssage-action" @click="openChum">
<block v-if="item.cover === ''">
@@ -44,10 +41,6 @@
</view>
</view>
</view>
<view @click="$Router.push({name: 'Record'})">
临时记录
</view>
</block>
</view>
</template>

View File

@@ -428,7 +428,7 @@ export default {
<style lang="scss" scoped>
.record {
padding: $padding * 5 $padding $padding $padding;
padding: $padding * 6 $padding $padding $padding;
position: relative;
// 顶部搜索
.search {
@@ -442,7 +442,7 @@ export default {
width: 100%;
left: 0;
top: 0;
padding: $padding *2 $padding $padding $padding;
padding: $padding *3 $padding $padding $padding;
z-index: 1000;
.user {
display: flex;

View File

@@ -3,6 +3,7 @@
<view class="backCont">
<image class="img" :src="topicData.cover" mode="aspectFill"></image>
<view class="head">
<view class="ios-top"></view>
<view class="ellipsis title">
{{ topicData.name }}
</view>
@@ -64,6 +65,7 @@
<script>
import { topicDet, topicThumb } from '@/apis/interfaces/topic'
import userAuth from '@/public/userAuth'
export default {
data() {
return {
@@ -80,6 +82,9 @@
// 详情
getRank(){
topicDet(this.$Route.query.id).then(res => {
uni.setNavigationBarTitle({
title: res.name
})
this.topicData = res
this.goodsArr = res.goods
this.isFavorite = res.is_favorite
@@ -89,6 +94,11 @@
// 点赞
thumbClick(id) {
if(this.$store.state.token === ''){
const Auth = new userAuth()
Auth.Login()
return
}
topicThumb(id).then(res => {
this.isFavorite = !this.isFavorite
})
@@ -105,7 +115,7 @@
.backCont {
position: relative;
width: 100vw;
padding-top: 75%;
padding-top: 90%;
&::after {
position: absolute;
content: '';
@@ -127,7 +137,7 @@
overflow: hidden;
}
.head {
padding: $padding * 2 $padding + 30 0;
padding: $padding * 3 $padding + 30 0;
color: white;
box-sizing: border-box;
position: absolute;

View File

@@ -44,16 +44,9 @@
};
},
mounted() {
// 获取首页
this.getGuide()
},
methods: {
// 引导图片
getGuide(){
records().then(res => {
this.recordsData = res
})
}
records().then(res => {
this.recordsData = res
})
}
};
</script>

View File

@@ -8,7 +8,7 @@
<view class="user-content">
<block v-if="$store.state.token != ''">
<view class="name">{{userInfo.nickname}}</view>
<view class="tabs">
<view class="tabs" v-if="userInfo.identity.length != 0">
<view class="tabs-item"><image src="@/static/user/icon_07.png"></image>会员</view>
</view>
</block>
@@ -34,7 +34,7 @@
direction="column"
></u-notice-bar>
</view>
<view class="btn" @click="openVip">开通</view>
<view class="btn" @click="openVip" v-if="userInfo.identity.length === 0">开通</view>
</view>
<!-- 健康数据 -->
<view class="health-flex" v-if="userInfo.has_record">
@@ -100,7 +100,7 @@
<uni-icons class="forward" type="forward" color="#999"></uni-icons>
</view>
</view>
<view class="btns-box">
<view class="btns-box" v-if="$store.state.token != ''">
<view class="btns-box-item" @click="logOut">
<image class="icon" src="@/static/user/userIcon_05.png" mode="widthFix"></image>
退出登录
@@ -123,7 +123,8 @@
cardText: ['新用户首单即赠会员', '老用户专属验证开通会员'],
userInfo: {
nickname: "",
avatar : ""
avatar : "",
identity: []
}
};
},
@@ -188,7 +189,6 @@
onFiles(){
if(this.isLogin()){
if(!this.userInfo.has_record){
console.log('未完善资料')
this.$Router.push({name: 'EssentialInfo'})
return
}
@@ -212,9 +212,10 @@
},
// 退出登录
logOut(){
this.userInfo = {
nickname: "",
avatar : ""
this.userInfo = {
nickname: "",
avatar : "",
identity: []
}
this.$store.commit('setToken', '')
}