|
@@ -2,7 +2,7 @@
|
|
<view class="content">
|
|
<view class="content">
|
|
<view :style="{ paddingTop: navBarHeight }" class="profile-box">
|
|
<view :style="{ paddingTop: navBarHeight }" class="profile-box">
|
|
<view class="header">
|
|
<view class="header">
|
|
- <view class="avatar">
|
|
|
|
|
|
+ <view @click="init" class="avatar">
|
|
<image
|
|
<image
|
|
:src="userInfo.imgPath || defaultImg"
|
|
:src="userInfo.imgPath || defaultImg"
|
|
mode="aspectFill"
|
|
mode="aspectFill"
|
|
@@ -10,7 +10,7 @@
|
|
/>
|
|
/>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
- <view class="info">
|
|
|
|
|
|
+ <view @click="init" class="info">
|
|
<view class="name">
|
|
<view class="name">
|
|
<text>{{ userInfo.nickname || "用户" }}</text>
|
|
<text>{{ userInfo.nickname || "用户" }}</text>
|
|
</view>
|
|
</view>
|
|
@@ -33,6 +33,7 @@
|
|
<u-grid-item
|
|
<u-grid-item
|
|
v-for="(baseListItem, baseListIndex) in baseList"
|
|
v-for="(baseListItem, baseListIndex) in baseList"
|
|
:key="baseListIndex"
|
|
:key="baseListIndex"
|
|
|
|
+ @click="jump(baseListItem.path)"
|
|
>
|
|
>
|
|
<!-- <u-icon
|
|
<!-- <u-icon
|
|
:customStyle="{ paddingTop: 20 + 'rpx' }"
|
|
:customStyle="{ paddingTop: 20 + 'rpx' }"
|
|
@@ -47,14 +48,13 @@
|
|
<text class="grid-text">{{ baseListItem.title }}</text>
|
|
<text class="grid-text">{{ baseListItem.title }}</text>
|
|
</u-grid-item>
|
|
</u-grid-item>
|
|
</u-grid>
|
|
</u-grid>
|
|
- <view
|
|
|
|
- style="font-size: 34rpx; font-weight: bold; margin: 30rpx 0 0 30rpx"
|
|
|
|
- >
|
|
|
|
|
|
+ <view style="font-size: 34rpx; font-weight: bold; margin: 30rpx 0 0 30rpx">
|
|
常用功能
|
|
常用功能
|
|
</view>
|
|
</view>
|
|
<view class="setting">
|
|
<view class="setting">
|
|
<u-cell-group :border="false">
|
|
<u-cell-group :border="false">
|
|
<u-cell
|
|
<u-cell
|
|
|
|
+ @click="jump(item.path)"
|
|
class="setting-cell"
|
|
class="setting-cell"
|
|
v-for="item in settingList"
|
|
v-for="item in settingList"
|
|
:rightIconStyle="{ fontSize: '15px' }"
|
|
:rightIconStyle="{ fontSize: '15px' }"
|
|
@@ -88,11 +88,13 @@ export default {
|
|
name: "order",
|
|
name: "order",
|
|
title: "全部",
|
|
title: "全部",
|
|
src: "/static/icon/my/all.png",
|
|
src: "/static/icon/my/all.png",
|
|
|
|
+ path: "../../my/order/index",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: "red-packet",
|
|
name: "red-packet",
|
|
title: "待付款",
|
|
title: "待付款",
|
|
src: "/static/icon/my/obligations.png",
|
|
src: "/static/icon/my/obligations.png",
|
|
|
|
+ path: "../../my/order/index?type=WAIT_PAYMENT",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: "car",
|
|
name: "car",
|
|
@@ -108,6 +110,7 @@ export default {
|
|
name: "rmb-circle",
|
|
name: "rmb-circle",
|
|
title: "退款",
|
|
title: "退款",
|
|
src: "/static/icon/my/refund.png",
|
|
src: "/static/icon/my/refund.png",
|
|
|
|
+ path: "../../my/order/index?type=APPLY_REFUND",
|
|
},
|
|
},
|
|
],
|
|
],
|
|
settingList: [
|
|
settingList: [
|
|
@@ -115,6 +118,7 @@ export default {
|
|
{
|
|
{
|
|
name: "vip",
|
|
name: "vip",
|
|
title: "会员码",
|
|
title: "会员码",
|
|
|
|
+ path:'../../my/memberCenter/index'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: "location",
|
|
name: "location",
|
|
@@ -135,42 +139,64 @@ export default {
|
|
this.navBarHeight = this.$navHight();
|
|
this.navBarHeight = this.$navHight();
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
- if (uni.getStorageSync("token")) {
|
|
|
|
- this.getUserDetail();
|
|
|
|
- } else {
|
|
|
|
- (this.userInfo = {
|
|
|
|
- imgPath: null,
|
|
|
|
- lastLogin: "",
|
|
|
|
- level: null,
|
|
|
|
- nickname: null,
|
|
|
|
- openId: "",
|
|
|
|
- phoneNum: "",
|
|
|
|
- sex: 0,
|
|
|
|
- userId: "",
|
|
|
|
- valid: 0,
|
|
|
|
- }),
|
|
|
|
- uni.showModal({
|
|
|
|
|
|
+ init();
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ init() {
|
|
|
|
+ if (uni.getStorageSync("token")) {
|
|
|
|
+ this.getUserDetail();
|
|
|
|
+ } else {
|
|
|
|
+ (this.userInfo = {
|
|
|
|
+ imgPath: null,
|
|
|
|
+ lastLogin: "",
|
|
|
|
+ level: null,
|
|
|
|
+ nickname: null,
|
|
|
|
+ openId: "",
|
|
|
|
+ phoneNum: "",
|
|
|
|
+ sex: 0,
|
|
|
|
+ userId: "",
|
|
|
|
+ valid: 0,
|
|
|
|
+ }),
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: "请登录",
|
|
|
|
+ confirmText: "去登录",
|
|
|
|
+ success(res) {
|
|
|
|
+ console.log(res);
|
|
|
|
+ if (res.confirm) {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: "../../login/login/login",
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 获取用户详情
|
|
|
|
+ getUserDetail() {
|
|
|
|
+ getUserDetail().then((res) => {
|
|
|
|
+ if (res.state == "Success") {
|
|
|
|
+ this.userInfo = res.content;
|
|
|
|
+ uni.setStorageSync("userInfo", JSON.stringify(this.userInfo));
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ jump(url) {
|
|
|
|
+ if (!uni.getStorageSync("token")) {
|
|
|
|
+ return uni.showModal({
|
|
title: "请登录",
|
|
title: "请登录",
|
|
confirmText: "去登录",
|
|
confirmText: "去登录",
|
|
success(res) {
|
|
success(res) {
|
|
console.log(res);
|
|
console.log(res);
|
|
if (res.confirm) {
|
|
if (res.confirm) {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url: "../../login/login/login",
|
|
|
|
|
|
+ url: "../../login/login/login?redirect=/pages/my/index",
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
});
|
|
});
|
|
- }
|
|
|
|
- },
|
|
|
|
- methods: {
|
|
|
|
- // 获取用户详情
|
|
|
|
- getUserDetail() {
|
|
|
|
- getUserDetail().then((res) => {
|
|
|
|
- if (res.state == "Success") {
|
|
|
|
- this.userInfo = res.content;
|
|
|
|
- uni.setStorageSync("userInfo", JSON.stringify(this.userInfo));
|
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url,
|
|
});
|
|
});
|
|
},
|
|
},
|
|
},
|
|
},
|
|
@@ -184,7 +210,7 @@ page {
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
.content {
|
|
.content {
|
|
.profile-box {
|
|
.profile-box {
|
|
- background: url("https://jbm.dev.zonelife.cn/img/background.png") no-repeat;
|
|
|
|
|
|
+ background: url("http://jbm.dev.zonelife.cn/img/background.png") no-repeat;
|
|
background-size: 100% 100%;
|
|
background-size: 100% 100%;
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
border-bottom-left-radius: 40% 5%;
|
|
border-bottom-left-radius: 40% 5%;
|
|
@@ -238,7 +264,7 @@ page {
|
|
padding: 20rpx;
|
|
padding: 20rpx;
|
|
height: 80rpx;
|
|
height: 80rpx;
|
|
color: white;
|
|
color: white;
|
|
- background: url("https://jbm.dev.zonelife.cn/img/vip.png") no-repeat;
|
|
|
|
|
|
+ background: url("http://jbm.dev.zonelife.cn/img/vip.png") no-repeat;
|
|
background-size: 100% 100%;
|
|
background-size: 100% 100%;
|
|
border-radius: 10px 10px 0 0;
|
|
border-radius: 10px 10px 0 0;
|
|
|
|
|
|
@@ -280,7 +306,7 @@ page {
|
|
margin-left: 20rpx;
|
|
margin-left: 20rpx;
|
|
width: 90%;
|
|
width: 90%;
|
|
height: 80rpx;
|
|
height: 80rpx;
|
|
- background-color: rgba( #000000, .2);
|
|
|
|
|
|
+ background-color: rgba(#000000, 0.2);
|
|
color: black;
|
|
color: black;
|
|
padding-left: 30rpx;
|
|
padding-left: 30rpx;
|
|
line-height: 80rpx;
|
|
line-height: 80rpx;
|