wangfukang 2 days ago
parent
commit
66f67678ab
  1. 17
      package1/address/addressList.vue
  2. 21
      package1/ieBrowser/messages.vue
  3. 10
      package1/index/deliveryPersonList.vue
  4. 132
      package1/tabbar/fishRelease.vue
  5. 1458
      package1/tabbar/release.vue

17
package1/address/addressList.vue

@ -65,8 +65,8 @@
<text>设为默认地址</text>
<switch :checked="addressForm.isDefault === 1" @change="e => addressForm.isDefault = e.detail.value ? 1 : 0" color="#a6ffea" />
</view>
<view class="bottom-btn" @tap="submitAddress" style="position: relative; margin-top: 40rpx;">
确认
<view class="bottom-btn" :class="{'bottom-btn--disabled': addressSubmitting}" @tap="submitAddress" style="position: relative; margin-top: 40rpx;">
{{addressSubmitting ? '提交中...' : '确认'}}
</view>
</view>
</uni-popup>
@ -139,7 +139,8 @@
receiverName: '',
receiverPhone: '',
isDefault: 0
}
},
addressSubmitting: false
}
},
created() {
@ -304,6 +305,7 @@
return nextValue;
},
submitAddress() {
if (this.addressSubmitting) return;
if(this.areaTitleInput) {
let match = this.areaList.find(a => a.title === this.areaTitleInput);
if (match) {
@ -330,6 +332,7 @@
let url = this.addressForm.id ? "/app/userAddress/edit" : "/app/userAddress/save";
let that = this;
this.addressForm.userId = uni.getStorageSync('id')
this.addressSubmitting = true;
that.tui.request(url, "POST", this.addressForm, false, true).then((res) => {
if (res.code == 200) {
that.tui.toast("保存成功",1000);
@ -338,7 +341,9 @@
} else {
that.tui.toast(res.message,1000);
}
}).catch(() => {});
}).catch(() => {}).finally(() => {
that.addressSubmitting = false;
});
},
deleteAddress(id) {
let that = this;
@ -460,6 +465,10 @@
z-index: 20;
}
.bottom-btn--disabled {
opacity: 0.65;
}
.address-popup-box--page>.bottom-btn {
left: 5%;
}

21
package1/ieBrowser/messages.vue

@ -32,8 +32,15 @@
</view>
<view class="tag soft" v-if="item.remeet">再遇见</view>
</view>
<view class="room-card skeleton-card" v-if="loading && !requests.length" v-for="skeleton in skeletonList" :key="skeleton.id">
<view class="skeleton-avatar"></view>
<view class="main">
<view class="skeleton-line name-line"></view>
<view class="skeleton-line desc-line"></view>
</view>
</view>
<view class="empty" v-if="!loading && !requests.length">没有未完成的关系也是一种轻松</view>
<view class="empty" v-else>{{ loading ? '正在加载...' : (hasMore ? '上滑加载更多' : '没有更多消息了') }}</view>
<view class="empty" v-else-if="requests.length">{{ loading ? '正在加载...' : (hasMore ? '上滑加载更多' : '没有更多消息了') }}</view>
<ie-bottom-tab active="messages" :unread-count="unreadCount"></ie-bottom-tab>
@ -71,6 +78,12 @@
hasMore: true,
loading: false,
loadedOnce: false,
skeletonList: [
{ id: 'skeleton-1' },
{ id: 'skeleton-2' },
{ id: 'skeleton-3' },
{ id: 'skeleton-4' }
],
deleteDialogVisible: false,
deleteTarget: null,
deleting: false
@ -247,6 +260,11 @@
.pulse, .avatar, .avatar-img { width: 78rpx; height: 78rpx; border-radius: 50%; }
.avatar { text-align: center; line-height: 78rpx; background: #a9ffe7; color: #11162a; font-weight: 800; }
.unread-badge { position: absolute; right: -8rpx; top: -8rpx; min-width: 30rpx; height: 30rpx; line-height: 30rpx; padding: 0 8rpx; border-radius: 999rpx; text-align: center; color: #fff; background: #ff8fa3; border: 3rpx solid rgba(255,255,255,.96); box-shadow: 0 8rpx 18rpx rgba(255,143,163,.26); font-size: 18rpx; font-weight: 800; box-sizing: border-box; }
.skeleton-card { pointer-events: none; }
.skeleton-avatar { flex-shrink: 0; width: 78rpx; height: 78rpx; margin-right: 20rpx; border-radius: 50%; background: linear-gradient(90deg, rgba(215,225,246,.55), rgba(255,255,255,.86), rgba(215,225,246,.55)); background-size: 220% 100%; animation: skeletonShimmer 1.2s ease-in-out infinite; }
.skeleton-line { height: 26rpx; border-radius: 999rpx; background: linear-gradient(90deg, rgba(215,225,246,.55), rgba(255,255,255,.86), rgba(215,225,246,.55)); background-size: 220% 100%; animation: skeletonShimmer 1.2s ease-in-out infinite; }
.name-line { width: 220rpx; }
.desc-line { width: 420rpx; max-width: 86%; margin-top: 18rpx; }
.pulse { animation: breath 2.4s ease-in-out infinite; }
.main { flex: 1; }
.name { font-size: 29rpx; font-weight: 800; }
@ -269,6 +287,7 @@
.delete-btn.danger { color: #fff; background: linear-gradient(135deg, #ff8ba0, #e85d75); box-shadow: 0 18rpx 38rpx rgba(232,93,117,.22); }
.delete-btn.disabled { opacity: .62; }
@keyframes breath { 0%, 100% { transform: scale(.9); opacity: .65; } 50% { transform: scale(1.04); opacity: 1; } }
@keyframes skeletonShimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@keyframes streakBlink { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes dialogUp { from { transform: translateY(36rpx); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
</style>

10
package1/index/deliveryPersonList.vue

@ -190,8 +190,12 @@
let amount = parseFloat(value);
return isNaN(amount) ? 0 : amount;
},
ceilAmount(value) {
let amount = this.toAmount(value);
return Math.ceil((amount - Number.EPSILON) * 100) / 100;
},
formatAmount(value) {
let amount = Math.ceil(this.toAmount(value) * 100) / 100;
let amount = this.ceilAmount(value);
return amount.toFixed(2).replace(/\.?0+$/, '');
},
getWorkerCommission(worker) {
@ -200,14 +204,14 @@
if (this.isHighFloorAddress) {
commission += this.toAmount(worker.highFloorFee);
}
return Math.ceil(commission * 100) / 100;
return this.ceilAmount(commission);
},
getCommissionDiff(worker) {
if (!this.hasCommissionAmount || !worker) return 0;
let currentAmount = this.toAmount(this.commissionAmount);
let workerAmount = this.getWorkerCommission(worker);
let diff = workerAmount - currentAmount;
return diff > 0 ? Math.ceil(diff * 100) / 100 : 0;
return diff > 0 ? this.ceilAmount(diff) : 0;
},
normalizeWorkerCommission(worker) {
if (!worker) return worker;

132
package1/tabbar/fishRelease.vue

@ -1,4 +1,5 @@
<template>
<page-meta :page-style="officialAccountPopupVisible ? 'overflow: hidden;' : 'overflow: visible;'"></page-meta>
<view class="release-page">
<view class="header" :style="{ paddingTop: statusBarTop + 'px' }">
<view class="back" @tap="back">
@ -101,6 +102,22 @@
<view class="audit-desc">发布内容正在提交审核请勿重复点击</view>
</view>
</view>
<view class="official-account-mask" v-if="officialAccountPopupVisible" @tap="closeOfficialAccountPopup">
<view class="official-account-card" @tap.stop>
<view class="official-account-close" @tap="closeOfficialAccountPopup">×</view>
<view class="official-account-title">关注公众号</view>
<view class="official-account-desc">关注后有新的咨询会及时通知你</view>
<image
show-menu-by-longpress
class="official-account-qr"
:src="officialAccountQr"
mode="aspectFill"
@tap="previewOfficialAccountQr"
></image>
<view class="official-account-tip">长按二维码识别关注</view>
<view class="official-account-btn" @tap="closeOfficialAccountPopup">知道了</view>
</view>
</view>
<ie-auth-dialog />
</view>
</template>
@ -138,6 +155,9 @@
submitLocked: false,
keyboardOpen: false,
auditTitle: '提交中,等待审核',
officialAccountPopupVisible: false,
officialAccountQr: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/d23a9043a8c24731831ec4db909fe3b4.jpg',
officialAccountResolve: null,
editorIns: null,
editorToolbarConfig: {
keys: ['bold', 'italic', 'underline', 'header', 'listOrdered', 'listBullet', 'align', 'image', 'removeFormat', 'clear'],
@ -506,7 +526,9 @@
if (res) {
submitSuccess = true
this.auditTitle = this.isEdit ? '保存成功,等待审核' : '提交成功,等待审核'
setTimeout(() => uni.navigateBack(), 800)
this.submitting = false
await this.handlePublishOfficialAccount(res)
setTimeout(() => uni.navigateBack(), 300)
}
} finally {
if (!submitSuccess) {
@ -515,6 +537,36 @@
}
}
},
handlePublishOfficialAccount(result) {
const user = result && result.user ? result.user : null
if (user) {
uni.setStorageSync('officialAccountOpenid', user.officialAccountOpenid || '')
}
const officialAccountOpenid = user ? user.officialAccountOpenid : uni.getStorageSync('officialAccountOpenid')
if (officialAccountOpenid) {
return Promise.resolve()
}
return this.openOfficialAccountPopup()
},
openOfficialAccountPopup() {
return new Promise((resolve) => {
this.officialAccountResolve = resolve
this.officialAccountPopupVisible = true
})
},
closeOfficialAccountPopup() {
this.officialAccountPopupVisible = false
if (this.officialAccountResolve) {
this.officialAccountResolve()
this.officialAccountResolve = null
}
},
previewOfficialAccountQr() {
uni.previewImage({
current: this.officialAccountQr,
urls: [this.officialAccountQr]
})
},
fishAuthDialogOptions() {
return {
badge: '校园二手',
@ -860,6 +912,84 @@
line-height: 34rpx;
}
.official-account-mask {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 1300;
display: flex;
align-items: center;
justify-content: center;
padding: 40rpx;
background: rgba(12, 31, 25, 0.46);
box-sizing: border-box;
}
.official-account-card {
position: relative;
width: 590rpx;
padding: 46rpx 42rpx 38rpx;
border-radius: 36rpx;
background: #fff;
text-align: center;
box-shadow: 0 26rpx 64rpx rgba(19, 70, 54, 0.22);
box-sizing: border-box;
}
.official-account-close {
position: absolute;
right: 22rpx;
top: 18rpx;
width: 54rpx;
height: 54rpx;
line-height: 50rpx;
border-radius: 50%;
color: #8b9b96;
font-size: 44rpx;
}
.official-account-title {
color: #17362f;
font-size: 34rpx;
font-weight: 900;
}
.official-account-desc {
margin-top: 12rpx;
color: #6f817c;
font-size: 24rpx;
line-height: 36rpx;
}
.official-account-qr {
width: 330rpx;
height: 330rpx;
margin: 30rpx auto 0;
display: block;
border-radius: 24rpx;
background: #f5f8f6;
}
.official-account-tip {
margin-top: 18rpx;
color: #1a9a72;
font-size: 24rpx;
font-weight: 800;
}
.official-account-btn {
height: 78rpx;
margin-top: 30rpx;
border-radius: 42rpx;
background: linear-gradient(135deg, #37c990, #19af7e);
color: #fff;
font-size: 28rpx;
font-weight: 900;
line-height: 78rpx;
}
@keyframes audit-bounce {
0%,
80%,

1458
package1/tabbar/release.vue

File diff suppressed because it is too large
Loading…
Cancel
Save