From b1594ee24ed88960b4c8624ad38789b54d38ed92 Mon Sep 17 00:00:00 2001
From: wangfukang <15630117759@163.com>
Date: Wed, 29 Jul 2026 17:09:35 +0800
Subject: [PATCH] 1
---
package1/address/addressList.vue | 28 +-
package1/buyFood/buyFood.vue | 22 +-
package1/campus/campusChat.vue | 236 +++++++++++++++
package1/campus/campusRelease.vue | 475 ++++++++++++++++++++++++++++++
package1/ieBrowser/chat.vue | 161 +++++++---
package1/ieBrowser/index.vue | 6 +-
package1/order/orderDetail.vue | 61 ++--
package1/order/returnOrder.vue | 14 +-
package1/post/postDetail.vue | 421 +++++++++++++++++++++++++-
package1/runErrand/runErrand.vue | 22 +-
package1/tabbar/fishRelease.vue | 74 ++++-
package1/tabbar/release.vue | 73 ++++-
12 files changed, 1508 insertions(+), 85 deletions(-)
create mode 100644 package1/campus/campusChat.vue
create mode 100644 package1/campus/campusRelease.vue
diff --git a/package1/address/addressList.vue b/package1/address/addressList.vue
index b794927..18ce30f 100644
--- a/package1/address/addressList.vue
+++ b/package1/address/addressList.vue
@@ -132,6 +132,7 @@
areaSearchInput: '',
addressForm: {
id: '',
+ regionId: '',
areaId: '',
areaName: '',
floor: '',
@@ -183,9 +184,23 @@
}
},
methods: {
+ getCurrentRegionId() {
+ try {
+ const area = uni.getStorageSync('area');
+ if (!area) return '';
+ if (typeof area === 'object') return area.id ? String(area.id) : '';
+ const areaInfo = JSON.parse(area);
+ return areaInfo.id ? String(areaInfo.id) : '';
+ } catch (e) {
+ return '';
+ }
+ },
getAddressList() {
let that = this;
- that.tui.request("/app/userAddress/list", "GET", {userId:uni.getStorageSync('id')}, false, true).then((res) => {
+ that.tui.request("/app/userAddress/list", "GET", {
+ userId: uni.getStorageSync('id'),
+ regionId: this.getCurrentRegionId()
+ }, false, true).then((res) => {
if (res.code == 200) {
that.addressList = res.result || [];
that.syncCache();
@@ -217,7 +232,12 @@
if (this.areaListLoaded || this.areaListLoading) return Promise.resolve(this.areaList);
this.areaListLoading = true;
let that = this;
- return that.tui.request("/app/shopArea/getByParentId/"+JSON.parse(uni.getStorageSync('area')).id, "GET", {}, false, true).then((res) => {
+ const regionId = this.getCurrentRegionId();
+ if (!regionId) {
+ this.areaListLoading = false;
+ return Promise.resolve([]);
+ }
+ return that.tui.request("/app/shopArea/getByParentId/"+regionId, "GET", {}, false, true).then((res) => {
if (res.code == 200 && res.result) {
that.$emit('shopAreaList',res.result)
that.areaList = res.result;
@@ -235,6 +255,7 @@
openAdd() {
this.addressForm = {
id: '',
+ regionId: this.getCurrentRegionId(),
areaId: '',
areaName: '',
floor: '',
@@ -251,6 +272,7 @@
openEdit(item) {
this.addressForm = {
id: item.id,
+ regionId: item.regionId || this.getCurrentRegionId(),
areaId: item.areaId,
areaName: item.areaName || '',
floor: item.floor || '',
@@ -332,6 +354,8 @@
let url = this.addressForm.id ? "/app/userAddress/edit" : "/app/userAddress/save";
let that = this;
this.addressForm.userId = uni.getStorageSync('id')
+ this.addressForm.regionId = this.getCurrentRegionId()
+ if(!this.addressForm.regionId) return this.tui.toast('请先选择校区');
this.addressSubmitting = true;
that.tui.request(url, "POST", this.addressForm, false, true).then((res) => {
if (res.code == 200) {
diff --git a/package1/buyFood/buyFood.vue b/package1/buyFood/buyFood.vue
index bb87368..4d2bf05 100644
--- a/package1/buyFood/buyFood.vue
+++ b/package1/buyFood/buyFood.vue
@@ -968,20 +968,38 @@
const seconds = String(date.getSeconds()).padStart(2, '0');
return `${year}-${month}-${day}T${hours}:${minutes}:${seconds}`;
},
+ getCurrentRegionId() {
+ try {
+ const area = uni.getStorageSync('area');
+ if (!area) return '';
+ if (typeof area === 'object') return area.id ? String(area.id) : '';
+ const areaInfo = JSON.parse(area);
+ return areaInfo.id ? String(areaInfo.id) : '';
+ } catch (e) {
+ return '';
+ }
+ },
initAddress() {
let cachedAddress = uni.getStorageSync('selectedAddress');
- if (cachedAddress) {
+ const regionId = this.getCurrentRegionId();
+ if (cachedAddress && String(cachedAddress.regionId || '') === regionId) {
this.formData.address = cachedAddress;
} else {
+ if (cachedAddress) {
+ uni.removeStorageSync('selectedAddress');
+ }
let that = this;
that.tui.request("/app/userAddress/list", "GET", {
- userId: uni.getStorageSync('id')
+ userId: uni.getStorageSync('id'),
+ regionId: regionId
}, false, true).then((res) => {
if (res.code == 200 && res.result && res.result.length > 0) {
// Find default address or use the first one
let target = res.result.find(item => item.isDefault == 1) || res.result[0];
that.formData.address = target;
uni.setStorageSync('selectedAddress', target);
+ } else {
+ that.formData.address = null;
}
}).catch(() => {});
}
diff --git a/package1/campus/campusChat.vue b/package1/campus/campusChat.vue
new file mode 100644
index 0000000..9f1a162
--- /dev/null
+++ b/package1/campus/campusChat.vue
@@ -0,0 +1,236 @@
+
+
+
+
+
+ 校园圈聊天
+ 文字和图片会进行内容审核
+
+
+
+
+
+ 圈
+
+ {{session.displayTitle || '校园圈内容'}}
+ {{session.postType === 'partner' ? '找搭子' : '校园墙'}}
+
+ 查看 ›
+
+
+
+ 加载中...
+ 请勿发送涉黄涉暴、辱骂诈骗等内容,审核未通过的消息不会送达对方。
+
+ {{item.mine ? '我' : 'TA'}}
+
+ {{item.content}}
+
+
+
+ {{statusText(item)}}
+
+
+
+
+
+
+
+
+ {{sending ? '发送中' : '发送'}}
+
+
+
+
+
+
+
diff --git a/package1/campus/campusRelease.vue b/package1/campus/campusRelease.vue
new file mode 100644
index 0000000..8c6d2f2
--- /dev/null
+++ b/package1/campus/campusRelease.vue
@@ -0,0 +1,475 @@
+
+
+
+
+
+ {{isEdit ? '编辑校园圈' : '发布校园圈'}}
+ 实名发布,内容和图片会进行安全审核
+
+
+
+
+ 校园墙
+ 游戏搭子
+ 日常搭子
+ 运动搭子
+
+
+
+
+
+ 匿名发布
+ 开启后统一显示默认头像和“半径同学”
+
+
+
+
+ 标题
+
+
+
+ 二级分类
+
+ {{selectedCategoryName || '请选择分类'}} ›
+
+
+
+ 正文
+
+
+
+ 地点 最多30字,可不填
+
+
+
+ 时间 最多20字,可不填
+
+
+
+ 人数 填写整数,可不填
+
+
+
+ 热门标签
+
+
+ {{item.name}}
+
+
+
+
+ 联系方式 微信/手机号可选填
+
+
+
+
+ 图片 最多9张
+
+
+
+ ×
+
+
+
+ 上传
+
+
+
+
+ {{imageAuditing ? '图片审核中,请稍候...' : imageAuditMessage}}
+
+
+
+ 发布、评论和聊天都会进行内容审核,违规内容会记录用于审核计费和后台治理。
+
+ {{formAuditMessage}}
+
+
+
+
+
+ {{submitting ? '提交审核中...' : '提交发布'}}
+
+
+
+
+ 表单内容审核中
+ 图片、标题和正文正在审核,请勿重复点击或退出页面
+
+
+
+
+
+
+
+
+
diff --git a/package1/ieBrowser/chat.vue b/package1/ieBrowser/chat.vue
index ba8df74..9b1507e 100644
--- a/package1/ieBrowser/chat.vue
+++ b/package1/ieBrowser/chat.vue
@@ -96,10 +96,25 @@
-
- 🎯 {{ quizButtonText }}
-
- {{ item }}
+
+
+ 🎯 {{ quizButtonText }}
+
+ {{ item }}
+
+
+
+
+ ☺
+ {{ voiceMode ? '⌨' : '🎙' }}
+
+
+ {{ voiceHoldText }}
+
+ +
+ 发送
@@ -112,19 +127,6 @@
-
- ☺
- {{ voiceMode ? '⌨' : '🎙' }}
-
-
- {{ voiceHoldText }}
-
- +
- 发送
-
-
安全与退出
@@ -225,9 +227,12 @@
-
\ No newline at end of file
+
diff --git a/package1/runErrand/runErrand.vue b/package1/runErrand/runErrand.vue
index 84576c8..bc7faa9 100644
--- a/package1/runErrand/runErrand.vue
+++ b/package1/runErrand/runErrand.vue
@@ -642,21 +642,39 @@
that.shopAreaLoading = false;
})
},
+ getCurrentRegionId() {
+ try {
+ const area = uni.getStorageSync('area');
+ if (!area) return '';
+ if (typeof area === 'object') return area.id ? String(area.id) : '';
+ const areaInfo = JSON.parse(area);
+ return areaInfo.id ? String(areaInfo.id) : '';
+ } catch (e) {
+ return '';
+ }
+ },
initAddress() {
let cachedAddress = uni.getStorageSync('selectedAddress');
- if (cachedAddress && !this.formData.address) {
+ const regionId = this.getCurrentRegionId();
+ if (cachedAddress && String(cachedAddress.regionId || '') === regionId && !this.formData.address) {
this.formData.address = cachedAddress;
} else if(!this.formData.address){
+ if (cachedAddress) {
+ uni.removeStorageSync('selectedAddress');
+ }
let that = this;
let userId = uni.getStorageSync('id');
if(!userId) return;
that.tui.request("/app/userAddress/list", "GET", {
- userId: userId
+ userId: userId,
+ regionId: regionId
}, false, true).then((res) => {
if (res.code == 200 && res.result && res.result.length > 0) {
let target = res.result.find(item => item.isDefault == 1) || res.result[0];
that.formData.address = target;
uni.setStorageSync('selectedAddress', target);
+ } else {
+ that.formData.address = null;
}
}).catch(() => {});
}
diff --git a/package1/tabbar/fishRelease.vue b/package1/tabbar/fishRelease.vue
index 6c2a526..41ba9ca 100644
--- a/package1/tabbar/fishRelease.vue
+++ b/package1/tabbar/fishRelease.vue
@@ -50,6 +50,10 @@
上传
+
+
+ {{imageAuditing ? '图片审核中,请稍候...' : imageAuditMessage}}
+
@@ -154,6 +158,10 @@
submitting: false,
submitLocked: false,
keyboardOpen: false,
+ imageChoosing: false,
+ imageAuditing: false,
+ imageAuditStatus: '',
+ imageAuditMessage: '',
auditTitle: '提交中,等待审核',
officialAccountPopupVisible: false,
officialAccountQr: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/d23a9043a8c24731831ec4db909fe3b4.jpg',
@@ -345,15 +353,21 @@
this.selectedCategoryIndex = Number(e.detail.value)
},
chooseImages() {
+ if (this.imageChoosing || this.imageAuditing) return
const remain = this.maxImageCount - this.form.images.length
if (remain <= 0) return
+ this.imageChoosing = true
+ this.imageAuditStatus = ''
+ this.imageAuditMessage = ''
uni.chooseImage({
count: remain,
sizeType: ['compressed'],
sourceType: ['album', 'camera'],
success: async (res) => {
const paths = res.tempFilePaths || []
- uni.showLoading({ title: '上传中...', mask: true })
+ if (!paths.length) return
+ this.imageAuditing = true
+ uni.showLoading({ title: '图片审核中...', mask: true })
const failMessages = []
try {
for (let i = 0; i < paths.length; i++) {
@@ -365,9 +379,25 @@
}
}
} finally {
+ this.imageAuditing = false
uni.hideLoading()
}
this.showUploadAuditFail(failMessages)
+ if (failMessages.length) {
+ this.imageAuditStatus = 'fail'
+ this.imageAuditMessage = Array.from(new Set(failMessages.filter(Boolean))).join('\n')
+ } else {
+ this.imageAuditStatus = ''
+ this.imageAuditMessage = ''
+ }
+ },
+ fail: (err) => {
+ if (err && err.errMsg && err.errMsg.indexOf('cancel') === -1) {
+ uni.showToast({ title: '无法选择图片,请检查相册权限', icon: 'none' })
+ }
+ },
+ complete: () => {
+ this.imageChoosing = false
}
})
},
@@ -457,6 +487,7 @@
if (!this.isValidPrice(price)) return this.publishType == 'sell' ? '售价必须大于0且最多2位小数' : '预算必须大于0且最多2位小数'
if (originPrice && !this.isValidAmount(originPrice)) return '原价最多2位小数'
if (this.publishType == 'sell' && originPrice && Number(price) > Number(originPrice)) return '售价不得大于原价'
+ if (this.imageAuditing) return '图片正在审核中,请稍候'
if (this.publishType == 'sell' && this.form.images.length == 0) return '请至少上传1张商品图片'
if (this.publishType == 'want' && this.form.images.length > 1) return '求购最多上传1张图片'
if (!contentText) return this.publishType == 'sell' ? '请填写商品介绍' : '请填写求购内容'
@@ -504,6 +535,7 @@
publishType: this.publishType,
regionId: area.id || '',
regionName: area.title || '',
+ ...this.getCachedUserProfile(),
title: this.form.title,
content: this.form.content,
contentText: this.form.contentText,
@@ -574,6 +606,12 @@
content: '根据法律法规要求,对应流程需要调用阿里云实名认证。半径里不会存储您的实名信息。',
steps: []
}
+ },
+ getCachedUserProfile() {
+ return {
+ userName: uni.getStorageSync('nickName') || uni.getStorageSync('nickname') || uni.getStorageSync('userName') || '',
+ userAvatar: uni.getStorageSync('avatar') || uni.getStorageSync('avatarUrl') || uni.getStorageSync('headimgurl') || ''
+ }
}
}
}
@@ -790,6 +828,34 @@
font-size: 22rpx;
}
+ .audit-inline {
+ display: flex;
+ align-items: center;
+ gap: 10rpx;
+ margin-top: 18rpx;
+ padding: 16rpx 18rpx;
+ border-radius: 18rpx;
+ background: #effbf7;
+ color: #2c8b72;
+ font-size: 23rpx;
+ line-height: 1.45;
+ }
+
+ .audit-inline.fail {
+ background: #fff1ef;
+ color: #d64b3c;
+ }
+
+ .mini-spinner {
+ width: 26rpx;
+ height: 26rpx;
+ flex: 0 0 26rpx;
+ border-radius: 50%;
+ border: 4rpx solid #c9f2e8;
+ border-top-color: #2fc49f;
+ animation: audit-spin .8s linear infinite;
+ }
+
.contact-input {
margin-top: 14rpx;
}
@@ -1004,6 +1070,12 @@
}
}
+ @keyframes audit-spin {
+ to {
+ transform: rotate(360deg);
+ }
+ }
+
.bottom-space {
height: 240rpx;
}
diff --git a/package1/tabbar/release.vue b/package1/tabbar/release.vue
index 1d47378..5aa79aa 100644
--- a/package1/tabbar/release.vue
+++ b/package1/tabbar/release.vue
@@ -1,5 +1,5 @@
-
-
+
+