diff --git a/package2/components/delivery-time-op/delivery-time-op.vue b/package2/components/delivery-time-op/delivery-time-op.vue
new file mode 100644
index 0000000..7d358f7
--- /dev/null
+++ b/package2/components/delivery-time-op/delivery-time-op.vue
@@ -0,0 +1,306 @@
+
+
+
+
+
+
+
+
+ {{ title }}
+ x
+
+
+
+
+ {{ item.timezh }}
+
+
+
+
+ {{ item.timestr
+ }}
+
+
+
+
+
+
+
+
+
diff --git a/package2/group/groupBuyList.vue b/package2/group/groupBuyList.vue
index 5f44966..f4449ed 100644
--- a/package2/group/groupBuyList.vue
+++ b/package2/group/groupBuyList.vue
@@ -73,7 +73,7 @@
-
+
-
+
@@ -224,10 +224,11 @@
import { buildHomeSharePath } from '@/utils/sharePath.js'
import { hasLogin, requireLoginToCurrentPage } from '@/utils/authRedirect.js'
import { getSearchHistory, saveSearchHistory } from '@/utils/searchHistory.js'
+ import { resolveCampusTextEnabled, shouldUseSocialText } from '@/utils/areaTextMode.js'
const SHARE_TARGET_PATH = '/package2/group/groupBuyList'
const GROUP_META_CACHE_TTL = 5 * 60 * 1000
- const GROUP_EAT_TYPE_CACHE_KEY = 'group_buy_eat_type_cache_v1'
+ const GROUP_EAT_TYPE_CACHE_KEY = 'group_buy_eat_type_cache_v3'
const GROUP_SHOP_AREA_CACHE_PREFIX = 'group_buy_shop_area_cache_v1_'
const GROUP_BUY_SEARCH_HISTORY_KEY = 'group_buy_list_search_history_v1'
@@ -264,6 +265,7 @@
},
shopList: [],
areaKind: 1,
+ campusTextEnabled: 0,
searchHotWords: ['🍜 今晚吃啥', '🥤 奶茶续命拼团', '🔥 还差1人', '🍱 宿舍套餐热拼'],
liveSlogans: ['谁在偷吃夜宵', '差个饭搭子', '隔壁宿舍已开拼'],
liveFeeds: [{
@@ -398,46 +400,32 @@
isSocialArea() {
return Number(this.areaKind) === 2
},
+ useSocialText() {
+ return shouldUseSocialText(this.areaKind, this.campusTextEnabled)
+ },
pageSubtitle() {
- return this.isSocialArea ? '好友拼饭局' : '宿舍拼饭局'
+ return this.useSocialText ? '好友拼饭局' : '宿舍拼饭局'
},
interestSectionTitle() {
- return this.isSocialArea ? '周边美食兴趣入口' : '校园美食兴趣入口'
+ return this.useSocialText ? '周边美食兴趣入口' : '校园美食兴趣入口'
},
scoreSortLabel() {
- return this.isSocialArea ? '好友最爱' : '同学最爱'
+ return this.useSocialText ? '好友最爱' : '同学最爱'
},
areaSortLabel() {
- return this.isSocialArea ? '附近区域' : '宿舍附近'
+ return this.useSocialText ? '附近区域' : '宿舍附近'
},
emptyOnlineText() {
- return this.isSocialArea ? '好友群正在等一个饭搭子' : '宿舍群正在等一个饭搭子'
+ return this.useSocialText ? '好友群正在等一个饭搭子' : '宿舍群正在等一个饭搭子'
},
displayLiveFeeds() {
- return this.isSocialArea ? this.socialLiveFeeds : this.liveFeeds
+ return this.useSocialText ? this.socialLiveFeeds : this.liveFeeds
},
displayMenuBtn() {
- if (!this.isSocialArea) return this.menuBtn
- return this.menuBtn.map((item) => {
- const next = Object.assign({}, item)
- if (item.name === '超市便利') {
- next.displayName = '家里囤货'
- } else if (item.name === '同学小店') {
- next.displayName = '好友小店'
- next.sticker = '友'
- }
- return next
- })
+ return this.menuBtn
},
displayMenuBtn1() {
- if (!this.isSocialArea) return this.menuBtn1
- return this.menuBtn1.map((item) => {
- const next = Object.assign({}, item)
- if (item.name === '早点') {
- next.displayName = '元气早餐'
- }
- return next
- })
+ return this.menuBtn1
}
},
filters: {
@@ -475,6 +463,7 @@
onLoad() {
this.syncAreaKind()
this.enableShareMenu()
+ this.getEatType()
this.getShopList();
},
onShow() {
@@ -517,6 +506,7 @@
}
const kind = area ? Number(area.areaKind) : 1
this.areaKind = kind === 2 ? 2 : 1
+ this.campusTextEnabled = resolveCampusTextEnabled(area)
},
enableShareMenu() {
if (!uni.showShareMenu) return
@@ -527,7 +517,7 @@
},
buildShareInfo() {
return {
- title: this.isSocialArea
+ title: this.useSocialText
? '饭团好友拼饭局,约好友一起省钱吃'
: '饭团宿舍拼饭局,约同学一起省钱吃',
path: buildHomeSharePath(SHARE_TARGET_PATH),
@@ -618,7 +608,6 @@
}, 300)
},
getEatType() {
- if (!hasLogin()) return
const cache = uni.getStorageSync(GROUP_EAT_TYPE_CACHE_KEY)
if (this.isFreshCache(cache)) {
this.applyEatTypeList(cache.list || [])
@@ -628,7 +617,10 @@
that.tui.request("/dictData/getByCondition", "GET", {
sort: 'sortOrder',
order: 'asc',
- dictId: '1712359407444168704'
+ dictId: '1712359407444168704',
+ merchantType: 1,
+ pageNumber: 1,
+ pageSize: 1000
}, false, true, true).then((res) => {
if (res.code == 200) {
const list = res.result.content || []
@@ -644,18 +636,25 @@
}).catch((res) => {})
},
applyEatTypeList(list) {
- for (let i = 0; i < list.length; i++) {
- for (let m = 0; m < this.menuBtn.length; m++) {
- if (this.menuBtn[m].name == list[i].title) {
- this.menuBtn[m].value = list[i].value
- }
- }
- for (let m = 0; m < this.menuBtn1.length; m++) {
- if (this.menuBtn1[m].name == list[i].title) {
- this.menuBtn1[m].value = list[i].value
- }
- }
- }
+ const source = this.menuBtn.concat(this.menuBtn1)
+ const dictList = Array.isArray(list) ? list.filter(item => item && item.title) : []
+ if (!dictList.length) return
+ const allMenus = dictList.map((item, index) => {
+ const exact = source.find(menu => menu.name == item.title || String(menu.value) == String(item.value))
+ const matched = exact
+ || source[index % source.length]
+ || {}
+ return Object.assign({}, matched, {
+ name: item.title,
+ displayName: '',
+ value: item.value,
+ sticker: matched.sticker || '拼',
+ url: matched.url || 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/f7227759d693497a8beab87ff437a875.png',
+ isStudentOnly: (exact && exact.isStudentOnly) || Number(item.value) === 5
+ })
+ })
+ this.menuBtn = allMenus.slice(0, 5)
+ this.menuBtn1 = allMenus.slice(5)
},
getShopArea() {
if (!hasLogin()) return
@@ -763,7 +762,7 @@
const selfDeliveryTime = Number(item.shopDeliveryDuration)
const transferTimeValue = Number(item.transferDeliveryDuration)
const transferTime = item.supportTransferDelivery == 1 && !isNaN(transferTimeValue) && transferTimeValue > 0 ? transferTimeValue : 0
- item._groupTip = this.isSocialArea
+ item._groupTip = this.useSocialText
? ['还差1人就成团', '刚下班,大家都在拼', '这口热乎的很适合夜宵', '附近好友想一起点'][index % 4]
: ['还差1人就成团', '刚下课,大家都在拼', '这口热乎的很适合夜宵', '附近同学想一起点'][index % 4]
let baseDeliveryTime
@@ -827,8 +826,8 @@
const fee = parseFloat(item.orderBkge || 0)
const feeText = fee > 0 ? `¥${fee.toFixed(1)}` : '免配送费'
const locationText = item.shopDeliveryLocation == 1
- ? (this.isSocialArea ? '送上门' : '送宿舍')
- : (this.isSocialArea ? '送门口' : '送楼下')
+ ? (this.useSocialText ? '送上门' : '送宿舍')
+ : (this.useSocialText ? '送门口' : '送楼下')
return `商家自配送 · ${feeText} · ${locationText}`
},
shouldShowBaseDeliveryFee(item) {
@@ -836,7 +835,7 @@
return !!(item && item.supportShopDelivery != 1 && !isNaN(fee) && fee > 0)
},
formatOnlineWorkerText(item) {
- const people = this.isSocialArea ? '位骑手' : '位同学'
+ const people = this.useSocialText ? '位骑手' : '位同学'
return `${item.areaName} 附近 ${item.onlineWorkerCount} ${people}在线接单`
},
formatAmountText(value) {
@@ -1553,6 +1552,12 @@
.menu-box-second {
margin-top: 14rpx;
+ flex-wrap: wrap;
+ row-gap: 14rpx;
+ }
+
+ .menu-box-second .menu-list {
+ flex: 0 0 20%;
}
.menu-list {
diff --git a/package2/group/groupBuySingle.vue b/package2/group/groupBuySingle.vue
index 2fed796..75e6d33 100644
--- a/package2/group/groupBuySingle.vue
+++ b/package2/group/groupBuySingle.vue
@@ -147,7 +147,7 @@
+ v-for="(item,index) in productItem" :key="index" @tap="openGoodsDetailByIndex(index)">
@@ -180,13 +180,13 @@
-
+
-
+
差{{getMissingGroupMembers(item)}}人成团
@@ -197,7 +197,7 @@
+ :style="{'float':groupId != ''?'right':''}" @tap.stop="openProductPopup('pintuan', index)">
@@ -205,7 +205,7 @@
拼团购买¥{{ getGroupPrice(item) }}
-
直接购买¥{{item.attributeListPrice | sliceMsg}}
@@ -399,7 +399,7 @@
- 月售 100+
+
@@ -672,9 +672,27 @@
立即出餐
- 拼团成功后立即出餐
+ {{nowMake === false ? '选择用餐时间,系统会在用餐前30分钟通知商家并打印小票' : '拼团成功后立即出餐'}}
-
+
+
+
+
+
+ 是
+
+
+
+
+
+ 否
+
+
+
+ 用餐时间
+ {{pickupTime || '选择时间 >'}}
+
+
@@ -689,11 +707,6 @@
-
-
-
-
-
@@ -712,11 +725,27 @@
- 确认付款{{nowMake && groupdeliveryType == 2 && !isStoreGroupOrder ? '-即刻出餐' : ''}}
+ 确认付款{{nowMake === true && groupdeliveryType == 2 && !isStoreGroupOrder ? '-即刻出餐' : ''}}
+
+
+
+
+