Commit daacd53e by weijiguang

调整 我的,未登录样式

parent 45e25d9d
......@@ -181,7 +181,7 @@ export default {
computed: {
totalNum() {
let totalNum = 0;
this.orderInfo.orderDetails.map(item => {
this.orderInfo.orderDetails.forEach(item => {
totalNum += parseInt(item.num);
})
return totalNum;
......
......@@ -15,13 +15,11 @@
</view>
</view>
<button class="mod11 flex-col" v-else open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">立刻登录</button>
<view class="contents">
<view class="contents" v-if="userms">
<view class="myOrder" @click="goToPage('order')">
<view class="order1">我的订单</view>
<view class="order2">点击查看订单</view>
<view>
<image class="orderImg" src="../../static/imgs/myOrder.png"></image>
</view>
<view><image class="orderImg" src="/static/imgs/myOrder.png"></image></view>
</view>
<view class="right_box">
<view class="box" @click.stop="goToPage('coupon')">
......@@ -29,24 +27,41 @@
<h3>HOOLOO券</h3>
<view class="dec">优惠多多不要错过</view>
</view>
<view class="right">
<image class="right_img" src="../../static/imgs/my3.png"></image>
</view>
<view class="right"><image class="right_img" src="/static/imgs/my3.png"></image></view>
</view>
<view class="box two">
<button v-if="!userms" class="payment" open-type="getPhoneNumber" @getphonenumber.stop="goToPage"></button>
<view @click="goToPage('msg')" class="left">
<view class="box two" @click="goToPage('msg')">
<view class="left">
<h3>我的消息</h3>
<view class="dec">点击查看我的消息</view>
</view>
<view @click="goToPage('msg')" class="right msg">
<div class="unread_number" v-if="UnreadNumber">{{UnreadNumber}}</div>
<image class="right_img" src="../../static/imgs/myMail.png"></image>
<view class="right"><image class="right_img" src="/static/imgs/myMail.png"></image></view>
</view>
</view>
</view>
<view class="contents" v-if="!userms">
<button class="myOrder" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
<view class="order3">我的订单</view>
<view class="order4">点击查看订单</view>
<view><image class="orderImg1" src="/static/imgs/myOrder.png"></image></view>
</button>
<view class="right_box">
<button class="box" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
<view class="left">
<h3>HOOLOO券</h3>
<view class="dec">优惠多多不要错过</view>
</view>
<view class="function">
<view class="right"><image class="right_img" src="/static/imgs/my3.png"></image></view>
</button>
<button class="box two" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
<view class="left">
<h3>我的消息</h3>
<view class="dec">点击查看我的消息</view>
</view>
<view class="right"><image class="right_img" src="/static/imgs/myMail.png"></image></view>
</button>
</view>
</view>
<view v-if="userms" class="function">
<h3>常用功能</h3>
<view class="function_item">
<u-icon name="server-fill" color="#000000" size="16"></u-icon>
......@@ -60,7 +75,6 @@
<script>
import User from '@/request/user'
import Mine from '@/request/mine'
export default {
onLoad() {
......@@ -70,15 +84,9 @@ export default {
})
}
},
onShow() {
if(this.userms){
this.getMessageCount()
}
},
data() {
return {
loginInfo:"",
UnreadNumber:""
loginInfo:""
}
},
computed: {
......@@ -94,30 +102,28 @@ export default {
getPhoneNumber(e) {
if (e.detail.errMsg == 'getPhoneNumber:ok') {
e.loginInfo = this.loginInfo
User.getPhoneNumber(e,this.getMessageCount);
User.getPhoneNumber(e);
} else if (e.detail.errMsg == "getPhoneNumber:fail user deny") {
uni.showToast({ title: '已拒绝手机号授权', icon: 'error' })
}
},
goToPage(page) {
page == 'coupon' && uni.showToast({ title: '功能未开放!', icon: 'none' });
if (!this.userms) {
this.getPhoneNumber(page)
// this.loginByPhoneNumber(page)
return
}
page == 'order' && uni.switchTab({ url: '/pages/order/order' })
page == 'coupon' && uni.showToast({ title: '功能未开放!', icon: 'none' });
page == 'msg' && uni.navigateTo({ url: '/mineSubPackage/pages/msg/index' })
},
async getMessageCount() {
const {data} = await Mine.getMessageCount()
const num = data&&Number(data.data)!=0?data.data:''
this.UnreadNumber = num
}
}
}
</script>
<style lang="scss" scoped>
button::after {
border: none;
}
.payment {
border-radius: 0;
display: block;
......@@ -150,17 +156,13 @@ export default {
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 600;
color: #FFFFFF;
}
}
image {
width: 100%;
height: 376rpx;
}
}
.mod11 {
......@@ -200,13 +202,13 @@ export default {
margin: 34rpx auto;
width: 692rpx;
.myOrder {
width: 270rpx;
height: 272rpx;
background: #FFFFFF;
border-radius: 10rpx;
text-align: center;
padding: 0 36rpx;
.order1 {
font-size: 28rpx;
......@@ -222,7 +224,6 @@ export default {
font-weight: 400;
color: #323232;
margin-top: 10rpx;
}
.orderImg {
......@@ -231,6 +232,29 @@ export default {
margin: 0 auto;
margin-top: 50rpx;
}
.order3 {
font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #000000;
margin-top: 10rpx;
}
.order4 {
font-size: 20rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #323232;
margin-top: -20rpx;
}
.orderImg1 {
width: 70rpx;
height: 80rpx;
margin: 0 auto;
margin-top: 20rpx;
}
}
.right_box {
......@@ -250,24 +274,6 @@ export default {
&.two {
margin-top: 15rpx;
.msg{
position: relative;
.unread_number{
background-color: #ff73bf;
width: 25rpx;
height: 25rpx;
font-size: 15rpx;
color: white;
line-height: 25rpx;
text-align: center;
border-radius: 25rpx;
font-weight: bolder;
position: absolute;
right: -10rpx;
top: -10rpx;
}
}
}
.left {
......@@ -289,14 +295,11 @@ export default {
margin-top: 10rpx
}
.right_img {
width: 80rpx;
height: 55rpx;
}
}
}
.function {
......@@ -307,7 +310,6 @@ export default {
padding: 25rpx;
box-sizing: border-box;
h3 {
font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC;
......@@ -343,11 +345,9 @@ export default {
border: unset;
}
.function_item_icon {
margin-left: auto;
}
}
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment