Gao xiaosong 4 years ago
parent
commit
5ad76245e9
  1. 4
      components/Menu.vue
  2. 69
      components/ShopLiveCard.vue
  3. 6
      components/sh-adv.vue
  4. 224
      manifest.json
  5. 6
      pages.json
  6. 20
      pages/activity/DargainDetails/index.vue
  7. 101
      pages/activity/GoodsGroup/children/activity-card.vue
  8. 264
      pages/activity/GoodsGroup/index.vue
  9. 2
      pages/activity/GoodsSeckill/index.vue
  10. 36
      pages/activity/GroupDetails/index.vue
  11. 54
      pages/activity/SeckillDetails/index.vue
  12. 2
      pages/home/components/Banner.vue
  13. 36
      pages/home/components/Live.vue
  14. 16
      pages/home/index.vue
  15. 13
      pages/order/OrderDetails/index.vue
  16. 28
      pages/shop/GoodsCon/index.vue
  17. 102
      pages/shop/GoodsFoot/index.vue
  18. 14
      pages/shop/Live/LiveList/index.vue
  19. 13
      pages/shop/StoreList/index.vue
  20. 1
      pages/user/promotion/UserPromotion/index.vue
  21. 23
      utils/index.js

4
components/Menu.vue

@ -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`"> <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 shopro-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="shopro-selector-rect">{{ item.name }}</text> <text class="Shop-selector-rect">{{ item.name }}</text>
</view> </view>
</view> </view>
</swiper-item> </swiper-item>

69
components/ShoproLiveCard.vue → components/ShopLiveCard.vue

@ -7,7 +7,7 @@
<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://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>
<view class="live-bottom" :style="{ width: wh + 'rpx' }"> <view class="live-bottom" :style="{ width: wh + 'rpx' }">
<view class="live-info"> <view class="live-info">
@ -19,7 +19,7 @@
</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.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> <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>
@ -33,6 +33,7 @@
</template> </template>
<script> <script>
import { dataFormatL } from "@/utils";
let HAS_LIVE = false let HAS_LIVE = false
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
HAS_LIVE = true HAS_LIVE = true
@ -43,37 +44,37 @@
// #endif // #endif
let timer = null; let timer = null;
export default { export default {
name: 'shoproLiveCard', name: 'shopLiveCard',
components: {}, components: {},
data() { data() {
return { return {
liveStatus: { liveStatus: {
'101': { '101': {
img: 'http://shopro.7wpp.com/imgs/live/live.png', img: 'https://wx.yixiang.co/static/images/live.png',
title: '直播中' title: '直播中'
}, },
'102': { '102': {
img: 'http://shopro.7wpp.com/imgs/live/prevue.png', img: 'https://wx.yixiang.co/static/images/prevue.png',
title: '未开始' title: '未开始'
}, },
'103': { '103': {
img: 'http://shopro.7wpp.com/imgs/live/playback.png', img: 'https://wx.yixiang.co/static/images/playback.png',
title: '已结束' title: '已结束'
}, },
'104': { '104': {
img: 'http://shopro.7wpp.com/imgs/live/104.png', img: 'https://wx.yixiang.co/static/images/104.png',
title: '禁播' title: '禁播'
}, },
'105': { '105': {
img: 'http://shopro.7wpp.com/imgs/live/105.png', img: 'https://wx.yixiang.co/static/images/105.png',
title: '暂停中' title: '暂停中'
}, },
'106': { '106': {
img: 'http://shopro.7wpp.com/imgs/live/106.png', img: 'https://wx.yixiang.co/static/images/106.png',
title: '异常' title: '异常'
}, },
'107': { '107': {
img: 'http://shopro.7wpp.com/imgs/live/past.png', img: 'https://wx.yixiang.co/static/images/past.png',
title: '已过期' title: '已过期'
} }
} }
@ -95,10 +96,10 @@
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;
@ -112,26 +113,26 @@
}, },
// 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 = dataFormatL('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.room_id 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);
// }); });
// } }
} }
} }
}; };

6
components/sh-adv.vue

@ -83,19 +83,19 @@
return { return {
detail: { detail: {
"list": [{ "list": [{
"image": "https:\/\/shopro-1253949872.file.myqcloud.com\/uploads\/20200704\/0669a6adec3f35d45ec66a082e03774f.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:\/\/shopro-1253949872.file.myqcloud.com\/uploads\/20200704\/cddb5d90a4241f6235d16368534bc730.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:\/\/shopro-1253949872.file.myqcloud.com\/uploads\/20200704\/e047d312fb5930de972ae288b9b3bae7.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": "积分",

224
manifest.json

@ -1,32 +1,32 @@
{ {
"name": "yshopmall", "name" : "yshopmall",
"appid": "__UNI__C7A519E", "appid" : "__UNI__C7A519E",
"description": "", "description" : "",
"versionName": "1.0.0", "versionName" : "1.0.0",
"versionCode": 1, "versionCode" : 1,
"transformPx": false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus": { "app-plus" : {
"usingComponents": true, "usingComponents" : true,
"nvueCompiler": "uni-app", "nvueCompiler" : "uni-app",
"compilerVersion": 3, "compilerVersion" : 3,
"splashscreen": { "splashscreen" : {
"alwaysShowBeforeRender": true, "alwaysShowBeforeRender" : true,
"waiting": false, "waiting" : false,
"autoclose": true, "autoclose" : true,
"delay": 0 "delay" : 0
}, },
/* */ /* */
"modules": { "modules" : {
"OAuth": {}, "OAuth" : {},
"Payment": {}, "Payment" : {},
"Share": {} "Share" : {}
}, },
/* */ /* */
"distribute": { "distribute" : {
/* android */ /* android */
"android": { "android" : {
"permissions": [ "permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>", "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
@ -52,127 +52,127 @@
] ]
}, },
/* ios */ /* ios */
"ios": {}, "ios" : {},
/* SDK */ /* SDK */
"sdkConfigs": { "sdkConfigs" : {
"oauth": { "oauth" : {
"weixin": { "weixin" : {
"appid": "wx7c84ede33062d1e4", "appid" : "wx7c84ede33062d1e4",
"appsecret": "c47ef66d3311194da44e60387d5c1abd", "appsecret" : "c47ef66d3311194da44e60387d5c1abd",
"UniversalLinks": "https://yixiang.co/app/" "UniversalLinks" : "https://yixiang.co/app/"
} }
}, },
"payment": { "payment" : {
"weixin": { "weixin" : {
"appid": "wx7c84ede33062d1e4", "appid" : "wx7c84ede33062d1e4",
"UniversalLinks": "https://yixiang.co/app/" "UniversalLinks" : "https://yixiang.co/app/"
} }
}, },
"share": { "share" : {
"weixin": { "weixin" : {
"appid": "wx7c84ede33062d1e4", "appid" : "wx7c84ede33062d1e4",
"UniversalLinks": "https://yixiang.co/app/" "UniversalLinks" : "https://yixiang.co/app/"
} }
}, },
"ad": {} "ad" : {}
}, },
"splashscreen": { "splashscreen" : {
"ios": { "ios" : {
"iphone": { "iphone" : {
"portrait-896h@3x": "unpackage/res/splash/1242+2688.png", "portrait-896h@3x" : "unpackage/res/splash/1242+2688.png",
"portrait-896h@2x": "unpackage/res/splash/828+1792.png", "portrait-896h@2x" : "unpackage/res/splash/828+1792.png",
"iphonex": "unpackage/res/splash/1125+2436.png", "iphonex" : "unpackage/res/splash/1125+2436.png",
"retina55": "unpackage/res/splash/1142+2208.png", "retina55" : "unpackage/res/splash/1142+2208.png",
"retina47": "unpackage/res/splash/750+1334.png", "retina47" : "unpackage/res/splash/750+1334.png",
"retina40": "unpackage/res/splash/640+1136.png", "retina40" : "unpackage/res/splash/640+1136.png",
"retina35": "unpackage/res/splash/640+960.png" "retina35" : "unpackage/res/splash/640+960.png"
} }
}, },
"android": { "android" : {
"hdpi": "unpackage/res/splash/480+762.png", "hdpi" : "unpackage/res/splash/480+762.png",
"xhdpi": "unpackage/res/splash/720+1242.png", "xhdpi" : "unpackage/res/splash/720+1242.png",
"xxhdpi": "unpackage/res/splash/1080+1882.png" "xxhdpi" : "unpackage/res/splash/1080+1882.png"
} }
}, },
"icons": { "icons" : {
"android": { "android" : {
"hdpi": "unpackage/res/icons/72x72.png", "hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi": "unpackage/res/icons/96x96.png", "xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi": "unpackage/res/icons/144x144.png", "xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi": "unpackage/res/icons/192x192.png" "xxxhdpi" : "unpackage/res/icons/192x192.png"
}, },
"ios": { "ios" : {
"appstore": "unpackage/res/icons/1024x1024.png", "appstore" : "unpackage/res/icons/1024x1024.png",
"ipad": { "ipad" : {
"app": "unpackage/res/icons/76x76.png", "app" : "unpackage/res/icons/76x76.png",
"app@2x": "unpackage/res/icons/152x152.png", "app@2x" : "unpackage/res/icons/152x152.png",
"notification": "unpackage/res/icons/20x20.png", "notification" : "unpackage/res/icons/20x20.png",
"notification@2x": "unpackage/res/icons/40x40.png", "notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x": "unpackage/res/icons/167x167.png", "proapp@2x" : "unpackage/res/icons/167x167.png",
"settings": "unpackage/res/icons/29x29.png", "settings" : "unpackage/res/icons/29x29.png",
"settings@2x": "unpackage/res/icons/58x58.png", "settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight": "unpackage/res/icons/40x40.png", "spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x": "unpackage/res/icons/80x80.png" "spotlight@2x" : "unpackage/res/icons/80x80.png"
}, },
"iphone": { "iphone" : {
"app@2x": "unpackage/res/icons/120x120.png", "app@2x" : "unpackage/res/icons/120x120.png",
"app@3x": "unpackage/res/icons/180x180.png", "app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x": "unpackage/res/icons/40x40.png", "notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x": "unpackage/res/icons/60x60.png", "notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x": "unpackage/res/icons/58x58.png", "settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x": "unpackage/res/icons/87x87.png", "settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x": "unpackage/res/icons/80x80.png", "spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x": "unpackage/res/icons/120x120.png" "spotlight@3x" : "unpackage/res/icons/120x120.png"
} }
} }
} }
} }
}, },
"quickapp": {}, "quickapp" : {},
"mp-weixin": { "mp-weixin" : {
"appid": "wx604d2ea4702620d2", "appid" : "wx604d2ea4702620d2",
"setting": { "setting" : {
"urlCheck": false "urlCheck" : false
}, },
"usingComponents": true, "usingComponents" : true,
"permission": { "permission" : {
"scope.userLocation": { "scope.userLocation" : {
"desc": "你的位置信息将用于小程序位置接口的效果展示" "desc" : "你的位置信息将用于小程序位置接口的效果展示"
} }
}, },
"plugins": { "plugins" : {
"live-player-plugin": { "live-player-plugin" : {
// //
"version": "1.0.15", "version" : "1.1.9",
// appidappid // appidappid
"provider": "wx2b03c6e691cd7370" "provider" : "wx2b03c6e691cd7370"
} }
} }
}, },
"mp-alipay": { "mp-alipay" : {
"usingComponents": true "usingComponents" : true
}, },
"mp-baidu": { "mp-baidu" : {
"usingComponents": true "usingComponents" : true
}, },
"mp-toutiao": { "mp-toutiao" : {
"usingComponents": true "usingComponents" : true
}, },
"h5": { "h5" : {
"title": "yshop", "title" : "yshop",
"devServer": { "devServer" : {
"disableHostCheck": true "disableHostCheck" : true
}, },
"router": { "router" : {
"mode": "history" "mode" : "history"
}, },
"sdkConfigs": { "sdkConfigs" : {
"maps": { "maps" : {
"qqmap": { "qqmap" : {
"key": "" "key" : ""
} }
} }
}, },
"domain": "h5.yixiang.co" "domain" : "h5.yixiang.co"
} }
} }

6
pages.json

@ -93,6 +93,12 @@
"navigationBarTitleText": "商品收藏" "navigationBarTitleText": "商品收藏"
} }
}, },
{
"path": "pages/shop/GoodsFoot/index",
"style": {
"navigationBarTitleText": "我的足迹"
}
},
{ {
"path": "pages/shop/news/NewsDetail/index", "path": "pages/shop/news/NewsDetail/index",
"style": { "style": {

20
pages/activity/DargainDetails/index.vue

@ -206,7 +206,7 @@
bargainSumCount: 0, // bargainSumCount: 0, //
activeMsg: "", activeMsg: "",
// ssssss // ssssss
active: true, active: false,
loading: false, loading: false,
datatime: 0, datatime: 0,
lookCount: 0, // lookCount: 0, //
@ -244,6 +244,24 @@
}, 500); }, 500);
}, },
methods: { 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() { goParticipate() {
if (this.bargainPartake === this.userInfo.uid) this.getBargainStart(); if (this.bargainPartake === this.userInfo.uid) this.getBargainStart();

101
pages/activity/GoodsGroup/children/activity-card.vue

@ -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>

264
pages/activity/GoodsGroup/index.vue

@ -1,90 +1,228 @@
<template> <template>
<view class="group-list" ref="container"> <view class="page_box">
<view class="list" v-if="combinationList.length>0"> <view class="content_box">
<view <scroll-view class="scroll-box" scroll-y enable-back-to-top scroll-with-animation @scrolltolower="loadMore">
class="item acea-row row-between-wrapper" <view class="group-wrap">
v-for="(item, combinationListIndex) in combinationList" <view class="group-head x-bc">
:key="combinationListIndex" <text class="group-head__title">爆款拼团</text>
@click="link(item.id)" <text class="group-head__notice">省钱省心限时拼</text>
>
<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>
<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> </view>
<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> </view>
<text class="group-num">{{ groupon.people || 0 }}人团</text>
</view> </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>
<Loading :loaded="status" :loading="loadingList"></Loading>
</view> </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> </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> </view>
<!-- 自定义底部导航 -->
<Shop-tabbar></Shop-tabbar>
</view> </view>
</template> </template>
<script> <script>
import activityCard from './children/activity-card.vue';
import { getCombinationList } from "@/api/activity"; import { getCombinationList } from "@/api/activity";
import Loading from "@/components/Loading";
export default { export default {
name: "GoodsGroup",
components: { components: {
Loading activityCard
}, },
props: {}, data() {
data: function() {
return { return {
combinationList: [], emptyData: {
status: false, // false true img: '/static/imgs/empty/empty_goods.png',
loading: false, // false true tip: '还没有拼团商品噢,去首页看看吧~',
page: 1, // path: '/pages/index/index',
limit: 20, // pathText: '去首页逛逛'
loadingList: false
};
}, },
mounted: function() { status:'',
// document.querySelector('body').setAttribute('style', 'background-color:#eb3729'); isLoading: true,
this.getCombinationList(); loadStatus: '', //loading,over
lastPage: 0,
currentPage: 1,
grouponList: []
};
}, },
onReachBottom() { onLoad() {
!this.loadingList && this.getCombinationList(); this.getGrouponList();
}, },
onPullDownRefresh() {},
computed: {},
methods: { methods: {
getCombinationList: function() { //
var that = this; jump(path, parmas) {
if (that.loading) return; this.$yrouter.push({
if (that.status) return; path: path,
getCombinationList({ page: that.page, limit: that.limit }).then(res => { query: parmas
that.status = res.data.length < that.limit;
that.combinationList.push.apply(that.combinationList, res.data);
that.page++;
that.loading = false;
}); });
}, },
link: function(id) { //
this.$yrouter.push({ loadMore() {
path: "/pages/activity/GroupDetails/index", if (this.currentPage < this.lastPage) {
query: { id } 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> </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>

2
pages/activity/GoodsSeckill/index.vue

@ -6,7 +6,7 @@
<scroll-view scroll-y="false" scroll-x="true"> <scroll-view scroll-y="false" scroll-x="true">
<view class="timeScroll"> <view class="timeScroll">
<div class="logoPic"> <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> </div>
<view v-for="(item, index) in timeList" :key="index"> <view v-for="(item, index) in timeList" :key="index">
<view v-if="active==index" class="timeItem active" @click="setTime(index)"> <view v-if="active==index" class="timeItem active" @click="setTime(index)">

36
pages/activity/GroupDetails/index.vue

@ -247,6 +247,24 @@
this.mountedStart(); this.mountedStart();
}, },
methods: { 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 () { openAlone: function () {
this.$yrouter.push({ this.$yrouter.push({
path: "/pages/shop/GoodsCon/index", path: "/pages/shop/GoodsCon/index",
@ -295,7 +313,7 @@
} else { } else {
that.posterData.title = that.storeInfo.title; 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.posterData.code = that.storeInfo.code_base;
that.domStatus = true; that.domStatus = true;
console.log(this.storeInfo) console.log(this.storeInfo)
@ -319,8 +337,8 @@
this.storeInfo.title this.storeInfo.title
); );
this.$set(this.attr.productSelect, "image", productSelect.image); this.$set(this.attr.productSelect, "image", productSelect.image);
this.$set(this.attr.productSelect, "price", productSelect.price); this.$set(this.attr.productSelect, "price", productSelect.pinkPrice);
this.$set(this.attr.productSelect, "stock", productSelect.stock); this.$set(this.attr.productSelect, "stock", productSelect.pinkStock);
this.$set(this.attr.productSelect, "unique", productSelect.unique); this.$set(this.attr.productSelect, "unique", productSelect.unique);
this.$set(this.attr.productSelect, "cart_num", 1); this.$set(this.attr.productSelect, "cart_num", 1);
this.$set(this, "attrValue", value.sort().join(",")); this.$set(this, "attrValue", value.sort().join(","));
@ -332,7 +350,7 @@
this.storeInfo.title this.storeInfo.title
); );
this.$set(this.attr.productSelect, "image", this.storeInfo.image); 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, "stock", 0);
this.$set(this.attr.productSelect, "unique", ""); this.$set(this.attr.productSelect, "unique", "");
this.$set(this.attr.productSelect, "cart_num", 0); this.$set(this.attr.productSelect, "cart_num", 0);
@ -345,8 +363,8 @@
this.storeInfo.title this.storeInfo.title
); );
this.$set(this.attr.productSelect, "image", this.storeInfo.image); 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", this.storeInfo.stock); this.$set(this.attr.productSelect, "stock", this.storeInfo.pinkStock);
this.$set( this.$set(
this.attr.productSelect, this.attr.productSelect,
"unique", "unique",
@ -418,15 +436,15 @@
if (productSelect) { if (productSelect) {
this.attr.productAttr[res.indexw].index = res.indexn; this.attr.productAttr[res.indexw].index = res.indexn;
this.$set(this.attr.productSelect, "image", productSelect.image); this.$set(this.attr.productSelect, "image", productSelect.image);
this.$set(this.attr.productSelect, "price", productSelect.price); this.$set(this.attr.productSelect, "price", productSelect.pinkPrice);
this.$set(this.attr.productSelect, "stock", productSelect.stock); this.$set(this.attr.productSelect, "stock", productSelect.pinkStock);
this.$set(this.attr.productSelect, "unique", productSelect.unique); this.$set(this.attr.productSelect, "unique", productSelect.unique);
this.$set(this.attr.productSelect, "cart_num", 1); this.$set(this.attr.productSelect, "cart_num", 1);
this.$set(this, "attrValue", res.value); this.$set(this, "attrValue", res.value);
this.$set(this, "attrTxt", "已选择"); this.$set(this, "attrTxt", "已选择");
} else { } else {
this.$set(this.attr.productSelect, "image", this.storeInfo.image); 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, "stock", 0);
this.$set(this.attr.productSelect, "unique", ""); this.$set(this.attr.productSelect, "unique", "");
this.$set(this.attr.productSelect, "cart_num", 0); this.$set(this.attr.productSelect, "cart_num", 0);

54
pages/activity/SeckillDetails/index.vue

@ -16,16 +16,6 @@
<view class="iconfont icon-jiantou"></view> <view class="iconfont icon-jiantou"></view>
</view> </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="wrapperRush">
<view class="introduce acea-row row-between"> <view class="introduce acea-row row-between">
<view class="infor" v-text="storeInfo.title"></view> <view class="infor" v-text="storeInfo.title"></view>
@ -36,6 +26,14 @@
<view v-text="'销量:' + storeInfo.sales + '件'"></view> <view v-text="'销量:' + storeInfo.sales + '件'"></view>
</view> </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="product-intro">
<view class="title">产品介绍</view> <view class="title">产品介绍</view>
<view class="conter" v-html="storeInfo.description"></view> <view class="conter" v-html="storeInfo.description"></view>
@ -152,6 +150,24 @@
this.mountedStart(); this.mountedStart();
}, },
methods: { 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 () { openAlone: function () {
this.$yrouter.push({ this.$yrouter.push({
path: "/pages/shop/GoodsCon/index", path: "/pages/shop/GoodsCon/index",
@ -237,8 +253,8 @@
this.storeInfo.title this.storeInfo.title
); );
this.$set(this.attr.productSelect, "image", productSelect.image); this.$set(this.attr.productSelect, "image", productSelect.image);
this.$set(this.attr.productSelect, "price", productSelect.price); this.$set(this.attr.productSelect, "price", productSelect.seckillPrice);
this.$set(this.attr.productSelect, "stock", productSelect.stock); this.$set(this.attr.productSelect, "stock", productSelect.seckillStock);
this.$set(this.attr.productSelect, "unique", productSelect.unique); this.$set(this.attr.productSelect, "unique", productSelect.unique);
this.$set(this.attr.productSelect, "cart_num", 1); this.$set(this.attr.productSelect, "cart_num", 1);
this.$set(this, "attrValue", value.sort().join(",")); this.$set(this, "attrValue", value.sort().join(","));
@ -250,7 +266,7 @@
this.storeInfo.title this.storeInfo.title
); );
this.$set(this.attr.productSelect, "image", this.storeInfo.image); 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, "stock", 0);
this.$set(this.attr.productSelect, "unique", ""); this.$set(this.attr.productSelect, "unique", "");
this.$set(this.attr.productSelect, "cart_num", 0); this.$set(this.attr.productSelect, "cart_num", 0);
@ -263,8 +279,8 @@
this.storeInfo.title this.storeInfo.title
); );
this.$set(this.attr.productSelect, "image", this.storeInfo.image); 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", this.storeInfo.stock); this.$set(this.attr.productSelect, "stock", this.storeInfo.seckillStock);
this.$set( this.$set(
this.attr.productSelect, this.attr.productSelect,
"unique", "unique",
@ -289,7 +305,7 @@
ChangeCartNum: function (res) { ChangeCartNum: function (res) {
var that = this; var that = this;
if (res) { 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++; that.attr.productSelect.cart_num++;
this.cartNum++; this.cartNum++;
} }
@ -307,15 +323,15 @@
if (productSelect) { if (productSelect) {
this.attr.productAttr[res.indexw].index = res.indexn; this.attr.productAttr[res.indexw].index = res.indexn;
this.$set(this.attr.productSelect, "image", productSelect.image); this.$set(this.attr.productSelect, "image", productSelect.image);
this.$set(this.attr.productSelect, "price", productSelect.price); this.$set(this.attr.productSelect, "price", productSelect.seckillPrice);
this.$set(this.attr.productSelect, "stock", productSelect.stock); this.$set(this.attr.productSelect, "stock", productSelect.seckillStock);
this.$set(this.attr.productSelect, "unique", productSelect.unique); this.$set(this.attr.productSelect, "unique", productSelect.unique);
this.$set(this.attr.productSelect, "cart_num", 1); this.$set(this.attr.productSelect, "cart_num", 1);
this.$set(this, "attrValue", res.value); this.$set(this, "attrValue", res.value);
this.$set(this, "attrTxt", "已选择"); this.$set(this, "attrTxt", "已选择");
} else { } else {
this.$set(this.attr.productSelect, "image", this.storeInfo.image); 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, "stock", 0);
this.$set(this.attr.productSelect, "unique", ""); this.$set(this.attr.productSelect, "unique", "");
this.$set(this.attr.productSelect, "cart_num", 0); this.$set(this.attr.productSelect, "cart_num", 0);

2
pages/home/components/Banner.vue

@ -1,7 +1,7 @@
<template> <template>
<view class="banner-swiper-box"> <view class="banner-swiper-box">
<canvas canvas-id="colorThief" class="hide-canvas"></canvas> <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)"> <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 class="swiper-image " :src="item.pic" @click="goRoll(item)" mode="widthFix" lazy-load>
</image> </image>

36
pages/home/components/Live.vue

@ -8,29 +8,22 @@
</view> </view>
</view> </view>
<view class="content-one"> <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> <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://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> mode=""></image>
</view> </view>
</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> </view>
</template> </template>
<script> <script>
import ShoproLiveCard from '@/components/ShoproLiveCard.vue' import ShopLiveCard from '@/components/ShopLiveCard.vue'
let HAS_LIVE = false let HAS_LIVE = false
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
@ -48,38 +41,38 @@
let timer = null; let timer = null;
export default { export default {
components: { components: {
ShoproLiveCard ShopLiveCard
}, },
data() { data() {
return { return {
liveList: [], liveList: [],
liveStatus: { liveStatus: {
'101': { '101': {
img: 'http://shopro.7wpp.com/imgs/live/live.png', img: 'https://wx.yixiang.co/static/images/live.png',
title: '直播中' title: '直播中'
}, },
'102': { '102': {
img: 'http://shopro.7wpp.com/imgs/live/prevue.png', img: 'https://wx.yixiang.co/static/images/prevue.png',
title: '未开始' title: '未开始'
}, },
'103': { '103': {
img: 'http://shopro.7wpp.com/imgs/live/playback.png', img: 'https://wx.yixiang.co/static/images/playback.png',
title: '已结束' title: '已结束'
}, },
'104': { '104': {
img: 'http://shopro.7wpp.com/imgs/live/104.png', img: 'https://wx.yixiang.co/static/images/104.png',
title: '禁播' title: '禁播'
}, },
'105': { '105': {
img: 'http://shopro.7wpp.com/imgs/live/105.png', img: 'https://wx.yixiang.co/static/images/105.png',
title: '暂停中' title: '暂停中'
}, },
'106': { '106': {
img: 'http://shopro.7wpp.com/imgs/live/106.png', img: 'https://wx.yixiang.co/static/images/106.png',
title: '异常' title: '异常'
}, },
'107': { '107': {
img: 'http://shopro.7wpp.com/imgs/live/past.png', img: 'https://wx.yixiang.co/static/images/past.png',
title: '已过期' title: '已过期'
} }
} }
@ -116,18 +109,18 @@
// if (HAS_LIVE) { // if (HAS_LIVE) {
// let that = this; // let that = this;
// let date = ''; // let date = '';
// if (that.detail.live_status == 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.room_id // 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.live_status = res.liveStatus; // that.detail.liveStatus = res.liveStatus;
// }) // })
// .catch(err => { // .catch(err => {
// console.log('get live status', err); // console.log('get live status', err);
@ -135,6 +128,7 @@
// } // }
}, },
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}`
}); });

16
pages/home/index.vue

@ -5,7 +5,7 @@
<view class="cu-custom" :style="[{height:CustomBar+ 'px',}]"> <view class="cu-custom" :style="[{height:CustomBar+ 'px',}]">
<view class="cu-bar fixed" :style="customStyle" :class="[bgcolor]"> <view class="cu-bar fixed" :style="customStyle" :class="[bgcolor]">
<view class="action"> <view class="action">
<text class="nav-title shopro-selector-rect">{{ 'yshop商城' }}</text> <text class="nav-title Shop-selector-rect">{{ 'yshop商城' }}</text>
</view> </view>
<view class="content" :style="[{top:StatusBar + 'px'}]"> <view class="content" :style="[{top:StatusBar + 'px'}]">
@ -232,6 +232,20 @@
}, },
methods: { methods: {
...mapActions(["getLocation"]), ...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) { goRoll(item) {
if (item.uniapp_url) { if (item.uniapp_url) {
this.$yrouter.push(item.uniapp_url) this.$yrouter.push(item.uniapp_url)

13
pages/order/OrderDetails/index.vue

@ -126,7 +126,7 @@
<view class="name"> <view class="name">
{{ orderInfo.realName }} {{ orderInfo.realName }}
<text class="phone">{{ orderInfo.userPhone }}</text> <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>
<view>{{ orderInfo.userAddress }}</view> <view>{{ orderInfo.userAddress }}</view>
</view> </view>
@ -134,7 +134,7 @@
<div class="name"> <div class="name">
{{ system_store.name}} {{ system_store.name}}
<span class="phone">{{ system_store.phone }}</span> <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>
<div>{{ system_store.address }}</div> <div>{{ system_store.address }}</div>
</div> </div>
@ -366,6 +366,15 @@ export default {
}, },
}); });
}, },
//
telPhone(phoneNumber) {
uni.makePhoneCall({
phoneNumber: phoneNumber,
fail() {
console.log("取消拨打");
}
});
},
showChang: function (data) { showChang: function (data) {
// //
this.$yrouter.push({ this.$yrouter.push({

28
pages/shop/GoodsCon/index.vue

@ -70,7 +70,7 @@
</view> </view>
</view> </view>
<view class="addressBox"> <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 class="addressTxt corlor-yshop">距离{{systemStore.distance}}千米</view>
</view> </view>
</view> </view>
@ -319,6 +319,24 @@
}, },
}, },
methods: { 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() { goShoppingCart() {
this.$yrouter.switchTab("/pages/shop/ShoppingCart/index"); this.$yrouter.switchTab("/pages/shop/ShoppingCart/index");
}, },
@ -340,6 +358,14 @@
}, },
}); });
}, },
telPhone(phoneNumber) {
uni.makePhoneCall({
phoneNumber: phoneNumber,
fail() {
console.log("取消拨打");
}
});
},
showChang: function (data) { showChang: function (data) {
this.$yrouter.push({ this.$yrouter.push({
path: "/pages/map/index", path: "/pages/map/index",

102
pages/shop/GoodsFoot/index.vue

@ -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>

14
pages/shop/Live/LiveList/index.vue

@ -11,8 +11,8 @@
<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.id"> <block v-for="live in liveList" :key="live.roomId">
<shopro-live-card :detail="live"></shopro-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>
@ -25,11 +25,11 @@
import { import {
yxWechatLive yxWechatLive
} from "@/api/live"; } from "@/api/live";
import ShoproLiveCard from '@/components/ShoproLiveCard.vue' import ShopLiveCard from '@/components/ShopLiveCard.vue'
export default { export default {
components: { components: {
ShoproLiveCard ShopLiveCard
}, },
data() { data() {
return { return {
@ -39,6 +39,12 @@
title: 'all', title: 'all',
name: '全部', name: '全部',
code: '' code: ''
},
{
title: 'prevue',
name: '预告',
code: '102'
}, },
{ {
title: 'living', title: 'living',

13
pages/shop/StoreList/index.vue

@ -16,7 +16,7 @@
</view> </view>
<view class="row-right"> <view class="row-right">
<view> <view>
<a class="store-phone" :href="'tel:' + item.phone"> <a class="store-phone" @click="telPhone(item.phone)">
<text class="iconfont icon-dadianhua01"></text> <text class="iconfont icon-dadianhua01"></text>
</a> </a>
</view> </view>
@ -35,7 +35,7 @@
<script> <script>
import Loading from "@/components/Loading"; import Loading from "@/components/Loading";
import { storeListApi } from "@/api/store"; import { storeListApi } from "@/api/store";
import { isWeixin } from "@/utils/index"; import { isWeixin,tel } from "@/utils/index";
import { wechatEvevt, wxShowLocation } from "@/libs/wechat"; import { wechatEvevt, wxShowLocation } from "@/libs/wechat";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import cookie from "@/utils/store/cookie"; import cookie from "@/utils/store/cookie";
@ -79,6 +79,15 @@ export default {
this.$yrouter.back(); this.$yrouter.back();
} }
}, },
//
telPhone(phoneNumber) {
uni.makePhoneCall({
phoneNumber: phoneNumber,
fail() {
console.log("取消拨打");
}
});
},
// //
getList: function() { getList: function() {
if (this.loading || this.loaded) return; if (this.loading || this.loaded) return;

1
pages/user/promotion/UserPromotion/index.vue

@ -20,7 +20,6 @@
</view> </view>
</view> </view>
</view> </view>
<view class="bnt bg-color-red" @click="toCash">立即提现</view>
<view class="list acea-row row-between-wrapper"> <view class="list acea-row row-between-wrapper">
<view class="item acea-row row-center-wrapper row-column" @click="goPoster()"> <view class="item acea-row row-center-wrapper row-column" @click="goPoster()">
<text class="iconfont icon-erweima"></text> <text class="iconfont icon-erweima"></text>

23
utils/index.js

@ -38,7 +38,27 @@ export function dataFormat(time, option) {
return timeStr 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) { export function dateFormatT(time) {
time = +time * 1000; time = +time * 1000;
const d = new Date(time); const d = new Date(time);
@ -251,6 +271,7 @@ export const login = () => {
store.dispatch('userInfo', true) store.dispatch('userInfo', true)
getUserInfo().then(user => { getUserInfo().then(user => {
console.log('获取用户信息成功') console.log('获取用户信息成功')
uni.setStorageSync('uid', user.data.uid);
store.dispatch('setUserInfo', user.data) store.dispatch('setUserInfo', user.data)
resolve(user) resolve(user)
}).catch(error => { }).catch(error => {

Loading…
Cancel
Save