合并重提
This commit is contained in:
@@ -1,8 +1,35 @@
|
|||||||
<script>
|
<script>
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
export default {
|
export default {
|
||||||
onLaunch: function () {
|
onLaunch: function() {
|
||||||
console.log("App Launch");
|
// debugger
|
||||||
|
const updateManager = uni.getUpdateManager()
|
||||||
|
updateManager.onCheckForUpdate(function (res) {
|
||||||
|
// 请求完新版本信息的回调
|
||||||
|
console.log(res.hasUpdate)
|
||||||
|
})
|
||||||
|
// 下载新版本
|
||||||
|
updateManager.onUpdateReady(function () {
|
||||||
|
uni.showModal({
|
||||||
|
title: '更新提示',
|
||||||
|
content: '新版本已经准备好,是否重启应用?',
|
||||||
|
success(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
// 重启应用
|
||||||
|
updateManager.applyUpdate()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
// 新版本下载失败
|
||||||
|
updateManager.onUpdateFailed(function (res) {
|
||||||
|
// 新的版本下载失败
|
||||||
|
uni.showModal({
|
||||||
|
title: '已经有新版本了哟~',
|
||||||
|
content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~',
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
},
|
},
|
||||||
onShow: function () {
|
onShow: function () {
|
||||||
console.log("App Show");
|
console.log("App Show");
|
||||||
@@ -43,17 +70,17 @@ export default {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// 自动登录
|
// 自动登录
|
||||||
async autoLogin(data) {
|
async autoLogin(data) {
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
/*每个页面公共css */
|
/*每个页面公共css */
|
||||||
@import "animate.css";
|
@import "animate.css";
|
||||||
|
|||||||
+207
-207
@@ -1,207 +1,207 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="adv-box mx20 mb10">
|
<view class="adv-box mx20 mb10">
|
||||||
<!-- 模板1-->
|
<!-- 模板1-->
|
||||||
<view class="x-f" v-if="detail.style == 1">
|
<view class="x-f" v-if="detail.style == 1">
|
||||||
<image style="width:710rpx;height: 220rpx;" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image>
|
<image style="width:710rpx;height: 220rpx;" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<!-- 模板2-->
|
<!-- 模板2-->
|
||||||
<view class="type1 x-f" v-if="detail.style == 2">
|
<view class="type1 x-f" v-if="detail.style == 2">
|
||||||
<image class="type1-img" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image>
|
<image class="type1-img" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image>
|
||||||
<image class="type1-img" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill"></image>
|
<image class="type1-img" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<!-- 模板3-->
|
<!-- 模板3-->
|
||||||
<view class="type2 x-bc" v-if="detail.style == 3">
|
<view class="type2 x-bc" v-if="detail.style == 3">
|
||||||
<image class="type2-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image>
|
<image class="type2-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image>
|
||||||
<view class="y-f type2-box">
|
<view class="y-f type2-box">
|
||||||
<image class="type2-img2" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill" style="border-bottom:1rpx solid #f6f6f6"></image>
|
<image class="type2-img2" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill" style="border-bottom:1rpx solid #f6f6f6"></image>
|
||||||
<image class="type2-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill"></image>
|
<image class="type2-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 模板4-->
|
<!-- 模板4-->
|
||||||
<view class="type3 x-bc" v-if="detail.style == 4">
|
<view class="type3 x-bc" v-if="detail.style == 4">
|
||||||
<view class="type3-box y-f">
|
<view class="type3-box y-f">
|
||||||
<image class="type3-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image>
|
<image class="type3-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image>
|
||||||
<image class="type3-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill"></image>
|
<image class="type3-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<image class="type3-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill"></image>
|
<image class="type3-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<!-- 模板5-->
|
<!-- 模板5-->
|
||||||
<view class="type4 y-f" v-if="detail.style == 5">
|
<view class="type4 y-f" v-if="detail.style == 5">
|
||||||
<view class="type4-box x-f">
|
<view class="type4-box x-f">
|
||||||
<image class="type4-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image>
|
<image class="type4-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image>
|
||||||
<image class="type4-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill"></image>
|
<image class="type4-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<image class="type4-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill"></image>
|
<image class="type4-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<!-- 模板6-->
|
<!-- 模板6-->
|
||||||
<view class="type5 y-f" v-if="detail.style == 6">
|
<view class="type5 y-f" v-if="detail.style == 6">
|
||||||
<image class="type5-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image>
|
<image class="type5-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image>
|
||||||
<view class="type5-box x-bc">
|
<view class="type5-box x-bc">
|
||||||
<image class="type5-img2" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill" style="border-bottom:1rpx solid #f6f6f6"></image>
|
<image class="type5-img2" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill" style="border-bottom:1rpx solid #f6f6f6"></image>
|
||||||
<image class="type5-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill"></image>
|
<image class="type5-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 模板7-->
|
<!-- 模板7-->
|
||||||
<view class="type6 y-f" v-if="detail.style == 7">
|
<view class="type6 y-f" v-if="detail.style == 7">
|
||||||
<view class="x-f type6-box1">
|
<view class="x-f type6-box1">
|
||||||
<image class="type6-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image>
|
<image class="type6-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image>
|
||||||
<image class="type6-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill"></image>
|
<image class="type6-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="x-f type6-box2">
|
<view class="x-f type6-box2">
|
||||||
<image class="type6-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill"></image>
|
<image class="type6-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill"></image>
|
||||||
<image class="type6-img2" @tap="jump(detail.list[3].path)" :src="detail.list[3].image" mode="aspectFill"></image>
|
<image class="type6-img2" @tap="jump(detail.list[3].path)" :src="detail.list[3].image" mode="aspectFill"></image>
|
||||||
<image class="type6-img2" @tap="jump(detail.list[4].path)" :src="detail.list[4].image" mode="aspectFill"></image>
|
<image class="type6-img2" @tap="jump(detail.list[4].path)" :src="detail.list[4].image" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
detail: {}
|
detail: {}
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
created() {},
|
created() {},
|
||||||
methods: {
|
methods: {
|
||||||
// 路由跳转
|
// 路由跳转
|
||||||
jump(path) {
|
jump(path) {
|
||||||
this.$tools.routerTo(path);
|
this.$tools.routerTo(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.adv-box {
|
.adv-box {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
.type1 {
|
.type1 {
|
||||||
.type1-img {
|
.type1-img {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 220rpx;
|
height: 220rpx;
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
border-right: 1rpx solid #f6f6f6;
|
border-right: 1rpx solid #f6f6f6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.type2 {
|
.type2 {
|
||||||
.type2-img1 {
|
.type2-img1 {
|
||||||
width: (710rpx/2);
|
width: (710rpx/2);
|
||||||
height: 340rpx;
|
height: 340rpx;
|
||||||
border-right: 1rpx solid #f6f6f6;
|
border-right: 1rpx solid #f6f6f6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type2-box {
|
.type2-box {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 340rpx;
|
height: 340rpx;
|
||||||
width: (710rpx/2);
|
width: (710rpx/2);
|
||||||
|
|
||||||
.type2-img2 {
|
.type2-img2 {
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.type3 {
|
.type3 {
|
||||||
.type3-box {
|
.type3-box {
|
||||||
width: (710rpx/2);
|
width: (710rpx/2);
|
||||||
border-right: 1rpx solid #f6f6f6;
|
border-right: 1rpx solid #f6f6f6;
|
||||||
.type3-img1 {
|
.type3-img1 {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
border-bottom: 1rpx solid #f6f6f6;
|
border-bottom: 1rpx solid #f6f6f6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.type3-img2 {
|
.type3-img2 {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 340rpx;
|
height: 340rpx;
|
||||||
width: (710rpx/2);
|
width: (710rpx/2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.type4 {
|
.type4 {
|
||||||
.type4-box {
|
.type4-box {
|
||||||
border-bottom: 1rpx solid #f6f6f6;
|
border-bottom: 1rpx solid #f6f6f6;
|
||||||
.type4-img1 {
|
.type4-img1 {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
border-right: 1rpx solid #f6f6f6;
|
border-right: 1rpx solid #f6f6f6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.type4-img2 {
|
.type4-img2 {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
width: 710rpx;
|
width: 710rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.type5 {
|
.type5 {
|
||||||
.type5-img1 {
|
.type5-img1 {
|
||||||
width: 710rpx;
|
width: 710rpx;
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
border-bottom: 1rpx solid #f6f6f6;
|
border-bottom: 1rpx solid #f6f6f6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type5-box {
|
.type5-box {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
width: 710rpx;
|
width: 710rpx;
|
||||||
|
|
||||||
.type5-img2 {
|
.type5-img2 {
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
border-right: 1rpx solid #f6f6f6;
|
border-right: 1rpx solid #f6f6f6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.type6 {
|
.type6 {
|
||||||
.type6-box1 {
|
.type6-box1 {
|
||||||
.type6-img1 {
|
.type6-img1 {
|
||||||
width: (710rpx/2);
|
width: (710rpx/2);
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
border-right: 1rpx solid #f6f6f6;
|
border-right: 1rpx solid #f6f6f6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.type6-box2 {
|
.type6-box2 {
|
||||||
border-top: 1rpx solid #f6f6f6;
|
border-top: 1rpx solid #f6f6f6;
|
||||||
|
|
||||||
.type6-img2 {
|
.type6-img2 {
|
||||||
width: (710rpx/3);
|
width: (710rpx/3);
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
border-right: 1rpx solid #f6f6f6;
|
border-right: 1rpx solid #f6f6f6;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
border-right: 0;
|
border-right: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
image {
|
image {
|
||||||
// background-color: #ccc;
|
// background-color: #ccc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
+155
-155
@@ -1,155 +1,155 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 产品分类导航 -->
|
<!-- 产品分类导航 -->
|
||||||
<view class="menu-category-box mb10" v-if="carousel" :style="list.length <= menu ? `height:200rpx` : `height:360rpx`">
|
<view class="menu-category-box mb10" v-if="carousel" :style="list.length <= menu ? `height:200rpx` : `height:360rpx`">
|
||||||
<swiper
|
<swiper
|
||||||
class="menu-swiper-box"
|
class="menu-swiper-box"
|
||||||
:style="list.length <= menu ? `height:160rpx` : `height:320rpx`"
|
:style="list.length <= menu ? `height:160rpx` : `height:320rpx`"
|
||||||
@change="onSwiper"
|
@change="onSwiper"
|
||||||
circular
|
circular
|
||||||
:autoplay="false"
|
:autoplay="false"
|
||||||
:interval="3000"
|
:interval="3000"
|
||||||
:duration="1000"
|
:duration="1000"
|
||||||
>
|
>
|
||||||
<swiper-item class="menu-swiper-item" v-for="(itemList, index) in carousel" :key="index" :style="list.length <= menu ? `height:200rpx` : `height:340rpx`">
|
<swiper-item class="menu-swiper-item" v-for="(itemList, index) in carousel" :key="index" :style="list.length <= menu ? `height:200rpx` : `height:340rpx`">
|
||||||
<view class="menu-tab-box">
|
<view class="menu-tab-box">
|
||||||
<view class="tab-list y-f" :style="{ width: 690 / menu + 'rpx' }" v-for="item in itemList" :key="item.name" @tap="routerTo(item)">
|
<view class="tab-list y-f" :style="{ width: 690 / menu + 'rpx' }" v-for="item in itemList" :key="item.name" @tap="routerTo(item)">
|
||||||
<image class="tab-img Shop-selector-circular" :style="{ width: imgW + 'rpx', height: imgW + 'rpx' }" :src="item.pic"></image>
|
<image class="tab-img Shop-selector-circular" :style="{ width: imgW + 'rpx', height: imgW + 'rpx' }" :src="item.pic"></image>
|
||||||
<text class="Shop-selector-rect">{{ item.name }}</text>
|
<text class="Shop-selector-rect">{{ item.name }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
<view class="menu-category-dots" v-if="carousel.length > 1">
|
<view class="menu-category-dots" v-if="carousel.length > 1">
|
||||||
<text :class="categoryCurrent === index ? 'category-dot-active' : 'category-dot'" v-for="(dot, index) in carousel.length" :key="index"></text>
|
<text :class="categoryCurrent === index ? 'category-dot-active' : 'category-dot'" v-for="(dot, index) in carousel.length" :key="index"></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
categoryCurrent: 0 //分类轮播下标
|
categoryCurrent: 0 //分类轮播下标
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
list: {
|
list: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: []
|
default: []
|
||||||
},
|
},
|
||||||
menu: {
|
menu: {
|
||||||
default: 4
|
default: 4
|
||||||
},
|
},
|
||||||
imgW: {
|
imgW: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 88
|
default: 88
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
carousel() {
|
carousel() {
|
||||||
if (this.list) {
|
if (this.list) {
|
||||||
let list = this.sortData(this.list, this.menu * 2);
|
let list = this.sortData(this.list, this.menu * 2);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {},
|
created() {},
|
||||||
methods: {
|
methods: {
|
||||||
// 数据分层
|
// 数据分层
|
||||||
sortData(oArr, length) {
|
sortData(oArr, length) {
|
||||||
let arr = [];
|
let arr = [];
|
||||||
let minArr = [];
|
let minArr = [];
|
||||||
oArr.forEach(c => {
|
oArr.forEach(c => {
|
||||||
if (minArr.length === length) {
|
if (minArr.length === length) {
|
||||||
minArr = [];
|
minArr = [];
|
||||||
}
|
}
|
||||||
if (minArr.length === 0) {
|
if (minArr.length === 0) {
|
||||||
arr.push(minArr);
|
arr.push(minArr);
|
||||||
}
|
}
|
||||||
minArr.push(c);
|
minArr.push(c);
|
||||||
});
|
});
|
||||||
|
|
||||||
return arr;
|
return arr;
|
||||||
},
|
},
|
||||||
// 轮播
|
// 轮播
|
||||||
onSwiper(e) {
|
onSwiper(e) {
|
||||||
this.categoryCurrent = e.detail.current;
|
this.categoryCurrent = e.detail.current;
|
||||||
},
|
},
|
||||||
// 路由跳转
|
// 路由跳转
|
||||||
routerTo(item) {
|
routerTo(item) {
|
||||||
this.$yrouter.push(item.uniapp_url);
|
this.$yrouter.push(item.uniapp_url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
// 产品分类
|
// 产品分类
|
||||||
.y-f {
|
.y-f {
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
display: -webkit-flex;
|
display: -webkit-flex;
|
||||||
display: flex;
|
display: flex;
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
-webkit-box-direction: normal;
|
-webkit-box-direction: normal;
|
||||||
-webkit-flex-direction: column;
|
-webkit-flex-direction: column;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
-webkit-box-align: center;
|
-webkit-box-align: center;
|
||||||
-webkit-align-items: center;
|
-webkit-align-items: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-category-box {
|
.menu-category-box {
|
||||||
padding: 30rpx 30rpx 0 30rpx;
|
padding: 30rpx 30rpx 0 30rpx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.menu-category-box,
|
.menu-category-box,
|
||||||
.menu-swiper-box {
|
.menu-swiper-box {
|
||||||
position: relative;
|
position: relative;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
.menu-swiper-item {
|
.menu-swiper-item {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.menu-tab-box {
|
.menu-tab-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
.tab-list {
|
.tab-list {
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
font-family: PingFang SC;
|
font-family: PingFang SC;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: rgba(51, 51, 51, 1);
|
color: rgba(51, 51, 51, 1);
|
||||||
padding-bottom: 30rpx;
|
padding-bottom: 30rpx;
|
||||||
|
|
||||||
.tab-img {
|
.tab-img {
|
||||||
border-radius: 25rpx;
|
border-radius: 25rpx;
|
||||||
margin-bottom: 10rpx;
|
margin-bottom: 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-category-dots {
|
.menu-category-dots {
|
||||||
display: flex;
|
display: flex;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
bottom: 20rpx;
|
bottom: 20rpx;
|
||||||
|
|
||||||
.category-dot {
|
.category-dot {
|
||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
height: 3rpx;
|
height: 3rpx;
|
||||||
background: #eeeeee;
|
background: #eeeeee;
|
||||||
margin-right: 10rpx;
|
margin-right: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.category-dot-active {
|
.category-dot-active {
|
||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
height: 3rpx;
|
height: 3rpx;
|
||||||
background: #a8700d;
|
background: #a8700d;
|
||||||
margin-right: 10rpx;
|
margin-right: 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
+327
-327
@@ -1,327 +1,327 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="sp-live-card" :style="{ width: wh + 'rpx' }">
|
<view class="sp-live-card" :style="{ width: wh + 'rpx' }">
|
||||||
<view class="live-content" @tap="goRoom" :style="{ width: wh + 'rpx' }">
|
<view class="live-content" @tap="goRoom" :style="{ width: wh + 'rpx' }">
|
||||||
<image class="item-cover" :src="detail.shareImge" mode="aspectFill"></image>
|
<image class="item-cover" :src="detail.shareImge" mode="aspectFill"></image>
|
||||||
<view class="item-status">
|
<view class="item-status">
|
||||||
<image class="status-img" :src="liveStatus[detail.liveStatus].img" mode=""></image>
|
<image class="status-img" :src="liveStatus[detail.liveStatus].img" mode=""></image>
|
||||||
<text class="status-text">{{ liveStatus[detail.liveStatus].title }}</text>
|
<text class="status-text">{{ liveStatus[detail.liveStatus].title }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-title" :style="{ width: wh + 'rpx' }">{{ detail.name }}</view>
|
<view class="item-title" :style="{ width: wh + 'rpx' }">{{ detail.name }}</view>
|
||||||
<!-- <image v-if="detail.liveStatus == 101" class="like-img" src="http://Shop.7wpp.com/imgs/live/zan.gif" mode=""></image> -->
|
<!-- <image v-if="detail.liveStatus == 101" class="like-img" src="http://Shop.7wpp.com/imgs/live/zan.gif" mode=""></image> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="live-bottom" :style="{ width: wh + 'rpx' }">
|
<view class="live-bottom" :style="{ width: wh + 'rpx' }">
|
||||||
<view class="live-info">
|
<view class="live-info">
|
||||||
<view class="info-box">
|
<view class="info-box">
|
||||||
<!-- <image class="info-avatar" :src="detail.anchor_img" mode=""></image> -->
|
<!-- <image class="info-avatar" :src="detail.anchor_img" mode=""></image> -->
|
||||||
<view class="info-name">{{ detail.anchorName }}</view>
|
<view class="info-name">{{ detail.anchorName }}</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <text class="views">15W观看</text> -->
|
<!-- <text class="views">15W观看</text> -->
|
||||||
</view>
|
</view>
|
||||||
<slot name="liveGoods">
|
<slot name="liveGoods">
|
||||||
<view class="live-goods" v-if="detail.product.length">
|
<view class="live-goods" v-if="detail.product.length">
|
||||||
<view class="live-goods__item" v-for="(goods, index) in detail.product" :key="goods.goodsId"
|
<view class="live-goods__item" v-for="(goods, index) in detail.product" :key="goods.goodsId"
|
||||||
v-if="index < 3">
|
v-if="index < 3">
|
||||||
<image class="live-goods__img" :src="goods.coverImgeUrl" mode=""></image>
|
<image class="live-goods__img" :src="goods.coverImgeUrl" mode=""></image>
|
||||||
<view class="live-goods__price" v-if="index < 2">¥{{ goods.price }}</view>
|
<view class="live-goods__price" v-if="index < 2">¥{{ goods.price }}</view>
|
||||||
<view class="live-goods__mark" v-else>
|
<view class="live-goods__mark" v-else>
|
||||||
<text>{{ detail.product.length }}+</text>
|
<text>{{ detail.product.length }}+</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</slot>
|
</slot>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
dataFormatL
|
dataFormatL
|
||||||
} from "@/utils";
|
} from "@/utils";
|
||||||
let HAS_LIVE = false
|
let HAS_LIVE = false
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
HAS_LIVE = true
|
HAS_LIVE = true
|
||||||
let livePlayer = null;
|
let livePlayer = null;
|
||||||
if (HAS_LIVE) {
|
if (HAS_LIVE) {
|
||||||
livePlayer = requirePlugin('live-player-plugin');
|
livePlayer = requirePlugin('live-player-plugin');
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
let timer = null;
|
let timer = null;
|
||||||
export default {
|
export default {
|
||||||
name: 'shopLiveCard',
|
name: 'shopLiveCard',
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
liveStatus: {
|
liveStatus: {
|
||||||
'101': {
|
'101': {
|
||||||
img: 'https://wx.yixiang.co/static/images/live.png',
|
img: 'https://wx.yixiang.co/static/images/live.png',
|
||||||
title: '直播中'
|
title: '直播中'
|
||||||
},
|
},
|
||||||
'102': {
|
'102': {
|
||||||
img: 'https://wx.yixiang.co/static/images/prevue.png',
|
img: 'https://wx.yixiang.co/static/images/prevue.png',
|
||||||
title: '未开始'
|
title: '未开始'
|
||||||
},
|
},
|
||||||
'103': {
|
'103': {
|
||||||
img: 'https://wx.yixiang.co/static/images/playback.png',
|
img: 'https://wx.yixiang.co/static/images/playback.png',
|
||||||
title: '已结束'
|
title: '已结束'
|
||||||
},
|
},
|
||||||
'104': {
|
'104': {
|
||||||
img: 'https://wx.yixiang.co/static/images/104.png',
|
img: 'https://wx.yixiang.co/static/images/104.png',
|
||||||
title: '禁播'
|
title: '禁播'
|
||||||
},
|
},
|
||||||
'105': {
|
'105': {
|
||||||
img: 'https://wx.yixiang.co/static/images/105.png',
|
img: 'https://wx.yixiang.co/static/images/105.png',
|
||||||
title: '暂停中'
|
title: '暂停中'
|
||||||
},
|
},
|
||||||
'106': {
|
'106': {
|
||||||
img: 'https://wx.yixiang.co/static/images/106.png',
|
img: 'https://wx.yixiang.co/static/images/106.png',
|
||||||
title: '异常'
|
title: '异常'
|
||||||
},
|
},
|
||||||
'107': {
|
'107': {
|
||||||
img: 'https://wx.yixiang.co/static/images/past.png',
|
img: 'https://wx.yixiang.co/static/images/past.png',
|
||||||
title: '已过期'
|
title: '已过期'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
detail: {
|
detail: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: null
|
default: null
|
||||||
},
|
},
|
||||||
wh: {
|
wh: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 345
|
default: 345
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {},
|
computed: {},
|
||||||
created() {
|
created() {
|
||||||
this.getLiveStatus();
|
this.getLiveStatus();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
let that = this;
|
||||||
timer = setInterval(() => {
|
timer = setInterval(() => {
|
||||||
that.getLiveStatus();
|
that.getLiveStatus();
|
||||||
}, 60000);
|
}, 60000);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
timer = null;
|
timer = null;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goRoom() {
|
goRoom() {
|
||||||
let that = this;
|
let that = this;
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${that.detail.roomId}`
|
url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${that.detail.roomId}`
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
dateFormat(fmt, date) {
|
dateFormat(fmt, date) {
|
||||||
let ret;
|
let ret;
|
||||||
const opt = {
|
const opt = {
|
||||||
"Y+": date.getFullYear().toString(), // 年
|
"Y+": date.getFullYear().toString(), // 年
|
||||||
"m+": (date.getMonth() + 1).toString(), // 月
|
"m+": (date.getMonth() + 1).toString(), // 月
|
||||||
"d+": date.getDate().toString(), // 日
|
"d+": date.getDate().toString(), // 日
|
||||||
"H+": date.getHours().toString(), // 时
|
"H+": date.getHours().toString(), // 时
|
||||||
"M+": date.getMinutes().toString(), // 分
|
"M+": date.getMinutes().toString(), // 分
|
||||||
"S+": date.getSeconds().toString() // 秒
|
"S+": date.getSeconds().toString() // 秒
|
||||||
// 有其他格式化字符需求可以继续添加,必须转化成字符串
|
// 有其他格式化字符需求可以继续添加,必须转化成字符串
|
||||||
};
|
};
|
||||||
for (let k in opt) {
|
for (let k in opt) {
|
||||||
ret = new RegExp("(" + k + ")").exec(fmt);
|
ret = new RegExp("(" + k + ")").exec(fmt);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")))
|
fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")))
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
return fmt;
|
return fmt;
|
||||||
},
|
},
|
||||||
// 轮询liveStatus
|
// 轮询liveStatus
|
||||||
getLiveStatus() {
|
getLiveStatus() {
|
||||||
if (HAS_LIVE) {
|
if (HAS_LIVE) {
|
||||||
let that = this;
|
let that = this;
|
||||||
let date = '';
|
let date = '';
|
||||||
if (that.detail.liveStatus == 102) {
|
if (that.detail.liveStatus == 102) {
|
||||||
date = this.dateFormat('mm-dd HH:MM', new Date(that.detail.startTime * 1000)).replace('-','/');
|
date = this.dateFormat('mm-dd HH:MM', new Date(that.detail.startTime * 1000)).replace('-','/');
|
||||||
that.liveStatus['102'].title = '预告 ' + date;
|
that.liveStatus['102'].title = '预告 ' + date;
|
||||||
}
|
}
|
||||||
// livePlayer
|
// livePlayer
|
||||||
// .getLiveStatus({
|
// .getLiveStatus({
|
||||||
// room_id: that.detail.roomId
|
// room_id: that.detail.roomId
|
||||||
// })
|
// })
|
||||||
// .then(res => {
|
// .then(res => {
|
||||||
// // 101: 直播中, 102: 未开始, 103: 已结束, 104: 禁播, 105: 暂停中, 106: 异常,107:已过期
|
// // 101: 直播中, 102: 未开始, 103: 已结束, 104: 禁播, 105: 暂停中, 106: 异常,107:已过期
|
||||||
// that.detail.liveStatus = res.liveStatus;
|
// that.detail.liveStatus = res.liveStatus;
|
||||||
// })
|
// })
|
||||||
// .catch(err => {
|
// .catch(err => {
|
||||||
// console.log('get live status', err);
|
// console.log('get live status', err);
|
||||||
// });
|
// });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.sp-live-card {
|
.sp-live-card {
|
||||||
width: 344rpx;
|
width: 344rpx;
|
||||||
box-shadow: 0px 0px 10rpx 4rpx rgba(199, 199, 199, 0.22);
|
box-shadow: 0px 0px 10rpx 4rpx rgba(199, 199, 199, 0.22);
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.live-content {
|
.live-content {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 344rpx;
|
width: 344rpx;
|
||||||
height: 344rpx;
|
height: 344rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
.item-cover {
|
.item-cover {
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: 20rpx 20rpx 0 0;
|
border-radius: 20rpx 20rpx 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-status {
|
.item-status {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 20rpx;
|
top: 20rpx;
|
||||||
left: 10rpx;
|
left: 10rpx;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
background: rgba(0, 0, 0, 0.4);
|
background: rgba(0, 0, 0, 0.4);
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.status-img {
|
.status-img {
|
||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-text {
|
.status-text {
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
font-family: PingFang SC;
|
font-family: PingFang SC;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: rgba(255, 255, 255, 1);
|
color: rgba(255, 255, 255, 1);
|
||||||
padding: 0 10rpx;
|
padding: 0 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-title {
|
.item-title {
|
||||||
width: 345rpx;
|
width: 345rpx;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
line-height: 60rpx;
|
line-height: 60rpx;
|
||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
font-family: PingFang SC;
|
font-family: PingFang SC;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: rgba(255, 255, 255, 1);
|
color: rgba(255, 255, 255, 1);
|
||||||
background: linear-gradient(transparent, rgba(#000, 0.5));
|
background: linear-gradient(transparent, rgba(#000, 0.5));
|
||||||
padding-right: 60rpx;
|
padding-right: 60rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.like-img {
|
.like-img {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 20rpx;
|
bottom: 20rpx;
|
||||||
right: 10rpx;
|
right: 10rpx;
|
||||||
width: 60rpx;
|
width: 60rpx;
|
||||||
height: 130rpx;
|
height: 130rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.live-bottom {
|
.live-bottom {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
width: 345rpx;
|
width: 345rpx;
|
||||||
|
|
||||||
.live-info {
|
.live-info {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
.info-box {
|
.info-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-avatar {
|
.info-avatar {
|
||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
margin-right: 10rpx;
|
margin-right: 10rpx;
|
||||||
background: #eee;
|
background: #eee;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-name {
|
.info-name {
|
||||||
width: 150rpx;
|
width: 150rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
font-family: PingFang SC;
|
font-family: PingFang SC;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: rgba(51, 51, 51, 1);
|
color: rgba(51, 51, 51, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.views {
|
.views {
|
||||||
font-size: 20rpx;
|
font-size: 20rpx;
|
||||||
font-family: PingFang SC;
|
font-family: PingFang SC;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: rgba(153, 153, 153, 1);
|
color: rgba(153, 153, 153, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.live-goods {
|
.live-goods {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
|
|
||||||
&__item {
|
&__item {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 96rpx;
|
width: 96rpx;
|
||||||
height: 96rpx;
|
height: 96rpx;
|
||||||
border: 1rpx solid rgba(238, 238, 238, 1);
|
border: 1rpx solid rgba(238, 238, 238, 1);
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin-right: 8rpx;
|
margin-right: 8rpx;
|
||||||
|
|
||||||
&:nth-child(3n) {
|
&:nth-child(3n) {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__img {
|
&__img {
|
||||||
background: #eee;
|
background: #eee;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__price {
|
&__price {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: linear-gradient(transparent, rgba(#000, 0.5));
|
background: linear-gradient(transparent, rgba(#000, 0.5));
|
||||||
font-size: 20rpx;
|
font-size: 20rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__mark {
|
&__mark {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
background: rgba(#000, 0.3);
|
background: rgba(#000, 0.3);
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
font-family: PingFang SC;
|
font-family: PingFang SC;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: rgba(255, 255, 255, 1);
|
color: rgba(255, 255, 255, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,40 +1,40 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="min-goods" @tap="jump('/pages/activity/GroupDetails/index', { id: detail.id })">
|
<view class="min-goods" @tap="jump('/pages/activity/GroupDetails/index', { id: detail.id })">
|
||||||
<view class="img-box">
|
<view class="img-box">
|
||||||
<view class="tag" >{{ detail.people}}人团</view>
|
<view class="tag" >{{ detail.people}}人团</view>
|
||||||
<image class="img" :src="detail.image" mode="widthFix"></image>
|
<image class="img" :src="detail.image" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="price-box">
|
<view class="price-box">
|
||||||
<view class="y-f">
|
<view class="y-f">
|
||||||
<text class="seckill-current">¥{{ detail.price }}</text>
|
<text class="seckill-current">¥{{ detail.price }}</text>
|
||||||
<text class="original">销量{{ detail.sales }}{{detail.unitName}}</text>
|
<text class="original">销量{{ detail.sales }}{{detail.unitName}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="title"><slot name="titleText"></slot></view>
|
<view class="title"><slot name="titleText"></slot></view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
detail: Object
|
detail: Object
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
methods: {
|
methods: {
|
||||||
// 路由跳转
|
// 路由跳转
|
||||||
jump(path, query) {
|
jump(path, query) {
|
||||||
this.$yrouter.push({
|
this.$yrouter.push({
|
||||||
path,
|
path,
|
||||||
query
|
query
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
+256
-256
@@ -1,256 +1,256 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="adv-box mx20 mb10">
|
<view class="adv-box mx20 mb10">
|
||||||
<!-- 模板1-->
|
<!-- 模板1-->
|
||||||
<view class="x-f" v-if="detail.style == 1">
|
<view class="x-f" v-if="detail.style == 1">
|
||||||
<image style="width:710rpx;height: 220rpx;" @tap="jump(detail.list[0].path)" :src="detail.list[0].image"
|
<image style="width:710rpx;height: 220rpx;" @tap="jump(detail.list[0].path)" :src="detail.list[0].image"
|
||||||
mode="aspectFill"></image>
|
mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<!-- 模板2-->
|
<!-- 模板2-->
|
||||||
<view class="type1 x-f" v-if="detail.style == 2">
|
<view class="type1 x-f" v-if="detail.style == 2">
|
||||||
<image class="type1-img" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill">
|
<image class="type1-img" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill">
|
||||||
</image>
|
</image>
|
||||||
<image class="type1-img" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill">
|
<image class="type1-img" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill">
|
||||||
</image>
|
</image>
|
||||||
</view>
|
</view>
|
||||||
<!-- 模板3-->
|
<!-- 模板3-->
|
||||||
<view class="type2 x-bc" v-if="detail.style == 3">
|
<view class="type2 x-bc" v-if="detail.style == 3">
|
||||||
<image class="type2-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill">
|
<image class="type2-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill">
|
||||||
</image>
|
</image>
|
||||||
<view class="y-f type2-box">
|
<view class="y-f type2-box">
|
||||||
<image class="type2-img2" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill"
|
<image class="type2-img2" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill"
|
||||||
style="border-bottom:1rpx solid #f6f6f6"></image>
|
style="border-bottom:1rpx solid #f6f6f6"></image>
|
||||||
<image class="type2-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image"
|
<image class="type2-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image"
|
||||||
mode="aspectFill"></image>
|
mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 模板4-->
|
<!-- 模板4-->
|
||||||
<view class="type3 x-bc" v-if="detail.style == 4">
|
<view class="type3 x-bc" v-if="detail.style == 4">
|
||||||
<view class="type3-box y-f">
|
<view class="type3-box y-f">
|
||||||
<image class="type3-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image"
|
<image class="type3-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image"
|
||||||
mode="aspectFill"></image>
|
mode="aspectFill"></image>
|
||||||
<image class="type3-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image"
|
<image class="type3-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image"
|
||||||
mode="aspectFill"></image>
|
mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<image class="type3-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill">
|
<image class="type3-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill">
|
||||||
</image>
|
</image>
|
||||||
</view>
|
</view>
|
||||||
<!-- 模板5-->
|
<!-- 模板5-->
|
||||||
<view class="type4 y-f" v-if="detail.style == 5">
|
<view class="type4 y-f" v-if="detail.style == 5">
|
||||||
<view class="type4-box x-f">
|
<view class="type4-box x-f">
|
||||||
<image class="type4-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image"
|
<image class="type4-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image"
|
||||||
mode="aspectFill"></image>
|
mode="aspectFill"></image>
|
||||||
<image class="type4-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image"
|
<image class="type4-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image"
|
||||||
mode="aspectFill"></image>
|
mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<image class="type4-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill">
|
<image class="type4-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill">
|
||||||
</image>
|
</image>
|
||||||
</view>
|
</view>
|
||||||
<!-- 模板6-->
|
<!-- 模板6-->
|
||||||
<view class="type5 y-f" v-if="detail.style == 6">
|
<view class="type5 y-f" v-if="detail.style == 6">
|
||||||
<image class="type5-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill">
|
<image class="type5-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill">
|
||||||
</image>
|
</image>
|
||||||
<view class="type5-box x-bc">
|
<view class="type5-box x-bc">
|
||||||
<image class="type5-img2" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill"
|
<image class="type5-img2" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill"
|
||||||
style="border-bottom:1rpx solid #f6f6f6"></image>
|
style="border-bottom:1rpx solid #f6f6f6"></image>
|
||||||
<image class="type5-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image"
|
<image class="type5-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image"
|
||||||
mode="aspectFill"></image>
|
mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 模板7-->
|
<!-- 模板7-->
|
||||||
<view class="type6 y-f" v-if="detail.style == 7">
|
<view class="type6 y-f" v-if="detail.style == 7">
|
||||||
<view class="x-f type6-box1">
|
<view class="x-f type6-box1">
|
||||||
<image class="type6-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image"
|
<image class="type6-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image"
|
||||||
mode="aspectFill"></image>
|
mode="aspectFill"></image>
|
||||||
<image class="type6-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image"
|
<image class="type6-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image"
|
||||||
mode="aspectFill"></image>
|
mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="x-f type6-box2">
|
<view class="x-f type6-box2">
|
||||||
<image class="type6-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image"
|
<image class="type6-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image"
|
||||||
mode="aspectFill"></image>
|
mode="aspectFill"></image>
|
||||||
<image class="type6-img2" @tap="jump(detail.list[3].path)" :src="detail.list[3].image"
|
<image class="type6-img2" @tap="jump(detail.list[3].path)" :src="detail.list[3].image"
|
||||||
mode="aspectFill"></image>
|
mode="aspectFill"></image>
|
||||||
<image class="type6-img2" @tap="jump(detail.list[4].path)" :src="detail.list[4].image"
|
<image class="type6-img2" @tap="jump(detail.list[4].path)" :src="detail.list[4].image"
|
||||||
mode="aspectFill"></image>
|
mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
detail: {
|
detail: {
|
||||||
"list": [{
|
"list": [{
|
||||||
"image": "https:\/\/wx.yixiang.co\/static\/images\/index001.png",
|
"image": "https:\/\/wx.yixiang.co\/static\/images\/index001.png",
|
||||||
"name": "",
|
"name": "",
|
||||||
"path": "/pages/user/coupon/GetCoupon/index",
|
"path": "/pages/user/coupon/GetCoupon/index",
|
||||||
"path_name": "优惠券",
|
"path_name": "优惠券",
|
||||||
"path_type": 1
|
"path_type": 1
|
||||||
}, {
|
}, {
|
||||||
"image": "https:\/\/wx.yixiang.co\/static\/images\/index002.png",
|
"image": "https:\/\/wx.yixiang.co\/static\/images\/index002.png",
|
||||||
"name": "",
|
"name": "",
|
||||||
"path": "/pages/shop/GoodsList/index",
|
"path": "/pages/shop/GoodsList/index",
|
||||||
"path_name": "商品",
|
"path_name": "商品",
|
||||||
"path_type": 1
|
"path_type": 1
|
||||||
}, {
|
}, {
|
||||||
"image": "https:\/\/wx.yixiang.co\/static\/images\/index003.png",
|
"image": "https:\/\/wx.yixiang.co\/static\/images\/index003.png",
|
||||||
"name": "",
|
"name": "",
|
||||||
"path": "/pages/user/signIn/Integral/index",
|
"path": "/pages/user/signIn/Integral/index",
|
||||||
"path_name": "积分",
|
"path_name": "积分",
|
||||||
"path_type": 1
|
"path_type": 1
|
||||||
}],
|
}],
|
||||||
"name": "",
|
"name": "",
|
||||||
"style": 3
|
"style": 3
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {},
|
props: {},
|
||||||
computed: {},
|
computed: {},
|
||||||
created() {},
|
created() {},
|
||||||
methods: {
|
methods: {
|
||||||
// 路由跳转
|
// 路由跳转
|
||||||
jump(path) {
|
jump(path) {
|
||||||
this.$yrouter.push({
|
this.$yrouter.push({
|
||||||
path
|
path
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.adv-box {
|
.adv-box {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
image{
|
image{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.type1 {
|
.type1 {
|
||||||
.type1-img {
|
.type1-img {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 220rpx;
|
height: 220rpx;
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
border-right: 1rpx solid #f6f6f6;
|
border-right: 1rpx solid #f6f6f6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.type2 {
|
.type2 {
|
||||||
.type2-img1 {
|
.type2-img1 {
|
||||||
width: (710rpx/2);
|
width: (710rpx/2);
|
||||||
height: 340rpx;
|
height: 340rpx;
|
||||||
border-right: 1rpx solid #f6f6f6;
|
border-right: 1rpx solid #f6f6f6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type2-box {
|
.type2-box {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 340rpx;
|
height: 340rpx;
|
||||||
width: (710rpx/2);
|
width: (710rpx/2);
|
||||||
|
|
||||||
.type2-img2 {
|
.type2-img2 {
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.type3 {
|
.type3 {
|
||||||
.type3-box {
|
.type3-box {
|
||||||
width: (710rpx/2);
|
width: (710rpx/2);
|
||||||
border-right: 1rpx solid #f6f6f6;
|
border-right: 1rpx solid #f6f6f6;
|
||||||
|
|
||||||
.type3-img1 {
|
.type3-img1 {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
border-bottom: 1rpx solid #f6f6f6;
|
border-bottom: 1rpx solid #f6f6f6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.type3-img2 {
|
.type3-img2 {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 340rpx;
|
height: 340rpx;
|
||||||
width: (710rpx/2);
|
width: (710rpx/2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.type4 {
|
.type4 {
|
||||||
.type4-box {
|
.type4-box {
|
||||||
border-bottom: 1rpx solid #f6f6f6;
|
border-bottom: 1rpx solid #f6f6f6;
|
||||||
|
|
||||||
.type4-img1 {
|
.type4-img1 {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
border-right: 1rpx solid #f6f6f6;
|
border-right: 1rpx solid #f6f6f6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.type4-img2 {
|
.type4-img2 {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
width: 710rpx;
|
width: 710rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.type5 {
|
.type5 {
|
||||||
.type5-img1 {
|
.type5-img1 {
|
||||||
width: 710rpx;
|
width: 710rpx;
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
border-bottom: 1rpx solid #f6f6f6;
|
border-bottom: 1rpx solid #f6f6f6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type5-box {
|
.type5-box {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
width: 710rpx;
|
width: 710rpx;
|
||||||
|
|
||||||
.type5-img2 {
|
.type5-img2 {
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
border-right: 1rpx solid #f6f6f6;
|
border-right: 1rpx solid #f6f6f6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.type6 {
|
.type6 {
|
||||||
.type6-box1 {
|
.type6-box1 {
|
||||||
.type6-img1 {
|
.type6-img1 {
|
||||||
width: (710rpx/2);
|
width: (710rpx/2);
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
border-right: 1rpx solid #f6f6f6;
|
border-right: 1rpx solid #f6f6f6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.type6-box2 {
|
.type6-box2 {
|
||||||
border-top: 1rpx solid #f6f6f6;
|
border-top: 1rpx solid #f6f6f6;
|
||||||
|
|
||||||
.type6-img2 {
|
.type6-img2 {
|
||||||
width: (710rpx/3);
|
width: (710rpx/3);
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
border-right: 1rpx solid #f6f6f6;
|
border-right: 1rpx solid #f6f6f6;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
border-right: 0;
|
border-right: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
image {
|
image {
|
||||||
// background-color: #ccc;
|
// background-color: #ccc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
+197
-197
@@ -1,197 +1,197 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 今日必拼 -->
|
<!-- 今日必拼 -->
|
||||||
<view class="group-goods pa20 mx20 mb10">
|
<view class="group-goods pa20 mx20 mb10">
|
||||||
<view class="title-box x-bc" @tap="jump('/pages/activity/GoodsGroup/index')">
|
<view class="title-box x-bc" @tap="jump('/pages/activity/GoodsGroup/index')">
|
||||||
<text class="title">超值拼团</text>
|
<text class="title">超值拼团</text>
|
||||||
<view class="group-people x-f">
|
<view class="group-people x-f">
|
||||||
<text class="tip">更多</text>
|
<text class="tip">更多</text>
|
||||||
<text class="cuIcon-right"></text>
|
<text class="cuIcon-right"></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="goods-box swiper-box x-f">
|
<view class="goods-box swiper-box x-f">
|
||||||
<swiper class="carousel" circular @change="swiperChange" :autoplay="true" duration="2000">
|
<swiper class="carousel" circular @change="swiperChange" :autoplay="true" duration="2000">
|
||||||
<swiper-item v-for="(goods, index) in goodsList" :key="index" class="carousel-item">
|
<swiper-item v-for="(goods, index) in goodsList" :key="index" class="carousel-item">
|
||||||
<view class="goods-list-box x-f">
|
<view class="goods-list-box x-f">
|
||||||
<block v-for="mgoods in goods" :key="mgoods.id">
|
<block v-for="mgoods in goods" :key="mgoods.id">
|
||||||
<sh-activity-goods :detail="mgoods" class="goods-item">
|
<sh-activity-goods :detail="mgoods" class="goods-item">
|
||||||
<!-- <block slot="titleText">立减¥8.5</block> -->
|
<!-- <block slot="titleText">立减¥8.5</block> -->
|
||||||
</sh-activity-goods>
|
</sh-activity-goods>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
<view class="swiper-dots" v-if="goodsList.length > 1">
|
<view class="swiper-dots" v-if="goodsList.length > 1">
|
||||||
<text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length"
|
<text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length"
|
||||||
:key="index"></text>
|
:key="index"></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import shActivityGoods from './sh-activity-goods.vue';
|
import shActivityGoods from './sh-activity-goods.vue';
|
||||||
export default {
|
export default {
|
||||||
name: 'shGroupon',
|
name: 'shGroupon',
|
||||||
components: {
|
components: {
|
||||||
shActivityGoods
|
shActivityGoods
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
goodsList: [],
|
goodsList: [],
|
||||||
swiperCurrent: 0
|
swiperCurrent: 0
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
detail: Array
|
detail: Array
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
created() {},
|
created() {},
|
||||||
watch: {
|
watch: {
|
||||||
detail(next) {
|
detail(next) {
|
||||||
this.goodsList = this.sortData(next, 4);
|
this.goodsList = this.sortData(next, 4);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
swiperChange(e) {
|
swiperChange(e) {
|
||||||
this.swiperCurrent = e.detail.current;
|
this.swiperCurrent = e.detail.current;
|
||||||
},
|
},
|
||||||
// 数据分层
|
// 数据分层
|
||||||
sortData(oArr, length) {
|
sortData(oArr, length) {
|
||||||
let arr = [];
|
let arr = [];
|
||||||
let minArr = [];
|
let minArr = [];
|
||||||
oArr.forEach(c => {
|
oArr.forEach(c => {
|
||||||
if (minArr.length === length) {
|
if (minArr.length === length) {
|
||||||
minArr = [];
|
minArr = [];
|
||||||
}
|
}
|
||||||
if (minArr.length === 0) {
|
if (minArr.length === 0) {
|
||||||
arr.push(minArr);
|
arr.push(minArr);
|
||||||
}
|
}
|
||||||
minArr.push(c);
|
minArr.push(c);
|
||||||
});
|
});
|
||||||
|
|
||||||
return arr;
|
return arr;
|
||||||
},
|
},
|
||||||
jump(path, query) {
|
jump(path, query) {
|
||||||
this.$yrouter.push({
|
this.$yrouter.push({
|
||||||
path,
|
path,
|
||||||
query,
|
query,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.swiper-box,
|
.swiper-box,
|
||||||
.carousel {
|
.carousel {
|
||||||
width: 700rpx;
|
width: 700rpx;
|
||||||
height: 240upx;
|
height: 240upx;
|
||||||
position: relative;
|
position: relative;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
|
|
||||||
.carousel-item {
|
.carousel-item {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
// padding: 0 28upx;
|
// padding: 0 28upx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.swiper-image {
|
.swiper-image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
// border-radius: 10upx;
|
// border-radius: 10upx;
|
||||||
background: #ccc;
|
background: #ccc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.swiper-dots {
|
.swiper-dots {
|
||||||
display: flex;
|
display: flex;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
bottom: 0rpx;
|
bottom: 0rpx;
|
||||||
z-index: 66;
|
z-index: 66;
|
||||||
|
|
||||||
.dot {
|
.dot {
|
||||||
width: 45rpx;
|
width: 45rpx;
|
||||||
height: 3rpx;
|
height: 3rpx;
|
||||||
background: #eee;
|
background: #eee;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
margin-right: 10rpx;
|
margin-right: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dot-active {
|
.dot-active {
|
||||||
width: 45rpx;
|
width: 45rpx;
|
||||||
height: 3rpx;
|
height: 3rpx;
|
||||||
background: #a8700d;
|
background: #a8700d;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
margin-right: 10rpx;
|
margin-right: 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 今日必拼+限时抢购
|
// 今日必拼+限时抢购
|
||||||
.group-goods {
|
.group-goods {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
.title-box {
|
.title-box {
|
||||||
padding-bottom: 20rpx;
|
padding-bottom: 20rpx;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.group-people {
|
.group-people {
|
||||||
.time-box {
|
.time-box {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #edbf62;
|
color: #edbf62;
|
||||||
|
|
||||||
.count-text-box {
|
.count-text-box {
|
||||||
width: 30rpx;
|
width: 30rpx;
|
||||||
height: 34rpx;
|
height: 34rpx;
|
||||||
background: #edbf62;
|
background: #edbf62;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 34rpx;
|
line-height: 34rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
border-radius: 6rpx;
|
border-radius: 6rpx;
|
||||||
color: rgba(#fff, 0.9);
|
color: rgba(#fff, 0.9);
|
||||||
margin: 0 8rpx;
|
margin: 0 8rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.head-box {
|
.head-box {
|
||||||
.head-img {
|
.head-img {
|
||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: #ccc;
|
background: #ccc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tip {
|
.tip {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
padding-left: 30rpx;
|
padding-left: 30rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cuIcon-right {
|
.cuIcon-right {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
line-height: 28rpx;
|
line-height: 28rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods-box {
|
.goods-box {
|
||||||
.goods-item {
|
.goods-item {
|
||||||
margin-right: 22rpx;
|
margin-right: 22rpx;
|
||||||
|
|
||||||
&:nth-child(4n) {
|
&:nth-child(4n) {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -124,6 +124,7 @@ export function clearAuthStatus() {
|
|||||||
|
|
||||||
export function oAuth() {
|
export function oAuth() {
|
||||||
console.log('处理微信授权')
|
console.log('处理微信授权')
|
||||||
|
console.log('处理微信授权cookie',cookie.get("spread"))
|
||||||
console.log(store)
|
console.log(store)
|
||||||
console.log(store.state)
|
console.log(store.state)
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|||||||
+1
-1
@@ -143,7 +143,7 @@
|
|||||||
"plugins" : {
|
"plugins" : {
|
||||||
"live-player-plugin" : {
|
"live-player-plugin" : {
|
||||||
// 注意填写该直播组件最新版本号,微信开发者工具调试时可获取最新版本号(复制时请去掉注释)
|
// 注意填写该直播组件最新版本号,微信开发者工具调试时可获取最新版本号(复制时请去掉注释)
|
||||||
"version" : "1.1.9",
|
"version" : "1.1.10",
|
||||||
// 必须填该直播组件appid,该示例值即为直播组件appid(复制时请去掉注释)
|
// 必须填该直播组件appid,该示例值即为直播组件appid(复制时请去掉注释)
|
||||||
"provider" : "wx2b03c6e691cd7370"
|
"provider" : "wx2b03c6e691cd7370"
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -431,9 +431,9 @@
|
|||||||
"borderStyle": "black",
|
"borderStyle": "black",
|
||||||
"backgroundColor": "#ffffff",
|
"backgroundColor": "#ffffff",
|
||||||
"height": "50px",
|
"height": "50px",
|
||||||
"fontSize": "10px",
|
"fontSize": "8px",
|
||||||
"iconWidth": "24px",
|
"iconWidth": "16px",
|
||||||
"spacing": "3px",
|
"spacing": "-3px",
|
||||||
"list": [{
|
"list": [{
|
||||||
"pagePath": "pages/home/index",
|
"pagePath": "pages/home/index",
|
||||||
"iconPath": "static/icon-home.png",
|
"iconPath": "static/icon-home.png",
|
||||||
|
|||||||
+25
-34
@@ -7,42 +7,33 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import { mapState, mapMutations, mapActions } from "vuex";
|
||||||
mapState,
|
// 组件
|
||||||
mapMutations,
|
// import request from "@//api/request";
|
||||||
mapActions
|
import { wxappAuth, getUser } from "@/api/user";
|
||||||
} from "vuex";
|
import dayjs from "dayjs";
|
||||||
// 组件
|
import cookie from "@/utils/store/cookie";
|
||||||
// import request from "@//api/request";
|
import { parseQuery, login, handleQrCode ,getCurrentPageUrl,handleUrlParam} from "@/utils";
|
||||||
import {
|
|
||||||
wxappAuth,
|
|
||||||
getUser
|
|
||||||
} from "@/api/user";
|
|
||||||
import dayjs from "dayjs";
|
|
||||||
import cookie from "@/utils/store/cookie";
|
|
||||||
import {
|
|
||||||
parseQuery,
|
|
||||||
login,
|
|
||||||
handleQrCode
|
|
||||||
} from "@/utils";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Loading",
|
name: "Loading",
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
|
||||||
var url = handleQrCode();
|
var url = handleQrCode();
|
||||||
// 判断是否是分销
|
if(!url){
|
||||||
if (url) {
|
url = handleUrlParam(getCurrentPageUrl())
|
||||||
var spread = cookie.get("spread");
|
}
|
||||||
let urlSpread = parseInt(url.spread);
|
// 判断是否是分销
|
||||||
if (!Number.isNaN(urlSpread) && spread !== urlSpread) {
|
if (url) {
|
||||||
cookie.set("spread", urlSpread || 0);
|
var spread = cookie.get("spread");
|
||||||
} else if (spread === 0 || typeof spread !== "number") {
|
let urlSpread = parseInt(url.spread);
|
||||||
cookie.set("spread", urlSpread || 0);
|
if (!Number.isNaN(urlSpread) && spread !== urlSpread) {
|
||||||
}
|
cookie.set("spread", urlSpread || 0);
|
||||||
|
} else if (spread === 0 || typeof spread !== "number") {
|
||||||
|
cookie.set("spread", urlSpread || 0);
|
||||||
}
|
}
|
||||||
if (this.$store.getters.token) {
|
if (this.$store.getters.token) {
|
||||||
this.toLaunch();
|
this.toLaunch();
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ export default {
|
|||||||
pinkT: [], //团长信息
|
pinkT: [], //团长信息
|
||||||
storeCombination: [], //拼团产品
|
storeCombination: [], //拼团产品
|
||||||
pinkId: 0,
|
pinkId: 0,
|
||||||
|
uniqueId: "",
|
||||||
count: 0, //拼团剩余人数
|
count: 0, //拼团剩余人数
|
||||||
iShidden: false
|
iShidden: false
|
||||||
};
|
};
|
||||||
@@ -208,6 +209,7 @@ export default {
|
|||||||
that.$set(that, "pinkBool", res.data.pinkBool);
|
that.$set(that, "pinkBool", res.data.pinkBool);
|
||||||
that.$set(that, "isOk", res.data.isOk);
|
that.$set(that, "isOk", res.data.isOk);
|
||||||
that.$set(that, "currentPinkOrder", res.data.currentPinkOrder);
|
that.$set(that, "currentPinkOrder", res.data.currentPinkOrder);
|
||||||
|
that.$set(that, "uniqueId", res.data.uniqueId);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//拼团取消
|
//拼团取消
|
||||||
|
|||||||
+248
-249
@@ -1,249 +1,248 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="live-el mx20 mb10">
|
<view class="live-el mx20 mb10">
|
||||||
<view class="head">
|
<view class="head">
|
||||||
<text class="head-title">热门直播</text>
|
<text class="head-title">热门直播</text>
|
||||||
<view class="head-more" @tap="$yrouter.push('/pages/shop/Live/LiveList/index')">
|
<view class="head-more" @tap="$yrouter.push('/pages/shop/Live/LiveList/index')">
|
||||||
<text>更多</text>
|
<text>更多</text>
|
||||||
<text class="cuIcon-right"></text>
|
<text class="cuIcon-right"></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content-one">
|
<view class="content-one">
|
||||||
<view class="content-one__item" v-for="live in detail" :key="live.roomId" @tap="goRoom(live)">
|
<view class="content-one__item" v-for="live in detail" :key="live.roomId" @tap="goRoom(live)">
|
||||||
<image class="item-cover" :src="live.shareImge" mode="widthFix"></image>
|
<image class="item-cover" :src="live.shareImge" mode="widthFix"></image>
|
||||||
<view class="item-status">
|
<view class="item-status">
|
||||||
<image class="status-img" :src="liveStatus[live.liveStatus].img" mode=""></image>
|
<image class="status-img" :src="liveStatus[live.liveStatus].img" mode=""></image>
|
||||||
<text class="status-text">{{ liveStatus[live.liveStatus].title }}</text>
|
<text class="status-text">{{ liveStatus[live.liveStatus].title }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-title">{{ live.name }}</view>
|
<view class="item-title">{{ live.name }}</view>
|
||||||
<image v-if="live.liveStatus == 101" class="like-img" src="http://Shop.7wpp.com/imgs/live/zan.gif"
|
<image v-if="live.liveStatus == 101" class="like-img" src="http://Shop.7wpp.com/imgs/live/zan.gif"
|
||||||
mode=""></image>
|
mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ShopLiveCard from '@/components/ShopLiveCard.vue'
|
import ShopLiveCard from '@/components/ShopLiveCard.vue'
|
||||||
|
|
||||||
let HAS_LIVE = false
|
let HAS_LIVE = false
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
HAS_LIVE = true
|
HAS_LIVE = true
|
||||||
let livePlayer = null;
|
let livePlayer = null;
|
||||||
if (HAS_LIVE) {
|
if (HAS_LIVE) {
|
||||||
livePlayer = requirePlugin('live-player-plugin');
|
livePlayer = requirePlugin('live-player-plugin');
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
import {
|
import {
|
||||||
yxWechatLive,
|
yxWechatLive,
|
||||||
getLiveReplay
|
getLiveReplay
|
||||||
} from '@/api/live';
|
} from '@/api/live';
|
||||||
|
|
||||||
let timer = null;
|
let timer = null;
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
ShopLiveCard
|
ShopLiveCard
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
liveList: [],
|
liveList: [],
|
||||||
liveStatus: {
|
liveStatus: {
|
||||||
'101': {
|
'101': {
|
||||||
img: 'https://wx.yixiang.co/static/images/live.png',
|
img: 'https://wx.yixiang.co/static/images/live.png',
|
||||||
title: '直播中'
|
title: '直播中'
|
||||||
},
|
},
|
||||||
'102': {
|
'102': {
|
||||||
img: 'https://wx.yixiang.co/static/images/prevue.png',
|
img: 'https://wx.yixiang.co/static/images/prevue.png',
|
||||||
title: '未开始'
|
title: '未开始'
|
||||||
},
|
},
|
||||||
'103': {
|
'103': {
|
||||||
img: 'https://wx.yixiang.co/static/images/playback.png',
|
img: 'https://wx.yixiang.co/static/images/playback.png',
|
||||||
title: '已结束'
|
title: '已结束'
|
||||||
},
|
},
|
||||||
'104': {
|
'104': {
|
||||||
img: 'https://wx.yixiang.co/static/images/104.png',
|
img: 'https://wx.yixiang.co/static/images/104.png',
|
||||||
title: '禁播'
|
title: '禁播'
|
||||||
},
|
},
|
||||||
'105': {
|
'105': {
|
||||||
img: 'https://wx.yixiang.co/static/images/105.png',
|
img: 'https://wx.yixiang.co/static/images/105.png',
|
||||||
title: '暂停中'
|
title: '暂停中'
|
||||||
},
|
},
|
||||||
'106': {
|
'106': {
|
||||||
img: 'https://wx.yixiang.co/static/images/106.png',
|
img: 'https://wx.yixiang.co/static/images/106.png',
|
||||||
title: '异常'
|
title: '异常'
|
||||||
},
|
},
|
||||||
'107': {
|
'107': {
|
||||||
img: 'https://wx.yixiang.co/static/images/past.png',
|
img: 'https://wx.yixiang.co/static/images/past.png',
|
||||||
title: '已过期'
|
title: '已过期'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
detail: Array
|
detail: Array
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
let that = this;
|
||||||
timer = setInterval(() => {
|
timer = setInterval(() => {
|
||||||
that.getLiveStatus();
|
that.getLiveStatus();
|
||||||
}, 60000);
|
}, 60000);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
timer = null;
|
timer = null;
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
methods: {
|
methods: {
|
||||||
// 直播列表
|
// 直播列表
|
||||||
getLiveList() {
|
getLiveList() {
|
||||||
// let that = this;
|
// let that = this;
|
||||||
// yxWechatLive({
|
// yxWechatLive({
|
||||||
// page: 1,
|
// page: 1,
|
||||||
// size: 10,
|
// size: 10,
|
||||||
// }).then(res => {
|
// }).then(res => {
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
// })
|
// })
|
||||||
},
|
},
|
||||||
// 轮询liveStatus
|
// 轮询liveStatus
|
||||||
getLiveStatus() {
|
getLiveStatus() {
|
||||||
// if (HAS_LIVE) {
|
// if (HAS_LIVE) {
|
||||||
// let that = this;
|
// let that = this;
|
||||||
// let date = '';
|
// let date = '';
|
||||||
// if (that.detail.liveStatus == 102) {
|
// if (that.detail.liveStatus == 102) {
|
||||||
// date = that.$tools.dateFormat('mm-dd HH:MM', new Date(that.detail.starttime * 1000)).replace('-',
|
// date = that.$tools.dateFormat('mm-dd HH:MM', new Date(that.detail.starttime * 1000)).replace('-',
|
||||||
// '/');
|
// '/');
|
||||||
// that.liveStatus['102'].title = '预告 ' + date;
|
// that.liveStatus['102'].title = '预告 ' + date;
|
||||||
// }
|
// }
|
||||||
// livePlayer
|
// livePlayer
|
||||||
// .getLiveStatus({
|
// .getLiveStatus({
|
||||||
// room_id: that.detail.roomId
|
// room_id: that.detail.roomId
|
||||||
// })
|
// })
|
||||||
// .then(res => {
|
// .then(res => {
|
||||||
// // 101: 直播中, 102: 未开始, 103: 已结束, 104: 禁播, 105: 暂停中, 106: 异常,107:已过期
|
// // 101: 直播中, 102: 未开始, 103: 已结束, 104: 禁播, 105: 暂停中, 106: 异常,107:已过期
|
||||||
// that.detail.liveStatus = res.liveStatus;
|
// that.detail.liveStatus = res.liveStatus;
|
||||||
// })
|
// })
|
||||||
// .catch(err => {
|
// .catch(err => {
|
||||||
// console.log('get live status', err);
|
// console.log('get live status', err);
|
||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
goRoom(live) {
|
goRoom(live) {
|
||||||
console.log(live.roomId,9999)
|
wx.navigateTo({
|
||||||
wx.navigateTo({
|
url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${live.roomId}`
|
||||||
url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${live.roomId}`
|
});
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
};
|
</script>
|
||||||
</script>
|
|
||||||
|
<style lang="scss">
|
||||||
<style lang="scss">
|
.live-el {
|
||||||
.live-el {
|
background: #fff;
|
||||||
background: #fff;
|
border-radius: 20rpx;
|
||||||
border-radius: 20rpx;
|
padding: 30rpx 20rpx 25rpx;
|
||||||
padding: 30rpx 20rpx 25rpx;
|
|
||||||
|
.head {
|
||||||
.head {
|
display: flex;
|
||||||
display: flex;
|
justify-content: space-between;
|
||||||
justify-content: space-between;
|
align-items: center;
|
||||||
align-items: center;
|
|
||||||
|
&-title {
|
||||||
&-title {
|
font-size: 32rpx;
|
||||||
font-size: 32rpx;
|
font-weight: bold;
|
||||||
font-weight: bold;
|
font-family: PingFang SC;
|
||||||
font-family: PingFang SC;
|
color: rgba(51, 51, 51, 1);
|
||||||
color: rgba(51, 51, 51, 1);
|
}
|
||||||
}
|
|
||||||
|
&-more {
|
||||||
&-more {
|
font-size: 26rpx;
|
||||||
font-size: 26rpx;
|
font-family: PingFang SC;
|
||||||
font-family: PingFang SC;
|
font-weight: 500;
|
||||||
font-weight: 500;
|
color: rgba(51, 51, 51, 1);
|
||||||
color: rgba(51, 51, 51, 1);
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
// 单个大图直播
|
||||||
// 单个大图直播
|
.content-one {
|
||||||
.content-one {
|
.content-one__item {
|
||||||
.content-one__item {
|
position: relative;
|
||||||
position: relative;
|
height: 280rpx;
|
||||||
height: 280rpx;
|
border-radius: 20rpx;
|
||||||
border-radius: 20rpx;
|
margin-top: 25rpx;
|
||||||
margin-top: 25rpx;
|
overflow: hidden;
|
||||||
overflow: hidden;
|
|
||||||
|
.item-cover {
|
||||||
.item-cover {
|
background-color: #eee;
|
||||||
background-color: #eee;
|
width: 100%;
|
||||||
width: 100%;
|
height: 100%;
|
||||||
height: 100%;
|
}
|
||||||
}
|
|
||||||
|
.item-status {
|
||||||
.item-status {
|
position: absolute;
|
||||||
position: absolute;
|
top: 20rpx;
|
||||||
top: 20rpx;
|
left: 10rpx;
|
||||||
left: 10rpx;
|
height: 40rpx;
|
||||||
height: 40rpx;
|
background: rgba(0, 0, 0, 0.4);
|
||||||
background: rgba(0, 0, 0, 0.4);
|
border-radius: 20rpx;
|
||||||
border-radius: 20rpx;
|
display: flex;
|
||||||
display: flex;
|
justify-content: center;
|
||||||
justify-content: center;
|
align-items: center;
|
||||||
align-items: center;
|
|
||||||
|
.status-img {
|
||||||
.status-img {
|
width: 38rpx;
|
||||||
width: 38rpx;
|
height: 38rpx;
|
||||||
height: 38rpx;
|
}
|
||||||
}
|
|
||||||
|
.status-text {
|
||||||
.status-text {
|
font-size: 22rpx;
|
||||||
font-size: 22rpx;
|
font-family: PingFang SC;
|
||||||
font-family: PingFang SC;
|
font-weight: 500;
|
||||||
font-weight: 500;
|
color: rgba(255, 255, 255, 1);
|
||||||
color: rgba(255, 255, 255, 1);
|
padding: 0 10rpx;
|
||||||
padding: 0 10rpx;
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
.item-title {
|
||||||
.item-title {
|
width: 680rpx;
|
||||||
width: 680rpx;
|
position: absolute;
|
||||||
position: absolute;
|
bottom: 0;
|
||||||
bottom: 0;
|
line-height: 60rpx;
|
||||||
line-height: 60rpx;
|
padding: 0 20rpx;
|
||||||
padding: 0 20rpx;
|
font-size: 26rpx;
|
||||||
font-size: 26rpx;
|
font-family: PingFang SC;
|
||||||
font-family: PingFang SC;
|
font-weight: 500;
|
||||||
font-weight: 500;
|
color: rgba(255, 255, 255, 1);
|
||||||
color: rgba(255, 255, 255, 1);
|
background: linear-gradient(transparent, rgba(#000, 0.5));
|
||||||
background: linear-gradient(transparent, rgba(#000, 0.5));
|
}
|
||||||
}
|
|
||||||
|
.like-img {
|
||||||
.like-img {
|
position: absolute;
|
||||||
position: absolute;
|
bottom: 20rpx;
|
||||||
bottom: 20rpx;
|
right: 10rpx;
|
||||||
right: 10rpx;
|
width: 60rpx;
|
||||||
width: 60rpx;
|
height: 130rpx;
|
||||||
height: 130rpx;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
// 双图直播
|
||||||
// 双图直播
|
.content-two {
|
||||||
.content-two {
|
width: 100%;
|
||||||
width: 100%;
|
// -moz-column-count: 2;
|
||||||
// -moz-column-count: 2;
|
// -webkit-column-count: 2;
|
||||||
// -webkit-column-count: 2;
|
// column-count: 2;
|
||||||
// column-count: 2;
|
// padding-top: 20rpx;
|
||||||
// padding-top: 20rpx;
|
display: flex;
|
||||||
display: flex;
|
flex-wrap: wrap;
|
||||||
flex-wrap: wrap;
|
|
||||||
|
&__item {
|
||||||
&__item {
|
margin-right: 30rpx;
|
||||||
margin-right: 30rpx;
|
margin-top: 20rpx;
|
||||||
margin-top: 20rpx;
|
|
||||||
|
&:nth-child(2n) {
|
||||||
&:nth-child(2n) {
|
margin-right: 0;
|
||||||
margin-right: 0;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
</style>
|
||||||
</style>
|
|
||||||
|
|||||||
+182
-182
@@ -1,182 +1,182 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="page_box">
|
<view class="page_box">
|
||||||
<view class="head_box">
|
<view class="head_box">
|
||||||
<view class="live-tab">
|
<view class="live-tab">
|
||||||
<view class="live-tab__item" v-for="tab in liveTab" :key="tab.title" @tap="selTab(tab)">
|
<view class="live-tab__item" v-for="tab in liveTab" :key="tab.title" @tap="selTab(tab)">
|
||||||
<view class="live-tab__item-name">{{ tab.name }}</view>
|
<view class="live-tab__item-name">{{ tab.name }}</view>
|
||||||
<text class="live-tab__item--link" :class="{ 'live-tab__item--active': tabCur == tab.title }"></text>
|
<text class="live-tab__item--link" :class="{ 'live-tab__item--active': tabCur == tab.title }"></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content_box">
|
<view class="content_box">
|
||||||
<scroll-view scroll-y="true" @scrolltolower="loadMore" class="scroll-box">
|
<scroll-view scroll-y="true" @scrolltolower="loadMore" class="scroll-box">
|
||||||
<view class="list-box">
|
<view class="list-box">
|
||||||
<block v-for="live in liveList" :key="live.roomId">
|
<block v-for="live in liveList" :key="live.roomId">
|
||||||
<shop-live-card :detail="live"></shop-live-card>
|
<shop-live-card :detail="live"></shop-live-card>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="liveList.length" class="cu-load text-gray" :class="loadStatus"></view>
|
<view v-if="liveList.length" class="cu-load text-gray" :class="loadStatus"></view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
<Loading :loaded="loaded" :loading="loading"></Loading>
|
<Loading :loaded="loaded" :loading="loading"></Loading>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
yxWechatLive
|
yxWechatLive
|
||||||
} from "@/api/live";
|
} from "@/api/live";
|
||||||
import ShopLiveCard from '@/components/ShopLiveCard.vue'
|
import ShopLiveCard from '@/components/ShopLiveCard.vue'
|
||||||
import Loading from "@/components/Loading";
|
import Loading from "@/components/Loading";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
ShopLiveCard,
|
ShopLiveCard,
|
||||||
Loading
|
Loading
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tabCur: 'all',
|
tabCur: 'all',
|
||||||
liveStatus: '',
|
liveStatus: '',
|
||||||
loaded: false,
|
loaded: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
liveTab: [{
|
liveTab: [{
|
||||||
title: 'all',
|
title: 'all',
|
||||||
name: '全部',
|
name: '全部',
|
||||||
code: ''
|
code: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'prevue',
|
title: 'prevue',
|
||||||
name: '预告',
|
name: '预告',
|
||||||
code: '102'
|
code: '102'
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'living',
|
title: 'living',
|
||||||
name: '直播中',
|
name: '直播中',
|
||||||
code: '101'
|
code: '101'
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'lived',
|
title: 'lived',
|
||||||
name: '已结束',
|
name: '已结束',
|
||||||
code: '103'
|
code: '103'
|
||||||
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
liveList: [],
|
liveList: [],
|
||||||
loadStatus: '', //loading,over
|
loadStatus: '', //loading,over
|
||||||
currentPage: 0,
|
currentPage: 0,
|
||||||
size: 10,
|
size: 10,
|
||||||
lastPage: 0
|
lastPage: 0
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getLiveList();
|
this.getLiveList();
|
||||||
},
|
},
|
||||||
onHide() {},
|
onHide() {},
|
||||||
methods: {
|
methods: {
|
||||||
// 切换tab
|
// 切换tab
|
||||||
selTab(tab) {
|
selTab(tab) {
|
||||||
console.log(tab)
|
console.log(tab)
|
||||||
this.tabCur = tab.title;
|
this.tabCur = tab.title;
|
||||||
this.liveStatus = tab.code;
|
this.liveStatus = tab.code;
|
||||||
this.liveList = [];
|
this.liveList = [];
|
||||||
this.loaded=false;
|
this.loaded=false;
|
||||||
this.loading=false;
|
this.loading=false;
|
||||||
this.getLiveListTab();
|
this.getLiveListTab();
|
||||||
},
|
},
|
||||||
|
|
||||||
// 直播列表
|
// 直播列表
|
||||||
getLiveListTab() {
|
getLiveListTab() {
|
||||||
let that = this;
|
let that = this;
|
||||||
yxWechatLive({
|
yxWechatLive({
|
||||||
liveStatus: that.liveStatus,
|
liveStatus: that.liveStatus,
|
||||||
page: 0,
|
page: 0,
|
||||||
size: that.size
|
size: that.size
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
that.liveList = [...that.liveList, ...res.data.content];
|
that.liveList = [...that.liveList, ...res.data.content];
|
||||||
that.lastPage = res.data.lastPage;
|
that.lastPage = res.data.lastPage;
|
||||||
this.loaded = res.data.content.length < that.size;
|
this.loaded = res.data.content.length < that.size;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 直播列表
|
// 直播列表
|
||||||
getLiveList() {
|
getLiveList() {
|
||||||
let that = this;
|
let that = this;
|
||||||
if (this.loading || this.loaded) return;
|
if (this.loading || this.loaded) return;
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
yxWechatLive({
|
yxWechatLive({
|
||||||
liveStatus: this.liveStatus,
|
liveStatus: this.liveStatus,
|
||||||
page: this.currentPage,
|
page: this.currentPage,
|
||||||
size: this.size
|
size: this.size
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
that.liveList = that.liveList.concat(res.data.content)
|
that.liveList = that.liveList.concat(res.data.content)
|
||||||
this.currentPage++;
|
this.currentPage++;
|
||||||
this.loaded = res.data.content.length < that.size;
|
this.loaded = res.data.content.length < that.size;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
!this.loading && this.getLiveList();
|
!this.loading && this.getLiveList();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
// tab
|
// tab
|
||||||
.live-tab {
|
.live-tab {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 96rpx;
|
height: 96rpx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
&__item {
|
&__item {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__item-name {
|
&__item-name {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-family: PingFang SC;
|
font-family: PingFang SC;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: rgba(51, 51, 51, 1);
|
color: rgba(51, 51, 51, 1);
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__item--link {
|
&__item--link {
|
||||||
width: 68rpx;
|
width: 68rpx;
|
||||||
height: 4rpx;
|
height: 4rpx;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border-radius: 2rpx;
|
border-radius: 2rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__item--active {
|
&__item--active {
|
||||||
width: 68rpx;
|
width: 68rpx;
|
||||||
height: 4rpx;
|
height: 4rpx;
|
||||||
background: rgba(213, 166, 90, 1);
|
background: rgba(213, 166, 90, 1);
|
||||||
border-radius: 2rpx;
|
border-radius: 2rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 瀑布流 list
|
// 瀑布流 list
|
||||||
.scroll-box {
|
.scroll-box {
|
||||||
.list-box {
|
.list-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
-moz-column-count: 2;
|
-moz-column-count: 2;
|
||||||
-webkit-column-count: 2;
|
-webkit-column-count: 2;
|
||||||
column-count: 2;
|
column-count: 2;
|
||||||
padding: 25rpx;
|
padding: 25rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<view>总资产(元)</view>
|
<view>总资产(元)</view>
|
||||||
<view class="money">{{ now_money }}</view>
|
<view class="money">{{ now_money }}</view>
|
||||||
</view>
|
</view>
|
||||||
<navigator url="/pages/user/Recharge/index" class="recharge font-color-red">充值</navigator>
|
<navigator url="/pages/user/Recharge/index" class="recharge font-color-red" v-if="is_hide=='0'">充值</navigator>
|
||||||
</view>
|
</view>
|
||||||
<view class="cumulative acea-row row-top">
|
<view class="cumulative acea-row row-top">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view>消费记录</view>
|
<view>消费记录</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" @click="goUserBill(2)">
|
<view class="item" @click="goUserBill(2)" v-if="is_hide=='0'">
|
||||||
<view class="pictrue">
|
<view class="pictrue">
|
||||||
<image src="@/static/images/record3.png" />
|
<image src="@/static/images/record3.png" />
|
||||||
</view>
|
</view>
|
||||||
@@ -54,6 +54,7 @@ export default {
|
|||||||
props: {},
|
props: {},
|
||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
|
is_hide: "1",
|
||||||
now_money: 0,
|
now_money: 0,
|
||||||
orderStatusSum: 0,
|
orderStatusSum: 0,
|
||||||
recharge: 0,
|
recharge: 0,
|
||||||
@@ -82,6 +83,7 @@ export default {
|
|||||||
that.now_money = res.data.now_money;
|
that.now_money = res.data.now_money;
|
||||||
that.orderStatusSum = res.data.orderStatusSum;
|
that.orderStatusSum = res.data.orderStatusSum;
|
||||||
that.recharge = res.data.recharge;
|
that.recharge = res.data.recharge;
|
||||||
|
this.is_hide = res.data.is_hide;
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
@charset "UTF-8";
|
@charset "UTF-8";
|
||||||
/**
|
/**
|
||||||
* 这里是uni-app内置的常用样式变量
|
* 这里是uni-app内置的常用样式变量
|
||||||
*
|
*
|
||||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||||
*
|
*
|
||||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||||
*/
|
*/
|
||||||
/* 颜色变量 */
|
/* 颜色变量 */
|
||||||
/* 行为相关颜色 */
|
/* 行为相关颜色 */
|
||||||
@@ -24,8 +24,8 @@
|
|||||||
/* 垂直间距 */
|
/* 垂直间距 */
|
||||||
/* 透明度 */
|
/* 透明度 */
|
||||||
/* 文章场景相关 */
|
/* 文章场景相关 */
|
||||||
/* ==================
|
/* ==================
|
||||||
自定义变量
|
自定义变量
|
||||||
==================== */
|
==================== */
|
||||||
/*盒子模型*/
|
/*盒子模型*/
|
||||||
.mt2 {
|
.mt2 {
|
||||||
|
|||||||
+11
-8
@@ -718,13 +718,14 @@ export function handleQrCode() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function handleUrlParam(path) {
|
export function handleUrlParam(path) {
|
||||||
console.log(path)
|
|
||||||
var url = path.split("?")[1]; //获取url中"?"符后的字串
|
var url = path.split("?")[1]; //获取url中"?"符后的字串
|
||||||
console.log(url)
|
|
||||||
var theRequest = new Object();
|
var theRequest = new Object();
|
||||||
let strs = url.split("&");
|
if(path.includes("?")){
|
||||||
for (var i = 0; i < strs.length; i++) {
|
var url = path.split("?")[1]; //获取url中"?"符后的字串
|
||||||
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
|
let strs = url.split("&");
|
||||||
|
for (var i = 0; i < strs.length; i++) {
|
||||||
|
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return theRequest;
|
return theRequest;
|
||||||
}
|
}
|
||||||
@@ -856,7 +857,6 @@ export const handleLoginFailure = () => {
|
|||||||
console.log('————————')
|
console.log('————————')
|
||||||
store.commit("updateAuthorizationPage", true);
|
store.commit("updateAuthorizationPage", true);
|
||||||
let path = '/' + getCurrentPageUrlWithArgs()
|
let path = '/' + getCurrentPageUrlWithArgs()
|
||||||
console.log("getCurrentPageUrl", getCurrentPageUrl());
|
|
||||||
//判断小程序转发分享商品详情进来的
|
//判断小程序转发分享商品详情进来的
|
||||||
if (getCurrentPageUrl() == 'pages/shop/GoodsCon/index' && handleUrlParam(path) && !handleQrCode()) {
|
if (getCurrentPageUrl() == 'pages/shop/GoodsCon/index' && handleUrlParam(path) && !handleQrCode()) {
|
||||||
console.log('————————')
|
console.log('————————')
|
||||||
@@ -954,13 +954,15 @@ export const handleLoginFailure = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 判断是不是拼团进来的
|
// 判断是不是拼团进来的
|
||||||
if (getCurrentPageUrl() == 'pages/activity/GroupRule/index' && handleQrCode()) {
|
if (getCurrentPageUrl() == 'pages/activity/GroupRule/index' ) {
|
||||||
console.log('————————')
|
console.log('————————')
|
||||||
console.log('是拼团进来的')
|
console.log('是拼团进来的')
|
||||||
console.log('————————')
|
console.log('————————')
|
||||||
|
|
||||||
let url = handleQrCode();
|
let url = handleQrCode();
|
||||||
console.log(url)
|
if(!url){
|
||||||
|
url = handleUrlParam(path);
|
||||||
|
}
|
||||||
if (url) {
|
if (url) {
|
||||||
path = parseUrl({
|
path = parseUrl({
|
||||||
path: `/${getCurrentPageUrl()}`,
|
path: `/${getCurrentPageUrl()}`,
|
||||||
@@ -1003,6 +1005,7 @@ export const handleLoginFailure = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (getCurrentPageUrl() == 'pages/shop/GoodsCon/index' && handleQrCode()) {
|
if (getCurrentPageUrl() == 'pages/shop/GoodsCon/index' && handleQrCode()) {
|
||||||
|
debugger;
|
||||||
console.log('————————')
|
console.log('————————')
|
||||||
console.log('是扫描的商品详情')
|
console.log('是扫描的商品详情')
|
||||||
console.log('————————')
|
console.log('————————')
|
||||||
|
|||||||
Reference in New Issue
Block a user