diff --git a/package2/IdleTrad/chat.vue b/package2/IdleTrad/chat.vue index d05575a..7321306 100644 --- a/package2/IdleTrad/chat.vue +++ b/package2/IdleTrad/chat.vue @@ -4,7 +4,7 @@ {{peerName}} - 校园二手咨询 · 独立聊天 + 二手咨询 · 独立聊天 @@ -109,8 +109,8 @@ return this.isWant ? (this.goods.expectedPrice || 0) : (this.goods.price || 0) }, peerName() { - if (!this.goods) return '校园同学' - return this.goods.userName || (this.isWant ? '求购同学' : '卖家同学') + if (!this.goods) return '区域好友' + return this.goods.userName || (this.isWant ? '求购' : '卖家') }, peerAvatar() { return this.defaultAvatar diff --git a/package2/IdleTrad/detail.vue b/package2/IdleTrad/detail.vue index 4c9bd66..9cf4911 100644 --- a/package2/IdleTrad/detail.vue +++ b/package2/IdleTrad/detail.vue @@ -39,7 +39,7 @@ {{goods.createTime || ''}} {{goods.browseCount || 0}}浏览 - {{goods.regionName || '本校'}} + {{goods.regionName || '本区域'}} 求购 @@ -82,13 +82,13 @@ - {{item.userName || '校园同学'}} + {{item.userName || '区域好友'}} 卖家 {{item.content}} - {{reply.userName || '校园同学'}} + {{reply.userName || '区域好友'}} 卖家 回复 {{reply.replyToUserName}} :{{reply.content}} @@ -115,7 +115,7 @@ {{replyTarget.id ? '回复评论' : '发表评论'}} - 回复 {{replyTarget.userName || '校园同学'}} + 回复 {{replyTarget.userName || '区域好友'}} 取消回复 友善交流,评论内容会进行审核 @@ -257,7 +257,7 @@ return this.imageHeights[this.currentImageIndex] || 560 }, commentPlaceholder() { - return this.replyTarget && this.replyTarget.id ? '回复 ' + (this.replyTarget.userName || '校园同学') : '写下你的评论' + return this.replyTarget && this.replyTarget.id ? '回复 ' + (this.replyTarget.userName || '区域好友') : '写下你的评论' }, favoriteCountText() { return this.goods && this.goods.favoriteCount ? this.goods.favoriteCount : 0 @@ -339,7 +339,7 @@ profile: profile || {}, actionText, authDialog: { - badge: '校园二手', + badge: '二手', title: '实名认证', content: '根据法律法规要求,对应流程需要调用阿里云实名认证。半径里不会存储您的实名信息。', steps: [] @@ -350,20 +350,20 @@ }, async focusComment() { if (this.isWant) return - const verified = await this.ensureVerified('在校园二手评论') + const verified = await this.ensureVerified('在二手评论') if (!verified) return this.replyTarget = {} this.openCommentPopup() }, async replyComment(parent, target) { if (this.isWant) return - const verified = await this.ensureVerified('回复校园二手评论') + const verified = await this.ensureVerified('回复二手评论') if (!verified) return this.replyTarget = { id: target.id, parentId: parent.parentId || parent.id, userId: target.userId, - userName: target.userName || '校园同学' + userName: target.userName || '区域好友' } this.openCommentPopup() }, @@ -499,7 +499,7 @@ }, async consult() { if (!this.goods) return - const verified = await this.ensureVerified(this.isWant ? '响应校园二手求购' : '咨询校园二手商品') + const verified = await this.ensureVerified(this.isWant ? '响应二手求购' : '咨询二手商品') if (!verified) return if (this.isWant) { createFishWantChatSession(this.id).then(session => { @@ -530,8 +530,8 @@ // #endif }, buildShareInfo() { - const title = this.goods && this.goods.title ? this.goods.title : (this.isWant ? '校园二手求购' : '校园二手商品') - const prefix = this.isWant ? '同学正在求购:' : '校园二手好物:' + const title = this.goods && this.goods.title ? this.goods.title : (this.isWant ? '二手求购' : '二手商品') + const prefix = this.isWant ? '同学正在求购:' : '二手好物:' const typeQuery = this.isWant ? '&type=want' : '' const targetPath = `/package2/IdleTrad/detail?id=${this.id || ''}${typeQuery}` return { diff --git a/package2/IdleTrad/sessionList.vue b/package2/IdleTrad/sessionList.vue index 70be006..99dbba9 100644 --- a/package2/IdleTrad/sessionList.vue +++ b/package2/IdleTrad/sessionList.vue @@ -24,7 +24,7 @@ - {{item.goodsTitle || '校园二手商品'}} + {{item.goodsTitle || '区域二手商品'}} {{item.roleText}} {{formatBadgeCount(item.unreadCount)}} @@ -202,7 +202,7 @@ goodsCover: comment.displayCover || '', goodsPrice: comment.displayPrice !== undefined && comment.displayPrice !== null ? comment.displayPrice : '', displayTime: this.formatDisplayTime(comment.createTime), - desc: (comment.replyToUserName ? (comment.userName || '校园同学') + ' 回复 ' + comment.replyToUserName + ':' : '') + (comment.content || '') + desc: (comment.replyToUserName ? (comment.userName || '区域同学') + ' 回复 ' + comment.replyToUserName + ':' : '') + (comment.content || '') } }) }, diff --git a/package2/IdleTrad/wantList.vue b/package2/IdleTrad/wantList.vue index 8ddfdea..f9342ad 100644 --- a/package2/IdleTrad/wantList.vue +++ b/package2/IdleTrad/wantList.vue @@ -5,7 +5,7 @@ 求购广场 - 看看同学们正在找什么 + 看看大家正在找什么 @@ -209,7 +209,7 @@ }, normalizeRecords(records) { const area = this.getArea() - const fallbackRegionName = area.title || area.name || uni.getStorageSync('schoolName') || '本校' + const fallbackRegionName = area.title || area.name || uni.getStorageSync('schoolName') || '本区域' return (Array.isArray(records) ? records : []).map(item => { const images = this.parseJsonList(item.images) const imageList = item.imageList && item.imageList.length ? item.imageList : images @@ -220,7 +220,7 @@ text: item.title || '', price: item.expectedPrice || 0, icon: item.userAvatar || this.defaultCover, - shopName: item.userName || '校园同学', + shopName: item.userName || '区域好友', regionName: item.regionName || item.schoolName || item.areaName || fallbackRegionName, category: item.categoryName || '', browseCount: item.browseCount || 0 diff --git a/package2/group/groupBuyList.vue b/package2/group/groupBuyList.vue index 1e39f29..0eed496 100644 --- a/package2/group/groupBuyList.vue +++ b/package2/group/groupBuyList.vue @@ -9,7 +9,7 @@ 饭团 - 宿舍拼饭局 + {{pageSubtitle}} @@ -36,7 +36,7 @@ 搜索 @@ -43,7 +43,7 @@ 查看待成团列表 - 看看同校还有哪些拼团差人 + {{pendingSubText}} 去看看 @@ -59,7 +59,7 @@ + v-for="(item,index) in displayTabList" :key="item.key" @tap="switchTab(item)"> {{item.icon}} {{item.name}} {{item.sub}} @@ -70,14 +70,14 @@ 拼单最多 - 同学最爱 + {{scoreSortLabel}} 暂时没找到同款快乐 - 换个关键词或分类试试,新的校园店铺会出现在这里 + {{emptySubText}} - {{item.subtitle || '约上同学一起拼'}} + {{item.subtitle || defaultShopSubtitle}} 已售{{item.saleCount != null ? item.saleCount : 0}} @@ -242,6 +242,7 @@ sub: '更多美好' }], hotWords: ['🍢 宿舍夜宵拼团', '🎤 KTV四人局还差1人', '💅 周末美甲搭子', '🥩 烤肉套餐同校热拼'], + socialHotWords: ['🍢 夜宵热拼', '🎤 KTV四人局还差1人', '💅 周末美甲搭子', '🥩 烤肉套餐同城热拼'], quickHotWords: ['夜宵', 'KTV', '美甲', '台球', '烤肉', '资料'], sceneList: [{ icon: '课', @@ -256,7 +257,46 @@ title: '烤肉套餐', sub: '拼桌更划算' }], - shopList: [] + shopList: [], + areaKind: 1 + } + }, + computed: { + isSocialArea() { + return Number(this.areaKind) === 2 + }, + searchPlaceholder() { + return this.isSocialArea ? '输入你想拼的周边快乐' : '输入你想拼的校园快乐' + }, + pendingSubText() { + return this.isSocialArea ? '看看同城好友还有哪些拼团差人' : '看看同校还有哪些拼团差人' + }, + scoreSortLabel() { + return this.isSocialArea ? '好友最爱' : '同学最爱' + }, + emptySubText() { + return this.isSocialArea + ? '换个关键词或分类试试,新的周边店铺会出现在这里' + : '换个关键词或分类试试,新的校园店铺会出现在这里' + }, + defaultShopSubtitle() { + return this.isSocialArea ? '约上好友一起拼' : '约上同学一起拼' + }, + displayTabList() { + if (!this.isSocialArea) return this.tabList + return this.tabList.map((item) => { + const next = Object.assign({}, item) + if (item.key === 'student') { + next.name = '好友小店' + next.icon = '友' + next.sub = '好友宝藏' + } else if (item.key === 'course') { + next.sub = '技能充电' + } else if (item.key === 'movie') { + next.sub = '周末约影' + } + return next + }) } }, filters: { @@ -276,10 +316,12 @@ } }, onLoad() { + this.syncAreaKind() this.enableShareMenu() this.initRegion() }, onShow() { + this.syncAreaKind() this.enableShareMenu() this.menuButtonInfo = uni.getMenuButtonBoundingClientRect() }, @@ -309,11 +351,26 @@ }, buildShareInfo() { return { - title: '团购杂货铺,同校好店一起拼', + title: this.isSocialArea + ? '团购杂货铺,同城好友好店一起拼' + : '团购杂货铺,同校好店一起拼', path: buildHomeSharePath(SHARE_TARGET_PATH), imageUrl: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/f7227759d693497a8beab87ff437a875.png' } }, + syncAreaKind(areaObj) { + let area = areaObj + if (!area) { + try { + const cached = uni.getStorageSync('area') + area = cached ? (typeof cached === 'string' ? JSON.parse(cached) : cached) : null + } catch (e) { + area = null + } + } + const kind = area ? Number(area.areaKind) : 1 + this.areaKind = kind === 2 ? 2 : 1 + }, backHome() { uni.switchTab({ url: '/pages/index/index', @@ -323,9 +380,10 @@ }) }, initRegion() { + this.syncAreaKind() const area = uni.getStorageSync('area') if (!area) { - this.tui.toast('请先选择区域') + this.tui.toast(this.isSocialArea ? '请先选择区域' : '请先选择校区') return } try { @@ -335,7 +393,7 @@ this.searchForm.regionId = '' } if (!this.searchForm.regionId) { - this.tui.toast('请先选择区域') + this.tui.toast(this.isSocialArea ? '请先选择区域' : '请先选择校区') return } if (hasLogin()) { @@ -507,7 +565,7 @@ getShopType(item) { if (item.shopTypeTitle) return item.shopTypeTitle if (item.shopTakeaway && item.shopTakeaway.type) return item.shopTakeaway.type - return '校园生活' + return this.isSocialArea ? '同城生活' : '校园生活' }, formatShopItem(item, index) { const heatPercent = this.getHeatPercent(item, index) @@ -527,14 +585,18 @@ return count > 0 ? Math.min(99, count + 8 + index * 3) : 18 + index * 5 }, getDormText(index) { - const dorms = ['3号楼正在拼', '东区宿舍刚下单', '图书馆旁热拼', '操场边有人约', '北门寝室在凑'] + const dorms = this.isSocialArea + ? ['小区门口正在拼', '商场旁刚下单', '公园边热拼', '地铁口有人约', '写字楼旁在凑'] + : ['3号楼正在拼', '东区宿舍刚下单', '图书馆旁热拼', '操场边有人约', '北门寝室在凑'] return dorms[index % dorms.length] }, getMissingCount(index) { return index % 3 === 0 ? '还差1' : (index % 3 === 1 ? '还差2' : '满3') }, getLiveText(index) { - const texts = ['刚成团', '同校热拼', '搭子在等', '附近爆款'] + const texts = this.isSocialArea + ? ['刚成团', '同城热拼', '搭子在等', '附近爆款'] + : ['刚成团', '同校热拼', '搭子在等', '附近爆款'] return texts[index % texts.length] }, getHeatPercent(item, index) { diff --git a/package2/login/login.vue b/package2/login/login.vue index 28c40eb..236f935 100644 --- a/package2/login/login.vue +++ b/package2/login/login.vue @@ -6,7 +6,7 @@ 刚刚有人拼成奶茶 夜宵局启动中 - 附近同学正在拼饭 + {{bubbleCText}} @@ -14,7 +14,7 @@ 半径里 拼团更省钱,半径更精彩 - 校园万物 · 皆可拼团 + {{brandSubtitle}} @@ -30,7 +30,7 @@