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) {
|
||||
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 })
|
||||
}
|
||||
|
||||
// 千县名品店铺点赞/取消赞
|
||||
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) {
|
||||
return request.get('/countyFamous/news', param, { login: true })
|
||||
@@ -30,7 +55,27 @@ export function getCountyFamousCityGuide(param) {
|
||||
return request.get('/countyFamous/guide', param, { login: true })
|
||||
}
|
||||
|
||||
// 获取千县名品县城攻略数据
|
||||
// 获取千县名品县城攻略专题页
|
||||
export function getCountyFamousCityGuideContent(param) {
|
||||
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": "千县名品"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/famousQianxianShop",
|
||||
"style": {
|
||||
"navigationBarTitleText": "千县名品",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/famousQianxianTheme",
|
||||
"style": {
|
||||
"navigationBarTitleText": "千县名品",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/famousQianxianInvestment",
|
||||
"style": {
|
||||
"navigationBarTitleText": "招商政策"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/famousStory",
|
||||
"style": {
|
||||
|
||||
@@ -375,14 +375,14 @@ export default {
|
||||
uni.showLoading()
|
||||
postHotelInfoEdit(param).then((res) => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '修改成功!',
|
||||
mask: false,
|
||||
duration: 1500
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '修改成功!',
|
||||
showCancel: false,
|
||||
success: () => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
})
|
||||
setTimeout(function () {
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
}).catch((err) => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
|
||||
@@ -141,7 +141,10 @@ export default {
|
||||
display: block;
|
||||
width: 330rpx;
|
||||
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-2">
|
||||
<swiper
|
||||
<!-- <swiper
|
||||
class="swiper"
|
||||
circular
|
||||
autoplay
|
||||
@@ -24,7 +24,12 @@
|
||||
@click="itemClick(swiperItem)"
|
||||
/>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</swiper> -->
|
||||
<carousel
|
||||
:img-list="templateProperties.page2Links"
|
||||
url-key="image"
|
||||
@selected="itemClick"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 第三页 -->
|
||||
@@ -94,8 +99,12 @@
|
||||
* 模板2
|
||||
*/
|
||||
import { themeTemplateMixins } from '../mixins/themeTemplateMixins'
|
||||
import carousel from './vear-carousel/vear-carousel'
|
||||
export default {
|
||||
name: 'ThemePageTemplate2',
|
||||
components: {
|
||||
carousel
|
||||
},
|
||||
mixins: [themeTemplateMixins]
|
||||
}
|
||||
</script>
|
||||
@@ -155,6 +164,9 @@ export default {
|
||||
width: 330rpx;
|
||||
height: 540rpx;
|
||||
margin: 0 30rpx 25rpx 0;
|
||||
&:nth-child(2n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,6 +133,9 @@ export default {
|
||||
width: 330rpx;
|
||||
height: 540rpx;
|
||||
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>
|
||||
<image
|
||||
:src="webUrl + '/page/qianxian/icon-06.png'"
|
||||
class="icon"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -148,6 +152,11 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<image
|
||||
:src="webUrl + '/home/no-data-bg.png'"
|
||||
mode="widthFix"
|
||||
class="loadend"
|
||||
/>
|
||||
</view>
|
||||
<image
|
||||
v-if="list.length === 0"
|
||||
@@ -368,6 +377,12 @@ export default {
|
||||
}
|
||||
.toggle-wrap {
|
||||
padding: 0 0 0 20rpx;
|
||||
.icon {
|
||||
display: block;
|
||||
width: 24rpx;
|
||||
height: 20rpx;
|
||||
margin: 6rpx auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -376,11 +391,9 @@ export default {
|
||||
z-index: 2;
|
||||
padding: 80rpx 30rpx 30rpx 30rpx;
|
||||
background-color: #F0F0F0;
|
||||
.item + .item {
|
||||
margin: 30rpx 0 0 0;
|
||||
}
|
||||
.item {
|
||||
padding: 30rpx 0 20rpx 30rpx;
|
||||
margin: 0 0 30rpx 0;
|
||||
border-radius: 20rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0rpx 6rpx 12rpx rgba(0,0,0,0.16);
|
||||
@@ -465,6 +478,9 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.loadend {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.img-nodata {
|
||||
|
||||
@@ -55,6 +55,11 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<image
|
||||
:src="webUrl + '/home/no-data-bg.png'"
|
||||
mode="widthFix"
|
||||
class="loadend"
|
||||
/>
|
||||
</view>
|
||||
<goo-skeleton
|
||||
v-else
|
||||
@@ -169,13 +174,18 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.list-wrap {
|
||||
background-color: #F0F0F0;
|
||||
.loadend {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.list-cont {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 0 21rpx 21rpx 21rpx;
|
||||
background-color: #F0F0F0;
|
||||
.list-cont-left,
|
||||
.list-cont-right {
|
||||
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>
|
||||
<view v-if="ready">
|
||||
|
||||
<view>
|
||||
<view class="my-tabs flex jc-between">
|
||||
<view class="tab-item flex jc-center ai-center"
|
||||
:class="{'active':tabsIndex===index,'has-vertical':tabsVertical===index}" v-for="(item,index) in tabs"
|
||||
:key="index" @click="changeTabs(index)">
|
||||
<view
|
||||
v-for="(item,index) in tabs"
|
||||
:key="index"
|
||||
:class="{
|
||||
'active': tabsIndex === index,
|
||||
'has-vertical':index < 3
|
||||
}"
|
||||
class="tab-item flex jc-center ai-center"
|
||||
@click="changeTabs(index)"
|
||||
>
|
||||
{{ item.label }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
v-if="!isManage"
|
||||
class="manage flex jc-end"
|
||||
|
||||
v-if="(tabsIndex === 0 && productList.length> 0) ||
|
||||
(tabsIndex === 1 && storeList.length> 0) ||
|
||||
(tabsIndex === 2 && videoList.length> 0) ||
|
||||
(tabsIndex === 3 && countyFamousList.length> 0)
|
||||
"
|
||||
>
|
||||
<view class="flex ai-center" @click="changeManage">
|
||||
<image :src="webUrl+'/20240107224533038041.png'" mode="scaleToFill"/>
|
||||
管理
|
||||
<view
|
||||
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
|
||||
v-else
|
||||
class="manage flex jc-end ai-center"
|
||||
style="color:#C41617"
|
||||
@click="changeManage"
|
||||
>
|
||||
<view>退出管理</view>
|
||||
</view>
|
||||
<!--商品列表-->
|
||||
<scroll-view class="scroll-box" :class="{'manage-state':isManage}" scroll-y
|
||||
@scrolltolower="fetchProduct()" v-if="tabsIndex===0">
|
||||
<view class="tc" style="margin-top: 200rpx;" v-if="productList.length===0">
|
||||
<image style="width: 305rpx;height: 332rpx" :src="webUrl+'/20240102232718644743.png'" mode="scaleToFill"/>
|
||||
<scroll-view
|
||||
v-if="tabsIndex === 0"
|
||||
:class="{'manage-state': isManage}"
|
||||
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 class="item-commodity flex ai-center" v-for="(item,index) in productList" :key="index">
|
||||
<CheckboxIcon style="margin-right: 16rpx;" :default-state="item['state']" :mark="[index]" @change="onChange"
|
||||
v-if="isManage"/>
|
||||
<image class="cover flex-0" :src="item['image']" mode="scaleToFill" @click="navToGoods(item['productId'])"/>
|
||||
|
||||
<view
|
||||
v-for="(item,index) in productList"
|
||||
:key="index"
|
||||
class="item-commodity flex ai-center"
|
||||
>
|
||||
<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 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="flex jc-between ai-end">
|
||||
<view class="price flex ai-end" @click="navToGoods(item['productId'])">
|
||||
@@ -56,62 +98,178 @@
|
||||
</view>
|
||||
</scroll-view>
|
||||
<!--店铺列表-->
|
||||
<scroll-view class="scroll-box" :class="{'manage-state':isManage}" scroll-y @scrolltolower="fetchStore()"
|
||||
v-if="tabsIndex===1">
|
||||
<view class="tc" style="margin-top: 200rpx;" v-if="storeList.length===0">
|
||||
<image style="width: 305rpx;height: 332rpx" :src="webUrl+'/20240102232718644743.png'" mode="scaleToFill"/>
|
||||
<scroll-view
|
||||
v-if="tabsIndex === 1"
|
||||
:class="{'manage-state':isManage}"
|
||||
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 class="item-store flex ai-start" v-for="(item,index) in storeList" :key="index">
|
||||
<view
|
||||
v-for="(item,index) in storeList"
|
||||
:key="index"
|
||||
class="item-store flex ai-start"
|
||||
>
|
||||
<view class="flex flex-0 ai-center">
|
||||
<CheckboxIcon style="margin-right: 16rpx;" :default-state="item['state']" :mark="[index]" @change="onChange"
|
||||
v-if="isManage"/>
|
||||
<image class="cover" :src="item['logo']" mode="scaleToFill"/>
|
||||
<CheckboxIcon
|
||||
v-if="isManage"
|
||||
:default-state="item['state']"
|
||||
:mark="[index]"
|
||||
style="margin-right: 16rpx;"
|
||||
@change="onChange"
|
||||
/>
|
||||
<image
|
||||
:src="item['logo']"
|
||||
mode="scaleToFill"
|
||||
class="cover"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view>
|
||||
<view class="flex jc-between ai-start" style="width: 594rpx">
|
||||
<view>
|
||||
<view class="one-t bold">{{ item['name'] }}</view>
|
||||
<view class="sub">{{ item['time'] === '刚刚' ? '刚刚' : item['time'] + '收藏' }}</view>
|
||||
</view>
|
||||
<view class="btn-nav flex jc-center ai-center" :style="{'margin-right':(isManage?48:0)+'rpx'}"
|
||||
@click="navToStore(item['hotelId'])">进店逛逛
|
||||
<image style="width: 24rpx;height: 24rpx" :src="webUrl+'/20240109234706982937.png'" mode="scaleToFill"/>
|
||||
<view
|
||||
:style="{'margin-right':(isManage?48:0)+'rpx'}"
|
||||
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 class="flex jc-start ai-center" style="margin-top: 16rpx;">
|
||||
<image class="img-product" :src="img" mode="scaleToFill"
|
||||
v-for="(img,i) in item['productImages']" :key="i"/>
|
||||
<image
|
||||
v-for="(img,i) in item['productImages']"
|
||||
:key="i"
|
||||
:src="img" mode="scaleToFill"
|
||||
class="img-product"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<!--视频列表-->
|
||||
<scroll-view class="scroll-box" :class="{'manage-state':isManage}" scroll-y
|
||||
@scrolltolower="fetchVideo()"
|
||||
v-if="tabsIndex===2">
|
||||
<view class="tc" style="margin-top: 200rpx;" v-if="videoList.length===0">
|
||||
<image style="width: 305rpx;height: 332rpx" :src="webUrl+'/20240102232718644743.png'" mode="scaleToFill"/>
|
||||
<scroll-view
|
||||
v-if="tabsIndex === 2"
|
||||
scroll-y
|
||||
:class="{'manage-state':isManage}"
|
||||
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 class="flex flex-wrap" style="padding:40rpx 32rpx">
|
||||
<view class="item-video" v-for="(item,index) in videoList" :key="index">
|
||||
<CheckboxIcon class="video-check" :default-state="item['state']" :mark="[index]" @change="onChange"
|
||||
v-if="isManage"/>
|
||||
|
||||
<image class="img-cover" :src="item['cover']" mode="scaleToFill" @click="navToVideo(item['videoId'])"/>
|
||||
<view
|
||||
v-for="(item,index) in videoList"
|
||||
:key="index"
|
||||
class="item-video"
|
||||
>
|
||||
<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">
|
||||
<image class="icon-heart" :src="webUrl+'/20240113205505660820.png'" mode="scaleToFill"/>
|
||||
<image
|
||||
:src="webUrl+'/20240113205505660820.png'"
|
||||
mode="scaleToFill"
|
||||
class="icon-heart"
|
||||
/>
|
||||
<text>{{ item['favoriteCount'] }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</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 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>
|
||||
</view>
|
||||
<view class="flex ai-center">
|
||||
@@ -123,22 +281,27 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getProductList, getStoreList, getVideoList, removeFavorite} from "@/api/favorite";
|
||||
import {postCartAdd} from "@/api/store";
|
||||
import CheckboxIcon from "@/components/CheckboxIcon.vue";
|
||||
import {
|
||||
getProductList,
|
||||
getStoreList,
|
||||
getVideoList,
|
||||
getCountyFamousList,
|
||||
removeFavorite
|
||||
} from '@/api/favorite'
|
||||
import { postCartAdd } from '@/api/store'
|
||||
import CheckboxIcon from '@/components/CheckboxIcon.vue'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
components: {CheckboxIcon},
|
||||
components: { CheckboxIcon },
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
ready: false,
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
tabs: [
|
||||
{key: 0, label: '商品'},
|
||||
{key: 1, label: '店铺'},
|
||||
{key: 2, label: '视频'},
|
||||
{key: 3, label: '千县'},
|
||||
],
|
||||
tabsIndex: 0,
|
||||
isManage: false,
|
||||
@@ -147,17 +310,14 @@ export default {
|
||||
productList: [],
|
||||
storeList: [],
|
||||
videoList: [],
|
||||
countyFamousList: [],
|
||||
pageKeyId: Object.freeze('userCollectionIndex')
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
tabsVertical: function () {
|
||||
if (this.tabsIndex === 0) return 1
|
||||
if (this.tabsIndex === 1) return -1
|
||||
if (this.tabsIndex === 2) return 0
|
||||
},
|
||||
selectCount: function () {
|
||||
let count = 0, countList
|
||||
let count = 0
|
||||
let countList = []
|
||||
switch (this.tabsIndex) {
|
||||
case 0:
|
||||
countList = this.productList
|
||||
@@ -177,7 +337,6 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.ready = true
|
||||
this.fetchProduct()
|
||||
},
|
||||
methods: {
|
||||
@@ -186,7 +345,6 @@ export default {
|
||||
url: "/pages/shop/GoodsCon/index?id=" + id
|
||||
})
|
||||
},
|
||||
|
||||
changeTabs(index) {
|
||||
if (this.isManage) return
|
||||
// fix bug#1111
|
||||
@@ -195,7 +353,6 @@ export default {
|
||||
this.page = 1
|
||||
this.fetchData()
|
||||
},
|
||||
|
||||
fetchData() {
|
||||
switch (this.tabsIndex) {
|
||||
case 0:
|
||||
@@ -207,20 +364,20 @@ export default {
|
||||
case 2:
|
||||
this.fetchVideo()
|
||||
break
|
||||
case 3:
|
||||
this.fetchCountyFamous()
|
||||
break
|
||||
}
|
||||
},
|
||||
|
||||
changeManage() {
|
||||
this.isManage = !this.isManage
|
||||
},
|
||||
|
||||
onChange(state, mark) {
|
||||
if (mark[0] === -1) {
|
||||
this.isAll = state
|
||||
this.handleAll(state)
|
||||
return
|
||||
}
|
||||
|
||||
switch (this.tabsIndex) {
|
||||
case 0:
|
||||
this.productList[mark]['state'] = state
|
||||
@@ -234,9 +391,12 @@ export default {
|
||||
this.videoList[mark]['state'] = state
|
||||
this.isAll = this.selectCount === this.videoList.length
|
||||
break
|
||||
case 3:
|
||||
this.countyFamousList[mark]['state'] = state
|
||||
this.isAll = this.selectCount === this.countyFamousList.length
|
||||
break
|
||||
}
|
||||
},
|
||||
|
||||
handleAll(state) {
|
||||
switch (this.tabsIndex) {
|
||||
case 0:
|
||||
@@ -248,9 +408,11 @@ export default {
|
||||
case 2:
|
||||
this.videoList.forEach(item => item.state = state)
|
||||
break
|
||||
case 3:
|
||||
this.countyFamousList.forEach(item => item.state = state)
|
||||
break
|
||||
}
|
||||
},
|
||||
|
||||
remove() {
|
||||
const _this = this
|
||||
const ids = []
|
||||
@@ -270,6 +432,11 @@ export default {
|
||||
if (item['state']) ids.push(item.id)
|
||||
})
|
||||
break
|
||||
case 3:
|
||||
_this.countyFamousList.forEach(item => {
|
||||
if (item['state']) ids.push(item.id)
|
||||
})
|
||||
break
|
||||
}
|
||||
if (ids.length < 1) {
|
||||
return
|
||||
@@ -292,7 +459,6 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
removeAfter() {
|
||||
switch (this.tabsIndex) {
|
||||
case 0:
|
||||
@@ -304,55 +470,68 @@ export default {
|
||||
case 2:
|
||||
this.videoList = this.videoList.filter(item => !item['state'])
|
||||
break
|
||||
case 3:
|
||||
this.countyFamousList = this.videoList.filter(item => !item['state'])
|
||||
break
|
||||
}
|
||||
},
|
||||
|
||||
async fetchProduct() {
|
||||
let that = this
|
||||
if (that.page === 1) {
|
||||
that.productList = []
|
||||
const _this = this
|
||||
if (_this.page === 1) {
|
||||
_this.productList = []
|
||||
}
|
||||
const res = await getProductList(that.page)
|
||||
const res = await getProductList(_this.page)
|
||||
if (res.success) {
|
||||
res.data['records']?.forEach(item => {
|
||||
item.state = false
|
||||
that.productList.push(item)
|
||||
_this.productList.push(item)
|
||||
})
|
||||
that.page++
|
||||
_this.page++
|
||||
}
|
||||
},
|
||||
|
||||
async fetchStore() {
|
||||
let that = this
|
||||
if (that.page === 1) {
|
||||
that.storeList = []
|
||||
const _this = this
|
||||
if (_this.page === 1) {
|
||||
_this.storeList = []
|
||||
}
|
||||
const res = await getStoreList(that.page)
|
||||
const res = await getStoreList(_this.page)
|
||||
if (res.success) {
|
||||
res.data['records']?.forEach(item => {
|
||||
item.time = uni.$u.timeFrom(Date.parse(item.createTime))
|
||||
item.state = false
|
||||
that.storeList.push(item)
|
||||
_this.storeList.push(item)
|
||||
})
|
||||
that.page++
|
||||
_this.page++
|
||||
}
|
||||
},
|
||||
|
||||
async fetchVideo() {
|
||||
let that = this
|
||||
if (that.page === 1) {
|
||||
that.videoList = []
|
||||
const _this = this
|
||||
if (_this.page === 1) {
|
||||
_this.videoList = []
|
||||
}
|
||||
const res = await getVideoList(that.page)
|
||||
const res = await getVideoList(_this.page)
|
||||
if (res.success) {
|
||||
res.data['records']?.forEach(item => {
|
||||
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) {
|
||||
const param = {
|
||||
productId: item.productId,
|
||||
@@ -367,23 +546,25 @@ export default {
|
||||
}).catch()
|
||||
}
|
||||
},
|
||||
|
||||
navToStore(id) {
|
||||
uni.navigateTo({
|
||||
url: '/pagesInn/inn/innHome?id=' + id
|
||||
})
|
||||
},
|
||||
|
||||
navToVideo(videoId) {
|
||||
if (this.isManage) return
|
||||
uni.navigateTo({
|
||||
url: '/pkg-video/views/watch?videoId=' + videoId
|
||||
})
|
||||
},
|
||||
gotoQianxianShop(item) {
|
||||
if (this.isManage) return
|
||||
uni.navigateTo({
|
||||
url: `/pkg_product/views/famousQianxianShop?id=${item.countyFamousDataId}`
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@@ -407,13 +588,16 @@ export default {
|
||||
color: #FFFFFF;
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
&.has-vertical:after {
|
||||
width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.has-vertical:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: 0;
|
||||
width: 2rpx;
|
||||
width: 0;
|
||||
height: 36rpx;
|
||||
background: #999999;
|
||||
}
|
||||
@@ -434,6 +618,19 @@ export default {
|
||||
height: calc(100vh - 168rpx);
|
||||
box-sizing: border-box;
|
||||
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 {
|
||||
@@ -583,4 +780,54 @@ export default {
|
||||
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>
|
||||
Reference in New Issue
Block a user