diff --git a/aiChat/mixins/chatMixins.js b/aiChat/mixins/chatMixins.js
index 5b59f6b..601d99a 100644
--- a/aiChat/mixins/chatMixins.js
+++ b/aiChat/mixins/chatMixins.js
@@ -372,7 +372,7 @@ export const chatMixins = {
const _this = this
console.log('------------------创建连接')
uni.connectSocket({
- url: VUE_APP_API_URL.replace('https', 'wss') + settings.sysPrefix + `v1/chat/websocket/${_this.userInfo.unionId}-${conversationId}`,
+ url: VUE_APP_API_URL.replace('https', 'wss') + settings.sysPrefix + `v1/chat/websocket/${_this.userInfo.uid}-${conversationId}`,
header: {
'content-type': 'application/json'
},
diff --git a/aiChat/mixins/chatMixinsV2.js b/aiChat/mixins/chatMixinsV2.js
index a854680..10ac0c8 100644
--- a/aiChat/mixins/chatMixinsV2.js
+++ b/aiChat/mixins/chatMixinsV2.js
@@ -334,7 +334,7 @@ export const chatMixinsV2 = {
const _this = this
console.log('------------------创建连接')
uni.connectSocket({
- url: VUE_APP_API_URL.replace('https', 'wss') + settings.sysPrefix + `v1/chat/websocket/${_this.userInfo.unionId}-${conversationId}`,
+ url: VUE_APP_API_URL.replace('https', 'wss') + settings.sysPrefix + `v1/chat/websocket/${_this.userInfo.uid}-${conversationId}`,
header: {
'content-type': 'application/json'
},
diff --git a/aiChat/views/index.vue b/aiChat/views/index.vue
index e43ff28..86ae0e8 100644
--- a/aiChat/views/index.vue
+++ b/aiChat/views/index.vue
@@ -184,7 +184,12 @@
价格预算:
-
+
@@ -857,10 +862,18 @@ export default {
display: flex;
flex-direction: column;
justify-content: space-between;
- height: calc(100vh - 240rpx);
+ min-height: calc(100vh - 240rpx);
+ height: auto;
padding: 0 0 240rpx 0;
+ padding-bottom: calc(240rpx + constant(safe-area-inset-bottom));
+ padding-bottom: calc(240rpx + env(safe-area-inset-bottom));
box-sizing: border-box;
- overflow-y: auto;
+ overflow: visible;
+}
+.gift-steps-wrap {
+ padding-bottom: 40rpx;
+ padding-bottom: calc(40rpx + constant(safe-area-inset-bottom));
+ padding-bottom: calc(40rpx + env(safe-area-inset-bottom));
}
.focus-guide-wrap {
display: flex;
diff --git a/api/join.js b/api/join.js
index 1543180..9b6cff0 100644
--- a/api/join.js
+++ b/api/join.js
@@ -17,8 +17,8 @@ export function getShopData(params) {
// 查看商户申请
// 1-特产供应商 2-店铺 3-文玩供应商
-export function getShopInfo() {
- return request.get("/merchantApply/info", {}, {login: true})
+export function getShopInfo(params) {
+ return request.get("/merchantApply/info", params, {login: true})
}
// 4-采购批发商
@@ -38,6 +38,18 @@ export function saveShop(hotelInfo, partnerId = '', promoterUid = '') {
return request.post("/merchantApply/hotel/submit", param, {login: true})
}
+// 保存店铺入驻草稿
+export function saveHotelDraft(hotelInfo, partnerId = '', promoterUid = '') {
+ let param = {hotelInfo, captcha: hotelInfo.captcha};
+ if (partnerId && partnerId.length > 0) {
+ param.partnerId = partnerId;
+ }
+ if (promoterUid && promoterUid.length > 0) {
+ param.promoterUid = promoterUid;
+ }
+ return request.post("/merchantApply/hotel/saveDraft", param, {login: true})
+}
+
// 提交特产供应商入驻申请
export function saveSupplier(hotelInfo, supplierInfo, partnerId = '', promoterUid = '') {
let param = {hotelInfo, supplierInfo, captcha: supplierInfo.captcha};
@@ -62,12 +74,30 @@ export function saveWenwanSupplier(hotelInfo, supplierInfo, partnerId = '', prom
return request.post("/merchantApply/wenwanSupplier/submit", param, {login: true})
}
+// 保存供应商入驻草稿(特产/文玩共用)
+export function saveSupplierDraft(hotelInfo, supplierInfo, partnerId = '', promoterUid = '') {
+ let param = {hotelInfo, supplierInfo, captcha: supplierInfo.captcha};
+ if (partnerId && partnerId.length > 0) {
+ param.partnerId = partnerId;
+ }
+ if (promoterUid && promoterUid.length > 0) {
+ param.promoterUid = promoterUid;
+ }
+ return request.post("/merchantApply/supplier/saveDraft", param, {login: true})
+}
+
// 提交采购批发商入驻申请
export function saveWholesaler(wholesalerInfo) {
let param = {wholesalerInfo, captcha: wholesalerInfo.captcha};
return request.post("/merchantApply/wholesaler/submit", param, {login: true})
}
+// 保存采购批发商入驻草稿
+export function saveWholesalerDraft(wholesalerInfo) {
+ let param = {wholesalerInfo, captcha: wholesalerInfo.captcha};
+ return request.post("/merchantApply/wholesaler/saveDraft", param, {login: true})
+}
+
export function saveExperienceStore(params) {
return request.post("/merchantApply/experienceStore/submit", params, {login: true})
}
diff --git a/assets/css/aiChat.less b/assets/css/aiChat.less
index b7846fb..6311185 100644
--- a/assets/css/aiChat.less
+++ b/assets/css/aiChat.less
@@ -8,18 +8,22 @@ page {
justify-content: space-between;
}
.fix-tabbar-page {
- position: relative;
- min-height: 100vh;
- background: linear-gradient(155deg, rgba(61, 76, 241, 0.15) 0%, rgba(255,255,255,1) 25%, rgba(255,255,255,1) 75%, rgba(61, 76, 241, 0.15) 100%);
- // background-color: #fff;
- // background-size: 100% calc(100vh - 160rpx);
- // background-image: url(https://wxapp.xdd618.com/api/file/pic/aiChat/bg.png);
- // background-repeat: no-repeat;
- // background-attachment: fixed;
- &.new-chat {
- background-size: 100% calc(100vh - 160rpx);
- background-repeat: no-repeat;
- }
+ position: relative;
+ z-index: 0;
+ min-height: 100vh;
+ background: transparent;
+ isolation: isolate;
+ &::before {
+ content: '';
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: -1;
+ pointer-events: none;
+ background: linear-gradient(155deg, rgba(61, 76, 241, 0.15) 0%, rgba(255,255,255,1) 25%, rgba(255,255,255,1) 75%, rgba(61, 76, 241, 0.15) 100%);
+ }
.fix-tabbar-header {
position: fixed;
top: 0;
diff --git a/assets/css/pkg_join.less b/assets/css/pkg_join.less
index 9c468fc..3ab1dcc 100644
--- a/assets/css/pkg_join.less
+++ b/assets/css/pkg_join.less
@@ -127,6 +127,25 @@
height: 52vh;
overflow-y: auto;
margin: 30rpx 0;
+
+ // 小程序rich-text内块级标签无默认段间距,补充与后台富文本编辑器一致的段落格式
+ rich-text {
+ display: block;
+ width: 100%;
+
+ p, div, ul, ol {
+ display: block;
+ margin: 0 0 16rpx;
+
+ &:last-child {
+ margin-bottom: 0;
+ }
+ }
+
+ li {
+ margin: 0 0 8rpx;
+ }
+ }
}
.agree-box {
diff --git a/assets/script/global.js b/assets/script/global.js
index 5f4d9f5..347311f 100644
--- a/assets/script/global.js
+++ b/assets/script/global.js
@@ -42,9 +42,20 @@ export default {
},
goSupplierMini() {
+ // 区分当前小程序环境:正式版跳正式版,体验版/开发版跳体验版
+ let envVersion = 'release'
+ try {
+ const accountInfo = uni.getAccountInfoSync()
+ if (accountInfo && accountInfo.miniProgram && accountInfo.miniProgram.envVersion !== 'release') {
+ envVersion = 'trial'
+ }
+ } catch (e) {
+ envVersion = 'release'
+ }
uni.navigateToMiniProgram({
appId: "wx9ca93d1f2a9c8156",
path: "pages/auth/login",
+ envVersion,
success(msg) {
console.log("success", msg)
},
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.json b/pages.json
index 92728cc..04d8535 100644
--- a/pages.json
+++ b/pages.json
@@ -355,7 +355,7 @@
{
"path": "views/wholesaler",
"style": {
- "navigationBarTitleText": "采购批发商入驻"
+ "navigationBarTitleText": "礼品集采中心入驻"
}
},
{
diff --git a/pages/Loading/index.vue b/pages/Loading/index.vue
index 33a3b90..5148562 100644
--- a/pages/Loading/index.vue
+++ b/pages/Loading/index.vue
@@ -49,21 +49,18 @@ export default {
// 注释下面一行,会停留在启动页
setTimeout(() => {
this.toLaunch();
- }, 2000)
+ }, 5000)
return;
}
+ // 未登录:静默处理登录,5秒后跳转业务页面
cookie.get("spread");
- // this.toLaunch();
- if (this.$deviceType == "app") {
- // this.toLaunch();
- this.$yrouter.switchTab({
- path: "/pages/home/index"
- });
- return;
+ if (this.$deviceType != "app") {
+ //检查授权信息
+ this.checkUserInfo();
}
-
- //检查授权信息
- this.checkUserInfo();
+ setTimeout(() => {
+ this.toLaunch();
+ }, 5000);
},
methods: {
...mapActions(["changeAuthorization", "setUserInfo"]),
@@ -89,11 +86,7 @@ export default {
}
}
- login(loginInfo).finally(() => {
- this.$yrouter.switchTab({
- path: "/pages/home/index"
- });
- });
+ login(loginInfo);
}
diff --git a/pages/VideoPlayBackList/VideoPlayBackList.vue b/pages/VideoPlayBackList/VideoPlayBackList.vue
index b2fd8c7..e74a49a 100644
--- a/pages/VideoPlayBackList/VideoPlayBackList.vue
+++ b/pages/VideoPlayBackList/VideoPlayBackList.vue
@@ -6,27 +6,42 @@
-
+
-
-
-
+
+
+
- {{ item.title }}
+ {{ lItem.title }}
-
+
+
+
+
+
+ {{ rItem.title }}
+
+
+
+
-
+
暂无数据
@@ -38,6 +53,11 @@ import {getStoreVideoType, getArticleList} from '@/api/public'
import {getVideoList} from '@/api/user'
import { pageListenMixins } from '@/mixins/pageListenMixins'
+// 封面固定宽度(rpx)
+const COVER_WIDTH = 332
+// 每项除封面外的文字内容预估高度(rpx)
+const TEXT_HEIGHT = 120
+
export default {
mixins: [pageListenMixins],
data() {
@@ -48,11 +68,19 @@ export default {
page: 1,
limit: 10,
keyword: '',
- list: [],
+ leftList: [],
+ rightList: [],
+ leftHeight: 0,
+ rightHeight: 0,
isWait: false,
pageKeyId: Object.freeze('findVideoList')
}
},
+ computed: {
+ hasList() {
+ return this.leftList.length + this.rightList.length > 0
+ }
+ },
onLoad(options) {
if (!options.click) {
uni.switchTab({ url: '/pages/home/index' })
@@ -78,10 +106,16 @@ export default {
changeType(item) {
this.type = item.value
this.page = 1
- this.list = []
+ this.resetList()
this.fetchList()
},
- fetchList() {
+ resetList() {
+ this.leftList = []
+ this.rightList = []
+ this.leftHeight = 0
+ this.rightHeight = 0
+ },
+ async fetchList() {
if (this.isWait) return
this.isWait = true
const params = {
@@ -89,16 +123,47 @@ export default {
page: this.page,
limit: this.limit
}
- getVideoList(params).then(res => {
+ try {
+ const res = await getVideoList(params)
if (res.status === 200) {
- for (let i = 0; i < res.data.length; i++) {
- res.data[i].hide = true
- this.list.push(res.data[i])
+ const items = res.data
+ for (let i = 0; i < items.length; i++) {
+ items[i].hide = true
}
+ // 并行获取所有封面高度
+ const heights = await Promise.all(items.map(item => this.getImageHeight(item.cover)))
+ items.forEach((item, i) => {
+ this.pushToColumn(item, heights[i] + TEXT_HEIGHT)
+ })
}
+ } catch (e) {
+ // 忽略请求或图片尺寸获取失败
+ } finally {
this.isWait = false
+ }
+ },
+ getImageHeight(src) {
+ return new Promise(resolve => {
+ uni.getImageInfo({
+ src,
+ success: res => {
+ resolve(res.height / res.width * COVER_WIDTH)
+ },
+ fail: () => {
+ resolve(COVER_WIDTH)
+ }
+ })
})
},
+ pushToColumn(item, height) {
+ if (this.leftHeight <= this.rightHeight) {
+ this.leftList.push(item)
+ this.leftHeight += height
+ } else {
+ this.rightList.push(item)
+ this.rightHeight += height
+ }
+ },
goDetail(item) {
this.$yrouter.push("/pages/VideoPlayBackList/VideoPlayBackDetail?videoUrl=" + item.video + '&id=' + item.id + '&click=1')
}
@@ -129,25 +194,22 @@ export default {
margin: 28rpx 32rpx;
.video-waterfalls-wrap {
- direction: ltr;
+ display: flex;
+ justify-content: space-between;
+ align-items: flex-start;
+ }
- /deep/ .waterfalls-flow {
- direction: ltr;
- text-align: left;
- }
-
- /deep/ .waterfalls-flow-column {
- float: left !important;
- }
+ .waterfalls-column {
+ width: 332rpx;
}
.item {
+ margin-bottom: 20rpx;
border-radius: 4rpx;
background: #fff;
.cover {
width: 332rpx;
- //height: 200rpx;
vertical-align: middle;
}
diff --git a/pages/home/index.vue b/pages/home/index.vue
index 858c2ea..47a992e 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -916,6 +916,18 @@ export default {
}
app.globalData.homeDrawPosterShownInSession = true
},
+ hasShownOldUserPopupInSession() {
+ const app = getApp && getApp()
+ return Boolean(app && app.globalData && app.globalData.homeOldUserPopupShownInSession)
+ },
+ markOldUserPopupShownInSession() {
+ const app = getApp && getApp()
+ if (!app) return
+ if (!app.globalData) {
+ app.globalData = {}
+ }
+ app.globalData.homeOldUserPopupShownInSession = true
+ },
initPosterPopupState(data = {}) {
const drawEntranceConfig = data.drawEntranceConfig || {}
this.$set(this, 'drawEntranceConfig', drawEntranceConfig)
@@ -932,10 +944,19 @@ export default {
(data.lotteryCanDraw || false)
)
this.isDrawPosterVisible = shouldShowDrawPoster
- this.isOldUser = !shouldShowDrawPoster && !hasShownDrawPosterInSession && this.canShowOldPoster
+ const shouldShowOldUserPopup =
+ !shouldShowDrawPoster &&
+ !hasShownDrawPosterInSession &&
+ this.canShowOldPoster &&
+ !this.hasShownOldUserPopupInSession()
+ if (shouldShowOldUserPopup) {
+ this.markOldUserPopupShownInSession()
+ }
+ this.isOldUser = shouldShowOldUserPopup
},
showNextPoster() {
- if (!this.isDrawPosterVisible && this.canShowOldPoster) {
+ if (!this.isDrawPosterVisible && this.canShowOldPoster && !this.hasShownOldUserPopupInSession()) {
+ this.markOldUserPopupShownInSession()
this.isOldUser = true
}
},
diff --git a/pages/order/MyOrder/index.vue b/pages/order/MyOrder/index.vue
index 79a070d..3eac9b2 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) }}
+
+
+
+
+
+ {{ item.sku }}
+
+ x{{ item.qty }}
+
+
+ 礼品价值:
+ ¥{{ force2Decimal(item.giftValue) }}
+
+
+
+
@@ -244,7 +282,7 @@
-
+
{{ order.createTime }}
- 共{{ order.totalNum || 0 }}件商品
-
+ 共{{ getOrderTotalNum(order) }}件商品
+
,总金额
@@ -309,7 +347,7 @@
¥
- {{ force2Decimal(order.payPrice) }}
+ {{ force2Decimal(getOrderPayPrice(order)) }}
@@ -351,63 +389,101 @@
v-if="!order.isGiftCardSend && !order.experienceOrderInfo"
class="bottom flex jc-between ai-center"
>
-
-
- 更多
-
- 联系商家
- 申请退款
-
-
-
+
- 联系客服
-
联系商家
-
+
修改地址
+ 查看详情
申请退款
+ 确认收货
+ 删除订单
-
-
+
+
+ 更多
+
+ 联系商家
+ 申请退款
+
+
+
+
+ 联系客服
+
+
+ 联系商家
+
+
+ 查看详情
+ 删除订单
+
+
+
+
+
this.normalizeCollectiveDisplayItem(item, true))
+ }
+ if (this.isCollectiveWholesalerOrder(order)) {
+ return this.getCollectiveProductList(order).map(item => this.normalizeCollectiveDisplayItem(item))
+ }
+ return []
+ },
+ getCollectiveTotalNum(order) {
+ const totalNum = Number(order && order.totalNum)
+ if (totalNum > 0) {
+ return totalNum
+ }
+ return this.getCollectiveDisplayItems(order).reduce((sum, item) => sum + Number(item.qty || 0), 0)
+ },
+ getCollectiveProductImage(cart) {
+ const productInfo = (cart && cart.productInfo) || {}
+ const attrInfo = productInfo.attrInfo || {}
+ return productInfo.image || attrInfo.image || ''
+ },
+ getCollectiveProductName(cart) {
+ const productInfo = (cart && cart.productInfo) || {}
+ return productInfo.storeName || cart.storeName
+ },
+ getCollectiveProductSku(cart) {
+ const productInfo = (cart && cart.productInfo) || {}
+ const attrInfo = productInfo.attrInfo || {}
+ return attrInfo.sku || cart.sku || ''
+ },
+ showCollectiveContact(order) {
+ const statusType = this.getCollectiveStatusType(order)
+ if (!this.isCollectiveWholesalerOrder(order)) {
+ return false
+ }
+ return Boolean(
+ (order.merName || order.storeName || order.merPhone || order.merId) &&
+ [1, 2, 4, -1, -2, -3].includes(statusType)
+ )
+ },
+ showCollectiveModifyAddress(order) {
+ const statusType = this.getCollectiveStatusType(order)
+ if (statusType !== 1) {
+ return false
+ }
+ if (!(this.isCollectiveWholesalerOrder(order) || this.isCollectiveCustomGiftOrder(order))) {
+ return false
+ }
+ return this.canShowModifyAddress(order)
+ },
+ showCollectiveDelete(order) {
+ return Number(order._status && order._status._type) === 9
+ },
+ showCollectiveTakeOrder(order) {
+ return this.getCollectiveStatusType(order) === 2
+ },
+ showCollectiveDetail(order) {
+ const statusType = this.getCollectiveStatusType(order)
+ if (this.isCollectiveCustomGiftOrder(order)) {
+ return [1, 4].includes(statusType)
+ }
+ if (this.isCollectiveWholesalerOrder(order)) {
+ return [1, 4, -1, -2, -3].includes(statusType)
+ }
+ return false
+ },
+ showCollectiveRefund(order) {
+ const statusType = this.getCollectiveStatusType(order)
+ if (!this.isCollectiveWholesalerOrder(order)) {
+ return false
+ }
+ return statusType === 2
+ },
isRefundFlow(order) {
if (!order) {
return false
@@ -1016,6 +1398,13 @@ export default {
}
return orderOrIndex
},
+ handleOrderStoreClick(orderOrIndex) {
+ const order = this.getOrderByIndex(orderOrIndex)
+ if (!order || this.isCollectiveCenterMode) {
+ return
+ }
+ this.goStore(order)
+ },
delOrder(orderOrIndex) {
const order = this.getOrderByIndex(orderOrIndex)
if (!order) {
@@ -1026,7 +1415,11 @@ export default {
return
}
delOrderHandle(order.orderId).then(() => {
- this.changeType()
+ this.getOrderData()
+ const index = this.orderList.indexOf(order)
+ if (index > -1) {
+ this.orderList.splice(index, 1)
+ }
})
},
goStore(orderOrIndex) {
@@ -1409,44 +1802,50 @@ export default {
}
result.push({
...item,
- showMore: false
+ showMore: false,
+ // 盲盒订单确认收货后需展示真实商品,后端字段未随状态更新,按订单状态兜底修正
+ isGiftCardReceiveBlind: this.resolveBlindBoxDisplayFlag(item)
})
return result
}, [])
},
+ // 盲盒订单在确认收货后(待评价 3 / 已完成 4)应展示真实商品信息;
+ // 后端 isGiftCardReceiveBlind 未随收货状态更新,这里依据订单状态兜底修正
+ resolveBlindBoxDisplayFlag(order) {
+ const raw = order && order.isGiftCardReceiveBlind
+ if (Number(raw) !== 1) {
+ return raw
+ }
+ const statusType = Number(order && order._status && order._status._type)
+ if (statusType === 3 || statusType === 4) {
+ return 0
+ }
+ return 1
+ },
tabChange(item) {
this.type = item.index
- this.$yroute.query.type = this.type
+ const query = this.getPageQuery()
+ query.type = this.type
this.changeType()
},
- orderTypeTabChange(item) {
+ orderTypeTabChange(item, options = {}) {
+ const { resetFilters = true } = options
this.orderTypeTabIndex = item.index
this.orderType = item.orderType
+ const query = this.getPageQuery()
+ query.tabIndex = this.orderTypeTabIndex
this.updateTabListByOrderType()
+ if (resetFilters) {
+ this.type = 0
+ this.resetFilterConditions()
+ } else if (this.type > this.tabList.length - 1) {
+ this.type = 0
+ }
+ query.type = this.type
this.changeType(this.type)
},
updateTabListByOrderType() {
- if (this.orderType === 'travel') {
- this.tabList = [
- { name: '全部' },
- { name: '待付款' },
- { name: '待确认' },
- { name: '待使用' },
- { name: '退款/售后' },
- { name: '待评价' },
- { name: '已完成' }
- ]
- } else {
- this.tabList = [
- { name: '全部' },
- { name: '待付款' },
- { name: '待发货' },
- { name: '待收货/待核销' },
- { name: '退款/售后' },
- { name: '待评价' },
- { name: '已完成' }
- ]
- }
+ this.tabList = this.getDefaultTabListByOrderType()
},
goUserCenter() {
this.$yrouter.switchTab({
@@ -1468,23 +1867,15 @@ export default {
uni.showLoading({
mask: true,
})
- const types = {
- 0: 0,
- 1: 1,
- 2: 2,
- 3: 3,
- 4: -3,
- 5: 4,
- 6: 5,
- }
- const type = types[this.type]
+ const typeMap = this.getRequestTypeMapByOrderType()
+ const type = typeMap[this.type]
const {
page,
limit,
keyword,
orderType
} = this
- getOrderList({
+ return getOrderList({
page,
limit,
type,
@@ -1507,6 +1898,24 @@ export default {
uni.hideLoading()
});
},
+ // 保持当前主/子tab及滚动位置刷新列表(从订单详情页返回后同步删除等状态变更)
+ refreshOrderListKeepPosition() {
+ this.orderListRequestId += 1
+ this.page = 1
+ this.loaded = false
+ this.loading = false
+ const restoreScrollTop = this.savedScrollTop
+ this.getOrderListReq().then(() => {
+ if (restoreScrollTop > 0) {
+ this.$nextTick(() => {
+ uni.pageScrollTo({
+ scrollTop: restoreScrollTop,
+ duration: 0
+ })
+ })
+ }
+ })
+ },
tapShowMore(index) {
const order = this.getOrderByIndex(index)
if (!order) {
@@ -1617,6 +2026,9 @@ export default {
},
onReachBottom() {
!this.loading && this.getOrderListReq()
+ },
+ onPageScroll(e) {
+ this.savedScrollTop = e.scrollTop
}
};
@@ -1799,6 +2211,10 @@ page {
.my-order .list .item .item-info .attr-wrap {
margin: 10rpx 0 0 0;
}
+.my-order .list .item .item-info .gift-value-row {
+ margin-top: 12rpx;
+ line-height: 36rpx;
+}
.my-order .list .item .item-info .text .name {
width: calc(100% - 120rpx);
}
diff --git a/pages/shop/GoodsCon/index.vue b/pages/shop/GoodsCon/index.vue
index b2bd15f..afb8657 100644
--- a/pages/shop/GoodsCon/index.vue
+++ b/pages/shop/GoodsCon/index.vue
@@ -900,14 +900,14 @@ export default {
handleLoginFailure()
return
}
- console.log(this.storeInfo);
+ console.log(this.attr);
const params = {
goodsId: this.id,
goodsName: this.attr.productSelect.store_name,
skuStr: this.attrValue,
price: this.attr.productSelect.price,
seckillId: this.activityId,
- cover: this.attr.productSelect.image,
+ cover: this.attr.productSelect.image || this.storeInfo.image,
goodsData: '',
seckillData: '',
isNegotiable: this.storeInfo.isNegotiable
@@ -1276,7 +1276,7 @@ export default {
'store_name',
this.storeInfo.storeName
)
- this.$set(this.attr.productSelect, 'image', productSelect.image)
+ this.$set(this.attr.productSelect, 'image', productSelect.image || this.storeInfo.image)
this.$set(this.attr.productSelect, 'price', productSelect.price)
this.$set(this.attr.productSelect, 'otPrice', productSelect.otPrice)
this.$set(this.attr.productSelect, 'stock', productSelect.stock)
@@ -1403,7 +1403,7 @@ export default {
subItem.check = true
}
})
- this.$set(this.attr.productSelect, 'image', productSelect.image)
+ this.$set(this.attr.productSelect, 'image', productSelect.image || this.storeInfo.image)
this.$set(this.attr.productSelect, 'price', productSelect.price)
this.$set(this.attr.productSelect, 'otPrice', productSelect.otPrice)
this.$set(this.attr.productSelect, 'stock', productSelect.stock)
diff --git a/pagesInn/inn/innApply.vue b/pagesInn/inn/innApply.vue
index bb949ae..449166c 100644
--- a/pagesInn/inn/innApply.vue
+++ b/pagesInn/inn/innApply.vue
@@ -219,7 +219,6 @@ import CitySelect from "@/components/CitySelect";
import tmUpload from '@/components/tm-upload/tm-upload.vue';
import {getCity} from "@/api/user";
import {chooseImage, isWeixin} from "@/utils";
-import {getHomeData} from "@/api/public";
import {VUE_APP_API_URL} from "@/config"
import {getHotelTypeList, postHotelApply, postHotelReApply} from "@/api/inn.js";
@@ -440,81 +439,7 @@ export default {
}
});
},
- getIndex(value, arr) {
- var idx = -1;
- for (var i = 0; i < arr.length; i++) {
- if (arr[i].n == value) {
- idx = i;
- break;
- }
- }
- return idx;
- },
- getCityList: function () {
- let that = this;
- getCity()
- .then(res => {
- that.district = res.data;
- // that.ready = true;
-
- // if(this.id){
- // //设置city_id
- // var pIdx = that.getIndex(that.address.province,that.district);
- // if(pIdx>-1){
- // var citys = that.district[pIdx].c;
- // var cIdx = that.getIndex(that.address.city,citys);
- // if(cIdx>-1){
- // var city = citys[cIdx];
- // that.address.city_id = city.v;
- // console.log('city_id:'+city.v);
- // }
- // }
- // }
-
- })
- .catch(err => {
- that.$dialog.error(err.msg);
- });
- },
- chooseQrcodeImg: function () {
- chooseImage(img => {
- console.log(img)
- that.$set(that.innApplyInfo, 'qrcode', img);
-
- });
- },
- chooseLogoImg: function () {
- chooseImage(img => {
- console.log(img)
-
- that.innApplyInfo.logo = img;
-
- });
- },
- chooseCoverImg: function () {
- chooseImage(img => {
- console.log(img)
-
- that.innApplyInfo.cover = img;
-
- });
- },
- //文件上传结果
- uploadedImgChange: function (uploadedFilesList) {
- this.uploadedFilesArray = uploadedFilesList;
- },
- submit: function () {
-
- if (this.innApplyInfo.name.length == 0) {
- this.$dialog.error("请输入店铺名称");
- return;
- }
-
- if (this.innApplyInfo.type.length == 0) {
- this.$dialog.error("请选择店铺类型");
- return;
- }
-
+ submit() {
if (this.addressText.length == 0) {
this.$dialog.error("请选择店铺所在省市区");
return;
diff --git a/pagesOrder/order/OrderDetails/index.vue b/pagesOrder/order/OrderDetails/index.vue
index 4b427ed..c9ea777 100644
--- a/pagesOrder/order/OrderDetails/index.vue
+++ b/pagesOrder/order/OrderDetails/index.vue
@@ -93,7 +93,7 @@
-
+
-
-
+
+
-
+
- {{ cart.productInfo.storeName }}
+ {{ cart.name }}
-
- {{ cart.productInfo.attrInfo.sku || '' }}
+
+ {{ cart.sku }}
{{ orderInfo.drawOrderInfo.prizeAttrName || '' }}
-
+
¥
- {{ cart.truePrice }}
+ {{ force2Decimal(cart.price) }}
- x{{ cart.cartNum }}
+ x{{ cart.qty }}
@@ -244,16 +244,29 @@
-
-
-
- 商品总价
+
+
+
+
+ {{ '礼品价值' }}
+
+
+ ¥
+
+ {{ force2Decimal(orderInfo.customGiftInfo.giftValue) }}
+
+
-
- ¥
-
- {{ force2Decimal(orderInfo.totalPrice) }}
-
+
+
+ {{ '商品总价' }}
+
+
+ ¥
+
+ {{ force2Decimal(orderInfo.totalPrice) }}
+
+
@@ -354,11 +367,11 @@
订单类型
{{ orderTypeName }}
-
+
支付状态
{{ orderInfo.paid ? "已支付" : "未支付" }}
-
+
支付方式
{{ orderInfo._status._payType }}
@@ -500,7 +513,14 @@
-
+
+ 修改地址
+
+
联系客服
联系商家
@@ -515,7 +535,10 @@
-
+
+ 确认收货
+
+
联系客服
@@ -548,8 +571,12 @@
申请退款
- 再买一单
- 立即评价
+ 再买一单
+ 立即评价
@@ -562,17 +589,17 @@
联系商家
- 再买一单
+ 再买一单
联系商家
-
- 再买一单
+
+ 再买一单
立即评价
@@ -850,9 +877,12 @@ export default {
}
})
},
- goGoodsCon(item, isGiftCardReceiveBlind, isDrawOrder) {
+ goGoodsCon(item, isGiftCardReceiveBlind, isDrawOrder, scenarioCode) {
if(isGiftCardReceiveBlind) return
if(isDrawOrder) return
+ // 采购批发订单(集采中心)商品卡片不跳转批发商品详情页
+ if (Number(scenarioCode) === 22) return
+ if (Number(scenarioCode) === 24) return
const activityId = Number(
item.drawActivityId ||
(item.productInfo && item.productInfo.drawActivityId) ||
@@ -1029,6 +1059,83 @@ export default {
}
return status;
},
+ getOrderScenarioCode(order = this.orderInfo) {
+ return Number(order && order.scenarioCode)
+ },
+ isWholesalerOrder(order = this.orderInfo) {
+ return this.getOrderScenarioCode(order) === 22
+ },
+ isCustomGiftOrder(order = this.orderInfo) {
+ return this.getOrderScenarioCode(order) === 24
+ },
+ isBlindBoxOrder(order = this.orderInfo) {
+ return Number(order && order.isGiftCardReceiveBlind) === 1
+ },
+ isCollectiveOrder(order = this.orderInfo) {
+ return this.isWholesalerOrder(order) || this.isCustomGiftOrder(order)
+ },
+ canShowOrderEvaluate(order = this.orderInfo) {
+ // 仅排除送礼方订单(送礼人未收货不可评价);收礼方订单确认收货后可评价,与订单列表【去评价】逻辑保持一致
+ return Number(order.isGiftCardSend || 0) !== 1 && !this.isCollectiveOrder(order)
+ },
+ formatOrderDetailImage(image) {
+ const imageUrl = String(image || '').trim()
+ if (!imageUrl) {
+ return ''
+ }
+ if (/^https?:\/\//i.test(imageUrl)) {
+ return imageUrl
+ }
+ if (imageUrl.startsWith('//')) {
+ return `https:${imageUrl}`
+ }
+ if (imageUrl.startsWith('/')) {
+ const apiBaseUrl = String(this.$VUE_APP_API_URL || '').replace(/\/api\/?$/, '')
+ return `${apiBaseUrl}${imageUrl}`
+ }
+ return imageUrl
+ },
+ normalizeOrderDetailItem(item = {}, isCustomGift = false) {
+ if (isCustomGift) {
+ return {
+ image: this.formatOrderDetailImage(item.giftImage),
+ name: item.giftName || '商品信息',
+ sku: item.specName || '',
+ qty: Number(item.giftNum) || 1,
+ price: 0,
+ showPrice: false,
+ productId: '',
+ productInfo: {}
+ }
+ }
+ const productInfo = item.productInfo || {}
+ const attrInfo = productInfo.attrInfo || {}
+ return {
+ ...item,
+ image: this.formatOrderDetailImage(item.image || productInfo.image || attrInfo.image || ''),
+ name: productInfo.storeName || item.storeName || item.productName || '商品信息',
+ sku: attrInfo.sku || item.sku || item.specName || '',
+ qty: Number(item.cartNum || item.num || item.quantity || 1) || 1,
+ price: Number(item.truePrice || item.price || attrInfo.price || productInfo.price || 0) || 0,
+ showPrice: true,
+ productId: item.productId || productInfo.id || ''
+ }
+ },
+ getOrderDetailDisplayItems(order = this.orderInfo) {
+ if (this.isCustomGiftOrder(order)) {
+ const customGiftInfo = order && order.customGiftInfo
+ if (!customGiftInfo || typeof customGiftInfo !== 'object' || Array.isArray(customGiftInfo)) {
+ return []
+ }
+ return [this.normalizeOrderDetailItem(customGiftInfo, true)]
+ }
+ const cartList = Array.isArray(order && order.cartInfo) ? order.cartInfo : []
+ // 盲盒订单隐藏商品信息,固定展示一个盲盒礼包行(cartInfo 为空时也要展示)
+ if (this.isBlindBoxOrder(order)) {
+ return [this.normalizeOrderDetailItem(cartList[0] || {})]
+ }
+ return cartList.map(item => this.normalizeOrderDetailItem(item))
+ },
getStatusImg(order) {
const type = parseInt(order._status._type);
let imgUrl = "";
@@ -1061,9 +1168,6 @@ export default {
}
return imgUrl;
},
- isGiftOrder(order = {}) {
- return Number(order.isGiftCardSend || 0) === 1 || Number(order.isGiftCardReceive || 0) === 1
- },
subscribePay() {
uni.requestSubscribeMessage({
tmplIds: settings.SubscribeMessageTmplIds,
@@ -1154,16 +1258,17 @@ export default {
});
},
goBack() {
- if (this.name === "MyOrder") {
+ // 从订单列表进入时直接返回原页面,保留列表页主/子tab及滚动位置
+ const pages = getCurrentPages()
+ const prevPage = pages && pages[pages.length - 2]
+ const prevRoute = prevPage && prevPage.route
+ if (prevRoute && prevRoute.indexOf('order/MyOrder') > -1) {
this.$yrouter.back();
return;
- } else {
- console.log(this);
- this.$yrouter.replace({
- path: "/pages/order/MyOrder/index"
- });
- return;
}
+ this.$yrouter.replace({
+ path: "/pages/order/MyOrder/index"
+ });
},
cancelOrder() {
cancelOrderHandle(this.orderInfo.orderId)
@@ -1279,8 +1384,19 @@ export default {
orderDetail(id).then(res => {
this.orderInfo = res.data
this.orderInfo._status._type = parseInt(this.orderInfo._status._type)
+ // 盲盒订单确认收货后(待评价 3 / 已完成 4)展示真实商品信息,
+ // 后端 isGiftCardReceiveBlind 未随收货状态更新,按订单状态兜底修正
+ if (Number(this.orderInfo.isGiftCardReceiveBlind) === 1 && [3, 4].includes(this.orderInfo._status._type)) {
+ this.orderInfo.isGiftCardReceiveBlind = 0
+ }
this.getOrderStatus()
- if (this.orderInfo.combinationId > 0) {
+ if (this.isWholesalerOrder(this.orderInfo)) {
+ this.orderTypeName = "采购批发订单"
+ this.orderTypeNameStatus = false
+ } else if (this.isCustomGiftOrder(this.orderInfo)) {
+ this.orderTypeName = "自建礼品订单"
+ this.orderTypeNameStatus = false
+ } else if (this.orderInfo.combinationId > 0) {
this.orderTypeName = "拼团订单"
this.orderTypeNameStatus = false
} else if (this.orderInfo.bargainId > 0) {
diff --git a/pkg_common/views/room.vue b/pkg_common/views/room.vue
index cf598e5..b89bc0e 100644
--- a/pkg_common/views/room.vue
+++ b/pkg_common/views/room.vue
@@ -11,9 +11,9 @@
{{ item.username }}
{{ item.msg_content }}
-
+
-
+
@@ -22,7 +22,7 @@
{{ item.username }}
{{ item.msg_content }}
-
+
@@ -179,6 +179,12 @@ export default {
wsJson(json) {
return JSON.parse(json)
},
+ // 拼接图片完整地址:七牛上传后消息里只存 key,需要补上资源域名;http 统一转 https
+ imgUrl(content) {
+ if (!content) return ''
+ if (/^https?:\/\//i.test(content)) return content.replace(/^http:\/\//i, 'https://')
+ return this.webUrl + '/' + content
+ },
getUploadToken() {
let that = this;
diff --git a/pkg_join/views/experienceStore.vue b/pkg_join/views/experienceStore.vue
index e31a8dc..7997ba5 100644
--- a/pkg_join/views/experienceStore.vue
+++ b/pkg_join/views/experienceStore.vue
@@ -396,7 +396,7 @@
/>
-
+
-
+
@@ -440,7 +440,6 @@
@@ -451,7 +450,7 @@