Merge branch 'master' of https://git.dayouqiantu.cn/develop/yshop-uniapp
This commit is contained in:
@ -13,8 +13,8 @@
|
||||
<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="tab-list y-f" :style="{ width: 690 / menu + 'rpx' }" v-for="item in itemList" :key="item.name" @tap="routerTo(item)">
|
||||
<image class="tab-img shopro-selector-circular" :style="{ width: imgW + 'rpx', height: imgW + 'rpx' }" :src="item.pic"></image>
|
||||
<text class="shopro-selector-rect">{{ item.name }}</text>
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<text class="status-text">{{ liveStatus[detail.liveStatus].title }}</text>
|
||||
</view>
|
||||
<view class="item-title" :style="{ width: wh + 'rpx' }">{{ detail.name }}</view>
|
||||
<!-- <image v-if="detail.liveStatus == 101" class="like-img" src="http://shopro.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 class="live-bottom" :style="{ width: wh + 'rpx' }">
|
||||
<view class="live-info">
|
||||
@ -19,7 +19,7 @@
|
||||
</view>
|
||||
<slot name="liveGoods">
|
||||
<view class="live-goods" v-if="detail.product.length">
|
||||
<view class="live-goods__item" v-for="(goods, index) in detail.product" :key="goods.id" v-if="index < 3">
|
||||
<view class="live-goods__item" v-for="(goods, index) in detail.product" :key="goods.goodsId" v-if="index < 3">
|
||||
<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__mark" v-else>
|
||||
@ -33,6 +33,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { dataFormatL } from "@/utils";
|
||||
let HAS_LIVE = false
|
||||
// #ifdef MP-WEIXIN
|
||||
HAS_LIVE = true
|
||||
@ -43,37 +44,37 @@
|
||||
// #endif
|
||||
let timer = null;
|
||||
export default {
|
||||
name: 'shoproLiveCard',
|
||||
name: 'shopLiveCard',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
liveStatus: {
|
||||
'101': {
|
||||
img: 'http://shopro.7wpp.com/imgs/live/live.png',
|
||||
img: 'https://wx.yixiang.co/static/images/live.png',
|
||||
title: '直播中'
|
||||
},
|
||||
'102': {
|
||||
img: 'http://shopro.7wpp.com/imgs/live/prevue.png',
|
||||
img: 'https://wx.yixiang.co/static/images/prevue.png',
|
||||
title: '未开始'
|
||||
},
|
||||
'103': {
|
||||
img: 'http://shopro.7wpp.com/imgs/live/playback.png',
|
||||
img: 'https://wx.yixiang.co/static/images/playback.png',
|
||||
title: '已结束'
|
||||
},
|
||||
'104': {
|
||||
img: 'http://shopro.7wpp.com/imgs/live/104.png',
|
||||
img: 'https://wx.yixiang.co/static/images/104.png',
|
||||
title: '禁播'
|
||||
},
|
||||
'105': {
|
||||
img: 'http://shopro.7wpp.com/imgs/live/105.png',
|
||||
img: 'https://wx.yixiang.co/static/images/105.png',
|
||||
title: '暂停中'
|
||||
},
|
||||
'106': {
|
||||
img: 'http://shopro.7wpp.com/imgs/live/106.png',
|
||||
img: 'https://wx.yixiang.co/static/images/106.png',
|
||||
title: '异常'
|
||||
},
|
||||
'107': {
|
||||
img: 'http://shopro.7wpp.com/imgs/live/past.png',
|
||||
img: 'https://wx.yixiang.co/static/images/past.png',
|
||||
title: '已过期'
|
||||
}
|
||||
}
|
||||
@ -95,10 +96,10 @@
|
||||
this.getLiveStatus();
|
||||
},
|
||||
mounted() {
|
||||
// let that = this;
|
||||
// timer = setInterval(() => {
|
||||
// that.getLiveStatus();
|
||||
// }, 60000);
|
||||
let that = this;
|
||||
timer = setInterval(() => {
|
||||
that.getLiveStatus();
|
||||
}, 60000);
|
||||
},
|
||||
beforeDestroy() {
|
||||
timer = null;
|
||||
@ -112,26 +113,26 @@
|
||||
},
|
||||
// 轮询liveStatus
|
||||
getLiveStatus() {
|
||||
// if (HAS_LIVE) {
|
||||
// let that = this;
|
||||
// let date = '';
|
||||
// if (that.detail.liveStatus == 102) {
|
||||
// date = that.$tools.dateFormat('mm-dd HH:MM', new Date(that.detail.starttime * 1000)).replace('-',
|
||||
// '/');
|
||||
// that.liveStatus['102'].title = '预告 ' + date;
|
||||
// }
|
||||
// livePlayer
|
||||
// .getLiveStatus({
|
||||
// room_id: that.detail.room_id
|
||||
// })
|
||||
// .then(res => {
|
||||
// // 101: 直播中, 102: 未开始, 103: 已结束, 104: 禁播, 105: 暂停中, 106: 异常,107:已过期
|
||||
// that.detail.liveStatus = res.liveStatus;
|
||||
// })
|
||||
// .catch(err => {
|
||||
// console.log('get live status', err);
|
||||
// });
|
||||
// }
|
||||
if (HAS_LIVE) {
|
||||
let that = this;
|
||||
let date = '';
|
||||
if (that.detail.liveStatus == 102) {
|
||||
date = dataFormatL('mm-dd HH:MM', new Date(that.detail.starttime * 1000)).replace('-',
|
||||
'/');
|
||||
that.liveStatus['102'].title = '预告 ' + date;
|
||||
}
|
||||
livePlayer
|
||||
.getLiveStatus({
|
||||
room_id: that.detail.roomId
|
||||
})
|
||||
.then(res => {
|
||||
// 101: 直播中, 102: 未开始, 103: 已结束, 104: 禁播, 105: 暂停中, 106: 异常,107:已过期
|
||||
that.detail.liveStatus = res.liveStatus;
|
||||
})
|
||||
.catch(err => {
|
||||
console.log('get live status', err);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
@ -83,19 +83,19 @@
|
||||
return {
|
||||
detail: {
|
||||
"list": [{
|
||||
"image": "https:\/\/shopro-1253949872.file.myqcloud.com\/uploads\/20200704\/0669a6adec3f35d45ec66a082e03774f.png",
|
||||
"image": "https:\/\/wx.yixiang.co\/static\/images\/index001.png",
|
||||
"name": "",
|
||||
"path": "/pages/user/coupon/GetCoupon/index",
|
||||
"path_name": "优惠券",
|
||||
"path_type": 1
|
||||
}, {
|
||||
"image": "https:\/\/shopro-1253949872.file.myqcloud.com\/uploads\/20200704\/cddb5d90a4241f6235d16368534bc730.png",
|
||||
"image": "https:\/\/wx.yixiang.co\/static\/images\/index002.png",
|
||||
"name": "",
|
||||
"path": "/pages/shop/GoodsList/index",
|
||||
"path_name": "商品",
|
||||
"path_type": 1
|
||||
}, {
|
||||
"image": "https:\/\/shopro-1253949872.file.myqcloud.com\/uploads\/20200704\/e047d312fb5930de972ae288b9b3bae7.png",
|
||||
"image": "https:\/\/wx.yixiang.co\/static\/images\/index003.png",
|
||||
"name": "",
|
||||
"path": "/pages/user/signIn/Integral/index",
|
||||
"path_name": "积分",
|
||||
|
218
manifest.json
218
manifest.json
@ -1,32 +1,32 @@
|
||||
{
|
||||
"name": "yshopmall",
|
||||
"appid": "__UNI__C7A519E",
|
||||
"description": "",
|
||||
"versionName": "1.0.0",
|
||||
"versionCode": 1,
|
||||
"transformPx": false,
|
||||
"name" : "yshopmall",
|
||||
"appid" : "__UNI__C7A519E",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : 1,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus": {
|
||||
"usingComponents": true,
|
||||
"nvueCompiler": "uni-app",
|
||||
"compilerVersion": 3,
|
||||
"splashscreen": {
|
||||
"alwaysShowBeforeRender": true,
|
||||
"waiting": false,
|
||||
"autoclose": true,
|
||||
"delay": 0
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
"nvueCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : false,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules": {
|
||||
"OAuth": {},
|
||||
"Payment": {},
|
||||
"Share": {}
|
||||
"modules" : {
|
||||
"OAuth" : {},
|
||||
"Payment" : {},
|
||||
"Share" : {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute": {
|
||||
"distribute" : {
|
||||
/* android打包配置 */
|
||||
"android": {
|
||||
"permissions": [
|
||||
"android" : {
|
||||
"permissions" : [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
|
||||
@ -52,127 +52,127 @@
|
||||
]
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios": {},
|
||||
"ios" : {},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs": {
|
||||
"oauth": {
|
||||
"weixin": {
|
||||
"appid": "wx7c84ede33062d1e4",
|
||||
"appsecret": "c47ef66d3311194da44e60387d5c1abd",
|
||||
"UniversalLinks": "https://yixiang.co/app/"
|
||||
"sdkConfigs" : {
|
||||
"oauth" : {
|
||||
"weixin" : {
|
||||
"appid" : "wx7c84ede33062d1e4",
|
||||
"appsecret" : "c47ef66d3311194da44e60387d5c1abd",
|
||||
"UniversalLinks" : "https://yixiang.co/app/"
|
||||
}
|
||||
},
|
||||
"payment": {
|
||||
"weixin": {
|
||||
"appid": "wx7c84ede33062d1e4",
|
||||
"UniversalLinks": "https://yixiang.co/app/"
|
||||
"payment" : {
|
||||
"weixin" : {
|
||||
"appid" : "wx7c84ede33062d1e4",
|
||||
"UniversalLinks" : "https://yixiang.co/app/"
|
||||
}
|
||||
},
|
||||
"share": {
|
||||
"weixin": {
|
||||
"appid": "wx7c84ede33062d1e4",
|
||||
"UniversalLinks": "https://yixiang.co/app/"
|
||||
"share" : {
|
||||
"weixin" : {
|
||||
"appid" : "wx7c84ede33062d1e4",
|
||||
"UniversalLinks" : "https://yixiang.co/app/"
|
||||
}
|
||||
},
|
||||
"ad": {}
|
||||
"ad" : {}
|
||||
},
|
||||
"splashscreen": {
|
||||
"ios": {
|
||||
"iphone": {
|
||||
"portrait-896h@3x": "unpackage/res/splash/1242+2688.png",
|
||||
"portrait-896h@2x": "unpackage/res/splash/828+1792.png",
|
||||
"iphonex": "unpackage/res/splash/1125+2436.png",
|
||||
"retina55": "unpackage/res/splash/1142+2208.png",
|
||||
"retina47": "unpackage/res/splash/750+1334.png",
|
||||
"retina40": "unpackage/res/splash/640+1136.png",
|
||||
"retina35": "unpackage/res/splash/640+960.png"
|
||||
"splashscreen" : {
|
||||
"ios" : {
|
||||
"iphone" : {
|
||||
"portrait-896h@3x" : "unpackage/res/splash/1242+2688.png",
|
||||
"portrait-896h@2x" : "unpackage/res/splash/828+1792.png",
|
||||
"iphonex" : "unpackage/res/splash/1125+2436.png",
|
||||
"retina55" : "unpackage/res/splash/1142+2208.png",
|
||||
"retina47" : "unpackage/res/splash/750+1334.png",
|
||||
"retina40" : "unpackage/res/splash/640+1136.png",
|
||||
"retina35" : "unpackage/res/splash/640+960.png"
|
||||
}
|
||||
},
|
||||
"android": {
|
||||
"hdpi": "unpackage/res/splash/480+762.png",
|
||||
"xhdpi": "unpackage/res/splash/720+1242.png",
|
||||
"xxhdpi": "unpackage/res/splash/1080+1882.png"
|
||||
"android" : {
|
||||
"hdpi" : "unpackage/res/splash/480+762.png",
|
||||
"xhdpi" : "unpackage/res/splash/720+1242.png",
|
||||
"xxhdpi" : "unpackage/res/splash/1080+1882.png"
|
||||
}
|
||||
},
|
||||
"icons": {
|
||||
"android": {
|
||||
"hdpi": "unpackage/res/icons/72x72.png",
|
||||
"xhdpi": "unpackage/res/icons/96x96.png",
|
||||
"xxhdpi": "unpackage/res/icons/144x144.png",
|
||||
"xxxhdpi": "unpackage/res/icons/192x192.png"
|
||||
"icons" : {
|
||||
"android" : {
|
||||
"hdpi" : "unpackage/res/icons/72x72.png",
|
||||
"xhdpi" : "unpackage/res/icons/96x96.png",
|
||||
"xxhdpi" : "unpackage/res/icons/144x144.png",
|
||||
"xxxhdpi" : "unpackage/res/icons/192x192.png"
|
||||
},
|
||||
"ios": {
|
||||
"appstore": "unpackage/res/icons/1024x1024.png",
|
||||
"ipad": {
|
||||
"app": "unpackage/res/icons/76x76.png",
|
||||
"app@2x": "unpackage/res/icons/152x152.png",
|
||||
"notification": "unpackage/res/icons/20x20.png",
|
||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
||||
"proapp@2x": "unpackage/res/icons/167x167.png",
|
||||
"settings": "unpackage/res/icons/29x29.png",
|
||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
||||
"spotlight": "unpackage/res/icons/40x40.png",
|
||||
"spotlight@2x": "unpackage/res/icons/80x80.png"
|
||||
"ios" : {
|
||||
"appstore" : "unpackage/res/icons/1024x1024.png",
|
||||
"ipad" : {
|
||||
"app" : "unpackage/res/icons/76x76.png",
|
||||
"app@2x" : "unpackage/res/icons/152x152.png",
|
||||
"notification" : "unpackage/res/icons/20x20.png",
|
||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||
"proapp@2x" : "unpackage/res/icons/167x167.png",
|
||||
"settings" : "unpackage/res/icons/29x29.png",
|
||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||
"spotlight" : "unpackage/res/icons/40x40.png",
|
||||
"spotlight@2x" : "unpackage/res/icons/80x80.png"
|
||||
},
|
||||
"iphone": {
|
||||
"app@2x": "unpackage/res/icons/120x120.png",
|
||||
"app@3x": "unpackage/res/icons/180x180.png",
|
||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
||||
"notification@3x": "unpackage/res/icons/60x60.png",
|
||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
||||
"settings@3x": "unpackage/res/icons/87x87.png",
|
||||
"spotlight@2x": "unpackage/res/icons/80x80.png",
|
||||
"spotlight@3x": "unpackage/res/icons/120x120.png"
|
||||
"iphone" : {
|
||||
"app@2x" : "unpackage/res/icons/120x120.png",
|
||||
"app@3x" : "unpackage/res/icons/180x180.png",
|
||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||
"notification@3x" : "unpackage/res/icons/60x60.png",
|
||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||
"settings@3x" : "unpackage/res/icons/87x87.png",
|
||||
"spotlight@2x" : "unpackage/res/icons/80x80.png",
|
||||
"spotlight@3x" : "unpackage/res/icons/120x120.png"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"quickapp": {},
|
||||
"mp-weixin": {
|
||||
"appid": "wx604d2ea4702620d2",
|
||||
"setting": {
|
||||
"urlCheck": false
|
||||
"quickapp" : {},
|
||||
"mp-weixin" : {
|
||||
"appid" : "wx604d2ea4702620d2",
|
||||
"setting" : {
|
||||
"urlCheck" : false
|
||||
},
|
||||
"usingComponents": true,
|
||||
"permission": {
|
||||
"scope.userLocation": {
|
||||
"desc": "你的位置信息将用于小程序位置接口的效果展示"
|
||||
"usingComponents" : true,
|
||||
"permission" : {
|
||||
"scope.userLocation" : {
|
||||
"desc" : "你的位置信息将用于小程序位置接口的效果展示"
|
||||
}
|
||||
},
|
||||
"plugins": {
|
||||
"live-player-plugin": {
|
||||
"plugins" : {
|
||||
"live-player-plugin" : {
|
||||
// 注意填写该直播组件最新版本号,微信开发者工具调试时可获取最新版本号(复制时请去掉注释)
|
||||
"version": "1.0.15",
|
||||
"version" : "1.1.9",
|
||||
// 必须填该直播组件appid,该示例值即为直播组件appid(复制时请去掉注释)
|
||||
"provider": "wx2b03c6e691cd7370"
|
||||
"provider" : "wx2b03c6e691cd7370"
|
||||
}
|
||||
}
|
||||
},
|
||||
"mp-alipay": {
|
||||
"usingComponents": true
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-baidu": {
|
||||
"usingComponents": true
|
||||
"mp-baidu" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-toutiao": {
|
||||
"usingComponents": true
|
||||
"mp-toutiao" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"h5": {
|
||||
"title": "yshop",
|
||||
"devServer": {
|
||||
"disableHostCheck": true
|
||||
"h5" : {
|
||||
"title" : "yshop",
|
||||
"devServer" : {
|
||||
"disableHostCheck" : true
|
||||
},
|
||||
"router": {
|
||||
"mode": "history"
|
||||
"router" : {
|
||||
"mode" : "history"
|
||||
},
|
||||
"sdkConfigs": {
|
||||
"maps": {
|
||||
"qqmap": {
|
||||
"key": ""
|
||||
"sdkConfigs" : {
|
||||
"maps" : {
|
||||
"qqmap" : {
|
||||
"key" : ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"domain": "h5.yixiang.co"
|
||||
"domain" : "h5.yixiang.co"
|
||||
}
|
||||
}
|
||||
|
@ -93,6 +93,12 @@
|
||||
"navigationBarTitleText": "商品收藏"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/shop/GoodsFoot/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的足迹"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/shop/news/NewsDetail/index",
|
||||
"style": {
|
||||
|
@ -58,7 +58,7 @@
|
||||
">
|
||||
<span class="iconfont icon-xiaolian"></span>恭喜您砍价成功,快去支付吧~
|
||||
</view>
|
||||
|
||||
|
||||
<view v-if="userBargainStatus == 0 && bargainPartake === userInfo.uid" class="bargainBnt" @click="goParticipate">
|
||||
立即参与砍价</view>
|
||||
<view class="bargainBnt" @click="goPoster" v-if="
|
||||
@ -206,7 +206,7 @@
|
||||
bargainSumCount: 0, //砍价成功人数
|
||||
activeMsg: "",
|
||||
// ssssss
|
||||
active: true,
|
||||
active: false,
|
||||
loading: false,
|
||||
datatime: 0,
|
||||
lookCount: 0, //查看人数
|
||||
@ -244,6 +244,24 @@
|
||||
}, 500);
|
||||
},
|
||||
methods: {
|
||||
onShareAppMessage: function() {
|
||||
return {
|
||||
title: this.storeInfo.title,
|
||||
imageUrl: this.storeInfo.image,
|
||||
path: "pages/activity/DargainDetails/index?id="+this.storeInfo.id+"&spread=" + uni.getStorageSync("uid"),
|
||||
success(res) {
|
||||
uni.showToast({
|
||||
title: '分享成功'
|
||||
})
|
||||
},
|
||||
fail(res) {
|
||||
uni.showToast({
|
||||
title: '分享失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
//参与砍价
|
||||
goParticipate() {
|
||||
if (this.bargainPartake === this.userInfo.uid) this.getBargainStart();
|
||||
|
101
pages/activity/GoodsGroup/children/activity-card.vue
Normal file
101
pages/activity/GoodsGroup/children/activity-card.vue
Normal file
@ -0,0 +1,101 @@
|
||||
<template>
|
||||
<view class="activity-goods-box x-bc" @tap="jump('/pages/activity/GroupDetails/index', { id: id })">
|
||||
<view class="img-box">
|
||||
<slot name="tag"></slot>
|
||||
<image class="img" :src="img" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="goods-right y-bc">
|
||||
<view class="title one-t">{{ title }}</view>
|
||||
<view class="tip one-t">{{ info }}</view>
|
||||
<view class="slod-end"><slot name="sell"></slot></view>
|
||||
<view class=" price-box">
|
||||
<view class="x-f">
|
||||
<view class="current">¥{{ price }}</view>
|
||||
<view class="original">¥{{ productPrice }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<slot name="btn"></slot>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'activityCard',
|
||||
components: {},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
props: {
|
||||
cId: 0,
|
||||
img: '',
|
||||
title: '',
|
||||
info: '',
|
||||
price: '',
|
||||
productPrice: ''
|
||||
},
|
||||
computed: {},
|
||||
created() {},
|
||||
methods: {
|
||||
// 路由跳转
|
||||
jump(path, parmas) {
|
||||
this.$yrouter.push({ path: path, query: parmas });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.activity-goods-box {
|
||||
padding: 40rpx 20rpx;
|
||||
background: #fff;
|
||||
|
||||
.img-box {
|
||||
margin-right: 20rpx;
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
.img {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
background-color: #ccc;
|
||||
}
|
||||
}
|
||||
|
||||
.goods-right {
|
||||
width: 450rpx;
|
||||
min-height: 200rpx;
|
||||
align-items: flex-start;
|
||||
position: relative;
|
||||
.title {
|
||||
font-size: 28rpx;
|
||||
line-height: 28rpx;
|
||||
width: 450rpx;
|
||||
}
|
||||
|
||||
.tip {
|
||||
font-size: 22rpx;
|
||||
color: #a8700d;
|
||||
width: 500rpx;
|
||||
}
|
||||
|
||||
.price-box {
|
||||
.current {
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: rgba(225, 33, 43, 1);
|
||||
}
|
||||
|
||||
.original {
|
||||
font-size: 22rpx;
|
||||
font-weight: 400;
|
||||
text-decoration: line-through;
|
||||
color: rgba(153, 153, 153, 1);
|
||||
margin-left: 14rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,90 +1,228 @@
|
||||
<template>
|
||||
<view class="group-list" ref="container">
|
||||
<view class="list" v-if="combinationList.length>0">
|
||||
<view
|
||||
class="item acea-row row-between-wrapper"
|
||||
v-for="(item, combinationListIndex) in combinationList"
|
||||
:key="combinationListIndex"
|
||||
@click="link(item.id)"
|
||||
>
|
||||
<view class="pictrue">
|
||||
<image :src="item.image" />
|
||||
</view>
|
||||
<view class="text">
|
||||
<view class="line1" v-text="item.title"></view>
|
||||
<view class="acea-row">
|
||||
<view class="team acea-row row-middle cart-color">
|
||||
<view class="iconfont icon-pintuan"></view>
|
||||
<view class="num" v-text="item.people + '人团'"></view>
|
||||
</view>
|
||||
<view class="page_box">
|
||||
<view class="content_box">
|
||||
<scroll-view class="scroll-box" scroll-y enable-back-to-top scroll-with-animation @scrolltolower="loadMore">
|
||||
<view class="group-wrap">
|
||||
<view class="group-head x-bc">
|
||||
<text class="group-head__title">爆款拼团</text>
|
||||
<text class="group-head__notice">省钱省心限时拼</text>
|
||||
</view>
|
||||
<view class="bottom acea-row row-between-wrapper">
|
||||
<view class="money">
|
||||
¥
|
||||
<text class="num" v-text="item.price"></text>
|
||||
<text class="y-money" v-text="'¥' + item.productPrice"></text>
|
||||
</view>
|
||||
<view class="groupBnt bg-color-red">
|
||||
去拼团
|
||||
<text class="iconfont icon-jiantou"></text>
|
||||
<view class="group-box">
|
||||
<view class="goods-item" v-for="(groupon, index) in grouponList" :key="groupon.id">
|
||||
<activity-card
|
||||
:cId="groupon.id"
|
||||
:title="groupon.title"
|
||||
:info="groupon.info"
|
||||
:img="groupon.image"
|
||||
:price="groupon.price"
|
||||
:productPrice="groupon.productPrice"
|
||||
>
|
||||
<block slot="tag">
|
||||
<view class="tag" v-if="index < 3">TOP{{ index + 1 }}</view>
|
||||
</block>
|
||||
<block slot="sell">
|
||||
<view class="x-f">
|
||||
<view class="sell-box">
|
||||
<text class="cuIcon-hotfill"></text>
|
||||
<text class="sell-num">已拼{{ groupon.sales }}件</text>
|
||||
</view>
|
||||
<text class="group-num">{{ groupon.people || 0 }}人团</text>
|
||||
</view>
|
||||
</block>
|
||||
<block slot="btn"><button class="cu-btn buy-btn" @tap.stop="jump('/pages/activity/GroupDetails/index', { id: groupon.id })">马上拼</button></block>
|
||||
</activity-card>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<Loading :loaded="status" :loading="loadingList"></Loading>
|
||||
</view>
|
||||
<view class="noCommodity" style="background-color: #fff;" v-if="combinationList.length === 0">
|
||||
<view class="noPictrue">
|
||||
<image src="@/static/images/noGood.png" class="image" />
|
||||
</view>
|
||||
<!-- 空白 -->
|
||||
<!-- <Shop-empty v-if="!grouponList.length && !isLoading" :emptyData="emptyData"></Shop-empty>-->
|
||||
<!-- 加载更多 -->
|
||||
<view v-if="grouponList.length" class="cu-load text-gray" :class="loadStatus"></view>
|
||||
<!-- loading -->
|
||||
<Shop-load v-model="isLoading"></Shop-load>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<!-- 自定义底部导航 -->
|
||||
<Shop-tabbar></Shop-tabbar>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { getCombinationList } from "@/api/activity";
|
||||
import Loading from "@/components/Loading";
|
||||
|
||||
<script>
|
||||
import activityCard from './children/activity-card.vue';
|
||||
import { getCombinationList } from "@/api/activity";
|
||||
export default {
|
||||
name: "GoodsGroup",
|
||||
components: {
|
||||
Loading
|
||||
activityCard
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
data() {
|
||||
return {
|
||||
combinationList: [],
|
||||
status: false, //砍价列表是否获取完成 false 未完成 true 完成
|
||||
loading: false, //当前接口是否请求完成 false 完成 true 未完成
|
||||
page: 1, //页码
|
||||
limit: 20, //数量
|
||||
loadingList: false
|
||||
emptyData: {
|
||||
img: '/static/imgs/empty/empty_goods.png',
|
||||
tip: '还没有拼团商品噢,去首页看看吧~',
|
||||
path: '/pages/index/index',
|
||||
pathText: '去首页逛逛'
|
||||
},
|
||||
status:'',
|
||||
isLoading: true,
|
||||
loadStatus: '', //loading,over
|
||||
lastPage: 0,
|
||||
currentPage: 1,
|
||||
grouponList: []
|
||||
};
|
||||
},
|
||||
mounted: function() {
|
||||
// document.querySelector('body').setAttribute('style', 'background-color:#eb3729');
|
||||
this.getCombinationList();
|
||||
},
|
||||
onReachBottom() {
|
||||
!this.loadingList && this.getCombinationList();
|
||||
onLoad() {
|
||||
this.getGrouponList();
|
||||
},
|
||||
onPullDownRefresh() {},
|
||||
computed: {},
|
||||
methods: {
|
||||
getCombinationList: function() {
|
||||
var that = this;
|
||||
if (that.loading) return;
|
||||
if (that.status) return;
|
||||
getCombinationList({ page: that.page, limit: that.limit }).then(res => {
|
||||
that.status = res.data.length < that.limit;
|
||||
that.combinationList.push.apply(that.combinationList, res.data);
|
||||
that.page++;
|
||||
that.loading = false;
|
||||
// 路由跳转
|
||||
jump(path, parmas) {
|
||||
this.$yrouter.push({
|
||||
path: path,
|
||||
query: parmas
|
||||
});
|
||||
},
|
||||
link: function(id) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/activity/GroupDetails/index",
|
||||
query: { id }
|
||||
// 加载更多
|
||||
loadMore() {
|
||||
if (this.currentPage < this.lastPage) {
|
||||
this.currentPage += 1;
|
||||
this.getGrouponList();
|
||||
}
|
||||
},
|
||||
// 拼团列表
|
||||
getGrouponList() {
|
||||
let that = this;
|
||||
that.isLoading = true;
|
||||
that.loadStatus = 'loading';
|
||||
getCombinationList({ page:that.currentPage, limit: 10 }).then(res => {
|
||||
that.status = res.data.length < 10;
|
||||
that.grouponList.push.apply(that.grouponList, res.data);
|
||||
that.lastPage = res.data.last_page;
|
||||
if (that.currentPage < res.data.last_page) {
|
||||
that.loadStatus = '';
|
||||
} else {
|
||||
that.loadStatus = 'over';
|
||||
}
|
||||
that.loading = false;
|
||||
});
|
||||
|
||||
// that.$api('goods.grouponList', {
|
||||
// page: that.currentPage
|
||||
// }).then(res => {
|
||||
// if (res.code === 1) {
|
||||
// that.isLoading = false;
|
||||
// that.grouponList = [...that.grouponList, ...res.data.data];
|
||||
// // that.grouponList=[];
|
||||
// that.lastPage = res.data.last_page;
|
||||
// if (that.currentPage < res.data.last_page) {
|
||||
// that.loadStatus = '';
|
||||
// } else {
|
||||
// that.loadStatus = 'over';
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.group-wrap {
|
||||
background: url('~@/static/images/index-bg.png') no-repeat;
|
||||
background-size: 100% 374rpx;
|
||||
}
|
||||
.group-head {
|
||||
padding: 0 25rpx;
|
||||
height: 100rpx;
|
||||
.group-head__title {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: rgba(255, 255, 255, 1);
|
||||
}
|
||||
.group-head__notice {
|
||||
font-size: 26rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: rgba(255, 255, 255, 1);
|
||||
}
|
||||
}
|
||||
|
||||
.group-box {
|
||||
width: 710rpx;
|
||||
background: linear-gradient(#fff, #f5f5f5);
|
||||
border-radius: 20rpx;
|
||||
margin: 0 auto;
|
||||
min-height: 1000rpx;
|
||||
.goods-item {
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
margin-bottom: 20rpx;
|
||||
.tag {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 10rpx;
|
||||
z-index: 2;
|
||||
line-height: 35rpx;
|
||||
background: linear-gradient(132deg, rgba(255, 153, 93, 1), rgba(255, 99, 97, 1));
|
||||
border-radius: 0px 18rpx 18rpx 0px;
|
||||
padding: 0 10rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: bold;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
/deep/.goods-right {
|
||||
width: 460rpx;
|
||||
.title {
|
||||
width: 460rpx;
|
||||
}
|
||||
.tip {
|
||||
width: 460rpx;
|
||||
}
|
||||
}
|
||||
.buy-btn {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: -10rpx;
|
||||
width: 160rpx;
|
||||
height: 60rpx;
|
||||
background: linear-gradient(90deg, rgba(254, 131, 42, 1), rgba(255, 102, 0, 1));
|
||||
box-shadow: 0px 7rpx 6rpx 0px rgba(255, 104, 4, 0.22);
|
||||
border-radius: 30rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #fff;
|
||||
padding: 0;
|
||||
}
|
||||
.group-num {
|
||||
font-size: 20rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: rgba(153, 153, 153, 1);
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.sell-box {
|
||||
background: rgba(255, 224, 226, 0.3);
|
||||
border-radius: 16rpx;
|
||||
line-height: 32rpx;
|
||||
padding: 0 10rpx;
|
||||
.sell-num {
|
||||
font-size: 20rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: rgba(247, 151, 156, 1);
|
||||
}
|
||||
|
||||
.cuIcon-hotfill {
|
||||
font-size: 26rpx;
|
||||
color: #e1212b;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<scroll-view scroll-y="false" scroll-x="true">
|
||||
<view class="timeScroll">
|
||||
<div class="logoPic">
|
||||
<image src="https://wx.yixiang.co/h5/img/baokuan.6313c8c8.png">
|
||||
<image src="https://wx.yixiang.co/h5/img/baokuan.6313c8c8.png"></image>
|
||||
</div>
|
||||
<view v-for="(item, index) in timeList" :key="index">
|
||||
<view v-if="active==index" class="timeItem active" @click="setTime(index)">
|
||||
|
@ -247,6 +247,24 @@
|
||||
this.mountedStart();
|
||||
},
|
||||
methods: {
|
||||
onShareAppMessage: function() {
|
||||
return {
|
||||
title: this.storeInfo.title,
|
||||
imageUrl: this.storeInfo.image,
|
||||
path: "pages/activity/GroupDetails/index?id="+this.storeInfo.id+"&spread=" + uni.getStorageSync("uid"),
|
||||
success(res) {
|
||||
uni.showToast({
|
||||
title: '分享成功'
|
||||
})
|
||||
},
|
||||
fail(res) {
|
||||
uni.showToast({
|
||||
title: '分享失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
openAlone: function () {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/shop/GoodsCon/index",
|
||||
@ -295,7 +313,7 @@
|
||||
} else {
|
||||
that.posterData.title = that.storeInfo.title;
|
||||
}
|
||||
that.posterData.price = that.storeInfo.price;
|
||||
that.posterData.price = that.storeInfo.pinkPrice;
|
||||
that.posterData.code = that.storeInfo.code_base;
|
||||
that.domStatus = true;
|
||||
console.log(this.storeInfo)
|
||||
@ -319,8 +337,8 @@
|
||||
this.storeInfo.title
|
||||
);
|
||||
this.$set(this.attr.productSelect, "image", productSelect.image);
|
||||
this.$set(this.attr.productSelect, "price", productSelect.price);
|
||||
this.$set(this.attr.productSelect, "stock", productSelect.stock);
|
||||
this.$set(this.attr.productSelect, "price", productSelect.pinkPrice);
|
||||
this.$set(this.attr.productSelect, "stock", productSelect.pinkStock);
|
||||
this.$set(this.attr.productSelect, "unique", productSelect.unique);
|
||||
this.$set(this.attr.productSelect, "cart_num", 1);
|
||||
this.$set(this, "attrValue", value.sort().join(","));
|
||||
@ -332,7 +350,7 @@
|
||||
this.storeInfo.title
|
||||
);
|
||||
this.$set(this.attr.productSelect, "image", this.storeInfo.image);
|
||||
this.$set(this.attr.productSelect, "price", this.storeInfo.price);
|
||||
this.$set(this.attr.productSelect, "price", this.storeInfo.pinkPrice);
|
||||
this.$set(this.attr.productSelect, "stock", 0);
|
||||
this.$set(this.attr.productSelect, "unique", "");
|
||||
this.$set(this.attr.productSelect, "cart_num", 0);
|
||||
@ -345,8 +363,8 @@
|
||||
this.storeInfo.title
|
||||
);
|
||||
this.$set(this.attr.productSelect, "image", this.storeInfo.image);
|
||||
this.$set(this.attr.productSelect, "price", this.storeInfo.price);
|
||||
this.$set(this.attr.productSelect, "stock", this.storeInfo.stock);
|
||||
this.$set(this.attr.productSelect, "price", this.storeInfo.pinkPrice);
|
||||
this.$set(this.attr.productSelect, "stock", this.storeInfo.pinkStock);
|
||||
this.$set(
|
||||
this.attr.productSelect,
|
||||
"unique",
|
||||
@ -418,15 +436,15 @@
|
||||
if (productSelect) {
|
||||
this.attr.productAttr[res.indexw].index = res.indexn;
|
||||
this.$set(this.attr.productSelect, "image", productSelect.image);
|
||||
this.$set(this.attr.productSelect, "price", productSelect.price);
|
||||
this.$set(this.attr.productSelect, "stock", productSelect.stock);
|
||||
this.$set(this.attr.productSelect, "price", productSelect.pinkPrice);
|
||||
this.$set(this.attr.productSelect, "stock", productSelect.pinkStock);
|
||||
this.$set(this.attr.productSelect, "unique", productSelect.unique);
|
||||
this.$set(this.attr.productSelect, "cart_num", 1);
|
||||
this.$set(this, "attrValue", res.value);
|
||||
this.$set(this, "attrTxt", "已选择");
|
||||
} else {
|
||||
this.$set(this.attr.productSelect, "image", this.storeInfo.image);
|
||||
this.$set(this.attr.productSelect, "price", this.storeInfo.price);
|
||||
this.$set(this.attr.productSelect, "price", this.storeInfo.pinkPrice);
|
||||
this.$set(this.attr.productSelect, "stock", 0);
|
||||
this.$set(this.attr.productSelect, "unique", "");
|
||||
this.$set(this.attr.productSelect, "cart_num", 0);
|
||||
@ -434,7 +452,7 @@
|
||||
this.$set(this, "attrTxt", "请选择");
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
openTeam: function () {
|
||||
var that = this;
|
||||
if (that.attr.cartAttr == false) {
|
||||
|
@ -16,16 +16,6 @@
|
||||
<view class="iconfont icon-jiantou"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 规格 -->
|
||||
<view class="attribute acea-row row-between-wrapper" @click="selecAttrTap">
|
||||
<view>
|
||||
<text>{{ attrTxt }}:</text>
|
||||
<text class="atterTxt">{{ attrValue }}</text>
|
||||
</view>
|
||||
<view class="iconfont icon-jiantou"></view>
|
||||
</view>
|
||||
|
||||
<view class="wrapperRush">
|
||||
<view class="introduce acea-row row-between">
|
||||
<view class="infor" v-text="storeInfo.title"></view>
|
||||
@ -36,6 +26,14 @@
|
||||
<view v-text="'销量:' + storeInfo.sales + '件'"></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 规格 -->
|
||||
<view class="attribute acea-row row-between-wrapper" @click="selecAttrTap">
|
||||
<view>
|
||||
<text>{{ attrTxt }}:</text>
|
||||
<text class="atterTxt">{{ attrValue }}</text>
|
||||
</view>
|
||||
<view class="iconfont icon-jiantou"></view>
|
||||
</view>
|
||||
<view class="product-intro">
|
||||
<view class="title">产品介绍</view>
|
||||
<view class="conter" v-html="storeInfo.description"></view>
|
||||
@ -152,6 +150,24 @@
|
||||
this.mountedStart();
|
||||
},
|
||||
methods: {
|
||||
onShareAppMessage: function() {
|
||||
return {
|
||||
title: this.storeInfo.title,
|
||||
imageUrl: this.storeInfo.image,
|
||||
path: "pages/activity/GoodsSeckill/index?id="+this.storeInfo.id+"&spread=" + uni.getStorageSync("uid"),
|
||||
success(res) {
|
||||
uni.showToast({
|
||||
title: '分享成功'
|
||||
})
|
||||
},
|
||||
fail(res) {
|
||||
uni.showToast({
|
||||
title: '分享失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
openAlone: function () {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/shop/GoodsCon/index",
|
||||
@ -237,8 +253,8 @@
|
||||
this.storeInfo.title
|
||||
);
|
||||
this.$set(this.attr.productSelect, "image", productSelect.image);
|
||||
this.$set(this.attr.productSelect, "price", productSelect.price);
|
||||
this.$set(this.attr.productSelect, "stock", productSelect.stock);
|
||||
this.$set(this.attr.productSelect, "price", productSelect.seckillPrice);
|
||||
this.$set(this.attr.productSelect, "stock", productSelect.seckillStock);
|
||||
this.$set(this.attr.productSelect, "unique", productSelect.unique);
|
||||
this.$set(this.attr.productSelect, "cart_num", 1);
|
||||
this.$set(this, "attrValue", value.sort().join(","));
|
||||
@ -250,7 +266,7 @@
|
||||
this.storeInfo.title
|
||||
);
|
||||
this.$set(this.attr.productSelect, "image", this.storeInfo.image);
|
||||
this.$set(this.attr.productSelect, "price", this.storeInfo.price);
|
||||
this.$set(this.attr.productSelect, "price", this.storeInfo.seckillPrice);
|
||||
this.$set(this.attr.productSelect, "stock", 0);
|
||||
this.$set(this.attr.productSelect, "unique", "");
|
||||
this.$set(this.attr.productSelect, "cart_num", 0);
|
||||
@ -263,8 +279,8 @@
|
||||
this.storeInfo.title
|
||||
);
|
||||
this.$set(this.attr.productSelect, "image", this.storeInfo.image);
|
||||
this.$set(this.attr.productSelect, "price", this.storeInfo.price);
|
||||
this.$set(this.attr.productSelect, "stock", this.storeInfo.stock);
|
||||
this.$set(this.attr.productSelect, "price", this.storeInfo.seckillPrice);
|
||||
this.$set(this.attr.productSelect, "stock", this.storeInfo.seckillStock);
|
||||
this.$set(
|
||||
this.attr.productSelect,
|
||||
"unique",
|
||||
@ -289,7 +305,7 @@
|
||||
ChangeCartNum: function (res) {
|
||||
var that = this;
|
||||
if (res) {
|
||||
if (that.attr.productSelect.cart_num < that.storeInfo.stock) {
|
||||
if (that.attr.productSelect.cart_num < that.storeInfo.seckillStock) {
|
||||
that.attr.productSelect.cart_num++;
|
||||
this.cartNum++;
|
||||
}
|
||||
@ -307,15 +323,15 @@
|
||||
if (productSelect) {
|
||||
this.attr.productAttr[res.indexw].index = res.indexn;
|
||||
this.$set(this.attr.productSelect, "image", productSelect.image);
|
||||
this.$set(this.attr.productSelect, "price", productSelect.price);
|
||||
this.$set(this.attr.productSelect, "stock", productSelect.stock);
|
||||
this.$set(this.attr.productSelect, "price", productSelect.seckillPrice);
|
||||
this.$set(this.attr.productSelect, "stock", productSelect.seckillStock);
|
||||
this.$set(this.attr.productSelect, "unique", productSelect.unique);
|
||||
this.$set(this.attr.productSelect, "cart_num", 1);
|
||||
this.$set(this, "attrValue", res.value);
|
||||
this.$set(this, "attrTxt", "已选择");
|
||||
} else {
|
||||
this.$set(this.attr.productSelect, "image", this.storeInfo.image);
|
||||
this.$set(this.attr.productSelect, "price", this.storeInfo.price);
|
||||
this.$set(this.attr.productSelect, "price", this.storeInfo.seckillPrice);
|
||||
this.$set(this.attr.productSelect, "stock", 0);
|
||||
this.$set(this.attr.productSelect, "unique", "");
|
||||
this.$set(this.attr.productSelect, "cart_num", 0);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="banner-swiper-box">
|
||||
<canvas canvas-id="colorThief" class="hide-canvas"></canvas>
|
||||
<swiper class="banner-carousel shopro-selector-rect" circular @change="swiperChange" :autoplay="true">
|
||||
<swiper class="banner-carousel Shop-selector-rect" circular @change="swiperChange" :autoplay="true">
|
||||
<swiper-item v-for="(item, index) in list" :key="index" class="carousel-item" @tap="routerTo(item.path)">
|
||||
<image class="swiper-image " :src="item.pic" @click="goRoll(item)" mode="widthFix" lazy-load>
|
||||
</image>
|
||||
|
@ -8,29 +8,22 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-one">
|
||||
<view class="content-one__item" v-for="live in detail" :key="live.id" @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>
|
||||
<view class="item-status">
|
||||
<image class="status-img" :src="liveStatus[live.liveStatus].img" mode=""></image>
|
||||
<text class="status-text">{{ liveStatus[live.liveStatus].title }}</text>
|
||||
</view>
|
||||
<view class="item-title">{{ live.name }}</view>
|
||||
<image v-if="live.liveStatus == 101" class="like-img" src="http://shopro.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>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="content-two">
|
||||
<view class="content-two__item" v-for="live in detail" :key="live.id">
|
||||
<ShoproLiveCard :detail="live" :wh="320">
|
||||
<block slot="liveGoods"><text></text></block>
|
||||
</ShoproLiveCard>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ShoproLiveCard from '@/components/ShoproLiveCard.vue'
|
||||
import ShopLiveCard from '@/components/ShopLiveCard.vue'
|
||||
|
||||
let HAS_LIVE = false
|
||||
// #ifdef MP-WEIXIN
|
||||
@ -48,38 +41,38 @@
|
||||
let timer = null;
|
||||
export default {
|
||||
components: {
|
||||
ShoproLiveCard
|
||||
ShopLiveCard
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
liveList: [],
|
||||
liveStatus: {
|
||||
'101': {
|
||||
img: 'http://shopro.7wpp.com/imgs/live/live.png',
|
||||
'101': {
|
||||
img: 'https://wx.yixiang.co/static/images/live.png',
|
||||
title: '直播中'
|
||||
},
|
||||
'102': {
|
||||
img: 'http://shopro.7wpp.com/imgs/live/prevue.png',
|
||||
img: 'https://wx.yixiang.co/static/images/prevue.png',
|
||||
title: '未开始'
|
||||
},
|
||||
'103': {
|
||||
img: 'http://shopro.7wpp.com/imgs/live/playback.png',
|
||||
img: 'https://wx.yixiang.co/static/images/playback.png',
|
||||
title: '已结束'
|
||||
},
|
||||
'104': {
|
||||
img: 'http://shopro.7wpp.com/imgs/live/104.png',
|
||||
img: 'https://wx.yixiang.co/static/images/104.png',
|
||||
title: '禁播'
|
||||
},
|
||||
'105': {
|
||||
img: 'http://shopro.7wpp.com/imgs/live/105.png',
|
||||
img: 'https://wx.yixiang.co/static/images/105.png',
|
||||
title: '暂停中'
|
||||
},
|
||||
'106': {
|
||||
img: 'http://shopro.7wpp.com/imgs/live/106.png',
|
||||
img: 'https://wx.yixiang.co/static/images/106.png',
|
||||
title: '异常'
|
||||
},
|
||||
'107': {
|
||||
img: 'http://shopro.7wpp.com/imgs/live/past.png',
|
||||
img: 'https://wx.yixiang.co/static/images/past.png',
|
||||
title: '已过期'
|
||||
}
|
||||
}
|
||||
@ -113,28 +106,29 @@
|
||||
},
|
||||
// 轮询liveStatus
|
||||
getLiveStatus() {
|
||||
// if (HAS_LIVE) {
|
||||
// let that = this;
|
||||
// let date = '';
|
||||
// if (that.detail.live_status == 102) {
|
||||
// date = that.$tools.dateFormat('mm-dd HH:MM', new Date(that.detail.starttime * 1000)).replace('-',
|
||||
// '/');
|
||||
// that.liveStatus['102'].title = '预告 ' + date;
|
||||
// }
|
||||
// livePlayer
|
||||
// .getLiveStatus({
|
||||
// room_id: that.detail.room_id
|
||||
// })
|
||||
// .then(res => {
|
||||
// // 101: 直播中, 102: 未开始, 103: 已结束, 104: 禁播, 105: 暂停中, 106: 异常,107:已过期
|
||||
// that.detail.live_status = res.liveStatus;
|
||||
// })
|
||||
// .catch(err => {
|
||||
// console.log('get live status', err);
|
||||
// });
|
||||
// }
|
||||
// if (HAS_LIVE) {
|
||||
// let that = this;
|
||||
// let date = '';
|
||||
// if (that.detail.liveStatus == 102) {
|
||||
// date = that.$tools.dateFormat('mm-dd HH:MM', new Date(that.detail.starttime * 1000)).replace('-',
|
||||
// '/');
|
||||
// that.liveStatus['102'].title = '预告 ' + date;
|
||||
// }
|
||||
// livePlayer
|
||||
// .getLiveStatus({
|
||||
// room_id: that.detail.roomId
|
||||
// })
|
||||
// .then(res => {
|
||||
// // 101: 直播中, 102: 未开始, 103: 已结束, 104: 禁播, 105: 暂停中, 106: 异常,107:已过期
|
||||
// that.detail.liveStatus = res.liveStatus;
|
||||
// })
|
||||
// .catch(err => {
|
||||
// console.log('get live status', err);
|
||||
// });
|
||||
// }
|
||||
},
|
||||
goRoom(live) {
|
||||
console.log(live.roomId,9999)
|
||||
wx.navigateTo({
|
||||
url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${live.roomId}`
|
||||
});
|
||||
|
@ -5,7 +5,7 @@
|
||||
<view class="cu-custom" :style="[{height:CustomBar+ 'px',}]">
|
||||
<view class="cu-bar fixed" :style="customStyle" :class="[bgcolor]">
|
||||
<view class="action">
|
||||
<text class="nav-title shopro-selector-rect">{{ 'yshop商城' }}</text>
|
||||
<text class="nav-title Shop-selector-rect">{{ 'yshop商城' }}</text>
|
||||
</view>
|
||||
<view class="content" :style="[{top:StatusBar + 'px'}]">
|
||||
|
||||
@ -232,6 +232,20 @@
|
||||
},
|
||||
methods: {
|
||||
...mapActions(["getLocation"]),
|
||||
onShareTimeline: function() {
|
||||
return {
|
||||
title: this.miniHomeRemark,
|
||||
imageUrl: this.miniHomeImg,
|
||||
path: "pages/home/index?spread=" + uni.getStorageSync("uid")
|
||||
}
|
||||
},
|
||||
onShareAppMessage: function() {
|
||||
return {
|
||||
title: this.miniHomeRemark,
|
||||
imageUrl: this.miniHomeImg,
|
||||
path: "pages/home/index?spread=" + uni.getStorageSync("uid")
|
||||
}
|
||||
},
|
||||
goRoll(item) {
|
||||
if (item.uniapp_url) {
|
||||
this.$yrouter.push(item.uniapp_url)
|
||||
|
@ -126,7 +126,7 @@
|
||||
<view class="name">
|
||||
{{ orderInfo.realName }}
|
||||
<text class="phone">{{ orderInfo.userPhone }}</text>
|
||||
<text class="iconfont icon-tonghua font-color-red"></text>
|
||||
<text @click="telPhone(orderInfo.userPhone)" class="iconfont icon-tonghua font-color-red"></text>
|
||||
</view>
|
||||
<view>{{ orderInfo.userAddress }}</view>
|
||||
</view>
|
||||
@ -134,7 +134,7 @@
|
||||
<div class="name">
|
||||
{{ system_store.name}}
|
||||
<span class="phone">{{ system_store.phone }}</span>
|
||||
<span class="iconfont icon-tonghua font-color-red" :href="'tel:' + system_store.phone"></span>
|
||||
<span @click="telPhone(system_store.phone)" class="iconfont icon-tonghua font-color-red" :href="'tel:' + system_store.phone"></span>
|
||||
</div>
|
||||
<div>{{ system_store.address }}</div>
|
||||
</div>
|
||||
@ -366,6 +366,15 @@ export default {
|
||||
},
|
||||
});
|
||||
},
|
||||
//拨打电话
|
||||
telPhone(phoneNumber) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: phoneNumber,
|
||||
fail() {
|
||||
console.log("取消拨打");
|
||||
}
|
||||
});
|
||||
},
|
||||
showChang: function (data) {
|
||||
// 这里判断是不是微信小程序
|
||||
this.$yrouter.push({
|
||||
|
@ -3,7 +3,7 @@
|
||||
<view v-if="storeInfo.id">
|
||||
<!-- 轮播图 -->
|
||||
<product-con-swiper :img-urls="storeInfo.sliderImageArr"></product-con-swiper>
|
||||
|
||||
|
||||
<!-- 商品信息描述 -->
|
||||
<view class="wrapper">
|
||||
<view class="share acea-row row-between row-bottom">
|
||||
@ -70,7 +70,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="addressBox">
|
||||
<a :href="'tel:'+systemStore.phone" class="iconfont icon-dadianhua01 font-color-red phone"></a>
|
||||
<a class="iconfont icon-dadianhua01 font-color-red phone" @click="telPhone(systemStore.phone)"></a>
|
||||
<view class="addressTxt corlor-yshop">距离{{systemStore.distance}}千米</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -172,7 +172,7 @@
|
||||
:posterData="posterData" :goodId="id"></StorePoster>
|
||||
<!-- 分享弹窗 -->
|
||||
<ShareInfo v-on:setShareInfoStatus="setShareInfoStatus" :shareInfoStatus="shareInfoStatus"></ShareInfo>
|
||||
|
||||
|
||||
<view class="generate-posters acea-row row-middle on" v-if="posters">
|
||||
<view class="item" @click="setPosterImageStatus">
|
||||
<view class="iconfont icon-haibao"></view>
|
||||
@ -319,6 +319,24 @@
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onShareAppMessage: function() {
|
||||
return {
|
||||
title: this.storeInfo.storeName,
|
||||
imageUrl: this.storeInfo.image,
|
||||
path: "pages/shop/GoodsCon/index?id="+this.storeInfo.id+"&spread=" + uni.getStorageSync("uid"),
|
||||
success(res) {
|
||||
uni.showToast({
|
||||
title: '分享成功'
|
||||
})
|
||||
},
|
||||
fail(res) {
|
||||
uni.showToast({
|
||||
title: '分享失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
goShoppingCart() {
|
||||
this.$yrouter.switchTab("/pages/shop/ShoppingCart/index");
|
||||
},
|
||||
@ -340,6 +358,14 @@
|
||||
},
|
||||
});
|
||||
},
|
||||
telPhone(phoneNumber) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: phoneNumber,
|
||||
fail() {
|
||||
console.log("取消拨打");
|
||||
}
|
||||
});
|
||||
},
|
||||
showChang: function (data) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/map/index",
|
||||
@ -931,7 +957,7 @@
|
||||
filter: blur(2px);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.product-con .product-intro .conter view {
|
||||
width: 100% !important;
|
||||
|
102
pages/shop/GoodsFoot/index.vue
Normal file
102
pages/shop/GoodsFoot/index.vue
Normal file
@ -0,0 +1,102 @@
|
||||
<template>
|
||||
<view ref="container">
|
||||
<view class="collectionGoods" v-if="collectProductList.length > 0">
|
||||
<view
|
||||
class="item acea-row row-between-wrapper"
|
||||
v-for="(item, collectProductListIndex) in collectProductList"
|
||||
:key="collectProductListIndex"
|
||||
@click="goGoodsCon(item)"
|
||||
>
|
||||
<view class="pictrue">
|
||||
<image :src="item.image" />
|
||||
</view>
|
||||
<view class="text acea-row row-column-between">
|
||||
<view class="infor line1">{{ item.storeName }}</view>
|
||||
<view class="acea-row row-between-wrapper">
|
||||
<view class="money font-color-red">¥{{ item.price }}</view>
|
||||
<view class="delete" @tap.stop="delCollection(collectProductListIndex)">删除</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<Loading :loaded="loadend" :loading="loading"></Loading>
|
||||
<view
|
||||
class="noCommodity"
|
||||
style="background-color:#fff;"
|
||||
v-if="collectProductList.length < 1 && page > 1"
|
||||
>
|
||||
<view class="noPictrue">
|
||||
<image src="@/static/images/noCollection.png" class="image" />
|
||||
</view>
|
||||
<Recommend></Recommend>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import Recommend from "@/components/Recommend";
|
||||
import { getCollectUser, getCollectDel } from "@/api/user";
|
||||
import Loading from "@/components/Loading";
|
||||
export default {
|
||||
name: "GoodsFoot",
|
||||
components: {
|
||||
Recommend,
|
||||
Loading
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
type:'foot',
|
||||
collectProductList: [],
|
||||
loadTitle: "",
|
||||
loading: false,
|
||||
loadend: false
|
||||
};
|
||||
},
|
||||
mounted: function() {
|
||||
this.get_user_collect_product();
|
||||
},
|
||||
onReachBottom() {
|
||||
!this.loading && this.get_user_collect_product();
|
||||
},
|
||||
methods: {
|
||||
goGoodsCon(item) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/shop/GoodsCon/index",
|
||||
query: { id: item.pid }
|
||||
});
|
||||
},
|
||||
get_user_collect_product: function() {
|
||||
let that = this;
|
||||
if (that.loading) return; //阻止下次请求(false可以进行请求);
|
||||
if (that.loadend) return; //阻止结束当前请求(false可以进行请求);
|
||||
that.loading = true;
|
||||
getCollectUser(that.page, that.limit,that.type).then(res => {
|
||||
that.loading = false;
|
||||
//apply();js将一个数组插入另一个数组;
|
||||
that.collectProductList.push.apply(that.collectProductList, res.data);
|
||||
that.loadend = res.data.length < that.limit; //判断所有数据是否加载完成;
|
||||
that.page = that.page + 1;
|
||||
});
|
||||
},
|
||||
//删除收藏;
|
||||
delCollection: function(index) {
|
||||
let that = this,
|
||||
id = that.collectProductList[index].pid,
|
||||
category = that.collectProductList[index].category;
|
||||
getCollectDel(id, category).then(function() {
|
||||
uni.showToast({
|
||||
title: "删除成功",
|
||||
icon: "success",
|
||||
duration: 2000,
|
||||
complete: () => {
|
||||
that.collectProductList.splice(index, 1);
|
||||
that.$set(that, "collectProductList", that.collectProductList);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -11,8 +11,8 @@
|
||||
<view class="content_box">
|
||||
<scroll-view scroll-y="true" @scrolltolower="loadMore" class="scroll-box">
|
||||
<view class="list-box">
|
||||
<block v-for="live in liveList" :key="live.id">
|
||||
<shopro-live-card :detail="live"></shopro-live-card>
|
||||
<block v-for="live in liveList" :key="live.roomId">
|
||||
<shop-live-card :detail="live"></shop-live-card>
|
||||
</block>
|
||||
</view>
|
||||
<view v-if="liveList.length" class="cu-load text-gray" :class="loadStatus"></view>
|
||||
@ -25,11 +25,11 @@
|
||||
import {
|
||||
yxWechatLive
|
||||
} from "@/api/live";
|
||||
import ShoproLiveCard from '@/components/ShoproLiveCard.vue'
|
||||
import ShopLiveCard from '@/components/ShopLiveCard.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ShoproLiveCard
|
||||
ShopLiveCard
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -40,6 +40,12 @@
|
||||
name: '全部',
|
||||
code: ''
|
||||
},
|
||||
{
|
||||
title: 'prevue',
|
||||
name: '预告',
|
||||
code: '102'
|
||||
|
||||
},
|
||||
{
|
||||
title: 'living',
|
||||
name: '直播中',
|
||||
|
@ -16,7 +16,7 @@
|
||||
</view>
|
||||
<view class="row-right">
|
||||
<view>
|
||||
<a class="store-phone" :href="'tel:' + item.phone">
|
||||
<a class="store-phone" @click="telPhone(item.phone)">
|
||||
<text class="iconfont icon-dadianhua01"></text>
|
||||
</a>
|
||||
</view>
|
||||
@ -35,7 +35,7 @@
|
||||
<script>
|
||||
import Loading from "@/components/Loading";
|
||||
import { storeListApi } from "@/api/store";
|
||||
import { isWeixin } from "@/utils/index";
|
||||
import { isWeixin,tel } from "@/utils/index";
|
||||
import { wechatEvevt, wxShowLocation } from "@/libs/wechat";
|
||||
import { mapGetters } from "vuex";
|
||||
import cookie from "@/utils/store/cookie";
|
||||
@ -79,6 +79,15 @@ export default {
|
||||
this.$yrouter.back();
|
||||
}
|
||||
},
|
||||
//拨打电话
|
||||
telPhone(phoneNumber) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: phoneNumber,
|
||||
fail() {
|
||||
console.log("取消拨打");
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取门店列表数据
|
||||
getList: function() {
|
||||
if (this.loading || this.loaded) return;
|
||||
|
@ -20,7 +20,6 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bnt bg-color-red" @click="toCash">立即提现</view>
|
||||
<view class="list acea-row row-between-wrapper">
|
||||
<view class="item acea-row row-center-wrapper row-column" @click="goPoster()">
|
||||
<text class="iconfont icon-erweima"></text>
|
||||
|
@ -38,7 +38,27 @@ export function dataFormat(time, option) {
|
||||
return timeStr
|
||||
}
|
||||
}
|
||||
|
||||
// 年月日,时分秒
|
||||
// "YYYY-mm-dd HH:MM"
|
||||
export function dateFormatL(fmt, date) {
|
||||
let ret;
|
||||
const opt = {
|
||||
"Y+": date.getFullYear().toString(), // 年
|
||||
"m+": (date.getMonth() + 1).toString(), // 月
|
||||
"d+": date.getDate().toString(), // 日
|
||||
"H+": date.getHours().toString(), // 时
|
||||
"M+": date.getMinutes().toString(), // 分
|
||||
"S+": date.getSeconds().toString() // 秒
|
||||
// 有其他格式化字符需求可以继续添加,必须转化成字符串
|
||||
};
|
||||
for (let k in opt) {
|
||||
ret = new RegExp("(" + k + ")").exec(fmt);
|
||||
if (ret) {
|
||||
fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")))
|
||||
};
|
||||
};
|
||||
return fmt;
|
||||
}
|
||||
export function dateFormatT(time) {
|
||||
time = +time * 1000;
|
||||
const d = new Date(time);
|
||||
@ -251,6 +271,7 @@ export const login = () => {
|
||||
store.dispatch('userInfo', true)
|
||||
getUserInfo().then(user => {
|
||||
console.log('获取用户信息成功')
|
||||
uni.setStorageSync('uid', user.data.uid);
|
||||
store.dispatch('setUserInfo', user.data)
|
||||
resolve(user)
|
||||
}).catch(error => {
|
||||
@ -661,7 +682,7 @@ export function handleQrCode() {
|
||||
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();
|
||||
let strs = url.split("&");
|
||||
@ -701,8 +722,8 @@ const getImageInfo = (images) => {
|
||||
* @param string store_name 素材文字
|
||||
* @param string price 价格
|
||||
* @param function successFn 回调函数
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
export const PosterCanvas = (store, successCallBack) => {
|
||||
uni.showLoading({
|
||||
|
Reference in New Issue
Block a user