Merge branch 'dev' into test
This commit is contained in:
+23
-10
@@ -11,10 +11,8 @@ export function getImages() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 商户申请页面数据
|
// 商户申请页面数据
|
||||||
export function getShopData(partnerId) {
|
export function getShopData(params) {
|
||||||
let param = {};
|
return request.get("/merchantApply/index", params, {login: true})
|
||||||
if (partnerId) param.partnerId = partnerId;
|
|
||||||
return request.get("/merchantApply/index", param, {login: true})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查看商户申请
|
// 查看商户申请
|
||||||
@@ -29,23 +27,38 @@ export function getWholesaler() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 提交店铺入驻申请
|
// 提交店铺入驻申请
|
||||||
export function saveShop(hotelInfo, captcha, partnerId) {
|
export function saveShop(hotelInfo, partnerId = '', promoterUid = '') {
|
||||||
let param = {hotelInfo, captcha: hotelInfo.captcha};
|
let param = {hotelInfo, captcha: hotelInfo.captcha};
|
||||||
if (partnerId && partnerId.length > 0) param.partnerId = partnerId;
|
if (partnerId && partnerId.length > 0) {
|
||||||
|
param.partnerId = partnerId;
|
||||||
|
}
|
||||||
|
if (promoterUid && promoterUid.length > 0) {
|
||||||
|
param.promoterUid = promoterUid;
|
||||||
|
}
|
||||||
return request.post("/merchantApply/hotel/submit", param, {login: true})
|
return request.post("/merchantApply/hotel/submit", param, {login: true})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 提交特产供应商入驻申请
|
// 提交特产供应商入驻申请
|
||||||
export function saveSupplier(hotelInfo, supplierInfo, partnerId) {
|
export function saveSupplier(hotelInfo, supplierInfo, partnerId = '', promoterUid = '') {
|
||||||
let param = {hotelInfo, supplierInfo, captcha: supplierInfo.captcha};
|
let param = {hotelInfo, supplierInfo, captcha: supplierInfo.captcha};
|
||||||
if (partnerId && partnerId.length > 0) param.partnerId = partnerId;
|
if (partnerId && partnerId.length > 0) {
|
||||||
|
param.partnerId = partnerId;
|
||||||
|
}
|
||||||
|
if (promoterUid && promoterUid.length > 0) {
|
||||||
|
param.promoterUid = promoterUid;
|
||||||
|
}
|
||||||
return request.post("/merchantApply/goodSupplier/submit", param, {login: true})
|
return request.post("/merchantApply/goodSupplier/submit", param, {login: true})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 提交文玩供应商入驻申请
|
// 提交文玩供应商入驻申请
|
||||||
export function saveWenwanSupplier(hotelInfo, supplierInfo, partnerId) {
|
export function saveWenwanSupplier(hotelInfo, supplierInfo, partnerId = '', promoterUid = '') {
|
||||||
let param = {hotelInfo, supplierInfo, captcha: supplierInfo.captcha};
|
let param = {hotelInfo, supplierInfo, captcha: supplierInfo.captcha};
|
||||||
if (partnerId && partnerId.length > 0) param.partnerId = partnerId;
|
if (partnerId && partnerId.length > 0) {
|
||||||
|
param.partnerId = partnerId;
|
||||||
|
}
|
||||||
|
if (promoterUid && promoterUid.length > 0) {
|
||||||
|
param.promoterUid = promoterUid;
|
||||||
|
}
|
||||||
return request.post("/merchantApply/wenwanSupplier/submit", param, {login: true})
|
return request.post("/merchantApply/wenwanSupplier/submit", param, {login: true})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8267,6 +8267,7 @@ rich-text {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
line-height: 40rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.draw-ticket-icon {
|
.draw-ticket-icon {
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view
|
<view
|
||||||
:class="{
|
:class="[{ on: attr.cartAttr === true }, className]"
|
||||||
'on': attr.cartAttr === true,
|
:style="{ paddingBottom: paddingBottom }"
|
||||||
[className]: className
|
|
||||||
}"
|
|
||||||
:style="{paddingBottom: paddingBottom}"
|
|
||||||
class="product-window"
|
class="product-window"
|
||||||
>
|
>
|
||||||
<view class="textpic acea-row row-between-wrapper">
|
<view class="textpic acea-row row-between-wrapper">
|
||||||
@@ -78,7 +75,7 @@
|
|||||||
<view class="v12-px-2 v12-mt-3" v-if="showOk">
|
<view class="v12-px-2 v12-mt-3" v-if="showOk">
|
||||||
<u-button
|
<u-button
|
||||||
shape="circle"
|
shape="circle"
|
||||||
color="#C52733"
|
:color="(attr.productSelect.stock === 0 && attr.cartAttr) ? '#9D9D9D' : '#C52733'"
|
||||||
@click="$emit('ok')"
|
@click="$emit('ok')"
|
||||||
:disabled="(attr.productSelect.stock === 0 && attr.cartAttr)"
|
:disabled="(attr.productSelect.stock === 0 && attr.cartAttr)"
|
||||||
>{{ okText }}</u-button>
|
>{{ okText }}</u-button>
|
||||||
@@ -86,7 +83,7 @@
|
|||||||
<view class="v12-px-2 v12-mt-3" v-if="isGift">
|
<view class="v12-px-2 v12-mt-3" v-if="isGift">
|
||||||
<u-button
|
<u-button
|
||||||
shape="circle"
|
shape="circle"
|
||||||
color="#C52733"
|
:color="(attr.productSelect.stock === 0 && attr.cartAttr) ? '#9D9D9D' : '#C52733'"
|
||||||
@click="$emit('gift')"
|
@click="$emit('gift')"
|
||||||
:disabled="(attr.productSelect.stock === 0 && attr.cartAttr)"
|
:disabled="(attr.productSelect.stock === 0 && attr.cartAttr)"
|
||||||
>送给朋友</u-button>
|
>送给朋友</u-button>
|
||||||
@@ -258,6 +255,15 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scope>
|
<style scope>
|
||||||
|
.btn-car-disabled {
|
||||||
|
border: 2rpx solid #9D9D9D !important;
|
||||||
|
color: #9D9D9D !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-buy-disabled {
|
||||||
|
background: #9D9D9D !important;
|
||||||
|
color: #FFFFFF !important;
|
||||||
|
}
|
||||||
.itemn{
|
.itemn{
|
||||||
margin: 28rpx 0 0 34rpx !important;
|
margin: 28rpx 0 0 34rpx !important;
|
||||||
width: auto;
|
width: auto;
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
import { subscribeMessage } from '@/libs/order'
|
// import { subscribeMessage } from '@/libs/order'
|
||||||
import { getProvider } from '@/utils'
|
import { getProvider } from '@/utils'
|
||||||
import WechatJSSDK from 'wechat-jssdk/dist/client.umd'
|
import WechatJSSDK from 'wechat-jssdk/dist/client.umd'
|
||||||
import { getWechatConfig, wechatAuth } from '@/api/public'
|
import { getWechatConfig, wechatAuth } from '@/api/public'
|
||||||
@@ -65,7 +65,7 @@ export const weappPay = option => {
|
|||||||
resolve(success)
|
resolve(success)
|
||||||
}, 3000)
|
}, 3000)
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
subscribeMessage()
|
// subscribeMessage()
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
fail: error => {
|
fail: error => {
|
||||||
|
|||||||
+55
-23
@@ -517,6 +517,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
console.clear()
|
||||||
console.time()
|
console.time()
|
||||||
// uni.hideTabBar()
|
// uni.hideTabBar()
|
||||||
const _this = this
|
const _this = this
|
||||||
@@ -553,7 +554,11 @@ export default {
|
|||||||
this.pageToHideHandle()
|
this.pageToHideHandle()
|
||||||
},
|
},
|
||||||
onPageScroll(e) {
|
onPageScroll(e) {
|
||||||
this.scrollTop = e.scrollTop
|
if (this.pageScrollTimer) return
|
||||||
|
this.pageScrollTimer = setTimeout(() => {
|
||||||
|
this.pageScrollTimer = null
|
||||||
|
this.scrollTop = e.scrollTop
|
||||||
|
}, 50)
|
||||||
},
|
},
|
||||||
onShareTimeline() {
|
onShareTimeline() {
|
||||||
uni.updateShareMenu({
|
uni.updateShareMenu({
|
||||||
@@ -636,20 +641,24 @@ export default {
|
|||||||
},
|
},
|
||||||
onscroll(e) {
|
onscroll(e) {
|
||||||
this.scrollViewWidth = e.detail.scrollWidth
|
this.scrollViewWidth = e.detail.scrollWidth
|
||||||
const imgs = []
|
if (this.scrollTimer) return
|
||||||
this.getElementData(`#${this.scrollView}`, res=>{
|
this.scrollTimer = setTimeout(() => {
|
||||||
this.setFunctionGuideData({
|
this.scrollTimer = null
|
||||||
imgs: this.imgs,
|
this.getElementData(`#${this.scrollView}`, res => {
|
||||||
btnGroupPosition: '20rpx',
|
if (!res) return
|
||||||
tipsPosition: '',
|
this.setFunctionGuideData({
|
||||||
position: {
|
imgs: this.imgs,
|
||||||
top: res.top + 'px',
|
btnGroupPosition: '20rpx',
|
||||||
left: res.left + 'px',
|
tipsPosition: '',
|
||||||
width: `${res.height}px`,
|
position: {
|
||||||
height: `${res.height}px`
|
top: res.top + 'px',
|
||||||
}
|
left: res.left + 'px',
|
||||||
|
width: `${res.height}px`,
|
||||||
|
height: `${res.height}px`
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
}, 100)
|
||||||
},
|
},
|
||||||
toEle(id, imgs) {
|
toEle(id, imgs) {
|
||||||
this.getElementData(`#${id}`, res=>{
|
this.getElementData(`#${id}`, res=>{
|
||||||
@@ -704,6 +713,10 @@ export default {
|
|||||||
const { data } = res
|
const { data } = res
|
||||||
this.bannerList = data.banner || []
|
this.bannerList = data.banner || []
|
||||||
})
|
})
|
||||||
|
console.timeEnd()
|
||||||
|
console.log('^^^^^^^^^^^^^^^^获取定位开始')
|
||||||
|
console.time()
|
||||||
|
this.getPageData()
|
||||||
this.getLocationData()
|
this.getLocationData()
|
||||||
},
|
},
|
||||||
// 定位失败,重新唤起定位授权
|
// 定位失败,重新唤起定位授权
|
||||||
@@ -714,31 +727,46 @@ export default {
|
|||||||
}))
|
}))
|
||||||
},
|
},
|
||||||
getLocationData() {
|
getLocationData() {
|
||||||
|
const cityName = uni.getStorageSync('locationCityName')
|
||||||
|
if (cityName) {
|
||||||
|
this.cityName = cityName
|
||||||
|
// this.getPageData()
|
||||||
|
}
|
||||||
this.isLocating = true
|
this.isLocating = true
|
||||||
getLocationPromise().then(mapData => {
|
getLocationPromise().then(mapData => {
|
||||||
if (mapData.errMsg) {
|
if (mapData.errMsg) {
|
||||||
const { latitude, longitude } = mapData
|
const { latitude, longitude } = mapData
|
||||||
getCurAddress(latitude, longitude, address => {
|
getCurAddress(latitude, longitude, address => {
|
||||||
console.log(address)
|
console.log(address)
|
||||||
this.cityName = address.city
|
const resCityName = address.city || ''
|
||||||
uni.setStorageSync('locationCityName', this.cityName)
|
// 如果当前定位成功和上一次的定位城市不同,才更新城市名称
|
||||||
|
if (resCityName !== this.cityName) {
|
||||||
|
this.cityName = address.city
|
||||||
|
uni.setStorageSync('locationCityName', this.cityName)
|
||||||
|
// this.getPageData()
|
||||||
|
}
|
||||||
this.isLocating = false
|
this.isLocating = false
|
||||||
this.getPageData()
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.isLocating = false
|
this.isLocating = false
|
||||||
this.getPageData()
|
// this.getPageData()
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.getPageData()
|
// this.getPageData()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getPageData() {
|
getPageData() {
|
||||||
|
console.timeEnd()
|
||||||
|
console.log('^^^^^^^^^^^^^^^^获取定位成功/失败开始获取首页数据')
|
||||||
|
console.time()
|
||||||
const _this = this
|
const _this = this
|
||||||
uni.showLoading({ title: '加载中' })
|
uni.showLoading({ title: '加载中' })
|
||||||
getHomeData({ cityName: this.cityName }).then(res => {
|
getHomeData({ cityName: this.cityName }).then(res => {
|
||||||
const { success, data } = res
|
const { success, data } = res
|
||||||
if (success && data) {
|
if (success && data) {
|
||||||
|
console.timeEnd()
|
||||||
|
console.log('^^^^^^^^^^^^^^^^接口响应之后开始')
|
||||||
|
console.time()
|
||||||
_this.$set(_this, 'banner', data.banner || [])
|
_this.$set(_this, 'banner', data.banner || [])
|
||||||
_this.$set(_this, 'menus', data.menus || [])
|
_this.$set(_this, 'menus', data.menus || [])
|
||||||
_this.$set(_this, 'landmarkGoodsImage', data.landmarkGoodsImage || {})
|
_this.$set(_this, 'landmarkGoodsImage', data.landmarkGoodsImage || {})
|
||||||
@@ -758,28 +786,32 @@ export default {
|
|||||||
_this.lotteryCanDraw = data.lotteryCanDraw || false
|
_this.lotteryCanDraw = data.lotteryCanDraw || false
|
||||||
_this.initPosterPopupState(data)
|
_this.initPosterPopupState(data)
|
||||||
if (data.bastList) {
|
if (data.bastList) {
|
||||||
|
const newBastLeftList = []
|
||||||
|
const newBastRightList = []
|
||||||
for (let i = 0; i < data.bastList.length; i++) {
|
for (let i = 0; i < data.bastList.length; i++) {
|
||||||
if (i % 2 === 0) {
|
if (i % 2 === 0) {
|
||||||
// 店铺排名
|
// 店铺排名
|
||||||
if (i === 4 && data.hotelList.length > 0) {
|
if (i === 4 && data.hotelList.length > 0) {
|
||||||
_this.bastLeftList.push({
|
newBastLeftList.push({
|
||||||
type: 'hotel',
|
type: 'hotel',
|
||||||
list: data.hotelList
|
list: data.hotelList
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
_this.bastLeftList.push(data.bastList[i])
|
newBastLeftList.push(data.bastList[i])
|
||||||
}
|
}
|
||||||
if (i % 2 === 1) {
|
if (i % 2 === 1) {
|
||||||
// 尖货专题
|
// 尖货专题
|
||||||
if (i === 3 && data.contentBest.length > 0) {
|
if (i === 3 && data.contentBest.length > 0) {
|
||||||
_this.bastRightList.push({
|
newBastRightList.push({
|
||||||
type: 'swiper',
|
type: 'swiper',
|
||||||
list: data.contentBest
|
list: data.contentBest
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
_this.bastRightList.push(data.bastList[i])
|
newBastRightList.push(data.bastList[i])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
_this.$set(_this, 'bastLeftList', newBastLeftList)
|
||||||
|
_this.$set(_this, 'bastRightList', newBastRightList)
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
console.timeEnd()
|
console.timeEnd()
|
||||||
|
|||||||
@@ -743,21 +743,7 @@ export default {
|
|||||||
icon: "none",
|
icon: "none",
|
||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
this.afterPaySuccess(orderId, (drawTicketResult) => {
|
this.paySuccessToMyOrderOrDetail(orderId)
|
||||||
if (this.orderGroupInfo.cartInfo && this.orderGroupInfo.cartInfo.length === 1) {
|
|
||||||
this.$yrouter.replace({
|
|
||||||
path: "/pagesOrder/order/OrderDetails/index",
|
|
||||||
query: this.buildOrderDetailQuery(orderId, drawTicketResult)
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.$yrouter.replace({
|
|
||||||
path: "/pages/order/MyOrder/index",
|
|
||||||
query: {
|
|
||||||
type: 2
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
break;
|
break;
|
||||||
case "WECHAT_H5_PAY":
|
case "WECHAT_H5_PAY":
|
||||||
// H5支付
|
// H5支付
|
||||||
@@ -771,41 +757,17 @@ export default {
|
|||||||
case "WECHAT_PAY":
|
case "WECHAT_PAY":
|
||||||
// 小程序支付
|
// 小程序支付
|
||||||
weappPay(data.result.jsConfig).then(() => {
|
weappPay(data.result.jsConfig).then(() => {
|
||||||
this.afterPaySuccess(orderId, () => {
|
this.paySuccessToMyOrderOrDetail(orderId)
|
||||||
this.$yrouter.replace({
|
|
||||||
path: "/pages/order/MyOrder/index",
|
|
||||||
query: {
|
|
||||||
type: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$yrouter.replace({
|
this.paySuccessToMyOrderOrDetail(orderId)
|
||||||
path: "/pages/order/MyOrder/index",
|
|
||||||
query: {
|
|
||||||
type: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
break;
|
break;
|
||||||
case "WECHAT_APP_PAY":
|
case "WECHAT_APP_PAY":
|
||||||
// APP支付
|
// APP支付
|
||||||
weappPay(data.result.jsConfig).then(() => {
|
weappPay(data.result.jsConfig).then(() => {
|
||||||
this.afterPaySuccess(orderId, () => {
|
this.paySuccessToMyOrderOrDetail(orderId)
|
||||||
this.$yrouter.replace({
|
|
||||||
path: "/pages/order/MyOrder/index",
|
|
||||||
query: {
|
|
||||||
type: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$yrouter.replace({
|
this.paySuccessToMyOrderOrDetail(orderId)
|
||||||
path: "/pages/order/MyOrder/index",
|
|
||||||
query: {
|
|
||||||
type: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -820,9 +782,29 @@ export default {
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
}).finally(function () {
|
}).finally(function () {
|
||||||
|
if (that.$refs.payPwdPop) {
|
||||||
|
that.$refs.payPwdPop.clear()
|
||||||
|
that.$refs.payPwdPop.close()
|
||||||
|
}
|
||||||
that.isShowPayPwdPop = false
|
that.isShowPayPwdPop = false
|
||||||
that.$refs.payPwdPop.clear()
|
})
|
||||||
that.$refs.payPwdPop.close()
|
},
|
||||||
|
paySuccessToMyOrderOrDetail(orderId) {
|
||||||
|
this.afterPaySuccess(orderId, (drawTicketResult) => {
|
||||||
|
if (this.orderGroupInfo.cartInfo && this.orderGroupInfo.cartInfo.length === 1) {
|
||||||
|
this.$yrouter.replace({
|
||||||
|
path: "/pagesOrder/order/OrderDetails/index",
|
||||||
|
query: this.buildOrderDetailQuery(orderId, drawTicketResult)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$yrouter.replace({
|
||||||
|
path: "/pages/order/MyOrder/index",
|
||||||
|
query: {
|
||||||
|
type: 2,
|
||||||
|
query: this.buildOrderDetailQuery(orderId, drawTicketResult)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
|
|||||||
@@ -493,6 +493,7 @@
|
|||||||
ref="attrWindow"
|
ref="attrWindow"
|
||||||
:attr="attr"
|
:attr="attr"
|
||||||
:cartNum="cart_num"
|
:cartNum="cart_num"
|
||||||
|
:hideQuantityControls="source === 'countyLottery' && Number(activityId) > 0"
|
||||||
@changeFun="changeFun"
|
@changeFun="changeFun"
|
||||||
:isNegotiable="storeInfo.isNegotiable === 1"
|
:isNegotiable="storeInfo.isNegotiable === 1"
|
||||||
@gift="gift"
|
@gift="gift"
|
||||||
@@ -1871,8 +1872,8 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn-car-disabled {
|
.btn-car-disabled {
|
||||||
border: 2rpx solid #707070;
|
border: 2rpx solid #9D9D9D !important;
|
||||||
color: #707070;
|
color: #9D9D9D !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-buy {
|
.btn-buy {
|
||||||
@@ -1885,7 +1886,8 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn-buy-disabled {
|
.btn-buy-disabled {
|
||||||
background: #9D9D9D;
|
background: #9D9D9D !important;
|
||||||
|
color: #FFFFFF !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2113,7 +2115,7 @@ export default {
|
|||||||
.product-con .footer{
|
.product-con .footer{
|
||||||
height: 140rpx !important;
|
height: 140rpx !important;
|
||||||
padding-bottom: 20rpx;
|
padding-bottom: 20rpx;
|
||||||
z-index: 1002 !important;
|
// z-index: 1002 !important;
|
||||||
}
|
}
|
||||||
.product-con .product-intro .conter view {
|
.product-con .product-intro .conter view {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
|
|||||||
@@ -216,7 +216,10 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
v-if="drawConfig.myTicketImageEnable === 1 && drawConfig.myTicketImage"
|
v-if="(store.getters.token || userInfo.uid) &&
|
||||||
|
drawConfig.myTicketImageEnable === 1 &&
|
||||||
|
drawConfig.myTicketImage
|
||||||
|
"
|
||||||
class="my-ticket-entry"
|
class="my-ticket-entry"
|
||||||
@click="goMyTicketList"
|
@click="goMyTicketList"
|
||||||
>
|
>
|
||||||
@@ -415,7 +418,6 @@ export default {
|
|||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
uni.$emit('updateUnreadMessageCount')
|
uni.$emit('updateUnreadMessageCount')
|
||||||
this.getDrawConfigReq()
|
|
||||||
if (this.$store.getters.token) {
|
if (this.$store.getters.token) {
|
||||||
this.isNoLogin = false
|
this.isNoLogin = false
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
@@ -426,6 +428,7 @@ export default {
|
|||||||
this.getUserLevelInfoReq()
|
this.getUserLevelInfoReq()
|
||||||
this.isWeixin = isWeixin()
|
this.isWeixin = isWeixin()
|
||||||
// this.getUnreadMsgList()
|
// this.getUnreadMsgList()
|
||||||
|
this.getDrawConfigReq()
|
||||||
} else {
|
} else {
|
||||||
this.isNoLogin = true
|
this.isNoLogin = true
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -848,11 +848,21 @@ export default {
|
|||||||
goGoodsCon(item, isGiftCardReceiveBlind, isDrawOrder) {
|
goGoodsCon(item, isGiftCardReceiveBlind, isDrawOrder) {
|
||||||
if(isGiftCardReceiveBlind) return
|
if(isGiftCardReceiveBlind) return
|
||||||
if(isDrawOrder) return
|
if(isDrawOrder) return
|
||||||
|
const activityId = Number(
|
||||||
|
item.drawActivityId ||
|
||||||
|
(item.productInfo && item.productInfo.drawActivityId) ||
|
||||||
|
0
|
||||||
|
)
|
||||||
|
const query = {
|
||||||
|
id: item.productId
|
||||||
|
}
|
||||||
|
if (activityId > 0) {
|
||||||
|
query.from = 'countyLottery'
|
||||||
|
query.activityId = activityId
|
||||||
|
}
|
||||||
this.$yrouter.push({
|
this.$yrouter.push({
|
||||||
path: '/pages/shop/GoodsCon/index',
|
path: '/pages/shop/GoodsCon/index',
|
||||||
query: {
|
query
|
||||||
id: item.productId
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleShowMore() {
|
handleShowMore() {
|
||||||
|
|||||||
@@ -750,7 +750,7 @@ export default {
|
|||||||
border: 4rpx solid #333;
|
border: 4rpx solid #333;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
line-height: 38rpx;
|
line-height: 44rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #333;
|
color: #333;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
|||||||
@@ -123,8 +123,9 @@
|
|||||||
:cartNum="cart_num"
|
:cartNum="cart_num"
|
||||||
:hideQuantityControls="true"
|
:hideQuantityControls="true"
|
||||||
:showOk="true"
|
:showOk="true"
|
||||||
:okText="currentGoodsItem && Number(currentGoodsItem.isGiftCard) === 1 ? '送给朋友' : '立即下单'"
|
:okText="currentGoodsItem && Number(currentGoodsItem.isGiftCard) === 1 ? '立即下单' : '立即下单'"
|
||||||
@changeFun="changeFun"
|
@changeFun="changeFun"
|
||||||
|
paddingBottom="80rpx"
|
||||||
@ok="submitFromSku()"
|
@ok="submitFromSku()"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@@ -369,7 +370,9 @@ export default {
|
|||||||
...(productSelect || {}),
|
...(productSelect || {}),
|
||||||
...(this.attr.productSelect || {})
|
...(this.attr.productSelect || {})
|
||||||
}
|
}
|
||||||
const isGiftOrder = Number(this.currentGoodsItem && this.currentGoodsItem.isGiftCard) === 1
|
// const isGiftOrder = Number(this.currentGoodsItem && this.currentGoodsItem.isGiftCard) === 1
|
||||||
|
const isGiftOrder = false
|
||||||
|
|
||||||
const stock = Number(currentSelect.stock || 0)
|
const stock = Number(currentSelect.stock || 0)
|
||||||
const hasNo = (this.attr.productAttr.length && !productSelect && this.isOpen) || stock <= 0
|
const hasNo = (this.attr.productAttr.length && !productSelect && this.isOpen) || stock <= 0
|
||||||
if (hasNo) {
|
if (hasNo) {
|
||||||
|
|||||||
@@ -480,7 +480,8 @@ export default {
|
|||||||
videos: [],
|
videos: [],
|
||||||
district: [],
|
district: [],
|
||||||
qualificationImg: [],
|
qualificationImg: [],
|
||||||
partnerId: 0,
|
partnerId: '',
|
||||||
|
promoterUid: '',
|
||||||
experienceStoreCategoryList: [],
|
experienceStoreCategoryList: [],
|
||||||
experienceStoreCategoryIndex: 0,
|
experienceStoreCategoryIndex: 0,
|
||||||
form: {
|
form: {
|
||||||
@@ -518,9 +519,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(opts) {
|
onLoad(opts) {
|
||||||
this.partnerId = opts.partnerId
|
this.partnerId = opts.partnerId || ''
|
||||||
|
this.promoterUid = opts.promoterUid || ''
|
||||||
this.queryCity()
|
this.queryCity()
|
||||||
getShopData().then(({ data }) => {
|
getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({ data }) => {
|
||||||
this.notice = data.merchantApplyNotice
|
this.notice = data.merchantApplyNotice
|
||||||
})
|
})
|
||||||
getExperienceStoreCategoryList().then(({ data }) => {
|
getExperienceStoreCategoryList().then(({ data }) => {
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
partnerId: '',
|
partnerId: '',
|
||||||
|
promoterUid: '',
|
||||||
partnerType: '',
|
partnerType: '',
|
||||||
hotelId: null,
|
hotelId: null,
|
||||||
hasHotel: null,
|
hasHotel: null,
|
||||||
@@ -71,8 +72,9 @@ export default {
|
|||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.partnerId = options.partnerId || ''
|
this.partnerId = options.partnerId || ''
|
||||||
|
this.promoterUid = options.promoterUid || ''
|
||||||
getImages().then(({data}) => this.images = data)
|
getImages().then(({data}) => this.images = data)
|
||||||
getShopData(this.partnerId).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
|
||||||
this.hasHotel = data.hasHotel
|
this.hasHotel = data.hasHotel
|
||||||
@@ -91,7 +93,7 @@ export default {
|
|||||||
if (this.hasTravel === 1) {
|
if (this.hasTravel === 1) {
|
||||||
this.$global.goSupplierMini()
|
this.$global.goSupplierMini()
|
||||||
} else {
|
} else {
|
||||||
this.$yrouter.push('/pkg_join/views/travelResidence?partnerId=' + this.partnerId)
|
this.$yrouter.push('/pkg_join/views/travelResidence?partnerId=' + this.partnerId + '&promoterUid=' + this.promoterUid)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@@ -104,14 +106,14 @@ export default {
|
|||||||
if (this.hasSupplier === 1) {
|
if (this.hasSupplier === 1) {
|
||||||
this.$global.goSupplierMini()
|
this.$global.goSupplierMini()
|
||||||
} else {
|
} else {
|
||||||
this.$yrouter.push(`/pkg_join/views/supplier?type=goods_supplier&partnerId=${this.partnerId}`)
|
this.$yrouter.push(`/pkg_join/views/supplier?type=goods_supplier&partnerId=${this.partnerId}&promoterUid=${this.promoterUid}`)
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case 'wenwan_supplier':
|
case 'wenwan_supplier':
|
||||||
if (this.hasSupplier === 1) {
|
if (this.hasSupplier === 1) {
|
||||||
this.$global.goSupplierMini()
|
this.$global.goSupplierMini()
|
||||||
} else {
|
} else {
|
||||||
this.$yrouter.push(`/pkg_join/views/supplier?type=wenwan_supplier&partnerId=${this.partnerId}`)
|
this.$yrouter.push(`/pkg_join/views/supplier?type=wenwan_supplier&partnerId=${this.partnerId}&promoterUid=${this.promoterUid}`)
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case 'shop':
|
case 'shop':
|
||||||
@@ -129,13 +131,13 @@ export default {
|
|||||||
this.$global.goSupplierMini()
|
this.$global.goSupplierMini()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.$yrouter.push('/pkg_join/views/experienceStore?partnerId=' + this.partnerId)
|
this.$yrouter.push('/pkg_join/views/experienceStore?partnerId=' + this.partnerId + '&promoterUid=' + this.promoterUid)
|
||||||
break
|
break
|
||||||
case 'wholesaler':
|
case 'wholesaler':
|
||||||
if (this.hasWholesaler === 1) {
|
if (this.hasWholesaler === 1) {
|
||||||
this.$global.goSupplierMini()
|
this.$global.goSupplierMini()
|
||||||
} else {
|
} else {
|
||||||
this.$yrouter.push(`/pkg_join/views/wholesaler`)
|
this.$yrouter.push(`/pkg_join/views/wholesaler?partnerId=${this.partnerId}&promoterUid=${this.promoterUid}`)
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -473,7 +473,8 @@ export default {
|
|||||||
mixins: [pageListenMixins],
|
mixins: [pageListenMixins],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
partnerId: null,
|
partnerId: '',
|
||||||
|
promoterUid: '',
|
||||||
pics: [],
|
pics: [],
|
||||||
quaPics: [],
|
quaPics: [],
|
||||||
tips: '获取验证码',
|
tips: '获取验证码',
|
||||||
@@ -603,7 +604,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.partnerId = options.partnerId
|
this.partnerId = options.partnerId || ''
|
||||||
|
this.promoterUid = options.promoterUid || ''
|
||||||
const local_form = uni.getStorageSync('merchantApplyHotel' + '_form') || {}
|
const local_form = uni.getStorageSync('merchantApplyHotel' + '_form') || {}
|
||||||
this.quaPics = uni.getStorageSync('merchantApplyHotel' + '_quaPics') || []
|
this.quaPics = uni.getStorageSync('merchantApplyHotel' + '_quaPics') || []
|
||||||
if(!local_form.serviceTime) {
|
if(!local_form.serviceTime) {
|
||||||
@@ -694,7 +696,7 @@ export default {
|
|||||||
getCity().then(({data}) => {
|
getCity().then(({data}) => {
|
||||||
this.district = data
|
this.district = data
|
||||||
})
|
})
|
||||||
getShopData().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 = data.merchantApplyNotice
|
||||||
@@ -969,7 +971,7 @@ export default {
|
|||||||
if (postData.coverType === 2) {
|
if (postData.coverType === 2) {
|
||||||
postData.cover = postData.coverVideo
|
postData.cover = postData.coverVideo
|
||||||
}
|
}
|
||||||
saveShop(postData, this.partnerId).then(res => {
|
saveShop(postData, this.partnerId, this.promoterUid).then(res => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '您的入驻申请已提交成功,请耐心等待审核',
|
title: '您的入驻申请已提交成功,请耐心等待审核',
|
||||||
|
|||||||
@@ -567,6 +567,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
partnerId: '',
|
partnerId: '',
|
||||||
|
promoterUid: '',
|
||||||
tips: '获取验证码',
|
tips: '获取验证码',
|
||||||
infoTitle: '',
|
infoTitle: '',
|
||||||
pics: [],
|
pics: [],
|
||||||
@@ -763,6 +764,7 @@ export default {
|
|||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.partnerId = options.partnerId || ''
|
this.partnerId = options.partnerId || ''
|
||||||
|
this.promoterUid = options.promoterUid || ''
|
||||||
const type = options.type
|
const type = options.type
|
||||||
const local = uni.getStorageSync(type) || {}
|
const local = uni.getStorageSync(type) || {}
|
||||||
const local_form = uni.getStorageSync(type + '_form') || {}
|
const local_form = uni.getStorageSync(type + '_form') || {}
|
||||||
@@ -881,7 +883,7 @@ export default {
|
|||||||
getCity().then(({data}) => {
|
getCity().then(({data}) => {
|
||||||
this.district = data
|
this.district = data
|
||||||
})
|
})
|
||||||
getShopData().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 = data.merchantApplyNotice
|
||||||
@@ -1161,7 +1163,7 @@ export default {
|
|||||||
postData.cover = postData.coverVideo
|
postData.cover = postData.coverVideo
|
||||||
}
|
}
|
||||||
if (this.infoTitle === '特产') {
|
if (this.infoTitle === '特产') {
|
||||||
saveSupplier(postData, this.formSupplier, this.partnerId).then(res => {
|
saveSupplier(postData, this.formSupplier, this.partnerId, this.promoterUid).then(res => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '您的入驻申请已提交成功,请耐心等待审核',
|
title: '您的入驻申请已提交成功,请耐心等待审核',
|
||||||
@@ -1182,7 +1184,7 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
saveWenwanSupplier(postData, this.formSupplier, this.partnerId).then(res => {
|
saveWenwanSupplier(postData, this.formSupplier, this.partnerId, this.promoterUid).then(res => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '您的入驻申请已提交成功,请耐心等待审核',
|
title: '您的入驻申请已提交成功,请耐心等待审核',
|
||||||
|
|||||||
@@ -408,7 +408,8 @@ export default {
|
|||||||
cultureImg: [],
|
cultureImg: [],
|
||||||
// 资质图片
|
// 资质图片
|
||||||
qualificationImg: [],
|
qualificationImg: [],
|
||||||
partnerId: 0,
|
partnerId: '',
|
||||||
|
promoterUid: '',
|
||||||
captcha: '',
|
captcha: '',
|
||||||
form: {
|
form: {
|
||||||
/**
|
/**
|
||||||
@@ -466,9 +467,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(opts) {
|
onLoad(opts) {
|
||||||
this.partnerId = opts.partnerId
|
this.partnerId = opts.partnerId || ''
|
||||||
|
this.promoterUid = opts.promoterUid || ''
|
||||||
this.queryCity()
|
this.queryCity()
|
||||||
getShopData().then(({data}) => {
|
getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({data}) => {
|
||||||
this.notice = data.merchantApplyNotice
|
this.notice = data.merchantApplyNotice
|
||||||
this.initInfo()
|
this.initInfo()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -322,10 +322,14 @@ export default {
|
|||||||
stateType: 'primary',
|
stateType: 'primary',
|
||||||
// 是否为审核中
|
// 是否为审核中
|
||||||
reviewing: false,
|
reviewing: false,
|
||||||
pageKeyId: Object.freeze('merchantApplyWholesaler')
|
pageKeyId: Object.freeze('merchantApplyWholesaler'),
|
||||||
|
partnerId: '',
|
||||||
|
promoterUid: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
this.partnerId = options.partnerId || ''
|
||||||
|
this.promoterUid = options.promoterUid || ''
|
||||||
this.init()
|
this.init()
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
@@ -373,7 +377,7 @@ export default {
|
|||||||
getCity().then(({data}) => {
|
getCity().then(({data}) => {
|
||||||
this.district = data
|
this.district = data
|
||||||
})
|
})
|
||||||
getShopData().then(({data}) => {
|
getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({data}) => {
|
||||||
this.notice = data.merchantApplyNotice
|
this.notice = data.merchantApplyNotice
|
||||||
this.initInfo()
|
this.initInfo()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -349,7 +349,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-px-6" >
|
<view class="v12-px-6" >
|
||||||
<u-divider :text="infoArray.length === 0 ? ' · 暂无资讯 · ' : ' · 已经到底啦 · '" textPosition="center"></u-divider>
|
<u-divider :text="infoArray.length === 0 ? ' · 暂无资讯 · ' : ` · ${getLoadMoreText(infoLoading, infoHasMore, infoArray)} · `" textPosition="center"></u-divider>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -401,7 +401,7 @@
|
|||||||
v-if="activeIndex === 2"
|
v-if="activeIndex === 2"
|
||||||
class="guide-section"
|
class="guide-section"
|
||||||
>
|
>
|
||||||
<view v-if="isLoadInfoListSuccess">
|
<view v-if="isLoadGuideListoSuccess">
|
||||||
<view class="guide-list">
|
<view class="guide-list">
|
||||||
<view
|
<view
|
||||||
v-for="(item, index) in guideList"
|
v-for="(item, index) in guideList"
|
||||||
@@ -430,7 +430,7 @@
|
|||||||
class="no-data-loadend"
|
class="no-data-loadend"
|
||||||
/> -->
|
/> -->
|
||||||
<view class="v12-px-6" >
|
<view class="v12-px-6" >
|
||||||
<u-divider :text="guideList.length === 0 ? ' · 暂无攻略 · ' : ' · 已经到底啦 · '" textPosition="center"></u-divider>
|
<u-divider :text="guideList.length === 0 ? ' · 暂无攻略 · ' : ` · ${getLoadMoreText(guideLoading, guideHasMore, guideList)} · `" textPosition="center"></u-divider>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<goo-skeleton v-else />
|
<goo-skeleton v-else />
|
||||||
@@ -533,6 +533,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-if="industryList.length > 0 || investmentFileList.length > 0" class="load-more-status">
|
||||||
|
{{ getLoadMoreText(industryLoading || investmentLoading, industryHasMore || investmentHasMore, industryList.length ? industryList : investmentFileList) }}
|
||||||
|
</view>
|
||||||
<!-- <view class="project-wrap">
|
<!-- <view class="project-wrap">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<image
|
<image
|
||||||
@@ -633,6 +636,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-if="shopList.length > 0" class="load-more-status">
|
||||||
|
{{ getLoadMoreText(shopLoading, shopHasMore, shopList) }}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="industryTabIndex === 2">
|
<view v-if="industryTabIndex === 2">
|
||||||
<view class="card-wrap">
|
<view class="card-wrap">
|
||||||
@@ -698,6 +704,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-if="jiaLouList.length > 0" class="load-more-status">
|
||||||
|
{{ getLoadMoreText(jiaLouLoading, jiaLouHasMore, jiaLouList) }}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="industryTabIndex === 3">
|
<view v-if="industryTabIndex === 3">
|
||||||
<view class="card-wrap">
|
<view class="card-wrap">
|
||||||
@@ -769,6 +778,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-if="villageList.length > 0" class="load-more-status">
|
||||||
|
{{ getLoadMoreText(villageLoading, villageHasMore, villageList) }}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 产品 -->
|
<!-- 产品 -->
|
||||||
@@ -907,7 +919,6 @@ import {
|
|||||||
postCountyFamousNewsZan,
|
postCountyFamousNewsZan,
|
||||||
postCountyFamousNewsView,
|
postCountyFamousNewsView,
|
||||||
getCountyFamousIndustry,
|
getCountyFamousIndustry,
|
||||||
getCountyFamousIndustryProject,
|
|
||||||
getCountyFamousInvestmentFile,
|
getCountyFamousInvestmentFile,
|
||||||
getCountyFamousVillage,
|
getCountyFamousVillage,
|
||||||
getCountyFamousCityDetail,
|
getCountyFamousCityDetail,
|
||||||
@@ -958,6 +969,7 @@ export default {
|
|||||||
showShare: false,
|
showShare: false,
|
||||||
posterUrl: '', // 分享海报
|
posterUrl: '', // 分享海报
|
||||||
id: null,
|
id: null,
|
||||||
|
pageSize: 10,
|
||||||
partnerId: null,
|
partnerId: null,
|
||||||
isLike: false, //点赞
|
isLike: false, //点赞
|
||||||
isFavorite: false,
|
isFavorite: false,
|
||||||
@@ -1006,10 +1018,42 @@ export default {
|
|||||||
countyId: null,
|
countyId: null,
|
||||||
newsCategoryList: [],
|
newsCategoryList: [],
|
||||||
newsCurrent: 0,
|
newsCurrent: 0,
|
||||||
|
newsCategoryInited: false,
|
||||||
|
newsCategoryLoading: false,
|
||||||
shopList: [],
|
shopList: [],
|
||||||
shopTypeList: [],
|
shopTypeList: [],
|
||||||
shopTypeActive: '',
|
shopTypeActive: '',
|
||||||
detail: {}
|
shopTypeInited: false,
|
||||||
|
detail: {},
|
||||||
|
infoPage: 1,
|
||||||
|
infoHasMore: true,
|
||||||
|
infoLoading: false,
|
||||||
|
infoInited: false,
|
||||||
|
guidePage: 1,
|
||||||
|
guideHasMore: true,
|
||||||
|
guideLoading: false,
|
||||||
|
guideInited: false,
|
||||||
|
industryPage: 1,
|
||||||
|
industryHasMore: true,
|
||||||
|
industryLoading: false,
|
||||||
|
industryInited: false,
|
||||||
|
investmentPage: 1,
|
||||||
|
investmentHasMore: true,
|
||||||
|
investmentLoading: false,
|
||||||
|
investmentInited: false,
|
||||||
|
shopPage: 1,
|
||||||
|
shopHasMore: true,
|
||||||
|
shopLoading: false,
|
||||||
|
shopInited: false,
|
||||||
|
jiaLouPage: 1,
|
||||||
|
jiaLouHasMore: true,
|
||||||
|
jiaLouLoading: false,
|
||||||
|
jiaLouInited: false,
|
||||||
|
villagePage: 1,
|
||||||
|
villageHasMore: true,
|
||||||
|
villageLoading: false,
|
||||||
|
villageInited: false,
|
||||||
|
saleListInited: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShareAppMessage() {
|
onShareAppMessage() {
|
||||||
@@ -1020,13 +1064,42 @@ export default {
|
|||||||
return {
|
return {
|
||||||
title: this.inn.countyName || this.share.title,
|
title: this.inn.countyName || this.share.title,
|
||||||
path: '/pkg_product/views/famousQianxianShop?id=' + this.id,
|
path: '/pkg_product/views/famousQianxianShop?id=' + this.id,
|
||||||
imageUrl: this.inn.cover || this.share.imageUrl
|
imageUrl: this.detail.logo || this.inn.cover
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 必须在页面加 onPageScroll(e){} ,才能滑动显示背景
|
// 必须在页面加 onPageScroll(e){} ,才能滑动显示背景
|
||||||
onPageScroll(e) {
|
onPageScroll(e) {
|
||||||
this.scrollData = e
|
this.scrollData = e
|
||||||
},
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
if (this.activeIndex === 3) {
|
||||||
|
this.getInfoReq()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.activeIndex === 2) {
|
||||||
|
this.getGuideReq()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.activeIndex !== 0) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.industryTabIndex === 0) {
|
||||||
|
this.getIndustryReq()
|
||||||
|
this.getInvestmentFileReq()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.industryTabIndex === 1) {
|
||||||
|
this.getShopList()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.industryTabIndex === 2) {
|
||||||
|
this.getJiaLouListReq()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.industryTabIndex === 3) {
|
||||||
|
this.getVillageListReq()
|
||||||
|
}
|
||||||
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
const id = options.id || ''
|
const id = options.id || ''
|
||||||
this.id = id
|
this.id = id
|
||||||
@@ -1044,29 +1117,77 @@ export default {
|
|||||||
}
|
}
|
||||||
if (this.partnerId) cookie.set('spread', this.partnerId)
|
if (this.partnerId) cookie.set('spread', this.partnerId)
|
||||||
this.getShopDetailReq()
|
this.getShopDetailReq()
|
||||||
this.getInfoReq()
|
|
||||||
this.getGuideReq()
|
|
||||||
// this.initPoster()
|
|
||||||
this.getListReq()
|
this.getListReq()
|
||||||
this.getSaleListReq()
|
|
||||||
this.queryGuide('countyFamousIndex')
|
this.queryGuide('countyFamousIndex')
|
||||||
this.getCityNewsCategoryReq()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getPageList(data) {
|
||||||
|
if (Array.isArray(data)) {
|
||||||
|
return data
|
||||||
|
}
|
||||||
|
return (data && (data.records || data.list || data.data)) || []
|
||||||
|
},
|
||||||
|
getHasMore(data, list, page) {
|
||||||
|
const pageCount = Number(
|
||||||
|
data && (data.pages || data.totalPage || data.last_page || data.pageCount || 0)
|
||||||
|
)
|
||||||
|
const total = Number(
|
||||||
|
data && (data.total || data.totalCount || data.count || 0)
|
||||||
|
)
|
||||||
|
if (pageCount > 0) {
|
||||||
|
return page < pageCount
|
||||||
|
}
|
||||||
|
if (total > 0) {
|
||||||
|
return page * this.pageSize < total
|
||||||
|
}
|
||||||
|
return list.length >= this.pageSize
|
||||||
|
},
|
||||||
|
getLoadMoreText(loading, hasMore, list) {
|
||||||
|
if (!list.length) return ''
|
||||||
|
if (loading) return '加载中...'
|
||||||
|
if (hasMore) return '上拉加载更多'
|
||||||
|
return '没有更多了'
|
||||||
|
},
|
||||||
|
formatInfoList(list = []) {
|
||||||
|
return list.map(info => {
|
||||||
|
var pt = info.createTime.replace(/-/g, "/")
|
||||||
|
info.year = formatDateTime(pt, 'yyyy')
|
||||||
|
info.monthDay = formatDateTime(pt, 'MM/dd')
|
||||||
|
info.time = formatDateTime(pt, 'HH:mm:ss')
|
||||||
|
info.showMore = false
|
||||||
|
return info
|
||||||
|
})
|
||||||
|
},
|
||||||
|
formatGuideList(list = []) {
|
||||||
|
return list.map((info) => {
|
||||||
|
var pt = info.createTime.replace(/-/g, "/")
|
||||||
|
info.year = formatDateTime(pt, 'yyyy')
|
||||||
|
info.monthDay = formatDateTime(pt, 'MM/dd')
|
||||||
|
info.time = formatDateTime(pt, 'HH:mm:ss')
|
||||||
|
return info
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 获取县城资讯类别
|
* 获取县城资讯类别
|
||||||
*/
|
*/
|
||||||
getCityNewsCategoryReq() {
|
getCityNewsCategoryReq() {
|
||||||
getCityNewsCategory().then(res => {
|
if (this.newsCategoryInited || this.newsCategoryLoading) {
|
||||||
|
return Promise.resolve()
|
||||||
|
}
|
||||||
|
this.newsCategoryLoading = true
|
||||||
|
return getCityNewsCategory().then(res => {
|
||||||
if(res.status === 200) {
|
if(res.status === 200) {
|
||||||
this.newsCategoryList = [{name: '全部', id: ''}].concat(res.data || [])
|
this.newsCategoryList = [{name: '全部', id: ''}].concat(res.data || [])
|
||||||
|
this.newsCategoryInited = true
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.newsCategoryLoading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
changeNewsTab(index) {
|
changeNewsTab(index) {
|
||||||
if (this.newsCurrent === index) return
|
if (this.newsCurrent === index) return
|
||||||
this.newsCurrent = index
|
this.newsCurrent = index
|
||||||
this.getInfoReq()
|
this.getInfoReq(true)
|
||||||
},
|
},
|
||||||
formatterTime(time) {
|
formatterTime(time) {
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
@@ -1229,27 +1350,18 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.saleActived = e.id
|
this.saleActived = e.id
|
||||||
}
|
}
|
||||||
|
this.getVillageListReq(true)
|
||||||
getCountyFamousVillage({
|
|
||||||
countyFamousDataId: this.id,
|
|
||||||
categoryId: this.saleActived,
|
|
||||||
page: 1,
|
|
||||||
limit: 9999
|
|
||||||
}).then(res => {
|
|
||||||
const { success, data } = res
|
|
||||||
if (success) {
|
|
||||||
this.villageList = data.records || []
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
getSaleListReq() {
|
getSaleListReq() {
|
||||||
const params = {
|
if (this.saleListInited) {
|
||||||
countyFamousDataId: this.id,
|
return Promise.resolve()
|
||||||
page: 1,
|
|
||||||
limit: 9999
|
|
||||||
}
|
}
|
||||||
getSaleList(params).then(res => {
|
const params = {
|
||||||
|
countyFamousDataId: this.id
|
||||||
|
}
|
||||||
|
return getSaleList(params).then(res => {
|
||||||
this.saleList = [{name: '全部', id: ''}].concat(res.data || [])
|
this.saleList = [{name: '全部', id: ''}].concat(res.data || [])
|
||||||
|
this.saleListInited = true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goStore(item) {
|
goStore(item) {
|
||||||
@@ -1276,49 +1388,9 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getListReq(id) {
|
getListReq() {
|
||||||
// getPoster(this.id).then(({data}) => this.posterUrl = data)
|
this.getIndustryReq(true)
|
||||||
getCountyFamousIndustry({
|
this.getInvestmentFileReq(true)
|
||||||
countyFamousDataId: this.id,
|
|
||||||
page: 1,
|
|
||||||
limit: 9999
|
|
||||||
}).then(res => {
|
|
||||||
const { success, data } = res
|
|
||||||
if (success) {
|
|
||||||
this.industryList = data.records || []
|
|
||||||
}
|
|
||||||
})
|
|
||||||
getCountyFamousIndustryProject({
|
|
||||||
countyFamousDataId: this.id,
|
|
||||||
page: 1,
|
|
||||||
limit: 9999
|
|
||||||
}).then(res => {
|
|
||||||
const { success, data } = res
|
|
||||||
if (success) {
|
|
||||||
this.industryProjectList = data.records || []
|
|
||||||
}
|
|
||||||
})
|
|
||||||
getCountyFamousInvestmentFile({
|
|
||||||
countyFamousDataId: this.id,
|
|
||||||
page: 1,
|
|
||||||
limit: 9999
|
|
||||||
}).then(res => {
|
|
||||||
const { success, data } = res
|
|
||||||
if (success) {
|
|
||||||
this.investmentFileList = data.records || []
|
|
||||||
}
|
|
||||||
})
|
|
||||||
getCountyFamousVillage({
|
|
||||||
countyFamousDataId: this.id,
|
|
||||||
categoryId: id,
|
|
||||||
page: 1,
|
|
||||||
limit: 9999
|
|
||||||
}).then(res => {
|
|
||||||
const { success, data } = res
|
|
||||||
if (success) {
|
|
||||||
this.villageList = data.records || []
|
|
||||||
}
|
|
||||||
})
|
|
||||||
getCountyFamousCityDetail(this.id).then(res => {
|
getCountyFamousCityDetail(this.id).then(res => {
|
||||||
const { success, data } = res
|
const { success, data } = res
|
||||||
if (success) {
|
if (success) {
|
||||||
@@ -1405,34 +1477,38 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 资讯
|
// 资讯
|
||||||
getInfoReq() {
|
getInfoReq(reset = false) {
|
||||||
const _this = this
|
const _this = this
|
||||||
if (_this.loading) {
|
if (_this.infoLoading) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!reset && !_this.infoHasMore) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
_this.isLoadInfoListSuccess = false
|
_this.isLoadInfoListSuccess = false
|
||||||
_this.loading = true
|
_this.infoLoading = true
|
||||||
_this.infoArray = []
|
const page = reset ? 1 : _this.infoPage
|
||||||
|
if (reset) {
|
||||||
|
_this.infoPage = 1
|
||||||
|
_this.infoHasMore = true
|
||||||
|
_this.infoArray = []
|
||||||
|
}
|
||||||
const categoryId = this.newsCategoryList[this.newsCurrent] ? this.newsCategoryList[this.newsCurrent].id : ''
|
const categoryId = this.newsCategoryList[this.newsCurrent] ? this.newsCategoryList[this.newsCurrent].id : ''
|
||||||
getCountyFamousCityNews({
|
getCountyFamousCityNews({
|
||||||
page: 1,
|
page,
|
||||||
limit: 9999,
|
limit: this.pageSize,
|
||||||
countyFamousDataId: _this.id,
|
countyFamousDataId: _this.id,
|
||||||
categoryId: categoryId
|
categoryId: categoryId
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
const { data } = res
|
const { data } = res
|
||||||
_this.loading = false
|
const list = _this.formatInfoList(_this.getPageList(data))
|
||||||
_this.infoArray.push.apply(_this.infoArray, _this.toTop(data.records).map((info) => {
|
const merged = page === 1 ? list : _this.infoArray.concat(list)
|
||||||
var pt = info.createTime.replace(/-/g, "/")
|
_this.infoArray = _this.toTop(merged)
|
||||||
info.year = formatDateTime(pt, 'yyyy')
|
_this.infoHasMore = _this.getHasMore(data, list, page)
|
||||||
info.monthDay = formatDateTime(pt, 'MM/dd')
|
_this.infoPage = page + 1
|
||||||
info.time = formatDateTime(pt, 'HH:mm:ss')
|
_this.infoInited = true
|
||||||
info.showMore = false
|
|
||||||
return info
|
|
||||||
}))
|
|
||||||
// console.log(this.toTop(_this.infoArray));
|
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
_this.loading = false
|
_this.infoLoading = false
|
||||||
_this.isLoadInfoListSuccess = true
|
_this.isLoadInfoListSuccess = true
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
})
|
})
|
||||||
@@ -1443,30 +1519,35 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 攻略
|
// 攻略
|
||||||
getGuideReq() {
|
getGuideReq(reset = false) {
|
||||||
const _this = this
|
const _this = this
|
||||||
if (_this.loading) {
|
if (_this.guideLoading) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!reset && !_this.guideHasMore) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
_this.isLoadGuideListoSuccess = false
|
_this.isLoadGuideListoSuccess = false
|
||||||
_this.loading = true
|
_this.guideLoading = true
|
||||||
_this.guideList = []
|
const page = reset ? 1 : _this.guidePage
|
||||||
|
if (reset) {
|
||||||
|
_this.guidePage = 1
|
||||||
|
_this.guideHasMore = true
|
||||||
|
_this.guideList = []
|
||||||
|
}
|
||||||
getCountyFamousCityGuide({
|
getCountyFamousCityGuide({
|
||||||
page: 1,
|
page,
|
||||||
limit: 9999,
|
limit: this.pageSize,
|
||||||
countyFamousDataId: _this.id
|
countyFamousDataId: _this.id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
const { data } = res
|
const { data } = res
|
||||||
_this.loading = false
|
const list = _this.formatGuideList(_this.getPageList(data))
|
||||||
_this.guideList.push.apply(_this.guideList, data.records.map((info) => {
|
_this.guideList = page === 1 ? list : _this.guideList.concat(list)
|
||||||
var pt = info.createTime.replace(/-/g, "/")
|
_this.guideHasMore = _this.getHasMore(data, list, page)
|
||||||
info.year = formatDateTime(pt, 'yyyy')
|
_this.guidePage = page + 1
|
||||||
info.monthDay = formatDateTime(pt, 'MM/dd')
|
_this.guideInited = true
|
||||||
info.time = formatDateTime(pt, 'HH:mm:ss')
|
|
||||||
return info
|
|
||||||
}))
|
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
_this.loading = false
|
_this.guideLoading = false
|
||||||
_this.isLoadGuideListoSuccess = true
|
_this.isLoadGuideListoSuccess = true
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
})
|
})
|
||||||
@@ -1478,10 +1559,35 @@ export default {
|
|||||||
// 刷新数据
|
// 刷新数据
|
||||||
switch (this.activeIndex) {
|
switch (this.activeIndex) {
|
||||||
case 3:
|
case 3:
|
||||||
this.getInfoReq()
|
this.getCityNewsCategoryReq().finally(() => {
|
||||||
|
if (!this.infoInited) {
|
||||||
|
this.getInfoReq(true)
|
||||||
|
}
|
||||||
|
})
|
||||||
break
|
break
|
||||||
case 2:
|
case 2:
|
||||||
this.getGuideReq()
|
if (!this.guideInited) {
|
||||||
|
this.getGuideReq(true)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 0:
|
||||||
|
if (this.industryTabIndex === 1) {
|
||||||
|
if (!this.shopTypeInited) {
|
||||||
|
this.getShopTypeList()
|
||||||
|
}
|
||||||
|
if (!this.shopInited) {
|
||||||
|
this.getShopList(true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.industryTabIndex === 2 && !this.jiaLouInited) {
|
||||||
|
this.getJiaLouListReq(true)
|
||||||
|
}
|
||||||
|
if (this.industryTabIndex === 3) {
|
||||||
|
this.getSaleListReq()
|
||||||
|
if (!this.villageInited) {
|
||||||
|
this.getVillageListReq(true)
|
||||||
|
}
|
||||||
|
}
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
break
|
break
|
||||||
@@ -1726,26 +1832,30 @@ export default {
|
|||||||
if (index === this.industryTabIndex) return
|
if (index === this.industryTabIndex) return
|
||||||
this.industryTabIndex = index
|
this.industryTabIndex = index
|
||||||
if (index === 2) {
|
if (index === 2) {
|
||||||
const params = {
|
if (!this.jiaLouInited) {
|
||||||
countyId: this.countyId,
|
this.getJiaLouListReq(true)
|
||||||
shopType: 'countyFamous',
|
|
||||||
name: '',
|
|
||||||
page: 1,
|
|
||||||
limit: 9999
|
|
||||||
}
|
}
|
||||||
getJiaLouList(params).then(res => {
|
|
||||||
this.jiaLouList = res.data.records || []
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
if (index === 1) {
|
if (index === 1) {
|
||||||
this.shopTypeActive = ''
|
this.shopTypeActive = ''
|
||||||
if (this.shopTypeList.length === 0) {
|
if (this.shopTypeList.length === 0) {
|
||||||
this.getShopTypeList()
|
this.getShopTypeList()
|
||||||
}
|
}
|
||||||
this.getShopList()
|
if (!this.shopInited) {
|
||||||
|
this.getShopList(true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (index === 3) {
|
||||||
|
this.getSaleListReq()
|
||||||
|
if (!this.villageInited) {
|
||||||
|
this.getVillageListReq(true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getShopTypeList() {
|
getShopTypeList() {
|
||||||
|
if (this.shopTypeInited) {
|
||||||
|
return
|
||||||
|
}
|
||||||
getCountyFamousHotelType({
|
getCountyFamousHotelType({
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 9999
|
limit: 9999
|
||||||
@@ -1754,25 +1864,170 @@ export default {
|
|||||||
? res.data
|
? res.data
|
||||||
: (res.data && (res.data.hotelTypeList || res.data.list || res.data.records)) || []
|
: (res.data && (res.data.hotelTypeList || res.data.list || res.data.records)) || []
|
||||||
this.shopTypeList = [{ name: '全部', id: '' }].concat(listData || [])
|
this.shopTypeList = [{ name: '全部', id: '' }].concat(listData || [])
|
||||||
|
this.shopTypeInited = true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getShopList() {
|
getIndustryReq(reset = false) {
|
||||||
|
if (this.industryLoading) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!reset && !this.industryHasMore) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const page = reset ? 1 : this.industryPage
|
||||||
|
if (reset) {
|
||||||
|
this.industryPage = 1
|
||||||
|
this.industryHasMore = true
|
||||||
|
this.industryList = []
|
||||||
|
}
|
||||||
|
this.industryLoading = true
|
||||||
|
getCountyFamousIndustry({
|
||||||
|
countyFamousDataId: this.id,
|
||||||
|
page,
|
||||||
|
limit: this.pageSize
|
||||||
|
}).then(res => {
|
||||||
|
const { success, data } = res
|
||||||
|
if (success) {
|
||||||
|
const list = this.getPageList(data)
|
||||||
|
this.industryList = page === 1 ? list : this.industryList.concat(list)
|
||||||
|
this.industryHasMore = this.getHasMore(data, list, page)
|
||||||
|
this.industryPage = page + 1
|
||||||
|
this.industryInited = true
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.industryLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getInvestmentFileReq(reset = false) {
|
||||||
|
if (this.investmentLoading) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!reset && !this.investmentHasMore) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const page = reset ? 1 : this.investmentPage
|
||||||
|
if (reset) {
|
||||||
|
this.investmentPage = 1
|
||||||
|
this.investmentHasMore = true
|
||||||
|
this.investmentFileList = []
|
||||||
|
}
|
||||||
|
this.investmentLoading = true
|
||||||
|
getCountyFamousInvestmentFile({
|
||||||
|
countyFamousDataId: this.id,
|
||||||
|
page,
|
||||||
|
limit: this.pageSize
|
||||||
|
}).then(res => {
|
||||||
|
const { success, data } = res
|
||||||
|
if (success) {
|
||||||
|
const list = this.getPageList(data)
|
||||||
|
this.investmentFileList = page === 1 ? list : this.investmentFileList.concat(list)
|
||||||
|
this.investmentHasMore = this.getHasMore(data, list, page)
|
||||||
|
this.investmentPage = page + 1
|
||||||
|
this.investmentInited = true
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.investmentLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getJiaLouListReq(reset = false) {
|
||||||
|
if (this.jiaLouLoading || !this.countyId) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!reset && !this.jiaLouHasMore) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const page = reset ? 1 : this.jiaLouPage
|
||||||
|
if (reset) {
|
||||||
|
this.jiaLouPage = 1
|
||||||
|
this.jiaLouHasMore = true
|
||||||
|
this.jiaLouList = []
|
||||||
|
}
|
||||||
|
this.jiaLouLoading = true
|
||||||
|
const params = {
|
||||||
|
countyId: this.countyId,
|
||||||
|
shopType: 'countyFamous',
|
||||||
|
name: '',
|
||||||
|
page,
|
||||||
|
limit: this.pageSize
|
||||||
|
}
|
||||||
|
getJiaLouList(params).then(res => {
|
||||||
|
const list = this.getPageList(res.data)
|
||||||
|
this.jiaLouList = page === 1 ? list : this.jiaLouList.concat(list)
|
||||||
|
this.jiaLouHasMore = this.getHasMore(res.data, list, page)
|
||||||
|
this.jiaLouPage = page + 1
|
||||||
|
this.jiaLouInited = true
|
||||||
|
}).finally(() => {
|
||||||
|
this.jiaLouLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getShopList(reset = false) {
|
||||||
|
if (this.shopLoading) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!reset && !this.shopHasMore) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const page = reset ? 1 : this.shopPage
|
||||||
|
if (reset) {
|
||||||
|
this.shopPage = 1
|
||||||
|
this.shopHasMore = true
|
||||||
|
this.shopList = []
|
||||||
|
}
|
||||||
const params = {
|
const params = {
|
||||||
countyFamousDataId: this.id,
|
countyFamousDataId: this.id,
|
||||||
page: 1,
|
page,
|
||||||
limit: 9999
|
limit: this.pageSize
|
||||||
}
|
}
|
||||||
if (this.shopTypeActive) {
|
if (this.shopTypeActive) {
|
||||||
params.countyFamousHotelType = this.shopTypeActive
|
params.countyFamousHotelType = this.shopTypeActive
|
||||||
}
|
}
|
||||||
|
this.shopLoading = true
|
||||||
getCityShopList(params).then(res => {
|
getCityShopList(params).then(res => {
|
||||||
this.shopList = (res.data && (res.data.records || res.data.list)) || []
|
const list = this.getPageList(res.data)
|
||||||
|
this.shopList = page === 1 ? list : this.shopList.concat(list)
|
||||||
|
this.shopHasMore = this.getHasMore(res.data, list, page)
|
||||||
|
this.shopPage = page + 1
|
||||||
|
this.shopInited = true
|
||||||
|
}).finally(() => {
|
||||||
|
this.shopLoading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleShopType(type) {
|
handleShopType(type) {
|
||||||
if (this.shopTypeActive === type.id) return
|
if (this.shopTypeActive === type.id) return
|
||||||
this.shopTypeActive = type.id
|
this.shopTypeActive = type.id
|
||||||
this.getShopList()
|
this.getShopList(true)
|
||||||
|
},
|
||||||
|
getVillageListReq(reset = false) {
|
||||||
|
if (this.villageLoading) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!reset && !this.villageHasMore) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const page = reset ? 1 : this.villagePage
|
||||||
|
if (reset) {
|
||||||
|
this.villagePage = 1
|
||||||
|
this.villageHasMore = true
|
||||||
|
this.villageList = []
|
||||||
|
}
|
||||||
|
this.villageLoading = true
|
||||||
|
getCountyFamousVillage({
|
||||||
|
countyFamousDataId: this.id,
|
||||||
|
categoryId: this.saleActived,
|
||||||
|
page,
|
||||||
|
limit: this.pageSize
|
||||||
|
}).then(res => {
|
||||||
|
const { success, data } = res
|
||||||
|
if (success) {
|
||||||
|
const list = this.getPageList(data)
|
||||||
|
this.villageList = page === 1 ? list : this.villageList.concat(list)
|
||||||
|
this.villageHasMore = this.getHasMore(data, list, page)
|
||||||
|
this.villagePage = page + 1
|
||||||
|
this.villageInited = true
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.villageLoading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
fileItemClick(file) {
|
fileItemClick(file) {
|
||||||
const url = file.attachment || ''
|
const url = file.attachment || ''
|
||||||
@@ -1900,6 +2155,12 @@ export default {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.load-more-status{
|
||||||
|
padding: 24rpx 0 8rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
.video-item {
|
.video-item {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 400rpx;
|
height: 400rpx;
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="gift-page">
|
<view class="gift-page">
|
||||||
<view class="banner" @click="linkTo">
|
<view class="banner" @click="linkTo">
|
||||||
<rich-text :nodes="topBannerHtml" />
|
<view v-if="topBannerImage" class="banner-image-wrap">
|
||||||
|
<image
|
||||||
|
:src="topBannerImage"
|
||||||
|
class="banner-img"
|
||||||
|
mode="aspectFill"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="province-enter-wrap">
|
<view class="province-enter-wrap">
|
||||||
<view
|
<view
|
||||||
@@ -60,7 +66,13 @@
|
|||||||
class="item"
|
class="item"
|
||||||
>
|
>
|
||||||
<view class="bg" @click="provinceItemClick(item)">
|
<view class="bg" @click="provinceItemClick(item)">
|
||||||
<rich-text :nodes="item.bgHtml" />
|
<!-- <rich-text :nodes="item.bgHtml" /> -->
|
||||||
|
<image
|
||||||
|
:src="item.backgroundImage"
|
||||||
|
class="bg-img"
|
||||||
|
mode="widthFix|aspectFill"
|
||||||
|
lazy-load
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view class="good-list">
|
<view class="good-list">
|
||||||
<view
|
<view
|
||||||
@@ -70,7 +82,7 @@
|
|||||||
@click.stop="goodItemClick(goodItem)"
|
@click.stop="goodItemClick(goodItem)"
|
||||||
>
|
>
|
||||||
<view class="good-img">
|
<view class="good-img">
|
||||||
<image :src="goodItem.productImage" class="img" />
|
<image :src="goodItem.productImage" class="img" lazy-load />
|
||||||
</view>
|
</view>
|
||||||
<view class="name">
|
<view class="name">
|
||||||
{{ goodItem.productName }}
|
{{ goodItem.productName }}
|
||||||
@@ -97,7 +109,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
provinceList: [],
|
provinceList: [],
|
||||||
topBannerHtml: '',
|
topBannerImage: '',
|
||||||
topBannerUrl: '',
|
topBannerUrl: '',
|
||||||
toggleStatus: false,
|
toggleStatus: false,
|
||||||
pageKeyId: Object.freeze('customizedGiftIndex')
|
pageKeyId: Object.freeze('customizedGiftIndex')
|
||||||
@@ -111,7 +123,7 @@ export default {
|
|||||||
customizedGift().then(res => {
|
customizedGift().then(res => {
|
||||||
const { success, data } = res
|
const { success, data } = res
|
||||||
if (success) {
|
if (success) {
|
||||||
this.topBannerHtml = `<img src="${data.topBanner.image}" style="display: block;max-width: 100%;">`
|
this.topBannerImage = data.topBanner.image || ''
|
||||||
this.topBannerUrl = data.topBanner.appUrl || ''
|
this.topBannerUrl = data.topBanner.appUrl || ''
|
||||||
const list = data.cities || []
|
const list = data.cities || []
|
||||||
if (list.length > 0) {
|
if (list.length > 0) {
|
||||||
@@ -120,7 +132,7 @@ export default {
|
|||||||
if (backgroundImage && item.productList.length > 0) {
|
if (backgroundImage && item.productList.length > 0) {
|
||||||
this.provinceList.push({
|
this.provinceList.push({
|
||||||
...item,
|
...item,
|
||||||
bgHtml: `<img src="${item.backgroundImage}" style="display: block;max-width: 100%;">`
|
backgroundImage
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -164,6 +176,21 @@ export default {
|
|||||||
.banner {
|
.banner {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
.banner-image-wrap {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
padding-top: 46%;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #f6f6f6;
|
||||||
|
}
|
||||||
|
.banner-img {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.province-enter-wrap {
|
.province-enter-wrap {
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -243,6 +270,15 @@ export default {
|
|||||||
.bg {
|
.bg {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
background-color: #f6f6f6;
|
||||||
|
.bg-img {
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.good-list {
|
.good-list {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -164,10 +164,13 @@
|
|||||||
<image :src="webUrl + '/orderIcon/微信图片_20241009220552.png'" mode="widthFix"></image>
|
<image :src="webUrl + '/orderIcon/微信图片_20241009220552.png'" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-if="items.length > 0" class="load-more-status">
|
||||||
|
{{ loading ? '加载中...' : (hasMore ? '上拉加载更多' : '没有更多了') }}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getCategory,getWellnessPlace } from '@/api/health'
|
import { getCategory } from '@/api/health'
|
||||||
import { getJiaLouList } from '@/api/qianxian'
|
import { getJiaLouList } from '@/api/qianxian'
|
||||||
import { getWellnessTopImage } from '@/api/health'
|
import { getWellnessTopImage } from '@/api/health'
|
||||||
export default {
|
export default {
|
||||||
@@ -176,12 +179,15 @@ export default {
|
|||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
tabs: [],
|
tabs: [],
|
||||||
items: [],
|
items: [],
|
||||||
traveItems: [],
|
|
||||||
actived: 0,
|
actived: 0,
|
||||||
cityId: '',
|
cityId: '',
|
||||||
cityName: '',
|
cityName: '',
|
||||||
categoryId: null,
|
categoryId: null,
|
||||||
topImageConfig: {}
|
topImageConfig: {},
|
||||||
|
page: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
loading: false,
|
||||||
|
hasMore: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -208,11 +214,13 @@ export default {
|
|||||||
getCategory().then(res => {
|
getCategory().then(res => {
|
||||||
this.tabs = res.data
|
this.tabs = res.data
|
||||||
this.categoryId = res.data[0].id
|
this.categoryId = res.data[0].id
|
||||||
this.getList()
|
this.getList(true)
|
||||||
})
|
})
|
||||||
this.getTop()
|
|
||||||
this.getTopImage()
|
this.getTopImage()
|
||||||
},
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
// uni.navigateBack({
|
// uni.navigateBack({
|
||||||
// delta: 0
|
// delta: 0
|
||||||
@@ -220,9 +228,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleTab(index, tab) {
|
handleTab(index, tab) {
|
||||||
|
if (this.actived === index) return
|
||||||
this.actived = index
|
this.actived = index
|
||||||
this.categoryId = tab.id
|
this.categoryId = tab.id
|
||||||
this.getList()
|
this.getList(true)
|
||||||
},
|
},
|
||||||
toSanctun() {
|
toSanctun() {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
@@ -234,18 +243,52 @@ export default {
|
|||||||
url: '/pkg_product/views/healthFoods?city=' + this.cityId + '&cityName=' + this.cityName
|
url: '/pkg_product/views/healthFoods?city=' + this.cityId + '&cityName=' + this.cityName
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getList() {
|
getPageList(data) {
|
||||||
|
if (Array.isArray(data)) {
|
||||||
|
return data
|
||||||
|
}
|
||||||
|
return (data && (data.records || data.list || data.data)) || []
|
||||||
|
},
|
||||||
|
getHasMore(data, list, page) {
|
||||||
|
const pageCount = Number(
|
||||||
|
data && (data.pages || data.totalPage || data.last_page || data.pageCount || 0)
|
||||||
|
)
|
||||||
|
const total = Number(
|
||||||
|
data && (data.total || data.totalCount || data.count || 0)
|
||||||
|
)
|
||||||
|
if (pageCount > 0) {
|
||||||
|
return page < pageCount
|
||||||
|
}
|
||||||
|
if (total > 0) {
|
||||||
|
return page * this.pageSize < total
|
||||||
|
}
|
||||||
|
return list.length >= this.pageSize
|
||||||
|
},
|
||||||
|
getList(reset = false) {
|
||||||
|
if (this.loading) return
|
||||||
|
if (!reset && !this.hasMore) return
|
||||||
|
const page = reset ? 1 : this.page
|
||||||
|
if (reset) {
|
||||||
|
this.page = 1
|
||||||
|
this.hasMore = true
|
||||||
|
this.items = []
|
||||||
|
}
|
||||||
const params = {
|
const params = {
|
||||||
// countyId: this.cityId,
|
// countyId: this.cityId,
|
||||||
goodCityId: this.cityId,
|
goodCityId: this.cityId,
|
||||||
wellnessPlaceCateId : this.categoryId,
|
wellnessPlaceCateId : this.categoryId,
|
||||||
shopType: 'wellnessCate',
|
shopType: 'wellnessCate',
|
||||||
page: 1,
|
page,
|
||||||
limit: 9999
|
limit: this.pageSize
|
||||||
}
|
}
|
||||||
|
this.loading = true
|
||||||
getJiaLouList(params).then(res => {
|
getJiaLouList(params).then(res => {
|
||||||
// console.log(res);
|
const list = this.getPageList(res.data)
|
||||||
this.items = res.data.records
|
this.items = page === 1 ? list : this.items.concat(list)
|
||||||
|
this.hasMore = this.getHasMore(res.data, list, page)
|
||||||
|
this.page = page + 1
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
search() {
|
search() {
|
||||||
@@ -253,18 +296,6 @@ export default {
|
|||||||
url: '/pkg_product/views/healthSearch?city=' + this.cityId + '&cityName=' + this.cityName
|
url: '/pkg_product/views/healthSearch?city=' + this.cityId + '&cityName=' + this.cityName
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getTop() {
|
|
||||||
const params = {
|
|
||||||
goodCityId: this.cityId,
|
|
||||||
shopType: 'wellnessTop',
|
|
||||||
page: 1,
|
|
||||||
limit: 9999
|
|
||||||
}
|
|
||||||
getJiaLouList(params).then(res => {
|
|
||||||
// console.log(res);
|
|
||||||
this.traveItems = res.data.records
|
|
||||||
})
|
|
||||||
},
|
|
||||||
toStore(item) {
|
toStore(item) {
|
||||||
if(item.dataType === 'wellnessPlace'){
|
if(item.dataType === 'wellnessPlace'){
|
||||||
this.$yrouter.push({
|
this.$yrouter.push({
|
||||||
@@ -436,4 +467,10 @@ export default {
|
|||||||
border-radius: 100rpx;
|
border-radius: 100rpx;
|
||||||
padding: 4rpx 20rpx;
|
padding: 4rpx 20rpx;
|
||||||
}
|
}
|
||||||
|
.load-more-status{
|
||||||
|
padding: 24rpx 0 40rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -134,24 +134,27 @@
|
|||||||
<image :src="webUrl + '/orderIcon/微信图片_20241009220552.png'" mode="widthFix"></image>
|
<image :src="webUrl + '/orderIcon/微信图片_20241009220552.png'" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-if="items.length > 0" class="load-more-status">
|
||||||
|
{{ loading ? '加载中...' : (hasMore ? '上拉加载更多' : '没有更多了') }}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getCategory,getWellnessPlace } from '@/api/health'
|
|
||||||
import { getJiaLouList } from '@/api/qianxian'
|
import { getJiaLouList } from '@/api/qianxian'
|
||||||
import { getWellnessTopImage } from '@/api/health'
|
import { getWellnessTopImage } from '@/api/health'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
tabs: [],
|
|
||||||
items: [],
|
items: [],
|
||||||
traveItems: [],
|
traveItems: [],
|
||||||
actived: 0,
|
|
||||||
cityId: '',
|
cityId: '',
|
||||||
cityName: '',
|
cityName: '',
|
||||||
categoryId: null,
|
topImageConfig: {},
|
||||||
topImageConfig: {}
|
page: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
loading: false,
|
||||||
|
hasMore: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -175,41 +178,69 @@ export default {
|
|||||||
|
|
||||||
this.cityId = opts.city
|
this.cityId = opts.city
|
||||||
this.cityName = decodeURIComponent(decodeURIComponent(opts.cityName))
|
this.cityName = decodeURIComponent(decodeURIComponent(opts.cityName))
|
||||||
getCategory().then(res => {
|
this.getList(true)
|
||||||
this.tabs = res.data
|
|
||||||
this.categoryId = res.data[0].id
|
|
||||||
this.getList()
|
|
||||||
})
|
|
||||||
this.getTop()
|
this.getTop()
|
||||||
this.getTopImage()
|
this.getTopImage()
|
||||||
},
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
// uni.navigateBack({
|
// uni.navigateBack({
|
||||||
// delta: 0
|
// delta: 0
|
||||||
// })
|
// })
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleTab(index, tab) {
|
|
||||||
this.actived = index
|
|
||||||
this.categoryId = tab.id
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
toFoods() {
|
toFoods() {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/pkg_product/views/healthFoods?city=' + this.cityId + '&cityName=' + this.cityName
|
url: '/pkg_product/views/healthFoods?city=' + this.cityId + '&cityName=' + this.cityName
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getList() {
|
getPageList(data) {
|
||||||
|
if (Array.isArray(data)) {
|
||||||
|
return data
|
||||||
|
}
|
||||||
|
return (data && (data.records || data.list || data.data)) || []
|
||||||
|
},
|
||||||
|
getHasMore(data, list, page) {
|
||||||
|
const pageCount = Number(
|
||||||
|
data && (data.pages || data.totalPage || data.last_page || data.pageCount || 0)
|
||||||
|
)
|
||||||
|
const total = Number(
|
||||||
|
data && (data.total || data.totalCount || data.count || 0)
|
||||||
|
)
|
||||||
|
if (pageCount > 0) {
|
||||||
|
return page < pageCount
|
||||||
|
}
|
||||||
|
if (total > 0) {
|
||||||
|
return page * this.pageSize < total
|
||||||
|
}
|
||||||
|
return list.length >= this.pageSize
|
||||||
|
},
|
||||||
|
getList(reset = false) {
|
||||||
|
if (this.loading) return
|
||||||
|
if (!reset && !this.hasMore) return
|
||||||
|
const page = reset ? 1 : this.page
|
||||||
|
if (reset) {
|
||||||
|
this.page = 1
|
||||||
|
this.hasMore = true
|
||||||
|
this.items = []
|
||||||
|
}
|
||||||
const params = {
|
const params = {
|
||||||
// countyId: this.cityId,
|
// countyId: this.cityId,
|
||||||
goodCityId: this.cityId,
|
goodCityId: this.cityId,
|
||||||
shopType: 'wellnessTravel',
|
shopType: 'wellnessTravel',
|
||||||
page: 1,
|
page,
|
||||||
limit: 9999
|
limit: this.pageSize
|
||||||
}
|
}
|
||||||
|
this.loading = true
|
||||||
getJiaLouList(params).then(res => {
|
getJiaLouList(params).then(res => {
|
||||||
// console.log(res);
|
const list = this.getPageList(res.data)
|
||||||
this.items = res.data.records
|
this.items = page === 1 ? list : this.items.concat(list)
|
||||||
|
this.hasMore = this.getHasMore(res.data, list, page)
|
||||||
|
this.page = page + 1
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
search() {
|
search() {
|
||||||
@@ -222,11 +253,10 @@ export default {
|
|||||||
goodCityId: this.cityId,
|
goodCityId: this.cityId,
|
||||||
shopType: 'wellnessTop',
|
shopType: 'wellnessTop',
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 9999
|
limit: 10
|
||||||
}
|
}
|
||||||
getJiaLouList(params).then(res => {
|
getJiaLouList(params).then(res => {
|
||||||
// console.log(res);
|
this.traveItems = this.getPageList(res.data)
|
||||||
this.traveItems = res.data.records
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
toStore(item) {
|
toStore(item) {
|
||||||
@@ -390,4 +420,10 @@ export default {
|
|||||||
border-radius: 6rpx;
|
border-radius: 6rpx;
|
||||||
bottom: 5rpx;
|
bottom: 5rpx;
|
||||||
}
|
}
|
||||||
|
.load-more-status{
|
||||||
|
padding: 24rpx 0 40rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,9 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="pkg-product-heritage">
|
<view class="pkg-product-heritage">
|
||||||
<image style="width: 100%" :src="topImage" mode="widthFix" />
|
<view class="top-image-wrap">
|
||||||
|
<image
|
||||||
|
style="width: 100%"
|
||||||
|
:src="topImage"
|
||||||
|
mode="widthFix"
|
||||||
|
:class="{ loaded: topImageLoaded }"
|
||||||
|
class="top-image"
|
||||||
|
@load="handleTopImageLoad"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
<view class="main-box" id="main-box">
|
<view class="main-box" id="main-box">
|
||||||
<image style="width: 100%" :src="backgroundImage" mode="widthFix" @load="loadImg" />
|
<view class="bg-image-wrap">
|
||||||
|
<image
|
||||||
|
style="width: 100%"
|
||||||
|
:src="backgroundImage"
|
||||||
|
mode="widthFix"
|
||||||
|
class="bg-image"
|
||||||
|
:class="{ loaded: bgImageLoaded }"
|
||||||
|
@load="loadImg"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
<view
|
<view
|
||||||
|
v-if="showItems"
|
||||||
class="item"
|
class="item"
|
||||||
:style="{ left: item.gx + 'rpx', top: item.gy + 'rpx' }"
|
:style="{ left: item.gx + 'rpx', top: item.gy + 'rpx' }"
|
||||||
v-for="(item, index) in contents"
|
v-for="(item, index) in contents"
|
||||||
@@ -14,6 +33,7 @@
|
|||||||
class="img-item"
|
class="img-item"
|
||||||
:src="item.image"
|
:src="item.image"
|
||||||
:class="{ unlink: !item.isLink }"
|
:class="{ unlink: !item.isLink }"
|
||||||
|
lazy-load
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@@ -40,6 +60,9 @@ export default {
|
|||||||
topImage: "",
|
topImage: "",
|
||||||
backgroundImage: "",
|
backgroundImage: "",
|
||||||
bgImgWidth: 0,
|
bgImgWidth: 0,
|
||||||
|
topImageLoaded: false,
|
||||||
|
bgImageLoaded: false,
|
||||||
|
showItems: false,
|
||||||
pageKeyId: Object.freeze("ichIndex"),
|
pageKeyId: Object.freeze("ichIndex"),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -53,7 +76,14 @@ export default {
|
|||||||
this.queryGuide('ichIndex')
|
this.queryGuide('ichIndex')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleTopImageLoad() {
|
||||||
|
this.topImageLoaded = true
|
||||||
|
},
|
||||||
loadImg(e) {
|
loadImg(e) {
|
||||||
|
this.bgImageLoaded = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.showItems = true
|
||||||
|
})
|
||||||
this.queryGuide('ichIndex')
|
this.queryGuide('ichIndex')
|
||||||
},
|
},
|
||||||
showFunctionGuide() {
|
showFunctionGuide() {
|
||||||
@@ -125,6 +155,9 @@ export default {
|
|||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
getICH().then(({ data }) => {
|
getICH().then(({ data }) => {
|
||||||
|
this.topImageLoaded = false
|
||||||
|
this.bgImageLoaded = false
|
||||||
|
this.showItems = false
|
||||||
this.contents = data.contents;
|
this.contents = data.contents;
|
||||||
this.topImage = data.topImage;
|
this.topImage = data.topImage;
|
||||||
this.backgroundImage = data.backgroundImage;
|
this.backgroundImage = data.backgroundImage;
|
||||||
@@ -178,6 +211,24 @@ export default {
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.top-image-wrap,
|
||||||
|
.bg-image-wrap {
|
||||||
|
background: #f6f6f6;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-image,
|
||||||
|
.bg-image {
|
||||||
|
display: block;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity .25s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-image.loaded,
|
||||||
|
.bg-image.loaded {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
.main-box {
|
.main-box {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
@@ -188,6 +239,7 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
will-change: transform;
|
||||||
.title {
|
.title {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view v-if="!isGroupBuy">
|
<view v-if="!isGroupBuy">
|
||||||
<u-number-box
|
<u-number-box
|
||||||
v-if="showInput && !isCountyLotteryGift"
|
v-if="showInput"
|
||||||
v-model="goodsInfo.cartNum"
|
v-model="goodsInfo.cartNum"
|
||||||
:max="goodsInfo['productInfo']['attrInfo']['stock']"
|
:max="goodsInfo['productInfo']['attrInfo']['stock']"
|
||||||
integer
|
integer
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</u-number-box>
|
</u-number-box>
|
||||||
<view v-else> x{{ isCountyLotteryGift ? 1 : goodsInfo['cartNum'] }} </view>
|
<view v-else> x{{ goodsInfo['cartNum'] }} </view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -417,9 +417,6 @@ 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
|
||||||
if (this.isCountyLotteryGift) {
|
|
||||||
this.$set(this.goodsInfo, 'cartNum', 1)
|
|
||||||
}
|
|
||||||
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');
|
||||||
@@ -501,9 +498,6 @@ 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
|
||||||
if (this.isCountyLotteryGift) {
|
|
||||||
this.$set(this.goodsInfo, 'cartNum', 1)
|
|
||||||
}
|
|
||||||
this.templateId = template.id
|
this.templateId = template.id
|
||||||
this.selectedCover = template.cover
|
this.selectedCover = template.cover
|
||||||
this.giftImage = template.image
|
this.giftImage = template.image
|
||||||
@@ -512,7 +506,7 @@ export default {
|
|||||||
// if(!this.couponId) {
|
// if(!this.couponId) {
|
||||||
// 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.isCountyLotteryGift ? 1 : this.goodsInfo.cartNum)
|
this.computedPrice(this.goodsInfo.cartNum)
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
@@ -577,7 +571,7 @@ export default {
|
|||||||
from: 'routine',
|
from: 'routine',
|
||||||
cartId: this.cartId,
|
cartId: this.cartId,
|
||||||
couponId: this.couponId,
|
couponId: this.couponId,
|
||||||
recipientsNum: this.isCountyLotteryGift ? 1 : this.goodsInfo.cartNum,
|
recipientsNum: this.goodsInfo.cartNum,
|
||||||
templateId: this.templateId,
|
templateId: this.templateId,
|
||||||
message : this.message || '礼笺轻启,礼藏心意',
|
message : this.message || '礼笺轻启,礼藏心意',
|
||||||
cover: this.selectedCover,
|
cover: this.selectedCover,
|
||||||
|
|||||||
+108
-21
@@ -121,6 +121,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
<view v-if="sendList.length > 0" class="load-more">
|
||||||
|
{{ sendLoading ? '加载中...' : (sendHasMore ? '上拉加载更多' : '没有更多了') }}
|
||||||
|
</view>
|
||||||
<view v-if="sendList.length === 0" class="noCart">
|
<view v-if="sendList.length === 0" class="noCart">
|
||||||
<view class="pictrue">
|
<view class="pictrue">
|
||||||
<image :src="webUrl + '/20240102232734472795.png'"/>
|
<image :src="webUrl + '/20240102232734472795.png'"/>
|
||||||
@@ -203,6 +206,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
<view v-if="receiveList.length > 0" class="load-more">
|
||||||
|
{{ receiveLoading ? '加载中...' : (receiveHasMore ? '上拉加载更多' : '没有更多了') }}
|
||||||
|
</view>
|
||||||
<view v-if="receiveList.length === 0" class="noCart">
|
<view v-if="receiveList.length === 0" class="noCart">
|
||||||
<view class="pictrue">
|
<view class="pictrue">
|
||||||
<image :src="webUrl + '/20240102232734472795.png'"/>
|
<image :src="webUrl + '/20240102232734472795.png'"/>
|
||||||
@@ -283,6 +289,15 @@ export default {
|
|||||||
giftItem: {},
|
giftItem: {},
|
||||||
orderInfo: {},
|
orderInfo: {},
|
||||||
isShowPayPwdPop: false,
|
isShowPayPwdPop: false,
|
||||||
|
pageSize: 10,
|
||||||
|
sendPage: 1,
|
||||||
|
receivePage: 1,
|
||||||
|
sendLoading: false,
|
||||||
|
receiveLoading: false,
|
||||||
|
sendHasMore: true,
|
||||||
|
receiveHasMore: true,
|
||||||
|
sendInited: false,
|
||||||
|
receiveInited: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: mapGetters(["userInfo"]),
|
computed: mapGetters(["userInfo"]),
|
||||||
@@ -290,7 +305,14 @@ export default {
|
|||||||
giftNotice().then(res => {
|
giftNotice().then(res => {
|
||||||
this.giftNotice = res.data
|
this.giftNotice = res.data
|
||||||
})
|
})
|
||||||
this.getGiftCardSendList()
|
this.getGiftCardSendList(true)
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
if (this.cateIndex === 0) {
|
||||||
|
this.getGiftCardSendList()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.getGiftCardReceiveList()
|
||||||
},
|
},
|
||||||
onShareAppMessage() {
|
onShareAppMessage() {
|
||||||
uni.updateShareMenu({
|
uni.updateShareMenu({
|
||||||
@@ -318,7 +340,7 @@ export default {
|
|||||||
id: item.id
|
id: item.id
|
||||||
}).then(qRes => {
|
}).then(qRes => {
|
||||||
if (qRes.success) {
|
if (qRes.success) {
|
||||||
this.getGiftCardSendList()
|
this.getGiftCardSendList(true)
|
||||||
}
|
}
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
@@ -338,7 +360,7 @@ export default {
|
|||||||
//网络请求
|
//网络请求
|
||||||
yuePayOrderHandle(this.orderInfo.orderId, "yue", this.from, payPwd).then(res => {
|
yuePayOrderHandle(this.orderInfo.orderId, "yue", this.from, payPwd).then(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
this.getGiftCardSendList()
|
this.getGiftCardSendList(true)
|
||||||
this.payPassword = "";
|
this.payPassword = "";
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -348,7 +370,7 @@ export default {
|
|||||||
wechatPay(type) {
|
wechatPay(type) {
|
||||||
payOrderHandle(this.orderInfo.orderId, type, this.from).then(res => {
|
payOrderHandle(this.orderInfo.orderId, type, this.from).then(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
this.getGiftCardSendList()
|
this.getGiftCardSendList(true)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goBuy(order) {
|
goBuy(order) {
|
||||||
@@ -370,43 +392,102 @@ export default {
|
|||||||
cateItemClickHanlde(item, index) {
|
cateItemClickHanlde(item, index) {
|
||||||
if (this.cateIndex === index || !this.isLoad) return
|
if (this.cateIndex === index || !this.isLoad) return
|
||||||
this.cateIndex = index
|
this.cateIndex = index
|
||||||
if (this.cateIndex === 0) {
|
if (this.cateIndex === 0 && !this.sendInited) {
|
||||||
this.getGiftCardSendList()
|
this.getGiftCardSendList(true)
|
||||||
}
|
}
|
||||||
if (this.cateIndex === 1) {
|
if (this.cateIndex === 1 && !this.receiveInited) {
|
||||||
this.getGiftCardReceiveList()
|
this.getGiftCardReceiveList(true)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getGiftCardReceiveList() {
|
getListResult(data, page) {
|
||||||
this.isLoad = false
|
const list = Array.isArray(data)
|
||||||
|
? data
|
||||||
|
: (data && (data.records || data.list || data.data)) || []
|
||||||
|
const pageCount = Number(
|
||||||
|
data && (data.pages || data.totalPage || data.last_page || data.pageCount || 0)
|
||||||
|
)
|
||||||
|
const total = Number(
|
||||||
|
data && (data.total || data.totalCount || data.count || 0)
|
||||||
|
)
|
||||||
|
let hasMore = false
|
||||||
|
if (pageCount > 0) {
|
||||||
|
hasMore = page < pageCount
|
||||||
|
} else if (total > 0) {
|
||||||
|
hasMore = page * this.pageSize < total
|
||||||
|
} else {
|
||||||
|
hasMore = list.length >= this.pageSize
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
list,
|
||||||
|
hasMore
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getGiftCardReceiveList(reset = false) {
|
||||||
|
if (this.receiveLoading) return
|
||||||
|
if (!reset && !this.receiveHasMore) return
|
||||||
|
const page = reset ? 1 : this.receivePage
|
||||||
|
if (reset) {
|
||||||
|
this.receivePage = 1
|
||||||
|
this.receiveHasMore = true
|
||||||
|
this.receiveList = []
|
||||||
|
}
|
||||||
|
if (page === 1 && this.cateIndex === 1) {
|
||||||
|
this.isLoad = false
|
||||||
|
}
|
||||||
|
this.receiveLoading = true
|
||||||
giftCardReceiveList({
|
giftCardReceiveList({
|
||||||
page: 1,
|
page,
|
||||||
limit: 999
|
limit: this.pageSize
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
const { success, data } = res
|
const { success, data } = res
|
||||||
if (success) {
|
if (success) {
|
||||||
this.receiveList = data || []
|
const { list, hasMore } = this.getListResult(data, page)
|
||||||
|
this.receiveList = page === 1 ? list : this.receiveList.concat(list)
|
||||||
|
this.receiveHasMore = hasMore
|
||||||
|
this.receivePage = page + 1
|
||||||
|
this.receiveInited = true
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.isLoad = true
|
this.receiveLoading = false
|
||||||
|
if (this.cateIndex === 1) {
|
||||||
|
this.isLoad = true
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getGiftCardSendList() {
|
getGiftCardSendList(reset = false) {
|
||||||
this.isLoad = false
|
if (this.sendLoading) return
|
||||||
|
if (!reset && !this.sendHasMore) return
|
||||||
|
const page = reset ? 1 : this.sendPage
|
||||||
|
if (reset) {
|
||||||
|
this.sendPage = 1
|
||||||
|
this.sendHasMore = true
|
||||||
|
this.sendList = []
|
||||||
|
}
|
||||||
|
if (page === 1 && this.cateIndex === 0) {
|
||||||
|
this.isLoad = false
|
||||||
|
}
|
||||||
|
this.sendLoading = true
|
||||||
giftCardSendList({
|
giftCardSendList({
|
||||||
page: 1,
|
page,
|
||||||
limit: 999
|
limit: this.pageSize
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
const { success, data } = res
|
const { success, data } = res
|
||||||
if (success) {
|
if (success) {
|
||||||
this.sendList = data || []
|
const { list, hasMore } = this.getListResult(data, page)
|
||||||
|
this.sendList = page === 1 ? list : this.sendList.concat(list)
|
||||||
|
this.sendHasMore = hasMore
|
||||||
|
this.sendPage = page + 1
|
||||||
|
this.sendInited = true
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.isLoad = true
|
this.sendLoading = false
|
||||||
|
if (this.cateIndex === 0) {
|
||||||
|
this.isLoad = true
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getStatus(order) {
|
getStatus(order) {
|
||||||
@@ -655,4 +736,10 @@ export default {
|
|||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
}
|
}
|
||||||
</style>
|
.load-more {
|
||||||
|
padding: 0 0 24rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
+3
-3
@@ -379,7 +379,7 @@ export const login = loginInfo => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
reject('登录接口调用失败')
|
reject('请联系管理员')
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
reject('用户未授权')
|
reject('用户未授权')
|
||||||
@@ -413,7 +413,7 @@ export const login = loginInfo => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
reject('登录接口调用失败')
|
reject('请联系管理员')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
fail() {
|
fail() {
|
||||||
@@ -423,7 +423,7 @@ export const login = loginInfo => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
fail() {
|
fail() {
|
||||||
reject('调用登录接口失败')
|
reject('请联系管理员')
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user