Feat:接口对接

This commit is contained in:
lifizer
2023-11-20 15:54:00 +08:00
parent 4652b6706a
commit a3ac5a2506
24 changed files with 2305 additions and 152 deletions
+47
View File
@@ -62,3 +62,50 @@ export function getSeason(id) {
export function getSeasonPoster(id) {
return request.get("/seasonalFood/poster/" + id, {}, {login: true})
}
/**
* 民宿专题
* */
export function getHomestay(id) {
return request.get(`/contentHomestay/${id}`, {}, {login: false})
}
/**
* 节日专题
* */
export function getFestival() {
return request.get('/contentFestival', {}, {login: false})
}
/*
* 非遗文化
* */
export function getICH() {
return request.get('/ich/index', {}, {login: false})
}
/*
* 非遗文化详情
* */
export function getICHDetails(id) {
return request.get(`/ich/content/${id}`, {}, {login: false})
}
/*
* 地标好物-省份列表
* */
export function getProvinceList() {
return request.get('/landmarkGoods/provinceList', {}, {login: false})
}
/*
* 地标好物-地图数据
* */
export function getProvince(id) {
return request.get(`/landmarkGoods/province/${id}`, {}, {login: false})
}
export function getProvinceGoods(parentId, keyword, page) {
const params = `?parentId=${parentId}&keyword=${keyword}&page=${page}&limit=10`;
return request.get('/landmarkGoods/productList' + params, {}, {login: false})
}
+21
View File
@@ -0,0 +1,21 @@
import request from "@/utils/request";
// 天天秒杀分享图片
export function secKillShareImage() {
return request.get('/seckill/shareImage', {}, {login: false})
}
// 天天秒杀商品分享图片
export function secKillGoodsShareImage(id) {
return request.get('/seckill/shareImage/'+id, {}, {login: false})
}
// 千县名品分享图片
export function famousShareImage() {
return request.get('/countyFamous/shareImage', {}, {login: false})
}
// 千县名品商品分享图片
export function famousGoodsShareImage(id) {
return request.get('/countyFamous/shareImage/'+id, {}, {login: false})
}
+5 -5
View File
@@ -1,7 +1,7 @@
<template>
<view
class="Loads acea-row row-center-wrapper"
v-if="loading || !loaded"
v-if="loading || !loadend"
style="margin-top: 20rpx;"
>
<template v-if="loading">
@@ -10,9 +10,9 @@
></view>
正在加载中
</template>
<template v-else>
上拉加载更多
</template>
<!-- <template v-else>-->
<!-- 上拉加载更多-->
<!-- </template>-->
</view>
</template>
@@ -20,7 +20,7 @@
export default {
name: "Loading",
props: {
loaded: Boolean,
loadend: Boolean,
loading: Boolean
}
};
+1 -1
View File
@@ -17,7 +17,7 @@
</view>
<view class="productWinList">
<view class="item" v-for="(item, indexw) in attr.productAttr" :key="indexw">
<view class="title">{{ item.attrName }} 438</view>
<view class="title">{{ item.attrName }}</view>
<view class="listn acea-row row-middle">
<view
class="itemn"
+1 -1
View File
@@ -21,7 +21,7 @@
</view>
</view>
</view>
<Loading :loaded="loadend" :loading="loading"></Loading>
<Loading :loadend="loadend" :loading="loading"></Loading>
</view>
</template>
<script>
+57 -28
View File
@@ -36,6 +36,12 @@
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/home/landMark",
"style": {
"navigationBarTitleText": "地标好物"
}
},
{
"path": "components/chose-city/chose-city",
"style": {
@@ -104,12 +110,6 @@
"navigationBarTitleText": "404"
}
},
// {
// "path": "pages/cloud/cloud",
// "style": {
// "navigationBarTitleText": "七彩云上"
// }
// },
{
"path": "pages/cloud/haveFun",
"style": {
@@ -607,12 +607,42 @@
{
"root": "pkg_product",
"pages": [
{
"path": "views/festival",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "views/healthList",
"style": {
"navigationBarTitleText": "康养 · 食材"
}
},
{
"path": "views/heritage",
"style": {
"navigationBarTitleText": "非遗文化"
}
},
{
"path": "views/heritageGoods",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "views/heritageVideo",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "views/homestay",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "views/giftList",
"style": {
@@ -620,12 +650,6 @@
"onReachBottomDistance": 100
}
},
{
"path": "views/landMark",
"style": {
"navigationBarTitleText": "地标好物"
}
},
{
"path": "views/famousList",
"style": {
@@ -876,18 +900,18 @@
"selectedIconPath": "static/tabbar/icon-home-hot.png",
"text": "首页"
},
{
"pagePath": "pages/home/landMark",
"iconPath": "static/tabbar/icon-land.png",
"selectedIconPath": "static/tabbar/icon-land-hot.png",
"text": "地标好物"
},
{
"pagePath": "pages/shop/ShoppingCart/index",
"iconPath": "static/tabbar/icon-cart.png",
"selectedIconPath": "static/tabbar/icon-cart-hot.png",
"text": "购物车"
},
{
"pagePath": "pages/cloud/haveFun",
"iconPath": "static/tabbar/icon-cloud.png",
"selectedIconPath": "static/tabbar/icon-cloud-hot.png",
"text": "寻趣味"
},
{
"pagePath": "pages/user/User/index",
"iconPath": "static/tabbar/icon-user.png",
@@ -897,27 +921,32 @@
]
},
"condition": {
"current": 0,
"current": 3,
"list": [
{
"name": "商品详情",
"path": "pages/shop/GoodsCon/index",
"query": "id=369"
"query": "id=303&from=famous"
},
{
"name": "DEBUG",
"path": "pages/shop/ShoppingCart/index",
"query": "id=297"
"path": "pkg_product/views/healthList",
"query": "id=32"
},
{
"name": "No.8",
"path": "pages/shop/GoodsEvaluate/index",
"query": "id=eb30f8a98b1c4952addbdccb1d37533d"
"name": "节日",
"path": "pkg_product/views/festival",
"query": ""
},
{
"name": "时令尝鲜",
"path": "pkg_product/views/season",
"query": "id=20"
"name": "非遗",
"path": "pkg_product/views/heritage",
"query": ""
},
{
"name": "地标好物",
"path": "pages/home/landMark",
"query": ""
}
]
}
+127 -31
View File
@@ -66,10 +66,10 @@
</view>
<!-- 快捷跳转块v4end -->
<view style="padding-bottom:20rpx;background: #fff;">
<!-- <view style="padding-bottom:20rpx;background: #fff;">-->
<!-- 转盘-->
<!-- <image class="home-luck" :src="`${webUrl}/20220519145845818243.png`" mode="scaleToFill" @click="goLuck"></image>-->
</view>
<!-- </view>-->
<!-- 伴手礼精品 -->
<!-- <view class="wrapper hot" v-if="likeInfo.length > 0">-->
@@ -212,30 +212,48 @@
<!-- v4 每天特价结束 -->
<!-- v9 专题 -->
<!-- <view class="subject-box">-->
<!-- <view class="section-half flex jc-between">-->
<!-- <image src="@/static/images/v9/subject-148@2x.png" mode="scaleToFill"/>-->
<!-- <image src="@/static/images/v9/subject-149@2x.png" mode="scaleToFill"/>-->
<!-- </view>-->
<!-- <view class="section-full flex jc-between">-->
<!-- <image src="@/static/images/v9/subject-148@2x.png" mode="scaleToFill"/>-->
<!-- <image src="@/static/images/v9/subject-149@2x.png" mode="scaleToFill"/>-->
<!-- </view>-->
<!-- </view>-->
<view class="subject-box">
<view class="section-half flex jc-between">
<image class="bg-img" :src="countyFamous.backgroundImage" mode="scaleToFill"
@click="$global.commonJump('/pkg_product/views/famousList')" v-if="countyFamous.backgroundImage"/>
<view class="food-box" @click="$global.commonJump('/pkg_product/views/seasonList')">
<image class="bg-img" :src="seasonalFood.backgroundImage" mode="scaleToFill"
v-if="seasonalFood.backgroundImage"/>
<swiper class="swiper" circular autoplay :interval="3000">
<swiper-item v-for="(arr,arrIndex) in seasonalFood.groupList" :key="arrIndex">
<view class="flex">
<image :src="item.image" mode="scaleToFill" v-for="(item,index) in arr" :key="index"/>
</view>
</swiper-item>
</swiper>
</view>
</view>
<view class="section-full flex jc-between">
<swiper class="swiper" circular autoplay :interval="3000">
<swiper-item v-for="(stay,stayIndex) in contentHomestay" :key="stayIndex">
<image :src="stay.indexImage" mode="scaleToFill" @click="goHomeStay(stay)"/>
</swiper-item>
</swiper>
<!-- <image :src="contentHomestay.indexImage" mode="scaleToFill" @click="goHomeStay" v-if="contentHomestay.indexImage"/>-->
<image :src="contentFestival.indexImage" mode="scaleToFill" @click="goFestival"
v-if="contentFestival.indexImage"/>
</view>
</view>
<!-- v9 老用户弹窗 -->
<!-- <u-popup :show="isOldUser" mode="center" bgColor="transparent">-->
<!-- <view class="popup-old-user flex flex-col ai-center">-->
<!-- <image class="main" src="@/static/images/v9/subject-149@2x.png" mode="scaleToFill"/>-->
<!-- <view class="icon-box flex jc-center ai-center" @click="isOldUser=false">-->
<!-- <image :src="webUrl+'/20230608112219219303.png'" mode="scaleToFill"/>-->
<!-- </view>-->
<!-- </view>-->
<!-- </u-popup>-->
<u-popup :show="isOldUser" mode="center" bgColor="transparent">
<view class="popup-old-user flex flex-col ai-center">
<image class="main" :src="oldUserPopup.image" mode="scaleToFill" @click="$global.commonJump(oldUserPopup.url)"/>
<view class="icon-box flex jc-center ai-center" @click="changeOldPopup(false)">
<image :src="webUrl+'/20230608112219219303.png'" mode="scaleToFill"/>
</view>
</view>
</u-popup>
<!-- 2022/6/20 add 尖货推荐 special-offer-->
<view class="bast-box">
<view style="padding: 0 32rpx">
<view style="padding: 0 32rpx;background: #FFFFFF;">
<image class="bast-title" :src="webUrl+'/20230407111908318221.png'" mode="scaleToFill"/>
</view>
<view class="list flex" v-if="bastList.length">
@@ -431,6 +449,11 @@ export default {
bannarList: [], // 尖货推荐横幅
shareAppImg: "", // 发送给朋友
isOldUser: true, // 老用户弹窗
oldUserPopup: {},
contentHomestay: {},
contentFestival: {},
countyFamous: {},
seasonalFood: {}
};
},
onLoad: function (options) {
@@ -545,6 +568,23 @@ export default {
}
return item;
}));
that.$set(that, 'oldUserPopup', res.data.oldUserPopup)
that.$set(that, 'contentHomestay', res.data.contentHomestay)
that.$set(that, 'contentFestival', res.data.contentFestival)
that.$set(that, 'countyFamous', res.data.countyFamous)
// 处理时令尝鲜轮播图所需数据
const foodLen = res.data.seasonalFood.productsCarousels.length;
const foods = res.data.seasonalFood.productsCarousels;
let groupList = [];
if (foodLen) {
const count = 4;
for (let i = 0; i < foodLen; i += count) {
groupList.push(foods.slice(i, i + count))
}
}
res.data.seasonalFood.groupList = groupList;
that.$set(that, 'seasonalFood', res.data.seasonalFood)
if (that.firstList.length > 0) {
that.newGoods = that.firstList[0];
@@ -575,12 +615,12 @@ export default {
}, 1)
// 尖货推荐
let temp = {
storeName: "swiper",
image: "https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg",
bannarList: that.bannarList
}
res.data.bastList.unshift(temp);
// let temp = {
// storeName: "swiper",
// image: "https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg",
// bannarList: that.bannarList
// }
// res.data.bastList.unshift(temp);
for (let i = 0; i < res.data.bastList.length; i++) {
res.data.bastList[i].hide = true;
}
@@ -838,6 +878,28 @@ export default {
from
}
});
},
changeOldPopup(state) {
this.isOldUser = state;
},
goHomeStay(stay) {
if (stay.type === 2 && stay.isLinkToProduct) {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: {
id: stay.productId
}
});
}
if (stay.type === 1) {
uni.navigateTo({url: '/pkg_product/views/homestay?id=' + stay.id})
}
},
goFestival() {
uni.navigateTo({url: '/pkg_product/views/festival'})
}
}
};
@@ -1721,7 +1783,8 @@ export default {
}
.subject-box {
padding: 40rpx 32rpx;
padding: 20rpx 32rpx 40rpx;
background: #FFFFFF;
image {
vertical-align: middle;
@@ -1730,10 +1793,38 @@ export default {
.section-half {
margin-bottom: 16rpx;
image {
.bg-img {
width: 336rpx;
height: 180rpx;
}
.food-box {
position: relative;
width: 336rpx;
height: 180rpx;
overflow: hidden;
.swiper {
position: absolute;
left:20rpx;
bottom:20rpx;
width: 296rpx;
height: 72rpx;
overflow: hidden;
z-index: 10;
image {
width: 72rpx;
height: 72rpx;
margin-right: 4rpx;
border-radius: 4rpx;
}
image:last-child {
margin-right: 0;
}
}
}
}
.section-full {
@@ -1741,6 +1832,11 @@ export default {
width: 336rpx;
height: 480rpx;
}
.swiper {
width: 336rpx;
height: 480rpx;
}
}
}
@@ -1773,7 +1869,7 @@ export default {
.bast-title {
width: 312rpx;
height: 40rpx;
margin: 32rpx 0 16rpx;
margin: 16rpx 0 16rpx;
}
.bannar-swiper {
@@ -1786,7 +1882,7 @@ export default {
}
.list {
padding: 0 32rpx 32rpx;
padding: 32rpx;
.item {
position: relative;
+426
View File
@@ -0,0 +1,426 @@
<script>
import {getProvince, getProvinceGoods, getProvinceList} from "@/api/product";
export default {
name: "landMark",
data() {
return {
webUrl: this.$VUE_APP_RESOURCES_URL,
keyword: '',
page: 1,
navList: [],
navIndex: 0,
mapData: null,
mapLocations: [],
goods: [],
directionClass: ['', 'up', 'right', 'down', 'left'],
}
},
computed: {
topBoxBgColor() {
return this.navList.length > 0 ? this.navList[this.navIndex]['backgroundColor'] : '#FFFFFF';
},
viewBoxBgColor() {
return this.mapData?.backgroundColor || '#FFFFFF';
},
scale() {
return 718 / (this.mapData?.mapImageWidth || 1);
}
},
onShow() {
this.getNavList();
},
onReachBottom() {
this.page++;
this.fetchGoods();
},
methods: {
getNavList() {
getProvinceList().then(({data}) => {
this.navList = data;
this.changeNav(this.navIndex);
});
},
search() {
this.page = 1;
this.fetchGoods();
},
changeNav(index) {
this.navIndex = index;
this.page = 1;
this.getMap();
this.fetchGoods();
},
getMap() {
const id = this.navList[this.navIndex]['id']
getProvince(id).then(({data}) => {
this.mapData = data;
this.mapLocations = data.mapLocations;
this.calcPosition();
});
},
// 计算位置
calcPosition() {
this.mapLocations?.forEach(item => {
item.gx = item.x * this.scale;
item.gy = item.y * this.scale;
})
},
fetchGoods() {
const id = this.navList[this.navIndex]['id']
getProvinceGoods(id, this.keyword, this.page).then(({data}) => {
if (this.page === 1) this.goods = [];
for (let i = 0; i < data.length; i++) {
this.goods.push(data[i]);
}
})
}
}
}
</script>
<template>
<view class="pkg-product-land-mark" v-if="mapData">
<view class="top-box" :style="{'backgroundColor':topBoxBgColor}">
<view class="view-box">
<view class="search-box flex ai-center">
<input type="text" v-model="keyword" placeholder="搜索商品" placeholder-style="color:#999"
@confirm="search()"/>
</view>
<view class="map-box">
<image class="img-map" :src="mapData.mapImage" mode="widthFix"/>
<view class="item" :style="{'left':item.gx+'rpx','top':item.gy+'rpx'}" v-for="item in mapLocations" @click="$global.navToGoods(item.productId)">
<view class="round">
<view class="line" :class="'line-'+directionClass[item.labelDirection]"></view>
</view>
<view class="label flex ai-end" :class="'label-'+directionClass[item.labelDirection]">
<image class="cover flex-0" :src="item.mapImage" mode="scaleToFill" v-if="item.labelDirection===4"/>
<view class="title flex ai-center">{{ item.mapTitle }}</view>
<image class="cover flex-0" :src="item.mapImage" mode="scaleToFill" v-if="item.labelDirection!==4"/>
</view>
</view>
</view>
</view>
<view class="nav flex">
<view class="flex flex-0 ai-center" :class="{'active': navIndex===index}" v-for="(item,index) in navList"
:key="index" @click="changeNav(index)">{{ item.provinceName }}
</view>
</view>
</view>
<view class="main-box" v-if="mapData.recommended.storeImage"
@click="$global.navToGoods(mapData.recommended.productId)">
<image class="bg-main" :src="mapData.recommended.storeImage" mode="scaleToFill"/>
<view class="box-mask flex flex-col jc-end">
<view class="one-t bold">{{ mapData.recommended.title }}</view>
<view class="more-t">{{ mapData.recommended.description }}</view>
</view>
</view>
<view class="list-box flex flex-wrap">
<view class="item" v-for="item in goods" :key="item.id" @click="$global.navToGoods(item.productId)">
<image :src="item.storeImage" mode="scaleToFill"/>
<view class="content flex flex-col jc-between">
<view class="more-t bold">{{ item.title }}</view>
<view class="flex jc-between ai-center">
<text class="price">{{ item.price }}</text>
<image class="btn" :src="webUrl+'/20231114151028082368.png'" mode="scaleToFill"/>
<!-- <view class="btn flex jc-center ai-center">立即购买</view>-->
</view>
</view>
</view>
</view>
<image class="img-nodata" :src="webUrl+'/20231023131208675588.png'" mode="scaleToFill"
v-if="goods.length===0"/>
</view>
</template>
<style scoped lang="less">
.pkg-product-land-mark {
background: #F7F3ED;
image {
vertical-align: middle;
}
.top-box {
padding: 32rpx 0 20rpx;
.view-box {
position: relative;
margin: 0 16rpx;
border-radius: 40rpx;
overflow: hidden;
.search-box {
position: absolute;
top: 20rpx;
left: 34rpx;
width: 650rpx;
height: 64rpx;
padding: 0 32rpx;
box-sizing: border-box;
border-radius: 32rpx;
background: #FFFFFF;
z-index: 10;
input {
width: 100%;
height: 100%;
line-height: 64rpx;
font-size: 28rpx;
}
}
.map-box {
position: relative;
width: 718rpx;
.img-map {
width: 718rpx;
height: auto;
}
.item {
position: absolute;
.round {
width: 8rpx;
height: 8rpx;
border-radius: 50%;
box-shadow: 0 0 0 8rpx rgba(225, 38, 65, .4);;
background: #E12641;
}
.line {
position: relative;
border: 2rpx solid #E12641;
}
.line-up {
left: 50%;
transform: translate(-50%, -100%);
width: 0;
height: 30rpx;
}
.line-right {
top: 50%;
transform: translate(0, -50%);
width: 30rpx;
height: 0;
}
.line-down {
left: 50%;
transform: translate(-50%, 0);
width: 0;
height: 30rpx;
}
.line-left {
top: 50%;
transform: translate(-100%, -50%);
width: 30rpx;
height: 0;
}
.label {
position: relative;
.cover {
width: 60rpx;
height: 60rpx;
box-sizing: border-box;
border: 6rpx solid #E12641;
border-radius: 50%;
z-index: 20;
}
.title {
height: 32rpx;
box-sizing: border-box;
margin-bottom: 10rpx;
padding: 0 16rpx;
background: #E12641;
color: #FFFFFF;
font-size: 22rpx;
line-height: 32rpx;
white-space: nowrap;
z-index: 10;
}
}
.label-up {
top: -80rpx;
left: -50%;
.title {
margin-right: -9rpx;
border-radius: 20rpx 0 0 20rpx;
}
}
.label-right {
top: -40rpx;
left: 32rpx;
.title {
margin-right: -9rpx;
border-radius: 20rpx 0 0 20rpx;
}
}
.label-down {
left: -50%;
.title {
margin-right: -9rpx;
border-radius: 20rpx 0 0 20rpx;
}
}
.label-left {
left: -100%;
transform: translate(-30rpx, -40rpx);
.title {
margin-left: -9rpx;
border-radius: 0 20rpx 20rpx 0;
}
}
}
}
}
.nav {
padding: 30rpx 20rpx 0;
overflow-x: scroll;
view {
height: 52rpx;
box-sizing: border-box;
padding: 0 18rpx;
border: 4rpx solid transparent;
color: #FFFFFF;
font-size: 32rpx;
}
.active {
border-color: #FFFFFF;
border-radius: 26rpx;
}
}
}
.main-box {
position: relative;
width: 718rpx;
height: 360rpx;
margin: 24rpx 16rpx;
border-radius: 16rpx;
overflow: hidden;
.bg-main {
width: 718rpx;
height: 360rpx;
}
.box-mask {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 200rpx;
box-sizing: border-box;
padding: 20rpx 16rpx 16rpx;
background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%);
color: #FFFFFF;
.one-t {
margin-bottom: 16rpx;
font-size: 46rpx;
line-height: 52rpx;
}
.more-t {
width: 100%;
box-sizing: border-box;
padding-top: 10rpx;
border-top: 1rpx solid #FFFFFF;
font-size: 28rpx;
line-height: 32rpx;
}
}
}
.list-box {
margin-top: 24rpx;
padding: 0 16rpx 34rpx;
.item {
width: 234rpx;
height: 380rpx;
margin-right: 8rpx;
margin-bottom: 24rpx;
border-radius: 12rpx;
background: #FFFFFF;
overflow: hidden;
image {
width: 234rpx;
height: 234rpx;
}
.content {
height: 122rpx;
margin: 6rpx 6rpx 18rpx;
.more-t {
font-size: 28rpx;
line-height: 36rpx;
color: #333333;
}
.price {
font-size: 28rpx;
line-height: 36rpx;
color: #DC1616;
}
.btn {
width: 118rpx;
height: 42rpx;
//background: linear-gradient(180deg, #EFEDC7 0%, #EAC94B 100%);
//border-radius: 4rpx;
//color: #764A00;
//font-size: 24rpx;
}
}
}
.item:nth-child(3n) {
margin-right: 0;
}
}
.img-nodata {
position: relative;
top: 0;
left: 50%;
transform: translate(-50%, 0);
width: 352rpx;
height: 338rpx;
margin-bottom: 60rpx;
}
}
</style>
+45 -22
View File
@@ -4,15 +4,16 @@
</hx-navbar>
<view v-if="storeInfo.id">
<!-- 原模块 -->
<product-con-swiper :img-urls="storeInfo.sliderImageArr" v-if="from!='pre' && from!='day'"></product-con-swiper>
<product-con-swiper :img-urls="storeInfo.sliderImageArr"
v-if="source!='pre' && source!='day'"></product-con-swiper>
<!-- v4 预售轮播图 -->
<product-con-swiper :img-urls="preInfo.sliderImageArr" v-if="from==='pre'"></product-con-swiper>
<product-con-swiper :img-urls="preInfo.sliderImageArr" v-if="source==='pre'"></product-con-swiper>
<!-- v4 每日特价轮播图 -->
<product-con-swiper :img-urls="dayInfo.sliderImageArr" v-if="from==='day'"></product-con-swiper>
<product-con-swiper :img-urls="dayInfo.sliderImageArr" v-if="source==='day'"></product-con-swiper>
<view class="wrapper">
<!-- 原模块 -->
<view class="change-section bg-white" v-if="from===''">
<view class="change-section bg-white" v-if="source==='' || source==='famous' ">
<view class="introduce bold">{{ storeInfo.storeName }}</view>
<rich-text class="subInfo" :nodes="storeInfo.storeInfo" v-if="storeInfo.storeInfo"/>
<view class="share acea-row row-between row-middle" style="flex-wrap: nowrap;">
@@ -52,15 +53,15 @@
</view>
</view>
<!-- 文玩 -->
<!-- <view class="wenwan-info flex jc-between ai-center" v-if="isWenwan===1">
<text>产地:{{ storeInfo.origin }}</text>
<text>单位:{{ storeInfo.unitName }}</text>
<text>规格:{{ storeInfo.storeInfo }}</text>
</view> -->
<!-- <view class="wenwan-info flex jc-between ai-center" v-if="isWenwan===1">-->
<!-- <text>产地:{{ storeInfo.origin }}</text>-->
<!-- <text>单位:{{ storeInfo.unitName }}</text>-->
<!-- <text>规格:{{ storeInfo.storeInfo }}</text>-->
<!-- </view>-->
</view>
<!-- v4 特产 -->
<view class="spe-section change-section bg-white" v-if="from==='spe'">
<view class="spe-section change-section bg-white" v-if="source==='spe'">
<view class="spe-line-1 flex ai-center">
<img class="icon-spe" :src="webUrl+'/20220514112935428191.png'" mode="scaleToFill">
<view class="one-t">{{ storeInfo.storeName }}</view>
@@ -110,7 +111,7 @@
</view>
<!-- v4 预售抬头 -->
<view class="pre-section change-section bg-white" v-if="from==='pre'">
<view class="pre-section change-section bg-white" v-if="source==='pre'">
<view class="pre-line-1 flex">
<view class="surplus flex">
@@ -141,7 +142,7 @@
</view>
<!-- v4 秒杀抬头 -->
<view class="kill-section change-section bg-white" v-if="from==='kill'">
<view class="kill-section change-section bg-white" v-if="source==='kill'">
<view class="kill-line-1 more-t">{{ killInfo.storeInfo.title }}</view>
@@ -167,7 +168,7 @@
</view>
<!-- v4 每日特价抬头 -->
<view class="day-section change-section bg-white" v-if="from==='day'">
<view class="day-section change-section bg-white" v-if="source==='day'">
<view class="day-line-1 flex ai-center">
<img class="icon-day" :src="webUrl+'/20220514103348573632.png'" mode="scaleToFill">
<view class="one-t">{{ dayInfo.title }}</view>
@@ -401,11 +402,11 @@
<view class="product-intro" style="margin-top: 24rpx">
<!-- 原模块 -->
<!-- <view class="conter" v-html="storeInfo.description" ></view>-->
<rich-text :nodes="storeInfo.description" v-if="from!='pre' && from!='day'"/>
<rich-text :nodes="storeInfo.description" v-if="source!='pre' && source!='day'"/>
<!-- v4 预售详情 -->
<rich-text :nodes="preInfo.description" v-if="from==='pre'"/>
<rich-text :nodes="preInfo.description" v-if="source==='pre'"/>
<!-- v4 每日特价详情 -->
<rich-text :nodes="dayInfo.description" v-if="from==='day'"/>
<rich-text :nodes="dayInfo.description" v-if="source==='day'"/>
</view>
<!-- 商品详情结束 -->
@@ -501,6 +502,7 @@ import {mapGetters} from "vuex";
import {diffDay, formatDateTime} from "@/utils/index";
import {getCurAddress, getLocation, getUrlParam} from "@/utils/common.js";
import cookie from "@/utils/store/cookie";
import {famousGoodsShareImage, secKillGoodsShareImage} from "@/api/share";
export default {
name: "GoodsCon",
@@ -542,7 +544,7 @@ export default {
id: null,
partnerId: null,
activityId: 0, // v4 add
from: "", // v4 add
source: "", // v4 add
preInfo: {},
killInfo: {},
dayInfo: {},
@@ -582,7 +584,28 @@ export default {
webUrl: this.$VUE_APP_RESOURCES_URL
};
},
computed: mapGetters(["isLogin", "location"]),
computed: mapGetters(["isLogin", "location", "userInfo"]),
onShareAppMessage() {
return new Promise(async (resolve, reject) => {
let result;
let params = `?id=${this.id}&partnerId=${this.userInfo.uid}`;
if (this.source === 'famous') {
result = await famousGoodsShareImage(this.id);
}
if (this.source === 'kill') {
result = await secKillGoodsShareImage(this.activityId);
params += `&activityId=${this.activityId}`
}
if (result.status === 200) {
resolve({
title: this.storeInfo.storeName,
path: '/pages/shop/GoodsCon/index' + params,
imageUrl: result.data
})
}
})
},
onLoad: function (options) {
// test data
console.log("getLaunchOptionsSync", uni.getLaunchOptionsSync());
@@ -595,7 +618,7 @@ export default {
this.id = options.id || null;
this.partnerId = options.partnerId || null;
this.activityId = this._route.query.activityId;
this.from = this._route.query.from || "";
this.source = this._route.query.from || "";
} else {
let obj = uni.getEnterOptionsSync();
if (options.scene != null || obj.query.scene != null) {
@@ -625,7 +648,7 @@ export default {
this.productCon();
this.fetchCompanyDatea();
switch (this.from) {
switch (this.source) {
case "pre":
this.getPreInfo();
break;
@@ -942,7 +965,7 @@ export default {
that.isWenwan = res.data.isWenwan;
// 给 attr 赋值,将请求回来的规格赋值给 attr
if (this.from === "") {
if (this.source === "" || this.source === 'famous') {
that.$set(that.attr, "productAttr", res.data.productAttr);
that.$set(that, "productValue", res.data.productValue);
}
@@ -1229,7 +1252,7 @@ export default {
};
// v4 新增活动ID
switch (this.from) {
switch (this.source) {
case "pre":
q.preSaleId = Number(this.activityId)
break;
+1 -1
View File
@@ -68,7 +68,7 @@
</view>
</view>
</view>
<Loading :loaded="loadend" :loading="loading"></Loading>
<!-- <Loading :loaded="loadend" :loading="loading"></Loading>-->
<view
class="noCommodity"
style="background-color: #fff;"
+924
View File
@@ -0,0 +1,924 @@
{
"easycom": {
"^u-(.*)": "@/uni_modules/uview-ui/components/u-$1/u-$1.vue"
},
"pages": [
{
"path": "pages/Loading/index",
"style": {
"navigationBarTitleText": "香道滇",
"navigationStyle": "custom"
}
},
{
"path": "pages/authorization/index",
"style": {
"navigationBarTitleText": "微信授权"
}
},
{
"path": "pages/user/Login/index",
"style": {
"navigationBarTitleText": "登录"
}
},
{
"path": "pages/user/RetrievePassword/index",
"style": {
"navigationBarTitleText": "重置密码"
}
},
{
"path": "pages/home/index",
"style": {
"navigationBarTitleText": "香道滇",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "components/chose-city/chose-city",
"style": {
"navigationBarTitleText": "选择城市"
}
},
{
"path": "pages/foodInfomation/information",
"style": {
"navigationBarTitleText": "彩云资讯"
}
},
{
"path": "pages/foodInfomation/foodInfomation",
"style": {
"navigationBarTitleText": "美食攻略",
"navigationStyle": "custom",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": true
}
},
{
"path": "pages/foodInfomation/foodInfomationDetail",
"style": {
"navigationBarTitleText": "资讯详情",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/shop/GoodSearch/index",
"style": {
"navigationBarTitleText": "搜索商品"
}
},
{
"path": "pages/shop/GoodsClass/index",
"style": {
"navigationBarTitleText": "分类",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/shop/ShoppingCart/index",
"style": {
"navigationBarTitleText": "购物车",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/shop/StoreList/index",
"style": {
"navigationBarTitleText": "商家列表"
}
},
{
"path": "pages/shop/GoodsList/index",
"style": {
"navigationBarTitleText": "商品列表"
}
},
{
"path": "pages/NotDefined/index",
"style": {
"navigationBarTitleText": "404"
}
},
// {
// "path": "pages/cloud/cloud",
// "style": {
// "navigationBarTitleText": "七彩云上"
// }
// },
{
"path": "pages/cloud/haveFun",
"style": {
"navigationBarTitleText": "寻趣味",
"navigationStyle": "custom"
}
},
{
"path": "pages/user/User/index",
"style": {
"navigationBarTitleText": "我的",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/shop/GoodsCollection/index",
"style": {
"navigationBarTitleText": "商品收藏"
}
},
{
"path": "pages/shop/EvaluateList/index",
"style": {
"navigationBarTitleText": "评价列表"
}
},
{
"path": "pages/shop/GoodsEvaluate/index",
"style": {
"navigationBarTitleText": "商品评价"
}
},
{
"path": "pages/shop/GoodsPromotion/index",
"style": {
"navigationBarTitleText": "促销商品"
}
},
{
"path": "pages/shop/HotNewGoods/index",
"style": {
"navigationBarTitleText": "热门商品"
}
},
{
"path": "pages/shop/GoodsCon/index",
"style": {
"navigationBarTitleText": "商品详情",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/user/address/AddAddress/index",
"style": {
"navigationBarTitleText": "新增收货地址"
}
},
{
"path": "pages/user/UserAccount/index",
"style": {
"navigationBarTitleText": "账户余额"
}
},
{
"path": "pages/user/address/AddressManagement/index",
"style": {
"navigationBarTitleText": "收货地址"
}
},
{
"path": "pages/user/promotion/Poster/index",
"style": {
"navigationBarTitleText": "推广名片"
}
},
{
"path": "pages/user/signIn/Sign/index",
"style": {
"navigationBarTitleText": "签到"
}
},
{
"path": "pages/user/signIn/SignRecord/index",
"style": {
"navigationBarTitleText": "签到记录"
}
},
{
"path": "pages/user/promotion/CashAudit/index",
"style": {
"navigationBarTitleText": "提现结果"
}
},
{
"path": "pages/user/promotion/PromoterOrder/index",
"style": {
"navigationBarTitleText": "分销详情"
}
},
{
"path": "pages/user/promotion/PromoterList/index",
"style": {
"navigationBarTitleText": "分销列表",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/user/promotion/UserPromotion/index",
"style": {
"navigationBarTitleText": "团队管理",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/user/UserBill/index",
"style": {
"navigationBarTitleText": "账单记录"
}
},
{
"path": "pages/user/promotion/CashRecord/index",
"style": {
"navigationBarTitleText": "提现记录"
}
},
{
"path": "pages/user/promotion/CommissionDetails/index",
"style": {
"navigationBarTitleText": "佣金明细"
}
},
{
"path": "pages/user/signIn/Integral/index",
"style": {
"navigationBarTitleText": "我的积分"
}
},
{
"path": "pages/user/UserVip/index",
"style": {
"navigationBarTitleText": "用户vip"
}
},
{
"path": "pages/user/coupon/UserCoupon/index",
"style": {
"navigationBarTitleText": "优惠券"
}
},
{
"path": "pages/user/coupon/GetCoupon/index",
"style": {
"navigationBarTitleText": "领取优惠券"
}
},
{
"path": "pages/user/promotion/UserCash/index",
"style": {
"navigationBarTitleText": "提现"
}
},
{
"path": "pages/user/CustomerList/index",
"style": {
"navigationBarTitleText": "客服列表"
}
},
{
"path": "pages/user/Recharge/index",
"style": {
"navigationBarTitleText": "充值"
}
},
{
"path": "pages/order/MyOrder/index",
"style": {
"navigationBarTitleText": "我的订单",
"navigationBarBackgroundColor": "#fff"
}
},
{
"path": "pages/order/Logistics/index",
"style": {
"navigationBarTitleText": "查看物流"
}
},
{
"path": "pages/order/OrderDetails/index",
"style": {
"navigationBarTitleText": "订单详情"
}
},
{
"path": "pages/order/OrderSubmission/index",
"style": {
"navigationBarTitleText": "提交订单",
"navigationBarBackgroundColor": "#fff"
}
},
{
"path": "pages/order/PaymentStatus/index",
"style": {
"navigationBarTitleText": "支付状态"
}
},
{
"path": "pages/order/GoodsReturn/index",
"style": {
"navigationBarTitleText": "商品退货"
}
},
{
"path": "pages/order/ReturnList/index",
"style": {
"navigationBarTitleText": "退货列表"
}
},
{
"path": "pages/orderAdmin/OrderIndex/index",
"style": {
"navigationBarTitleText": "商家订单统计"
}
},
{
"path": "pages/orderAdmin/AdminOrderList/index",
"style": {
"navigationBarTitleText": "订单"
}
},
{
"path": "pages/orderAdmin/GoodsDeliver/index",
"style": {
"navigationBarTitleText": "发货"
}
},
{
"path": "pages/orderAdmin/AdminOrder/index",
"style": {
"navigationBarTitleText": "商家订单列表"
}
},
{
"path": "pages/orderAdmin/Statistics/index",
"style": {
"navigationBarTitleText": "商家统计数据"
}
},
{
"path": "pages/orderAdmin/OrderCancellation/index",
"style": {
"navigationBarTitleText": "商家取消订单"
}
},
{
"path": "pages/activity/Poster/index",
"style": {
"navigationBarTitleText": "推广海报"
}
},
{
"path": "pages/activity/DargainDetails/index",
"style": {
"navigationBarTitleText": "帮砍价"
}
},
{
"path": "pages/activity/GoodsBargain/index",
"style": {
"navigationBarTitleText": "砍价列表"
}
},
{
"path": "pages/activity/BargainRecord/index",
"style": {
"navigationBarTitleText": "砍价记录"
}
},
{
"path": "pages/activity/GoodsGroup/index",
"style": {
"navigationBarTitleText": "团购商品列表"
}
},
{
"path": "pages/activity/GroupDetails/index",
"style": {
"navigationBarTitleText": "团购商品详情"
}
},
{
"path": "pages/activity/GroupRule/index",
"style": {
"navigationBarTitleText": "团购规则"
}
},
{
"path": "pages/activity/GoodsSeckill/index",
"style": {
"navigationBarTitleText": "秒杀"
}
},
{
"path": "pages/activity/SeckillDetails/index",
"style": {
"navigationBarTitleText": "秒杀详情"
}
},
{
"path": "pages/map/index",
"style": {
"navigationBarTitleText": "地图"
}
},
{
"path": "pages/user/Message/Message",
"style": {
"navigationBarTitleText": "消息",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/user/MessageDetail/MessageDetail",
"style": {
"navigationBarTitleText": "消息详情",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/user/MemberUpgradeIntro/MemberUpgradeIntro",
"style": {
"navigationBarTitleText": "升级说明",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/VideoPlayBackList/VideoPlayBackList",
"style": {
"navigationBarTitleText": "寻看点",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/VideoPlayBackList/VideoPlayBackDetail",
"style": {
"navigationBarTitleText": "视频详情",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/user/UpgradeElectronicProtocol/UpgradeElectronicProtocol",
"style": {
"navigationBarTitleText": "升级",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/user/UpgradeProtocolDetail/UpgradeProtocolDetail",
"style": {
"navigationBarTitleText": "共享股东协议"
}
},
{
"path": "pages/LiveAndShortVideo/LiveAndShortVideo",
"style": {
"navigationBarTitleText": "直播/视频"
}
},
{
"path": "pages/LiveBroadcastList/LiveBroadcastList",
"style": {
"navigationBarTitleText": "直播列表"
}
},
{
"path": "pages/user/UserFavorite/UserFavorite",
"style": {
"navigationBarTitleText": "我的喜欢"
}
}
],
"subPackages": [
{
"root": "pagesInn",
"pages": [
{
"path": "inn/innHome",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "inn/innApply",
"style": {
"navigationBarTitleText": "店铺申请"
}
},
{
"path": "inn/innInfoPublish",
"style": {
"navigationBarTitleText": "发布店铺动态"
}
},
{
"path": "inn/innProfileEdit",
"style": {
"navigationBarTitleText": "修改店铺资料"
}
},
{
"path": "inn/innInfoDetail",
"style": {
"navigationBarTitleText": "资讯详情"
}
},
{
"path": "inn/innPartnerAgreement",
"style": {
"navigationBarTitleText": "店主合伙人条款协议"
}
}
]
},
{
"root": "pkg_common",
"pages": [
{
"path": "views/pdf",
"style": {
"navigationBarTitleText": "详情"
}
},
{
"path": "views/room",
"style": {
"navigationBarTitleText": "客服"
}
},
{
"path": "views/roomLogs",
"style": {
"navigationBarTitleText": "历史会话"
}
},
{
"path": "views/xiaoZhi",
"style": {
"navigationBarTitleText": ""
}
}
]
},
{
"root": "pkg_join",
"pages": [
{
"path": "views/index",
"style": {
"navigationBarTitleText": "商户入驻"
}
},
{
"path": "views/shop",
"style": {
"navigationBarTitleText": "店铺入驻"
}
},
{
"path": "views/supplier",
"style": {
"navigationBarTitleText": "供应商入驻"
}
},
{
"path": "views/wholesaler",
"style": {
"navigationBarTitleText": "采购批发商入驻"
}
}
]
},
{
"root": "pkg_orders",
"pages": [
{
"path": "views/refund",
"style": {
"navigationBarTitleText": "申请退款"
}
}
]
},
{
"root": "pkg_product",
"pages": [
{
"path": "views/healthList",
"style": {
"navigationBarTitleText": "康养 · 食材"
}
},
{
"path": "views/giftList",
"style": {
"navigationBarTitleText": "特色礼品",
"onReachBottomDistance": 100
}
},
{
"path": "views/landMark",
"style": {
"navigationBarTitleText": "地标好物"
}
},
{
"path": "views/famousList",
"style": {
"navigationBarTitleText": "千县名品"
}
},
{
"path": "views/famousStory",
"style": {
"navigationBarTitleText": "名品故事"
}
},
{
"path": "views/famousHot",
"style": {
"navigationBarTitleText": "爆款主推"
}
},
{
"path": "views/scenicSpot",
"style": {
"navigationBarTitleText": "景点门票"
}
},
{
"path": "views/seckill",
"style": {
"navigationBarTitleText": "天天秒杀"
}
},
{
"path": "views/sharpList",
"style": {
"navigationBarTitleText": "尖货推荐"
}
},
{
"path": "views/nativeList",
"style": {
"navigationBarTitleText": "特产",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#FF564A"
}
},
{
"path": "views/seasonList",
"style": {
"navigationBarTitleText": "时令尝鲜"
}
},
{
"path": "views/season",
"style": {
"navigationBarTitleText": "时令尝鲜"
}
}
]
},
{
"root": "pkg_user",
"pages": [
{
"path": "views/bankCardList",
"style": {
"navigationBarTitleText": "银行卡列表",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "views/addBankCard",
"style": {
"navigationBarTitleText": "添加银行卡",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "views/withdrawal",
"style": {
"navigationBarTitleText": "提现",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "views/personalData",
"style": {
"navigationBarTitleText": "个人资料"
}
},
{
"path": "views/bindPhone",
"style": {
"navigationBarTitleText": "绑定手机号"
}
},
{
"path": "views/payPassword",
"style": {
"navigationBarTitleText": "修改支付密码"
}
}
]
},
{
"root": "v4",
"pages": [
{
"path": "views/preSale/preSale",
"style": {
"navigationBarTitleText": "预售"
}
},
{
"path": "views/seckill/seckill",
"style": {
"navigationBarTitleText": "限时秒杀"
}
},
{
"path": "views/offer/offer",
"style": {
"navigationBarTitleText": "每天特价"
}
},
{
"path": "components/select-city",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "views/specialty/specialty",
"style": {
"navigationBarTitleText": "特产",
"enablePullDownRefresh": true
}
},
{
"path": "views/shop/shop",
"style": {
"navigationBarTitleText": "店铺"
}
},
{
"path": "views/shop/detail",
"style": {
"navigationBarTitleText": "店铺详情"
}
},
{
"path": "views/trial/trial",
"style": {
"navigationBarTitleText": "体验店"
}
},
{
"path": "views/live/live",
"style": {
"navigationBarTitleText": "直播"
}
},
{
"path": "views/attract/attract",
"style": {
"navigationBarTitleText": "招商"
}
},
{
"path": "views/attract/project",
"style": {
"navigationBarTitleText": "招商项目"
}
},
{
"path": "views/attract/projectList",
"style": {
"navigationBarTitleText": "招商项目"
}
},
{
"path": "views/luck/luck",
"style": {
"navigationBarTitleText": "幸运抽奖"
}
},
{
"path": "views/luck/logs",
"style": {
"navigationBarTitleText": "抽奖记录"
}
},
{
"path": "views/luck/receive",
"style": {
"navigationBarTitleText": "选择收货地址"
}
}
]
},
{
"root": "wenwan",
"pages": [
{
"path": "views/goodsClass",
"style": {
"navigationBarTitleText": "文玩"
}
},
{
"path": "views/store",
"style": {
"navigationBarTitleText": "文玩店铺详情",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "views/storeList",
"style": {
"navigationBarTitleText": "文玩"
}
}
]
}
],
"preloadRule": {
"pages/user/User/index": {
"network": "all",
"packages": [
"pagesInn"
]
}
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"tabBar": {
"color": "#8B8F99",
"selectedColor": "#FF564A",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [
{
"pagePath": "pages/home/index",
"iconPath": "static/tabbar/icon-home.png",
"selectedIconPath": "static/tabbar/icon-home-hot.png",
"text": "首页"
},
{
"pagePath": "pages/shop/ShoppingCart/index",
"iconPath": "static/tabbar/icon-cart.png",
"selectedIconPath": "static/tabbar/icon-cart-hot.png",
"text": "购物车"
},
{
"pagePath": "pages/cloud/haveFun",
"iconPath": "static/tabbar/icon-cloud.png",
"selectedIconPath": "static/tabbar/icon-cloud-hot.png",
"text": "寻趣味"
},
{
"pagePath": "pages/user/User/index",
"iconPath": "static/tabbar/icon-user.png",
"selectedIconPath": "static/tabbar/icon-user-hot.png",
"text": "我的"
}
]
},
"condition": {
"current": 0,
"list": [
{
"name": "商品详情",
"path": "pages/shop/GoodsCon/index",
"query": "id=369"
},
{
"name": "DEBUG",
"path": "pages/shop/ShoppingCart/index",
"query": "id=297"
},
{
"name": "No.8",
"path": "pages/shop/GoodsEvaluate/index",
"query": "id=eb30f8a98b1c4952addbdccb1d37533d"
},
{
"name": "时令尝鲜",
"path": "pkg_product/views/season",
"query": "id=20"
}
]
}
}
+48 -3
View File
@@ -31,6 +31,9 @@
<text class="bold">{{ item.price }}</text>
</view>
</view>
<image class="img-nodata" :src="webUrl+'/20231023131208675588.png'" mode="scaleToFill"
v-if="dataList.length===0"/>
</view>
</view>
</template>
@@ -38,6 +41,11 @@
<script>
import {countyFamous} from "@/api/product";
import {getProducts} from "@/api/store";
import {famousShareImage} from "@/api/share";
import {mapGetters} from "vuex";
import cookie from "@/utils/store/cookie";
import {userBindParent} from "@/api/user";
import {getUrlParam} from "@/utils/common.js";
export default {
name: "famousList",
@@ -49,10 +57,38 @@ export default {
bannerList: [],
dataList: [],
navList: [],
navIndex: 0
navIndex: 0,
partnerId: null
}
},
onLoad() {
computed: mapGetters(["userInfo", "isLogin"]),
onShareAppMessage() {
return new Promise(async (resolve, reject) => {
const {status, data} = await famousShareImage();
if (status === 200) {
resolve({
title: '探寻有趣有味的生活方式',
path: '/pkg_product/views/famousList?partnerId=' + this.userInfo.uid,
imageUrl: data
})
}
})
},
onLoad(options) {
if (options.partnerId) {
this.partnerId = options.partnerId || null;
} else {
let obj = uni.getEnterOptionsSync();
if (options.scene != null || obj.query.scene != null) {
let query = options ? decodeURIComponent(options.scene) : decodeURIComponent(obj.query.scene);
this.partnerId = getUrlParam(query, "partnerId") || null;
}
}
if (this.partnerId) {
cookie.set("spread", this.partnerId);
userBindParent({spread: parseInt(this.partnerId)});
}
countyFamous().then(({data}) => {
this.bannerList = data.banner;
this.navList = data.countyFamousAreaList;
@@ -91,7 +127,7 @@ export default {
},
goGoods(id) {
uni.navigateTo({
url: "/pages/shop/GoodsCon/index?id=" + id
url: `/pages/shop/GoodsCon/index?id=${id}&from=famous`
})
},
goStory() {
@@ -207,6 +243,15 @@ export default {
.item:nth-child(2n) {
margin-right: 0;
}
.img-nodata {
position: relative;
top: 40rpx;
left: 50%;
transform: translate(-50%, 0);
width: 352rpx;
height: 338rpx;
}
}
}
</style>
+97
View File
@@ -0,0 +1,97 @@
<script>
import {getFestival} from "@/api/product";
export default {
name: "festival", // 节日专题
data() {
return {
webUrl: this.$VUE_APP_RESOURCES_URL,
topImage: '',
contents: []
}
},
onLoad() {
getFestival().then(({data}) => {
this.topImage = data.topImage;
this.contents = data.contents;
})
}
}
</script>
<template>
<view class="pkg-product-festival">
<image class="top-img" mode="widthFix" :src="topImage" v-if="topImage"/>
<view class="section" v-for="(content,cIndex) in contents" :key="cIndex">
<image class="section-bg" :src="content.backgroundImage" mode="widthFix"/>
<view class="list flex flex-wrap" :class="cIndex===0?'section12':'section8'">
<image :class="cIndex===0?'span12':'span8'" mode="scaleToFill" :src="item.image"
v-for="(item,index) in content.products" :key="index" @click="$global.navToGoods(item.id)"/>
</view>
</view>
</view>
</template>
<style scoped lang="less">
.pkg-product-festival {
image {
margin: 0;
padding: 0;
border: none;
vertical-align: middle;
}
.top-img {
width: 100vw;
height: auto;
}
.section12 {
padding: 0 32rpx;
}
.section8 {
padding: 0 16rpx;
}
.section {
position: relative;
width: 100vw;
.section-bg {
width: 100%;
height: auto;
}
.list {
position: absolute;
top: 350rpx;
left: 0;
width: 100vw;
}
.span12 {
width: 332rpx;
height: 520rpx;
margin: 0 22rpx 24rpx 0;
}
.span12:nth-child(2n) {
margin-right: 0;
}
.span8 {
width: 234rpx;
height: 384rpx;
margin: 0 8rpx 24rpx 0;
}
.span8:nth-child(3n) {
margin-right: 0;
}
}
}
</style>
+33 -22
View File
@@ -1,5 +1,6 @@
<template>
<view class="pkg-product-list">
<view class="first-half">
<view class="search-box flex jc-between ai-center">
<input type="text" v-model="keyword" placeholder="搜索商品" placeholder-style="color:#949494" @confirm="search">
<image class="icon" :src="webUrl+'/20220903142935869059.png'" mode="scaleToFill" @click="search"></image>
@@ -12,13 +13,6 @@
</swiper-item>
</swiper>
<swiper class="swiper-box" indicator-dots indicator-color="rgba(255,255,255,.3)" indicator-active-color="#fff"
autoplay circular v-else>
<swiper-item>
<view class="swiper-item uni-bg-blue">暂无内容</view>
</swiper-item>
</swiper>
<view class="tab-box flex jc-center ai-center" v-show="tabIndex===0">
<image class="active" src="/static/images/v6/btn_active_left.png" @click="changeTab(0)"/>
<image class="inactive" src="/static/images/v6/btn_right.png" @click="changeTab(1)"/>
@@ -27,6 +21,7 @@
<image class="inactive" src="/static/images/v6/btn_left.png" @click="changeTab(0)"/>
<image class="active" src="/static/images/v6/btn_active_right.png" @click="changeTab(1)"/>
</view>
</view>
<view class="body-box">
<view class="aside-box flex-0">
@@ -40,7 +35,8 @@
<scroll-view class="list flex flex-wrap" :style="{'height':listHeight}" :enable-flex="true"
:scroll-anchoring="true"
:scroll-y="true"
:scroll-with-animation="true" :enable-back-to-top="true" @scrolltolower="onLower" v-if="dataList.length>0">
:scroll-with-animation="true" :enable-back-to-top="true" @scrolltolower="onLower"
v-if="dataList.length>0">
<view v-for="(item, index) in dataList" :key="index">
<view class="item item-store" @click="goStore(item.id)" v-if="tabIndex===0">
<image class="cover" :src="item.cover" mode="scaleToFill"/>
@@ -59,11 +55,14 @@
</view>
</scroll-view>
<image class="img-nodata" :src="webUrl+'/20230912145123537792.png'" mode="scaleToFill" v-else-if="tabIndex===0"/>
<view class="tc" v-else>
<image class="img-nodata" :src="webUrl+'/20230912145123537792.png'" mode="scaleToFill"
v-if="tabIndex===0"/>
<image class="img-nodata" :src="webUrl+'/20230912145113749133.png'" mode="scaleToFill" v-else/>
</view>
</view>
</view>
</view>
</template>
<script>
@@ -92,7 +91,9 @@ export default {
},
methods: {
init() {
wellnessFood().then(({data}) => this.bannerList = data.banner);
wellnessFood().then(({data}) => {
this.bannerList = data.banner
});
fetchCity(4).then(({data}) => {
this.asideList = data.group;
this.search();
@@ -138,7 +139,6 @@ export default {
success: function (res) {
let len = that.dataList.length;
let {windowHeight} = res;
console.log("test data",windowHeight)
that.listHeight = "auto";
if (windowHeight > 600 && len > 4) {
that.listHeight = "100%";
@@ -179,8 +179,22 @@ export default {
padding-top: 16rpx;
background: #fff;
.first-half {
height: 612rpx;
z-index: 20;
}
.search-box {
margin-bottom: 32rpx;
}
.swiper-box {
margin-bottom: 32rpx;
}
.tab-box {
margin: 0 32rpx;
padding-bottom: 32rpx;
.active {
width: 342rpx;
@@ -195,14 +209,10 @@ export default {
}
}
.swiper-box {
margin: 20rpx auto 30rpx;
}
.body-box {
position: fixed;
top: 610rpx;
height: calc(100vh - 610rpx);
position: relative;
height: calc(100vh - 612rpx);
z-index: 10;
.store {
image {
@@ -218,14 +228,15 @@ export default {
}
}
.article-box {
padding-bottom: 20rpx;
}
.img-nodata {
position: relative;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
width: 360rpx;
height: 360rpx;
vertical-align: middle;
margin-top: 60rpx;
}
}
}
+101
View File
@@ -0,0 +1,101 @@
<script>
import {getICH} from "@/api/product";
export default {
name: "heritage",
data() {
return {
contents: [],
topImage: '',
backgroundImage: '',
bgImgWidth: 0,
}
},
computed: {
scale() {
return 750 / this.bgImgWidth;
}
},
onLoad() {
this.init();
},
methods: {
init() {
getICH().then(({data}) => {
this.contents = data.contents;
this.topImage = data.topImage;
this.backgroundImage = data.backgroundImage;
this.bgImgWidth = data.backgroundImageWidth;
this.calcPosition();
})
},
// 计算位置
calcPosition() {
this.contents?.forEach(item => {
item.gx = item.x * this.scale;
item.gy = item.y * this.scale;
})
},
goDetails(item) {
if (!item.isLink) return;
if (item.type === 1) {
uni.navigateTo({
url: '/pkg_product/views/heritageVideo?id=' + item.id
})
} else {
uni.navigateTo({
url: '/pkg_product/views/heritageGoods?id=' + item.id
})
}
}
}
}
</script>
<template>
<view class="pkg-product-heritage">
<image style="width: 100%" :src="topImage" mode="widthFix"/>
<view class="main-box">
<image style="width: 100%" :src="backgroundImage" mode="widthFix"/>
<view class="item" :style="{'left':item.gx+'rpx','top':item.gy+'rpx'}" v-for="(item,index) in contents"
:key="index" @click="goDetails(item)">
<image class="img-item" :src="item.image"/>
<view class="title flex jc-center">{{ item.title }}</view>
</view>
</view>
</view>
</template>
<style scoped lang="less">
.pkg-product-heritage {
image {
vertical-align: middle;
}
.main-box {
position: relative;
.item {
position: absolute;
width: 160rpx;
font-size: 24rpx;
.title {
position: relative;
width: 100%;
white-space: nowrap;
}
}
.img-item {
width: 160rpx;
height: 160rpx;
}
}
}
</style>
+128
View File
@@ -0,0 +1,128 @@
<script>
import {getICHDetails} from "@/api/product";
export default {
name: "heritageGoods",
data() {
return {
id: null,
info: null,
}
},
onLoad(options) {
this.id = options.id;
this.getDetails();
},
methods: {
getDetails() {
getICHDetails(this.id).then(({data}) => this.info = data);
},
goGoods(id) {
uni.navigateTo({
url: "/pages/shop/GoodsCon/index?id=" + id
})
},
}
}
</script>
<template>
<view class="heritage-goods" v-if="info">
<image class="page-bg" :src="info.backgroundImage" mode="widthFix"/>
<view class="list-box flex flex-wrap">
<view class="item flex flex-col jc-between" v-for="(item,index) in info.products" :key="index"
@click="goGoods(item.productId)">
<view class="flex flex-col ai-center">
<image :src="item.image" mode="scaleToFill"/>
<view class="more-t">{{ item.storeName }}</view>
</view>
<view class="footer flex jc-between">
<view class="price">
<text>{{ item.price }}</text>
</view>
<view class="btn flex jc-center ai-center">立即购买</view>
</view>
</view>
</view>
</view>
</template>
<style scoped lang="less">
.heritage-goods {
position: relative;
image {
vertical-align: middle;
}
.page-bg {
width: 100vw;
height: auto;
}
.list-box {
position: absolute;
top: 9000rpx;
left: 0;
width: 100vw;
box-sizing: border-box;
padding: 0 32rpx;
}
.item {
width: 332rpx;
height: 490rpx;
margin-right: 22rpx;
margin-bottom: 22rpx;
background: #FFFEF3;
border-radius: 8rpx;
image {
width: 304rpx;
height: 304rpx;
margin-top: 10rpx;
border-radius: 8rpx;
vertical-align: middle;
}
.more-t {
width: 304rpx;
margin-top: 6rpx;
font-size: 36rpx;
font-weight: 600;
line-height: 48rpx;
color: #650000;
}
.footer {
padding: 0 14rpx 16rpx;
.price {
font-size: 28rpx;
font-weight: bold;
line-height: 52rpx;
color: #C40303;
text {
font-size: 36rpx;
}
}
.btn {
width: 120rpx;
height: 48rpx;
background: linear-gradient(180deg, #F57F25 0%, #F05353 100%);
border-radius: 4rpx;
color: #FFFFFF;
font-size: 24rpx;
}
}
}
.item:nth-child(2n) {
margin-right: 0;
}
}
</style>
+53
View File
@@ -0,0 +1,53 @@
<script>
import {getICHDetails} from "@/api/product";
export default {
name: "heritageVideo",
data() {
return {
id: null,
info: null,
}
},
onLoad(options) {
this.id = options.id;
this.getDetails();
},
methods: {
getDetails() {
getICHDetails(this.id).then(({data}) => this.info = data);
}
}
}
</script>
<template>
<view class="heritage-video" v-if="info">
<image class="page-bg" :src="info.backgroundImage" mode="widthFix"/>
<video :src="info.video" autoplay show-center-play-btn/>
<!-- <video id="myVideo" src="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/2minute-demo.mp4"-->
<!-- autoplay controls></video>-->
</view>
</template>
<style scoped lang="less">
.heritage-video {
position: relative;
min-height: 100vh;
.page-bg {
width: 100vw;
height: auto;
vertical-align: middle;
}
video {
position: absolute;
left: 33rpx;
top: 880rpx;
width: 684rpx;
height: 424rpx;
}
}
</style>
+100
View File
@@ -0,0 +1,100 @@
<script>
import {getHomestay} from "@/api/product";
export default {
name: "homestay", // 民宿专题
data() {
return {
webUrl: this.$VUE_APP_RESOURCES_URL,
topImage: '',
contents: [],
id: null
}
},
onLoad(options) {
this.id = options.id;
getHomestay(this.id).then(({data}) => {
this.topImage = data.topImage;
this.contents = data.contents;
})
},
methods: {
goInnDetail(item) {
uni.navigateTo({
url: `/pagesInn/inn/innHome?id=${item.id}`
})
},
}
}
</script>
<template>
<view class="pkg-product-homestay">
<image class="top-img" mode="widthFix" :src="topImage" v-if="topImage"/>
<view class="section" v-for="(content,cIndex) in contents" :key="cIndex">
<image class="section-bg" :src="content.backgroundImage" mode="widthFix"/>
<view class="list flex flex-wrap" :class="cIndex===2?'section12':'section24'">
<image :class="cIndex===2?'span12':'span24'" mode="scaleToFill" :src="item.image"
v-for="(item,index) in content.hotels" :key="index" @click="goInnDetail(item)"/>
</view>
</view>
</view>
</template>
<style scoped lang="less">
.pkg-product-homestay {
image {
vertical-align: middle;
}
.top-img {
width: 100vw;
height: auto;
}
.section12 {
padding: 0 32rpx;
}
.section24 {
padding: 0 61rpx;
}
.section {
position: relative;
width: 100vw;
.section-bg{
width: 100%;
height: auto;
}
.list{
position: absolute;
top: 350rpx;
left: 0;
width: 100vw;
}
.span24 {
width: 628rpx;
height: 320rpx;
}
.span12 {
width: 332rpx;
height: 500rpx;
margin: 0 22rpx 24rpx 0;
}
.span12:nth-child(2n) {
margin-right: 0;
}
}
}
</style>
+12 -1
View File
@@ -39,6 +39,8 @@
<view class="price bold">{{ item.price }}</view>
</view>
</scroll-view>
<image class="img-nodata" :src="webUrl+'/20231023131208675588.png'" mode="scaleToFill" v-if="dataList.length===0"/>
</view>
</view>
</view>
@@ -58,7 +60,7 @@ export default {
dataList: [], // 列表数据
tabList: [],
cityId: null,
cityName: "桂林市",
cityName: "",
page: 1,
listHeight: "auto"
}
@@ -173,5 +175,14 @@ export default {
}
}
}
.img-nodata {
position: relative;
top: 200rpx;
left: 50%;
transform: translate(-50%, 0);
width: 352rpx;
height: 338rpx;
}
}
</style>
+12 -4
View File
@@ -44,11 +44,17 @@ export default {
getSeasonPoster(this.id).then(({data}) => this.posterUrl = data);
},
tapLeft() {
if (this.current === 0) return;
if (this.current === 0) {
this.current = this.info.swiper.length - 1;
return
}
this.current--;
},
tapRight() {
if (this.current + 1 === this.info.swiper.length) return;
if (this.current + 1 === this.info.swiper.length) {
this.current = 0;
return
}
this.current++;
},
@@ -149,7 +155,8 @@ export default {
</u-popup>
<view class="scroll-item">
<u-swiper :autoplay="false" :current="current" :list="info.swiper" height="1200rpx" radius="0" indicator
<u-swiper :autoplay="true" circular :current="current" :list="info.swiper" height="1200rpx" radius="0"
indicator
imgMode="scaleToFill"></u-swiper>
<image class="icon-direction icon-left" :src="webUrl+'/20230911105736198247.png'" mode="scaleToFill"
@click="tapLeft"/>
@@ -192,7 +199,7 @@ export default {
.share-label {
position: fixed;
top: 50%;
right: 32rpx;
right: 0;
width: 200rpx;
height: 56rpx;
background: rgba(255, 255, 255, 0.39);
@@ -213,6 +220,7 @@ export default {
width: 500rpx;
height: 889.5rpx;
}
.main-img {
width: 500rpx;
height: 889.5rpx;
+35 -2
View File
@@ -100,6 +100,11 @@
<script>
import CountDownUnit from "@/pkg_product/components/CountDownUnit.vue";
import {getSeckillRule, getSeckillTopList, getYxStoreSeckillIndex, getYxStoreSeckillPageList} from "@/api/goods";
import {secKillShareImage} from "@/api/share";
import {mapGetters} from "vuex";
import cookie from "@/utils/store/cookie";
import {userBindParent} from "@/api/user";
import {getUrlParam} from "@/utils/common.js";
export default {
name: "seckill",
@@ -119,10 +124,38 @@ export default {
endReach: false,
timeId: null,
nextList: [],
ruleContent: null
ruleContent: null,
partnerId: null
}
},
onLoad() {
computed: mapGetters(["userInfo", "isLogin"]),
onShareAppMessage() {
return new Promise(async (resolve, reject) => {
const {status, data} = await secKillShareImage();
if (status === 200) {
resolve({
title: '探寻有趣有味的生活方式',
path: '/pkg_product/views/seckill?partnerId=' + this.userInfo.uid,
imageUrl: data
})
}
})
},
onLoad(options) {
if (options.partnerId) {
this.partnerId = options.partnerId || null;
} else {
let obj = uni.getEnterOptionsSync();
if (options.scene != null || obj.query.scene != null) {
let query = options ? decodeURIComponent(options.scene) : decodeURIComponent(obj.query.scene);
this.partnerId = getUrlParam(query, "partnerId") || null;
}
}
if (this.partnerId) {
cookie.set("spread", this.partnerId);
userBindParent({spread: parseInt(this.partnerId)});
}
this.fetchSession();
getSeckillRule().then(({data}) => this.ruleContent = data);
getSeckillTopList(1, 10).then(({data}) => this.topList = data.records);
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

+2 -2
View File
@@ -38,10 +38,10 @@
<text>{{ item.storeName }}</text>
</view>
<view class="info-line flex jc-between ai-center">
<text>产地:{{ item.origin || "" }}</text>
<!-- <text>产地:{{ item.origin || "" }}</text>-->
<!-- <text>单位:{{ item.unitName || "" }}</text>-->
</view>
<view class="info-line" style="margin-top: 4rpx">规格:{{ item.storeInfo || "" }}</view>
<!-- <view class="info-line" style="margin-top: 4rpx">规格:{{ item.storeInfo || "" }}</view>-->
<view class="price-line">{{ item.price }}</view>
</view>