diff --git a/components/common-loading/common-loading.vue b/components/common-loading/common-loading.vue
index cc5542d..5ca3165 100644
--- a/components/common-loading/common-loading.vue
+++ b/components/common-loading/common-loading.vue
@@ -7,8 +7,10 @@
@tap.stop="noop"
>
+
{{ title }}
+ 请稍候,正在为你处理
@@ -63,7 +65,8 @@
align-items: center;
justify-content: center;
pointer-events: none;
- background: rgba(0, 0, 0, 0.18);
+ background: rgba(13, 18, 34, 0.46);
+ backdrop-filter: blur(16rpx);
}
.common-loading--mask {
@@ -71,29 +74,55 @@
}
.common-loading__box {
- min-width: 180rpx;
- min-height: 180rpx;
- padding: 34rpx 36rpx 30rpx;
- border-radius: 28rpx;
- background: rgba(255, 255, 255, 0.96);
- box-shadow: 0 18rpx 46rpx rgba(0, 0, 0, 0.16);
+ position: relative;
+ min-width: 280rpx;
+ min-height: 242rpx;
+ overflow: hidden;
+ padding: 44rpx 44rpx 36rpx;
+ border-radius: 40rpx;
+ background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(245,249,255,.96));
+ border: 1rpx solid rgba(255,255,255,.86);
+ box-shadow: 0 28rpx 82rpx rgba(28, 35, 74, 0.28);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
+ .common-loading__halo {
+ position: absolute;
+ top: -82rpx;
+ right: -74rpx;
+ width: 220rpx;
+ height: 220rpx;
+ border-radius: 50%;
+ background: rgba(169, 255, 231, .72);
+ }
+
.common-loading__gif {
+ position: relative;
width: 92rpx;
height: 92rpx;
}
.common-loading__text {
+ position: relative;
margin-top: 18rpx;
- max-width: 320rpx;
- font-size: 26rpx;
- line-height: 36rpx;
- color: #333;
+ max-width: 380rpx;
+ font-size: 28rpx;
+ line-height: 40rpx;
+ color: #11162a;
+ font-weight: 900;
+ white-space: pre-line;
+ text-align: center;
+ }
+
+ .common-loading__hint {
+ position: relative;
+ margin-top: 10rpx;
+ color: rgba(17, 22, 42, .48);
+ font-size: 22rpx;
+ line-height: 32rpx;
text-align: center;
}
diff --git a/components/ie-bottom-tab/ie-bottom-tab.vue b/components/ie-bottom-tab/ie-bottom-tab.vue
deleted file mode 100644
index f780e8c..0000000
--- a/components/ie-bottom-tab/ie-bottom-tab.vue
+++ /dev/null
@@ -1,155 +0,0 @@
-
-
- 请勿发送涉黄、涉暴、反动、侮辱等内容,违规会被封禁
-
-
- 🪐
- 此刻
-
-
- 💬
- 消息
- {{ unreadText }}
-
-
- 🌙
- 我的
-
-
-
-
-
-
-
-
diff --git a/components/tab-bar/delivery.vue b/components/tab-bar/delivery.vue
index 402b33d..d70a0b5 100644
--- a/components/tab-bar/delivery.vue
+++ b/components/tab-bar/delivery.vue
@@ -1,9 +1,10 @@
+
-
+
@@ -30,11 +31,14 @@
style="width: 80rpx;height: 14rpx;position: absolute;bottom: 4rpx;left: 32rpx;" />
-->
+
+
+
-
+
跑腿
- |
+ |
接单规则
-
- 刷新
-
已上线
@@ -201,20 +202,32 @@
用户申请退款中
-
-
+
+
+
+
+
+ 已到店
+
-
-
+
+
+
+
+ 已取货
+
+
+
+
+
+ 已送达
+
@@ -402,6 +415,10 @@
selectRuleList: [],
totalPages: 1,
paotuiRuleList: [],
+ loginRedirecting: false,
+ refreshLoading: false,
+ refreshLoadingStartTime: 0,
+ refreshLoadingTimer: null,
lineStatus: [{
title: '上线',
value: 0
@@ -422,6 +439,16 @@
onReachBottom() {
this.onReachPage();
},
+ beforeDestroy() {
+ if (this.refreshLoadingTimer) {
+ clearTimeout(this.refreshLoadingTimer)
+ this.refreshLoadingTimer = null
+ }
+ if (this.refreshLoading) {
+ this.refreshLoading = false
+ uni.hideLoading()
+ }
+ },
filters: {
formatHourMinute(value) {
if (!value) return '';
@@ -484,10 +511,38 @@
urls: [url]
});
},
+ ensureLogin() {
+ const token = uni.getStorageSync('hiver_token')
+ if (token && typeof token === 'string' && token.trim() && token !== 'null' && token !== 'undefined') {
+ return true
+ }
+ if (this.loginRedirecting) return false
+ this.loginRedirecting = true
+ const pages = getCurrentPages()
+ const current = pages && pages.length ? pages[pages.length - 1] : null
+ const route = current ? '/' + current.route : '/pages/index/index'
+ const query = current && current.options
+ ? Object.keys(current.options).map(key => key + '=' + encodeURIComponent(current.options[key])).join('&')
+ : ''
+ const target = route + (query ? '?' + query : '')
+ const redirectKey = 'login_redirect_' + Date.now()
+ uni.setStorageSync(redirectKey, target)
+ uni.navigateTo({
+ url: '/package2/login/login?redirect=' + redirectKey,
+ complete: () => {
+ setTimeout(() => {
+ this.loginRedirecting = false
+ }, 1200)
+ }
+ })
+ return false
+ },
init() {
+ if (!this.ensureLogin()) return
let worker = uni.getStorageSync('worker')
if (worker == '' || worker == undefined || worker == null) {
this.tui.toast('您还没有注册兼职')
+ return
}
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
this.isOnLine = uni.getStorageSync('worker').isOnLine
@@ -506,6 +561,7 @@
},
// 获取用户位置
getUserLocation(item) {
+ if (!this.ensureLogin()) return
let that = this;
uni.getLocation({
type: 'gcj02',
@@ -524,6 +580,7 @@
});
},
onReachPage() {
+ if (!this.ensureLogin()) return
if (this.isLoadingPage || this.searchForm.pageNum >= this.totalPages) return;
this.isLoadingPage = true;
this.searchForm.pageNum++;
@@ -554,6 +611,7 @@
})
},
chooseType(type) {
+ if (!this.ensureLogin()) return
if (this.tab1Checked1 == type) {
this.tab1Checked1 = ''
this.searchForm.deliveryType = null
@@ -587,6 +645,7 @@
return diffMs <= 0 || diffMs < 10 * 60 * 1000;
},
getDelivery() {
+ if (!this.ensureLogin()) return
let that = this
that.isLoadingPage = true;
this.tui.request("/mall/delivery/pagebyworker", "POST", this.searchForm, false, false).then((res) => {
@@ -613,11 +672,17 @@
that.$forceUpdate();
} else {
that.tui.toast(res.message);
- return;
}
- uni.hideLoading();
+ if (that.refreshLoading) {
+ that.finishRefreshLoading()
+ } else {
+ uni.hideLoading();
+ }
}).catch((res) => {
that.isLoadingPage = false;
+ if (that.refreshLoading) {
+ that.finishRefreshLoading()
+ }
});
},
//查看大图
@@ -686,6 +751,7 @@
workerRelaPriceList: this.selectRuleList,
getPushOrder: this.zhipaiCheck ? 1 : 0
};
+ if (!this.ensureLogin()) return
let that = this;
this.tui.request('/app/workerRelaPrice/batchUpdate', 'post', submitData).then(res => {
uni.hideLoading();
@@ -725,12 +791,18 @@
}
},
openPopup() {
+ if (!this.ensureLogin()) return
+ const worker = uni.getStorageSync('worker')
+ if (!worker || !worker.workerId) {
+ this.tui.toast('您还没有注册兼职')
+ return
+ }
if (this.isOnLine != 1) {
this.tui.toast('请先上线后配置');
return;
}
let that = this
- that.tui.request("/app/workerRelaPrice/getByWorkerId?workerId=" + uni.getStorageSync('worker').workerId,
+ that.tui.request("/app/workerRelaPrice/getByWorkerId?workerId=" + worker.workerId,
"GET", {}, false, true).then((res) => {
if (res.code == 200) {
if (res.result != null) {
@@ -793,6 +865,7 @@
this.isArea = !this.isArea
},
changeStatus(index, item, status) {
+ if (!this.ensureLogin()) return
let regionId = JSON.parse(uni.getStorageSync('area')).id
let url = ''
if (status == 2) {
@@ -857,6 +930,7 @@
}).catch((res) => {});
},
checkTab1(type) {
+ if (!this.ensureLogin()) return
this.tab1Checked = type
if (type == 'daiqu') {
this.searchForm.status = 1
@@ -868,16 +942,46 @@
this.getDelivery()
},
refreshCurrentTab() {
+ if (!this.ensureLogin()) return
+ if (this.refreshLoading) return
+ this.refreshLoading = true
+ this.refreshLoadingStartTime = Date.now()
+ if (this.refreshLoadingTimer) {
+ clearTimeout(this.refreshLoadingTimer)
+ this.refreshLoadingTimer = null
+ }
+ uni.showLoading({
+ title: '刷新中...',
+ mask: true
+ })
this.searchForm.pageNum = 1
this.scrollToTop()
this.getDelivery()
},
+ finishRefreshLoading() {
+ const elapsed = Date.now() - this.refreshLoadingStartTime
+ const delay = Math.max(1000 - elapsed, 0)
+ if (this.refreshLoadingTimer) {
+ clearTimeout(this.refreshLoadingTimer)
+ }
+ this.refreshLoadingTimer = setTimeout(() => {
+ this.refreshLoading = false
+ this.refreshLoadingTimer = null
+ uni.hideLoading()
+ }, delay)
+ },
makeCall(phone) {
uni.makePhoneCall({
phoneNumber: phone
});
},
changeOnline(value) {
+ if (!this.ensureLogin()) return
+ const worker = uni.getStorageSync('worker')
+ if (!worker || !worker.workerId) {
+ this.tui.toast('您还没有注册兼职')
+ return
+ }
let url = ''
if (this.isOnLine == value) {
if (value == 0) {
@@ -896,7 +1000,7 @@
}
this.tui.request(url, "POST", {
- id: uni.getStorageSync('worker').workerId
+ id: worker.workerId
}, false, true).then((res) => {
if (res.code == 200) {
let worker = uni.getStorageSync('worker') || {}; // 避免取不到时出错
@@ -968,6 +1072,49 @@
height: 60rpx;
}
+ .delivery-title-tabs {
+ width: 380rpx;
+ display: flex;
+ align-items: center;
+ }
+
+ .delivery-title-tabs .tab1 {
+ width: 260rpx;
+ flex-shrink: 0;
+ }
+
+ .title-refresh {
+ width: 58rpx;
+ height: 58rpx;
+ margin-left: 18rpx;
+ flex-shrink: 0;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border: 2rpx solid rgba(166, 255, 234, 0.88);
+ border-radius: 50%;
+ background: rgba(255, 255, 255, 0.7);
+ box-shadow: 0 8rpx 20rpx rgba(0, 35, 28, 0.08);
+ }
+
+ .title-refresh:active {
+ opacity: 0.75;
+ }
+
+ .title-refresh--loading {
+ animation: refresh-rotate 0.8s linear infinite;
+ }
+
+ @keyframes refresh-rotate {
+ 0% {
+ transform: rotate(0deg);
+ }
+
+ 100% {
+ transform: rotate(360deg);
+ }
+ }
+
.tab1 {
height: 60rpx;
line-height: 60rpx;
@@ -982,6 +1129,22 @@
flex: 1;
}
+ .delivery-filter-row {
+ width: 95%;
+ height: 72rpx;
+ margin: -200rpx auto 0;
+ display: flex;
+ align-items: center;
+ line-height: 64rpx;
+ }
+
+ .filter-divider {
+ flex-shrink: 0;
+ padding: 0 14rpx 0 2rpx;
+ color: rgba(0, 35, 28, 0.72);
+ font-weight: 700;
+ }
+
.content {
flex: 1;
width: 95%;
@@ -1094,6 +1257,64 @@
font-weight: 700;
}
+ .order-action {
+ width: 100%;
+ height: 104rpx;
+ margin-top: 32rpx;
+ }
+
+ .order-action-btn {
+ position: relative;
+ width: 100%;
+ height: 96rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ overflow: hidden;
+ border-radius: 48rpx;
+ color: #fff;
+ font-size: 34rpx;
+ font-weight: 900;
+ letter-spacing: 2rpx;
+ box-shadow: 0 14rpx 30rpx rgba(0, 70, 58, 0.18);
+ }
+
+ .order-action-btn::before {
+ content: '';
+ position: absolute;
+ top: 0;
+ left: -20%;
+ width: 56%;
+ height: 100%;
+ background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0));
+ transform: skewX(-18deg);
+ }
+
+ .order-action-btn:active {
+ transform: scale(0.98);
+ opacity: 0.9;
+ }
+
+ .order-action-btn--arrive,
+ .order-action-btn--pickup,
+ .order-action-btn--complete {
+ background:
+ radial-gradient(circle at 88% 45%, rgba(166, 255, 234, 0.52) 0, rgba(166, 255, 234, 0) 120rpx),
+ linear-gradient(90deg, #07372f 0%, #005849 52%, #0aa385 100%);
+ }
+
+ .order-action-icon {
+ position: relative;
+ width: 52rpx;
+ height: 52rpx;
+ margin-right: 12rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border-radius: 50%;
+ background: rgba(255, 255, 255, 0.18);
+ }
+
.guize-list {
width: 600rpx;
padding: 20rpx 20rpx 0;
@@ -1230,45 +1451,44 @@
}
.shangxia-btn {
- width: 132rpx;
- height: 50rpx;
- background-size: 100%;
+ width: 150rpx;
+ height: 64rpx;
+ line-height: 64rpx;
+ flex-shrink: 0;
+ background-size: 132rpx 50rpx;
+ background-position: center;
font-size: 20rpx;
font-weight: 700;
+ box-sizing: border-box;
}
.guize-box {
font-size: 20rpx;
font-weight: 700;
background: rgba(166, 255, 234, 1);
- width: 140rpx;
- height: 50rpx;
- border-radius: 50rpx;
- margin-right: 15rpx;
- padding-left: 10rpx;
- }
-
- .refresh-box {
- font-size: 20rpx;
- font-weight: 700;
- background: rgba(223, 255, 176, 1);
- color: #0b6b5a;
- width: 90rpx;
- height: 50rpx;
+ width: 132rpx;
+ height: 64rpx;
+ line-height: 64rpx;
border-radius: 50rpx;
- margin-right: 15rpx;
+ margin-right: 12rpx;
+ padding: 0 4rpx;
text-align: center;
+ box-sizing: border-box;
+ flex-shrink: 0;
}
.guize-box1 {
font-size: 20rpx;
font-weight: 700;
text-align: center;
- width: 140rpx;
- height: 50rpx;
+ width: 110rpx;
+ height: 64rpx;
+ line-height: 64rpx;
border-radius: 50rpx;
- margin-right: 15rpx;
- padding-left: 10rpx;
+ margin-right: 12rpx;
+ padding: 0 4rpx;
+ box-sizing: border-box;
+ flex-shrink: 0;
}
.product-popup-content {
diff --git a/components/tab-bar/tab-bar.vue b/components/tab-bar/tab-bar.vue
index 62aadac..56d33c2 100644
--- a/components/tab-bar/tab-bar.vue
+++ b/components/tab-bar/tab-bar.vue
@@ -2,13 +2,13 @@
- {{indexZhipaiCount}}
+ {{formatBadgeCount(indexZhipaiCount)}}
- {{indexWorkerCount}}
+ {{formatBadgeCount(indexWorkerCount)}}
- {{indexMyCount}}
+ {{formatBadgeCount(indexMyCount)}}
@@ -88,8 +88,27 @@
}
},
methods: {
+ hasLogin() {
+ const token = uni.getStorageSync('hiver_token')
+ return !!(token && typeof token === 'string' && token.trim() && token !== 'null' && token !== 'undefined')
+ },
+ goLogin(index) {
+ const redirectKey = 'login_redirect_' + Date.now()
+ uni.setStorageSync(redirectKey, '/pages/index/index?tabIndex=' + index)
+ uni.navigateTo({
+ url: '/package2/login/login?redirect=' + redirectKey
+ })
+ },
+ formatBadgeCount(count) {
+ const value = Number(count) || 0
+ return value > 99 ? '99+' : value
+ },
//点击tab切换
clickBar(index) {
+ if (index !== 0 && !this.hasLogin()) {
+ this.goLogin(index)
+ return
+ }
for (let i = 0; i < this.tabList.length; i++) {
if (index == i) {
@@ -208,18 +227,27 @@
flex: 1;
position: relative;
}
- .red-dot{
- width: 15px;
- height: 15px;
- border-radius: 15px;
- line-height: 15px;
- text-align: center;
- color: #fff;
+ .red-dot {
position: absolute;
- top: 5px;
- right: 10px;
- background: red;
- font-size: 10px;
+ top: 10rpx;
+ right: 24rpx;
+ z-index: 2;
+ min-width: 34rpx;
+ height: 34rpx;
+ padding: 0 10rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border-radius: 999rpx;
+ box-sizing: border-box;
+ text-align: center;
+ color: #ffffff;
+ background: linear-gradient(135deg, #ff8a1f 0%, #ff3f5f 100%);
+ border: 4rpx solid rgba(255, 255, 255, 0.96);
+ box-shadow: 0 8rpx 18rpx rgba(255, 63, 95, 0.34);
+ font-size: 20rpx;
+ font-weight: 900;
+ font-family: Arial, 'PingFang SC', sans-serif;
}
.img-box {