Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
736112a28d | ||
|
|
46d8fe8b70 | ||
|
|
108f204f03 | ||
|
|
77fee4ea46 | ||
|
|
0e04c560bc | ||
|
|
e6d8bff772 | ||
|
|
44093a5893 | ||
|
|
7f058ec10b | ||
|
|
c226263289 | ||
|
|
a59d10e7dc | ||
|
|
3523ce5599 | ||
|
|
41d9da4c7e | ||
|
|
733048e2c9 | ||
|
|
8c00c82e3f | ||
|
|
452f3e3327 | ||
|
|
61cecbe8e5 | ||
|
|
88147f3783 | ||
|
|
069f0fa413 | ||
|
|
6e14b8dd69 | ||
|
|
ed5792b860 | ||
|
|
98a142dba1 | ||
|
|
b3ae93633c | ||
|
|
cb5449eaac | ||
|
|
37c1277a83 | ||
|
|
05d7400f64 | ||
|
|
36585188c4 | ||
|
|
2ee9876f01 | ||
|
|
1687f417d7 | ||
|
|
59dec5c11c | ||
|
|
d5d85d2cd2 | ||
|
|
708aa88914 | ||
|
|
dfb92b7332 | ||
|
|
df47b96e87 | ||
|
|
5d8ea0cbd5 | ||
|
|
f38ba76ac0 | ||
|
|
1845171a1e | ||
|
|
007e80bebb | ||
|
|
a427cfbb92 | ||
|
|
f1e063aab9 | ||
|
|
876e15b655 | ||
|
|
b0d8d3163e | ||
|
|
1e58a29d9b | ||
|
|
e6ff7fafce | ||
|
|
640d61fd49 | ||
|
|
6843be82cb | ||
|
|
c58f785304 | ||
|
|
2062046901 | ||
|
|
1adef8d00b | ||
|
|
62b227034f | ||
|
|
60c3e0f572 | ||
|
|
0f76d54e27 | ||
|
|
0369f0f1d3 | ||
|
|
085730bb9c | ||
|
|
d68f734f95 | ||
|
|
41d99e95f9 | ||
|
|
ae72fc0a8f | ||
|
|
8e00a1e477 | ||
|
|
75d4b43e5e | ||
|
|
62d8cfd13b | ||
|
|
96b175a562 | ||
|
|
230fe66e82 | ||
|
|
20c53f245c | ||
|
|
ac741f9339 | ||
|
|
f0284d1b06 | ||
|
|
3ac6fa4e14 | ||
|
|
691f8eabd0 | ||
|
|
b0e7628f65 | ||
|
|
920e7cc1dc | ||
|
|
f4539ccf4a | ||
|
|
f20e73e859 | ||
|
|
57fc90b030 | ||
|
|
6b09cf8a90 | ||
|
|
4670b51a5a | ||
|
|
e729fb3c94 | ||
|
|
c6ef03434e | ||
|
|
f7a3bdc3fe | ||
|
|
b636cd905b | ||
|
|
9102c47804 | ||
|
|
238f56ab11 | ||
|
|
e92027d74e | ||
|
|
90d908a959 | ||
|
|
3f0ca5e55e | ||
|
|
63bebfdb94 | ||
|
|
35f7127134 | ||
|
|
50fe0e78c8 | ||
|
|
9f843f3bba | ||
|
|
eb3db99cb8 | ||
|
|
d7aecbe755 | ||
|
|
23f3d8b994 | ||
|
|
663d8f06fb | ||
|
|
e643ac58b7 | ||
|
|
37ba270104 | ||
|
|
3cd6f29e32 | ||
|
|
51e9d8b966 | ||
|
|
50363edc6e | ||
|
|
2bc47e46f1 | ||
|
|
6c851d4f29 | ||
|
|
76a877f2c2 | ||
|
|
55ed80acbc | ||
|
|
956d7bf70b | ||
|
|
62e7776b64 | ||
|
|
8f7ff49641 | ||
|
|
6d963a5bc0 | ||
|
|
b4c1ea20ac | ||
|
|
ffadc6c501 | ||
|
|
47ac886d5d | ||
|
|
f72a68ccc3 | ||
|
|
73fa5e35d4 | ||
|
|
93c9445008 | ||
|
|
ea44413ac1 | ||
|
|
13a9b7a2f6 | ||
|
|
80078cae78 | ||
|
|
27ac2a086d | ||
|
|
df87d0f9c8 | ||
|
|
7aeff7ece1 | ||
|
|
44f514393d | ||
|
|
7dcba7c04b | ||
|
|
01508b073f | ||
|
|
0b163f883f | ||
|
|
5d4ad3f427 | ||
|
|
fd583b7a2e | ||
|
|
7dedcf773f | ||
|
|
a8907717b2 | ||
|
|
ed23d2e220 | ||
|
|
7d55bdf879 | ||
|
|
4b56c2cce7 | ||
|
|
77e900e02c | ||
|
|
75e9c404fc | ||
|
|
0a70e4af6c | ||
|
|
11e294bcdc | ||
|
|
3e0e1542b6 | ||
|
|
ae3fbf914b | ||
|
|
8ee399823d | ||
|
|
dac7c96189 | ||
|
|
458d2b8b65 | ||
|
|
33a1125294 | ||
|
|
a2d0ef8dfa | ||
|
|
b0c4a5621e | ||
|
|
8c83e0a1bc | ||
|
|
97c4d7fe4f | ||
|
|
29827b250a | ||
|
|
edaba70c6e | ||
|
|
e5c7900b89 | ||
|
|
d69cf4c9e2 | ||
|
|
4a29b1cd27 | ||
|
|
df1c6dfb73 | ||
|
|
13201d251b | ||
|
|
be90572388 | ||
|
|
335793676b | ||
|
|
377852a65f | ||
|
|
f202fca716 | ||
|
|
d288547259 | ||
|
|
5568cf039e | ||
|
|
ef66206182 | ||
|
|
d00fe87625 | ||
|
|
749e3901f8 | ||
|
|
1710f4809c | ||
|
|
38545cd76e | ||
|
|
b9dcbe6560 | ||
|
|
50e143f13c | ||
|
|
7c65d839d9 | ||
|
|
f29ca88ab3 | ||
|
|
56402e37f3 | ||
|
|
c39f2a4da8 | ||
|
|
c894689365 | ||
|
|
5c23dc9773 | ||
|
|
bad10982b7 | ||
|
|
fe0397a483 | ||
|
|
a535c8192e | ||
|
|
2e1fa524fa | ||
|
|
48284adb6b | ||
|
|
2af9fe99ee | ||
|
|
5caa9b176a | ||
|
|
438b7a98e4 | ||
|
|
a2f1d9f59e | ||
|
|
c4787b56e8 | ||
|
|
0937a32bce | ||
|
|
cfef9c5b39 | ||
|
|
85906cbe44 |
@@ -372,7 +372,7 @@ export const chatMixins = {
|
|||||||
const _this = this
|
const _this = this
|
||||||
console.log('------------------创建连接')
|
console.log('------------------创建连接')
|
||||||
uni.connectSocket({
|
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: {
|
header: {
|
||||||
'content-type': 'application/json'
|
'content-type': 'application/json'
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ export const chatMixinsV2 = {
|
|||||||
audioPlayId: '',
|
audioPlayId: '',
|
||||||
showGiftBtn: false,
|
showGiftBtn: false,
|
||||||
buyLoading: false,
|
buyLoading: false,
|
||||||
|
buyActionLock: false,
|
||||||
exceptionConfig: {
|
exceptionConfig: {
|
||||||
model_exception: '您提的问题未能理解,云灵思想跑偏啦,重新整理一下问题或者重新提问,让云灵再试试!',
|
model_exception: '您提的问题未能理解,云灵思想跑偏啦,重新整理一下问题或者重新提问,让云灵再试试!',
|
||||||
voice_exception: ''
|
voice_exception: ''
|
||||||
@@ -333,7 +334,7 @@ export const chatMixinsV2 = {
|
|||||||
const _this = this
|
const _this = this
|
||||||
console.log('------------------创建连接')
|
console.log('------------------创建连接')
|
||||||
uni.connectSocket({
|
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: {
|
header: {
|
||||||
'content-type': 'application/json'
|
'content-type': 'application/json'
|
||||||
},
|
},
|
||||||
@@ -533,6 +534,10 @@ export const chatMixinsV2 = {
|
|||||||
this.productItemBuyNowOrGiftBuy(item, 2)
|
this.productItemBuyNowOrGiftBuy(item, 2)
|
||||||
},
|
},
|
||||||
productItemBuyNowOrGiftBuy(item, BuyNowOrGiftBuyType) {
|
productItemBuyNowOrGiftBuy(item, BuyNowOrGiftBuyType) {
|
||||||
|
if (this.buyActionLock) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.buyActionLock = true
|
||||||
this.audioStopHandle()
|
this.audioStopHandle()
|
||||||
this.cart_num = 1
|
this.cart_num = 1
|
||||||
this.m_id = item.id
|
this.m_id = item.id
|
||||||
@@ -540,6 +545,7 @@ export const chatMixinsV2 = {
|
|||||||
const { data } = res
|
const { data } = res
|
||||||
this.storeInfo = {...data.storeInfo}
|
this.storeInfo = {...data.storeInfo}
|
||||||
if(data.storeInfo.stock === 0) {
|
if(data.storeInfo.stock === 0) {
|
||||||
|
this.buyActionLock = false
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "产品库存不足,请选择其他商品",
|
title: "产品库存不足,请选择其他商品",
|
||||||
icon: "none",
|
icon: "none",
|
||||||
@@ -577,6 +583,14 @@ export const chatMixinsV2 = {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.attr.cartAttr = !this.isOpen ? true : false
|
this.attr.cartAttr = !this.isOpen ? true : false
|
||||||
|
this.buyActionLock = false
|
||||||
|
}).catch(error => {
|
||||||
|
this.buyActionLock = false
|
||||||
|
uni.showToast({
|
||||||
|
title: error.msg || '操作失败,请稍后重试',
|
||||||
|
icon: "none",
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
buyNowOrGiftBuyReq(type) {
|
buyNowOrGiftBuyReq(type) {
|
||||||
@@ -617,6 +631,7 @@ export const chatMixinsV2 = {
|
|||||||
})
|
})
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
_this.buyLoading = false
|
_this.buyLoading = false
|
||||||
|
_this.buyActionLock = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
closeAttrWindow() {
|
closeAttrWindow() {
|
||||||
|
|||||||
+16
-3
@@ -184,7 +184,12 @@
|
|||||||
<view v-if="item.type === 'price_input'" class="gift-price-input">
|
<view v-if="item.type === 'price_input'" class="gift-price-input">
|
||||||
<view class="input-wrap">
|
<view class="input-wrap">
|
||||||
<text class="label">价格预算:</text>
|
<text class="label">价格预算:</text>
|
||||||
<input v-model="giftBudget" placeholder="例如100以内/300~500元" class="input-budget" placeholder-style="color: #ccc;" />
|
<input
|
||||||
|
v-model="giftBudget"
|
||||||
|
:placeholder="item.guideContent || '例如100以内/300~500元'"
|
||||||
|
class="input-budget"
|
||||||
|
placeholder-style="color: #ccc;"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -857,10 +862,18 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
height: calc(100vh - 240rpx);
|
min-height: calc(100vh - 240rpx);
|
||||||
|
height: auto;
|
||||||
padding: 0 0 240rpx 0;
|
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;
|
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 {
|
.focus-guide-wrap {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
+24
@@ -124,3 +124,27 @@ export function computedSojoumGroupBuyGiftOrderPrice(params) {
|
|||||||
login: true
|
login: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文生图发起生成
|
||||||
|
* @param {*} data
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
|
||||||
|
export function aiGiftImageGenerate(data) {
|
||||||
|
return request.post("/aiGiftImage/generate", data, {
|
||||||
|
login: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文生图状态查询
|
||||||
|
* @param {*} params
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
|
||||||
|
export function aiGiftImageStatus(params) {
|
||||||
|
return request.get("/aiGiftImage/" + params.productId, {
|
||||||
|
login: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
+32
-2
@@ -17,8 +17,8 @@ export function getShopData(params) {
|
|||||||
|
|
||||||
// 查看商户申请
|
// 查看商户申请
|
||||||
// 1-特产供应商 2-店铺 3-文玩供应商
|
// 1-特产供应商 2-店铺 3-文玩供应商
|
||||||
export function getShopInfo() {
|
export function getShopInfo(params) {
|
||||||
return request.get("/merchantApply/info", {}, {login: true})
|
return request.get("/merchantApply/info", params, {login: true})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4-采购批发商
|
// 4-采购批发商
|
||||||
@@ -38,6 +38,18 @@ export function saveShop(hotelInfo, partnerId = '', promoterUid = '') {
|
|||||||
return request.post("/merchantApply/hotel/submit", param, {login: true})
|
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 = '') {
|
export function saveSupplier(hotelInfo, supplierInfo, partnerId = '', promoterUid = '') {
|
||||||
let param = {hotelInfo, supplierInfo, captcha: supplierInfo.captcha};
|
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})
|
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) {
|
export function saveWholesaler(wholesalerInfo) {
|
||||||
let param = {wholesalerInfo, captcha: wholesalerInfo.captcha};
|
let param = {wholesalerInfo, captcha: wholesalerInfo.captcha};
|
||||||
return request.post("/merchantApply/wholesaler/submit", param, {login: true})
|
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) {
|
export function saveExperienceStore(params) {
|
||||||
return request.post("/merchantApply/experienceStore/submit", params, {login: true})
|
return request.post("/merchantApply/experienceStore/submit", params, {login: true})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,6 +102,17 @@ export function postOrderRefund(data) {
|
|||||||
return request.post("/order/refund/verify", data);
|
return request.post("/order/refund/verify", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消退款申请
|
||||||
|
* @param uni
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export function cancelOrderRefund(uni) {
|
||||||
|
return request.post("/order/refund/cancel", {
|
||||||
|
uni
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 确认收货
|
* 确认收货
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
|
|||||||
@@ -60,6 +60,11 @@ export function getCountyFamousCityGuideContent(param) {
|
|||||||
return request.get('/countyFamous/guide/content', param, { login: true })
|
return request.get('/countyFamous/guide/content', param, { login: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取千县名品县城图文攻略详情
|
||||||
|
export function getCountyFamousGraphicGuideContent(param) {
|
||||||
|
return request.get('/countyFamous/guide/graphic/content', param, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
// 获取千县名品县城重点产业列表
|
// 获取千县名品县城重点产业列表
|
||||||
export function getCountyFamousIndustry(param) {
|
export function getCountyFamousIndustry(param) {
|
||||||
return request.get('/countyFamous/industry', param, { login: true })
|
return request.get('/countyFamous/industry', param, { login: true })
|
||||||
|
|||||||
@@ -603,3 +603,11 @@ export function queryUserGuide(params) {
|
|||||||
export function setUserGuide(params) {
|
export function setUserGuide(params) {
|
||||||
return request.post('/user/guide/status', params)
|
return request.post('/user/guide/status', params)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提现规则
|
||||||
|
*/
|
||||||
|
export function getWithdrawalRules() {
|
||||||
|
return request.get('/extract/rule')
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
+16
-12
@@ -8,18 +8,22 @@ page {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
.fix-tabbar-page {
|
.fix-tabbar-page {
|
||||||
position: relative;
|
position: relative;
|
||||||
min-height: 100vh;
|
z-index: 0;
|
||||||
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%);
|
min-height: 100vh;
|
||||||
// background-color: #fff;
|
background: transparent;
|
||||||
// background-size: 100% calc(100vh - 160rpx);
|
isolation: isolate;
|
||||||
// background-image: url(https://wxapp.xdd618.com/api/file/pic/aiChat/bg.png);
|
&::before {
|
||||||
// background-repeat: no-repeat;
|
content: '';
|
||||||
// background-attachment: fixed;
|
position: fixed;
|
||||||
&.new-chat {
|
top: 0;
|
||||||
background-size: 100% calc(100vh - 160rpx);
|
right: 0;
|
||||||
background-repeat: no-repeat;
|
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 {
|
.fix-tabbar-header {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|||||||
@@ -127,6 +127,25 @@
|
|||||||
height: 52vh;
|
height: 52vh;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
margin: 30rpx 0;
|
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 {
|
.agree-box {
|
||||||
|
|||||||
@@ -42,9 +42,20 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
goSupplierMini() {
|
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({
|
uni.navigateToMiniProgram({
|
||||||
appId: "wx9ca93d1f2a9c8156",
|
appId: "wx9ca93d1f2a9c8156",
|
||||||
path: "pages/auth/login",
|
path: "pages/auth/login",
|
||||||
|
envVersion,
|
||||||
success(msg) {
|
success(msg) {
|
||||||
console.log("success", msg)
|
console.log("success", msg)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -35,8 +35,7 @@
|
|||||||
v-for="(subItem, subIndex) in item.attrValue"
|
v-for="(subItem, subIndex) in item.attrValue"
|
||||||
:key="subIndex"
|
:key="subIndex"
|
||||||
:class="{
|
:class="{
|
||||||
'actived': subItem.check,
|
'actived': subItem.check
|
||||||
'disabled': !subItem.canUsed
|
|
||||||
}"
|
}"
|
||||||
class="itemn v12-radius-40"
|
class="itemn v12-radius-40"
|
||||||
@click="tapAttr(index, subIndex, subItem)"
|
@click="tapAttr(index, subIndex, subItem)"
|
||||||
@@ -218,9 +217,9 @@ export default {
|
|||||||
},
|
},
|
||||||
tapAttr(index, subIndex, subItem) {
|
tapAttr(index, subIndex, subItem) {
|
||||||
// 缺货的点击了没效果
|
// 缺货的点击了没效果
|
||||||
if (!subItem.canUsed || subItem.check) {
|
// if (!subItem.canUsed || subItem.check) {
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
this.attrObj.productAttr[index].attrValue.map((subItem, subIdx) => {
|
this.attrObj.productAttr[index].attrValue.map((subItem, subIdx) => {
|
||||||
subItem.check= false
|
subItem.check= false
|
||||||
if (subIndex === subIdx) {
|
if (subIndex === subIdx) {
|
||||||
|
|||||||
@@ -10,6 +10,14 @@ if (NODE_ENV === 'development' || NODE_ENV === 'test') {
|
|||||||
enableDebug: false
|
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') {
|
if (NODE_ENV === 'prod') {
|
||||||
BASE_URL = 'https://wxapp.xdd618.com/api'
|
BASE_URL = 'https://wxapp.xdd618.com/api'
|
||||||
SERVICE_URL = 'https://service.xdd618.com/api'
|
SERVICE_URL = 'https://service.xdd618.com/api'
|
||||||
|
|||||||
@@ -133,6 +133,17 @@
|
|||||||
"CUSTOM-CONST": true
|
"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": {
|
"mp-weixin": {
|
||||||
"title": "微信小程序(生产环境)",
|
"title": "微信小程序(生产环境)",
|
||||||
"env": {
|
"env": {
|
||||||
|
|||||||
+9
-2
@@ -355,7 +355,7 @@
|
|||||||
{
|
{
|
||||||
"path": "views/wholesaler",
|
"path": "views/wholesaler",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "采购批发商入驻"
|
"navigationBarTitleText": "礼品集采中心入驻"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -490,7 +490,7 @@
|
|||||||
{
|
{
|
||||||
"path": "views/giftList",
|
"path": "views/giftList",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "特色礼品"
|
"navigationBarTitleText": "全国礼品"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -532,6 +532,13 @@
|
|||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "views/famousQianxianGraphicGuide",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "攻略详情",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "views/famousQianxianVillageShop",
|
"path": "views/famousQianxianVillageShop",
|
||||||
"style": {
|
"style": {
|
||||||
|
|||||||
+9
-16
@@ -49,21 +49,18 @@ export default {
|
|||||||
// 注释下面一行,会停留在启动页
|
// 注释下面一行,会停留在启动页
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.toLaunch();
|
this.toLaunch();
|
||||||
}, 2000)
|
}, 5000)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// 未登录:静默处理登录,5秒后跳转业务页面
|
||||||
cookie.get("spread");
|
cookie.get("spread");
|
||||||
// this.toLaunch();
|
if (this.$deviceType != "app") {
|
||||||
if (this.$deviceType == "app") {
|
//检查授权信息
|
||||||
// this.toLaunch();
|
this.checkUserInfo();
|
||||||
this.$yrouter.switchTab({
|
|
||||||
path: "/pages/home/index"
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
setTimeout(() => {
|
||||||
//检查授权信息
|
this.toLaunch();
|
||||||
this.checkUserInfo();
|
}, 5000);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(["changeAuthorization", "setUserInfo"]),
|
...mapActions(["changeAuthorization", "setUserInfo"]),
|
||||||
@@ -89,11 +86,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
login(loginInfo).finally(() => {
|
login(loginInfo);
|
||||||
this.$yrouter.switchTab({
|
|
||||||
path: "/pages/home/index"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,25 +6,44 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="list" v-if="list.length">
|
<view class="list" v-show="hasList">
|
||||||
<custom-waterfalls-flow :value="list" imageKey="cover">
|
<view class="video-waterfalls-wrap">
|
||||||
<view class="item" v-for="(item,index) in list" :key="index" slot="slot{{index}}" @click="goDetail(item)">
|
<view class="waterfalls-column">
|
||||||
<image class="cover" :src="item.cover" mode="widthFix"></image>
|
<view class="item" v-for="(lItem,lIndex) in leftList" :key="lIndex" @click="goDetail(lItem)">
|
||||||
<view class="content">
|
<image class="cover" :src="lItem.cover" mode="widthFix" lazy-load></image>
|
||||||
<view class="title more-t">{{ item.title }}</view>
|
<view class="content">
|
||||||
<view class="footer flex jc-between ai-center">
|
<view class="title more-t">{{ lItem.title }}</view>
|
||||||
<view class="visit flex ai-center">
|
<view class="footer flex jc-between ai-center">
|
||||||
<image class="icon" style="margin-right: 8rpx" :src="item.storeLogo" mode="scaleToFill"></image>
|
<view class="visit flex ai-center">
|
||||||
{{ item.storeName }}
|
<image class="icon" style="margin-right: 8rpx" :src="lItem.storeLogo" mode="scaleToFill"></image>
|
||||||
|
{{ lItem.storeName }}
|
||||||
|
</view>
|
||||||
|
<image class="icon flex-0" :src="webUrl+'/20210806121203835373.png'" mode="scaleToFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<image class="icon flex-0" :src="webUrl+'/20210806121203835373.png'" mode="scaleToFill"></image>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</custom-waterfalls-flow>
|
<view class="waterfalls-column">
|
||||||
|
<view class="item" v-for="(rItem,rIndex) in rightList" :key="rIndex" @click="goDetail(rItem)">
|
||||||
|
<image class="cover" :src="rItem.cover" mode="widthFix" lazy-load></image>
|
||||||
|
<view class="content">
|
||||||
|
<view class="title more-t">{{ rItem.title }}</view>
|
||||||
|
<view class="footer flex jc-between ai-center">
|
||||||
|
<view class="visit flex ai-center">
|
||||||
|
<image class="icon" style="margin-right: 8rpx" :src="rItem.storeLogo" mode="scaleToFill"></image>
|
||||||
|
{{ rItem.storeName }}
|
||||||
|
</view>
|
||||||
|
<image class="icon flex-0" :src="webUrl+'/20210806121203835373.png'" mode="scaleToFill"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="v4-nodata" v-else>
|
<view class="loading-more" v-show="isWait">加载中...</view>
|
||||||
|
|
||||||
|
<view class="v4-nodata" v-show="showEmpty">
|
||||||
<image src="@/static/images/img_nodata.png" mode="scaleToFill"/>
|
<image src="@/static/images/img_nodata.png" mode="scaleToFill"/>
|
||||||
<view class="text">暂无数据</view>
|
<view class="text">暂无数据</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -36,6 +55,11 @@ import {getStoreVideoType, getArticleList} from '@/api/public'
|
|||||||
import {getVideoList} from '@/api/user'
|
import {getVideoList} from '@/api/user'
|
||||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
|
||||||
|
// 封面固定宽度(rpx)
|
||||||
|
const COVER_WIDTH = 332
|
||||||
|
// 每项除封面外的文字内容预估高度(rpx)
|
||||||
|
const TEXT_HEIGHT = 120
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [pageListenMixins],
|
mixins: [pageListenMixins],
|
||||||
data() {
|
data() {
|
||||||
@@ -46,11 +70,23 @@ export default {
|
|||||||
page: 1,
|
page: 1,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
keyword: '',
|
keyword: '',
|
||||||
list: [],
|
leftList: [],
|
||||||
|
rightList: [],
|
||||||
|
leftHeight: 0,
|
||||||
|
rightHeight: 0,
|
||||||
isWait: false,
|
isWait: false,
|
||||||
|
requestId: 0,
|
||||||
pageKeyId: Object.freeze('findVideoList')
|
pageKeyId: Object.freeze('findVideoList')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
hasList() {
|
||||||
|
return this.leftList.length + this.rightList.length > 0
|
||||||
|
},
|
||||||
|
showEmpty() {
|
||||||
|
return !this.isWait && !this.hasList
|
||||||
|
}
|
||||||
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
if (!options.click) {
|
if (!options.click) {
|
||||||
uni.switchTab({ url: '/pages/home/index' })
|
uni.switchTab({ url: '/pages/home/index' })
|
||||||
@@ -76,27 +112,73 @@ export default {
|
|||||||
changeType(item) {
|
changeType(item) {
|
||||||
this.type = item.value
|
this.type = item.value
|
||||||
this.page = 1
|
this.page = 1
|
||||||
this.list = []
|
// 使进行中的请求失效并解锁,避免切换时被上一次请求阻塞
|
||||||
|
this.requestId++
|
||||||
|
this.isWait = false
|
||||||
this.fetchList()
|
this.fetchList()
|
||||||
},
|
},
|
||||||
fetchList() {
|
resetList() {
|
||||||
|
this.leftList = []
|
||||||
|
this.rightList = []
|
||||||
|
this.leftHeight = 0
|
||||||
|
this.rightHeight = 0
|
||||||
|
},
|
||||||
|
async fetchList() {
|
||||||
if (this.isWait) return
|
if (this.isWait) return
|
||||||
|
const requestId = ++this.requestId
|
||||||
this.isWait = true
|
this.isWait = true
|
||||||
const params = {
|
const params = {
|
||||||
type: this.type,
|
type: this.type,
|
||||||
page: this.page,
|
page: this.page,
|
||||||
limit: this.limit
|
limit: this.limit
|
||||||
}
|
}
|
||||||
getVideoList(params).then(res => {
|
try {
|
||||||
|
const res = await getVideoList(params)
|
||||||
|
// 请求已被更新的请求(如切换分类)取代,丢弃本次结果
|
||||||
|
if (requestId !== this.requestId) return
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
for (let i = 0; i < res.data.length; i++) {
|
const items = res.data
|
||||||
res.data[i].hide = true
|
for (let i = 0; i < items.length; i++) {
|
||||||
this.list.push(res.data[i])
|
items[i].hide = true
|
||||||
}
|
}
|
||||||
|
// 并行获取所有封面高度,完成后一次性替换列表,避免闪现空列表
|
||||||
|
const heights = await Promise.all(items.map(item => this.getImageHeight(item.cover)))
|
||||||
|
if (requestId !== this.requestId) return
|
||||||
|
if (this.page === 1) this.resetList()
|
||||||
|
items.forEach((item, i) => {
|
||||||
|
this.pushToColumn(item, heights[i] + TEXT_HEIGHT)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
this.isWait = false
|
} catch (e) {
|
||||||
|
// 忽略请求或图片尺寸获取失败
|
||||||
|
} finally {
|
||||||
|
if (requestId === this.requestId) {
|
||||||
|
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) {
|
goDetail(item) {
|
||||||
this.$yrouter.push("/pages/VideoPlayBackList/VideoPlayBackDetail?videoUrl=" + item.video + '&id=' + item.id + '&click=1')
|
this.$yrouter.push("/pages/VideoPlayBackList/VideoPlayBackDetail?videoUrl=" + item.video + '&id=' + item.id + '&click=1')
|
||||||
}
|
}
|
||||||
@@ -114,6 +196,7 @@ export default {
|
|||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.active {
|
.active {
|
||||||
@@ -125,13 +208,23 @@ export default {
|
|||||||
.list {
|
.list {
|
||||||
margin: 28rpx 32rpx;
|
margin: 28rpx 32rpx;
|
||||||
|
|
||||||
|
.video-waterfalls-wrap {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.waterfalls-column {
|
||||||
|
width: 332rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
|
margin-bottom: 20rpx;
|
||||||
border-radius: 4rpx;
|
border-radius: 4rpx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
|
||||||
.cover {
|
.cover {
|
||||||
width: 332rpx;
|
width: 332rpx;
|
||||||
//height: 200rpx;
|
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -174,4 +267,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
|
.loading-more {
|
||||||
|
padding: 24rpx 0;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -384,20 +384,23 @@ export default {
|
|||||||
this.mescroll && this.mescroll.triggerDownScroll()
|
this.mescroll && this.mescroll.triggerDownScroll()
|
||||||
},
|
},
|
||||||
search() {
|
search() {
|
||||||
if(this.keyword === '') return
|
const keyword = (this.keyword || '').trim()
|
||||||
this.listGroup.findIndex((group, index) => {
|
if (!keyword) return
|
||||||
let result
|
const matchIndex = this.listGroup.findIndex(group => {
|
||||||
group.city.forEach(item => {
|
const cityList = Array.isArray(group.city) ? group.city : []
|
||||||
result = item.cityName.indexOf(this.keyword, 0)
|
return cityList.some(item => item && item.cityName && item.cityName.indexOf(keyword) !== -1)
|
||||||
if (result !== -1) {
|
|
||||||
this.asideTap(index);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
if (result !== -1) {
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
if (matchIndex !== -1) {
|
||||||
|
this.keyword = keyword
|
||||||
|
this.asideTap(matchIndex)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (matchIndex === -1) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '未找到该城市,请重新输入城市名称',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
select(item) {
|
select(item) {
|
||||||
if (this.type === 0 && item.hasData === 0) return
|
if (this.type === 0 && item.hasData === 0) return
|
||||||
|
|||||||
@@ -114,7 +114,8 @@
|
|||||||
<view class="icon-box"><u-icon name="arrow-rightward" color="#fff" size="8"></u-icon></view>
|
<view class="icon-box"><u-icon name="arrow-rightward" color="#fff" size="8"></u-icon></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="v4-nodata" v-if="townList.length === 0">
|
<goo-skeleton v-if="!townLoaded" :show-avatar="false"/>
|
||||||
|
<view class="v4-nodata" v-else-if="townList.length === 0">
|
||||||
<image src="@/static/images/img_nodata.png" mode="scaleToFill"/>
|
<image src="@/static/images/img_nodata.png" mode="scaleToFill"/>
|
||||||
<view class="text">暂无数据</view>
|
<view class="text">暂无数据</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -203,6 +204,7 @@ export default {
|
|||||||
isNext: false,
|
isNext: false,
|
||||||
townConfig: {},
|
townConfig: {},
|
||||||
townList: [],
|
townList: [],
|
||||||
|
townLoaded: false,
|
||||||
randomSeed: null,
|
randomSeed: null,
|
||||||
hotelBanner: [],
|
hotelBanner: [],
|
||||||
goodCityId: '',
|
goodCityId: '',
|
||||||
@@ -519,6 +521,8 @@ export default {
|
|||||||
}
|
}
|
||||||
getAncientTownList(params).then(res => {
|
getAncientTownList(params).then(res => {
|
||||||
this.townList = res.data.records
|
this.townList = res.data.records
|
||||||
|
}).finally(() => {
|
||||||
|
this.townLoaded = true
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
+23
-2
@@ -916,6 +916,18 @@ export default {
|
|||||||
}
|
}
|
||||||
app.globalData.homeDrawPosterShownInSession = true
|
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 = {}) {
|
initPosterPopupState(data = {}) {
|
||||||
const drawEntranceConfig = data.drawEntranceConfig || {}
|
const drawEntranceConfig = data.drawEntranceConfig || {}
|
||||||
this.$set(this, 'drawEntranceConfig', drawEntranceConfig)
|
this.$set(this, 'drawEntranceConfig', drawEntranceConfig)
|
||||||
@@ -932,10 +944,19 @@ export default {
|
|||||||
(data.lotteryCanDraw || false)
|
(data.lotteryCanDraw || false)
|
||||||
)
|
)
|
||||||
this.isDrawPosterVisible = shouldShowDrawPoster
|
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() {
|
showNextPoster() {
|
||||||
if (!this.isDrawPosterVisible && this.canShowOldPoster) {
|
if (!this.isDrawPosterVisible && this.canShowOldPoster && !this.hasShownOldUserPopupInSession()) {
|
||||||
|
this.markOldUserPopupShownInSession()
|
||||||
this.isOldUser = true
|
this.isOldUser = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+22
-4
@@ -36,7 +36,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="product-wrap v12-mt-3">
|
<view v-if="products.length > 0" class="product-wrap v12-mt-3">
|
||||||
<view class="product-card" v-for="(item, index) in products" :key="index" @click="toGoods(item)">
|
<view class="product-card" v-for="(item, index) in products" :key="index" @click="toGoods(item)">
|
||||||
<image :src="item.productImage" class="product-card-img" mode="heightFix|widthFix"></image>
|
<image :src="item.productImage" class="product-card-img" mode="heightFix|widthFix"></image>
|
||||||
<view class="new-info">
|
<view class="new-info">
|
||||||
@@ -53,6 +53,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-else class="empty-wrap">
|
||||||
|
<view class="empty-text">暂无数据</view>
|
||||||
|
</view>
|
||||||
<ProductWindow
|
<ProductWindow
|
||||||
ref="attrWindow"
|
ref="attrWindow"
|
||||||
:attr="attr"
|
:attr="attr"
|
||||||
@@ -99,8 +102,12 @@ export default{
|
|||||||
onLoad() {
|
onLoad() {
|
||||||
queryNewZone().then(res => {
|
queryNewZone().then(res => {
|
||||||
this.details = res.data
|
this.details = res.data
|
||||||
this.tabs = res.data.categories
|
this.tabs = Array.isArray(res.data.categories) ? res.data.categories : []
|
||||||
this.handleClick(0, this.tabs[0])
|
if (this.tabs.length > 0) {
|
||||||
|
this.handleClick(0, this.tabs[0])
|
||||||
|
} else {
|
||||||
|
this.products = []
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -112,7 +119,7 @@ export default{
|
|||||||
methods: {
|
methods: {
|
||||||
handleClick(index, tab) {
|
handleClick(index, tab) {
|
||||||
this.activeIndex = index
|
this.activeIndex = index
|
||||||
this.products = tab.products
|
this.products = Array.isArray(tab && tab.products) ? tab.products : []
|
||||||
},
|
},
|
||||||
handleChange(e) {
|
handleChange(e) {
|
||||||
this.current = e.detail.current
|
this.current = e.detail.current
|
||||||
@@ -144,6 +151,17 @@ export default{
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
.empty-wrap{
|
||||||
|
min-height: 260rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.empty-text{
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #999999;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
.tab-line{
|
.tab-line{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
|||||||
+743
-158
File diff suppressed because it is too large
Load Diff
@@ -117,7 +117,7 @@
|
|||||||
<text class="v12-font-28">{{ force2Decimal(orderPrice.payPostage) }}</text>
|
<text class="v12-font-28">{{ force2Decimal(orderPrice.payPostage) }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="v12-justify-between v12-align-center v12-py-1">
|
<view v-if="!isLotteryOrder()" class="v12-justify-between v12-align-center v12-py-1">
|
||||||
<view class="v12-font-24 v12-dark-text v12-align-center">
|
<view class="v12-font-24 v12-dark-text v12-align-center">
|
||||||
<text>优惠券</text>
|
<text>优惠券</text>
|
||||||
<view class="v12-align-center v12-ml-1" v-if="couponTitle">
|
<view class="v12-align-center v12-ml-1" v-if="couponTitle">
|
||||||
@@ -255,7 +255,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- v9 优惠券开始 -->
|
<!-- v9 优惠券开始 -->
|
||||||
<u-popup
|
<u-popup
|
||||||
v-if="show"
|
v-if="!isLotteryOrder() && show"
|
||||||
:show="show"
|
:show="show"
|
||||||
:round="10"
|
:round="10"
|
||||||
mode="bottom"
|
mode="bottom"
|
||||||
@@ -263,7 +263,7 @@
|
|||||||
@close="close"
|
@close="close"
|
||||||
>
|
>
|
||||||
<CouponsPopup
|
<CouponsPopup
|
||||||
v-if="couponList.usable.length > 0 && show"
|
v-if="!isLotteryOrder() && couponList.usable.length > 0 && show"
|
||||||
:two-list="couponList"
|
:two-list="couponList"
|
||||||
@change="changeCoupons"
|
@change="changeCoupons"
|
||||||
@close="close"
|
@close="close"
|
||||||
@@ -398,7 +398,8 @@ export default {
|
|||||||
pageKeyId: Object.freeze('orderConfirm'),
|
pageKeyId: Object.freeze('orderConfirm'),
|
||||||
total: 0,
|
total: 0,
|
||||||
couponTitle: '',
|
couponTitle: '',
|
||||||
hasCoupon: false
|
hasCoupon: false,
|
||||||
|
pageQuery: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: mapGetters(["userInfo", "storeItems"]),
|
computed: mapGetters(["userInfo", "storeItems"]),
|
||||||
@@ -417,17 +418,18 @@ export default {
|
|||||||
},
|
},
|
||||||
onLoad(opts) {
|
onLoad(opts) {
|
||||||
const that = this
|
const that = this
|
||||||
if (that.$yroute.query.pinkid !== undefined) {
|
that.pageQuery = Object.assign({}, that.resolvePageQuery(), opts || {})
|
||||||
that.pinkId = that.$yroute.query.pinkid
|
if (that.pageQuery.pinkid !== undefined) {
|
||||||
|
that.pinkId = that.pageQuery.pinkid
|
||||||
}
|
}
|
||||||
if (that.$yroute.query.id !== undefined) {
|
if (that.pageQuery.id !== undefined) {
|
||||||
that.cartid = that.$yroute.query.id
|
that.cartid = that.pageQuery.id
|
||||||
console.log(that.cartid)
|
console.log(that.cartid)
|
||||||
}
|
}
|
||||||
if (that.$yroute.query.lotteryRecordId !== undefined) {
|
if (that.pageQuery.lotteryRecordId !== undefined) {
|
||||||
that.lotteryRecordId = that.$yroute.query.lotteryRecordId
|
that.lotteryRecordId = that.pageQuery.lotteryRecordId
|
||||||
}
|
}
|
||||||
that.hasCoupon = opts.couponId !== ''
|
that.hasCoupon = !!(opts && opts.couponId !== '')
|
||||||
that.getCartInfo()
|
that.getCartInfo()
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@@ -452,6 +454,37 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
isNullOrEmpty,
|
isNullOrEmpty,
|
||||||
|
resolvePageQuery() {
|
||||||
|
if (this.$yroute && this.$yroute.query) {
|
||||||
|
return this.$yroute.query
|
||||||
|
}
|
||||||
|
if (this.$route && this.$route.query) {
|
||||||
|
return this.$route.query
|
||||||
|
}
|
||||||
|
if (this._route && this._route.query) {
|
||||||
|
return this._route.query
|
||||||
|
}
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
isLotteryOrder() {
|
||||||
|
const cartInfo = Array.isArray(this.orderGroupInfo && this.orderGroupInfo.cartInfo)
|
||||||
|
? this.orderGroupInfo.cartInfo
|
||||||
|
: []
|
||||||
|
return Boolean(
|
||||||
|
this.lotteryRecordId ||
|
||||||
|
this.pageQuery.from === 'countyLottery' ||
|
||||||
|
Number(this.pageQuery.drawActivityId || 0) > 0 ||
|
||||||
|
cartInfo.some(item => Number(
|
||||||
|
item.drawActivityId ||
|
||||||
|
(item.productInfo && item.productInfo.drawActivityId) ||
|
||||||
|
0
|
||||||
|
) > 0)
|
||||||
|
)
|
||||||
|
},
|
||||||
|
getOrderCouponId() {
|
||||||
|
if (this.isLotteryOrder()) return 0
|
||||||
|
return this.couponList.usable.length === 0 ? 0 : (this.couponId || 0)
|
||||||
|
},
|
||||||
couponMax(e) {
|
couponMax(e) {
|
||||||
// this.couponTitle = e.couponTitle
|
// this.couponTitle = e.couponTitle
|
||||||
// this.couponId = this.$yroute.query.couponId || uni.getStorageSync('couponId') || 0
|
// this.couponId = this.$yroute.query.couponId || uni.getStorageSync('couponId') || 0
|
||||||
@@ -477,12 +510,17 @@ export default {
|
|||||||
postOrderComputed(this.orderGroupInfo.orderKey, {
|
postOrderComputed(this.orderGroupInfo.orderKey, {
|
||||||
addressId: this.addressInfo.id,
|
addressId: this.addressInfo.id,
|
||||||
useIntegral: this.useIntegral ? 1 : 0,
|
useIntegral: this.useIntegral ? 1 : 0,
|
||||||
couponId: this.couponList.usable.length === 0 ? 0 : this.couponId,
|
couponId: this.getOrderCouponId(),
|
||||||
usePoints: this.usePointsCheck ? 1 : 0,
|
usePoints: this.usePointsCheck ? 1 : 0,
|
||||||
shipping_type: parseInt(this.shipping_type) + 1
|
shipping_type: parseInt(this.shipping_type) + 1
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.couponList = res.data.result.couponList
|
this.couponList = res.data.result.couponList
|
||||||
if(!f) {
|
if (this.isLotteryOrder()) {
|
||||||
|
this.couponTitle = ''
|
||||||
|
if (this.couponId !== 0) {
|
||||||
|
this.couponId = 0
|
||||||
|
}
|
||||||
|
} else if(!f) {
|
||||||
this.couponId = res.data.result.defaultCouponId
|
this.couponId = res.data.result.defaultCouponId
|
||||||
}
|
}
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
@@ -543,8 +581,8 @@ export default {
|
|||||||
}
|
}
|
||||||
_this.systemStore = data.systemStore || {}
|
_this.systemStore = data.systemStore || {}
|
||||||
_this.storeSelfMention = data.storeSelfMention
|
_this.storeSelfMention = data.storeSelfMention
|
||||||
if(_this.$yroute.query.address !== undefined ) {
|
if(_this.pageQuery.address !== undefined ) {
|
||||||
_this.addressInfo = JSON.parse(_this.$yroute.query.address) || {}
|
_this.addressInfo = JSON.parse(_this.pageQuery.address) || {}
|
||||||
_this.computedPrice()
|
_this.computedPrice()
|
||||||
} else {
|
} else {
|
||||||
// _this.addressInfo = uni.getStorageSync('sourceAddress') || data.addressInfo || {}
|
// _this.addressInfo = uni.getStorageSync('sourceAddress') || data.addressInfo || {}
|
||||||
@@ -683,7 +721,7 @@ export default {
|
|||||||
phone: this.contactsTel,
|
phone: this.contactsTel,
|
||||||
addressId: this.addressInfo.id,
|
addressId: this.addressInfo.id,
|
||||||
useIntegral: this.useIntegral ? 1 : 0,
|
useIntegral: this.useIntegral ? 1 : 0,
|
||||||
couponId: this.couponList.usable.length === 0 ? 0 : this.couponId || 0,
|
couponId: this.getOrderCouponId(),
|
||||||
usePoints: this.usePointsNumber || 0,
|
usePoints: this.usePointsNumber || 0,
|
||||||
payType: this.active,
|
payType: this.active,
|
||||||
pinkId: this.pinkId,
|
pinkId: this.pinkId,
|
||||||
@@ -811,11 +849,13 @@ export default {
|
|||||||
this.show = !this.show
|
this.show = !this.show
|
||||||
},
|
},
|
||||||
showCouponsPopup() {
|
showCouponsPopup() {
|
||||||
|
if (this.isLotteryOrder()) return
|
||||||
if (this.couponList.usable.length === 0) return
|
if (this.couponList.usable.length === 0) return
|
||||||
this.show = !this.show
|
this.show = !this.show
|
||||||
},
|
},
|
||||||
// v9-2
|
// v9-2
|
||||||
changeCoupons(item) {
|
changeCoupons(item) {
|
||||||
|
if (this.isLotteryOrder()) return
|
||||||
if(!item) return
|
if(!item) return
|
||||||
if (this.couponList.usable.length === 0) return
|
if (this.couponList.usable.length === 0) return
|
||||||
this.show = !this.show
|
this.show = !this.show
|
||||||
|
|||||||
@@ -32,9 +32,9 @@
|
|||||||
<image :src="webUrl+'/20210806121714655368.png'" mode="" style="width: 36rpx;height: 36rpx;"></image>
|
<image :src="webUrl+'/20210806121714655368.png'" mode="" style="width: 36rpx;height: 36rpx;"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="couponListLimit2ToShow.length > 0 || attr.productSelect.earnPoints" class="v12-mt-1 v12-mb-1">
|
<view v-if="(!isCountyLotteryGoodsDetail() && couponListLimit2ToShow.length > 0) || attr.productSelect.earnPoints" class="v12-mt-1 v12-mb-1">
|
||||||
<view class="cell flex jc-between ai-center">
|
<view class="cell flex jc-between ai-center">
|
||||||
<view v-if="couponListLimit2ToShow.length > 0" class="v12-justify-start">
|
<view v-if="!isCountyLotteryGoodsDetail() && couponListLimit2ToShow.length > 0" class="v12-justify-start">
|
||||||
<view
|
<view
|
||||||
v-for="(item, index) in couponListLimit2ToShow"
|
v-for="(item, index) in couponListLimit2ToShow"
|
||||||
:key="index"
|
:key="index"
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view
|
<view
|
||||||
v-if="couponListLimit2ToShow.length > 0"
|
v-if="!isCountyLotteryGoodsDetail() && couponListLimit2ToShow.length > 0"
|
||||||
class="value value2 v12-font-24 v12-primary-text"
|
class="value value2 v12-font-24 v12-primary-text"
|
||||||
@click="changeCoupons()"
|
@click="changeCoupons()"
|
||||||
>
|
>
|
||||||
@@ -201,7 +201,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- v9 优惠券开始 -->
|
<!-- v9 优惠券开始 -->
|
||||||
<u-popup :show="show" :round="10" mode="bottom" closeOnClickOverlay @close="changeCoupons()">
|
<u-popup v-if="!isCountyLotteryGoodsDetail()" :show="show" :round="10" mode="bottom" closeOnClickOverlay @close="changeCoupons()">
|
||||||
<CouponsPopup
|
<CouponsPopup
|
||||||
:two-list="couponList"
|
:two-list="couponList"
|
||||||
@ok="setCoupon"
|
@ok="setCoupon"
|
||||||
@@ -309,7 +309,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- v6服务项目结束 -->
|
<!-- v6服务项目结束 -->
|
||||||
<view class="store-section goods-section" v-if="systemStore">
|
<view class="store-section goods-section" v-if="systemStore && appProductHideMerchant !== '1'">
|
||||||
<view class="flex jc-between ai-center">
|
<view class="flex jc-between ai-center">
|
||||||
<view class="title bold flex ai-center">
|
<view class="title bold flex ai-center">
|
||||||
<view>
|
<view>
|
||||||
@@ -540,7 +540,7 @@ import {
|
|||||||
getProductSkuBySelected
|
getProductSkuBySelected
|
||||||
} from '@/api/store'
|
} from '@/api/store'
|
||||||
import { userBindParent } from '@/api/user'
|
import { userBindParent } from '@/api/user'
|
||||||
import { handleQrCode, isWeixin } from '@/utils'
|
import { handleLoginFailure, handleQrCode, isWeixin } from '@/utils'
|
||||||
import { getHomeData } from '@/api/public'
|
import { getHomeData } from '@/api/public'
|
||||||
import {
|
import {
|
||||||
getDailyGoods,
|
getDailyGoods,
|
||||||
@@ -579,6 +579,7 @@ export default {
|
|||||||
mixins: [pageListenMixins],
|
mixins: [pageListenMixins],
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
|
appProductHideMerchant: '0',
|
||||||
isGift: false,
|
isGift: false,
|
||||||
giftBg: '',
|
giftBg: '',
|
||||||
// 商品信息是否展开
|
// 商品信息是否展开
|
||||||
@@ -655,7 +656,8 @@ export default {
|
|||||||
pageKeyId: '',
|
pageKeyId: '',
|
||||||
couponListLimit2ToShow: [],
|
couponListLimit2ToShow: [],
|
||||||
qualifications: [],
|
qualifications: [],
|
||||||
couponId: null
|
couponId: null,
|
||||||
|
submitActionLock: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: mapGetters(['isLogin', 'location', 'userInfo']),
|
computed: mapGetters(['isLogin', 'location', 'userInfo']),
|
||||||
@@ -731,6 +733,7 @@ export default {
|
|||||||
console.log("getLaunchOptionsSync", uni.getLaunchOptionsSync())
|
console.log("getLaunchOptionsSync", uni.getLaunchOptionsSync())
|
||||||
console.log("getEnterOptionsSync", uni.getEnterOptionsSync())
|
console.log("getEnterOptionsSync", uni.getEnterOptionsSync())
|
||||||
uni.removeStorageSync('couponId')
|
uni.removeStorageSync('couponId')
|
||||||
|
const pageQuery = Object.assign({}, this.resolvePageQuery(), options || {})
|
||||||
const from = options.from
|
const from = options.from
|
||||||
const id = options.id
|
const id = options.id
|
||||||
switch (from) {
|
switch (from) {
|
||||||
@@ -778,10 +781,10 @@ export default {
|
|||||||
if (url && url.productId) {
|
if (url && url.productId) {
|
||||||
this.id = url.productId
|
this.id = url.productId
|
||||||
} else if (options.id) {
|
} else if (options.id) {
|
||||||
this.id = options.id || null
|
this.id = pageQuery.id || options.id || null
|
||||||
this.partnerId = options.partnerId || null
|
this.partnerId = pageQuery.partnerId || options.partnerId || null
|
||||||
this.activityId = this._route.query.activityId
|
this.activityId = Number(pageQuery.activityId || pageQuery.drawActivityId || 0)
|
||||||
this.source = this._route.query.from || ''
|
this.source = pageQuery.from || ''
|
||||||
} else {
|
} else {
|
||||||
const obj = uni.getEnterOptionsSync()
|
const obj = uni.getEnterOptionsSync()
|
||||||
if (options.scene != null || obj.query.scene != null) {
|
if (options.scene != null || obj.query.scene != null) {
|
||||||
@@ -821,6 +824,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
this.submitActionLock = false
|
||||||
this.getMapData()
|
this.getMapData()
|
||||||
getGiftCardSendBackground().then(res => {
|
getGiftCardSendBackground().then(res => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
@@ -845,6 +849,18 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
resolvePageQuery() {
|
||||||
|
if (this.$yroute && this.$yroute.query) {
|
||||||
|
return this.$yroute.query
|
||||||
|
}
|
||||||
|
if (this.$route && this.$route.query) {
|
||||||
|
return this.$route.query
|
||||||
|
}
|
||||||
|
if (this._route && this._route.query) {
|
||||||
|
return this._route.query
|
||||||
|
}
|
||||||
|
return {}
|
||||||
|
},
|
||||||
gift() {
|
gift() {
|
||||||
this.goCat(2)
|
this.goCat(2)
|
||||||
},
|
},
|
||||||
@@ -876,14 +892,23 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
goRoom() {
|
goRoom() {
|
||||||
console.log(this.storeInfo);
|
if (!this.isLogin) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请先登录后联系客服',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
handleLoginFailure()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
console.log(this.attr);
|
||||||
const params = {
|
const params = {
|
||||||
goodsId: this.id,
|
goodsId: this.id,
|
||||||
goodsName: this.attr.productSelect.store_name,
|
goodsName: this.attr.productSelect.store_name,
|
||||||
skuStr: this.attrValue,
|
skuStr: this.attrValue,
|
||||||
price: this.attr.productSelect.price,
|
price: this.attr.productSelect.price,
|
||||||
seckillId: this.activityId,
|
seckillId: this.activityId,
|
||||||
cover: this.attr.productSelect.image,
|
cover: this.attr.productSelect.image || this.storeInfo.image,
|
||||||
goodsData: '',
|
goodsData: '',
|
||||||
seckillData: '',
|
seckillData: '',
|
||||||
isNegotiable: this.storeInfo.isNegotiable
|
isNegotiable: this.storeInfo.isNegotiable
|
||||||
@@ -1186,6 +1211,7 @@ export default {
|
|||||||
this.posterData.price = this.storeInfo.price
|
this.posterData.price = this.storeInfo.price
|
||||||
this.posterData.code = this.storeInfo.codeBase
|
this.posterData.code = this.storeInfo.codeBase
|
||||||
this.systemStore = data.systemStore
|
this.systemStore = data.systemStore
|
||||||
|
this.appProductHideMerchant = data.appProductHideMerchant
|
||||||
const good_list = data.goodList || []
|
const good_list = data.goodList || []
|
||||||
const goodArray = []
|
const goodArray = []
|
||||||
const count = Math.ceil(good_list.length / 6)
|
const count = Math.ceil(good_list.length / 6)
|
||||||
@@ -1252,7 +1278,7 @@ export default {
|
|||||||
'store_name',
|
'store_name',
|
||||||
this.storeInfo.storeName
|
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, 'price', productSelect.price)
|
||||||
this.$set(this.attr.productSelect, 'otPrice', productSelect.otPrice)
|
this.$set(this.attr.productSelect, 'otPrice', productSelect.otPrice)
|
||||||
this.$set(this.attr.productSelect, 'stock', productSelect.stock)
|
this.$set(this.attr.productSelect, 'stock', productSelect.stock)
|
||||||
@@ -1379,7 +1405,7 @@ export default {
|
|||||||
subItem.check = true
|
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, 'price', productSelect.price)
|
||||||
this.$set(this.attr.productSelect, 'otPrice', productSelect.otPrice)
|
this.$set(this.attr.productSelect, 'otPrice', productSelect.otPrice)
|
||||||
this.$set(this.attr.productSelect, 'stock', productSelect.stock)
|
this.$set(this.attr.productSelect, 'stock', productSelect.stock)
|
||||||
@@ -1500,17 +1526,29 @@ export default {
|
|||||||
q.drawActivityId = Number(this.activityId || 0)
|
q.drawActivityId = Number(this.activityId || 0)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
if (that.submitActionLock) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
that.submitActionLock = true
|
||||||
postCartAdd(q).then(function (res) {
|
postCartAdd(q).then(function (res) {
|
||||||
that.isOpen = false
|
that.isOpen = false
|
||||||
that.attr.cartAttr = false
|
that.attr.cartAttr = false
|
||||||
if (news === 1) {
|
if (news === 1) {
|
||||||
|
const orderQuery = {
|
||||||
|
id: res.data.cartId,
|
||||||
|
discount: that.storeInfo.discount,
|
||||||
|
}
|
||||||
|
if (that.source === 'countyLottery') {
|
||||||
|
orderQuery.from = 'countyLottery'
|
||||||
|
orderQuery.drawActivityId = Number(that.activityId || 0)
|
||||||
|
}
|
||||||
that.$yrouter.push({
|
that.$yrouter.push({
|
||||||
path: "/pages/order/OrderSubmission/index",
|
path: "/pages/order/OrderSubmission/index",
|
||||||
query: {
|
query: orderQuery
|
||||||
id: res.data.cartId,
|
|
||||||
discount: that.storeInfo.discount,
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
that.submitActionLock = false
|
||||||
|
}, 1500)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(news === 2) {
|
if(news === 2) {
|
||||||
@@ -1527,8 +1565,12 @@ export default {
|
|||||||
// + '&couponId=' + coupId
|
// + '&couponId=' + coupId
|
||||||
url: giftUrl
|
url: giftUrl
|
||||||
})
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
that.submitActionLock = false
|
||||||
|
}, 1500)
|
||||||
}
|
}
|
||||||
if(news === 0) {
|
if(news === 0) {
|
||||||
|
that.submitActionLock = false
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "添加购物车成功",
|
title: "添加购物车成功",
|
||||||
icon: "success",
|
icon: "success",
|
||||||
@@ -1541,6 +1583,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
that.isOpen = false;
|
that.isOpen = false;
|
||||||
|
that.submitActionLock = false
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: error.msg,
|
title: error.msg,
|
||||||
icon: "none",
|
icon: "none",
|
||||||
@@ -1576,11 +1619,16 @@ export default {
|
|||||||
listenerActionClose() {
|
listenerActionClose() {
|
||||||
this.posters = false
|
this.posters = false
|
||||||
},
|
},
|
||||||
|
isCountyLotteryGoodsDetail() {
|
||||||
|
return this.source === 'countyLottery' && Number(this.activityId || 0) > 0
|
||||||
|
},
|
||||||
// v9-2
|
// v9-2
|
||||||
changeCoupons(e) {
|
changeCoupons(e) {
|
||||||
|
if (this.isCountyLotteryGoodsDetail()) return
|
||||||
this.show = !this.show
|
this.show = !this.show
|
||||||
},
|
},
|
||||||
setCoupon(couponId) {
|
setCoupon(couponId) {
|
||||||
|
if (this.isCountyLotteryGoodsDetail()) return
|
||||||
this.couponId = couponId
|
this.couponId = couponId
|
||||||
},
|
},
|
||||||
async checkFavorite() {
|
async checkFavorite() {
|
||||||
@@ -2248,43 +2296,3 @@ export default {
|
|||||||
word-break: keep-all;
|
word-break: keep-all;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
}
|
|
||||||
.gift-wrap{
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.gift-bg{
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.ll-text{
|
|
||||||
margin-left: 250rpx;
|
|
||||||
word-break: keep-all;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
.gift-img{
|
|
||||||
width: 34rpx;
|
|
||||||
height: 34rpx;
|
|
||||||
margin-right: 10rpx;
|
|
||||||
}
|
|
||||||
.gift-wrap{
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.gift-bg{
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.ll-text{
|
|
||||||
margin-left: 250rpx;
|
|
||||||
word-break: keep-all;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.ll-text{
|
|
||||||
margin-left: 250rpx;
|
|
||||||
word-break: keep-all;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -219,7 +219,6 @@ import CitySelect from "@/components/CitySelect";
|
|||||||
import tmUpload from '@/components/tm-upload/tm-upload.vue';
|
import tmUpload from '@/components/tm-upload/tm-upload.vue';
|
||||||
import {getCity} from "@/api/user";
|
import {getCity} from "@/api/user";
|
||||||
import {chooseImage, isWeixin} from "@/utils";
|
import {chooseImage, isWeixin} from "@/utils";
|
||||||
import {getHomeData} from "@/api/public";
|
|
||||||
import {VUE_APP_API_URL} from "@/config"
|
import {VUE_APP_API_URL} from "@/config"
|
||||||
import {getHotelTypeList, postHotelApply, postHotelReApply} from "@/api/inn.js";
|
import {getHotelTypeList, postHotelApply, postHotelReApply} from "@/api/inn.js";
|
||||||
|
|
||||||
@@ -440,81 +439,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getIndex(value, arr) {
|
submit() {
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.addressText.length == 0) {
|
if (this.addressText.length == 0) {
|
||||||
this.$dialog.error("请选择店铺所在省市区");
|
this.$dialog.error("请选择店铺所在省市区");
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -588,7 +588,8 @@ export default {
|
|||||||
pageKeyId: '',
|
pageKeyId: '',
|
||||||
shareImg: '',
|
shareImg: '',
|
||||||
videoPlayers: [],
|
videoPlayers: [],
|
||||||
isView: false
|
isView: false,
|
||||||
|
skipRefreshOnShow: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 必须在页面加 onPageScroll(e){} ,才能滑动显示背景
|
// 必须在页面加 onPageScroll(e){} ,才能滑动显示背景
|
||||||
@@ -679,6 +680,10 @@ export default {
|
|||||||
if (!this.isLoad) {
|
if (!this.isLoad) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (this.skipRefreshOnShow) {
|
||||||
|
this.skipRefreshOnShow = false
|
||||||
|
return
|
||||||
|
}
|
||||||
this.fetchInnDetail()
|
this.fetchInnDetail()
|
||||||
if(this.isView) return
|
if(this.isView) return
|
||||||
if(this.activeIndex === 1) {
|
if(this.activeIndex === 1) {
|
||||||
@@ -834,6 +839,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
infoClick: function (info) {
|
infoClick: function (info) {
|
||||||
|
this.skipRefreshOnShow = true
|
||||||
this.$yrouter.push('/pagesInn/inn/innInfoDetail?id=' + info.id)
|
this.$yrouter.push('/pagesInn/inn/innInfoDetail?id=' + info.id)
|
||||||
},
|
},
|
||||||
coverPlay(){
|
coverPlay(){
|
||||||
|
|||||||
@@ -93,7 +93,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="orderInfo.deliveryId !== null && ([-1, -2, 3, 4].includes(orderInfo._status._type) || (orderInfo._status._type == 2 && orderInfo.isTickets !== 1))">
|
<view v-if="orderInfo.deliveryId !== null && ([-1, -2, -3, 3, 4].includes(orderInfo._status._type) || (orderInfo._status._type == 2 && orderInfo.isTickets !== 1))">
|
||||||
<view
|
<view
|
||||||
v-for="(delivery, index) in orderInfo.deliveryInfo"
|
v-for="(delivery, index) in orderInfo.deliveryInfo"
|
||||||
:key="index"
|
:key="index"
|
||||||
@@ -203,31 +203,31 @@
|
|||||||
|
|
||||||
<view style="margin-top: 30rpx;border-radius:20rpx;overflow: hidden;" class="v12-white">
|
<view style="margin-top: 30rpx;border-radius:20rpx;overflow: hidden;" class="v12-white">
|
||||||
<!-- <OrderGoods :evaluate="status.type || 0" :cartInfo="orderInfo.cartInfo || []" title="商品信息"></OrderGoods> -->
|
<!-- <OrderGoods :evaluate="status.type || 0" :cartInfo="orderInfo.cartInfo || []" title="商品信息"></OrderGoods> -->
|
||||||
<view class="v12-radius-20 v12-pa-3" v-for="(cart, d) in orderInfo.cartInfo" :key="d" @click="goGoodsCon(cart, orderInfo.isGiftCardReceiveBlind, orderInfo.isDrawOrder)">
|
<view class="v12-radius-20 v12-pa-3" v-for="(cart, d) in getOrderDetailDisplayItems(orderInfo)" :key="d" @click="goGoodsCon(cart, orderInfo.isGiftCardReceiveBlind, orderInfo.isDrawOrder, orderInfo.scenarioCode)">
|
||||||
<view class="v12-justify-between" v-if="orderInfo.isGiftCardReceiveBlind === 0">
|
<view class="v12-justify-between" v-if="!isBlindBoxOrder(orderInfo)">
|
||||||
<view class="">
|
<view class="">
|
||||||
<image style="width: 120rpx; height: 120rpx" class="v12-radius-8" :src="cart.productInfo.image"></image>
|
<image style="width: 120rpx; height: 120rpx" class="v12-radius-8" :src="cart.image"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-justify-between v12-flex-column v12-ml-2" style="flex: 2">
|
<view class="v12-justify-between v12-flex-column v12-ml-2" style="flex: 2">
|
||||||
<view class="v12-font-28 v12-dark-text v12-font-bold more-t">
|
<view class="v12-font-28 v12-dark-text v12-font-bold more-t">
|
||||||
{{ cart.productInfo.storeName }}
|
{{ cart.name }}
|
||||||
</view>
|
</view>
|
||||||
<view v-if="cart.productInfo.attrInfo && orderInfo.isDrawOrder !== 1" class="more-t v12-secondary-dark-text v12-font-24">
|
<view v-if="cart.sku && orderInfo.isDrawOrder !== 1" class="more-t v12-secondary-dark-text v12-font-24">
|
||||||
{{ cart.productInfo.attrInfo.sku || '' }}
|
{{ cart.sku }}
|
||||||
</view>
|
</view>
|
||||||
<view v-if="orderInfo.isDrawOrder === 1" class="more-t v12-secondary-dark-text v12-font-24">
|
<view v-if="orderInfo.isDrawOrder === 1" class="more-t v12-secondary-dark-text v12-font-24">
|
||||||
{{ orderInfo.drawOrderInfo.prizeAttrName || '' }}
|
{{ orderInfo.drawOrderInfo.prizeAttrName || '' }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-justify-between v12-flex-column v12-dark-text v12-text-right">
|
<view class="v12-justify-between v12-flex-column v12-dark-text v12-text-right">
|
||||||
<view class=" " v-if="orderInfo.isDrawOrder === 0">
|
<view class=" " v-if="orderInfo.isDrawOrder === 0 && cart.showPrice">
|
||||||
<text class="v12-font-22">
|
<text class="v12-font-22">
|
||||||
¥
|
¥
|
||||||
</text>
|
</text>
|
||||||
<text class="v12-font-28">{{ cart.truePrice }}</text>
|
<text class="v12-font-28">{{ force2Decimal(cart.price) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-font-22">
|
<view class="v12-font-22">
|
||||||
<text>x{{ cart.cartNum }}</text>
|
<text>x{{ cart.qty }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -244,16 +244,29 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="" v-if="orderInfo.cartInfo &&( d === orderInfo.cartInfo.length - 1) && orderInfo.isDrawOrder === 0">
|
<view class="" v-if="getOrderDetailDisplayItems(orderInfo).length && (d === getOrderDetailDisplayItems(orderInfo).length - 1) && orderInfo.isDrawOrder === 0">
|
||||||
<view class="v12-justify-between v12-align-center v12-mt-3 v12-dark-text" v-if="orderInfo.isGiftCardReceiveBlind === 0">
|
<view v-if="orderInfo.isGiftCardReceiveBlind === 0">
|
||||||
<view class="v12-font-24 v12-dark-text">
|
<view class="v12-justify-between v12-align-center v12-mt-3 v12-dark-text" v-if="isCustomGiftOrder(orderInfo)">
|
||||||
商品总价
|
<view class="v12-font-24 v12-dark-text" v-if="orderInfo.customGiftInfo.isShowValue">
|
||||||
|
{{ '礼品价值' }}
|
||||||
|
</view>
|
||||||
|
<view class="v12-text-right" v-if="orderInfo.customGiftInfo.isShowValue">
|
||||||
|
<text class="v12-font-22">¥</text>
|
||||||
|
<text class="v12-font-28" v-if="orderInfo.customGiftInfo && orderInfo.customGiftInfo.isShowValue">
|
||||||
|
{{ force2Decimal(orderInfo.customGiftInfo.giftValue) }}
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-text-right">
|
<view class="v12-justify-between v12-align-center v12-mt-3 v12-dark-text" v-else>
|
||||||
<text class="v12-font-22">¥</text>
|
<view class="v12-font-24 v12-dark-text">
|
||||||
<text class="v12-font-28">
|
{{ '商品总价' }}
|
||||||
{{ force2Decimal(orderInfo.totalPrice) }}
|
</view>
|
||||||
</text>
|
<view class="v12-text-right">
|
||||||
|
<text class="v12-font-22">¥</text>
|
||||||
|
<text class="v12-font-28">
|
||||||
|
{{ force2Decimal(orderInfo.totalPrice) }}
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-justify-between v12-align-center v12-mt-3" v-if="orderInfo.payPostage > 0">
|
<view class="v12-justify-between v12-align-center v12-mt-3" v-if="orderInfo.payPostage > 0">
|
||||||
@@ -304,7 +317,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-divider></u-divider>
|
<u-divider></u-divider>
|
||||||
<view class="v12-justify-between v12-align-center v12-mt-3" v-if="orderInfo.isGiftCardReceiveBlind === 0">
|
<view class="v12-justify-between v12-align-center v12-mt-3" v-if="orderInfo.isGiftCardReceiveBlind === 0 && !isCustomGiftOrder(orderInfo)">
|
||||||
<view class="v12-font-28 v12-font-bold v12-dark-text">
|
<view class="v12-font-28 v12-font-bold v12-dark-text">
|
||||||
实付款
|
实付款
|
||||||
</view>
|
</view>
|
||||||
@@ -354,11 +367,11 @@
|
|||||||
<view class="flex-0">订单类型</view>
|
<view class="flex-0">订单类型</view>
|
||||||
<view class="v12-text-right">{{ orderTypeName }}</view>
|
<view class="v12-text-right">{{ orderTypeName }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="orderInfo.isDrawOrder !== 1" class="item acea-row row-between v12-font-24 v12-dark-text ">
|
<view v-if="orderInfo.isDrawOrder !== 1 && !isCustomGiftOrder(orderInfo)" class="item acea-row row-between v12-font-24 v12-dark-text ">
|
||||||
<view class="flex-0">支付状态</view>
|
<view class="flex-0">支付状态</view>
|
||||||
<view class="v12-text-right">{{ orderInfo.paid ? "已支付" : "未支付" }}</view>
|
<view class="v12-text-right">{{ orderInfo.paid ? "已支付" : "未支付" }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="orderInfo.isDrawOrder !== 1" class="item acea-row row-between v12-font-24 v12-dark-text ">
|
<view v-if="orderInfo.isDrawOrder !== 1 && !isCustomGiftOrder(orderInfo)" class="item acea-row row-between v12-font-24 v12-dark-text ">
|
||||||
<view class="flex-0">支付方式</view>
|
<view class="flex-0">支付方式</view>
|
||||||
<view class="v12-text-right">{{ orderInfo._status._payType }}</view>
|
<view class="v12-text-right">{{ orderInfo._status._payType }}</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -485,22 +498,31 @@
|
|||||||
<text class="v12-font-22 v12-dark1-text">
|
<text class="v12-font-22 v12-dark1-text">
|
||||||
共{{ orderInfo.totalNum }}件商品
|
共{{ orderInfo.totalNum }}件商品
|
||||||
</text>
|
</text>
|
||||||
<text class="v12-font-bold v12-dark-text v12-font-28 v12-mx-2">
|
<template v-if="!isCustomGiftOrder(orderInfo)">
|
||||||
实付款
|
<text class="v12-font-bold v12-dark-text v12-font-28 v12-mx-2">
|
||||||
</text>
|
实付款
|
||||||
<text class="v12-font-bold v12-primary-text v12-font-22">
|
</text>
|
||||||
¥
|
<text class="v12-font-bold v12-primary-text v12-font-22">
|
||||||
</text>
|
¥
|
||||||
<text class="v12-font-bold v12-primary-text v12-font-28">
|
</text>
|
||||||
{{ force2Decimal(orderInfo.payPrice) }}
|
<text class="v12-font-bold v12-primary-text v12-font-28">
|
||||||
</text>
|
{{ force2Decimal(orderInfo.payPrice) }}
|
||||||
|
</text>
|
||||||
|
</template>
|
||||||
</view>
|
</view>
|
||||||
<view class="bnt v12-primary-text v12-primary-border v12-ml-1" @click="subscribePay">立即付款</view>
|
<view class="bnt v12-primary-text v12-primary-border v12-ml-1" @click="subscribePay">立即付款</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="status.type == 1" >
|
<template v-if="status.type == 1" >
|
||||||
<view class="v12-justify-between " style="width: 100%">
|
<view v-if="isCustomGiftOrder(orderInfo)" class="v12-justify-end" style="width: 100%">
|
||||||
|
<view
|
||||||
|
v-if="canShowModifyAddress(orderInfo) && orderInfo.isDrawOrder === 0"
|
||||||
|
class="bnt v12-dark-text v12-dark-border cancel"
|
||||||
|
@click="goAddress"
|
||||||
|
>修改地址</view>
|
||||||
|
</view>
|
||||||
|
<view v-else class="v12-justify-between " style="width: 100%">
|
||||||
<view class="v12-justify-between ">
|
<view class="v12-justify-between ">
|
||||||
<view v-if="orderInfo.isDrawOrder > 0" class="bnt v12-dark-text v12-dark-border cancel" @click.stop="callMerPhone">联系客服</view>
|
<view v-if="orderInfo.isDrawOrder > 0" class="bnt v12-dark-text v12-dark-border cancel" @click.stop="callMerPhone">联系客服</view>
|
||||||
<view v-if="orderInfo.isGiftCardReceiveBlind === 0 && orderInfo.isDrawOrder === 0" class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
<view v-if="orderInfo.isGiftCardReceiveBlind === 0 && orderInfo.isDrawOrder === 0" class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
||||||
@@ -515,7 +537,10 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="status.type == 2">
|
<template v-if="status.type == 2">
|
||||||
<view class="v12-justify-between " style="width: 100%">
|
<view v-if="isCustomGiftOrder(orderInfo)" class="v12-justify-end" style="width: 100%">
|
||||||
|
<view class="bnt v12-primary-text v12-primary-border" @click="takeOrder">确认收货</view>
|
||||||
|
</view>
|
||||||
|
<view v-else class="v12-justify-between " style="width: 100%">
|
||||||
<view v-if="orderInfo.isGiftCardReceiveBlind === 0" class="bnt v12-dark-text v12-dark-border cancel" @click.stop="callMerPhone">联系客服</view>
|
<view v-if="orderInfo.isGiftCardReceiveBlind === 0" class="bnt v12-dark-text v12-dark-border cancel" @click.stop="callMerPhone">联系客服</view>
|
||||||
<view class="" v-else></view>
|
<view class="" v-else></view>
|
||||||
<view class="v12-justify-between">
|
<view class="v12-justify-between">
|
||||||
@@ -548,29 +573,38 @@
|
|||||||
<view class="btn flex jc-center ai-center v12-font-24" @click="goGoodsReturn(orderInfo)">申请退款</view>
|
<view class="btn flex jc-center ai-center v12-font-24" @click="goGoodsReturn(orderInfo)">申请退款</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bnt v12-dark-text v12-dark-border cancel" @click="buyAgin">再买一单</view>
|
<view v-if="!isCollectiveOrder(orderInfo)" class="bnt v12-dark-text v12-dark-border cancel" @click="buyAgin">再买一单</view>
|
||||||
<view class="bnt v12-primary-text v12-primary-border" @click="routerGo(orderInfo.cartInfo[0])">立即评价</view>
|
<view
|
||||||
|
v-if="canShowOrderEvaluate(orderInfo)"
|
||||||
|
class="bnt v12-primary-text v12-primary-border"
|
||||||
|
@click="routerGo(orderInfo.cartInfo[0])"
|
||||||
|
>立即评价</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="status.type == -1">
|
<template v-if="status.type == -1">
|
||||||
<view style="width: 100%">
|
<view class="v12-justify-between" style="width: 100%">
|
||||||
<view class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
<view class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
||||||
|
<view class="bnt v12-primary-text v12-primary-border cancel" @click="cancelRefund">取消退款</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="status.type == -2">
|
<template v-if="status.type == -2">
|
||||||
<view class="v12-justify-between " style="width: 100%">
|
<view class="v12-justify-between " style="width: 100%">
|
||||||
<view class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
<view class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
||||||
<view class="bnt v12-dark-text v12-dark-border cancel" @click="buyAgin">再买一单</view>
|
<view v-if="!isCollectiveOrder(orderInfo)" class="bnt v12-dark-text v12-dark-border cancel" @click="buyAgin">再买一单</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="status.type == -3">
|
<template v-if="status.type == -3">
|
||||||
<view class="v12-justify-between " style="width: 100%">
|
<view class="v12-justify-between " style="width: 100%">
|
||||||
<view class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
<view class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
||||||
<view class="v12-justify-between ">
|
<view class="v12-justify-between ">
|
||||||
|
|
||||||
<view class="bnt v12-dark-text v12-dark-border cancel" @click="buyAgin">再买一单</view>
|
<view v-if="!isCollectiveOrder(orderInfo)" class="bnt v12-dark-text v12-dark-border cancel" @click="buyAgin">再买一单</view>
|
||||||
<view class="bnt v12-primary-text v12-primary-border" @click="routerGo(orderInfo.cartInfo[0])">立即评价</view>
|
<view
|
||||||
|
v-if="canShowOrderEvaluate(orderInfo)"
|
||||||
|
class="bnt v12-primary-text v12-primary-border"
|
||||||
|
@click="routerGo(orderInfo.cartInfo[0])"
|
||||||
|
>立即评价</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -654,7 +688,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import passkeyborad from '@/components/yzc-paykeyboard/yzc-paykeyboard'
|
import passkeyborad from '@/components/yzc-paykeyboard/yzc-paykeyboard'
|
||||||
import OrderGoods from "@/components/OrderGoods";
|
import OrderGoods from "@/components/OrderGoods";
|
||||||
import {orderDetail, orderDelay, aginConfirm, express, applyEditAddress, orderExpectedArrivalTime, groupOrderDetail} from "@/api/order";
|
import {orderDetail, orderDelay, aginConfirm, express, applyEditAddress, orderExpectedArrivalTime, groupOrderDetail, cancelOrderRefund} from "@/api/order";
|
||||||
import Payment from "@/components/Payment";
|
import Payment from "@/components/Payment";
|
||||||
import DataFormat from "@/components/DataFormat";
|
import DataFormat from "@/components/DataFormat";
|
||||||
import {copyClipboard} from "@/utils";
|
import {copyClipboard} from "@/utils";
|
||||||
@@ -845,9 +879,12 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goGoodsCon(item, isGiftCardReceiveBlind, isDrawOrder) {
|
goGoodsCon(item, isGiftCardReceiveBlind, isDrawOrder, scenarioCode) {
|
||||||
if(isGiftCardReceiveBlind) return
|
if(isGiftCardReceiveBlind) return
|
||||||
if(isDrawOrder) return
|
if(isDrawOrder) return
|
||||||
|
// 采购批发订单(集采中心)商品卡片不跳转批发商品详情页
|
||||||
|
if (Number(scenarioCode) === 22) return
|
||||||
|
if (Number(scenarioCode) === 24) return
|
||||||
const activityId = Number(
|
const activityId = Number(
|
||||||
item.drawActivityId ||
|
item.drawActivityId ||
|
||||||
(item.productInfo && item.productInfo.drawActivityId) ||
|
(item.productInfo && item.productInfo.drawActivityId) ||
|
||||||
@@ -1024,6 +1061,83 @@ export default {
|
|||||||
}
|
}
|
||||||
return status;
|
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) {
|
getStatusImg(order) {
|
||||||
const type = parseInt(order._status._type);
|
const type = parseInt(order._status._type);
|
||||||
let imgUrl = "";
|
let imgUrl = "";
|
||||||
@@ -1146,16 +1260,17 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
goBack() {
|
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();
|
this.$yrouter.back();
|
||||||
return;
|
return;
|
||||||
} else {
|
|
||||||
console.log(this);
|
|
||||||
this.$yrouter.replace({
|
|
||||||
path: "/pages/order/MyOrder/index"
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
this.$yrouter.replace({
|
||||||
|
path: "/pages/order/MyOrder/index"
|
||||||
|
});
|
||||||
},
|
},
|
||||||
cancelOrder() {
|
cancelOrder() {
|
||||||
cancelOrderHandle(this.orderInfo.orderId)
|
cancelOrderHandle(this.orderInfo.orderId)
|
||||||
@@ -1166,6 +1281,39 @@ export default {
|
|||||||
this.getDetail();
|
this.getDetail();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
cancelRefund() {
|
||||||
|
uni.showModal({
|
||||||
|
title: '取消退款申请',
|
||||||
|
content: '确认取消退款申请吗?',
|
||||||
|
showCancel: true,
|
||||||
|
cancelText: '再想想',
|
||||||
|
confirmText: '确认取消',
|
||||||
|
confirmColor: '#C52733 ',
|
||||||
|
success: (res) => {
|
||||||
|
if (!res.confirm) return;
|
||||||
|
uni.showLoading({
|
||||||
|
title: '取消中'
|
||||||
|
});
|
||||||
|
cancelOrderRefund(this.orderInfo.orderId).then((res) => {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg || '已取消退款申请',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
this.getDetail();
|
||||||
|
}).catch((err) => {
|
||||||
|
const message = err.msg || (err.response && err.response.data && (err.response.data.msg || err.response.data.message)) || '取消退款失败';
|
||||||
|
uni.showToast({
|
||||||
|
title: message,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 3000
|
||||||
|
});
|
||||||
|
}).finally(() => {
|
||||||
|
uni.hideLoading();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
takeOrder() {
|
takeOrder() {
|
||||||
takeOrderHandle(this.orderInfo.orderId).finally(() => {
|
takeOrderHandle(this.orderInfo.orderId).finally(() => {
|
||||||
this.getDetail();
|
this.getDetail();
|
||||||
@@ -1238,8 +1386,19 @@ export default {
|
|||||||
orderDetail(id).then(res => {
|
orderDetail(id).then(res => {
|
||||||
this.orderInfo = res.data
|
this.orderInfo = res.data
|
||||||
this.orderInfo._status._type = parseInt(this.orderInfo._status._type)
|
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()
|
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.orderTypeName = "拼团订单"
|
||||||
this.orderTypeNameStatus = false
|
this.orderTypeNameStatus = false
|
||||||
} else if (this.orderInfo.bargainId > 0) {
|
} else if (this.orderInfo.bargainId > 0) {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
<view class="item acea-row row-between-wrapper">
|
<view class="item acea-row row-between-wrapper">
|
||||||
<view class="name">提现</view>
|
<view class="name">提现</view>
|
||||||
<view class="input">
|
<view class="input">
|
||||||
<input :placeholder="'最低提现金额' + minPrice" v-model="post.money" />
|
<input v-model="post.money" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="tip">当前可提现金额: {{ commissionCount }}</view>
|
<view class="tip">当前可提现金额: {{ commissionCount }}</view>
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
<view class="item acea-row row-between-wrapper">
|
<view class="item acea-row row-between-wrapper">
|
||||||
<view class="name">提现</view>
|
<view class="name">提现</view>
|
||||||
<view class="input">
|
<view class="input">
|
||||||
<input :placeholder="'最低提现金额' + minPrice" v-model="post.money" />
|
<input placeholder="请输入提现金额" v-model="post.money" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="tip">当前可提现金额: {{ commissionCount }}</view>
|
<view class="tip">当前可提现金额: {{ commissionCount }}</view>
|
||||||
|
|||||||
@@ -29,6 +29,13 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="card form-card">
|
<view class="card form-card">
|
||||||
|
<view class="form-card-header">
|
||||||
|
<view class="form-card-title">填写收货地址</view>
|
||||||
|
<view class="select-address-entry" @click="chooseExistingAddress">
|
||||||
|
<text class="select-address-text" style="margin-bottom: 4rpx;">选择现有地址 </text>
|
||||||
|
<u-icon name="arrow-right" size="14" color="#BD3124"></u-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="form-row">
|
<view class="form-row">
|
||||||
<text class="label">收货人</text>
|
<text class="label">收货人</text>
|
||||||
<input v-model="form.realName" class="input" placeholder="请填写收货人" placeholder-style="color:#b2b2b2;" />
|
<input v-model="form.realName" class="input" placeholder="请填写收货人" placeholder-style="color:#b2b2b2;" />
|
||||||
@@ -190,6 +197,7 @@ export default {
|
|||||||
this.fetchRealnameStatus()
|
this.fetchRealnameStatus()
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
this.handleChooseAddress()
|
||||||
const done = uni.getStorageSync('countyClaimAuthDone')
|
const done = uni.getStorageSync('countyClaimAuthDone')
|
||||||
const needAutoSubmit = uni.getStorageSync('countyClaimNeedAutoSubmit')
|
const needAutoSubmit = uni.getStorageSync('countyClaimNeedAutoSubmit')
|
||||||
if (done && (this.waitSubmitAfterRealname || needAutoSubmit)) {
|
if (done && (this.waitSubmitAfterRealname || needAutoSubmit)) {
|
||||||
@@ -219,6 +227,41 @@ export default {
|
|||||||
goBack() {
|
goBack() {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
},
|
},
|
||||||
|
chooseExistingAddress() {
|
||||||
|
uni.setStorageSync('sourceAddress', {
|
||||||
|
realName: this.form.realName || '',
|
||||||
|
phone: this.form.phone || '',
|
||||||
|
userAddress: `${this.address.province || ''}${this.address.city || ''}${this.address.district || ''}${this.form.detail || ''}`,
|
||||||
|
province: this.address.province || '',
|
||||||
|
city: this.address.city || '',
|
||||||
|
district: this.address.district || '',
|
||||||
|
detail: this.form.detail || ''
|
||||||
|
})
|
||||||
|
this.$yrouter.push({
|
||||||
|
path: '/pages/user/address/AddressManagement/index',
|
||||||
|
query: {
|
||||||
|
choosMode: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleChooseAddress() {
|
||||||
|
const chooseAddress = uni.getStorageSync('chooseAddress') || {}
|
||||||
|
if (!chooseAddress.id) return
|
||||||
|
uni.setStorageSync('chooseAddress', {})
|
||||||
|
this.fillAddressForm(chooseAddress)
|
||||||
|
},
|
||||||
|
fillAddressForm(address = {}) {
|
||||||
|
this.form.realName = address.realName || address.real_name || ''
|
||||||
|
this.form.phone = address.phone || ''
|
||||||
|
this.form.detail = address.detail || ''
|
||||||
|
this.address = {
|
||||||
|
province: address.province || '',
|
||||||
|
city: address.city || '',
|
||||||
|
district: address.district || '',
|
||||||
|
city_id: address.city_id || address.cityId || address.city_id
|
||||||
|
}
|
||||||
|
this.addressText = `${this.address.province} ${this.address.city} ${this.address.district}`.trim()
|
||||||
|
},
|
||||||
getCityList() {
|
getCityList() {
|
||||||
getCity().then(res => {
|
getCity().then(res => {
|
||||||
this.district = res.data || []
|
this.district = res.data || []
|
||||||
@@ -585,6 +628,31 @@ export default {
|
|||||||
padding: 0 24rpx 24rpx;
|
padding: 0 24rpx 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-card-header {
|
||||||
|
min-height: 88rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
border-bottom: 2rpx dashed #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-card-title {
|
||||||
|
color: #262626;
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-address-entry {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
color: #BD3124;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-address-text {
|
||||||
|
font-size: 26rpx;
|
||||||
|
margin-right: 8rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.form-row {
|
.form-row {
|
||||||
min-height: 92rpx;
|
min-height: 92rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -284,8 +284,7 @@ export default {
|
|||||||
return [1, 2, -1].includes(Number(item.status)) && !!item.prizeName
|
return [1, 2, -1].includes(Number(item.status)) && !!item.prizeName
|
||||||
},
|
},
|
||||||
getInvalidReason(item) {
|
getInvalidReason(item) {
|
||||||
if (Number(item.claimStatus) === -1) return '奖品过期未领取'
|
return item.invalidReason || ''
|
||||||
return '订单取消'
|
|
||||||
},
|
},
|
||||||
formatPrizeText(item = {}) {
|
formatPrizeText(item = {}) {
|
||||||
const prizeName = item.prizeName || '神秘奖品'
|
const prizeName = item.prizeName || '神秘奖品'
|
||||||
|
|||||||
+99
-40
@@ -11,9 +11,9 @@
|
|||||||
<view class="name one-t">{{ item.username }}</view>
|
<view class="name one-t">{{ item.username }}</view>
|
||||||
<text class="msg" v-if="item.msg_type===0">{{ item.msg_content }}</text>
|
<text class="msg" v-if="item.msg_type===0">{{ item.msg_content }}</text>
|
||||||
<view class="msg" v-if="item.msg_type===1">
|
<view class="msg" v-if="item.msg_type===1">
|
||||||
<image class="img" :src="item.msg_content" @click="preview(item.msg_content)"></image>
|
<image class="img" :src="imgUrl(item.msg_content)" @click="preview(imgUrl(item.msg_content))"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
<view class="name one-t">{{ item.username }}</view>
|
<view class="name one-t">{{ item.username }}</view>
|
||||||
<text class="msg" v-if="item.msg_type===0">{{ item.msg_content }}</text>
|
<text class="msg" v-if="item.msg_type===0">{{ item.msg_content }}</text>
|
||||||
<view class="msg" v-if="item.msg_type===1">
|
<view class="msg" v-if="item.msg_type===1">
|
||||||
<image class="img" :src="item.msg_content" @click="preview(item.msg_content)"></image>
|
<image class="img" :src="imgUrl(item.msg_content)" @click="preview(imgUrl(item.msg_content))"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="msg v12-d-flex" style="box-sizing: content-box" v-if="item.msg_type===2" @click="toGoods(item)">
|
<view class="msg v12-d-flex" style="box-sizing: content-box" v-if="item.msg_type===2" @click="toGoods(item)">
|
||||||
<view class="goods-logo">
|
<view class="goods-logo">
|
||||||
@@ -108,8 +108,11 @@ export default {
|
|||||||
uploadToken: null, //上传token
|
uploadToken: null, //上传token
|
||||||
|
|
||||||
socketOpen: false,
|
socketOpen: false,
|
||||||
|
socketConnecting: false, // 是否正在建连
|
||||||
socketTask: null,
|
socketTask: null,
|
||||||
socketMsgQueue: [],
|
socketMsgQueue: [],
|
||||||
|
hasConnected: false, // 是否成功建过连接
|
||||||
|
reconnectHistory: false, // 重连后用服务端历史整体替换本地列表,防止消息重复
|
||||||
|
|
||||||
roomId: null, //房间ID
|
roomId: null, //房间ID
|
||||||
content: "", //消息内容
|
content: "", //消息内容
|
||||||
@@ -136,30 +139,22 @@ export default {
|
|||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.content = uni.getStorageSync(this.merName+this.uid+this.storeId)
|
this.content = uni.getStorageSync(this.merName+this.uid+this.storeId)
|
||||||
this.connectSocketInit();
|
// 已连接/连接中不重复建连;清空 list 会导致图片操作(触发 onHide/onShow)后页面白屏
|
||||||
this.list = []
|
if (!this.socketOpen && !this.socketConnecting) {
|
||||||
|
this.connectSocketInit();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
if (this.socketOpen) {
|
this.closeSocket();
|
||||||
this.socketTask.close();
|
|
||||||
}
|
|
||||||
uni.onSocketClose(res => {
|
|
||||||
console.log('WebSocket 已关闭!', res);
|
|
||||||
});
|
|
||||||
uni.setStorageSync(this.merName+this.uid+this.storeId, this.content)
|
uni.setStorageSync(this.merName+this.uid+this.storeId, this.content)
|
||||||
},
|
},
|
||||||
onHide() {
|
onHide() {
|
||||||
if (this.socketOpen) {
|
this.closeSocket();
|
||||||
this.socketTask.close();
|
|
||||||
}
|
|
||||||
uni.onSocketClose(res => {
|
|
||||||
console.log('WebSocket 已关闭!', res);
|
|
||||||
});
|
|
||||||
uni.setStorageSync(this.merName+this.uid+this.storeId, this.content)
|
uni.setStorageSync(this.merName+this.uid+this.storeId, this.content)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toGoods(item) {
|
toGoods(item) {
|
||||||
const itemJson = JSON.parse(item.msg_content)
|
const itemJson = this.wsJson(item.msg_content)
|
||||||
if(!itemJson.goodsId) {
|
if(!itemJson.goodsId) {
|
||||||
// 提示数据错误
|
// 提示数据错误
|
||||||
// uni.showToast({
|
// uni.showToast({
|
||||||
@@ -177,7 +172,18 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
wsJson(json) {
|
wsJson(json) {
|
||||||
return JSON.parse(json)
|
// 兼容脏数据,避免渲染时报错导致白屏
|
||||||
|
try {
|
||||||
|
return JSON.parse(json) || {}
|
||||||
|
} catch (e) {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 拼接图片完整地址:七牛上传后消息里只存 key,需要补上资源域名;http 统一转 https
|
||||||
|
imgUrl(content) {
|
||||||
|
if (!content) return ''
|
||||||
|
if (/^https?:\/\//i.test(content)) return content.replace(/^http:\/\//i, 'https://')
|
||||||
|
return this.webUrl + '/' + content
|
||||||
},
|
},
|
||||||
getUploadToken() {
|
getUploadToken() {
|
||||||
let that = this;
|
let that = this;
|
||||||
@@ -249,33 +255,68 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// 进入这个页面的时候创建websocket连接【整个页面随时使用】
|
// 进入页面时创建websocket连接【整个页面随时使用】
|
||||||
connectSocketInit() {
|
connectSocketInit() {
|
||||||
|
if (this.socketOpen || this.socketConnecting) return;
|
||||||
|
this.socketConnecting = true;
|
||||||
|
|
||||||
// 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
|
// 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
|
||||||
this.socketTask = uni.connectSocket({
|
const task = uni.connectSocket({
|
||||||
url: this.$SOCKET_URL,
|
url: this.$SOCKET_URL,
|
||||||
success: () => {
|
success: () => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
if (!task) {
|
||||||
|
this.socketConnecting = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.socketTask = task;
|
||||||
|
|
||||||
uni.onSocketOpen(res => {
|
// 任务级回调:全局 uni.onSocket* 每次进页面都会重复注册,导致消息重复处理、连接串台
|
||||||
console.log('WebSocket连接已打开!', res);
|
const isCurrent = () => this.socketTask === task;
|
||||||
|
|
||||||
|
task.onOpen(() => {
|
||||||
|
if (!isCurrent()) return;
|
||||||
this.socketOpen = true;
|
this.socketOpen = true;
|
||||||
|
this.socketConnecting = false;
|
||||||
|
// 断线重连后重新加入房间;本地已有历史时用服务端历史整体替换,避免重复
|
||||||
|
this.reconnectHistory = this.hasConnected && this.list.length > 0;
|
||||||
|
this.hasConnected = true;
|
||||||
this.createRoom();
|
this.createRoom();
|
||||||
|
// 补发连接未就绪期间排队的消息(如发图片时连接被隐藏页关闭)
|
||||||
|
if (this.socketMsgQueue.length) {
|
||||||
|
const queue = this.socketMsgQueue.splice(0);
|
||||||
|
queue.forEach(msg => this.sendSocketMessage(msg));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
uni.onSocketError(err => {
|
task.onMessage(res => {
|
||||||
console.log('WebSocket连接打开失败,请检查!', err);
|
if (!isCurrent()) return;
|
||||||
});
|
|
||||||
|
|
||||||
uni.onSocketMessage(res => {
|
|
||||||
console.log('收到服务器内容:', res.data);
|
|
||||||
this.handleMessage(res.data);
|
this.handleMessage(res.data);
|
||||||
});
|
});
|
||||||
|
|
||||||
uni.onSocketClose(res => {
|
task.onError(err => {
|
||||||
console.log('WebSocket 已关闭!', res);
|
console.log('WebSocket连接打开失败,请检查!', err);
|
||||||
|
if (!isCurrent()) return;
|
||||||
|
this.socketOpen = false;
|
||||||
|
this.socketConnecting = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
task.onClose(() => {
|
||||||
|
if (!isCurrent()) return;
|
||||||
|
this.socketOpen = false;
|
||||||
|
this.socketConnecting = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
closeSocket() {
|
||||||
|
this.socketOpen = false;
|
||||||
|
this.socketConnecting = false;
|
||||||
|
if (this.socketTask) {
|
||||||
|
try {
|
||||||
|
this.socketTask.close({});
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
userInput(event) {
|
userInput(event) {
|
||||||
@@ -315,11 +356,14 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
sendSocketMessage(msg) {
|
sendSocketMessage(msg) {
|
||||||
if (this.socketOpen) {
|
if (this.socketOpen && this.socketTask) {
|
||||||
uni.sendSocketMessage({
|
this.socketTask.send({
|
||||||
data: msg,
|
data: msg,
|
||||||
success(res) {
|
fail: () => {
|
||||||
console.log("消息发送成功", res,msg);
|
// 发送失败说明连接可能已断开,重新排队并尝试重连后补发
|
||||||
|
this.socketMsgQueue.push(msg);
|
||||||
|
this.closeSocket();
|
||||||
|
this.connectSocketInit();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -328,7 +372,12 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
handleMessage(str) {
|
handleMessage(str) {
|
||||||
let data = JSON.parse(str);
|
let data;
|
||||||
|
try {
|
||||||
|
data = JSON.parse(str);
|
||||||
|
} catch (e) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
switch (data.type) {
|
switch (data.type) {
|
||||||
case "room_id":
|
case "room_id":
|
||||||
this.roomId = data.msg_content;
|
this.roomId = data.msg_content;
|
||||||
@@ -338,13 +387,23 @@ export default {
|
|||||||
case "leave":
|
case "leave":
|
||||||
break;
|
break;
|
||||||
case "msg":
|
case "msg":
|
||||||
this.list.push(data.msg_content);
|
if (data.msg_content) {
|
||||||
this.scrollLast();
|
this.list.push(data.msg_content);
|
||||||
|
this.scrollLast();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "msg_history":
|
case "msg_history": {
|
||||||
this.list = data.msg_content.concat(this.list);
|
const history = data.msg_content || [];
|
||||||
|
if (this.reconnectHistory) {
|
||||||
|
// 重连后服务端重发历史:整体替换,避免消息重复
|
||||||
|
this.reconnectHistory = false;
|
||||||
|
this.list = history;
|
||||||
|
} else {
|
||||||
|
this.list = history.concat(this.list);
|
||||||
|
}
|
||||||
this.scrollLast();
|
this.scrollLast();
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -396,7 +396,7 @@
|
|||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="form.isDraft === 0 && form.reviewStatus !== 1">
|
<view v-if="form.reviewStatus !== 1">
|
||||||
<view
|
<view
|
||||||
class="v12-primary v12-white-text submit-btn"
|
class="v12-primary v12-white-text submit-btn"
|
||||||
:style="{'background': form.reviewStatus === 0 ? '#FA979F !important' : '#4A97FC'}"
|
:style="{'background': form.reviewStatus === 0 ? '#FA979F !important' : '#4A97FC'}"
|
||||||
@@ -405,19 +405,19 @@
|
|||||||
{{ form.reviewStatus === 0 ? '撤销申请' : form.reviewStatus === 2 ? '重新提交' : '提交审核' }}
|
{{ form.reviewStatus === 0 ? '撤销申请' : form.reviewStatus === 2 ? '重新提交' : '提交审核' }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="form.reviewStatus === null || (form.isDraft === 1 && form.reviewStatus === 0)">
|
<!-- <view v-if="form.reviewStatus === null || (form.isDraft === 1 && form.reviewStatus === 0)">
|
||||||
<view
|
<view
|
||||||
class="v12-primary v12-white-text submit-btn"
|
class="v12-primary v12-white-text submit-btn"
|
||||||
@click="submitForm"
|
@click="submitForm"
|
||||||
>
|
>
|
||||||
提交审核
|
提交审核
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<u-popup
|
<u-popup
|
||||||
:show="show"
|
:show="show"
|
||||||
mode="center"
|
mode="center"
|
||||||
round="10"
|
round="10"
|
||||||
@close="show=false"
|
@close="handlePopupClose"
|
||||||
>
|
>
|
||||||
<view class="popup-body">
|
<view class="popup-body">
|
||||||
<view class="tc bold">
|
<view class="tc bold">
|
||||||
@@ -440,7 +440,6 @@
|
|||||||
<u-button
|
<u-button
|
||||||
type="error"
|
type="error"
|
||||||
text="确定"
|
text="确定"
|
||||||
:disabled="!isAgree"
|
|
||||||
@click="savePopup"
|
@click="savePopup"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
@@ -451,7 +450,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import CitySelect from '@/components/CitySelect'
|
import CitySelect from '@/components/CitySelect'
|
||||||
import { getCity, registerVerify } from '@/api/user'
|
import { getCity, registerVerify } from '@/api/user'
|
||||||
import { uploadVideo, uploadImage } from '@/utils'
|
import { uploadVideo, uploadImage, formatRichText } from '@/utils'
|
||||||
import {
|
import {
|
||||||
getShopData,
|
getShopData,
|
||||||
saveExperienceStore,
|
saveExperienceStore,
|
||||||
@@ -521,9 +520,10 @@ export default {
|
|||||||
onLoad(opts) {
|
onLoad(opts) {
|
||||||
this.partnerId = opts.partnerId || ''
|
this.partnerId = opts.partnerId || ''
|
||||||
this.promoterUid = opts.promoterUid || ''
|
this.promoterUid = opts.promoterUid || ''
|
||||||
|
uni.showLoading({ title: '加载中...', mask: true })
|
||||||
this.queryCity()
|
this.queryCity()
|
||||||
getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({ data }) => {
|
getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({ data }) => {
|
||||||
this.notice = data.merchantApplyNotice
|
this.notice = formatRichText(data.merchantApplyNotice)
|
||||||
})
|
})
|
||||||
getExperienceStoreCategoryList().then(({ data }) => {
|
getExperienceStoreCategoryList().then(({ data }) => {
|
||||||
this.experienceStoreCategoryList = data || []
|
this.experienceStoreCategoryList = data || []
|
||||||
@@ -531,6 +531,8 @@ export default {
|
|||||||
this.experienceStoreCategoryIndex = 0
|
this.experienceStoreCategoryIndex = 0
|
||||||
}
|
}
|
||||||
this.initInfo()
|
this.initInfo()
|
||||||
|
}).catch(() => {
|
||||||
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
@@ -577,12 +579,31 @@ export default {
|
|||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.form.isDraft = 1
|
this.form.isDraft = 1
|
||||||
this.show = true
|
this.show = true
|
||||||
|
}).finally(() => {
|
||||||
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
changeAgree(e) {
|
changeAgree(e) {
|
||||||
this.isAgree = e.detail.value.includes('yes')
|
this.isAgree = e.detail.value.includes('yes')
|
||||||
},
|
},
|
||||||
savePopup() {
|
savePopup() {
|
||||||
|
if (!this.isAgree) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请先阅读并同意入驻申请须知',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.show = false
|
||||||
|
},
|
||||||
|
handlePopupClose() {
|
||||||
|
if (!this.isAgree) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请先阅读并同意入驻申请须知',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
this.show = false
|
this.show = false
|
||||||
},
|
},
|
||||||
stringToMapArr(str, split = ',') {
|
stringToMapArr(str, split = ',') {
|
||||||
@@ -865,6 +886,25 @@ export default {
|
|||||||
height: 52vh;
|
height: 52vh;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
margin: 30rpx 0;
|
margin: 30rpx 0;
|
||||||
|
|
||||||
|
// 小程序rich-text内块级标签无默认段间距,补充与后台富文本编辑器一致的段落格式
|
||||||
|
::v-deep 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.popup-body .agree-box {
|
.popup-body .agree-box {
|
||||||
margin: 60rpx 0;
|
margin: 60rpx 0;
|
||||||
|
|||||||
@@ -6,32 +6,32 @@
|
|||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
/>
|
/>
|
||||||
<image
|
<image
|
||||||
v-show="partnerType === 'province_partner' || partnerType === ''"
|
v-show="partnerType === 'province_partner' || partnerType === '' || partnerType === 'county_agent'"
|
||||||
:src="images.goodSupplierImage"
|
:src="images.goodSupplierImage"
|
||||||
class="img-item"
|
class="img-item"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
@click="goto('goods_supplier')"
|
@click="goto('goods_supplier')"
|
||||||
/>
|
/>
|
||||||
<image
|
<image
|
||||||
v-show="partnerType === 'pioneer' || partnerType === ''"
|
v-show="partnerType === 'pioneer' || partnerType === '' || partnerType === 'county_agent'"
|
||||||
:src="images.wenwanSupplierImage"
|
:src="images.wenwanSupplierImage"
|
||||||
class="img-item"
|
class="img-item"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
@click="goto('wenwan_supplier')"
|
@click="goto('wenwan_supplier')"
|
||||||
/>
|
/>
|
||||||
<image
|
<image
|
||||||
v-show="partnerType === 'pioneer' || partnerType === ''"
|
v-show="partnerType === 'pioneer' || partnerType === '' || partnerType === 'county_agent'"
|
||||||
:src="images.hotelImage"
|
:src="images.hotelImage"
|
||||||
class="img-item"
|
class="img-item"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
@click="goto('shop')"
|
@click="goto('shop')"
|
||||||
/>
|
/>
|
||||||
<!-- <image
|
<image
|
||||||
:src="images.wholesalerImage"
|
:src="images.wholesalerImage"
|
||||||
class="img-item"
|
class="img-item"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
@click="goto('wholesaler')"
|
@click="goto('wholesaler')"
|
||||||
/> -->
|
/>
|
||||||
<image
|
<image
|
||||||
:src="images.travelImage"
|
:src="images.travelImage"
|
||||||
class="img-item"
|
class="img-item"
|
||||||
@@ -74,6 +74,9 @@ export default {
|
|||||||
this.partnerId = options.partnerId || ''
|
this.partnerId = options.partnerId || ''
|
||||||
this.promoterUid = options.promoterUid || ''
|
this.promoterUid = options.promoterUid || ''
|
||||||
getImages().then(({data}) => this.images = data)
|
getImages().then(({data}) => this.images = data)
|
||||||
|
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({data}) => {
|
getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({data}) => {
|
||||||
this.partnerType = data.partnerType
|
this.partnerType = data.partnerType
|
||||||
this.hotelId = data.hotelId
|
this.hotelId = data.hotelId
|
||||||
|
|||||||
+130
-73
@@ -6,7 +6,7 @@
|
|||||||
labelWidth="216rpx"
|
labelWidth="216rpx"
|
||||||
>
|
>
|
||||||
<view
|
<view
|
||||||
v-if="stateTitle && isDraft !== 1"
|
v-if="stateTitle"
|
||||||
class="box-state"
|
class="box-state"
|
||||||
>
|
>
|
||||||
<u-alert
|
<u-alert
|
||||||
@@ -77,11 +77,19 @@
|
|||||||
v-if="!form.cover"
|
v-if="!form.cover"
|
||||||
class="btn-upload"
|
class="btn-upload"
|
||||||
>上传图片</view>
|
>上传图片</view>
|
||||||
<image
|
<view v-else class="img-wrap">
|
||||||
v-else
|
<image
|
||||||
:src="form.cover"
|
:src="form.cover"
|
||||||
class="img-preview"
|
class="img-preview"
|
||||||
/>
|
/>
|
||||||
|
<view
|
||||||
|
v-if="!reviewing"
|
||||||
|
class="delete-badge"
|
||||||
|
@click.stop="deleteImg('cover')"
|
||||||
|
>
|
||||||
|
x
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
@@ -102,14 +110,23 @@
|
|||||||
v-if="!form.coverVideo"
|
v-if="!form.coverVideo"
|
||||||
class="btn-upload"
|
class="btn-upload"
|
||||||
>上传视频</view>
|
>上传视频</view>
|
||||||
<video
|
<view v-else class="img-wrap">
|
||||||
v-else
|
<video
|
||||||
:src="form.coverVideo"
|
:src="form.coverVideo"
|
||||||
:poster="form.coverVideo + '?vframe/jpg/offset/1'"
|
:poster="form.coverVideo + '?vframe/jpg/offset/1'"
|
||||||
:controls="false"
|
:controls="false"
|
||||||
play-btn-position="center"
|
play-btn-position="center"
|
||||||
class="video-item"
|
class="video-item"
|
||||||
/>
|
/>
|
||||||
|
<view
|
||||||
|
v-if="!reviewing"
|
||||||
|
style="position: absolute; top: 0; right: 0;"
|
||||||
|
class="delete-badge"
|
||||||
|
@click.stop="deleteVideo"
|
||||||
|
>
|
||||||
|
x
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
@@ -143,11 +160,19 @@
|
|||||||
v-if="!form.logo"
|
v-if="!form.logo"
|
||||||
class="btn-upload"
|
class="btn-upload"
|
||||||
>上传图片</view>
|
>上传图片</view>
|
||||||
<image
|
<view v-else class="img-wrap">
|
||||||
v-else
|
<image
|
||||||
:src="form.logo"
|
:src="form.logo"
|
||||||
class="img-preview"
|
class="img-preview"
|
||||||
/>
|
/>
|
||||||
|
<view
|
||||||
|
v-if="!reviewing"
|
||||||
|
class="delete-badge"
|
||||||
|
@click.stop="deleteImg('logo')"
|
||||||
|
>
|
||||||
|
x
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
@@ -415,7 +440,7 @@
|
|||||||
:show="show"
|
:show="show"
|
||||||
mode="center"
|
mode="center"
|
||||||
round="10"
|
round="10"
|
||||||
@close="show=false"
|
@close="handlePopupClose"
|
||||||
>
|
>
|
||||||
<view class="popup-body">
|
<view class="popup-body">
|
||||||
<view class="tc bold">入驻申请须知</view>
|
<view class="tc bold">入驻申请须知</view>
|
||||||
@@ -433,7 +458,6 @@
|
|||||||
<u-button
|
<u-button
|
||||||
type="error"
|
type="error"
|
||||||
text="确定"
|
text="确定"
|
||||||
:disabled="!isAgree"
|
|
||||||
@click="handleAgree"
|
@click="handleAgree"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
@@ -450,6 +474,7 @@ import {
|
|||||||
getShopInfo,
|
getShopInfo,
|
||||||
removeApply,
|
removeApply,
|
||||||
saveShop,
|
saveShop,
|
||||||
|
saveHotelDraft,
|
||||||
getHotelInfo,
|
getHotelInfo,
|
||||||
getCountyFamousHotelType
|
getCountyFamousHotelType
|
||||||
} from '@/api/join'
|
} from '@/api/join'
|
||||||
@@ -461,7 +486,8 @@ import {
|
|||||||
chooseImage,
|
chooseImage,
|
||||||
moreImage,
|
moreImage,
|
||||||
uploadImage,
|
uploadImage,
|
||||||
chooseVideoToUpload
|
chooseVideoToUpload,
|
||||||
|
formatRichText
|
||||||
} from '@/utils'
|
} from '@/utils'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -606,45 +632,33 @@ export default {
|
|||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.partnerId = options.partnerId || ''
|
this.partnerId = options.partnerId || ''
|
||||||
this.promoterUid = options.promoterUid || ''
|
this.promoterUid = options.promoterUid || ''
|
||||||
const local_form = uni.getStorageSync('merchantApplyHotel' + '_form') || {}
|
|
||||||
this.quaPics = uni.getStorageSync('merchantApplyHotel' + '_quaPics') || []
|
|
||||||
if(!local_form.serviceTime) {
|
|
||||||
local_form.serviceTime = '00:00'
|
|
||||||
}
|
|
||||||
if(!local_form.serviceEndTime) {
|
|
||||||
local_form.serviceEndTime = '23:59'
|
|
||||||
}
|
|
||||||
this.form = !this.reviewing ? local_form : {
|
|
||||||
name: '',
|
|
||||||
cover: '',
|
|
||||||
coverVideo: '',
|
|
||||||
coverType: 1, // coverType: 1-图片,2-视频
|
|
||||||
logo: '',
|
|
||||||
qualification: '',
|
|
||||||
type: 0,
|
|
||||||
typeText: '',
|
|
||||||
isCountyFamous: 0,
|
|
||||||
countyFamousHotelType: null,
|
|
||||||
phone: '',
|
|
||||||
captcha: '',
|
|
||||||
area: '',
|
|
||||||
address: '',
|
|
||||||
position: '',
|
|
||||||
content: '',
|
|
||||||
serviceTime: '00:00',
|
|
||||||
serviceEndTime: '23:59'
|
|
||||||
}
|
|
||||||
this.init()
|
this.init()
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
uni.setStorageSync('merchantApplyHotel'+'_quaPics', this.quaPics)
|
this.saveDraft()
|
||||||
uni.setStorageSync('merchantApplyHotel' + '_form', this.form)
|
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
this.$refs.shopForm.setRules(this.rules)
|
this.$refs.shopForm.setRules(this.rules)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleAgree(){
|
handleAgree(){
|
||||||
|
if (!this.isAgree) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请先阅读并同意入驻申请须知',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.show = false
|
||||||
|
},
|
||||||
|
handlePopupClose() {
|
||||||
|
if (!this.isAgree) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请先阅读并同意入驻申请须知',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
this.show = false
|
this.show = false
|
||||||
},
|
},
|
||||||
timeRange(e) {
|
timeRange(e) {
|
||||||
@@ -693,13 +707,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
|
uni.showLoading({ title: '加载中...', mask: true })
|
||||||
getCity().then(({data}) => {
|
getCity().then(({data}) => {
|
||||||
this.district = data
|
this.district = data
|
||||||
})
|
})
|
||||||
getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({data}) => {
|
getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({data}) => {
|
||||||
this.hotelTypeList = data.hotelTypeList || []
|
this.hotelTypeList = data.hotelTypeList || []
|
||||||
this.columnsType = this.hotelTypeList
|
this.columnsType = this.hotelTypeList
|
||||||
this.notice = data.merchantApplyNotice
|
this.notice = formatRichText(data.merchantApplyNotice)
|
||||||
getCountyFamousHotelType({
|
getCountyFamousHotelType({
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 9999
|
limit: 9999
|
||||||
@@ -712,6 +727,8 @@ export default {
|
|||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.initInfo()
|
this.initInfo()
|
||||||
})
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -727,22 +744,20 @@ export default {
|
|||||||
this.show = true
|
this.show = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (data.isDraft !== 1) {
|
switch (data.reviewStatus) {
|
||||||
switch (data.reviewStatus) {
|
case 0:
|
||||||
case 0:
|
this.stateTitle = '审核中'
|
||||||
this.stateTitle = '审核中'
|
this.stateType = 'primary'
|
||||||
this.stateType = 'primary'
|
this.reviewing = true
|
||||||
this.reviewing = true
|
break
|
||||||
break
|
case 1:
|
||||||
case 1:
|
this.reviewing = false
|
||||||
this.reviewing = false
|
break
|
||||||
break
|
case 2:
|
||||||
case 2:
|
this.stateTitle = '审核驳回:' + data.reviewMsg
|
||||||
this.stateTitle = '审核驳回:' + data.reviewMsg
|
this.stateType = 'error'
|
||||||
this.stateType = 'error'
|
this.reviewing = false
|
||||||
this.reviewing = false
|
break
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (data.hotelInfo) {
|
if (data.hotelInfo) {
|
||||||
// 店铺图片
|
// 店铺图片
|
||||||
@@ -787,6 +802,8 @@ export default {
|
|||||||
this.form.position = this.$forceToDecimal(this.form.longitude, 6) + ',' + this.$forceToDecimal(this.form.latitude, 6)
|
this.form.position = this.$forceToDecimal(this.form.longitude, 6) + ',' + this.$forceToDecimal(this.form.latitude, 6)
|
||||||
this.form.area = `${this.form.provinceName} ${this.form.cityName} ${this.form.areaName}`
|
this.form.area = `${this.form.provinceName} ${this.form.cityName} ${this.form.areaName}`
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
chooseLogoImg(target) {
|
chooseLogoImg(target) {
|
||||||
@@ -795,6 +812,15 @@ export default {
|
|||||||
this.form[target] = img
|
this.form[target] = img
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 删除单张图片(店铺图片封面 / 店铺logo)
|
||||||
|
deleteImg(target) {
|
||||||
|
if (this.reviewing) return
|
||||||
|
if (target === 'cover') {
|
||||||
|
this.form.cover = ''
|
||||||
|
} else if (target === 'logo') {
|
||||||
|
this.form.logo = ''
|
||||||
|
}
|
||||||
|
},
|
||||||
chooseLogoVideo() {
|
chooseLogoVideo() {
|
||||||
if (this.reviewing) return
|
if (this.reviewing) return
|
||||||
chooseVideoToUpload(path => {
|
chooseVideoToUpload(path => {
|
||||||
@@ -802,6 +828,12 @@ export default {
|
|||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 删除视频封面
|
||||||
|
deleteVideo() {
|
||||||
|
if (this.reviewing) return
|
||||||
|
this.form.coverVideo = ''
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
chooseShopImg() {
|
chooseShopImg() {
|
||||||
if (this.reviewing) return
|
if (this.reviewing) return
|
||||||
const _this = this
|
const _this = this
|
||||||
@@ -938,17 +970,16 @@ export default {
|
|||||||
duration: 3000,
|
duration: 3000,
|
||||||
success: () => {
|
success: () => {
|
||||||
this.showRemove = false
|
this.showRemove = false
|
||||||
setTimeout(() => {
|
this.reviewing = false
|
||||||
uni.navigateBack()
|
|
||||||
}, 3000)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.initInfo()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
changeAgree(event) {
|
changeAgree(event) {
|
||||||
this.isAgree = event.detail.value.length > 0
|
this.isAgree = event.detail.value.length > 0
|
||||||
},
|
},
|
||||||
save() {
|
buildPostData() {
|
||||||
this.form.pics = ''
|
this.form.pics = ''
|
||||||
const picsLength = this.pics.length
|
const picsLength = this.pics.length
|
||||||
if (picsLength > 0) {
|
if (picsLength > 0) {
|
||||||
@@ -971,6 +1002,10 @@ export default {
|
|||||||
if (postData.coverType === 2) {
|
if (postData.coverType === 2) {
|
||||||
postData.cover = postData.coverVideo
|
postData.cover = postData.coverVideo
|
||||||
}
|
}
|
||||||
|
return postData
|
||||||
|
},
|
||||||
|
save() {
|
||||||
|
const postData = this.buildPostData()
|
||||||
saveShop(postData, this.partnerId, this.promoterUid).then(res => {
|
saveShop(postData, this.partnerId, this.promoterUid).then(res => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -991,6 +1026,11 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
saveDraft() {
|
||||||
|
if (this.reviewing) return
|
||||||
|
const postData = this.buildPostData()
|
||||||
|
saveHotelDraft(postData, this.partnerId, this.promoterUid)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1020,6 +1060,23 @@ export default {
|
|||||||
.font-color-red {
|
.font-color-red {
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
}
|
}
|
||||||
|
.img-wrap {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
.delete-badge {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 20rpx;
|
||||||
|
background: #000;
|
||||||
|
color: #fff;
|
||||||
|
padding: 2rpx 8rpx;
|
||||||
|
border-radius: 0 0 0 200rpx;
|
||||||
|
font-size: 22rpx;
|
||||||
|
z-index: 10;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
.video-item {
|
.video-item {
|
||||||
width: 80px;
|
width: 80px;
|
||||||
height: 80px;
|
height: 80px;
|
||||||
|
|||||||
+182
-120
@@ -7,7 +7,7 @@
|
|||||||
labelWidth="216rpx"
|
labelWidth="216rpx"
|
||||||
>
|
>
|
||||||
<view
|
<view
|
||||||
v-if="stateTitle && isDraft !== 1"
|
v-if="stateTitle"
|
||||||
class="box-state"
|
class="box-state"
|
||||||
>
|
>
|
||||||
<u-alert
|
<u-alert
|
||||||
@@ -59,11 +59,19 @@
|
|||||||
v-if="!formSupplier.avatar"
|
v-if="!formSupplier.avatar"
|
||||||
class="btn-upload"
|
class="btn-upload"
|
||||||
>上传图片</view>
|
>上传图片</view>
|
||||||
<image
|
<view v-else class="img-wrap">
|
||||||
v-else
|
<image
|
||||||
:src="formSupplier.avatar"
|
:src="formSupplier.avatar"
|
||||||
class="img-preview"
|
class="img-preview"
|
||||||
/>
|
/>
|
||||||
|
<view
|
||||||
|
v-if="!reviewing"
|
||||||
|
class="delete-badge"
|
||||||
|
@click.stop="deleteImg('supplier')"
|
||||||
|
>
|
||||||
|
x
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
@@ -271,11 +279,19 @@
|
|||||||
v-if="!form.cover"
|
v-if="!form.cover"
|
||||||
class="btn-upload"
|
class="btn-upload"
|
||||||
>上传图片</view>
|
>上传图片</view>
|
||||||
<image
|
<view v-else class="img-wrap">
|
||||||
v-else
|
<image
|
||||||
:src="form.cover"
|
:src="form.cover"
|
||||||
class="img-preview"
|
class="img-preview"
|
||||||
/>
|
/>
|
||||||
|
<view
|
||||||
|
v-if="!reviewing"
|
||||||
|
class="delete-badge"
|
||||||
|
@click.stop="deleteImg('cover')"
|
||||||
|
>
|
||||||
|
x
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
@@ -293,14 +309,23 @@
|
|||||||
v-if="!form.coverVideo"
|
v-if="!form.coverVideo"
|
||||||
class="btn-upload"
|
class="btn-upload"
|
||||||
>上传视频</view>
|
>上传视频</view>
|
||||||
<video
|
<view v-else class="img-wrap">
|
||||||
v-else
|
<video
|
||||||
:src="form.coverVideo"
|
:src="form.coverVideo"
|
||||||
:poster="form.coverVideo + '?vframe/jpg/offset/1'"
|
:poster="form.coverVideo + '?vframe/jpg/offset/1'"
|
||||||
:controls="false"
|
:controls="false"
|
||||||
play-btn-position="center"
|
play-btn-position="center"
|
||||||
class="video-item"
|
class="video-item"
|
||||||
/>
|
/>
|
||||||
|
<view
|
||||||
|
v-if="!reviewing"
|
||||||
|
style="position: absolute; top: 0; right: 0;"
|
||||||
|
class="delete-badge"
|
||||||
|
@click.stop="deleteVideo"
|
||||||
|
>
|
||||||
|
x
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
@@ -339,11 +364,19 @@
|
|||||||
v-if="!form.logo"
|
v-if="!form.logo"
|
||||||
class="btn-upload"
|
class="btn-upload"
|
||||||
>上传图片</view>
|
>上传图片</view>
|
||||||
<image
|
<view v-else class="img-wrap">
|
||||||
v-else
|
<image
|
||||||
:src="form.logo"
|
:src="form.logo"
|
||||||
class="img-preview"
|
class="img-preview"
|
||||||
/>
|
/>
|
||||||
|
<view
|
||||||
|
v-if="!reviewing"
|
||||||
|
class="delete-badge"
|
||||||
|
@click.stop="deleteImg('logo')"
|
||||||
|
>
|
||||||
|
x
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
@@ -513,7 +546,7 @@
|
|||||||
@cancel="changeRemove(false)"
|
@cancel="changeRemove(false)"
|
||||||
@confirm="onRemove"
|
@confirm="onRemove"
|
||||||
/>
|
/>
|
||||||
<u-popup :show="show" mode="center" round="10" @close="show=false">
|
<u-popup :show="show" mode="center" round="10" @close="handlePopupClose">
|
||||||
<view class="popup-body">
|
<view class="popup-body">
|
||||||
<view class="tc bold">入驻申请须知</view>
|
<view class="tc bold">入驻申请须知</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
@@ -530,7 +563,6 @@
|
|||||||
<u-button
|
<u-button
|
||||||
type="error"
|
type="error"
|
||||||
text="确定"
|
text="确定"
|
||||||
:disabled="!isAgree"
|
|
||||||
@click="handlAgree"
|
@click="handlAgree"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
@@ -546,14 +578,16 @@ import {
|
|||||||
getShopInfo,
|
getShopInfo,
|
||||||
removeApply,
|
removeApply,
|
||||||
saveSupplier,
|
saveSupplier,
|
||||||
saveWenwanSupplier
|
saveWenwanSupplier,
|
||||||
|
saveSupplierDraft
|
||||||
} from '@/api/join'
|
} from '@/api/join'
|
||||||
import {getCity, registerVerify} from '@/api/user'
|
import {getCity, registerVerify} from '@/api/user'
|
||||||
import {
|
import {
|
||||||
chooseImage,
|
chooseImage,
|
||||||
moreImage,
|
moreImage,
|
||||||
uploadImage,
|
uploadImage,
|
||||||
chooseVideoToUpload
|
chooseVideoToUpload,
|
||||||
|
formatRichText
|
||||||
} from '@/utils'
|
} from '@/utils'
|
||||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
|
||||||
@@ -681,7 +715,8 @@ export default {
|
|||||||
// 是否为审核中
|
// 是否为审核中
|
||||||
reviewing: false,
|
reviewing: false,
|
||||||
pageKeyId: '',
|
pageKeyId: '',
|
||||||
showUpload: false
|
showUpload: false,
|
||||||
|
pageType: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -766,49 +801,8 @@ export default {
|
|||||||
this.partnerId = options.partnerId || ''
|
this.partnerId = options.partnerId || ''
|
||||||
this.promoterUid = options.promoterUid || ''
|
this.promoterUid = options.promoterUid || ''
|
||||||
const type = options.type
|
const type = options.type
|
||||||
const local = uni.getStorageSync(type) || {}
|
this.pageType = type
|
||||||
const local_form = uni.getStorageSync(type + '_form') || {}
|
|
||||||
this.quaPics = uni.getStorageSync(type + '_quaPics') || []
|
|
||||||
console.log(this.quaPics, 'this.quaPics');
|
|
||||||
|
|
||||||
if(!local_form.serviceTime) {
|
|
||||||
local_form.serviceTime = '00:00'
|
|
||||||
}
|
|
||||||
if(!local_form.serviceEndTime) {
|
|
||||||
local_form.serviceEndTime = '23:59'
|
|
||||||
}
|
|
||||||
this.form = !this.reviewing && local_form || {
|
|
||||||
name: '',
|
|
||||||
cover: '',
|
|
||||||
coverVideo: '',
|
|
||||||
// coverType: 1-图片,2-视频
|
|
||||||
coverType: 1,
|
|
||||||
logo: '',
|
|
||||||
type: 0,
|
|
||||||
typeText: '',
|
|
||||||
phone: '',
|
|
||||||
area: '',
|
|
||||||
address: '',
|
|
||||||
position: '',
|
|
||||||
content: '',
|
|
||||||
serviceTime: '00:00',
|
|
||||||
serviceEndTime: '23:59'
|
|
||||||
}
|
|
||||||
this.formSupplier = !this.reviewing && local || {
|
|
||||||
name: '',
|
|
||||||
businessLicense: '',
|
|
||||||
avatar: '',
|
|
||||||
contact: '',
|
|
||||||
phone: '',
|
|
||||||
captcha: '',
|
|
||||||
qualification: '',
|
|
||||||
subType: '',
|
|
||||||
area: '',
|
|
||||||
address: '',
|
|
||||||
position: ''
|
|
||||||
}
|
|
||||||
this.formSupplier.subType = type
|
this.formSupplier.subType = type
|
||||||
|
|
||||||
if (type === 'goods_supplier') {
|
if (type === 'goods_supplier') {
|
||||||
this.infoTitle = '特产'
|
this.infoTitle = '特产'
|
||||||
this.pageKeyId = 'merchantApplyGoodsSupplier'
|
this.pageKeyId = 'merchantApplyGoodsSupplier'
|
||||||
@@ -822,9 +816,7 @@ export default {
|
|||||||
this.init()
|
this.init()
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
uni.setStorageSync(this.formSupplier.subType, this.formSupplier)
|
this.saveDraft()
|
||||||
uni.setStorageSync(this.formSupplier.subType+'_quaPics', this.quaPics)
|
|
||||||
uni.setStorageSync(this.formSupplier.subType + '_form', this.form)
|
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
this.$refs.shopForm.setRules(this.rules)
|
this.$refs.shopForm.setRules(this.rules)
|
||||||
@@ -832,6 +824,23 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handlAgree() {
|
handlAgree() {
|
||||||
|
if (!this.isAgree) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请先阅读并同意入驻申请须知',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.show = false
|
||||||
|
},
|
||||||
|
handlePopupClose() {
|
||||||
|
if (!this.isAgree) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请先阅读并同意入驻申请须知',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
this.show = false
|
this.show = false
|
||||||
},
|
},
|
||||||
timeRange(e) {
|
timeRange(e) {
|
||||||
@@ -880,19 +889,26 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
|
uni.showLoading({ title: '加载中...', mask: true })
|
||||||
getCity().then(({data}) => {
|
getCity().then(({data}) => {
|
||||||
this.district = data
|
this.district = data
|
||||||
})
|
})
|
||||||
getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({data}) => {
|
getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({data}) => {
|
||||||
this.columnsType = data.hotelTypeList
|
this.columnsType = data.hotelTypeList
|
||||||
this.columnsSupplierType = data.supplierTypeList
|
this.columnsSupplierType = data.supplierTypeList
|
||||||
this.notice = data.merchantApplyNotice
|
this.notice = formatRichText(data.merchantApplyNotice)
|
||||||
this.initInfo()
|
this.initInfo()
|
||||||
|
}).catch(() => {
|
||||||
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
initInfo() {
|
initInfo() {
|
||||||
// 是否缺少参数区分文玩和特产?
|
// 是否缺少参数区分文玩和特产?
|
||||||
getShopInfo().then((res) => {
|
// 2026-08-25 BUG 5882 确实需要区分参数
|
||||||
|
const params = {
|
||||||
|
subType: this.pageType
|
||||||
|
}
|
||||||
|
getShopInfo(params).then((res) => {
|
||||||
this.showUpload = true
|
this.showUpload = true
|
||||||
const {data} = res
|
const {data} = res
|
||||||
// console.log(res, 'initInfo--------');
|
// console.log(res, 'initInfo--------');
|
||||||
@@ -905,28 +921,26 @@ export default {
|
|||||||
if(data.isDraft === null || data.isDraft === 1) {
|
if(data.isDraft === null || data.isDraft === 1) {
|
||||||
this.show = true
|
this.show = true
|
||||||
}
|
}
|
||||||
if (data.isDraft !== 1) {
|
switch (data.reviewStatus) {
|
||||||
switch (data.reviewStatus) {
|
case 0:
|
||||||
case 0:
|
this.stateTitle = '审核中'
|
||||||
this.stateTitle = '审核中'
|
this.stateType = 'primary'
|
||||||
this.stateType = 'primary'
|
this.reviewing = true
|
||||||
this.reviewing = true
|
break
|
||||||
break
|
case 1:
|
||||||
case 1:
|
this.reviewing = false
|
||||||
this.reviewing = false
|
break
|
||||||
break
|
case 2:
|
||||||
case 2:
|
this.stateTitle = '审核驳回:' + data.reviewMsg
|
||||||
this.stateTitle = '审核驳回:' + data.reviewMsg
|
this.stateType = 'error'
|
||||||
this.stateType = 'error'
|
this.reviewing = false
|
||||||
this.reviewing = false
|
break
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (data.hotelInfo) {
|
if (data.hotelInfo) {
|
||||||
// 店铺图片
|
// 店铺图片
|
||||||
this.pics = []
|
this.pics = []
|
||||||
this.form = data.hotelInfo
|
this.form = data.hotelInfo
|
||||||
const picsTemp = this.form.pics.split(',')
|
const picsTemp = (this.form.pics || '').split(',')
|
||||||
if (picsTemp.length > 0) {
|
if (picsTemp.length > 0) {
|
||||||
picsTemp.map(item => {
|
picsTemp.map(item => {
|
||||||
if (item) {
|
if (item) {
|
||||||
@@ -934,39 +948,43 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
this.indexType = this.columnsType.findIndex(item => item.id === this.form.type)
|
||||||
|
this.form.typeText = this.indexType > -1 ? this.columnsType[this.indexType].name : ''
|
||||||
|
this.form.position = this.$forceToDecimal(this.form.longitude, 6) + ',' + this.$forceToDecimal(this.form.latitude, 6)
|
||||||
|
this.form.area = `${this.form.provinceName || ''} ${this.form.cityName || ''} ${this.form.areaName || ''}`
|
||||||
|
if (data.hotelInfo.coverType === 2) {
|
||||||
|
this.form.coverVideo = data.hotelInfo.cover
|
||||||
|
this.form.cover = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (data.supplierInfo) {
|
||||||
|
// 仅在已提交且申请类型明确不匹配时跳过,草稿状态下正常回显
|
||||||
|
if (data.isDraft !== 1 && data.applyType != null) {
|
||||||
|
if (this.infoTitle === "特产" && data.applyType !== 1) return
|
||||||
|
if (this.infoTitle === "文玩" && data.applyType !== 3) return
|
||||||
|
}
|
||||||
|
this.formSupplier = data.supplierInfo
|
||||||
|
// 后端草稿可能未回传 subType,用当前页面类型补齐
|
||||||
|
if (!this.formSupplier.subType) {
|
||||||
|
this.formSupplier.subType = this.pageType
|
||||||
|
}
|
||||||
// 商家资质
|
// 商家资质
|
||||||
const quaPicsTemp = this.form.qualification && this.form.qualification.split(',') || []
|
this.quaPics = []
|
||||||
|
const quaPicsTemp = (this.formSupplier.qualification || '').split(',')
|
||||||
if (quaPicsTemp.length > 0) {
|
if (quaPicsTemp.length > 0) {
|
||||||
console.log(quaPicsTemp, 'quaPicsTemp--------');
|
|
||||||
|
|
||||||
this.quaPics = []
|
|
||||||
quaPicsTemp.map(item => {
|
quaPicsTemp.map(item => {
|
||||||
if (item) {
|
if (item) {
|
||||||
this.quaPics.push({url: item})
|
this.quaPics.push({url: item})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.indexType = this.columnsType.findIndex(item => item.id === this.form.type)
|
|
||||||
this.form.typeText = this.columnsType[this.indexType].name
|
|
||||||
this.form.position = this.$forceToDecimal(this.form.longitude, 6) + ',' + this.$forceToDecimal(this.form.latitude, 6)
|
|
||||||
this.form.area = `${this.form.provinceName || ''} ${this.form.cityName || ''} ${this.form.areaName || ''}`
|
|
||||||
console.log(this.form, 'form--------');
|
|
||||||
if (data.hotelInfo.coverType === 2) {
|
|
||||||
this.form.coverVideo = data.hotelInfo.cover
|
|
||||||
this.form.cover = ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// console.log(data.supplierInfo, 'supplierInfo--------');
|
|
||||||
if (data.supplierInfo) {
|
|
||||||
if (this.infoTitle === "特产" && data.applyType !== 1) return
|
|
||||||
if (this.infoTitle === "文玩" && data.applyType !== 3) return
|
|
||||||
this.formSupplier = data.supplierInfo
|
|
||||||
this.formSupplier.typeText = this.columnsSupplierType[this.indexSupplierType].value
|
|
||||||
this.formSupplier.position = this.$forceToDecimal(this.formSupplier.longitude, 6) + ',' + this.$forceToDecimal(this.formSupplier.latitude, 6)
|
|
||||||
this.formSupplier.area = `${this.formSupplier.provinceName || ''} ${this.formSupplier.cityName || ''} ${this.formSupplier.areaName || ''}` || ''
|
|
||||||
this.indexSupplierType = this.columnsSupplierType.findIndex(item => item.key === this.formSupplier.subType)
|
this.indexSupplierType = this.columnsSupplierType.findIndex(item => item.key === this.formSupplier.subType)
|
||||||
console.log(this.formSupplier);
|
this.formSupplier.typeText = this.indexSupplierType > -1 ? this.columnsSupplierType[this.indexSupplierType].value : ''
|
||||||
|
this.formSupplier.position = this.$forceToDecimal(this.formSupplier.longitude, 6) + ',' + this.$forceToDecimal(this.formSupplier.latitude, 6)
|
||||||
|
this.formSupplier.area = `${this.formSupplier.provinceName || ''} ${this.formSupplier.cityName || ''} ${this.formSupplier.areaName || ''}`
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
chooseLogoImg(target) {
|
chooseLogoImg(target) {
|
||||||
@@ -988,6 +1006,17 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 删除单张图片(供应商头像 / 店铺封面图 / 店铺logo)
|
||||||
|
deleteImg(target) {
|
||||||
|
if (this.reviewing) return
|
||||||
|
if (target === 'supplier') {
|
||||||
|
this.formSupplier.avatar = ''
|
||||||
|
} else if (target === 'cover') {
|
||||||
|
this.form.cover = ''
|
||||||
|
} else if (target === 'logo') {
|
||||||
|
this.form.logo = ''
|
||||||
|
}
|
||||||
|
},
|
||||||
chooseLogoVideo() {
|
chooseLogoVideo() {
|
||||||
if (this.reviewing) return
|
if (this.reviewing) return
|
||||||
chooseVideoToUpload(path => {
|
chooseVideoToUpload(path => {
|
||||||
@@ -995,6 +1024,12 @@ export default {
|
|||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 删除视频封面
|
||||||
|
deleteVideo() {
|
||||||
|
if (this.reviewing) return
|
||||||
|
this.form.coverVideo = ''
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
chooseShopImg() {
|
chooseShopImg() {
|
||||||
if (this.reviewing) return
|
if (this.reviewing) return
|
||||||
const _this = this
|
const _this = this
|
||||||
@@ -1129,17 +1164,16 @@ export default {
|
|||||||
duration: 3000,
|
duration: 3000,
|
||||||
success: () => {
|
success: () => {
|
||||||
this.showRemove = false
|
this.showRemove = false
|
||||||
setTimeout(() => {
|
this.reviewing = false
|
||||||
uni.navigateBack()
|
|
||||||
}, 3000)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.initInfo()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
changeAgree(event) {
|
changeAgree(event) {
|
||||||
this.isAgree = event.detail.value.length > 0
|
this.isAgree = event.detail.value.length > 0
|
||||||
},
|
},
|
||||||
save() {
|
buildPostData() {
|
||||||
this.form.pics = ''
|
this.form.pics = ''
|
||||||
const picsLength = this.pics.length
|
const picsLength = this.pics.length
|
||||||
if (picsLength > 0) {
|
if (picsLength > 0) {
|
||||||
@@ -1162,6 +1196,10 @@ export default {
|
|||||||
if (postData.coverType === 2) {
|
if (postData.coverType === 2) {
|
||||||
postData.cover = postData.coverVideo
|
postData.cover = postData.coverVideo
|
||||||
}
|
}
|
||||||
|
return postData
|
||||||
|
},
|
||||||
|
save() {
|
||||||
|
const postData = this.buildPostData()
|
||||||
if (this.infoTitle === '特产') {
|
if (this.infoTitle === '特产') {
|
||||||
saveSupplier(postData, this.formSupplier, this.partnerId, this.promoterUid).then(res => {
|
saveSupplier(postData, this.formSupplier, this.partnerId, this.promoterUid).then(res => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
@@ -1205,6 +1243,13 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
saveDraft() {
|
||||||
|
if (this.reviewing) return
|
||||||
|
// 确保按当前入驻类型(特产/文玩)区分保存,避免共用同一份草稿
|
||||||
|
this.formSupplier.subType = this.pageType
|
||||||
|
const postData = this.buildPostData()
|
||||||
|
saveSupplierDraft(postData, this.formSupplier, this.partnerId, this.promoterUid)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1244,6 +1289,23 @@ export default {
|
|||||||
.font-color-red {
|
.font-color-red {
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
}
|
}
|
||||||
|
.img-wrap {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
.delete-badge {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 20rpx;
|
||||||
|
background: #000;
|
||||||
|
color: #fff;
|
||||||
|
padding: 2rpx 8rpx;
|
||||||
|
border-radius: 0 0 0 200rpx;
|
||||||
|
font-size: 22rpx;
|
||||||
|
z-index: 10;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
.captcha-wrap {
|
.captcha-wrap {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -344,7 +344,7 @@
|
|||||||
{{ '提交审核' }}
|
{{ '提交审核' }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-popup :show="show" mode="center" round="10" @close="show=false"
|
<u-popup :show="show" mode="center" round="10" @close="handlePopupClose"
|
||||||
>
|
>
|
||||||
<view class="popup-body">
|
<view class="popup-body">
|
||||||
<view class="tc bold">入驻申请须知</view>
|
<view class="tc bold">入驻申请须知</view>
|
||||||
@@ -362,7 +362,6 @@
|
|||||||
<u-button
|
<u-button
|
||||||
type="error"
|
type="error"
|
||||||
text="确定"
|
text="确定"
|
||||||
:disabled="!isAgree"
|
|
||||||
@click="save"
|
@click="save"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
@@ -376,7 +375,8 @@ import {getCity, registerVerify} from '@/api/user'
|
|||||||
import {
|
import {
|
||||||
chooseImage,
|
chooseImage,
|
||||||
uploadVideo,
|
uploadVideo,
|
||||||
uploadImage
|
uploadImage,
|
||||||
|
formatRichText
|
||||||
} from '@/utils'
|
} from '@/utils'
|
||||||
import {
|
import {
|
||||||
getShopData,
|
getShopData,
|
||||||
@@ -469,10 +469,13 @@ export default {
|
|||||||
onLoad(opts) {
|
onLoad(opts) {
|
||||||
this.partnerId = opts.partnerId || ''
|
this.partnerId = opts.partnerId || ''
|
||||||
this.promoterUid = opts.promoterUid || ''
|
this.promoterUid = opts.promoterUid || ''
|
||||||
|
uni.showLoading({ title: '加载中...', mask: true })
|
||||||
this.queryCity()
|
this.queryCity()
|
||||||
getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({data}) => {
|
getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({data}) => {
|
||||||
this.notice = data.merchantApplyNotice
|
this.notice = formatRichText(data.merchantApplyNotice)
|
||||||
this.initInfo()
|
this.initInfo()
|
||||||
|
}).catch(() => {
|
||||||
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// onShow() {
|
// onShow() {
|
||||||
@@ -492,6 +495,23 @@ export default {
|
|||||||
this.isAgree = e.detail.value.includes('yes')
|
this.isAgree = e.detail.value.includes('yes')
|
||||||
},
|
},
|
||||||
save() {
|
save() {
|
||||||
|
if (!this.isAgree) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请先阅读并同意入驻申请须知',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.show = false
|
||||||
|
},
|
||||||
|
handlePopupClose() {
|
||||||
|
if (!this.isAgree) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请先阅读并同意入驻申请须知',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
this.show = false
|
this.show = false
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@@ -554,6 +574,8 @@ export default {
|
|||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
// uni.$u.toast(err.msg)
|
// uni.$u.toast(err.msg)
|
||||||
|
}).finally(() => {
|
||||||
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@@ -860,6 +882,25 @@ export default {
|
|||||||
height: 52vh;
|
height: 52vh;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
margin: 30rpx 0;
|
margin: 30rpx 0;
|
||||||
|
|
||||||
|
// 小程序rich-text内块级标签无默认段间距,补充与后台富文本编辑器一致的段落格式
|
||||||
|
::v-deep 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.popup-body .agree-box {
|
.popup-body .agree-box {
|
||||||
margin: 60rpx 0;
|
margin: 60rpx 0;
|
||||||
|
|||||||
+175
-75
@@ -6,8 +6,7 @@
|
|||||||
labelWidth="216rpx"
|
labelWidth="216rpx"
|
||||||
>
|
>
|
||||||
<view
|
<view
|
||||||
v-if="stateTitle && isDraft!==1 && applyType === 4"
|
v-if="stateTitle"
|
||||||
class="box-state"
|
|
||||||
>
|
>
|
||||||
<u-alert
|
<u-alert
|
||||||
:center="stateType === 'primary'"
|
:center="stateType === 'primary'"
|
||||||
@@ -17,11 +16,11 @@
|
|||||||
</view>
|
</view>
|
||||||
<u-cell-group
|
<u-cell-group
|
||||||
:border="false"
|
:border="false"
|
||||||
:customStyle="{'fontSize':'40rpx'}"
|
:customStyle="{'fontSize':'40rpx', 'backgroundColor':'#fff'}"
|
||||||
title="采购批发商基本信息"
|
title="礼品集采中心基本信息"
|
||||||
>
|
>
|
||||||
<u-form-item prop="name">
|
<u-form-item prop="name">
|
||||||
<u-cell title="批发商名称" :border="false">
|
<u-cell title="中心名称" :border="false">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<text class="required">*</text>
|
<text class="required">*</text>
|
||||||
</template>
|
</template>
|
||||||
@@ -30,7 +29,22 @@
|
|||||||
v-model="form.name"
|
v-model="form.name"
|
||||||
:disabled="reviewing"
|
:disabled="reviewing"
|
||||||
border="none"
|
border="none"
|
||||||
placeholder="请填写批发商名称"
|
placeholder="请填写礼品集采中心名称"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</u-cell>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item prop="businessLicense">
|
||||||
|
<u-cell title="营业执照名称" :border="false">
|
||||||
|
<template #icon>
|
||||||
|
<text class="required">*</text>
|
||||||
|
</template>
|
||||||
|
<template #value>
|
||||||
|
<u-input
|
||||||
|
v-model="form.businessLicense"
|
||||||
|
:disabled="reviewing"
|
||||||
|
border="none"
|
||||||
|
placeholder="请填写营业执照名称"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
@@ -44,11 +58,19 @@
|
|||||||
v-if="!form.avatar"
|
v-if="!form.avatar"
|
||||||
class="btn-upload"
|
class="btn-upload"
|
||||||
>上传图片</view>
|
>上传图片</view>
|
||||||
<image
|
<view v-else class="img-wrap">
|
||||||
v-else
|
<image
|
||||||
:src="form.avatar"
|
:src="form.avatar"
|
||||||
class="img-preview"
|
class="img-preview"
|
||||||
/>
|
/>
|
||||||
|
<view
|
||||||
|
v-if="!reviewing"
|
||||||
|
class="delete-badge"
|
||||||
|
@click.stop="deleteImg('avatar')"
|
||||||
|
>
|
||||||
|
x
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
@@ -100,7 +122,7 @@
|
|||||||
placeholder="请填写验证码"
|
placeholder="请填写验证码"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view class="captcha-wrap-ft">
|
<view class="captcha-wrap-ft" v-if="!reviewing">
|
||||||
<u-code
|
<u-code
|
||||||
ref="uCode"
|
ref="uCode"
|
||||||
seconds="30"
|
seconds="30"
|
||||||
@@ -119,7 +141,7 @@
|
|||||||
</u-cell>
|
</u-cell>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item prop="qualification">
|
<u-form-item prop="qualification">
|
||||||
<view class="licence-section">
|
<view class="full-title">
|
||||||
<u-cell :border="false">
|
<u-cell :border="false">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<text class="required">*</text>
|
<text class="required">*</text>
|
||||||
@@ -132,22 +154,16 @@
|
|||||||
<view class="licence-image">
|
<view class="licence-image">
|
||||||
<u-cell :border="false">
|
<u-cell :border="false">
|
||||||
<template #title>
|
<template #title>
|
||||||
<view class="box-upload" @click="chooseLogoImg('licence')">
|
<u-upload
|
||||||
<view
|
:maxCount="9"
|
||||||
v-if="!form.qualification"
|
:fileList="quaPics"
|
||||||
class="btn-upload"
|
:disabled="reviewing"
|
||||||
>上传图片</view>
|
:deletable="!reviewing"
|
||||||
<view v-else>
|
name="quaPics"
|
||||||
<view v-if="qualificationArr.length > 0" class="flex">
|
multiple
|
||||||
<image
|
@afterRead="quaAfterRead"
|
||||||
v-for="(item, index) in qualificationArr"
|
@delete="quaDeletePic"
|
||||||
:key="index"
|
/>
|
||||||
:src="item"
|
|
||||||
class="img-preview"
|
|
||||||
/>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
</template>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
</view>
|
</view>
|
||||||
@@ -194,7 +210,7 @@
|
|||||||
撤销申请
|
撤销申请
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
v-else
|
v-else-if="reviewStatus !== 1"
|
||||||
class="btn-submit"
|
class="btn-submit"
|
||||||
@click="onSubmit"
|
@click="onSubmit"
|
||||||
>
|
>
|
||||||
@@ -207,7 +223,7 @@
|
|||||||
@cancel="changeRemove(false)"
|
@cancel="changeRemove(false)"
|
||||||
@confirm="onRemove"
|
@confirm="onRemove"
|
||||||
/>
|
/>
|
||||||
<u-popup :show="show" mode="center" round="10" @close="show=false">
|
<u-popup :show="show" mode="center" round="10" @close="handlePopupClose">
|
||||||
<view class="popup-body">
|
<view class="popup-body">
|
||||||
<view class="tc bold">入驻申请须知</view>
|
<view class="tc bold">入驻申请须知</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
@@ -224,7 +240,6 @@
|
|||||||
<u-button
|
<u-button
|
||||||
type="error"
|
type="error"
|
||||||
text="确定"
|
text="确定"
|
||||||
:disabled="!isAgree"
|
|
||||||
@click="save"
|
@click="save"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
@@ -234,9 +249,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CitySelect from '@/components/CitySelect'
|
import CitySelect from '@/components/CitySelect'
|
||||||
import {getShopData, getWholesaler, removeApply, saveWholesaler} from '@/api/join'
|
import {getShopData, getWholesaler, removeApply, saveWholesaler, saveWholesalerDraft} from '@/api/join'
|
||||||
import {getCity, registerVerify} from '@/api/user'
|
import {getCity, registerVerify} from '@/api/user'
|
||||||
import {chooseImage} from '@/utils'
|
import {chooseImage, uploadImage, formatRichText} from '@/utils'
|
||||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -250,6 +265,7 @@ export default {
|
|||||||
tips: '获取验证码',
|
tips: '获取验证码',
|
||||||
form: {
|
form: {
|
||||||
name: '',
|
name: '',
|
||||||
|
businessLicense: '',
|
||||||
avatar: '',
|
avatar: '',
|
||||||
contact: '',
|
contact: '',
|
||||||
phone: '',
|
phone: '',
|
||||||
@@ -310,7 +326,7 @@ export default {
|
|||||||
},
|
},
|
||||||
district: [],
|
district: [],
|
||||||
address: {},
|
address: {},
|
||||||
qualificationArr: [],
|
quaPics: [],
|
||||||
isAgree: false,
|
isAgree: false,
|
||||||
show: false,
|
show: false,
|
||||||
notice: '',
|
notice: '',
|
||||||
@@ -332,6 +348,9 @@ export default {
|
|||||||
this.promoterUid = options.promoterUid || ''
|
this.promoterUid = options.promoterUid || ''
|
||||||
this.init()
|
this.init()
|
||||||
},
|
},
|
||||||
|
onUnload() {
|
||||||
|
this.saveDraft()
|
||||||
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
this.$refs.wholesalerForm.setRules(this.rules)
|
this.$refs.wholesalerForm.setRules(this.rules)
|
||||||
},
|
},
|
||||||
@@ -374,65 +393,90 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
|
uni.showLoading({ title: '加载中...', mask: true })
|
||||||
getCity().then(({data}) => {
|
getCity().then(({data}) => {
|
||||||
this.district = data
|
this.district = data
|
||||||
})
|
})
|
||||||
getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({data}) => {
|
getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({data}) => {
|
||||||
this.notice = data.merchantApplyNotice
|
this.notice = formatRichText(data.merchantApplyNotice)
|
||||||
this.initInfo()
|
this.initInfo()
|
||||||
|
}).catch(() => {
|
||||||
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
initInfo() {
|
initInfo() {
|
||||||
getWholesaler().then(({data}) => {
|
getWholesaler().then(({data}) => {
|
||||||
this.applyType = data.applyType
|
this.applyType = data.applyType
|
||||||
if (data.applyType === 4) {
|
this.isDraft = data.isDraft
|
||||||
this.isDraft = data.isDraft
|
this.reviewStatus = data.reviewStatus
|
||||||
this.reviewStatus = data.reviewStatus
|
|
||||||
}
|
|
||||||
if(data.isDraft === null || data.isDraft === 1) {
|
if(data.isDraft === null || data.isDraft === 1) {
|
||||||
this.show = true
|
this.show = true
|
||||||
}
|
}
|
||||||
if (data.isDraft !== 1) {
|
console.log(data.reviewStatus);
|
||||||
switch (data.reviewStatus) {
|
|
||||||
case 0:
|
switch (data.reviewStatus) {
|
||||||
this.stateTitle = '审核中'
|
case 0:
|
||||||
this.stateType = 'primary'
|
this.stateTitle = '审核中'
|
||||||
this.reviewing = true
|
this.stateType = 'primary'
|
||||||
break;
|
this.reviewing = true
|
||||||
case 1:
|
break;
|
||||||
this.reviewing = false
|
case 1:
|
||||||
break;
|
this.stateTitle = '审核通过'
|
||||||
case 2:
|
this.stateType = 'success'
|
||||||
this.stateTitle = '审核驳回:' + data.reviewMsg
|
this.reviewing = false
|
||||||
this.stateType = 'error'
|
break;
|
||||||
this.reviewing = false
|
case 2:
|
||||||
break;
|
this.stateTitle = '审核驳回:' + data.reviewMsg
|
||||||
}
|
this.stateType = 'error'
|
||||||
|
this.reviewing = false
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (data.wholesalerInfo) {
|
if (data.wholesalerInfo) {
|
||||||
this.form = data.wholesalerInfo
|
this.form = data.wholesalerInfo
|
||||||
|
this.quaPics = []
|
||||||
if (this.form.qualification) {
|
if (this.form.qualification) {
|
||||||
this.qualificationArr = this.form.qualification.split(',')
|
this.form.qualification.split(',').map(item => {
|
||||||
|
if (item) {
|
||||||
|
this.quaPics.push({url: item})
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
this.form.position = this.$forceToDecimal(this.form.longitude, 6) + ',' + this.$forceToDecimal(this.form.latitude, 6)
|
this.form.position = this.$forceToDecimal(this.form.longitude, 6) + ',' + this.$forceToDecimal(this.form.latitude, 6)
|
||||||
this.form.area = `${this.form.provinceName} ${this.form.cityName} ${this.form.areaName}`
|
this.form.area = [this.form.provinceName, this.form.cityName, this.form.areaName].filter(Boolean).join(' ')
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
chooseLogoImg(target) {
|
chooseLogoImg(target) {
|
||||||
if (this.reviewing) return
|
if (this.reviewing) return
|
||||||
chooseImage(img => {
|
chooseImage(img => {
|
||||||
switch (target) {
|
if (target === 'avatar') {
|
||||||
case 'avatar':
|
this.form.avatar = img
|
||||||
this.form.avatar = img
|
|
||||||
break
|
|
||||||
case 'licence':
|
|
||||||
this.form.qualification = img
|
|
||||||
this.qualificationArr = [img]
|
|
||||||
break
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 删除头像
|
||||||
|
deleteImg(target) {
|
||||||
|
if (target === 'avatar') {
|
||||||
|
this.form.avatar = ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 删除商家资质图片
|
||||||
|
quaDeletePic(event) {
|
||||||
|
this[`${event.name}`].splice(event.index, 1)
|
||||||
|
},
|
||||||
|
// 商家资质批量上传
|
||||||
|
quaAfterRead(event) {
|
||||||
|
const that = this
|
||||||
|
if (event.file.length > 0) {
|
||||||
|
event.file.map(item => {
|
||||||
|
uploadImage(item.url, img => {
|
||||||
|
that.quaPics.push({url: img})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
// 省市区
|
// 省市区
|
||||||
result(values) {
|
result(values) {
|
||||||
this.address = {
|
this.address = {
|
||||||
@@ -449,7 +493,7 @@ export default {
|
|||||||
this.form.areaId = values.district.id
|
this.form.areaId = values.district.id
|
||||||
},
|
},
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
|
this.buildQualification()
|
||||||
this.$refs.wholesalerForm.validate().then(res => {
|
this.$refs.wholesalerForm.validate().then(res => {
|
||||||
// 校验通过
|
// 校验通过
|
||||||
saveWholesaler(this.form).then(res => {
|
saveWholesaler(this.form).then(res => {
|
||||||
@@ -485,11 +529,10 @@ export default {
|
|||||||
duration: 3000,
|
duration: 3000,
|
||||||
success: () => {
|
success: () => {
|
||||||
this.showRemove = false
|
this.showRemove = false
|
||||||
setTimeout(() => {
|
this.reviewing = false
|
||||||
uni.navigateBack()
|
|
||||||
}, 3000)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.initInfo()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -497,7 +540,37 @@ export default {
|
|||||||
this.isAgree = event.detail.value.length > 0
|
this.isAgree = event.detail.value.length > 0
|
||||||
},
|
},
|
||||||
save() {
|
save() {
|
||||||
|
if (!this.isAgree) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请先阅读并同意入驻申请须知',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
this.show = false
|
this.show = false
|
||||||
|
},
|
||||||
|
handlePopupClose() {
|
||||||
|
if (!this.isAgree) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请先阅读并同意入驻申请须知',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.show = false
|
||||||
|
},
|
||||||
|
saveDraft() {
|
||||||
|
if (this.reviewing) return
|
||||||
|
this.buildQualification()
|
||||||
|
saveWholesalerDraft(this.form)
|
||||||
|
},
|
||||||
|
buildQualification() {
|
||||||
|
this.form.qualification = ''
|
||||||
|
const tempArr = []
|
||||||
|
this.quaPics.map(item => {
|
||||||
|
item.url && tempArr.push(item.url)
|
||||||
|
})
|
||||||
|
this.form.qualification = tempArr.join(',')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -505,6 +578,18 @@ export default {
|
|||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
@import "@/assets/css/pkg_join.less";
|
@import "@/assets/css/pkg_join.less";
|
||||||
|
/deep/ .u-cell__title-text {
|
||||||
|
white-space: nowrap !important;
|
||||||
|
}
|
||||||
|
/deep/ .full-title {
|
||||||
|
.u-cell__title {
|
||||||
|
width: 100% !important;
|
||||||
|
white-space: nowrap !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
|
||||||
/deep/ .cityselect-nav {
|
/deep/ .cityselect-nav {
|
||||||
.item {
|
.item {
|
||||||
@@ -518,14 +603,26 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .licence-section{
|
|
||||||
.u-cell__title{
|
|
||||||
width: 650rpx!important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.font-color-red{
|
.font-color-red{
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
|
.img-wrap {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
.delete-badge {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 20rpx;
|
||||||
|
background: #000;
|
||||||
|
color: #fff;
|
||||||
|
padding: 2rpx 8rpx;
|
||||||
|
border-radius: 0 0 0 200rpx;
|
||||||
|
font-size: 22rpx;
|
||||||
|
z-index: 10;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
.captcha-wrap {
|
.captcha-wrap {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -533,4 +630,7 @@ export default {
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.btn-submit{
|
||||||
|
position: sticky !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
:src="countyFamousTopImage"
|
:src="countyFamousTopImage"
|
||||||
class="img"
|
class="img"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
<view v-if="list.length > 0" class="province-wrap" id="province-wrap">
|
<view v-if="list.length > 0" class="province-wrap" id="province-wrap">
|
||||||
<view
|
<view
|
||||||
@@ -39,6 +40,7 @@
|
|||||||
<image
|
<image
|
||||||
:src="item.icon"
|
:src="item.icon"
|
||||||
class="img"
|
class="img"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
<view class="name one-t">
|
<view class="name one-t">
|
||||||
{{ item.provinceName }}
|
{{ item.provinceName }}
|
||||||
@@ -61,6 +63,7 @@
|
|||||||
<image
|
<image
|
||||||
:src="webUrl + '/page/qianxian/icon-06.png'"
|
:src="webUrl + '/page/qianxian/icon-06.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -95,11 +98,13 @@
|
|||||||
<image
|
<image
|
||||||
:src="county.logo"
|
:src="county.logo"
|
||||||
class="county-img"
|
class="county-img"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
<view class="county-name">
|
<view class="county-name">
|
||||||
<image
|
<image
|
||||||
:src="webUrl + '/home/icon-location.png'"
|
:src="webUrl + '/home/icon-location.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
<view class="county-txt one-t">
|
<view class="county-txt one-t">
|
||||||
{{ county.countyName }}
|
{{ county.countyName }}
|
||||||
@@ -118,11 +123,13 @@
|
|||||||
<image
|
<image
|
||||||
:src="county.logo"
|
:src="county.logo"
|
||||||
class="county-img"
|
class="county-img"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
<view class="county-name">
|
<view class="county-name">
|
||||||
<image
|
<image
|
||||||
:src="webUrl + '/home/icon-location.png'"
|
:src="webUrl + '/home/icon-location.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
<view class="county-txt one-t">
|
<view class="county-txt one-t">
|
||||||
{{ county.countyName }}
|
{{ county.countyName }}
|
||||||
@@ -140,11 +147,13 @@
|
|||||||
<image
|
<image
|
||||||
:src="county.logo"
|
:src="county.logo"
|
||||||
class="county-img"
|
class="county-img"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
<view class="county-name">
|
<view class="county-name">
|
||||||
<image
|
<image
|
||||||
:src="webUrl + '/home/icon-location.png'"
|
:src="webUrl + '/home/icon-location.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
<view class="county-txt one-t">
|
<view class="county-txt one-t">
|
||||||
{{ county.countyName }}
|
{{ county.countyName }}
|
||||||
@@ -160,6 +169,7 @@
|
|||||||
:src="webUrl + '/home/no-data-bg.png'"
|
:src="webUrl + '/home/no-data-bg.png'"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
class="loadend"
|
class="loadend"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<image
|
<image
|
||||||
@@ -167,6 +177,7 @@
|
|||||||
:src="webUrl + '/orderIcon/nodata.png'"
|
:src="webUrl + '/orderIcon/nodata.png'"
|
||||||
class="img-nodata v12-mt-16"
|
class="img-nodata v12-mt-16"
|
||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<goo-skeleton
|
<goo-skeleton
|
||||||
|
|||||||
@@ -0,0 +1,374 @@
|
|||||||
|
<template>
|
||||||
|
<view class="graphic-guide-page">
|
||||||
|
<hx-navbar
|
||||||
|
:fixed="true"
|
||||||
|
:background-color="[0,[0,0,0,0],[0,0,0,0]]"
|
||||||
|
statusBarFontColor="#ffffff"
|
||||||
|
barPlaceholder="hidden"
|
||||||
|
transparent="auto"
|
||||||
|
color="#ffffff"
|
||||||
|
/>
|
||||||
|
<view v-if="isLoad">
|
||||||
|
<swiper
|
||||||
|
v-if="bannerImages.length"
|
||||||
|
class="banner-swiper"
|
||||||
|
circular
|
||||||
|
autoplay
|
||||||
|
:interval="5000"
|
||||||
|
>
|
||||||
|
<swiper-item
|
||||||
|
v-for="(item, index) in bannerImages"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<image
|
||||||
|
:src="item"
|
||||||
|
class="banner-image"
|
||||||
|
mode="aspectFill"
|
||||||
|
/>
|
||||||
|
</swiper-item>
|
||||||
|
</swiper>
|
||||||
|
<image
|
||||||
|
v-else-if="detail.image"
|
||||||
|
:src="detail.image"
|
||||||
|
class="banner-fallback"
|
||||||
|
mode="aspectFill"
|
||||||
|
/>
|
||||||
|
<view class="article-card">
|
||||||
|
<view class="article-title">{{ detail.title || '' }}</view>
|
||||||
|
<view v-if="detail.intro" class="article-intro">
|
||||||
|
{{ detail.intro }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
v-for="(item, index) in detailList"
|
||||||
|
:key="index"
|
||||||
|
class="detail-card"
|
||||||
|
>
|
||||||
|
<view v-if="item.placeName" class="section-title">
|
||||||
|
{{ item.placeName }}
|
||||||
|
</view>
|
||||||
|
<view v-if="item.content" class="rich-content">
|
||||||
|
<u-parse :content="item.content" />
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
v-if="item.hotelId"
|
||||||
|
class="shop-card"
|
||||||
|
@click="goShop(item)"
|
||||||
|
>
|
||||||
|
<image
|
||||||
|
:src="item.hotelLogo || detail.image"
|
||||||
|
class="shop-logo"
|
||||||
|
mode="aspectFill"
|
||||||
|
/>
|
||||||
|
<view class="shop-main">
|
||||||
|
<view class="shop-name">{{ item.hotelName || '关联店铺' }}</view>
|
||||||
|
<view v-if="getServiceTime(item)" class="shop-time-pill">
|
||||||
|
经营时间:{{ getServiceTime(item) }}
|
||||||
|
</view>
|
||||||
|
<view v-if="item.hotelAddress" class="shop-address">
|
||||||
|
{{ item.hotelAddress }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="shop-btn">点击进入</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="item.address" class="section-address">
|
||||||
|
<text>定位:{{ item.address }}</text>
|
||||||
|
</view>
|
||||||
|
<scroll-view
|
||||||
|
v-if="item.images && item.images.length"
|
||||||
|
class="image-scroll"
|
||||||
|
scroll-x
|
||||||
|
show-scrollbar="false"
|
||||||
|
>
|
||||||
|
<view class="image-list">
|
||||||
|
<image
|
||||||
|
v-for="(img, imgIndex) in item.images"
|
||||||
|
:key="imgIndex"
|
||||||
|
:src="img"
|
||||||
|
class="detail-image"
|
||||||
|
mode="aspectFill"
|
||||||
|
@click="previewImage(item.images, imgIndex)"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
<view v-if="!detailList.length" class="empty-text">暂无图文内容</view>
|
||||||
|
</view>
|
||||||
|
<goo-skeleton v-else />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getCountyFamousGraphicGuideContent } from '@/api/qianxian'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'FamousQianxianGraphicGuide',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
|
isLoad: false,
|
||||||
|
detail: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
bannerImages() {
|
||||||
|
return this.detail.bannerImages || []
|
||||||
|
},
|
||||||
|
detailList() {
|
||||||
|
return this.detail.graphicDetails || []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
const id = options.id
|
||||||
|
if (!id) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '缺少攻略ID',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.getDetailReq(id)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getDetailReq(id) {
|
||||||
|
getCountyFamousGraphicGuideContent({
|
||||||
|
guideId: id
|
||||||
|
}).then(res => {
|
||||||
|
const { success, data } = res
|
||||||
|
if (success) {
|
||||||
|
this.detail = data || {}
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: this.detail.title || '攻略详情'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.isLoad = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
formatDate(time) {
|
||||||
|
if (!time) return ''
|
||||||
|
return time.replace(/-/g, '.').slice(0, 10)
|
||||||
|
},
|
||||||
|
previewImage(images = [], index = 0) {
|
||||||
|
if (!images.length) return
|
||||||
|
uni.previewImage({
|
||||||
|
urls: images,
|
||||||
|
current: index
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getServiceTime(item) {
|
||||||
|
const start = item.serviceTime || ''
|
||||||
|
const end = item.serviceEndTime || ''
|
||||||
|
if (start && end) return `${start}-${end}`
|
||||||
|
return start || end || ''
|
||||||
|
},
|
||||||
|
goShop(item) {
|
||||||
|
if (!item || !item.hotelId) return
|
||||||
|
this.$yrouter.push({
|
||||||
|
path: '/pagesInn/inn/innHome',
|
||||||
|
query: {
|
||||||
|
id: item.hotelId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.graphic-guide-page {
|
||||||
|
min-height: 100vh;
|
||||||
|
background: #f6f6f6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner-swiper,
|
||||||
|
.banner-fallback {
|
||||||
|
width: 100%;
|
||||||
|
height: 750rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner-image {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-card {
|
||||||
|
padding: 28rpx 24rpx 32rpx;
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-title {
|
||||||
|
font-size: 40rpx;
|
||||||
|
line-height: 56rpx;
|
||||||
|
color: #333;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-meta {
|
||||||
|
margin-top: 12rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-intro {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
padding: 20rpx 0rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
font-size: 36rpx;
|
||||||
|
line-height: 44rpx;
|
||||||
|
color: #333;
|
||||||
|
// font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-card {
|
||||||
|
padding: 28rpx 24rpx;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-title {
|
||||||
|
font-size: 36rpx;
|
||||||
|
line-height: 50rpx;
|
||||||
|
color: #333;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-address {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 16rpx;
|
||||||
|
font-size: 36rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
color: #333;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.address-icon {
|
||||||
|
width: 28rpx;
|
||||||
|
height: 28rpx;
|
||||||
|
margin-right: 8rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-list {
|
||||||
|
display: inline-flex;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-scroll {
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 24rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-image {
|
||||||
|
width: 280rpx;
|
||||||
|
height: 280rpx;
|
||||||
|
margin-right: 16rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-image:last-child {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rich-content {
|
||||||
|
margin-top: 12rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
line-height: 46rpx;
|
||||||
|
color: #333;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shop-card {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 12rpx;
|
||||||
|
padding: 16rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
background: #f4f4f4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shop-logo {
|
||||||
|
width: 140rpx;
|
||||||
|
height: 140rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shop-main {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shop-head {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shop-name {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333;
|
||||||
|
font-weight: bold;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shop-time-pill {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
padding: 4rpx 16rpx;
|
||||||
|
border: 2rpx solid #c52733;
|
||||||
|
border-radius: 100rpx;
|
||||||
|
color: #c52733;
|
||||||
|
font-size: 22rpx;
|
||||||
|
width: fit-content;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shop-time-label {
|
||||||
|
margin-right: 8rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shop-address {
|
||||||
|
margin-top: 12rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
line-height: 34rpx;
|
||||||
|
color: #666;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shop-btn {
|
||||||
|
margin-left: 20rpx;
|
||||||
|
padding: 12rpx 24rpx;
|
||||||
|
border-radius: 100rpx;
|
||||||
|
background: #c52733;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 26rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-text {
|
||||||
|
padding: 120rpx 0;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -224,7 +224,7 @@
|
|||||||
@click.stop="handleInfoHotelClick(item)"
|
@click.stop="handleInfoHotelClick(item)"
|
||||||
>
|
>
|
||||||
<view class="info-shop-logo">
|
<view class="info-shop-logo">
|
||||||
<image :src="item.linkHotelLogo" mode="aspectFill" />
|
<image :src="item.linkHotelLogo" mode="aspectFill" :lazy-load="true" />
|
||||||
</view>
|
</view>
|
||||||
<view class="info-shop-main">
|
<view class="info-shop-main">
|
||||||
<view class="info-shop-name">
|
<view class="info-shop-name">
|
||||||
@@ -245,6 +245,7 @@
|
|||||||
<image
|
<image
|
||||||
:src="webUrl + '/20230803152147141807.png'"
|
:src="webUrl + '/20230803152147141807.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
<text class="seeNum-txt">{{ $formatCount(item.pv) }}</text>
|
<text class="seeNum-txt">{{ $formatCount(item.pv) }}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -253,12 +254,14 @@
|
|||||||
v-if="!item.hasZan"
|
v-if="!item.hasZan"
|
||||||
:src="webUrl + '/page/hotel/zan-off-2.png'"
|
:src="webUrl + '/page/hotel/zan-off-2.png'"
|
||||||
class="zan-off-icon"
|
class="zan-off-icon"
|
||||||
|
:lazy-load="true"
|
||||||
@click="likeInfoItemHandle(item, index, item.zan + 1, true)"
|
@click="likeInfoItemHandle(item, index, item.zan + 1, true)"
|
||||||
/>
|
/>
|
||||||
<image
|
<image
|
||||||
v-else
|
v-else
|
||||||
:src="webUrl + '/page/hotel/zan-on-2.png'"
|
:src="webUrl + '/page/hotel/zan-on-2.png'"
|
||||||
class="zan-on-icon"
|
class="zan-on-icon"
|
||||||
|
:lazy-load="true"
|
||||||
@click="likeInfoItemHandle(item, index, item.zan - 1, false)"
|
@click="likeInfoItemHandle(item, index, item.zan - 1, false)"
|
||||||
/>
|
/>
|
||||||
<text
|
<text
|
||||||
@@ -390,6 +393,7 @@
|
|||||||
<image
|
<image
|
||||||
:src="item"
|
:src="item"
|
||||||
class="img"
|
class="img"
|
||||||
|
:lazy-load="true"
|
||||||
@click="showPic(index)"
|
@click="showPic(index)"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
@@ -413,6 +417,7 @@
|
|||||||
:src="item.image"
|
:src="item.image"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
class="img"
|
class="img"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
<view class="info-wrap">
|
<view class="info-wrap">
|
||||||
<view class="time">
|
<view class="time">
|
||||||
@@ -470,6 +475,7 @@
|
|||||||
<image
|
<image
|
||||||
:src="webUrl + '/page/qianxian/icon-02.png'"
|
:src="webUrl + '/page/qianxian/icon-02.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
重点项目
|
重点项目
|
||||||
</view>
|
</view>
|
||||||
@@ -486,6 +492,7 @@
|
|||||||
<image
|
<image
|
||||||
:src="webUrl + '/page/qianxian/icon-05.png'"
|
:src="webUrl + '/page/qianxian/icon-05.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -503,6 +510,7 @@
|
|||||||
<image
|
<image
|
||||||
:src="webUrl + '/page/qianxian/icon-02.png'"
|
:src="webUrl + '/page/qianxian/icon-02.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
招商政策
|
招商政策
|
||||||
</view>
|
</view>
|
||||||
@@ -525,6 +533,7 @@
|
|||||||
<image
|
<image
|
||||||
:src="webUrl + '/page/qianxian/icon-05.png'"
|
:src="webUrl + '/page/qianxian/icon-05.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -583,7 +592,11 @@
|
|||||||
{{ tab.name }}
|
{{ tab.name }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="village-wrap v12-pt-3">
|
<scroll-view
|
||||||
|
class="village-wrap v12-pt-3"
|
||||||
|
scroll-y
|
||||||
|
@scrolltolower="getShopList()"
|
||||||
|
>
|
||||||
<view class="v12-pa-2 sale-wrap">
|
<view class="v12-pa-2 sale-wrap">
|
||||||
<view
|
<view
|
||||||
v-for="(type, typeIndex) in shopTypeList"
|
v-for="(type, typeIndex) in shopTypeList"
|
||||||
@@ -605,11 +618,13 @@
|
|||||||
<image
|
<image
|
||||||
:src="shop.cover + (shop.coverType === 2 ? '?vframe/jpg/offset/1' : '')"
|
:src="shop.cover + (shop.coverType === 2 ? '?vframe/jpg/offset/1' : '')"
|
||||||
class="img"
|
class="img"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
<view class="location">
|
<view class="location">
|
||||||
<image
|
<image
|
||||||
:src="webUrl + '/page/qianxian/icon-08.png'"
|
:src="webUrl + '/page/qianxian/icon-08.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
<view class="addr one-t">
|
<view class="addr one-t">
|
||||||
{{ shop.address }}
|
{{ shop.address }}
|
||||||
@@ -624,6 +639,7 @@
|
|||||||
<image
|
<image
|
||||||
:src="shop.logo"
|
:src="shop.logo"
|
||||||
class="logo"
|
class="logo"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
<view class="name one-t">
|
<view class="name one-t">
|
||||||
{{ shop.name }}
|
{{ shop.name }}
|
||||||
@@ -633,7 +649,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="no-data">暂无店铺</view>
|
<view v-else class="no-data">暂无店铺</view>
|
||||||
</view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="shopList.length > 0" class="load-more-status">
|
<view v-if="shopList.length > 0" class="load-more-status">
|
||||||
@@ -658,9 +674,13 @@
|
|||||||
{{ tab.name }}
|
{{ tab.name }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="village-wrap">
|
<scroll-view
|
||||||
|
class="village-wrap"
|
||||||
|
scroll-y
|
||||||
|
@scrolltolower="getJiaLouListReq()"
|
||||||
|
>
|
||||||
<view class="v12-pa-2 sale-wrap">
|
<view class="v12-pa-2 sale-wrap">
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view v-if="jiaLouList.length > 0" class="village-list">
|
<view v-if="jiaLouList.length > 0" class="village-list">
|
||||||
<view
|
<view
|
||||||
@@ -701,7 +721,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="no-data">暂无数据</view>
|
<view v-else class="no-data">暂无数据</view>
|
||||||
</view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="jiaLouList.length > 0" class="load-more-status">
|
<view v-if="jiaLouList.length > 0" class="load-more-status">
|
||||||
@@ -1820,7 +1840,13 @@ export default {
|
|||||||
this.hotelItemClick({ id: linkHotelId })
|
this.hotelItemClick({ id: linkHotelId })
|
||||||
},
|
},
|
||||||
guideItemClickHandle(item) {
|
guideItemClickHandle(item) {
|
||||||
// 如果没有开启专题页,则不进入
|
if (!item || !item.id) return
|
||||||
|
const guideType = item.guideType || 'topic'
|
||||||
|
if (guideType === 'graphic') {
|
||||||
|
uni.navigateTo({ url: `/pkg_product/views/famousQianxianGraphicGuide?id=${item.id}` })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// topic 类型保持原逻辑
|
||||||
if (!item.isContentPage) return
|
if (!item.isContentPage) return
|
||||||
uni.navigateTo({ url: `/pkg_product/views/famousQianxianTheme?id=${item.id}` })
|
uni.navigateTo({ url: `/pkg_product/views/famousQianxianTheme?id=${item.id}` })
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -309,6 +309,10 @@ export default {
|
|||||||
// console.log(searchMap);
|
// console.log(searchMap);
|
||||||
const filterMap = searchMap.filter(el => el.cityName.includes(this.keyword))
|
const filterMap = searchMap.filter(el => el.cityName.includes(this.keyword))
|
||||||
if(filterMap.length === 0) {
|
if(filterMap.length === 0) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '未找到该城市,请重新输入城市名称',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
this.asideIndex = filterMap[0].index
|
this.asideIndex = filterMap[0].index
|
||||||
|
|||||||
@@ -7,16 +7,16 @@
|
|||||||
<view class="v12-font-28 v12-font-bold">退款金额</view>
|
<view class="v12-font-28 v12-font-bold">退款金额</view>
|
||||||
<view class="return-method">退回原支付方</view>
|
<view class="return-method">退回原支付方</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-font-32 v12-primary-text v12-font-bold">¥{{refundAmount}}</view>
|
<view class="v12-font-32 v12-primary-text v12-font-bold">¥{{ displayRefundAmount }}</view>
|
||||||
</view>
|
</view>
|
||||||
<u-divider></u-divider>
|
<u-divider></u-divider>
|
||||||
<view class="order-amount">
|
<view class="order-amount">
|
||||||
<text class="v12-font-28 v12-font-bold">订单支付金额</text>
|
<text class="v12-font-28 v12-font-bold">订单支付金额</text>
|
||||||
<text class="v12-font-32 v12-font-bold">¥{{orderAmount}}</text>
|
<text class="v12-font-32 v12-font-bold">¥{{ displayOrderAmount }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="deduction-amount v12-mt-2">
|
<view class="deduction-amount v12-mt-2">
|
||||||
<text class="v12-font-24 v12-primary-text">退款违约金</text>
|
<text class="v12-font-24 v12-primary-text">退款违约金</text>
|
||||||
<text class="v12-primary-text">¥{{deductionAmount}}</text>
|
<text class="v12-primary-text">¥{{ displayDeductionAmount }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -49,19 +49,26 @@
|
|||||||
|
|
||||||
<!-- 提交按钮 -->
|
<!-- 提交按钮 -->
|
||||||
<view class="v12-mt-3">
|
<view class="v12-mt-3">
|
||||||
<button class="submit-btn v12-primary v12-white-text v12-radius-100 v12-font-32" block @click="submitRefund">点击确认退款</button>
|
<button
|
||||||
|
class="submit-btn v12-primary v12-white-text v12-radius-100 v12-font-32"
|
||||||
|
:class="{ 'submit-btn-disabled': isSubmitDisabled }"
|
||||||
|
:disabled="isSubmitDisabled"
|
||||||
|
block
|
||||||
|
@click="submitRefund"
|
||||||
|
>点击确认退款</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { sojoumOrderRefundInfo, sojoumOrderRefund } from '@/api/sojoumOrder.js'
|
import { fetchSojoumOrderDetail, sojoumOrderRefundInfo, sojoumOrderRefund } from '@/api/sojoumOrder.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
refundAmount: '',
|
refundAmount: '',
|
||||||
orderAmount: '',
|
orderAmount: '',
|
||||||
deductionAmount: '',
|
deductionAmount: '',
|
||||||
|
refundStatus: 0,
|
||||||
refundReasons: [
|
refundReasons: [
|
||||||
'行程变更',
|
'行程变更',
|
||||||
'定错时间/地址',
|
'定错时间/地址',
|
||||||
@@ -72,7 +79,22 @@ export default {
|
|||||||
],
|
],
|
||||||
selectedReason: '',
|
selectedReason: '',
|
||||||
otherReason: '',
|
otherReason: '',
|
||||||
key: ''
|
key: '',
|
||||||
|
submitting: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
displayRefundAmount() {
|
||||||
|
return this.formatMoney(this.refundAmount)
|
||||||
|
},
|
||||||
|
displayOrderAmount() {
|
||||||
|
return this.formatMoney(this.orderAmount)
|
||||||
|
},
|
||||||
|
displayDeductionAmount() {
|
||||||
|
return this.formatMoney(this.deductionAmount)
|
||||||
|
},
|
||||||
|
isSubmitDisabled() {
|
||||||
|
return this.submitting || Number(this.refundStatus) === 3
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(opts) {
|
onLoad(opts) {
|
||||||
@@ -80,21 +102,63 @@ export default {
|
|||||||
this.getRefundInfo(opts.id)
|
this.getRefundInfo(opts.id)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getRefundInfo(id) {
|
async getRefundInfo(id) {
|
||||||
sojoumOrderRefundInfo({
|
try {
|
||||||
orderId: id
|
const [refundRes, orderRes] = await Promise.all([
|
||||||
}).then(res => {
|
sojoumOrderRefundInfo({
|
||||||
if (res.status === 200) {
|
orderId: id
|
||||||
this.refundAmount = res.data.refundPrice
|
}),
|
||||||
this.orderAmount = res.data.payPrice
|
fetchSojoumOrderDetail({
|
||||||
this.deductionAmount = res.data.penalty
|
key: id
|
||||||
}
|
})
|
||||||
})
|
])
|
||||||
|
const refundData = refundRes && refundRes.status === 200 ? (refundRes.data || {}) : {}
|
||||||
|
const orderData = orderRes && orderRes.status === 200 ? (orderRes.data || {}) : {}
|
||||||
|
const orderAmount = this.pickFirstValidValue(refundData.payPrice, orderData.payPrice, 0)
|
||||||
|
const deductionAmount = this.pickFirstValidValue(refundData.penalty, orderData.penalty, 0)
|
||||||
|
this.refundAmount = this.resolveRefundAmount(refundData.refundPrice, orderAmount, deductionAmount)
|
||||||
|
this.orderAmount = orderAmount
|
||||||
|
this.deductionAmount = deductionAmount
|
||||||
|
this.refundStatus = Number(this.pickFirstValidValue(orderData.refundStatus, refundData.refundStatus, 0))
|
||||||
|
} catch (e) {
|
||||||
|
}
|
||||||
},
|
},
|
||||||
selectReason(reason) {
|
selectReason(reason) {
|
||||||
|
if (this.isSubmitDisabled) {
|
||||||
|
return
|
||||||
|
}
|
||||||
this.selectedReason = reason
|
this.selectedReason = reason
|
||||||
},
|
},
|
||||||
|
hasValidValue(value) {
|
||||||
|
return value !== '' && value !== null && value !== undefined
|
||||||
|
},
|
||||||
|
pickFirstValidValue(...values) {
|
||||||
|
for (let index = 0; index < values.length; index += 1) {
|
||||||
|
if (this.hasValidValue(values[index])) {
|
||||||
|
return values[index]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ''
|
||||||
|
},
|
||||||
|
formatMoney(value) {
|
||||||
|
return this.$force2Decimal(Number(value || 0))
|
||||||
|
},
|
||||||
|
resolveRefundAmount(refundPrice, orderAmount, deductionAmount) {
|
||||||
|
if (this.hasValidValue(refundPrice)) {
|
||||||
|
return refundPrice
|
||||||
|
}
|
||||||
|
const orderPriceNumber = Number(orderAmount || 0)
|
||||||
|
const deductionNumber = Number(deductionAmount || 0)
|
||||||
|
return Math.max(orderPriceNumber - deductionNumber, 0)
|
||||||
|
},
|
||||||
submitRefund() {
|
submitRefund() {
|
||||||
|
if (this.isSubmitDisabled) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '退款申请已被驳回',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
// TODO: 实现退款提交逻辑
|
// TODO: 实现退款提交逻辑
|
||||||
// orderId string 订单号
|
// orderId string 订单号
|
||||||
// refundReasonWap string 选择的退款原因
|
// refundReasonWap string 选择的退款原因
|
||||||
@@ -122,6 +186,7 @@ export default {
|
|||||||
title: '加载中...',
|
title: '加载中...',
|
||||||
mask: true,
|
mask: true,
|
||||||
})
|
})
|
||||||
|
this.submitting = true
|
||||||
sojoumOrderRefund(refundData).then(res => {
|
sojoumOrderRefund(refundData).then(res => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -133,6 +198,7 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
|
this.submitting = false
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -229,27 +295,22 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.submit-section {
|
.submit-btn {
|
||||||
position: fixed;
|
width: 100%;
|
||||||
bottom: 0;
|
height: 80rpx;
|
||||||
left: 0;
|
line-height: 80rpx;
|
||||||
right: 0;
|
text-align: center;
|
||||||
padding: 30rpx;
|
color: #fff;
|
||||||
background-color: #fff;
|
font-size: 28rpx;
|
||||||
box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
|
border-radius: 40rpx;
|
||||||
|
border: none;
|
||||||
|
letter-spacing: 4rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
.submit-btn {
|
.submit-btn-disabled {
|
||||||
width: 100%;
|
background-color: #c0c4cc !important;
|
||||||
height: 80rpx;
|
color: #ffffff !important;
|
||||||
line-height: 80rpx;
|
|
||||||
text-align: center;
|
|
||||||
color: #fff;
|
|
||||||
font-size: 28rpx;
|
|
||||||
border-radius: 40rpx;
|
|
||||||
border: none;
|
|
||||||
letter-spacing: 4rpx;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -333,7 +333,8 @@ export default {
|
|||||||
this.$yrouter.replace({
|
this.$yrouter.replace({
|
||||||
path: "/pages/order/MyOrder/index",
|
path: "/pages/order/MyOrder/index",
|
||||||
query: {
|
query: {
|
||||||
type: 1
|
type: 1,
|
||||||
|
tabIndex: 1
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
@@ -355,7 +356,8 @@ export default {
|
|||||||
this.$yrouter.replace({
|
this.$yrouter.replace({
|
||||||
path: "/pages/order/MyOrder/index",
|
path: "/pages/order/MyOrder/index",
|
||||||
query: {
|
query: {
|
||||||
type: 1
|
type: 1,
|
||||||
|
tabIndex: 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
break;
|
break;
|
||||||
@@ -365,7 +367,8 @@ export default {
|
|||||||
this.$yrouter.replace({
|
this.$yrouter.replace({
|
||||||
path: "/pages/order/MyOrder/index",
|
path: "/pages/order/MyOrder/index",
|
||||||
query: {
|
query: {
|
||||||
type: 1
|
type: 1,
|
||||||
|
tabIndex: 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -376,7 +379,8 @@ export default {
|
|||||||
this.$yrouter.replace({
|
this.$yrouter.replace({
|
||||||
path: "/pages/order/MyOrder/index",
|
path: "/pages/order/MyOrder/index",
|
||||||
query: {
|
query: {
|
||||||
type: 1
|
type: 1,
|
||||||
|
tabIndex: 1
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -0,0 +1,164 @@
|
|||||||
|
<template>
|
||||||
|
<u-popup
|
||||||
|
:show="show"
|
||||||
|
mode="bottom"
|
||||||
|
round="40rpx"
|
||||||
|
:customStyle="{height: '600rpx'}"
|
||||||
|
@close="close"
|
||||||
|
>
|
||||||
|
<view class="cover-picker v12-pt-4">
|
||||||
|
<swiper
|
||||||
|
:current="currentIndex"
|
||||||
|
:autoplay="false"
|
||||||
|
:circular="true"
|
||||||
|
:indicator-dots="false"
|
||||||
|
@change="onChange"
|
||||||
|
previous-margin="180rpx"
|
||||||
|
next-margin="180rpx"
|
||||||
|
class="cover-swiper"
|
||||||
|
>
|
||||||
|
<swiper-item v-for="(item, i) in list" :key="i" class="cover-swiper-item" :class="{'n-actived' : currentIndex !== i}">
|
||||||
|
<view class="cover-item" :class="{'ios-cover': isIOS}">
|
||||||
|
<view class="img-wrap">
|
||||||
|
<image :src="item.cover" class="cover-image" mode="widthFix" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</swiper-item>
|
||||||
|
</swiper>
|
||||||
|
<view class="v12-justify-center">
|
||||||
|
<view class="cover-confirm" @click="confirm">
|
||||||
|
确定
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="tips">礼包封面在对方领取时展示</view>
|
||||||
|
<view class="tips tips2">(*图片由云灵AI生成,仅供参考)</view>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
index: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
show: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
list: {
|
||||||
|
type: Array,
|
||||||
|
default: () => []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
currentIndex: this.index
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
isIOS() {
|
||||||
|
return uni.getSystemInfoSync().osName === 'ios'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
index(val) {
|
||||||
|
this.currentIndex = val
|
||||||
|
},
|
||||||
|
show(val) {
|
||||||
|
if (val) {
|
||||||
|
this.currentIndex = this.index
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
close() {
|
||||||
|
this.currentIndex = 0
|
||||||
|
this.$emit('update:show', false)
|
||||||
|
},
|
||||||
|
onChange(e) {
|
||||||
|
this.currentIndex = e.detail.current
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
|
confirm() {
|
||||||
|
this.$emit('confirm', this.list[this.currentIndex])
|
||||||
|
this.$emit('update:show', false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.n-actived{
|
||||||
|
.cover-item{
|
||||||
|
transform: scale(0.8);
|
||||||
|
margin-bottom: -70rpx !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.cover-swiper-item{
|
||||||
|
height: fit-content !important;
|
||||||
|
bottom: 0;
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
.img-wrap{
|
||||||
|
position: relative;
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
.tips{
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
.tips2{
|
||||||
|
color: #C52733;
|
||||||
|
}
|
||||||
|
.cover-swiper{
|
||||||
|
height: 800rpx;
|
||||||
|
}
|
||||||
|
.cover-picker {
|
||||||
|
.cover-title {
|
||||||
|
padding: 30rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cover-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
overflow: visible;
|
||||||
|
transition: all .3s ease-in-out;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
.cover-image {
|
||||||
|
width: 420rpx;
|
||||||
|
// height: 580rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
transition: all .2s ease-in-out;
|
||||||
|
}
|
||||||
|
.cover-name {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.cover-confirm {
|
||||||
|
margin-top: 40rpx;
|
||||||
|
width: 240rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
background-color: #C52733 !important;
|
||||||
|
color: #fff !important;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 80rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.ios-cover{
|
||||||
|
zoom: 1.01
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,25 +1,42 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="dialog-conent" v-show="isLogin">
|
<view class="dialog-conent" v-show="isLogin">
|
||||||
<view class="gift-card-modal" :class="{'ios-cover': isIOS}">
|
<view class="gift-card-modal" :class="{'ios-cover': isIOS}">
|
||||||
<image class="bg-image" :src="!card.isBlind ? card.cover : card.blindBoxImage" mode="widthFix" lazy-load="false"></image>
|
<image
|
||||||
<view v-if="card.isBlind !== 1" class="image-wrap" :style="{
|
class="bg-image"
|
||||||
top: card.productImageY*2 + 'rpx',
|
:src="!card.isBlind ? card.cover : card.blindBoxImage"
|
||||||
left: card.productImageX*2+ 'rpx'
|
mode="widthFix"
|
||||||
}">
|
lazy-load="false"
|
||||||
<image v-if="!isTravelGroup" class="pro-image" :src="card.giftProducts[0].productImage" mode="aspectFit|aspectFill|widthFix" lazy-load="false">
|
/>
|
||||||
|
<view
|
||||||
</image>
|
v-if="card.isBlind !== 1 && !card.isUseAiCoverImg"
|
||||||
<image v-if="isTravelGroup" class="pro-image" :src="card.travelGroupProduct.mainImage" mode="aspectFit|aspectFill|widthFix" lazy-load="false">
|
:style="{
|
||||||
|
top: card.productImageY*2 + 'rpx',
|
||||||
</image>
|
left: card.productImageX*2+ 'rpx'
|
||||||
|
}"
|
||||||
|
class="image-wrap"
|
||||||
|
>
|
||||||
|
<image
|
||||||
|
v-if="!isTravelGroup"
|
||||||
|
:src="card.giftProducts[0].productImage"
|
||||||
|
mode="aspectFit|aspectFill|widthFix"
|
||||||
|
lazy-load="false"
|
||||||
|
class="pro-image"
|
||||||
|
/>
|
||||||
|
<image
|
||||||
|
v-if="isTravelGroup"
|
||||||
|
:src="card.travelGroupProduct.mainImage"
|
||||||
|
mode="aspectFit|aspectFill|widthFix"
|
||||||
|
lazy-load="false"
|
||||||
|
class="pro-image"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
class="good-story"
|
v-if="card.isBlind !== 1 && card.giftProducts && card.giftProducts[0].productStory && card.isShowProductStory && !card.isUseAiCoverImg"
|
||||||
v-if="card.isBlind !== 1 && card.giftProducts && card.giftProducts[0].productStory && card.isShowProductStory"
|
|
||||||
:style="{
|
:style="{
|
||||||
right: (card.productStoryX*2 || 0) + 'rpx',
|
right: (card.productStoryX*2 || 0) + 'rpx',
|
||||||
top: (card.productStoryY*2 || 0) + 'rpx'
|
top: (card.productStoryY*2 || 0) + 'rpx'
|
||||||
}"
|
}"
|
||||||
|
class="good-story"
|
||||||
>
|
>
|
||||||
<view v-for="(line, j) in card.giftProducts[0].productStory.split('/n')" :key="j">{{ line }}</view>
|
<view v-for="(line, j) in card.giftProducts[0].productStory.split('/n')" :key="j">{{ line }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
+507
-31
@@ -1,9 +1,87 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="gift-page" v-if="(goodsInfo.productInfo && goodsInfo.productInfo.storeName) || isGroupBuy">
|
<view
|
||||||
<view class="top-card" v-if="!isPayOk ">
|
v-if="isLoad && ((goodsInfo.productInfo && goodsInfo.productInfo.storeName) || isGroupBuy)"
|
||||||
<view class="v12-justify-between" @click="handleShowCover">
|
class="gift-page"
|
||||||
|
>
|
||||||
|
<view class="top-card" v-if="!isPayOk">
|
||||||
|
<view class="top-tab-nav-wrap">
|
||||||
|
<view
|
||||||
|
:class="{'active': selectCoverType === 'default'}"
|
||||||
|
class="item item1"
|
||||||
|
@click="toggleSelectCoverType('default')"
|
||||||
|
>
|
||||||
|
<view class="txt">选择礼包封面</view>
|
||||||
|
<image :src="webUrl + '/page/gift/gift-tab01.png'" class="tab-img"></image>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
:class="{'active': selectCoverType === 'ai'}"
|
||||||
|
class="item item2"
|
||||||
|
@click="toggleSelectCoverType('ai')"
|
||||||
|
>
|
||||||
|
<view class="txt">AI生成礼包封面</view>
|
||||||
|
<image :src="webUrl + '/page/gift/gift-tab02.png'" class="tab-img"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
v-if="selectCoverType === 'default'"
|
||||||
|
class="v12-justify-between"
|
||||||
|
style="margin-top: -1px;"
|
||||||
|
@click="handleShowCover"
|
||||||
|
>
|
||||||
<image class="popCover" :src="popupCover" mode="widthFix" lazy-load="false"></image>
|
<image class="popCover" :src="popupCover" mode="widthFix" lazy-load="false"></image>
|
||||||
</view>
|
</view>
|
||||||
|
<view
|
||||||
|
v-if="selectCoverType === 'ai'"
|
||||||
|
class="ai-cover-wrap"
|
||||||
|
>
|
||||||
|
<view class="ai-cover-body">
|
||||||
|
<view class="ai-cover-container">
|
||||||
|
<view v-if="showGenerateBtn" class="prompt">
|
||||||
|
<textarea
|
||||||
|
v-model.trim="aiCoverDesc"
|
||||||
|
:maxlength="300"
|
||||||
|
placeholder="请描述你想生成的图片"
|
||||||
|
class="prompt-textarea"
|
||||||
|
/>
|
||||||
|
<p class="prompt-tips">{{ aiCoverDesc.length }}/300</p>
|
||||||
|
</view>
|
||||||
|
<view v-else class="imgs-list-wrap">
|
||||||
|
<view class="img-item" v-for="(item, index) in aiCoverImgsList" :key="index">
|
||||||
|
<image
|
||||||
|
:src="item.cover"
|
||||||
|
:class="{
|
||||||
|
'active': item.id === selectedAiCoverImage.id
|
||||||
|
}"
|
||||||
|
mode="heightFix"
|
||||||
|
class="img-image"
|
||||||
|
@click="handleSelectAiCover(item)"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="ai-cover-bottom">
|
||||||
|
<view v-if="showGenerateBtn" class="btn-wrap">
|
||||||
|
<view class="btn" @click="handleGenerateAiCover">
|
||||||
|
{{ aiCoverGenerateLoading ? '礼包封面生成中...' : 'AI生成礼包封面' }}
|
||||||
|
<image v-if="!aiCoverGenerateLoading" :src="webUrl + '/page/gift/gift-tab-icon01.png'" class="icon"></image>
|
||||||
|
</view>
|
||||||
|
<image
|
||||||
|
v-if="aiCoverGenerateLoading && settingInfo.giftCardT2ILoadingGif"
|
||||||
|
:src="settingInfo.giftCardT2ILoadingGif"
|
||||||
|
class="loading-img"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
<view v-else class="btn-wrap">
|
||||||
|
<view class="btn" @click="handleShowAiCover">
|
||||||
|
预览
|
||||||
|
</view>
|
||||||
|
<view class="btn btn2" @click="handleGenerateAgain">
|
||||||
|
重新生成
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="gift-good-card">
|
<view class="gift-good-card">
|
||||||
<view class="v12-align-center v12-justify-start">
|
<view class="v12-align-center v12-justify-start">
|
||||||
@@ -95,7 +173,7 @@
|
|||||||
<text class="v12-dark-text v12-font-30">{{ computedResult.discountPrice }}</text>
|
<text class="v12-dark-text v12-font-30">{{ computedResult.discountPrice }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-justify-between v12-align-center v12-font-28 v12-mt-1">
|
<view v-if="!isCountyLotteryGift" class="v12-justify-between v12-align-center v12-font-28 v12-mt-1">
|
||||||
<view class="v12-font-24 v12-dark-text v12-align-center">
|
<view class="v12-font-24 v12-dark-text v12-align-center">
|
||||||
<view class="">
|
<view class="">
|
||||||
优惠券:
|
优惠券:
|
||||||
@@ -130,7 +208,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</button>
|
</button>
|
||||||
<view class="btn-wrap v12-mt-12 v12-justify-center" v-if="!isPayOk">
|
<view class="btn-wrap v12-mt-12 v12-justify-center" v-if="!isPayOk">
|
||||||
<view class="gift-submit" @click="showPayPicker = true">付款并赠送</view>
|
<view class="gift-submit" @click="payNowToSendGift">付款并赠送</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn-wrap v12-mt-14 v12-justify-center" v-if="isPayOk && !isGroupBuy">
|
<view class="btn-wrap v12-mt-14 v12-justify-center" v-if="isPayOk && !isGroupBuy">
|
||||||
<view class="gift-submit" @click="makeAgain">再送一份</view>
|
<view class="gift-submit" @click="makeAgain">再送一份</view>
|
||||||
@@ -148,6 +226,12 @@
|
|||||||
:index="defaultIndex"
|
:index="defaultIndex"
|
||||||
:message="message"
|
:message="message"
|
||||||
/>
|
/>
|
||||||
|
<AiCoverPicker
|
||||||
|
:show.sync="showAiCoverPicker"
|
||||||
|
:list="aiCoverImgsList"
|
||||||
|
:index="aiDefaultIndex"
|
||||||
|
@confirm="onAiCoverConfirm"
|
||||||
|
/>
|
||||||
<passkeyborad
|
<passkeyborad
|
||||||
ref='payPwdPop'
|
ref='payPwdPop'
|
||||||
showMoney
|
showMoney
|
||||||
@@ -163,6 +247,7 @@
|
|||||||
@confirm="onPayConfirm"
|
@confirm="onPayConfirm"
|
||||||
/>
|
/>
|
||||||
<u-popup
|
<u-popup
|
||||||
|
v-if="!isCountyLotteryGift"
|
||||||
:show="showPopup"
|
:show="showPopup"
|
||||||
:round="10"
|
:round="10"
|
||||||
mode="bottom"
|
mode="bottom"
|
||||||
@@ -215,18 +300,25 @@ import {
|
|||||||
createGroupBuyGift,
|
createGroupBuyGift,
|
||||||
createSojoumGroupBuyGift,
|
createSojoumGroupBuyGift,
|
||||||
fetchSojoumGroupBuyGiftCarousel,
|
fetchSojoumGroupBuyGiftCarousel,
|
||||||
computedSojoumGroupBuyGiftOrderPrice
|
computedSojoumGroupBuyGiftOrderPrice,
|
||||||
|
aiGiftImageGenerate,
|
||||||
|
aiGiftImageStatus
|
||||||
} from '@/api/gift'
|
} from '@/api/gift'
|
||||||
|
import {
|
||||||
|
getAiSystemInfoSetting
|
||||||
|
} from '@/api/public'
|
||||||
import { weappPay } from "@/libs/wechat";
|
import { weappPay } from "@/libs/wechat";
|
||||||
import {mapGetters} from "vuex";
|
import {mapGetters} from "vuex";
|
||||||
import giftTips from './components/giftTips.vue'
|
import giftTips from './components/giftTips.vue'
|
||||||
import CoverPicker from './components/CoverPicker.vue'
|
import CoverPicker from './components/CoverPicker.vue'
|
||||||
|
import AiCoverPicker from './components/AiCoverPicker.vue'
|
||||||
import PayPicker from './components/PayPicker.vue';
|
import PayPicker from './components/PayPicker.vue';
|
||||||
import CouponsPopup from "@/components/CouponsPopup.vue"
|
import CouponsPopup from "@/components/CouponsPopup.vue"
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
giftTips,
|
giftTips,
|
||||||
CoverPicker,
|
CoverPicker,
|
||||||
|
AiCoverPicker,
|
||||||
PayPicker,
|
PayPicker,
|
||||||
passkeyborad,
|
passkeyborad,
|
||||||
CouponsPopup
|
CouponsPopup
|
||||||
@@ -234,9 +326,13 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
|
isLoad: false,
|
||||||
loading: true,
|
loading: true,
|
||||||
|
// 盲盒礼包
|
||||||
isBlind: false,
|
isBlind: false,
|
||||||
|
// 一人领取所有礼品
|
||||||
isOneRecipient: false,
|
isOneRecipient: false,
|
||||||
|
// 是否支持好友转赠
|
||||||
canTransfer: false,
|
canTransfer: false,
|
||||||
message: '',
|
message: '',
|
||||||
cartId: '',
|
cartId: '',
|
||||||
@@ -257,6 +353,7 @@ export default {
|
|||||||
isShowPayPwdPop: false,
|
isShowPayPwdPop: false,
|
||||||
payPassword: '',
|
payPassword: '',
|
||||||
payType: '',
|
payType: '',
|
||||||
|
// 是否支付成功
|
||||||
isPayOk: false,
|
isPayOk: false,
|
||||||
giftKey: '',
|
giftKey: '',
|
||||||
payPrice: 0,
|
payPrice: 0,
|
||||||
@@ -270,17 +367,57 @@ export default {
|
|||||||
},
|
},
|
||||||
couponTitle: '',
|
couponTitle: '',
|
||||||
showPopup: false,
|
showPopup: false,
|
||||||
|
// 盲盒礼包图片
|
||||||
blindImage: '',
|
blindImage: '',
|
||||||
|
// 是否为旅居团购礼品
|
||||||
isGroupBuy: false,
|
isGroupBuy: false,
|
||||||
popupCover: '',
|
popupCover: '',
|
||||||
showInput: true,
|
showInput: true,
|
||||||
|
// 是否为县区抽奖礼品
|
||||||
isCountyLotteryGift: false,
|
isCountyLotteryGift: false,
|
||||||
|
// 县域抽奖弹窗
|
||||||
showLotteryGiftPopup: false,
|
showLotteryGiftPopup: false,
|
||||||
isEligibleForDraw: false
|
isEligibleForDraw: false,
|
||||||
|
// 封面切换: default/ai
|
||||||
|
selectCoverType: 'default',
|
||||||
|
aiCoverImgsList: [
|
||||||
|
/*
|
||||||
|
{
|
||||||
|
id: 15,
|
||||||
|
cover: 'https://resource.xdd618.com/1/20251202/1764661118796_中秋 2礼品卡1202.png',
|
||||||
|
image: 'https://resource.xdd618.com/1/20251202/1764661118797_中秋2 对话框封面.png'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 23,
|
||||||
|
cover: 'https://resource.xdd618.com/1/20251202/1764661193306_中秋 3礼品卡1202.png',
|
||||||
|
image: 'https://resource.xdd618.com/1/20251202/1764661193306_中秋3 对话框封面.png'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 41,
|
||||||
|
cover: 'https://resource.xdd618.com/1/20251202/1764661506015_特色好礼礼品卡1202.png',
|
||||||
|
image: 'https://resource.xdd618.com/1/20250902/1756781423380_特色好礼对话框封面定稿.png'
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
],
|
||||||
|
showGenerateBtn: true,
|
||||||
|
aiCoverGenerateLoading: false,
|
||||||
|
settingInfo: {},
|
||||||
|
aiCoverDesc: '',
|
||||||
|
selectedAiCoverImage: {},
|
||||||
|
showAiCoverPicker: false,
|
||||||
|
pollInterval: null,
|
||||||
|
aiDefaultIndex: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
async couponId(value) {
|
async couponId(value) {
|
||||||
|
if (this.isCountyLotteryGift) {
|
||||||
|
this.couponTitle = ''
|
||||||
|
if (Number(value || 0) !== 0) {
|
||||||
|
this.couponId = 0
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
this.couponIndex = this.couponList['usable']?.findIndex(item => item.id === +value)
|
this.couponIndex = this.couponList['usable']?.findIndex(item => item.id === +value)
|
||||||
this.couponTitle = this.couponList['usable']?.[this.couponIndex]?.couponTitle
|
this.couponTitle = this.couponList['usable']?.[this.couponIndex]?.couponTitle
|
||||||
if(this.isGroupBuy) {
|
if(this.isGroupBuy) {
|
||||||
@@ -291,11 +428,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(opts) {
|
onLoad(opts) {
|
||||||
this.cartId = opts.cartId
|
const pageQuery = Object.assign({}, this.resolvePageQuery(), opts || {})
|
||||||
this.isGroupBuy = opts.isGroupBuy === '1'
|
this.cartId = pageQuery.cartId
|
||||||
this.isCountyLotteryGift = opts.from === 'countyLottery' || opts.isCountyLotteryGift === '1' || !!opts.drawActivityId
|
this.isGroupBuy = pageQuery.isGroupBuy === '1'
|
||||||
|
this.isCountyLotteryGift = pageQuery.from === 'countyLottery' || pageQuery.isCountyLotteryGift === '1' || !!pageQuery.drawActivityId
|
||||||
// this.couponId = opts.couponId || 0
|
// this.couponId = opts.couponId || 0
|
||||||
this.discount = opts.discount
|
this.discount = pageQuery.discount
|
||||||
if(this.isGroupBuy) {
|
if(this.isGroupBuy) {
|
||||||
this.getGroupBuyInfo()
|
this.getGroupBuyInfo()
|
||||||
} else {
|
} else {
|
||||||
@@ -304,6 +442,16 @@ export default {
|
|||||||
fetchSojoumGroupBuyGiftCarousel().then(res => {
|
fetchSojoumGroupBuyGiftCarousel().then(res => {
|
||||||
this.popupCover = res.data[0]
|
this.popupCover = res.data[0]
|
||||||
})
|
})
|
||||||
|
getAiSystemInfoSetting().then(res => {
|
||||||
|
const { success, data } = res
|
||||||
|
if (success) {
|
||||||
|
this.settingInfo = data
|
||||||
|
this.aiCoverDesc = data.giftCardT2IPromptTemplate || ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onUnload() {
|
||||||
|
this.clearIntervalPoll()
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(["userInfo"]),
|
...mapGetters(["userInfo"]),
|
||||||
@@ -324,6 +472,128 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 將面切换
|
||||||
|
toggleSelectCoverType(type) {
|
||||||
|
if (this.selectCoverType === type) return
|
||||||
|
this.selectCoverType = type
|
||||||
|
},
|
||||||
|
handleGenerateAiCover() {
|
||||||
|
if (!this.aiCoverDesc || !this.aiCoverDesc.trim()) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请先配置文生图提示词',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.aiCoverGenerateLoading) return
|
||||||
|
if (this.pollInterval) return
|
||||||
|
// 点击生成后,禁用按钮,防止重复点击
|
||||||
|
this.aiCoverGenerateLoading = true
|
||||||
|
aiGiftImageGenerate({
|
||||||
|
prompt: this.aiCoverDesc,
|
||||||
|
productId: this.goodsInfo.productId
|
||||||
|
}).then(res => {
|
||||||
|
const { success, data } = res
|
||||||
|
if (success) {
|
||||||
|
this.aiDefaultIndex = 0
|
||||||
|
this.selectedAiCoverImage = {}
|
||||||
|
this.aiCoverImgsList = []
|
||||||
|
// 轮询查询状态
|
||||||
|
this.pollAiImageGenerateStatus()
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.aiCoverGenerateLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
pollAiImageGenerateStatus() {
|
||||||
|
const _this = this
|
||||||
|
this.pollInterval = setInterval(() => {
|
||||||
|
aiGiftImageStatus({
|
||||||
|
productId: _this.goodsInfo.productId
|
||||||
|
}).then(res => {
|
||||||
|
const { success, data } = res
|
||||||
|
if (success && data) {
|
||||||
|
// status: 0=生成中 / 1=成功 / 2=失败(无任何记录时为 null)
|
||||||
|
if (data.status === 1 || data.status === 2) {
|
||||||
|
_this.clearIntervalPoll()
|
||||||
|
}
|
||||||
|
if (data.status === 1 && data.groups && data.groups.length) {
|
||||||
|
_this.selectedAiCoverImage = data.groups[0]
|
||||||
|
_this.aiCoverImgsList = []
|
||||||
|
data.groups.map(item => {
|
||||||
|
_this.aiCoverImgsList.push({
|
||||||
|
id: item.id,
|
||||||
|
cover: item.coverUrl,
|
||||||
|
image: item.shareUrl,
|
||||||
|
name: item.name || ''
|
||||||
|
})
|
||||||
|
})
|
||||||
|
_this.selectedAiCoverImage = _this.aiCoverImgsList[0]
|
||||||
|
// 封面图片
|
||||||
|
_this.selectedCover = _this.selectedAiCoverImage.cover
|
||||||
|
// 分享对话图片
|
||||||
|
_this.giftImage = _this.selectedAiCoverImage.image
|
||||||
|
console.log(_this.selectedCover)
|
||||||
|
console.log(_this.giftImage)
|
||||||
|
_this.showGenerateBtn = false
|
||||||
|
_this.aiCoverGenerateLoading = false
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
_this.aiCoverGenerateLoading = false
|
||||||
|
_this.showGenerateBtn = true
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
_this.aiCoverGenerateLoading = false
|
||||||
|
_this.showGenerateBtn = true
|
||||||
|
})
|
||||||
|
}, 2000)
|
||||||
|
},
|
||||||
|
clearIntervalPoll() {
|
||||||
|
if (this.pollInterval) {
|
||||||
|
clearInterval(this.pollInterval)
|
||||||
|
this.pollInterval = null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleGenerateAgain() {
|
||||||
|
this.aiDefaultIndex = 0
|
||||||
|
this.selectedAiCoverImage = {}
|
||||||
|
this.aiCoverImgsList = []
|
||||||
|
this.showGenerateBtn = true
|
||||||
|
this.aiCoverGenerateLoading = false
|
||||||
|
},
|
||||||
|
resolvePageQuery() {
|
||||||
|
if (this.$yroute && this.$yroute.query) {
|
||||||
|
return this.$yroute.query
|
||||||
|
}
|
||||||
|
if (this.$route && this.$route.query) {
|
||||||
|
return this.$route.query
|
||||||
|
}
|
||||||
|
if (this._route && this._route.query) {
|
||||||
|
return this._route.query
|
||||||
|
}
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
getCouponId() {
|
||||||
|
if (this.isCountyLotteryGift) return 0
|
||||||
|
return this.couponId || 0
|
||||||
|
},
|
||||||
|
isCountyLotteryCartItem(item) {
|
||||||
|
return Number(
|
||||||
|
(item && item.drawActivityId) ||
|
||||||
|
(item && item.productInfo && item.productInfo.drawActivityId) ||
|
||||||
|
0
|
||||||
|
) > 0
|
||||||
|
},
|
||||||
|
syncCountyLotteryGiftFlag(item) {
|
||||||
|
if (!this.isCountyLotteryGift && this.isCountyLotteryCartItem(item)) {
|
||||||
|
this.isCountyLotteryGift = true
|
||||||
|
}
|
||||||
|
if (!this.isCountyLotteryGift) return
|
||||||
|
this.couponTitle = ''
|
||||||
|
if (Number(this.couponId || 0) !== 0) {
|
||||||
|
this.couponId = 0
|
||||||
|
}
|
||||||
|
},
|
||||||
adjustCoverListForProductStory(coverList, productInfo, defaultTemplate) {
|
adjustCoverListForProductStory(coverList, productInfo, defaultTemplate) {
|
||||||
if (!productInfo || !productInfo.productStory) {
|
if (!productInfo || !productInfo.productStory) {
|
||||||
return {
|
return {
|
||||||
@@ -356,14 +626,19 @@ export default {
|
|||||||
computedTravelGroupPrice(useDefaultCouponId) {
|
computedTravelGroupPrice(useDefaultCouponId) {
|
||||||
const params = {
|
const params = {
|
||||||
key: this.orderKey,
|
key: this.orderKey,
|
||||||
couponId: this.couponId
|
couponId: this.getCouponId()
|
||||||
}
|
}
|
||||||
computedSojoumGroupBuyGiftOrderPrice(params).then(res => {
|
computedSojoumGroupBuyGiftOrderPrice(params).then(res => {
|
||||||
this.computedResult = res.data.result
|
this.computedResult = res.data.result
|
||||||
this.couponList = res.data.result.couponList
|
this.couponList = res.data.result.couponList
|
||||||
this.payPrice = res.data.result.payPrice
|
this.payPrice = res.data.result.payPrice
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
if(useDefaultCouponId) {
|
if (this.isCountyLotteryGift) {
|
||||||
|
this.couponTitle = ''
|
||||||
|
if (this.couponId !== 0) {
|
||||||
|
this.couponId = 0
|
||||||
|
}
|
||||||
|
} else if(useDefaultCouponId) {
|
||||||
this.couponId = res.data.result.defaultCouponId || 0
|
this.couponId = res.data.result.defaultCouponId || 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -371,7 +646,11 @@ export default {
|
|||||||
handleShowCover() {
|
handleShowCover() {
|
||||||
this.showCoverPicker = true
|
this.showCoverPicker = true
|
||||||
},
|
},
|
||||||
|
handleShowAiCover() {
|
||||||
|
this.showAiCoverPicker = true
|
||||||
|
},
|
||||||
showCouponsPopup() {
|
showCouponsPopup() {
|
||||||
|
if (this.isCountyLotteryGift) return
|
||||||
if (this.couponList.usable && this.couponList.usable.length === 0) return
|
if (this.couponList.usable && this.couponList.usable.length === 0) return
|
||||||
if(this.isPayOk) return
|
if(this.isPayOk) return
|
||||||
this.showPopup = !this.showPopup
|
this.showPopup = !this.showPopup
|
||||||
@@ -380,6 +659,7 @@ export default {
|
|||||||
this.showPopup = !this.showPopup
|
this.showPopup = !this.showPopup
|
||||||
},
|
},
|
||||||
changeCoupons(item) {
|
changeCoupons(item) {
|
||||||
|
if (this.isCountyLotteryGift) return
|
||||||
if(!item) return
|
if(!item) return
|
||||||
if (this.couponList.usable && this.couponList.usable.length === 0) return
|
if (this.couponList.usable && this.couponList.usable.length === 0) return
|
||||||
this.showPopup = !this.showPopup
|
this.showPopup = !this.showPopup
|
||||||
@@ -417,11 +697,17 @@ export default {
|
|||||||
this.giftNotice = res.data.giftCardGiftNotice
|
this.giftNotice = res.data.giftCardGiftNotice
|
||||||
this.orderKey = res.data.orderKey
|
this.orderKey = res.data.orderKey
|
||||||
this.goodsInfo = goodsInfo
|
this.goodsInfo = goodsInfo
|
||||||
|
this.syncCountyLotteryGiftFlag(goodsInfo)
|
||||||
this.templateId = template.id
|
this.templateId = template.id
|
||||||
this.defaultIndex = this.coverList.findIndex(item => item.id === this.templateId)
|
this.defaultIndex = this.coverList.findIndex(item => item.id === this.templateId)
|
||||||
console.log(this.defaultIndex, 'defaultIndex');
|
console.log(this.defaultIndex, 'defaultIndex');
|
||||||
this.selectedCover = template.cover
|
this.selectedCover = template.cover
|
||||||
this.giftImage = template.image
|
this.giftImage = template.image
|
||||||
|
if (this.selectCoverType === 'ai') {
|
||||||
|
this.selectedCover = this.selectedAiCoverImage.cover
|
||||||
|
this.giftImage = this.selectedAiCoverImage.image
|
||||||
|
this.templateId = this.selectedAiCoverImage.id
|
||||||
|
}
|
||||||
this.couponId = ''
|
this.couponId = ''
|
||||||
this.computedPrice(this.goodsInfo.cartNum)
|
this.computedPrice(this.goodsInfo.cartNum)
|
||||||
})
|
})
|
||||||
@@ -448,7 +734,7 @@ export default {
|
|||||||
computedPrice(num, f) {
|
computedPrice(num, f) {
|
||||||
const params = {
|
const params = {
|
||||||
cartId: this.cartId,
|
cartId: this.cartId,
|
||||||
couponId: this.couponId,
|
couponId: this.getCouponId(),
|
||||||
cartNum : num
|
cartNum : num
|
||||||
}
|
}
|
||||||
if(this.discount) {
|
if(this.discount) {
|
||||||
@@ -456,7 +742,12 @@ export default {
|
|||||||
}
|
}
|
||||||
getGiftCardSendOrderAmount(this.orderKey, params).then(res => {
|
getGiftCardSendOrderAmount(this.orderKey, params).then(res => {
|
||||||
this.couponList = res.data.result.couponList
|
this.couponList = res.data.result.couponList
|
||||||
if(!f) {
|
if (this.isCountyLotteryGift) {
|
||||||
|
this.couponTitle = ''
|
||||||
|
if (this.couponId !== 0) {
|
||||||
|
this.couponId = 0
|
||||||
|
}
|
||||||
|
} else if(!f) {
|
||||||
this.couponId = res.data.result.defaultCouponId || 0
|
this.couponId = res.data.result.defaultCouponId || 0
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
}
|
}
|
||||||
@@ -465,6 +756,24 @@ export default {
|
|||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
payNowToSendGift() {
|
||||||
|
if (this.selectCoverType === 'default') {
|
||||||
|
this.showPayPicker = true
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.selectCoverType === 'ai') {
|
||||||
|
if (!this.selectedAiCoverImage.id) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请生成礼包封面再操作',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
this.showPayPicker = true
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
},
|
||||||
pwdPopFinish(payPwd) {
|
pwdPopFinish(payPwd) {
|
||||||
this.payPassword = payPwd;
|
this.payPassword = payPwd;
|
||||||
this.confirmGift(true);
|
this.confirmGift(true);
|
||||||
@@ -476,8 +785,27 @@ export default {
|
|||||||
onCoverConfirm(cover) {
|
onCoverConfirm(cover) {
|
||||||
this.cover = cover.name
|
this.cover = cover.name
|
||||||
this.templateId = cover.id
|
this.templateId = cover.id
|
||||||
|
// 封面图片
|
||||||
|
this.selectedCover = cover.cover
|
||||||
|
// 分享对话图片
|
||||||
|
this.giftImage = cover.image
|
||||||
|
},
|
||||||
|
onAiCoverConfirm(cover) {
|
||||||
|
// 封面图片
|
||||||
|
this.selectedCover = cover.cover
|
||||||
|
// 分享对话图片
|
||||||
|
this.giftImage = cover.image
|
||||||
|
if (this.selectCoverType === 'ai') {
|
||||||
|
this.selectedAiCoverImage = cover
|
||||||
|
this.aiDefaultIndex = this.aiCoverImgsList.findIndex(item => item.id === cover.id)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSelectAiCover(cover) {
|
||||||
|
this.selectedAiCoverImage = cover
|
||||||
|
this.aiDefaultIndex = this.aiCoverImgsList.findIndex(item => item.id === cover.id)
|
||||||
this.selectedCover = cover.cover
|
this.selectedCover = cover.cover
|
||||||
this.giftImage = cover.image
|
this.giftImage = cover.image
|
||||||
|
this.templateId = cover.id
|
||||||
},
|
},
|
||||||
showTips() {
|
showTips() {
|
||||||
this.$refs.giftTips.showTips = true
|
this.$refs.giftTips.showTips = true
|
||||||
@@ -498,6 +826,7 @@ export default {
|
|||||||
this.giftNotice = res.data.giftCardGiftNotice
|
this.giftNotice = res.data.giftCardGiftNotice
|
||||||
this.orderKey = res.data.orderKey
|
this.orderKey = res.data.orderKey
|
||||||
this.goodsInfo = goodsInfo
|
this.goodsInfo = goodsInfo
|
||||||
|
this.syncCountyLotteryGiftFlag(goodsInfo)
|
||||||
this.templateId = template.id
|
this.templateId = template.id
|
||||||
this.selectedCover = template.cover
|
this.selectedCover = template.cover
|
||||||
this.giftImage = template.image
|
this.giftImage = template.image
|
||||||
@@ -507,6 +836,7 @@ export default {
|
|||||||
// this.couponId = res.data.couponList.usable[0] && res.data.couponList.usable[0].id || ''
|
// this.couponId = res.data.couponList.usable[0] && res.data.couponList.usable[0].id || ''
|
||||||
// }
|
// }
|
||||||
this.computedPrice(this.goodsInfo.cartNum)
|
this.computedPrice(this.goodsInfo.cartNum)
|
||||||
|
this.isLoad = true
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
@@ -514,9 +844,13 @@ export default {
|
|||||||
isDrawEligible(flag) {
|
isDrawEligible(flag) {
|
||||||
return flag === true || flag === 1 || flag === '1' || flag === 'true'
|
return flag === true || flag === 1 || flag === '1' || flag === 'true'
|
||||||
},
|
},
|
||||||
handleGiftPaySuccess(isEligibleForDraw = false) {
|
handleGiftPaySuccess(data) {
|
||||||
|
if (data.giftCard) {
|
||||||
|
this.selectedCover = data.giftCard.cover || this.selectedCover
|
||||||
|
this.giftImage = data.giftCard.giftCardImage || this.giftImage
|
||||||
|
}
|
||||||
this.isPayOk = true
|
this.isPayOk = true
|
||||||
this.isEligibleForDraw = this.isDrawEligible(isEligibleForDraw)
|
this.isEligibleForDraw = this.isDrawEligible(data.isEligibleForDraw)
|
||||||
if (this.isCountyLotteryGift && this.isEligibleForDraw) {
|
if (this.isCountyLotteryGift && this.isEligibleForDraw) {
|
||||||
this.showLotteryGiftPopup = true
|
this.showLotteryGiftPopup = true
|
||||||
}
|
}
|
||||||
@@ -560,19 +894,22 @@ export default {
|
|||||||
key: this.orderKey,
|
key: this.orderKey,
|
||||||
from: 'routine',
|
from: 'routine',
|
||||||
cartId: this.cartId,
|
cartId: this.cartId,
|
||||||
templateId: this.templateId,
|
templateId: this.selectCoverType === 'default' ? this.templateId : '',
|
||||||
|
aiGiftImageId: this.selectCoverType === 'default' ? '' : this.selectedAiCoverImage.id,
|
||||||
|
cover: this.selectedCover,
|
||||||
message : this.message || '礼笺轻启,礼藏心意',
|
message : this.message || '礼笺轻启,礼藏心意',
|
||||||
canTransfer: this.canTransfer ? 1 : 0,
|
canTransfer: this.canTransfer ? 1 : 0,
|
||||||
passwordPay: this.payPassword || '',
|
passwordPay: this.payPassword || '',
|
||||||
couponId: this.couponId,
|
couponId: this.getCouponId(),
|
||||||
payType: this.payType,
|
payType: this.payType,
|
||||||
} : {
|
} : {
|
||||||
orderKey: this.orderKey,
|
orderKey: this.orderKey,
|
||||||
from: 'routine',
|
from: 'routine',
|
||||||
cartId: this.cartId,
|
cartId: this.cartId,
|
||||||
couponId: this.couponId,
|
couponId: this.getCouponId(),
|
||||||
recipientsNum: this.goodsInfo.cartNum,
|
recipientsNum: this.goodsInfo.cartNum,
|
||||||
templateId: this.templateId,
|
templateId: this.selectCoverType === 'default' ? this.templateId : '',
|
||||||
|
aiGiftImageId: this.selectCoverType === 'default' ? '' : this.selectedAiCoverImage.id,
|
||||||
message : this.message || '礼笺轻启,礼藏心意',
|
message : this.message || '礼笺轻启,礼藏心意',
|
||||||
cover: this.selectedCover,
|
cover: this.selectedCover,
|
||||||
canTransfer: this.canTransfer ? 1 : 0,
|
canTransfer: this.canTransfer ? 1 : 0,
|
||||||
@@ -620,7 +957,7 @@ export default {
|
|||||||
icon: "none",
|
icon: "none",
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
this.handleGiftPaySuccess(data.isEligibleForDraw);
|
this.handleGiftPaySuccess(data);
|
||||||
break;
|
break;
|
||||||
case "WECHAT_H5_PAY":
|
case "WECHAT_H5_PAY":
|
||||||
// H5支付
|
// H5支付
|
||||||
@@ -637,7 +974,7 @@ export default {
|
|||||||
icon: "none",
|
icon: "none",
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
this.handleGiftPaySuccess(data.isEligibleForDraw);
|
this.handleGiftPaySuccess(data);
|
||||||
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
// this.makeAgain()
|
// this.makeAgain()
|
||||||
@@ -658,7 +995,7 @@ export default {
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}) .catch(err => {
|
}).catch(err => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -666,6 +1003,14 @@ export default {
|
|||||||
icon: "none",
|
icon: "none",
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
|
// Fix bug#6073-订单超时后需自动刷新该页面
|
||||||
|
if (err.res.statusCode === 5113) {
|
||||||
|
if(this.isGroupBuy) {
|
||||||
|
this.getGroupBuyInfo()
|
||||||
|
} else {
|
||||||
|
this.getGift()
|
||||||
|
}
|
||||||
|
}
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.isShowPayPwdPop = false;
|
this.isShowPayPwdPop = false;
|
||||||
this.$refs.payPwdPop.clear();//清空支付密码
|
this.$refs.payPwdPop.clear();//清空支付密码
|
||||||
@@ -676,6 +1021,7 @@ export default {
|
|||||||
const params = {
|
const params = {
|
||||||
travelGroupProductId: this.cartId
|
travelGroupProductId: this.cartId
|
||||||
}
|
}
|
||||||
|
this.isLoad = false
|
||||||
createGroupBuyGift(params).then(res => {
|
createGroupBuyGift(params).then(res => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
this.coverList = res.data.giftCardTemplates || []
|
this.coverList = res.data.giftCardTemplates || []
|
||||||
@@ -691,6 +1037,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.giftNotice = res.data.giftCardGiftNotice
|
this.giftNotice = res.data.giftCardGiftNotice
|
||||||
this.computedTravelGroupPrice(true)
|
this.computedTravelGroupPrice(true)
|
||||||
|
this.isLoad = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -758,11 +1105,7 @@ export default {
|
|||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
}
|
}
|
||||||
.tip-wrap{
|
.tip-wrap{
|
||||||
position: absolute;
|
margin: 32rpx auto 68rpx auto;
|
||||||
bottom: 50rpx;
|
|
||||||
left: 0;
|
|
||||||
margin: auto;
|
|
||||||
right: 0;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.tip-text{
|
.tip-text{
|
||||||
@@ -788,7 +1131,6 @@ export default {
|
|||||||
}
|
}
|
||||||
.top-card{
|
.top-card{
|
||||||
// height: 280rpx;
|
// height: 280rpx;
|
||||||
background: #fff;
|
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
}
|
}
|
||||||
.line{
|
.line{
|
||||||
@@ -841,7 +1183,6 @@ export default {
|
|||||||
}
|
}
|
||||||
.popCover{
|
.popCover{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-radius: 16rpx;
|
|
||||||
}
|
}
|
||||||
.lottery-gift-popup{
|
.lottery-gift-popup{
|
||||||
background: #fff;
|
background: #fff;
|
||||||
@@ -917,4 +1258,139 @@ export default {
|
|||||||
.lottery-gift-btn.send::after{
|
.lottery-gift-btn.send::after{
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
.top-tab-nav-wrap {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
.item1 {
|
||||||
|
.txt {
|
||||||
|
left: -24rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.item2 {
|
||||||
|
.txt {
|
||||||
|
padding-left: 32rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.item {
|
||||||
|
position: relative;
|
||||||
|
flex: 1;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333;
|
||||||
|
line-height: 80rpx;
|
||||||
|
&.active {
|
||||||
|
color: #fff;
|
||||||
|
.tab-img {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.txt {
|
||||||
|
position: relative;
|
||||||
|
z-index: 5;
|
||||||
|
}
|
||||||
|
.tab-img {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 80rpx;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.ai-cover-wrap {
|
||||||
|
padding: 20rpx;
|
||||||
|
margin-top: -1px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 40rpx 0 40rpx 40rpx;
|
||||||
|
background-color: #C52932;
|
||||||
|
.ai-cover-body {
|
||||||
|
padding: 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
.ai-cover-container {
|
||||||
|
.prompt {
|
||||||
|
.prompt-textarea {
|
||||||
|
width: 100%;
|
||||||
|
height: 200rpx;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
padding: 0 20rpx 12rpx 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
overflow-y: auto;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333333;
|
||||||
|
line-height: 40rpx;
|
||||||
|
}
|
||||||
|
.prompt-tips {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.imgs-list-wrap {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: baseline;
|
||||||
|
gap: 24rpx;
|
||||||
|
padding: 20rpx 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.img-image {
|
||||||
|
display: block;
|
||||||
|
height: 176rpx;
|
||||||
|
&.active {
|
||||||
|
transform: scale(1.2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.ai-cover-bottom {
|
||||||
|
margin-top: 12rpx;
|
||||||
|
.btn-wrap {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
.loading-img {
|
||||||
|
display: block;
|
||||||
|
width: 58rpx;
|
||||||
|
height: 58rpx;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.btn + .btn {
|
||||||
|
margin-left: 20rpx;
|
||||||
|
}
|
||||||
|
.btn {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
height: 54rpx;
|
||||||
|
line-height: 54rpx;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 32rpx;
|
||||||
|
border: 2rpx solid #c52733;
|
||||||
|
color: #fff;
|
||||||
|
background: #c52733;
|
||||||
|
.icon {
|
||||||
|
display: block;
|
||||||
|
width: 28rpx;
|
||||||
|
height: 28rpx;
|
||||||
|
margin-left: 16rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.btn2 {
|
||||||
|
background: #fff;
|
||||||
|
color: #c52733;
|
||||||
|
border: 2rpx solid #c52733;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
:card="giftCard"
|
:card="giftCard"
|
||||||
:isTravelGroup="isTravelGroup"
|
:isTravelGroup="isTravelGroup"
|
||||||
:addr="giftChooseAddress"
|
:addr="giftChooseAddress"
|
||||||
@receive="onReceive($event)" />
|
@receive="onReceive($event)"
|
||||||
|
/>
|
||||||
<view v-else>
|
<view v-else>
|
||||||
<view class="no-img-wrap" v-if="isExpire">
|
<view class="no-img-wrap" v-if="isExpire">
|
||||||
<view class="wrap-box" >
|
<view class="wrap-box" >
|
||||||
|
|||||||
+98
-11
@@ -18,11 +18,16 @@
|
|||||||
<view v-if="cateIndex === 0" class="list-body">
|
<view v-if="cateIndex === 0" class="list-body">
|
||||||
<block v-if="sendList.length > 0">
|
<block v-if="sendList.length > 0">
|
||||||
<view
|
<view
|
||||||
|
|
||||||
v-for="(item, index) in sendList"
|
v-for="(item, index) in sendList"
|
||||||
:key="index"
|
:key="index"
|
||||||
class="gift-item"
|
:class="['gift-item', item.badgeText ? 'has-badge' : '']"
|
||||||
>
|
>
|
||||||
|
<view
|
||||||
|
v-if="item.badgeText"
|
||||||
|
:class="['gift-badge',['wholesalerCustom', 'wholesalerPurchase'].includes(item.sceneType) ? 'gift-badge-blue' : 'gift-badge-orange']"
|
||||||
|
>
|
||||||
|
{{ item.badgeText }}
|
||||||
|
</view>
|
||||||
<view
|
<view
|
||||||
v-for="(cart, cartIndex) in item.giftInfo"
|
v-for="(cart, cartIndex) in item.giftInfo"
|
||||||
:key="cartIndex"
|
:key="cartIndex"
|
||||||
@@ -135,10 +140,16 @@
|
|||||||
<view
|
<view
|
||||||
v-for="(item, index) in receiveList"
|
v-for="(item, index) in receiveList"
|
||||||
:key="index"
|
:key="index"
|
||||||
class="gift-item"
|
:class="['gift-item', item.badgeText ? 'has-badge' : '']"
|
||||||
>
|
>
|
||||||
<view
|
<view
|
||||||
v-for="(cart, cartIndex) in item.giftInfos"
|
v-if="item.badgeText"
|
||||||
|
:class="['gift-badge', ['wholesalerCustom', 'wholesalerPurchase'].includes(item.sceneType) ? 'gift-badge-blue' : 'gift-badge-orange']"
|
||||||
|
>
|
||||||
|
{{ item.badgeText }}
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
v-for="(cart, cartIndex) in item._renderGiftInfos"
|
||||||
:key="cartIndex"
|
:key="cartIndex"
|
||||||
class="gift-body"
|
class="gift-body"
|
||||||
@click="giftItemClickHanlde(item)"
|
@click="giftItemClickHanlde(item)"
|
||||||
@@ -146,20 +157,20 @@
|
|||||||
>
|
>
|
||||||
<view class="gift-img">
|
<view class="gift-img">
|
||||||
<image
|
<image
|
||||||
:src="cart.productInfo.image"
|
:src="cart._displayImage"
|
||||||
class="img"
|
class="img"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view class="gift-good-info">
|
<view class="gift-good-info">
|
||||||
<view class="name more-t">
|
<view class="name more-t">
|
||||||
{{ cart.productInfo.storeName }}
|
{{ cart._displayName }}
|
||||||
</view>
|
</view>
|
||||||
<view v-if="cart.productInfo.attrInfo" class="attr-txt">
|
<view v-if="cart._displaySku" class="attr-txt">
|
||||||
<view class="txt">{{ cart.productInfo.attrInfo.sku }}</view>
|
<view class="txt">{{ cart._displaySku }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="price-wrap">
|
<view v-if="cart._showPrice" class="price-wrap">
|
||||||
<view class="price">
|
<view class="price">
|
||||||
<text class="prefix">¥</text>{{ cart.productInfo.attrInfo.price }}
|
<text class="prefix">¥</text>{{ cart._displayPrice }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -442,7 +453,8 @@ export default {
|
|||||||
const { success, data } = res
|
const { success, data } = res
|
||||||
if (success) {
|
if (success) {
|
||||||
const { list, hasMore } = this.getListResult(data, page)
|
const { list, hasMore } = this.getListResult(data, page)
|
||||||
this.receiveList = page === 1 ? list : this.receiveList.concat(list)
|
const formatList = list.map(item => this.normalizeReceiveGiftItem(item))
|
||||||
|
this.receiveList = page === 1 ? formatList : this.receiveList.concat(formatList)
|
||||||
this.receiveHasMore = hasMore
|
this.receiveHasMore = hasMore
|
||||||
this.receivePage = page + 1
|
this.receivePage = page + 1
|
||||||
this.receiveInited = true
|
this.receiveInited = true
|
||||||
@@ -526,6 +538,51 @@ export default {
|
|||||||
}
|
}
|
||||||
return status
|
return status
|
||||||
},
|
},
|
||||||
|
normalizeReceiveGiftItem(item = {}) {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
_renderGiftInfos: this.getReceiveGiftInfos(item)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getReceiveGiftInfos(item = {}) {
|
||||||
|
if (item.customGiftInfo && typeof item.customGiftInfo === 'object') {
|
||||||
|
const customGift = this.formatCustomGiftInfo(item.customGiftInfo)
|
||||||
|
if (customGift) {
|
||||||
|
return [customGift]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const giftInfos = Array.isArray(item.giftInfos) ? item.giftInfos : []
|
||||||
|
return giftInfos.map(gift => this.formatDefaultGiftInfo(gift))
|
||||||
|
},
|
||||||
|
formatCustomGiftInfo(customGiftInfo = {}) {
|
||||||
|
const giftImage = typeof customGiftInfo.giftImage === 'string'
|
||||||
|
? customGiftInfo.giftImage.trim()
|
||||||
|
: ''
|
||||||
|
const giftValue = customGiftInfo.giftValue
|
||||||
|
const hasGiftValue = giftValue !== '' && giftValue !== null && giftValue !== undefined
|
||||||
|
return {
|
||||||
|
...customGiftInfo,
|
||||||
|
_isCustomGift: true,
|
||||||
|
_displayImage: giftImage,
|
||||||
|
_displayName: customGiftInfo.giftName || '',
|
||||||
|
_displaySku: customGiftInfo.specName || '',
|
||||||
|
_displayPrice: hasGiftValue ? giftValue : '',
|
||||||
|
_showPrice: Number(customGiftInfo.isShowValue) === 1 && hasGiftValue
|
||||||
|
}
|
||||||
|
},
|
||||||
|
formatDefaultGiftInfo(gift = {}) {
|
||||||
|
const productInfo = gift.productInfo || {}
|
||||||
|
const attrInfo = productInfo.attrInfo || {}
|
||||||
|
const price = attrInfo.price
|
||||||
|
return {
|
||||||
|
...gift,
|
||||||
|
_displayImage: productInfo.image || '',
|
||||||
|
_displayName: productInfo.storeName || '',
|
||||||
|
_displaySku: attrInfo.sku || '',
|
||||||
|
_displayPrice: price,
|
||||||
|
_showPrice: price !== '' && price !== null && price !== undefined
|
||||||
|
}
|
||||||
|
},
|
||||||
showTips() {
|
showTips() {
|
||||||
this.$refs.giftTips.showTips = true
|
this.$refs.giftTips.showTips = true
|
||||||
},
|
},
|
||||||
@@ -596,10 +653,40 @@ export default {
|
|||||||
z-index: 2;
|
z-index: 2;
|
||||||
padding: 84rpx 0 80rpx 0;
|
padding: 84rpx 0 80rpx 0;
|
||||||
.gift-item {
|
.gift-item {
|
||||||
|
position: relative;
|
||||||
padding: 16rpx;
|
padding: 16rpx;
|
||||||
margin: 0 0 24rpx;
|
margin: 0 0 24rpx;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
background-color: #ffff;
|
background-color: #ffff;
|
||||||
|
.gift-badge {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 2;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: fit-content;
|
||||||
|
height: 48rpx;
|
||||||
|
border-radius: 0rpx 16rpx 0rpx 24rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #fff;
|
||||||
|
padding: 0 12rpx;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
.gift-badge-blue {
|
||||||
|
background: #28AAF4;
|
||||||
|
}
|
||||||
|
.gift-badge-orange {
|
||||||
|
background: #FF9644;
|
||||||
|
}
|
||||||
|
&.has-badge {
|
||||||
|
.gift-good-info {
|
||||||
|
.name {
|
||||||
|
padding-right: 160rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.gift-body {
|
.gift-body {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -17,13 +17,16 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="amount-box">
|
<view class="amount-box">
|
||||||
<view class="title bold">提现金额:</view>
|
<view class="v12-justify-between">
|
||||||
|
<view class="title bold">提现金额:</view>
|
||||||
|
<view class="title" @click="showRules">提现规则</view>
|
||||||
|
</view>
|
||||||
<view class="item acea-row row-middle">
|
<view class="item acea-row row-middle">
|
||||||
<view class="dollar bold">¥</view>
|
<view class="dollar bold">¥</view>
|
||||||
<view class="input">
|
<view class="input">
|
||||||
<u--input
|
<u--input
|
||||||
v-model="amout"
|
v-model="amout"
|
||||||
:placeholder="'最低提现金额' + minPrice"
|
placeholder="请输入提现金额"
|
||||||
:maxlength="-1"
|
:maxlength="-1"
|
||||||
:customStyle="{
|
:customStyle="{
|
||||||
'border': 0
|
'border': 0
|
||||||
@@ -68,18 +71,25 @@
|
|||||||
</block>
|
</block>
|
||||||
</blPaymentPasswordInput>
|
</blPaymentPasswordInput>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
|
<uni-popup ref="rulesPopup" class="rules-popup" safe-area background-color="#fff" type="bottom">
|
||||||
|
<view class="rules-content">
|
||||||
|
<view class="rules-title">提现规则</view>
|
||||||
|
<rich-text v-if="withdrawalRules" class="rules-text" :nodes="withdrawalRules" />
|
||||||
|
<view v-else class="rules-text">暂无提现规则</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {mapGetters} from "vuex";
|
import {mapGetters} from "vuex";
|
||||||
import { getBank, bankCardList, postCashInfo } from "@/api/user";
|
import { getBank, bankCardList, postCashInfo, getWithdrawalRules } from "@/api/user";
|
||||||
import NP from "number-precision";
|
import NP from "number-precision";
|
||||||
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||||
import blPaymentPasswordInput from '@/components/blPaymentPasswordInput.vue';
|
import blPaymentPasswordInput from '@/components/blPaymentPasswordInput.vue';
|
||||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
import { formatRichText } from '@/utils'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [pageListenMixins],
|
mixins: [pageListenMixins],
|
||||||
@@ -97,7 +107,8 @@ export default {
|
|||||||
gdLimit: 0, //最低固定费率额度
|
gdLimit: 0, //最低固定费率额度
|
||||||
feeRate: 0, //手续费费率
|
feeRate: 0, //手续费费率
|
||||||
remark: "", //提现说明
|
remark: "", //提现说明
|
||||||
pageKeyId: Object.freeze('userExtractIndex')
|
pageKeyId: Object.freeze('userExtractIndex'),
|
||||||
|
withdrawalRules: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@@ -135,6 +146,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
showRules() {
|
||||||
|
getWithdrawalRules().then(res => {
|
||||||
|
this.withdrawalRules = formatRichText(res.data);
|
||||||
|
this.$refs.rulesPopup.open();
|
||||||
|
})
|
||||||
|
},
|
||||||
calculateSxf: function (amout) {
|
calculateSxf: function (amout) {
|
||||||
var sxf = 0;
|
var sxf = 0;
|
||||||
if (amout == 0) {
|
if (amout == 0) {
|
||||||
@@ -477,4 +494,32 @@ export default {
|
|||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
|
.rules-popup /deep/ .uni-popup__wrapper-box {
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 24rpx 24rpx 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rules-content {
|
||||||
|
padding: 32rpx;
|
||||||
|
padding-bottom: calc(32rpx + constant(safe-area-inset-bottom));
|
||||||
|
padding-bottom: calc(32rpx + env(safe-area-inset-bottom));
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rules-title {
|
||||||
|
margin-bottom: 24rpx;
|
||||||
|
color: #333333;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 44rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rules-text {
|
||||||
|
color: #666666;
|
||||||
|
font-size: 26rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -9,6 +9,15 @@ import stringify from "@/utils/querystring";
|
|||||||
import {VUE_APP_API_URL} from "@/config";
|
import {VUE_APP_API_URL} from "@/config";
|
||||||
import {auth} from '@/libs/wechat'
|
import {auth} from '@/libs/wechat'
|
||||||
|
|
||||||
|
// 富文本内容预处理:
|
||||||
|
// 纯文本内容(不含HTML标签)中的换行符\n在rich-text中会被折叠为空格,需转为<br/>以保留换行格式
|
||||||
|
export function formatRichText(content) {
|
||||||
|
if (!content) return ''
|
||||||
|
// 含HTML标签的富文本内容不做处理,避免破坏原有结构
|
||||||
|
if (/<[a-zA-Z][^>]*>/.test(content)) return content
|
||||||
|
return content.replace(/\r\n/g, '\n').replace(/\n/g, '<br/>')
|
||||||
|
}
|
||||||
|
|
||||||
export function dataFormat(time, option) {
|
export function dataFormat(time, option) {
|
||||||
time = +time * 1000;
|
time = +time * 1000;
|
||||||
const d = new Date(time);
|
const d = new Date(time);
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ export default {
|
|||||||
pages: 0, // 总页数
|
pages: 0, // 总页数
|
||||||
list: [],
|
list: [],
|
||||||
os: '',
|
os: '',
|
||||||
|
isClick: false, // 防止连续点击重复请求/跳转
|
||||||
pageKeyId: Object.freeze('investmentList')
|
pageKeyId: Object.freeze('investmentList')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -41,6 +42,10 @@ export default {
|
|||||||
this.getOS()
|
this.getOS()
|
||||||
this.getData()
|
this.getData()
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
// 从文件阅读页返回时解锁,允许再次点击
|
||||||
|
this.isClick = false
|
||||||
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
if (this.pages >= this.page) this.getData()
|
if (this.pages >= this.page) this.getData()
|
||||||
},
|
},
|
||||||
@@ -67,6 +72,8 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getDetail(id) {
|
getDetail(id) {
|
||||||
|
if (this.isClick) return
|
||||||
|
this.isClick = true
|
||||||
investmentInfo(id).then(({data}) => {
|
investmentInfo(id).then(({data}) => {
|
||||||
const file = data.contents[0];
|
const file = data.contents[0];
|
||||||
if (file.suffix === 'pdf' && this.os === 'android') {
|
if (file.suffix === 'pdf' && this.os === 'android') {
|
||||||
@@ -77,6 +84,8 @@ export default {
|
|||||||
url: '/pkg_common/views/pdf?path=' + encodeURI(path) + '&id=' + id
|
url: '/pkg_common/views/pdf?path=' + encodeURI(path) + '&id=' + id
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.isClick = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
viewPdf(url) {
|
viewPdf(url) {
|
||||||
@@ -89,8 +98,10 @@ export default {
|
|||||||
fileType: 'pdf',
|
fileType: 'pdf',
|
||||||
success: result => {
|
success: result => {
|
||||||
//成功
|
//成功
|
||||||
|
this.isClick = false
|
||||||
},
|
},
|
||||||
fail: err => {
|
fail: err => {
|
||||||
|
this.isClick = false
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: 'openDocument fail',
|
title: 'openDocument fail',
|
||||||
content: JSON.stringify(err)
|
content: JSON.stringify(err)
|
||||||
@@ -99,6 +110,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
fail: err => {
|
fail: err => {
|
||||||
|
this.isClick = false
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: 'downloadFile fail',
|
title: 'downloadFile fail',
|
||||||
content: JSON.stringify(err)
|
content: JSON.stringify(err)
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
<view class="location-box flex ai-center">
|
<view class="location-box flex ai-center">
|
||||||
<!-- @click="goCity"-->
|
<!-- @click="goCity"-->
|
||||||
<image :src="webUrl+'/20220903142929759087.png'" mode="scaleToFill"></image>
|
<image :src="webUrl+'/20220903142929759087.png'" mode="scaleToFill"></image>
|
||||||
<text class="city-name">{{ cityName }}</text>
|
<text class="city-name">当前城市:{{ cityName }}</text>
|
||||||
<text>当前定位</text>
|
<text></text>
|
||||||
</view>
|
</view>
|
||||||
<view class="more-box flex ai-center">
|
<view class="more-box flex ai-center">
|
||||||
<text @click="goClass">全部商品列表</text>
|
<text @click="goClass">全部商品列表</text>
|
||||||
|
|||||||
Reference in New Issue
Block a user