This commit is contained in:
cclu 2025-05-08 11:21:54 +08:00
parent 5593cabfd6
commit 5c7d5a46fb
74 changed files with 2161 additions and 1792 deletions

View File

@ -503,7 +503,7 @@
<div <div
class="banner-text" class="banner-text"
v-if=" v-if="
!user.MEMBERSHIP_MOBILEPHONE || user.MEMBERSHIP_MOBILEPHONE == '' (!user && !user.MEMBERSHIP_MOBILEPHONE) || (user && user.MEMBERSHIP_MOBILEPHONE) == ''
" "
> >
<div style="display: flex; align-items: center"> <div style="display: flex; align-items: center">
@ -808,7 +808,7 @@
</button> </button>
</div> </div>
<UniPopup <UniPopup
:show="isLogin && !user.MEMBERSHIP_MOBILEPHONE" :show="isLogin && !user && !user.MEMBERSHIP_MOBILEPHONE"
@close="isLogin = false" @close="isLogin = false"
custom-style="border-radius: 24rpx;" custom-style="border-radius: 24rpx;"
> >
@ -1195,7 +1195,7 @@ export default {
} }
}, },
goDetail(id) { goDetail(id) {
if (this.user.MEMBERSHIP_MOBILEPHONE) { if (this.user && this.user.MEMBERSHIP_MOBILEPHONE) {
uni.navigateTo({ url: "/pages/couponDetail/index?id=" + id }); uni.navigateTo({ url: "/pages/couponDetail/index?id=" + id });
} else { } else {
this.isLogin = true; this.isLogin = true;
@ -1213,7 +1213,7 @@ export default {
}, },
goBuy(item) { goBuy(item) {
console.log("goBuy", item); console.log("goBuy", item);
if (this.user.MEMBERSHIP_MOBILEPHONE) { if (this.user && this.user.MEMBERSHIP_MOBILEPHONE) {
let id = item.SERVERPARTSHOP_IDS.split(",")[0]; let id = item.SERVERPARTSHOP_IDS.split(",")[0];
// let arr = { // let arr = {
// id: id // id: id

View File

@ -384,6 +384,7 @@ export default {
let _this = this; let _this = this;
setTimeout(() => { setTimeout(() => {
_this.chaegeBoxList = [_this.serverPart.SERVERPART_NAME]; _this.chaegeBoxList = [_this.serverPart.SERVERPART_NAME];
uni.stopPullDownRefresh();
}, 500); }, 500);
this.isLoading = false; this.isLoading = false;
}, },

View File

@ -16,22 +16,27 @@
> >
<image <image
class="headerImg" class="headerImg"
:src="WXProfile || user.MEMBERSHIP_HEADIMAGEURL" :src="
WXProfile ||
(user && user.MEMBERSHIP_HEADIMAGEURL
? user.MEMBERSHIP_HEADIMAGEURL
: '')
"
/> />
</button> </button>
</view> </view>
<view class="userInfoBox"> <view class="userInfoBox">
<view class="userTop"> <view class="userTop">
<span class="userName">{{ <span class="userName">{{
user.MEMBERSHIP_NAME || phone || "游客" (user && user.MEMBERSHIP_NAME) || phone || "游客"
}}</span> }}</span>
<image <image
v-if="user.MEMBERSHIP_LEVEL" v-if="user && user.MEMBERSHIP_LEVEL"
class="userType" class="userType"
:src=" :src="
user.MEMBERSHIP_LEVEL === 1000 user && user.MEMBERSHIP_LEVEL === 1000
? 'https://eshangtech.com/wanmeiyizhanImg/home/normalUser.svg' ? 'https://eshangtech.com/wanmeiyizhanImg/home/normalUser.svg'
: user.MEMBERSHIP_LEVEL === 2000 : user && user.MEMBERSHIP_LEVEL === 2000
? 'https://eshangtech.com/wanmeiyizhanImg/home/silverCard.svg' ? 'https://eshangtech.com/wanmeiyizhanImg/home/silverCard.svg'
: '' : ''
" "
@ -68,7 +73,9 @@
@click="isGo('/pages/homeFn/myCoupon/index')" @click="isGo('/pages/homeFn/myCoupon/index')"
> >
<view class="itemContent"> <view class="itemContent">
<view class="bottomValue">{{ user.COUPON_COUNT || 0 }}</view> <view class="bottomValue">{{
user && user.COUPON_COUNT ? user.COUPON_COUNT : 0
}}</view>
<view class="bottomUnit">优惠券</view> <view class="bottomUnit">优惠券</view>
</view> </view>
</view> </view>
@ -78,7 +85,7 @@
> >
<view class="itemContent"> <view class="itemContent">
<view class="bottomValue">{{ <view class="bottomValue">{{
user.MEMBERSHIP_POINT || 0 user && user.MEMBERSHIP_POINT ? user.MEMBERSHIP_POINT : 0
}}</view> }}</view>
<view class="bottomUnit">积分</view> <view class="bottomUnit">积分</view>
</view> </view>
@ -98,14 +105,18 @@
class="bottomItem" class="bottomItem"
@click="isGo('/pages/homeFn/myCoupon/index')" @click="isGo('/pages/homeFn/myCoupon/index')"
> >
<view class="bottomValue">{{ user.COUPON_COUNT || 0 }}</view> <view class="bottomValue">{{
user && user.COUPON_COUNT ? user.COUPON_COUNT : 0
}}</view>
<view class="bottomUnit">优惠券</view> <view class="bottomUnit">优惠券</view>
</view> </view>
<view <view
class="bottomItem" class="bottomItem"
@click="isGo('/pages/homeFn/integral/index')" @click="isGo('/pages/homeFn/integral/index')"
> >
<view class="bottomValue">{{ user.MEMBERSHIP_POINT || 0 }}</view> <view class="bottomValue">{{
user && user.MEMBERSHIP_POINT ? user.MEMBERSHIP_POINT : 0
}}</view>
<view class="bottomUnit">积分</view> <view class="bottomUnit">积分</view>
</view> </view>
</view> </view>
@ -150,16 +161,8 @@
:key="index" :key="index"
@click="handleOther(item)" @click="handleOther(item)"
> >
<image <image class="orderIcon" :src="item.url" />
v-if="loginType === 'min' && item.value !== 4" <text class="orderText">{{ item.label || "" }}</text>
class="orderIcon"
:src="item.url"
/>
<text
v-if="loginType === 'min' && item.value !== 4"
class="orderText"
>{{ item.label || "" }}</text
>
</view> </view>
</view> </view>
</view> </view>
@ -195,14 +198,26 @@
> >
<image <image
class="headerImg" class="headerImg"
:src="WXProfile || user.MEMBERSHIP_HEADIMAGEURL" :src="
WXProfile || (user && user.MEMBERSHIP_HEADIMAGEURL)
? user.MEMBERSHIP_HEADIMAGEURL
: ''
"
/> />
</button> </button>
</div> </div>
<div class="userDetail" @click="goRegister()"> <div class="userDetail" @click="goRegister()">
<div class="userName">{{ user.MEMBERSHIP_NAME || "游客" }}</div> <div class="userName">
{{
user && user.MEMBERSHIP_NAME
? user.MEMBERSHIP_NAME
: "游客" || ""
}}
</div>
<span class="identity">{{ <span class="identity">{{
user.MEMBERSHIP_LEVEL_TEXT || "" user && user.MEMBERSHIP_LEVEL_TEXT
? user.MEMBERSHIP_LEVEL_TEXT
: ""
}}</span> }}</span>
</div> </div>
</div> </div>
@ -222,14 +237,18 @@
@click="isGo('/pages/homeFn/myCoupon/index')" @click="isGo('/pages/homeFn/myCoupon/index')"
> >
<div class="propertyLabel">优惠券</div> <div class="propertyLabel">优惠券</div>
<div class="propertyValue">{{ user.COUPON_COUNT || 0 }}</div> <div class="propertyValue">
{{ user && user.COUPON_COUNT ? user.COUPON_COUNT : 0 }}
</div>
</div> </div>
<div <div
class="propertyItem" class="propertyItem"
@click="isGo('/pages/homeFn/integral/index')" @click="isGo('/pages/homeFn/integral/index')"
> >
<div class="propertyLabel">积分</div> <div class="propertyLabel">积分</div>
<div class="propertyValue">{{ user.MEMBERSHIP_POINT || 0 }}</div> <div class="propertyValue">
{{ user && user.MEMBERSHIP_POINT ? user.MEMBERSHIP_POINT : 0 }}
</div>
</div> </div>
<!-- <div <!-- <div
class="propertyItem" class="propertyItem"
@ -318,7 +337,7 @@
</div> </div>
<UniPopup <UniPopup
:show="isShowPop && !user.MEMBERSHIP_MOBILEPHONE" :show="isShowPop && !user && !user.MEMBERSHIP_MOBILEPHONE"
@close="isShowPop = false" @close="isShowPop = false"
custom-style="border-radius: 24rpx;" custom-style="border-radius: 24rpx;"
> >
@ -396,7 +415,7 @@ export default {
user: "user", user: "user",
}), }),
phone() { phone() {
if (this.user.MEMBERSHIP_MOBILEPHONE) { if (this.user && this.user.MEMBERSHIP_MOBILEPHONE) {
let a = this.user.MEMBERSHIP_MOBILEPHONE.substring(0, 3); let a = this.user.MEMBERSHIP_MOBILEPHONE.substring(0, 3);
let b = this.user.MEMBERSHIP_MOBILEPHONE.substring(7, 11); let b = this.user.MEMBERSHIP_MOBILEPHONE.substring(7, 11);
return a + "****" + b; return a + "****" + b;
@ -474,26 +493,26 @@ export default {
// }, // },
], ],
otherList: [ otherList: [
{ // {
label: "我的地址", // label: "",
value: 1, // value: 1,
url: "https://eshangtech.com/wanmeiyizhanImg/home/addressManager.svg", // url: "https://eshangtech.com/wanmeiyizhanImg/home/addressManager.svg",
}, // },
{ // {
label: "客户服务", // label: "",
value: 2, // value: 2,
url: "https://eshangtech.com/wanmeiyizhanImg/home/customerServiceIcon.svg", // url: "https://eshangtech.com/wanmeiyizhanImg/home/customerServiceIcon.svg",
}, // },
{ // {
label: "服务热线", // label: "线",
value: 3, // value: 3,
url: "https://eshangtech.com/wanmeiyizhanImg/home/hostPhone.svg", // url: "https://eshangtech.com/wanmeiyizhanImg/home/hostPhone.svg",
}, // },
{ // {
label: "账户设置", // label: "",
value: 4, // value: 4,
url: "https://eshangtech.com/wanmeiyizhanImg/home/userConfig.svg", // url: "https://eshangtech.com/wanmeiyizhanImg/home/userConfig.svg",
}, // },
], ],
toDayHaveSign: false, // toDayHaveSign: false, //
}; };
@ -518,18 +537,69 @@ export default {
let systemInfo = uni.getSystemInfoSync(); let systemInfo = uni.getSystemInfoSync();
if (type === "min") { if (type === "min") {
this.menu = uni.getMenuButtonBoundingClientRect(); this.menu = uni.getMenuButtonBoundingClientRect();
this.otherList = [
{
label: "我的地址",
value: 1,
url: "https://eshangtech.com/wanmeiyizhanImg/home/addressManager.svg",
},
{
label: "客户服务",
value: 2,
url: "https://eshangtech.com/wanmeiyizhanImg/home/customerServiceIcon.svg",
},
{
label: "服务热线",
value: 3,
url: "https://eshangtech.com/wanmeiyizhanImg/home/hostPhone.svg",
},
];
} else { } else {
this.menu = systemInfo.safeArea; this.menu = systemInfo.safeArea;
this.otherList = [
{
label: "我的地址",
value: 1,
url: "https://eshangtech.com/wanmeiyizhanImg/home/addressManager.svg",
},
{
label: "客户服务",
value: 2,
url: "https://eshangtech.com/wanmeiyizhanImg/home/customerServiceIcon.svg",
},
{
label: "服务热线",
value: 3,
url: "https://eshangtech.com/wanmeiyizhanImg/home/hostPhone.svg",
},
{
label: "账户设置",
value: 4,
url: "https://eshangtech.com/wanmeiyizhanImg/home/userConfig.svg",
},
];
} }
console.log("this.menu", this.menu); console.log("this.menu", this.menu);
}, },
onShow() { onShow() {
let type = uni.getStorageSync("loginType"); console.log("this.user", this.user);
if (type !== "min") { if (type !== "min") {
uni.hideTabBar({ uni.hideTabBar({
animation: false, animation: false,
}); });
} }
let type = uni.getStorageSync("loginType");
if ((this.user && !this.user.MEMBERSHIP_ID) || !this.user) {
if (this.loginType === "min") {
uni.navigateTo({ url: "/pages/register/index" });
} else {
uni.navigateTo({ url: "/pages/login/index" });
}
}
if (this.user) {
let signTime = uni.getStorageSync("signTime"); let signTime = uni.getStorageSync("signTime");
if (signTime) { if (signTime) {
signTime = new Date(signTime).getTime(); signTime = new Date(signTime).getTime();
@ -537,8 +607,6 @@ export default {
signTime = 0; signTime = 0;
} }
let now = new Date().getTime(); let now = new Date().getTime();
console.log("signTime", signTime);
console.log("now", now);
if (signTime < now) { if (signTime < now) {
this.toDayHaveSign = false; this.toDayHaveSign = false;
@ -546,18 +614,10 @@ export default {
this.toDayHaveSign = true; this.toDayHaveSign = true;
} }
if (!this.user.MEMBERSHIP_ID) {
if (this.loginType === "min") {
uni.navigateTo({ url: "/pages/register/index" });
} else {
uni.navigateTo({ url: "/pages/login/index" });
}
}
console.log("this.user", this.user);
this.getMember(); this.getMember();
this.getDistributionCount(); this.getDistributionCount();
this.handleGetUserInfo(); this.handleGetUserInfo();
}
}, },
onShareAppMessage() { onShareAppMessage() {
// let _this = this; // let _this = this;

View File

@ -4,31 +4,49 @@
<view class="configItem"> <view class="configItem">
<view class="itemLabel">修改手机号</view> <view class="itemLabel">修改手机号</view>
<view class="itemRight"> <view class="itemRight">
<text class="phoneText">{{ <text class="phoneText">{{ phone || "-" }}</text>
phone || "-" <image
}}</text> class="rightImg"
<image class="rightImg" src="https://eshangtech.com/wanmeiyizhanImg/home/rightArrow.svg" /> src="https://eshangtech.com/wanmeiyizhanImg/home/rightArrow.svg"
/>
</view> </view>
</view> </view>
<view class="configItem" v-if="loginType !== 'min'"> <view class="configItem" v-if="loginType !== 'min'">
<view class="itemLabel">切换账号</view> <view class="itemLabel">切换账号</view>
<view class="itemRight"> <view class="itemRight">
<image class="rightImg" src="https://eshangtech.com/wanmeiyizhanImg/home/rightArrow.svg" /> <image
class="rightImg"
src="https://eshangtech.com/wanmeiyizhanImg/home/rightArrow.svg"
/>
</view> </view>
</view> </view>
<view class="configItem" v-if="loginType !== 'min'" @click="handleDeleteUser"> <view
class="configItem"
v-if="loginType !== 'min'"
@click="handleDeleteUser"
>
<view class="itemLabel">注销账号</view> <view class="itemLabel">注销账号</view>
<view class="itemRight"> <view class="itemRight">
<image class="rightImg" src="https://eshangtech.com/wanmeiyizhanImg/home/rightArrow.svg" /> <image
class="rightImg"
src="https://eshangtech.com/wanmeiyizhanImg/home/rightArrow.svg"
/>
</view> </view>
</view> </view>
<view class="configItem" v-if="loginType !== 'min'" @click="handleGoPrivaity"> <view
class="configItem"
v-if="loginType !== 'min'"
@click="handleGoPrivaity"
>
<view class="itemLabel">隐私管理</view> <view class="itemLabel">隐私管理</view>
<view class="itemRight"> <view class="itemRight">
<image class="rightImg" src="https://eshangtech.com/wanmeiyizhanImg/home/rightArrow.svg" /> <image
class="rightImg"
src="https://eshangtech.com/wanmeiyizhanImg/home/rightArrow.svg"
/>
</view> </view>
</view> </view>
</view> </view>
@ -52,7 +70,7 @@ export default {
user: "user", user: "user",
}), }),
phone() { phone() {
if (this.user.MEMBERSHIP_MOBILEPHONE) { if (this.user && this.user.MEMBERSHIP_MOBILEPHONE) {
let a = this.user.MEMBERSHIP_MOBILEPHONE.substring(0, 3); let a = this.user.MEMBERSHIP_MOBILEPHONE.substring(0, 3);
let b = this.user.MEMBERSHIP_MOBILEPHONE.substring(7, 11); let b = this.user.MEMBERSHIP_MOBILEPHONE.substring(7, 11);
return a + "****" + b; return a + "****" + b;
@ -72,16 +90,43 @@ export default {
methods: { methods: {
// //
handleDeleteUser() { handleDeleteUser() {
this.$store.commit("setUser", undefined); console.log("handleDeleteUser");
uni.switchTab({ let _this = this;
url: '/pages/home/index', uni.showModal({
title: "确认注销账号?",
content: "注销账号后将永久丢失所有数据,此操作不可撤销",
confirmText: "确认",
success: (res) => {
if (res.confirm) {
// this.deleteAccount();
_this.$store.commit("setUser", null);
uni.setStorageSync("userInfo", null);
setTimeout(() => {
uni.showToast({
title: "注销成功!",
icon: "none",
}); });
uni.switchTab({
url: "/pages/home/newIndex",
});
}, 500);
}
},
});
// this.$store.commit("setUser", undefined);
// uni.switchTab({
// url: "/pages/home/index",
// });
}, },
// //
handleGoPrivaity() { handleGoPrivaity() {
uni.navigateTo({ url: `/pages/thirdParty/newPage?url=http://saas.eshangtech.com/iosyinsi.html` }); uni.navigateTo({
} url: `/pages/thirdParty/newPage?url=http://saas.eshangtech.com/iosyinsi.html`,
} });
},
},
}; };
</script> </script>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -26095,7 +26095,10 @@ function _handleGetNearThreeService() {
return _api.default.$get("/CommercialApi/BaseInfo/GetServerpartList", req); return _api.default.$get("/CommercialApi/BaseInfo/GetServerpartList", req);
case 16: case 16:
res = _context14.sent; res = _context14.sent;
data = res.Result_Data.List; // 最近的前三个的服务区 名称 data = res.Result_Data.List;
console.log('datadatadatadatadata', data);
// 最近的前三个的服务区 名称
nearThreeList = []; // 先存一下所有服务区的数据 nearThreeList = []; // 先存一下所有服务区的数据
allServiceList = []; allServiceList = [];
if (data && data.length > 0) { if (data && data.length > 0) {
@ -26124,7 +26127,7 @@ function _handleGetNearThreeService() {
// 最近的服务区数据 // 最近的服务区数据
nearService: data[0] nearService: data[0]
}); });
case 26: case 27:
case "end": case "end":
return _context14.stop(); return _context14.stop();
} }

View File

@ -670,7 +670,7 @@ var _default = {
} }
}, },
goDetail: function goDetail(id) { goDetail: function goDetail(id) {
if (this.user.MEMBERSHIP_MOBILEPHONE) { if (this.user && this.user.MEMBERSHIP_MOBILEPHONE) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/couponDetail/index?id=" + id url: "/pages/couponDetail/index?id=" + id
}); });
@ -690,7 +690,7 @@ var _default = {
}, },
goBuy: function goBuy(item) { goBuy: function goBuy(item) {
console.log("goBuy", item); console.log("goBuy", item);
if (this.user.MEMBERSHIP_MOBILEPHONE) { if (this.user && this.user.MEMBERSHIP_MOBILEPHONE) {
var id = item.SERVERPARTSHOP_IDS.split(",")[0]; var id = item.SERVERPARTSHOP_IDS.split(",")[0];
// let arr = { // let arr = {
// id: id // id: id

File diff suppressed because one or more lines are too long

View File

@ -181,7 +181,7 @@ var _default = {
user: "user" user: "user"
})), {}, { })), {}, {
phone: function phone() { phone: function phone() {
if (this.user.MEMBERSHIP_MOBILEPHONE) { if (this.user && this.user.MEMBERSHIP_MOBILEPHONE) {
var a = this.user.MEMBERSHIP_MOBILEPHONE.substring(0, 3); var a = this.user.MEMBERSHIP_MOBILEPHONE.substring(0, 3);
var b = this.user.MEMBERSHIP_MOBILEPHONE.substring(7, 11); var b = this.user.MEMBERSHIP_MOBILEPHONE.substring(7, 11);
return a + "****" + b; return a + "****" + b;
@ -256,23 +256,28 @@ var _default = {
// }, // },
], ],
otherList: [{ otherList: [
label: "我的地址", // {
value: 1, // label: "我的地址",
url: "https://eshangtech.com/wanmeiyizhanImg/home/addressManager.svg" // value: 1,
}, { // url: "https://eshangtech.com/wanmeiyizhanImg/home/addressManager.svg",
label: "客户服务", // },
value: 2, // {
url: "https://eshangtech.com/wanmeiyizhanImg/home/customerServiceIcon.svg" // label: "客户服务",
}, { // value: 2,
label: "服务热线", // url: "https://eshangtech.com/wanmeiyizhanImg/home/customerServiceIcon.svg",
value: 3, // },
url: "https://eshangtech.com/wanmeiyizhanImg/home/hostPhone.svg" // {
}, { // label: "服务热线",
label: "账户设置", // value: 3,
value: 4, // url: "https://eshangtech.com/wanmeiyizhanImg/home/hostPhone.svg",
url: "https://eshangtech.com/wanmeiyizhanImg/home/userConfig.svg" // },
}], // {
// label: "账户设置",
// value: 4,
// url: "https://eshangtech.com/wanmeiyizhanImg/home/userConfig.svg",
// },
],
toDayHaveSign: false // 今日是否已经签到了 toDayHaveSign: false // 今日是否已经签到了
}; };
}, },
@ -296,33 +301,50 @@ var _default = {
var systemInfo = uni.getSystemInfoSync(); var systemInfo = uni.getSystemInfoSync();
if (type === "min") { if (type === "min") {
this.menu = uni.getMenuButtonBoundingClientRect(); this.menu = uni.getMenuButtonBoundingClientRect();
this.otherList = [{
label: "我的地址",
value: 1,
url: "https://eshangtech.com/wanmeiyizhanImg/home/addressManager.svg"
}, {
label: "客户服务",
value: 2,
url: "https://eshangtech.com/wanmeiyizhanImg/home/customerServiceIcon.svg"
}, {
label: "服务热线",
value: 3,
url: "https://eshangtech.com/wanmeiyizhanImg/home/hostPhone.svg"
}];
} else { } else {
this.menu = systemInfo.safeArea; this.menu = systemInfo.safeArea;
this.otherList = [{
label: "我的地址",
value: 1,
url: "https://eshangtech.com/wanmeiyizhanImg/home/addressManager.svg"
}, {
label: "客户服务",
value: 2,
url: "https://eshangtech.com/wanmeiyizhanImg/home/customerServiceIcon.svg"
}, {
label: "服务热线",
value: 3,
url: "https://eshangtech.com/wanmeiyizhanImg/home/hostPhone.svg"
}, {
label: "账户设置",
value: 4,
url: "https://eshangtech.com/wanmeiyizhanImg/home/userConfig.svg"
}];
} }
console.log("this.menu", this.menu); console.log("this.menu", this.menu);
}, },
onShow: function onShow() { onShow: function onShow() {
var type = uni.getStorageSync("loginType"); console.log("this.user", this.user);
if (type !== "min") { if (type !== "min") {
uni.hideTabBar({ uni.hideTabBar({
animation: false animation: false
}); });
} }
var signTime = uni.getStorageSync("signTime"); var type = uni.getStorageSync("loginType");
if (signTime) { if (this.user && !this.user.MEMBERSHIP_ID || !this.user) {
signTime = new Date(signTime).getTime();
} else {
signTime = 0;
}
var now = new Date().getTime();
console.log("signTime", signTime);
console.log("now", now);
if (signTime < now) {
this.toDayHaveSign = false;
} else {
this.toDayHaveSign = true;
}
if (!this.user.MEMBERSHIP_ID) {
if (this.loginType === "min") { if (this.loginType === "min") {
uni.navigateTo({ uni.navigateTo({
url: "/pages/register/index" url: "/pages/register/index"
@ -333,10 +355,23 @@ var _default = {
}); });
} }
} }
console.log("this.user", this.user); if (this.user) {
var signTime = uni.getStorageSync("signTime");
if (signTime) {
signTime = new Date(signTime).getTime();
} else {
signTime = 0;
}
var now = new Date().getTime();
if (signTime < now) {
this.toDayHaveSign = false;
} else {
this.toDayHaveSign = true;
}
this.getMember(); this.getMember();
this.getDistributionCount(); this.getDistributionCount();
this.handleGetUserInfo(); this.handleGetUserInfo();
}
}, },
onShareAppMessage: function onShareAppMessage() { onShareAppMessage: function onShareAppMessage() {
// let _this = this; // let _this = this;

File diff suppressed because one or more lines are too long

View File

@ -217,9 +217,9 @@ export async function handleGetNearThreeService() {
if (currentService && nearList && allService) { if (currentService && nearList && allService) {
return { return {
nearThreeList: nearList,// 最近的三个服务区的名称数组 nearThreeList: nearList, // 最近的三个服务区的名称数组
allServiceList: allService,// 全部服务区的数据 allServiceList: allService, // 全部服务区的数据
currentService: currentService,// 最近的服务区数据 currentService: currentService, // 最近的服务区数据
nearService: nearService nearService: nearService
} }
} else { } else {
@ -240,6 +240,8 @@ export async function handleGetNearThreeService() {
req req
); );
let data = res.Result_Data.List; let data = res.Result_Data.List;
console.log('datadatadatadatadata', data);
// 最近的前三个的服务区 名称 // 最近的前三个的服务区 名称
let nearThreeList = []; let nearThreeList = [];
// 先存一下所有服务区的数据 // 先存一下所有服务区的数据
@ -265,9 +267,9 @@ export async function handleGetNearThreeService() {
uni.setStorageSync("allServiceList", allServiceList); // 最近的三个服务区 uni.setStorageSync("allServiceList", allServiceList); // 最近的三个服务区
return { return {
nearThreeList: nearThreeList,// 最近的三个服务区的名称数组 nearThreeList: nearThreeList, // 最近的三个服务区的名称数组
allServiceList: allServiceList,// 全部服务区的数据 allServiceList: allServiceList, // 全部服务区的数据
currentService: data[0],// 最近的服务区数据 currentService: data[0], // 最近的服务区数据
nearService: data[0] nearService: data[0]
} }
} }