diff --git a/config/index.js b/config/index.js index f386c48..c6467b1 100644 --- a/config/index.js +++ b/config/index.js @@ -10,6 +10,14 @@ if (NODE_ENV === 'development' || NODE_ENV === 'test') { enableDebug: false }) } +if (NODE_ENV === 'fix') { + BASE_URL = 'https://shop-pre.xdd618.com/api' + SERVICE_URL = 'https://service-pre.xdd618.com/api' + SERVICE_WS_URL = 'wss://service-pre.xdd618.com/ws' + wx.setEnableDebug({ + enableDebug: false + }) +} if (NODE_ENV === 'prod') { BASE_URL = 'https://wxapp.xdd618.com/api' SERVICE_URL = 'https://service.xdd618.com/api' diff --git a/package.json b/package.json index 858a590..d8db073 100644 --- a/package.json +++ b/package.json @@ -133,6 +133,17 @@ "CUSTOM-CONST": true } }, + "mp-weixin-fix": { + "title": "微信小程序(Fix环境)", + "env": { + "UNI_PLATFORM": "mp-weixin", + "VUE_APP_ENV": "fix", + "UNI_OUTPUT_DIR": "dist" + }, + "define": { + "CUSTOM-CONST": true + } + }, "mp-weixin": { "title": "微信小程序(生产环境)", "env": { diff --git a/pages/chose-city/chose-city.vue b/pages/chose-city/chose-city.vue index 189d361..3e80905 100644 --- a/pages/chose-city/chose-city.vue +++ b/pages/chose-city/chose-city.vue @@ -384,20 +384,17 @@ export default { this.mescroll && this.mescroll.triggerDownScroll() }, search() { - if(this.keyword === '') return - const matchIndex = this.listGroup.findIndex((group, index) => { - let result - group.city.forEach(item => { - result = item.cityName.indexOf(this.keyword, 0) - if (result !== -1) { - this.asideTap(index); - return null; - } - }) - if (result !== -1) { - return result - } + const keyword = (this.keyword || '').trim() + if (!keyword) return + const matchIndex = this.listGroup.findIndex(group => { + const cityList = Array.isArray(group.city) ? group.city : [] + return cityList.some(item => item && item.cityName && item.cityName.indexOf(keyword) !== -1) }) + if (matchIndex !== -1) { + this.keyword = keyword + this.asideTap(matchIndex) + return + } if (matchIndex === -1) { uni.showToast({ title: '未找到该城市,请重新输入城市名称', diff --git a/pages/order/MyOrder/index.vue b/pages/order/MyOrder/index.vue index 717ccf3..0981754 100644 --- a/pages/order/MyOrder/index.vue +++ b/pages/order/MyOrder/index.vue @@ -12,7 +12,7 @@ v-model="keyword" :inputStyle="inputStyle" :showAction="false" - placeholder="请输入商品名/订单号/团购名称" + :placeholder="searchPlaceholder" shape="round" bgColor="#FFF" @search="changeType" @@ -76,28 +76,28 @@ - {{ order.merName }} + {{ getOrderStoreName(order) }} - + - {{ order.merCityName }} + {{ getOrderCityName(order) }} @@ -131,7 +131,7 @@ {{ (order.isGiftCardSend || order.isGiftCardReceive) ? '礼包' : (getStatus(order) || (order._status && order._status._title) || '已完成') }} + >{{ getOrderStatusTagText(order) }} + + + + + + + + {{ item.name }} + + + + {{ force2Decimal(item.price) }} + + x{{ item.qty }} + + + + + {{ item.sku }} + + + + + @@ -254,22 +285,22 @@ @@ -300,8 +331,8 @@ {{ order.createTime }} - 共{{ order.totalNum || 0 }}件商品 - + 共{{ getOrderTotalNum(order) }}件商品 + ,总金额 @@ -309,7 +340,7 @@ ¥ - {{ force2Decimal(order.payPrice) }} + {{ force2Decimal(getOrderPayPrice(order)) }} @@ -351,63 +382,101 @@ v-if="!order.isGiftCardSend && !order.experienceOrderInfo" class="bottom flex jc-between ai-center" > - - - 更多 - - 联系商家 - 申请退款 - - -