调整个人中心会员身份

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": { "app-plus": {
"titleNView": { "titleNView": {
"backgroundColor": "#FFFFFF", "backgroundColor": "#FFFFFF",
"titleSize": "16",
"buttons": [{ "buttons": [{
"float": "right", "float": "right",
"text": "\ue603", "text": "\ue603",
@@ -206,53 +205,6 @@
"enablePullDownRefresh": false "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", "path": "pages/address/index",
"name": "Address", "name": "Address",
@@ -270,7 +222,6 @@
}, },
{ {
"path": "pages/pay/pay", "path": "pages/pay/pay",
"name": "Pay",
"style": { "style": {
"navigationBarTitleText": "收银台", "navigationBarTitleText": "收银台",
"navigationBarBackgroundColor": "#FFFFFF" "navigationBarBackgroundColor": "#FFFFFF"
@@ -341,195 +292,17 @@
}, },
{ {
"path": "pages/topic/details", "path": "pages/topic/details",
"name": "topicDetails", "name": "topicDetails",
"style": { "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": {
"navigationStyle": "custom", "navigationStyle": "custom",
"navigationBarTitleText": "详情", "navigationBarBackgroundColor": "#FFFFFF",
"app-plus": { "app-plus": {
"titleNView": { "titleNView": {
"backgroundColor": "#FFFFFF", "type": "transparent"
"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", "path": "pages/ranking/index",
"name": "rankingIndex", "name": "rankingIndex",
@@ -689,15 +462,6 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{
"path": "pages/service/index",
"name": "serviceIndex",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{ {
"path": "pages/service/details", "path": "pages/service/details",
"name": "serviceDetails", "name": "serviceDetails",

View File

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

View File

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

View File

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

View File

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

View File

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