Merge branch 'dev' into test
This commit is contained in:
@@ -68,4 +68,11 @@ export function getVideoList(page = 1, limit = 10) {
|
|||||||
* */
|
* */
|
||||||
export function removeFavorite(ids) {
|
export function removeFavorite(ids) {
|
||||||
return request.post('/collection/delete', ids)
|
return request.post('/collection/delete', ids)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收藏千县名品县城列表
|
||||||
|
* */
|
||||||
|
export function getCountyFamousList(page = 1, limit = 10) {
|
||||||
|
return request.get('/collection/countyFamous/list', {page, limit})
|
||||||
}
|
}
|
||||||
+46
-1
@@ -20,6 +20,31 @@ export function getCountyFamousCityShop(param) {
|
|||||||
return request.get('/countyFamous/shop', param, { login: true })
|
return request.get('/countyFamous/shop', param, { login: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 千县名品店铺点赞/取消赞
|
||||||
|
export function postCountyFamousShopZan(data) {
|
||||||
|
return request.post('/countyFamous/shop/zan', data, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 千县名品店铺点赞/取消赞
|
||||||
|
export function postCountyFamousShopAddFavorite(data) {
|
||||||
|
return request.post('/collection/countyFamous/add', data, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 千县名品店铺点赞/取消赞
|
||||||
|
export function postCountyFamousShopRemoveFavorite(data) {
|
||||||
|
return request.post('/collection/countyFamous/remove', data, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 千县名品资讯点赞/取消赞
|
||||||
|
export function postCountyFamousNewsZan(data) {
|
||||||
|
return request.post('/countyFamous/news/zan', data, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 千县名品资讯被浏览
|
||||||
|
export function postCountyFamousNewsView(data) {
|
||||||
|
return request.post('/countyFamous/news/view', data, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
// 获取千县名品县城资讯数据
|
// 获取千县名品县城资讯数据
|
||||||
export function getCountyFamousCityNews(param) {
|
export function getCountyFamousCityNews(param) {
|
||||||
return request.get('/countyFamous/news', param, { login: true })
|
return request.get('/countyFamous/news', param, { login: true })
|
||||||
@@ -30,7 +55,27 @@ export function getCountyFamousCityGuide(param) {
|
|||||||
return request.get('/countyFamous/guide', param, { login: true })
|
return request.get('/countyFamous/guide', param, { login: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取千县名品县城攻略数据
|
// 获取千县名品县城攻略专题页
|
||||||
export function getCountyFamousCityGuideContent(param) {
|
export function getCountyFamousCityGuideContent(param) {
|
||||||
return request.get('/countyFamous/guide/content', param, { login: true })
|
return request.get('/countyFamous/guide/content', param, { login: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取千县名品县城重点产业列表
|
||||||
|
export function getCountyFamousIndustry(param) {
|
||||||
|
return request.get('/countyFamous/industry', param, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取千县名品县城产业项目列表
|
||||||
|
export function getCountyFamousIndustryProject(param) {
|
||||||
|
return request.get('/countyFamous/industryProject', param, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取千县名品县城产业项目文件列表
|
||||||
|
export function getCountyFamousIndustryProjectFile(param) {
|
||||||
|
return request.get('/countyFamous/industryProject/file', param, { login: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取千县名品县城招商政策文件列表
|
||||||
|
export function getCountyFamousInvestmentFile(param) {
|
||||||
|
return request.get('/countyFamous/investmentFile', param, { login: true })
|
||||||
|
}
|
||||||
|
|||||||
+20
@@ -583,6 +583,26 @@
|
|||||||
"navigationBarTitleText": "千县名品"
|
"navigationBarTitleText": "千县名品"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "views/famousQianxianShop",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "千县名品",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "views/famousQianxianTheme",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "千县名品",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "views/famousQianxianInvestment",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "招商政策"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "views/famousStory",
|
"path": "views/famousStory",
|
||||||
"style": {
|
"style": {
|
||||||
|
|||||||
@@ -375,14 +375,14 @@ export default {
|
|||||||
uni.showLoading()
|
uni.showLoading()
|
||||||
postHotelInfoEdit(param).then((res) => {
|
postHotelInfoEdit(param).then((res) => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.showToast({
|
uni.showModal({
|
||||||
title: '修改成功!',
|
title: '提示',
|
||||||
mask: false,
|
content: '修改成功!',
|
||||||
duration: 1500
|
showCancel: false,
|
||||||
|
success: () => {
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
setTimeout(function () {
|
|
||||||
uni.navigateBack()
|
|
||||||
}, 1000)
|
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|||||||
@@ -141,7 +141,10 @@ export default {
|
|||||||
display: block;
|
display: block;
|
||||||
width: 330rpx;
|
width: 330rpx;
|
||||||
height: 540rpx;
|
height: 540rpx;
|
||||||
margin: 0 30rpx 30rpx 0;
|
margin: 0 20rpx 30rpx 0;
|
||||||
|
&:nth-child(2n + 1) {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
/>
|
/>
|
||||||
<view class="page-wrap">
|
<view class="page-wrap">
|
||||||
<view class="page-2">
|
<view class="page-2">
|
||||||
<swiper
|
<!-- <swiper
|
||||||
class="swiper"
|
class="swiper"
|
||||||
circular
|
circular
|
||||||
autoplay
|
autoplay
|
||||||
@@ -24,7 +24,12 @@
|
|||||||
@click="itemClick(swiperItem)"
|
@click="itemClick(swiperItem)"
|
||||||
/>
|
/>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper> -->
|
||||||
|
<carousel
|
||||||
|
:img-list="templateProperties.page2Links"
|
||||||
|
url-key="image"
|
||||||
|
@selected="itemClick"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 第三页 -->
|
<!-- 第三页 -->
|
||||||
@@ -94,8 +99,12 @@
|
|||||||
* 模板2
|
* 模板2
|
||||||
*/
|
*/
|
||||||
import { themeTemplateMixins } from '../mixins/themeTemplateMixins'
|
import { themeTemplateMixins } from '../mixins/themeTemplateMixins'
|
||||||
|
import carousel from './vear-carousel/vear-carousel'
|
||||||
export default {
|
export default {
|
||||||
name: 'ThemePageTemplate2',
|
name: 'ThemePageTemplate2',
|
||||||
|
components: {
|
||||||
|
carousel
|
||||||
|
},
|
||||||
mixins: [themeTemplateMixins]
|
mixins: [themeTemplateMixins]
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -155,6 +164,9 @@ export default {
|
|||||||
width: 330rpx;
|
width: 330rpx;
|
||||||
height: 540rpx;
|
height: 540rpx;
|
||||||
margin: 0 30rpx 25rpx 0;
|
margin: 0 30rpx 25rpx 0;
|
||||||
|
&:nth-child(2n) {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,6 +133,9 @@ export default {
|
|||||||
width: 330rpx;
|
width: 330rpx;
|
||||||
height: 540rpx;
|
height: 540rpx;
|
||||||
margin: 0 22rpx 22rpx 0;
|
margin: 0 22rpx 22rpx 0;
|
||||||
|
&:nth-child(2n) {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,112 @@
|
|||||||
|
<template>
|
||||||
|
<swiper
|
||||||
|
class="image-container"
|
||||||
|
previous-margin="145rpx"
|
||||||
|
next-margin="145rpx"
|
||||||
|
circular
|
||||||
|
autoplay
|
||||||
|
indicatorDots="true"
|
||||||
|
indicator-color="#ddd"
|
||||||
|
indicator-active-color="#777"
|
||||||
|
@change="swiperChange"
|
||||||
|
>
|
||||||
|
<swiper-item
|
||||||
|
v-for="(item, index) in imgList"
|
||||||
|
:key="item[urlKey]"
|
||||||
|
:class="currentIndex == index ? 'swiper-item' : 'swiper-item-side'"
|
||||||
|
>
|
||||||
|
<image
|
||||||
|
:src="item[urlKey]"
|
||||||
|
:class="currentIndex == index ? 'item-img' : 'item-img-side'"
|
||||||
|
:style="dontFirstAnimation ? 'animation: none;' : ''"
|
||||||
|
lazy-load
|
||||||
|
mode="aspectFill"
|
||||||
|
@click="clickImg(item)"
|
||||||
|
/>
|
||||||
|
</swiper-item>
|
||||||
|
</swiper>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
imgList: {
|
||||||
|
type: Array,
|
||||||
|
default() {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
urlKey: {
|
||||||
|
type: String,
|
||||||
|
default() {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
currentIndex: 0,
|
||||||
|
dontFirstAnimation: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
swiperChange(e) {
|
||||||
|
this.dontFirstAnimation = false
|
||||||
|
this.currentIndex = e.detail.current
|
||||||
|
},
|
||||||
|
clickImg(item) {
|
||||||
|
this.$emit('selected', item, this.currentIndex)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.image-container {
|
||||||
|
width: 750rpx;
|
||||||
|
height: 840rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-img {
|
||||||
|
width: 430rpx;
|
||||||
|
height: 700rpx;
|
||||||
|
border-radius: 14rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper-item {
|
||||||
|
width: 430rpx;
|
||||||
|
height: 700rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.item-img-side {
|
||||||
|
width: 344rpx;
|
||||||
|
height: 560rpx;
|
||||||
|
border-radius: 14rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper-item-side {
|
||||||
|
width: 430rpx;
|
||||||
|
height: 560rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
@keyframes to-mini
|
||||||
|
{
|
||||||
|
from {
|
||||||
|
height: 700rpx;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
height: 560rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes to-big
|
||||||
|
{
|
||||||
|
from {
|
||||||
|
height: 560rpx;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
height: 700rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -57,6 +57,10 @@
|
|||||||
<view>收</view>
|
<view>收</view>
|
||||||
<view>起</view>
|
<view>起</view>
|
||||||
</view>
|
</view>
|
||||||
|
<image
|
||||||
|
:src="webUrl + '/page/qianxian/icon-06.png'"
|
||||||
|
class="icon"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -148,6 +152,11 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<image
|
||||||
|
:src="webUrl + '/home/no-data-bg.png'"
|
||||||
|
mode="widthFix"
|
||||||
|
class="loadend"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
<image
|
<image
|
||||||
v-if="list.length === 0"
|
v-if="list.length === 0"
|
||||||
@@ -368,6 +377,12 @@ export default {
|
|||||||
}
|
}
|
||||||
.toggle-wrap {
|
.toggle-wrap {
|
||||||
padding: 0 0 0 20rpx;
|
padding: 0 0 0 20rpx;
|
||||||
|
.icon {
|
||||||
|
display: block;
|
||||||
|
width: 24rpx;
|
||||||
|
height: 20rpx;
|
||||||
|
margin: 6rpx auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -376,11 +391,9 @@ export default {
|
|||||||
z-index: 2;
|
z-index: 2;
|
||||||
padding: 80rpx 30rpx 30rpx 30rpx;
|
padding: 80rpx 30rpx 30rpx 30rpx;
|
||||||
background-color: #F0F0F0;
|
background-color: #F0F0F0;
|
||||||
.item + .item {
|
|
||||||
margin: 30rpx 0 0 0;
|
|
||||||
}
|
|
||||||
.item {
|
.item {
|
||||||
padding: 30rpx 0 20rpx 30rpx;
|
padding: 30rpx 0 20rpx 30rpx;
|
||||||
|
margin: 0 0 30rpx 0;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
box-shadow: 0rpx 6rpx 12rpx rgba(0,0,0,0.16);
|
box-shadow: 0rpx 6rpx 12rpx rgba(0,0,0,0.16);
|
||||||
@@ -465,6 +478,9 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.loadend {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.img-nodata {
|
.img-nodata {
|
||||||
|
|||||||
@@ -55,6 +55,11 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<image
|
||||||
|
:src="webUrl + '/home/no-data-bg.png'"
|
||||||
|
mode="widthFix"
|
||||||
|
class="loadend"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
<goo-skeleton
|
<goo-skeleton
|
||||||
v-else
|
v-else
|
||||||
@@ -169,13 +174,18 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.list-wrap {
|
||||||
|
background-color: #F0F0F0;
|
||||||
|
.loadend {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
.list-cont {
|
.list-cont {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 0 21rpx 21rpx 21rpx;
|
padding: 0 21rpx 21rpx 21rpx;
|
||||||
background-color: #F0F0F0;
|
|
||||||
.list-cont-left,
|
.list-cont-left,
|
||||||
.list-cont-right {
|
.list-cont-right {
|
||||||
width: calc(50% - 11rpx);
|
width: calc(50% - 11rpx);
|
||||||
|
|||||||
@@ -0,0 +1,113 @@
|
|||||||
|
<template>
|
||||||
|
<view class="list-page">
|
||||||
|
<view v-if="isLoad" class="file-list">
|
||||||
|
<view
|
||||||
|
v-for="(file, fileIndex) in list"
|
||||||
|
:key="fileIndex"
|
||||||
|
class="file-item"
|
||||||
|
@click="fileItemClick(file)"
|
||||||
|
>
|
||||||
|
<view class="name more-t">
|
||||||
|
· {{ file.title }}
|
||||||
|
</view>
|
||||||
|
<image
|
||||||
|
:src="webUrl + '/page/qianxian/icon-05.png'"
|
||||||
|
class="icon"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
<image
|
||||||
|
:src="webUrl + '/home/no-data-bg.png'"
|
||||||
|
mode="widthFix"
|
||||||
|
class="loadend"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
<goo-skeleton v-else />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getCountyFamousInvestmentFile
|
||||||
|
} from '@/api/qianxian'
|
||||||
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
export default {
|
||||||
|
name: 'famousQianxianInvestment',
|
||||||
|
mixins: [pageListenMixins],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
|
isLoad: false,
|
||||||
|
pageKeyId: '',
|
||||||
|
list: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
const id = options.id
|
||||||
|
this.getListReq(id)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getListReq(id) {
|
||||||
|
getCountyFamousInvestmentFile({
|
||||||
|
countyFamousDataId: id,
|
||||||
|
page: 1,
|
||||||
|
limit: 9999
|
||||||
|
}).then(res => {
|
||||||
|
const { success, data } = res
|
||||||
|
if (success) {
|
||||||
|
this.isLoad = true
|
||||||
|
this.list = data.records || []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
fileItemClick(file) {
|
||||||
|
const url = file.attachment || ''
|
||||||
|
if (!url) return
|
||||||
|
uni.downloadFile({
|
||||||
|
url,
|
||||||
|
success: res => {
|
||||||
|
const filePath = res.tempFilePath
|
||||||
|
wx.openDocument({
|
||||||
|
filePath,
|
||||||
|
fail: (err) => {
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.list-page {
|
||||||
|
min-height: 100vh;
|
||||||
|
padding: 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
.file-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
height: 100rpx;
|
||||||
|
width: 100%;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
margin: 0 0 20rpx 0;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
line-height: 36rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
.name {
|
||||||
|
width: calc(100% - 40rpx);
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
.icon {
|
||||||
|
display: block;
|
||||||
|
width: 26rpx;
|
||||||
|
height: 26rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.loadend {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,181 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<hx-navbar
|
||||||
|
:fixed="true"
|
||||||
|
:background-color="[[13,197,197],[13,197,197]]"
|
||||||
|
statusBarFontColor="#ffffff"
|
||||||
|
barPlaceholder="hidden"
|
||||||
|
transparent="auto"
|
||||||
|
color='#ffffff'
|
||||||
|
/>
|
||||||
|
<view v-if="isLoad">
|
||||||
|
<image
|
||||||
|
:src="templateProperties.page1Image"
|
||||||
|
class="top-img"
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
|
<view class="page-wrap">
|
||||||
|
<view class="page-2">
|
||||||
|
<swiper
|
||||||
|
class="swiper"
|
||||||
|
circular
|
||||||
|
autoplay
|
||||||
|
:interval="5000"
|
||||||
|
>
|
||||||
|
<swiper-item
|
||||||
|
v-for="(swiperItem, swiperIndex) in templateProperties.page2Images"
|
||||||
|
:key="swiperIndex"
|
||||||
|
>
|
||||||
|
<image
|
||||||
|
:src="swiperItem"
|
||||||
|
mode="scaleToFill"
|
||||||
|
class="swiper-img"
|
||||||
|
/>
|
||||||
|
</swiper-item>
|
||||||
|
</swiper>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 第三页 -->
|
||||||
|
<view class="page-wrap">
|
||||||
|
<view class="page-5">
|
||||||
|
<image
|
||||||
|
v-for="(item, index) in templateProperties.page3Links"
|
||||||
|
:key="index"
|
||||||
|
:src="item.image"
|
||||||
|
class="shop-img"
|
||||||
|
mode="widthFix"
|
||||||
|
@click="linkToShop(item)"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 第四页 -->
|
||||||
|
<view class="page-wrap">
|
||||||
|
<view class="page-4">
|
||||||
|
<image
|
||||||
|
:src="templateProperties.page4Image"
|
||||||
|
class="section-bg"
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 第五页 -->
|
||||||
|
<view class="page-wrap">
|
||||||
|
<view class="page-2">
|
||||||
|
<swiper
|
||||||
|
class="swiper"
|
||||||
|
circular
|
||||||
|
autoplay
|
||||||
|
:interval="5000"
|
||||||
|
>
|
||||||
|
<swiper-item
|
||||||
|
v-for="(swiperItem, swiperIndex) in templateProperties.page5Images"
|
||||||
|
:key="swiperIndex"
|
||||||
|
>
|
||||||
|
<image
|
||||||
|
:src="swiperItem"
|
||||||
|
mode="scaleToFill"
|
||||||
|
class="swiper-img"
|
||||||
|
/>
|
||||||
|
</swiper-item>
|
||||||
|
</swiper>
|
||||||
|
</view>
|
||||||
|
<view class="page-5">
|
||||||
|
<image
|
||||||
|
v-for="(item, index) in templateProperties.page5Links"
|
||||||
|
:key="index"
|
||||||
|
:src="item.image"
|
||||||
|
class="shop-img"
|
||||||
|
mode="widthFix"
|
||||||
|
@click="linkToShop(item)"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<goo-skeleton v-else />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getCountyFamousCityGuideContent
|
||||||
|
} from '@/api/qianxian'
|
||||||
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
export default {
|
||||||
|
name: 'FamousQianxianTheme',
|
||||||
|
mixins: [pageListenMixins],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isLoad: false,
|
||||||
|
pageKeyId: '',
|
||||||
|
templateProperties: {
|
||||||
|
page1Image: '',
|
||||||
|
page2Images: [],
|
||||||
|
page3Links: [],
|
||||||
|
page4Image: '',
|
||||||
|
page5Images: '',
|
||||||
|
page5Links: []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
const id = options.id
|
||||||
|
this.getDetailReq(id)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getDetailReq(id) {
|
||||||
|
getCountyFamousCityGuideContent({
|
||||||
|
guideId: id
|
||||||
|
}).then(res => {
|
||||||
|
const { success, data } = res
|
||||||
|
if (success) {
|
||||||
|
this.isLoad = true
|
||||||
|
this.templateProperties = data || {}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
linkToShop(item) {
|
||||||
|
const linkId = item.linkId || ''
|
||||||
|
if (!linkId) return
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pagesInn/inn/innHome?id=${linkId}&from=famous`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.top-img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.page-wrap {
|
||||||
|
position: relative;
|
||||||
|
.page-2 {
|
||||||
|
width: 100%;
|
||||||
|
height: 450rpx;
|
||||||
|
.swiper {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
.swiper-img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.page-4 {
|
||||||
|
.section-bg {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.page-5 {
|
||||||
|
.shop-img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 300rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
+355
-108
@@ -1,46 +1,88 @@
|
|||||||
<template>
|
<template>
|
||||||
<view v-if="ready">
|
<view>
|
||||||
|
|
||||||
<view class="my-tabs flex jc-between">
|
<view class="my-tabs flex jc-between">
|
||||||
<view class="tab-item flex jc-center ai-center"
|
<view
|
||||||
:class="{'active':tabsIndex===index,'has-vertical':tabsVertical===index}" v-for="(item,index) in tabs"
|
v-for="(item,index) in tabs"
|
||||||
:key="index" @click="changeTabs(index)">
|
:key="index"
|
||||||
|
:class="{
|
||||||
|
'active': tabsIndex === index,
|
||||||
|
'has-vertical':index < 3
|
||||||
|
}"
|
||||||
|
class="tab-item flex jc-center ai-center"
|
||||||
|
@click="changeTabs(index)"
|
||||||
|
>
|
||||||
{{ item.label }}
|
{{ item.label }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view
|
<view
|
||||||
v-if="!isManage"
|
v-if="(tabsIndex === 0 && productList.length> 0) ||
|
||||||
class="manage flex jc-end"
|
(tabsIndex === 1 && storeList.length> 0) ||
|
||||||
|
(tabsIndex === 2 && videoList.length> 0) ||
|
||||||
|
(tabsIndex === 3 && countyFamousList.length> 0)
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<view class="flex ai-center" @click="changeManage">
|
<view
|
||||||
<image :src="webUrl+'/20240107224533038041.png'" mode="scaleToFill"/>
|
v-if="!isManage"
|
||||||
管理
|
class="manage flex jc-end"
|
||||||
|
>
|
||||||
|
<view class="flex ai-center" @click="changeManage">
|
||||||
|
<image
|
||||||
|
:src="webUrl+'/20240107224533038041.png'"
|
||||||
|
mode="scaleToFill"
|
||||||
|
/>
|
||||||
|
管理
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
v-else
|
||||||
|
class="manage flex jc-end ai-center"
|
||||||
|
style="color:#C41617"
|
||||||
|
@click="changeManage"
|
||||||
|
>
|
||||||
|
<view>退出管理</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
<view
|
|
||||||
v-else
|
|
||||||
class="manage flex jc-end ai-center"
|
|
||||||
style="color:#C41617"
|
|
||||||
@click="changeManage"
|
|
||||||
>
|
|
||||||
<view>退出管理</view>
|
|
||||||
</view>
|
</view>
|
||||||
<!--商品列表-->
|
<!--商品列表-->
|
||||||
<scroll-view class="scroll-box" :class="{'manage-state':isManage}" scroll-y
|
<scroll-view
|
||||||
@scrolltolower="fetchProduct()" v-if="tabsIndex===0">
|
v-if="tabsIndex === 0"
|
||||||
<view class="tc" style="margin-top: 200rpx;" v-if="productList.length===0">
|
:class="{'manage-state': isManage}"
|
||||||
<image style="width: 305rpx;height: 332rpx" :src="webUrl+'/20240102232718644743.png'" mode="scaleToFill"/>
|
class="scroll-box"
|
||||||
|
scroll-y
|
||||||
|
@scrolltolower="fetchProduct()"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
v-if="productList.length === 0"
|
||||||
|
class="tc no-data"
|
||||||
|
>
|
||||||
|
<image
|
||||||
|
:src="webUrl+'/20240102232718644743.png'"
|
||||||
|
mode="scaleToFill"
|
||||||
|
class="img"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
<view
|
||||||
<view class="item-commodity flex ai-center" v-for="(item,index) in productList" :key="index">
|
v-for="(item,index) in productList"
|
||||||
<CheckboxIcon style="margin-right: 16rpx;" :default-state="item['state']" :mark="[index]" @change="onChange"
|
:key="index"
|
||||||
v-if="isManage"/>
|
class="item-commodity flex ai-center"
|
||||||
<image class="cover flex-0" :src="item['image']" mode="scaleToFill" @click="navToGoods(item['productId'])"/>
|
>
|
||||||
|
<CheckboxIcon
|
||||||
|
v-if="isManage"
|
||||||
|
:default-state="item['state']"
|
||||||
|
:mark="[index]"
|
||||||
|
style="margin-right: 16rpx;"
|
||||||
|
@change="onChange"
|
||||||
|
/>
|
||||||
|
<image
|
||||||
|
:src="item['image']"
|
||||||
|
mode="scaleToFill"
|
||||||
|
class="cover flex-0"
|
||||||
|
@click="navToGoods(item['productId'])"
|
||||||
|
/>
|
||||||
<view style="width: 100%">
|
<view style="width: 100%">
|
||||||
<view class="more-t bold" @click="navToGoods(item['productId'])">{{ item['storeName'] }}</view>
|
<view
|
||||||
|
class="more-t bold"
|
||||||
|
@click="navToGoods(item['productId'])"
|
||||||
|
>{{ item['storeName'] }}</view>
|
||||||
<view class="sub" @click="navToGoods(item['productId'])">规格:{{ item['sku'] }}</view>
|
<view class="sub" @click="navToGoods(item['productId'])">规格:{{ item['sku'] }}</view>
|
||||||
<view class="flex jc-between ai-end">
|
<view class="flex jc-between ai-end">
|
||||||
<view class="price flex ai-end" @click="navToGoods(item['productId'])">
|
<view class="price flex ai-end" @click="navToGoods(item['productId'])">
|
||||||
@@ -56,62 +98,178 @@
|
|||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<!--店铺列表-->
|
<!--店铺列表-->
|
||||||
<scroll-view class="scroll-box" :class="{'manage-state':isManage}" scroll-y @scrolltolower="fetchStore()"
|
<scroll-view
|
||||||
v-if="tabsIndex===1">
|
v-if="tabsIndex === 1"
|
||||||
<view class="tc" style="margin-top: 200rpx;" v-if="storeList.length===0">
|
:class="{'manage-state':isManage}"
|
||||||
<image style="width: 305rpx;height: 332rpx" :src="webUrl+'/20240102232718644743.png'" mode="scaleToFill"/>
|
class="scroll-box"
|
||||||
|
scroll-y
|
||||||
|
@scrolltolower="fetchStore()"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
v-if="storeList.length === 0"
|
||||||
|
class="tc no-data"
|
||||||
|
>
|
||||||
|
<image
|
||||||
|
:src="webUrl+'/20240102232718644743.png'"
|
||||||
|
mode="scaleToFill"
|
||||||
|
class="img"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
<view
|
||||||
<view class="item-store flex ai-start" v-for="(item,index) in storeList" :key="index">
|
v-for="(item,index) in storeList"
|
||||||
|
:key="index"
|
||||||
|
class="item-store flex ai-start"
|
||||||
|
>
|
||||||
<view class="flex flex-0 ai-center">
|
<view class="flex flex-0 ai-center">
|
||||||
<CheckboxIcon style="margin-right: 16rpx;" :default-state="item['state']" :mark="[index]" @change="onChange"
|
<CheckboxIcon
|
||||||
v-if="isManage"/>
|
v-if="isManage"
|
||||||
<image class="cover" :src="item['logo']" mode="scaleToFill"/>
|
:default-state="item['state']"
|
||||||
|
:mark="[index]"
|
||||||
|
style="margin-right: 16rpx;"
|
||||||
|
@change="onChange"
|
||||||
|
/>
|
||||||
|
<image
|
||||||
|
:src="item['logo']"
|
||||||
|
mode="scaleToFill"
|
||||||
|
class="cover"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view>
|
<view>
|
||||||
<view class="flex jc-between ai-start" style="width: 594rpx">
|
<view class="flex jc-between ai-start" style="width: 594rpx">
|
||||||
<view>
|
<view>
|
||||||
<view class="one-t bold">{{ item['name'] }}</view>
|
<view class="one-t bold">{{ item['name'] }}</view>
|
||||||
<view class="sub">{{ item['time'] === '刚刚' ? '刚刚' : item['time'] + '收藏' }}</view>
|
<view class="sub">{{ item['time'] === '刚刚' ? '刚刚' : item['time'] + '收藏' }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn-nav flex jc-center ai-center" :style="{'margin-right':(isManage?48:0)+'rpx'}"
|
<view
|
||||||
@click="navToStore(item['hotelId'])">进店逛逛
|
:style="{'margin-right':(isManage?48:0)+'rpx'}"
|
||||||
<image style="width: 24rpx;height: 24rpx" :src="webUrl+'/20240109234706982937.png'" mode="scaleToFill"/>
|
class="btn-nav flex jc-center ai-center"
|
||||||
|
@click="navToStore(item['hotelId'])"
|
||||||
|
>
|
||||||
|
进店逛逛
|
||||||
|
<image
|
||||||
|
:src="webUrl+'/20240109234706982937.png'"
|
||||||
|
style="width: 24rpx;height: 24rpx"
|
||||||
|
mode="scaleToFill"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex jc-start ai-center" style="margin-top: 16rpx;">
|
<view class="flex jc-start ai-center" style="margin-top: 16rpx;">
|
||||||
<image class="img-product" :src="img" mode="scaleToFill"
|
<image
|
||||||
v-for="(img,i) in item['productImages']" :key="i"/>
|
v-for="(img,i) in item['productImages']"
|
||||||
|
:key="i"
|
||||||
|
:src="img" mode="scaleToFill"
|
||||||
|
class="img-product"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<!--视频列表-->
|
<!--视频列表-->
|
||||||
<scroll-view class="scroll-box" :class="{'manage-state':isManage}" scroll-y
|
<scroll-view
|
||||||
@scrolltolower="fetchVideo()"
|
v-if="tabsIndex === 2"
|
||||||
v-if="tabsIndex===2">
|
scroll-y
|
||||||
<view class="tc" style="margin-top: 200rpx;" v-if="videoList.length===0">
|
:class="{'manage-state':isManage}"
|
||||||
<image style="width: 305rpx;height: 332rpx" :src="webUrl+'/20240102232718644743.png'" mode="scaleToFill"/>
|
class="scroll-box"
|
||||||
|
@scrolltolower="fetchVideo()"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
v-if="videoList.length === 0"
|
||||||
|
class="tc no-data"
|
||||||
|
>
|
||||||
|
<image
|
||||||
|
:src="webUrl+'/20240102232718644743.png'"
|
||||||
|
mode="scaleToFill"
|
||||||
|
class="img"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="flex flex-wrap" style="padding:40rpx 32rpx">
|
<view class="flex flex-wrap" style="padding:40rpx 32rpx">
|
||||||
<view class="item-video" v-for="(item,index) in videoList" :key="index">
|
<view
|
||||||
<CheckboxIcon class="video-check" :default-state="item['state']" :mark="[index]" @change="onChange"
|
v-for="(item,index) in videoList"
|
||||||
v-if="isManage"/>
|
:key="index"
|
||||||
|
class="item-video"
|
||||||
<image class="img-cover" :src="item['cover']" mode="scaleToFill" @click="navToVideo(item['videoId'])"/>
|
>
|
||||||
|
<CheckboxIcon
|
||||||
|
v-if="isManage"
|
||||||
|
:default-state="item['state']"
|
||||||
|
:mark="[index]"
|
||||||
|
class="video-check"
|
||||||
|
@change="onChange"
|
||||||
|
/>
|
||||||
|
<image
|
||||||
|
:src="item['cover']"
|
||||||
|
mode="scaleToFill"
|
||||||
|
class="img-cover"
|
||||||
|
@click="navToVideo(item['videoId'])"
|
||||||
|
/>
|
||||||
<view class="item-mask flex jc-end ai-end">
|
<view class="item-mask flex jc-end ai-end">
|
||||||
<image class="icon-heart" :src="webUrl+'/20240113205505660820.png'" mode="scaleToFill"/>
|
<image
|
||||||
|
:src="webUrl+'/20240113205505660820.png'"
|
||||||
|
mode="scaleToFill"
|
||||||
|
class="icon-heart"
|
||||||
|
/>
|
||||||
<text>{{ item['favoriteCount'] }}</text>
|
<text>{{ item['favoriteCount'] }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
<!--千县店铺列表-->
|
||||||
|
<scroll-view
|
||||||
|
v-if="tabsIndex === 3"
|
||||||
|
:class="{'manage-state':isManage}"
|
||||||
|
class="scroll-box county-scroll"
|
||||||
|
scroll-y
|
||||||
|
@scrolltolower="fetchCountyFamous()"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
v-if="countyFamousList.length === 0"
|
||||||
|
class="tc no-data"
|
||||||
|
>
|
||||||
|
<image
|
||||||
|
:src="webUrl+'/20240102232718644743.png'"
|
||||||
|
mode="scaleToFill"
|
||||||
|
class="img"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
<view class="county-list-wrap">
|
||||||
|
<view
|
||||||
|
v-for="(item, index) in countyFamousList"
|
||||||
|
:key="index"
|
||||||
|
class="county-item"
|
||||||
|
@click="gotoQianxianShop(item)"
|
||||||
|
>
|
||||||
|
<view class="img-wrap">
|
||||||
|
<CheckboxIcon
|
||||||
|
v-if="isManage"
|
||||||
|
:default-state="item['state']"
|
||||||
|
:mark="[index]"
|
||||||
|
class="check"
|
||||||
|
@change="onChange"
|
||||||
|
/>
|
||||||
|
<image
|
||||||
|
:src="item.cover + (item.coverType === 1 ? '' : '?vframe/jpg/offset/1')"
|
||||||
|
mode="scaleToFill"
|
||||||
|
class="cover"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
<view class="county-info">
|
||||||
|
<view class="name one-t">
|
||||||
|
{{ item.name }}
|
||||||
|
</view>
|
||||||
|
<view class="intro more-t">
|
||||||
|
{{ item.shopIntro }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
<view class="fixed-manage flex jc-between ai-center" v-if="isManage">
|
<view class="fixed-manage flex jc-between ai-center" v-if="isManage">
|
||||||
<view style="margin-left: 30rpx;">
|
<view style="margin-left: 30rpx;">
|
||||||
<CheckboxIcon style="margin-right: 16rpx;" :default-state="isAll" :mark="[-1]" @change="onChange"/>
|
<CheckboxIcon
|
||||||
|
:default-state="isAll"
|
||||||
|
:mark="[-1]"
|
||||||
|
style="margin-right: 16rpx;"
|
||||||
|
@change="onChange"
|
||||||
|
/>
|
||||||
<text style="color:#666666;font-size: 32rpx">全选({{ selectCount }})</text>
|
<text style="color:#666666;font-size: 32rpx">全选({{ selectCount }})</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex ai-center">
|
<view class="flex ai-center">
|
||||||
@@ -123,22 +281,27 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {getProductList, getStoreList, getVideoList, removeFavorite} from "@/api/favorite";
|
import {
|
||||||
import {postCartAdd} from "@/api/store";
|
getProductList,
|
||||||
import CheckboxIcon from "@/components/CheckboxIcon.vue";
|
getStoreList,
|
||||||
|
getVideoList,
|
||||||
|
getCountyFamousList,
|
||||||
|
removeFavorite
|
||||||
|
} from '@/api/favorite'
|
||||||
|
import { postCartAdd } from '@/api/store'
|
||||||
|
import CheckboxIcon from '@/components/CheckboxIcon.vue'
|
||||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {CheckboxIcon},
|
components: { CheckboxIcon },
|
||||||
mixins: [pageListenMixins],
|
mixins: [pageListenMixins],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
ready: false,
|
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
tabs: [
|
tabs: [
|
||||||
{key: 0, label: '商品'},
|
{key: 0, label: '商品'},
|
||||||
{key: 1, label: '店铺'},
|
{key: 1, label: '店铺'},
|
||||||
{key: 2, label: '视频'},
|
{key: 2, label: '视频'},
|
||||||
|
{key: 3, label: '千县'},
|
||||||
],
|
],
|
||||||
tabsIndex: 0,
|
tabsIndex: 0,
|
||||||
isManage: false,
|
isManage: false,
|
||||||
@@ -147,17 +310,14 @@ export default {
|
|||||||
productList: [],
|
productList: [],
|
||||||
storeList: [],
|
storeList: [],
|
||||||
videoList: [],
|
videoList: [],
|
||||||
|
countyFamousList: [],
|
||||||
pageKeyId: Object.freeze('userCollectionIndex')
|
pageKeyId: Object.freeze('userCollectionIndex')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
tabsVertical: function () {
|
|
||||||
if (this.tabsIndex === 0) return 1
|
|
||||||
if (this.tabsIndex === 1) return -1
|
|
||||||
if (this.tabsIndex === 2) return 0
|
|
||||||
},
|
|
||||||
selectCount: function () {
|
selectCount: function () {
|
||||||
let count = 0, countList
|
let count = 0
|
||||||
|
let countList = []
|
||||||
switch (this.tabsIndex) {
|
switch (this.tabsIndex) {
|
||||||
case 0:
|
case 0:
|
||||||
countList = this.productList
|
countList = this.productList
|
||||||
@@ -177,7 +337,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.ready = true
|
|
||||||
this.fetchProduct()
|
this.fetchProduct()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -186,7 +345,6 @@ export default {
|
|||||||
url: "/pages/shop/GoodsCon/index?id=" + id
|
url: "/pages/shop/GoodsCon/index?id=" + id
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
changeTabs(index) {
|
changeTabs(index) {
|
||||||
if (this.isManage) return
|
if (this.isManage) return
|
||||||
// fix bug#1111
|
// fix bug#1111
|
||||||
@@ -195,7 +353,6 @@ export default {
|
|||||||
this.page = 1
|
this.page = 1
|
||||||
this.fetchData()
|
this.fetchData()
|
||||||
},
|
},
|
||||||
|
|
||||||
fetchData() {
|
fetchData() {
|
||||||
switch (this.tabsIndex) {
|
switch (this.tabsIndex) {
|
||||||
case 0:
|
case 0:
|
||||||
@@ -207,20 +364,20 @@ export default {
|
|||||||
case 2:
|
case 2:
|
||||||
this.fetchVideo()
|
this.fetchVideo()
|
||||||
break
|
break
|
||||||
|
case 3:
|
||||||
|
this.fetchCountyFamous()
|
||||||
|
break
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
changeManage() {
|
changeManage() {
|
||||||
this.isManage = !this.isManage
|
this.isManage = !this.isManage
|
||||||
},
|
},
|
||||||
|
|
||||||
onChange(state, mark) {
|
onChange(state, mark) {
|
||||||
if (mark[0] === -1) {
|
if (mark[0] === -1) {
|
||||||
this.isAll = state
|
this.isAll = state
|
||||||
this.handleAll(state)
|
this.handleAll(state)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (this.tabsIndex) {
|
switch (this.tabsIndex) {
|
||||||
case 0:
|
case 0:
|
||||||
this.productList[mark]['state'] = state
|
this.productList[mark]['state'] = state
|
||||||
@@ -234,9 +391,12 @@ export default {
|
|||||||
this.videoList[mark]['state'] = state
|
this.videoList[mark]['state'] = state
|
||||||
this.isAll = this.selectCount === this.videoList.length
|
this.isAll = this.selectCount === this.videoList.length
|
||||||
break
|
break
|
||||||
|
case 3:
|
||||||
|
this.countyFamousList[mark]['state'] = state
|
||||||
|
this.isAll = this.selectCount === this.countyFamousList.length
|
||||||
|
break
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
handleAll(state) {
|
handleAll(state) {
|
||||||
switch (this.tabsIndex) {
|
switch (this.tabsIndex) {
|
||||||
case 0:
|
case 0:
|
||||||
@@ -248,9 +408,11 @@ export default {
|
|||||||
case 2:
|
case 2:
|
||||||
this.videoList.forEach(item => item.state = state)
|
this.videoList.forEach(item => item.state = state)
|
||||||
break
|
break
|
||||||
|
case 3:
|
||||||
|
this.countyFamousList.forEach(item => item.state = state)
|
||||||
|
break
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
remove() {
|
remove() {
|
||||||
const _this = this
|
const _this = this
|
||||||
const ids = []
|
const ids = []
|
||||||
@@ -270,6 +432,11 @@ export default {
|
|||||||
if (item['state']) ids.push(item.id)
|
if (item['state']) ids.push(item.id)
|
||||||
})
|
})
|
||||||
break
|
break
|
||||||
|
case 3:
|
||||||
|
_this.countyFamousList.forEach(item => {
|
||||||
|
if (item['state']) ids.push(item.id)
|
||||||
|
})
|
||||||
|
break
|
||||||
}
|
}
|
||||||
if (ids.length < 1) {
|
if (ids.length < 1) {
|
||||||
return
|
return
|
||||||
@@ -292,7 +459,6 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
removeAfter() {
|
removeAfter() {
|
||||||
switch (this.tabsIndex) {
|
switch (this.tabsIndex) {
|
||||||
case 0:
|
case 0:
|
||||||
@@ -304,55 +470,68 @@ export default {
|
|||||||
case 2:
|
case 2:
|
||||||
this.videoList = this.videoList.filter(item => !item['state'])
|
this.videoList = this.videoList.filter(item => !item['state'])
|
||||||
break
|
break
|
||||||
|
case 3:
|
||||||
|
this.countyFamousList = this.videoList.filter(item => !item['state'])
|
||||||
|
break
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async fetchProduct() {
|
async fetchProduct() {
|
||||||
let that = this
|
const _this = this
|
||||||
if (that.page === 1) {
|
if (_this.page === 1) {
|
||||||
that.productList = []
|
_this.productList = []
|
||||||
}
|
}
|
||||||
const res = await getProductList(that.page)
|
const res = await getProductList(_this.page)
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
res.data['records']?.forEach(item => {
|
res.data['records']?.forEach(item => {
|
||||||
item.state = false
|
item.state = false
|
||||||
that.productList.push(item)
|
_this.productList.push(item)
|
||||||
})
|
})
|
||||||
that.page++
|
_this.page++
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async fetchStore() {
|
async fetchStore() {
|
||||||
let that = this
|
const _this = this
|
||||||
if (that.page === 1) {
|
if (_this.page === 1) {
|
||||||
that.storeList = []
|
_this.storeList = []
|
||||||
}
|
}
|
||||||
const res = await getStoreList(that.page)
|
const res = await getStoreList(_this.page)
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
res.data['records']?.forEach(item => {
|
res.data['records']?.forEach(item => {
|
||||||
item.time = uni.$u.timeFrom(Date.parse(item.createTime))
|
item.time = uni.$u.timeFrom(Date.parse(item.createTime))
|
||||||
item.state = false
|
item.state = false
|
||||||
that.storeList.push(item)
|
_this.storeList.push(item)
|
||||||
})
|
})
|
||||||
that.page++
|
_this.page++
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async fetchVideo() {
|
async fetchVideo() {
|
||||||
let that = this
|
const _this = this
|
||||||
if (that.page === 1) {
|
if (_this.page === 1) {
|
||||||
that.videoList = []
|
_this.videoList = []
|
||||||
}
|
}
|
||||||
const res = await getVideoList(that.page)
|
const res = await getVideoList(_this.page)
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
res.data['records']?.forEach(item => {
|
res.data['records']?.forEach(item => {
|
||||||
item.state = false
|
item.state = false
|
||||||
that.videoList.push(item)
|
_this.videoList.push(item)
|
||||||
})
|
})
|
||||||
that.page++
|
_this.page++
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async fetchCountyFamous() {
|
||||||
|
const _this = this
|
||||||
|
if (_this.page === 1) {
|
||||||
|
_this.countyFamousList = []
|
||||||
|
}
|
||||||
|
const res = await getCountyFamousList(_this.page)
|
||||||
|
if (res.success) {
|
||||||
|
res.data['records']?.forEach(item => {
|
||||||
|
item.state = false
|
||||||
|
_this.countyFamousList.push(item)
|
||||||
|
})
|
||||||
|
_this.page++
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async addCart(item) {
|
async addCart(item) {
|
||||||
const param = {
|
const param = {
|
||||||
productId: item.productId,
|
productId: item.productId,
|
||||||
@@ -367,23 +546,25 @@ export default {
|
|||||||
}).catch()
|
}).catch()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
navToStore(id) {
|
navToStore(id) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pagesInn/inn/innHome?id=' + id
|
url: '/pagesInn/inn/innHome?id=' + id
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
navToVideo(videoId) {
|
navToVideo(videoId) {
|
||||||
if (this.isManage) return
|
if (this.isManage) return
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pkg-video/views/watch?videoId=' + videoId
|
url: '/pkg-video/views/watch?videoId=' + videoId
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
gotoQianxianShop(item) {
|
||||||
|
if (this.isManage) return
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pkg_product/views/famousQianxianShop?id=${item.countyFamousDataId}`
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
@@ -407,13 +588,16 @@ export default {
|
|||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
font-size: 34rpx;
|
font-size: 34rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
&.has-vertical:after {
|
||||||
|
width: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.has-vertical:after {
|
.has-vertical:after {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
width: 2rpx;
|
width: 0;
|
||||||
height: 36rpx;
|
height: 36rpx;
|
||||||
background: #999999;
|
background: #999999;
|
||||||
}
|
}
|
||||||
@@ -434,6 +618,19 @@ export default {
|
|||||||
height: calc(100vh - 168rpx);
|
height: calc(100vh - 168rpx);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
|
&.county-scroll {
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
}
|
||||||
|
.no-data {
|
||||||
|
padding: 100px 0 0 0;
|
||||||
|
border-top: 20px solid #f0f0f0;
|
||||||
|
.img {
|
||||||
|
display: block;
|
||||||
|
width: 305rpx;
|
||||||
|
height: 332rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.manage-state {
|
.manage-state {
|
||||||
@@ -583,4 +780,54 @@ export default {
|
|||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.county-list-wrap {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
width: 710rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
.county-item {
|
||||||
|
width: 344rpx;
|
||||||
|
height: 440rpx;
|
||||||
|
padding: 12rpx;
|
||||||
|
margin: 0 22rpx 22rpx 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
&:nth-child(2n) {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
.img-wrap {
|
||||||
|
position: relative;
|
||||||
|
.cover {
|
||||||
|
display: block;
|
||||||
|
width: 320rpx;
|
||||||
|
height: 280rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
}
|
||||||
|
.check {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.county-info {
|
||||||
|
.name {
|
||||||
|
width: 100%;
|
||||||
|
padding: 10rpx 0 0 0;
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #333;
|
||||||
|
line-height: 48rpx;
|
||||||
|
}
|
||||||
|
.intro {
|
||||||
|
padding: 10rpx 0 0 0;
|
||||||
|
font-size: 28rpx;
|
||||||
|
line-height: 32rpx;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user