Commit f966f330 authored by 黄媛媛's avatar 黄媛媛

修改

parent 31ca577d
...@@ -66,7 +66,10 @@ export default { ...@@ -66,7 +66,10 @@ export default {
this.btn2.background = this.mc; this.btn2.background = this.mc;
this.getfu() this.getfu()
let t = getCurrentPages(); let t = getCurrentPages();
this.path = '/' + t[t.length - 1].route; let u = uni.getStorageSync("mall_UserInfo");
let uid = u.UserId ? u.UserId : 0;
this.path = '/' + t[t.length - 1].route+"?id=" + this.goodId + "&user_id=" + uid;
//console.log(t[t.length - 1]); //console.log(t[t.length - 1]);
this.favorStatus = this.favorite; this.favorStatus = this.favorite;
}, },
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
<button <button
open-type="contact" open-type="contact"
:send-message-title="d.OrderInfo.GoodsName" :send-message-title="d.OrderInfo.GoodsName"
:send-message-path="path" :send-message-path="'/pages/goods/goods?id=' + d.OrderInfo.GoodsId + '&user_id=' + uid"
:send-message-img="d.OrderInfo.CoverImagePath" :send-message-img="d.OrderInfo.CoverImagePath"
:show-message-card="true" :show-message-card="true"
> >
...@@ -299,6 +299,7 @@ export default { ...@@ -299,6 +299,7 @@ export default {
expressName: "", expressName: "",
}, },
currentStatus: 0, currentStatus: 0,
uid:0,
}; };
}, },
onLoad(option) { onLoad(option) {
...@@ -313,7 +314,9 @@ export default { ...@@ -313,7 +314,9 @@ export default {
} }
this.init(); this.init();
let t = getCurrentPages(); let t = getCurrentPages();
this.path = "/" + t[t.length - 1].route; let u = uni.getStorageSync("mall_UserInfo");
this.uid = u.UserId ? u.UserId : 0;
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "售后详情", title: "售后详情",
}); });
......
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
<button <button
open-type="contact" open-type="contact"
:send-message-title="x.GoodsName" :send-message-title="x.GoodsName"
:send-message-path="path" :send-message-path="'/pages/goods/goods?id=' + x.GoodsId + '&user_id=' + uid"
:send-message-img=" x.CoverImagePath " :send-message-img=" x.CoverImagePath "
:show-message-card="true" :show-message-card="true"
> >
...@@ -372,6 +372,7 @@ export default { ...@@ -372,6 +372,7 @@ export default {
marginLeft: "20px", marginLeft: "20px",
padding: "0 30rpx", padding: "0 30rpx",
}, },
path: "",
scrollTop: 0, scrollTop: 0,
recommend: [], recommend: [],
prevPage: "", prevPage: "",
...@@ -395,6 +396,7 @@ export default { ...@@ -395,6 +396,7 @@ export default {
showAfter: false, showAfter: false,
showModal: false, showModal: false,
delivery_time:14,//时间 delivery_time:14,//时间
uid:0,
}; };
}, },
onLoad(option) { onLoad(option) {
...@@ -407,7 +409,9 @@ export default { ...@@ -407,7 +409,9 @@ export default {
this.contentStyle.paddingTop = nav.top + 44 + "px"; this.contentStyle.paddingTop = nav.top + 44 + "px";
this.delivery_time = uni.getStorageSync('basedata') ? uni.getStorageSync('basedata').mall.setting.delivery_time : 14; this.delivery_time = uni.getStorageSync('basedata') ? uni.getStorageSync('basedata').mall.setting.delivery_time : 14;
let p = getCurrentPages(); let p = getCurrentPages();
let u = uni.getStorageSync("mall_UserInfo");
this.uid = u.UserId ? u.UserId : 0;
if (p.length > 1) { if (p.length > 1) {
this.prevPage = p[p.length - 2].route; this.prevPage = p[p.length - 2].route;
...@@ -421,7 +425,7 @@ export default { ...@@ -421,7 +425,7 @@ export default {
}, },
goExpressHandler(express, no,id) { goExpressHandler(express, no,id) {
uni.navigateTo({ uni.navigateTo({
url: url:
"/pages/order/express?express=" + "/pages/order/express?express=" +
express + express +
......
<template> <template>
<view class="userStyle"> <view class="userStyle">
<view class="userBox" :style="{ 'margin-bottom': bottommargin }"> <view class="userBox" :style="{ 'margin-bottom': bottommargin }">
<view :style="{ 'background-image': 'url(' + (meueData.user_center.top_pic_url?meueData.user_center.top_pic_url:'') + ')', backgroundSize: '100% 330rpx' }" class="imgbg"> <view
:style="{ 'background-image': 'url(' + (meueData.user_center.top_pic_url ? meueData.user_center.top_pic_url : '') + ')', backgroundSize: '100% 330rpx' }"
class="imgbg"
>
<view style="display: flex;flex-direction: row;align-items: center;width: 100%;" v-if="meueData.user_center.top_style == 1"> <view style="display: flex;flex-direction: row;align-items: center;width: 100%;" v-if="meueData.user_center.top_style == 1">
<u-avatar :src="user_info.avatar" size="140" style="margin-left: 50rpx;"></u-avatar> <u-avatar :src="user_info.avatar" size="140" style="margin-left: 50rpx;"></u-avatar>
<view style="display: flex;flex-direction: column;justify-content: center;"> <view style="display: flex;flex-direction: column;justify-content: center;">
<Text style="color: #FFF;margin-left: 20rpx;font-size: 36rpx;" @click="login(user_info)">{{ user_info.nickname ? user_info.nickname : '立即登录' }}</Text> <Text style="color: #FFF;margin-left: 20rpx;font-size: 36rpx;" @click="login(user_info)">{{ user_info.nickname ? user_info.nickname : '立即登录' }}</Text>
<view class="member" v-if='is_icon_members_grade==1'> <view class="member" v-if="is_icon_members_grade == 1">
<image :src="meueData.user_center.top_pic_url" mode='aspectFill' style="width: 26px;height: 26px;border-radius: 13px;"></image> <image :src="meueData.user_center.top_pic_url" mode="aspectFill" style="width: 26px;height: 26px;border-radius: 13px;"></image>
<Text style='margin-right: 10px;'>{{user_info.identity.level_name!=null ?user_info.identity.level_name:'普通用户' }}</Text> <Text style="margin-right: 10px;">{{ user_info.identity.level_name != null ? user_info.identity.level_name : '普通用户' }}</Text>
</view> </view>
</view> </view>
</view> </view>
<view style="display: flex;flex-direction: column;align-items: center;" v-if="meueData.user_center.top_style == 2"> <view style="display: flex;flex-direction: column;align-items: center;" v-if="meueData.user_center.top_style == 2">
<u-avatar :src="user_info.avatar" size="140"></u-avatar> <u-avatar :src="user_info.avatar" size="140"></u-avatar>
<Text style="color: #FFF;margin-left: 20rpx;font-size: 36rpx;" @click="login(user_info)">{{ user_info.nickname ? user_info.nickname : '立即登录' }}</Text> <Text style="color: #FFF;margin-left: 20rpx;font-size: 36rpx;" @click="login(user_info)">{{ user_info.nickname ? user_info.nickname : '立即登录' }}</Text>
<view class="member" v-if='is_icon_members_grade==1'> <view class="member" v-if="is_icon_members_grade == 1">
<image :src="meueData.user_center.top_pic_url" mode='aspectFill' style="width: 26px;height: 26px;border-radius: 13px;"></image> <image :src="meueData.user_center.top_pic_url" mode="aspectFill" style="width: 26px;height: 26px;border-radius: 13px;"></image>
<Text style='margin-right: 10px;'>{{user_info.identity.level_name!=null ?user_info.identity.level_name:'普通用户' }}</Text> <Text style="margin-right: 10px;">{{ user_info.identity.level_name != null ? user_info.identity.level_name : '普通用户' }}</Text>
</view> </view>
</view> </view>
<view class="ReceiptAdder" @click="goUrl('/pages/address/address')" :style="{ background: mainColor }"> <view class="ReceiptAdder" @click="goUrl('/pages/address/address')" :style="{ background: mainColor }">
...@@ -45,15 +47,15 @@ ...@@ -45,15 +47,15 @@
</view> </view>
<view class="account_bar" v-if="meueData.user_center.is_account_status == 1"> <view class="account_bar" v-if="meueData.user_center.is_account_status == 1">
<view class="account_bar_item" v-for="(item,index) in meueData.user_center.account" @click="goUrl(item.link_url)" :key="index"> <view class="account_bar_item" v-for="(item, index) in meueData.user_center.account" @click="goUrl(item.link_url)" :key="index">
<!-- 优惠券 --> <!-- 优惠券 -->
<Text :style="{ color: secondary }" v-if="item.link_url=='/pages/coupon/index/index'">{{user_info.coupon}}</Text> <Text :style="{ color: secondary }" v-if="item.link_url == '/pages/coupon/index/index'">{{ user_info.coupon }}</Text>
<!-- 积分 --> <!-- 积分 -->
<Text :style="{ color: secondary }" v-if="item.link_url=='/pages/user-center/integral-detail/integral-detail'">{{user_info.integral}}</Text> <Text :style="{ color: secondary }" v-if="item.link_url == '/pages/user-center/integral-detail/integral-detail'">{{ user_info.integral }}</Text>
<!-- 余额 --> <!-- 余额 -->
<Text :style="{ color: secondary }" v-if="item.link_url=='/pages/balance/balance'">{{user_info.balance}}</Text> <Text :style="{ color: secondary }" v-if="item.link_url == '/pages/balance/balance'">{{ user_info.balance }}</Text>
<!-- 卡券 --> <!-- 卡券 -->
<Text :style="{ color: secondary }" v-if="item.link_url=='/pages/card/index/index'">{{user_info.card}}</Text> <Text :style="{ color: secondary }" v-if="item.link_url == '/pages/card/index/index'">{{ user_info.card }}</Text>
<view class="footprint_item_bottom"> <view class="footprint_item_bottom">
<image :src="item.icon_url" style="width: 26rpx;height: 26rpx;"></image> <image :src="item.icon_url" style="width: 26rpx;height: 26rpx;"></image>
<Text style="margin-left: 10rpx;">{{ item.name }}</Text> <Text style="margin-left: 10rpx;">{{ item.name }}</Text>
...@@ -69,15 +71,25 @@ ...@@ -69,15 +71,25 @@
<image :src="item.icon_url" style="width: 66rpx;height: 60rpx;"></image> <image :src="item.icon_url" style="width: 66rpx;height: 60rpx;"></image>
<Text style="margin-top: 10rpx;">{{ item.name }}</Text> <Text style="margin-top: 10rpx;">{{ item.name }}</Text>
<!-- 待付款 --> <!-- 待付款 -->
<view v-if="item.link_url =='/pages/order/index/index?status=1'&&user_info.MyOrder.NonPayment>0" class="badge" :style="{ background: mainColor }">{{ user_info.MyOrder.NonPayment }}</view> <view v-if="item.link_url == '/pages/order/index/index?status=1' && user_info.MyOrder.NonPayment > 0" class="badge" :style="{ background: mainColor }">
<!-- 待发货 --> {{ user_info.MyOrder.NonPayment }}
<view v-if="item.link_url =='/pages/order/index/index?status=2'&&user_info.MyOrder.WaitSendGoods>0" class="badge" :style="{ background: mainColor }">{{ user_info.MyOrder.WaitSendGoods}}</view> </view>
<!-- 待收货 --> <!-- 待发货 -->
<view v-if="item.link_url =='/pages/order/index/index?status=3'&&user_info.MyOrder.WaitReceiving>0" class="badge" :style="{ background: mainColor }">{{ user_info.MyOrder.WaitReceiving }}</view> <view v-if="item.link_url == '/pages/order/index/index?status=2' && user_info.MyOrder.WaitSendGoods > 0" class="badge" :style="{ background: mainColor }">
{{ user_info.MyOrder.WaitSendGoods }}
</view>
<!-- 待收货 -->
<view v-if="item.link_url == '/pages/order/index/index?status=3' && user_info.MyOrder.WaitReceiving > 0" class="badge" :style="{ background: mainColor }">
{{ user_info.MyOrder.WaitReceiving }}
</view>
<!-- 待评价 --> <!-- 待评价 -->
<view v-if="item.link_url =='/pages/order/index/index?status=4'&&user_info.MyOrder.WaitCommentNum>0" class="badge" :style="{ background: mainColor }">{{ user_info.MyOrder.WaitCommentNum }}</view> <view v-if="item.link_url == '/pages/order/index/index?status=4' && user_info.MyOrder.WaitCommentNum > 0" class="badge" :style="{ background: mainColor }">
{{ user_info.MyOrder.WaitCommentNum }}
</view>
<!-- 售后 --> <!-- 售后 -->
<view v-if="item.link_url =='/pages/order/after-sale/refunds-list'&&user_info.MyOrder.AfterSaleNum>0" class="badge" :style="{ background: mainColor }">{{ user_info.MyOrder.AfterSaleNum }}</view> <view v-if="item.link_url == '/pages/order/after-sale/refunds-list' && user_info.MyOrder.AfterSaleNum > 0" class="badge" :style="{ background: mainColor }">
{{ user_info.MyOrder.AfterSaleNum }}
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -89,7 +101,7 @@ ...@@ -89,7 +101,7 @@
:key="index" :key="index"
:name="item.name" :name="item.name"
@click="goUrl(item.link_url)" @click="goUrl(item.link_url)"
v-if="item.name!='分销中心' || user_info.isShowDistributionCenter==1" v-if="item.name != '分销中心' || user_info.isShowDistributionCenter == 1"
> >
<image :src="item.icon_url" style="width: 48rpx;height: 48rpx;"></image> <image :src="item.icon_url" style="width: 48rpx;height: 48rpx;"></image>
<Text <Text
...@@ -97,7 +109,7 @@ ...@@ -97,7 +109,7 @@
> >
{{ item.name }} {{ item.name }}
</Text> </Text>
<button open-type="contact" v-if="item.link_url=='contact'&& item.name=='客服' ">0</button> <button open-type="contact" v-if="item.link_url == 'contact' && item.name == '客服'">0</button>
</view> </view>
</view> </view>
<view class="copyright"> <view class="copyright">
...@@ -117,7 +129,7 @@ import auth from '../../components/auth/index.vue'; ...@@ -117,7 +129,7 @@ import auth from '../../components/auth/index.vue';
export default { export default {
data() { data() {
return { return {
isloading: true, isloading: true,
pageTitle: '用户中心', pageTitle: '用户中心',
navHeight: 0, navHeight: 0,
contentHeight: 0, contentHeight: 0,
...@@ -130,7 +142,7 @@ export default { ...@@ -130,7 +142,7 @@ export default {
mainColor: '', mainColor: '',
secondary: '', secondary: '',
u: {}, u: {},
is_icon_members_grade:0 is_icon_members_grade: 0
}; };
}, },
components: { components: {
...@@ -158,7 +170,7 @@ export default { ...@@ -158,7 +170,7 @@ export default {
this.bottommargin = c - 2 + 'px'; this.bottommargin = c - 2 + 'px';
this.listbottom = c - 2 + 50 + 'px'; this.listbottom = c - 2 + 50 + 'px';
this.contentHeight = this.$utils.calcContentHeight(c); this.contentHeight = this.$utils.calcContentHeight(c);
this.is_icon_members_grade = uni.getStorageSync("basedata")? uni.getStorageSync("basedata").mall.setting.is_icon_members_grade:0 this.is_icon_members_grade = uni.getStorageSync('basedata') ? uni.getStorageSync('basedata').mall.setting.is_icon_members_grade : 0;
let u = '/' + currentPages[currentPages.length - 1].route; let u = '/' + currentPages[currentPages.length - 1].route;
let pages = wx.getStorageSync('basedata') ? wx.getStorageSync('basedata').bar_title : []; let pages = wx.getStorageSync('basedata') ? wx.getStorageSync('basedata').bar_title : [];
// pages.forEach(x => { // pages.forEach(x => {
...@@ -178,48 +190,46 @@ export default { ...@@ -178,48 +190,46 @@ export default {
goHome() { goHome() {
uni.redirectTo({ url: '/pages/index/main' }); uni.redirectTo({ url: '/pages/index/main' });
}, },
//获取菜单配置 //获取菜单配置
userinfo() { userinfo() {
uni.showNavigationBarLoading(); uni.showNavigationBarLoading();
this.request2( this.request2(
{ {
url: '/api/Mall/GetUserCenter', url: '/api/Mall/GetUserCenter',
data: {} data: {}
}, },
res => { res => {
uni.hideNavigationBarLoading(); uni.hideNavigationBarLoading();
this.meueData = res.data.config; this.meueData = res.data.config;
this.user_info = res.data.user_info; this.user_info = res.data.user_info;
} }
); );
}, },
goUrl(url) { goUrl(url) {
if (url == '/pages/balance/balance') {
if(url =='/pages/balance/balance'){
uni.navigateTo({ uni.navigateTo({
url: '/pages/balance/balance?balance='+this.user_info.balance url: '/pages/balance/balance?balance=' + this.user_info.balance
}); });
}else{ } else {
uni.navigateTo({ uni.navigateTo({
url: url url: url
}); });
} }
}, },
reloadUserinfo() { reloadUserinfo() {
this.userinfo(); this.userinfo();
this.u = this.user_info; this.u = this.user_info;
this.showAuth = false; this.showAuth = false;
}, },
login(name) { login(name) {
if ((name&&name.nickname=='')||!name|| !name.nickname) { if ((name && name.nickname == '') || !name || !name.nickname) {
this.showAuth = true; this.showAuth = true;
} }
}, },
//关闭登录窗口 //关闭登录窗口
gbAuth(){ gbAuth() {
this.showAuth=false; this.showAuth = false;
} }
} }
}; };
...@@ -228,7 +238,6 @@ export default { ...@@ -228,7 +238,6 @@ export default {
<style> <style>
.body { .body {
background: #f3f4f6; background: #f3f4f6;
} }
.userStyle .userBox { .userStyle .userBox {
height: 100%; height: 100%;
...@@ -236,7 +245,7 @@ export default { ...@@ -236,7 +245,7 @@ export default {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
background: #f3f4f6; background: #f3f4f6;
min-height:100vh min-height: 100vh;
} }
.userStyle .imgbg { .userStyle .imgbg {
width: 100%; width: 100%;
...@@ -290,11 +299,11 @@ export default { ...@@ -290,11 +299,11 @@ export default {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
border-right:1px solid #d1d1d1; border-right: 1px solid #d1d1d1;
width:25%; width: 25%;
} }
.userStyle .account_bar_item:last-child{ .userStyle .account_bar_item:last-child {
border-right:0; border-right: 0;
} }
.userStyle .order_bar { .userStyle .order_bar {
width: 94%; width: 94%;
...@@ -361,14 +370,14 @@ export default { ...@@ -361,14 +370,14 @@ export default {
justify-content: space-between; justify-content: space-between;
position: relative; position: relative;
} }
.menus_item2,.menus_item button{ .menus_item2,
.menus_item button {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: absolute; position: absolute;
left: 0; left: 0;
top:0; top: 0;
opacity: 0; opacity: 0;
} }
.userStyle .menus2 .menus_item2 { .userStyle .menus2 .menus_item2 {
width: 100%; width: 100%;
...@@ -398,11 +407,11 @@ export default { ...@@ -398,11 +407,11 @@ export default {
align-items: center; align-items: center;
padding: 0 20rpx; padding: 0 20rpx;
} }
.userStyle .member{ .userStyle .member {
background: #3B3641; background: #3b3641;
width: 80px; width: 80px;
font-size: 10px; font-size: 10px;
color:#fff; color: #fff;
height: 18px; height: 18px;
border-radius: 9px; border-radius: 9px;
display: flex; display: flex;
......
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