|
|
@@ -4,7 +4,8 @@
|
|
|
<image class="bg-box" src="@/static/img/my/bg.png" mode=""></image>
|
|
|
<view class="user-box align-items-center" @click="goToUrl(0)">
|
|
|
<view class="user-img-box mr-24">
|
|
|
- <image v-if="userInfoData.head_img" class="user-img b-rad-50" :src="userInfoData.head_img" mode="aspectFill">
|
|
|
+ <image v-if="userInfoData.head_img" class="user-img b-rad-50" :src="userInfoData.head_img"
|
|
|
+ mode="aspectFill">
|
|
|
</image>
|
|
|
<image v-else class="user-img b-rad-50" src="@/static/img/my/user-img.png" mode=""></image>
|
|
|
<image class="set-iimg" src="@/static/img/my/pen.png" mode=""></image>
|
|
|
@@ -46,8 +47,8 @@
|
|
|
<image class="lqzx-img" src="@/static/img/my/lqzx.png" mode=""></image>
|
|
|
<image class="to-right" src="@/static/img/toRight.png" mode=""></image>
|
|
|
</view>
|
|
|
- <view class="fs-26 fc-9">
|
|
|
- 领券下单更优惠
|
|
|
+ <view class="fs-26 fc-ED301D">
|
|
|
+ {{couponHome_num?'有可领取的优惠券':'领券下单更优惠'}}
|
|
|
</view>
|
|
|
</view>
|
|
|
<image class="function-two-right" src="@/static/img/my/q.png" mode=""></image>
|
|
|
@@ -64,7 +65,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="item-right align-items-center">
|
|
|
- <view class="fs-24 fc-9" v-if="userInfoData.msg_count > 0">
|
|
|
+ <view class="fs-24 fc-ED301D" v-if="userInfoData.msg_count > 0">
|
|
|
{{userInfoData.msg_count}}条未读消息
|
|
|
</view>
|
|
|
<image class="to-right" src="@/static/img/toRight.png" mode=""></image>
|
|
|
@@ -152,6 +153,12 @@
|
|
|
import {
|
|
|
userInfo
|
|
|
} from '@/api/member.js'
|
|
|
+ import {
|
|
|
+ couponHome
|
|
|
+ } from '@/api/coupon.js'
|
|
|
+ import {
|
|
|
+ membeRmessage
|
|
|
+ } from "@/api/member.js"
|
|
|
export default {
|
|
|
components: {},
|
|
|
data() {
|
|
|
@@ -163,6 +170,7 @@
|
|
|
sex: '',
|
|
|
msg_count: '',
|
|
|
},
|
|
|
+ couponHome_num: false
|
|
|
};
|
|
|
},
|
|
|
onShow() {
|
|
|
@@ -171,14 +179,43 @@
|
|
|
this.userInfoData.nickname = '请先登录'
|
|
|
} else {
|
|
|
this.getUserInfo();
|
|
|
+ this.couponHome()
|
|
|
+ this.membeRmessage()
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
methods: {
|
|
|
+ membeRmessage() {
|
|
|
+ membeRmessage().then((res) => {
|
|
|
+ if (res.code === 1) {
|
|
|
+ if (res.data.msg_count > 0) {
|
|
|
+ uni.showTabBarRedDot({
|
|
|
+ index: 2
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.hideTabBarRedDot({
|
|
|
+ index: 2
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ couponHome() {
|
|
|
+ let operate_id = uni.getStorageSync('operate_id');
|
|
|
+ couponHome({
|
|
|
+ operate_id: operate_id
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code == 1) {
|
|
|
+ if (res.data.length > 0) {
|
|
|
+ this.couponHome_num = true
|
|
|
+ } else {
|
|
|
+ this.couponHome_num = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
handleContact(e) {
|
|
|
console.log(e);
|
|
|
},
|
|
|
-
|
|
|
getUserInfo() {
|
|
|
userInfo().then((res) => {
|
|
|
if (res.code === 1) {
|
|
|
@@ -258,10 +295,11 @@
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
- .item-right{
|
|
|
+ .item-right {
|
|
|
position: relative;
|
|
|
}
|
|
|
- .red-point{
|
|
|
+
|
|
|
+ .red-point {
|
|
|
position: absolute;
|
|
|
right: 32rpx;
|
|
|
top: 0;
|
|
|
@@ -271,6 +309,7 @@
|
|
|
background: red;
|
|
|
opacity: 0.5;
|
|
|
}
|
|
|
+
|
|
|
.item-box {
|
|
|
position: relative;
|
|
|
|