修改样式错误的问题
This commit is contained in:
@ -2423,13 +2423,35 @@ page {
|
|||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
}
|
}
|
||||||
.product-con .product-intro .title {
|
.product-con .product-intro .title {
|
||||||
|
position: relative;
|
||||||
|
width: 50%;
|
||||||
|
margin: 1.5em auto;
|
||||||
|
line-height: 1.5em;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #282828;
|
display: -webkit-box;
|
||||||
height: 86rpx;
|
display: -webkit-flex;
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-pack: center;
|
||||||
|
-webkit-justify-content: center;
|
||||||
|
-ms-flex-pack: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.product-con .product-intro .title:after {
|
||||||
|
content: ' ';
|
||||||
|
position: absolute;
|
||||||
|
border-bottom: 0.5px solid #e5e5e5;
|
||||||
|
-webkit-transform: scaleY(0.5);
|
||||||
|
-ms-transform: scaleY(0.5);
|
||||||
|
transform: scaleY(0.5);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: #fff;
|
top: 9px;
|
||||||
text-align: center;
|
left: 0;
|
||||||
line-height: 86rpx;
|
z-index: -1;
|
||||||
|
}
|
||||||
|
.product-con .product-intro .title text {
|
||||||
|
background: #f5f5f5;
|
||||||
|
padding: 0 20rpx;
|
||||||
}
|
}
|
||||||
.product-con .product-intro .conter {
|
.product-con .product-intro .conter {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -2656,13 +2656,39 @@ page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.product-con .product-intro .title {
|
.product-con .product-intro .title {
|
||||||
font-size: 0.3 * 100rpx;
|
// font-size: 0.3 * 100rpx;
|
||||||
color: #282828;
|
// color: #282828;
|
||||||
height: 0.86 * 100rpx;
|
// height: 0.86 * 100rpx;
|
||||||
|
// width: 100%;
|
||||||
|
// background-color: #fff;
|
||||||
|
// text-align: center;
|
||||||
|
// line-height: 0.86 * 100rpx;
|
||||||
|
position: relative;
|
||||||
|
width: 50%;
|
||||||
|
margin: 1.5em auto;
|
||||||
|
line-height: 1.5em;
|
||||||
|
font-size: 30rpx;
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-pack: center;
|
||||||
|
-webkit-justify-content: center;
|
||||||
|
justify-content: center;
|
||||||
|
&:after {
|
||||||
|
content: ' ';
|
||||||
|
position: absolute;
|
||||||
|
border-bottom: 0.5px solid #e5e5e5;
|
||||||
|
-webkit-transform: scaleY(0.5);
|
||||||
|
transform: scaleY(0.5);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: #fff;
|
top: 9px;
|
||||||
text-align: center;
|
left: 0;
|
||||||
line-height: 0.86 * 100rpx;
|
z-index: -1;
|
||||||
|
}
|
||||||
|
text {
|
||||||
|
background: #f5f5f5;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .product-intro .conter {
|
.product-con .product-intro .conter {
|
||||||
|
@ -23,10 +23,10 @@
|
|||||||
<!-- <tui-button :width="status == 3 ? '146rpx' : '144rpx'" :height="status == 3 ? '60rpx' : '50rpx'" :size="status == 3 ? 26 : 24" :type="status == 1 ? 'gray' : 'danger'" :disabled="status == 1" :plain="status == 3">
|
<!-- <tui-button :width="status == 3 ? '146rpx' : '144rpx'" :height="status == 3 ? '60rpx' : '50rpx'" :size="status == 3 ? 26 : 24" :type="status == 1 ? 'gray' : 'danger'" :disabled="status == 1" :plain="status == 3">
|
||||||
{{ status | getBtnText(item.subscribe) }}
|
{{ status | getBtnText(item.subscribe) }}
|
||||||
</tui-button> -->
|
</tui-button> -->
|
||||||
<view class="grab bg-color-red" v-if="item.status === 1 && item.stock > 0" @click="goDetail()">马上抢</view>
|
<view class="grab bg-color-red" v-if="item.status === 0 && item.stock > 0" @click="goDetail()">马上抢</view>
|
||||||
<view class="grab" v-if="item.status === 1 && item.stock <= 0">已售磬</view>
|
<view class="grab" v-if="item.status === 1 && item.stock <= 0">已售磬</view>
|
||||||
<view class="grab bg-color-red" v-if="item.status === 2">即将开始</view>
|
<view class="grab bg-color-red" v-if="item.status === 2">即将开始</view>
|
||||||
<view class="grab bg-color-red" v-if="item.status === 0">已结束</view>
|
<view class="grab bg-color-red" v-if="item.status === 1">已结束</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -1,42 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="lottie-bg">
|
<view class="lottie-bg">
|
||||||
<view id="lottie">
|
<view id="lottie">
|
||||||
<image src="../../static/images/live-logo.gif" rel="preload" mode="widthFix" style="width: 100%;" />
|
<image :src="`${$VUE_APP_RESOURCES_URL}/images/live-logo.gif`" rel="preload" mode="widthFix" style="width: 100%;" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import { mapState, mapMutations, mapActions } from 'vuex'
|
||||||
mapState,
|
// 组件
|
||||||
mapMutations,
|
// import request from "@//api/request";
|
||||||
mapActions
|
import { wxappAuth } from '@/api/user'
|
||||||
} from "vuex";
|
import dayjs from 'dayjs'
|
||||||
// 组件
|
import store from '@/store'
|
||||||
// import request from "@//api/request";
|
import cookie from '@/utils/store/cookie'
|
||||||
import {
|
import { parseQuery, login, handleQrCode, getCurrentPageUrl, handleUrlParam, getCurrentPageUrlWithArgs } from '@/utils'
|
||||||
wxappAuth,
|
|
||||||
} from "@/api/user";
|
|
||||||
import dayjs from "dayjs";
|
|
||||||
import store from "@/store";
|
|
||||||
import cookie from "@/utils/store/cookie";
|
|
||||||
import {
|
|
||||||
parseQuery,
|
|
||||||
login,
|
|
||||||
handleQrCode,
|
|
||||||
getCurrentPageUrl,
|
|
||||||
handleUrlParam,
|
|
||||||
getCurrentPageUrlWithArgs
|
|
||||||
} from "@/utils";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Loading",
|
name: 'Loading',
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
console.log('getUser')
|
console.log('getUser')
|
||||||
var url = handleQrCode();
|
var url = handleQrCode()
|
||||||
if (!url) {
|
if (!url) {
|
||||||
url = handleUrlParam(getCurrentPageUrlWithArgs())
|
url = handleUrlParam(getCurrentPageUrlWithArgs())
|
||||||
}
|
}
|
||||||
@ -44,53 +31,53 @@
|
|||||||
console.log('判断是否是分销')
|
console.log('判断是否是分销')
|
||||||
// 判断是否是分销
|
// 判断是否是分销
|
||||||
if (url) {
|
if (url) {
|
||||||
let urlSpread = parseInt(url.spread);
|
let urlSpread = parseInt(url.spread)
|
||||||
if (urlSpread) {
|
if (urlSpread) {
|
||||||
cookie.set("spread", urlSpread);
|
cookie.set('spread', urlSpread)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.$deviceType == "app" || this.$deviceType == "weixinh5") {
|
if (this.$deviceType == 'app' || this.$deviceType == 'weixinh5') {
|
||||||
this.$yrouter.switchTab({
|
this.$yrouter.switchTab({
|
||||||
path: "/pages/home/index"
|
path: '/pages/home/index',
|
||||||
});
|
})
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
if (this.$store.getters.token) {
|
if (this.$store.getters.token) {
|
||||||
// 如果token存在,直接进行进页面
|
// 如果token存在,直接进行进页面
|
||||||
console.log('登录状态存在,直接进页面')
|
console.log('登录状态存在,直接进页面')
|
||||||
this.toLaunch();
|
this.toLaunch()
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
console.log('进行登录操作')
|
console.log('进行登录操作')
|
||||||
login().finally(() => {
|
login().finally(() => {
|
||||||
this.$yrouter.switchTab({
|
this.$yrouter.switchTab({
|
||||||
path: "/pages/home/index"
|
path: '/pages/home/index',
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(["changeAuthorization", "setUserInfo", "getUser"]),
|
...mapActions(['changeAuthorization', 'setUserInfo', 'getUser']),
|
||||||
toLaunch() {
|
toLaunch() {
|
||||||
console.log("loading home");
|
console.log('loading home')
|
||||||
this.changeAuthorization(false);
|
this.changeAuthorization(false)
|
||||||
let redirect = cookie.get('redirect').replace(/\ /g, '')
|
let redirect = cookie.get('redirect').replace(/\ /g, '')
|
||||||
if (redirect && redirect.indexOf('/pages') != -1) {
|
if (redirect && redirect.indexOf('/pages') != -1) {
|
||||||
this.$yrouter.replace({
|
this.$yrouter.replace({
|
||||||
path: '/pages' + redirect.split('/pages')[1],
|
path: '/pages' + redirect.split('/pages')[1],
|
||||||
});
|
})
|
||||||
cookie.remove('redirect');
|
cookie.remove('redirect')
|
||||||
} else {
|
} else {
|
||||||
this.$yrouter.switchTab({
|
this.$yrouter.switchTab({
|
||||||
path: "/pages/home/index"
|
path: '/pages/home/index',
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
.lottie-bg {
|
.lottie-bg {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
@ -104,13 +91,13 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
-webkit-justify-content: center;
|
-webkit-justify-content: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#lottie {
|
#lottie {
|
||||||
width: 35%;
|
width: 35%;
|
||||||
display: block;
|
display: block;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
transform: translate3d(0, 0, 0);
|
transform: translate3d(0, 0, 0);
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -2,15 +2,14 @@
|
|||||||
<view class="page_box">
|
<view class="page_box">
|
||||||
<view class="content_box">
|
<view class="content_box">
|
||||||
<scroll-view class="scroll-box" scroll-y enable-back-to-top scroll-with-animation @scrolltolower="loadMore">
|
<scroll-view class="scroll-box" scroll-y enable-back-to-top scroll-with-animation @scrolltolower="loadMore">
|
||||||
<view class="group-wrap">
|
<view class="group-wrap" :style="`background: url('${$VUE_APP_RESOURCES_URL}/images/index-bg.png') no-repeat;`">
|
||||||
<view class="group-head x-bc">
|
<view class="group-head x-bc">
|
||||||
<text class="group-head__title">爆款拼团</text>
|
<text class="group-head__title">爆款拼团</text>
|
||||||
<text class="group-head__notice">省钱省心限时拼</text>
|
<text class="group-head__notice">省钱省心限时拼</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="group-box">
|
<view class="group-box">
|
||||||
<view class="goods-item" v-for="(groupon, index) in grouponList" :key="groupon.id">
|
<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"
|
<activity-card :cid="groupon.id" :title="groupon.title" :info="groupon.info" :img="groupon.image" :price="groupon.price" :productPrice="groupon.productPrice">
|
||||||
:price="groupon.price" :productPrice="groupon.productPrice">
|
|
||||||
<block slot="tag">
|
<block slot="tag">
|
||||||
<view class="tag" v-if="index < 3">TOP{{ index + 1 }}</view>
|
<view class="tag" v-if="index < 3">TOP{{ index + 1 }}</view>
|
||||||
</block>
|
</block>
|
||||||
@ -23,8 +22,7 @@
|
|||||||
<text class="group-num">{{ groupon.people || 0 }}人团</text>
|
<text class="group-num">{{ groupon.people || 0 }}人团</text>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<block slot="btn"><button class="cu-btn buy-btn"
|
<block slot="btn"><button class="cu-btn buy-btn" @tap.stop="jump('/pages/activity/GroupDetails/index', { id: groupon.id })">马上拼</button></block>
|
||||||
@tap.stop="jump('/pages/activity/GroupDetails/index', { id: groupon.id })">马上拼</button></block>
|
|
||||||
</activity-card>
|
</activity-card>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -36,17 +34,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import activityCard from './children/activity-card.vue';
|
import activityCard from './children/activity-card.vue'
|
||||||
import Loading from "@/components/Loading";
|
import Loading from '@/components/Loading'
|
||||||
|
|
||||||
|
import { getCombinationList } from '@/api/activity'
|
||||||
import {
|
export default {
|
||||||
getCombinationList
|
|
||||||
} from "@/api/activity";
|
|
||||||
export default {
|
|
||||||
components: {
|
components: {
|
||||||
activityCard,
|
activityCard,
|
||||||
Loading
|
Loading,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -54,18 +49,18 @@
|
|||||||
img: '/static/imgs/empty/empty_goods.png',
|
img: '/static/imgs/empty/empty_goods.png',
|
||||||
tip: '还没有拼团商品噢,去首页看看吧~',
|
tip: '还没有拼团商品噢,去首页看看吧~',
|
||||||
path: '/pages/index/index',
|
path: '/pages/index/index',
|
||||||
pathText: '去首页逛逛'
|
pathText: '去首页逛逛',
|
||||||
},
|
},
|
||||||
loaded: false,
|
loaded: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
lastPage: 0,
|
lastPage: 0,
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
grouponList: []
|
grouponList: [],
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getGrouponList();
|
this.getGrouponList()
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {},
|
onPullDownRefresh() {},
|
||||||
computed: {},
|
computed: {},
|
||||||
@ -74,27 +69,25 @@
|
|||||||
jump(path, parmas) {
|
jump(path, parmas) {
|
||||||
this.$yrouter.push({
|
this.$yrouter.push({
|
||||||
path: path,
|
path: path,
|
||||||
query: parmas
|
query: parmas,
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
// 加载更多
|
// 加载更多
|
||||||
loadMore() {
|
loadMore() {},
|
||||||
|
|
||||||
},
|
|
||||||
// 拼团列表
|
// 拼团列表
|
||||||
getGrouponList() {
|
getGrouponList() {
|
||||||
let that = this;
|
let that = this
|
||||||
if (this.loading || this.loaded) return;
|
if (this.loading || this.loaded) return
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
getCombinationList({
|
getCombinationList({
|
||||||
page: that.currentPage,
|
page: that.currentPage,
|
||||||
limit: this.limit
|
limit: this.limit,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
that.grouponList = that.grouponList.concat(res.data.storeCombinationQueryVos)
|
that.grouponList = that.grouponList.concat(res.data.storeCombinationQueryVos)
|
||||||
this.currentPage++;
|
this.currentPage++
|
||||||
this.loaded = res.data.storeCombinationQueryVos.length < this.limit;
|
this.loaded = res.data.storeCombinationQueryVos.length < this.limit
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
});
|
})
|
||||||
|
|
||||||
// that.$api('goods.grouponList', {
|
// that.$api('goods.grouponList', {
|
||||||
// page: that.currentPage
|
// page: that.currentPage
|
||||||
@ -111,21 +104,20 @@
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
!this.loading && this.getGrouponList();
|
!this.loading && this.getGrouponList()
|
||||||
}
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.group-wrap {
|
.group-wrap {
|
||||||
background: url('https://h5.yixiang.co/images/index-bg.png') no-repeat;
|
|
||||||
background-size: 100% 374rpx;
|
background-size: 100% 374rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.group-head {
|
.group-head {
|
||||||
padding: 0 25rpx;
|
padding: 0 25rpx;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
|
|
||||||
@ -142,9 +134,9 @@
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: rgba(255, 255, 255, 1);
|
color: rgba(255, 255, 255, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.group-box {
|
.group-box {
|
||||||
width: 710rpx;
|
width: 710rpx;
|
||||||
background: linear-gradient(#fff, #f5f5f5);
|
background: linear-gradient(#fff, #f5f5f5);
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
@ -228,5 +220,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -35,9 +35,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</tui-divider>
|
</tui-divider>
|
||||||
</view>
|
</view>
|
||||||
<view class="tui-countdown__box" v-if="item.status == 1">
|
<view class="tui-countdown__box" v-if="item.status == 1 || item.status == 2">
|
||||||
<text>距离{{ item.status == 2 ? '结束还剩' : '开始还有' }}</text>
|
<text>距离{{ item.status == 1 ? '结束还剩' : '开始还有' }}</text>
|
||||||
<count-down :isDay="true" :tipText="'倒计时 '" :dayText="' 天 '" :hourText="' 时 '" :minuteText="' 分 '" :secondText="' 秒'" :datatime="datatime / 1000"></count-down>
|
<count-down :isDay="true" :tipText="'倒计时 '" :dayText="' 天 '" :hourText="' 时 '" :minuteText="' 分 '" :secondText="' 秒'" :datatime="item.stop"></count-down>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
@ -117,7 +117,7 @@
|
|||||||
|
|
||||||
<!-- 产品介绍 -->
|
<!-- 产品介绍 -->
|
||||||
<view class="product-intro">
|
<view class="product-intro">
|
||||||
<view class="title">产品介绍</view>
|
<text class="title"><text>产品介绍</text></text>
|
||||||
<view class="conter" v-html="storeInfo.description"></view>
|
<view class="conter" v-html="storeInfo.description"></view>
|
||||||
<!-- <view class="conter" v-html=""></view> -->
|
<!-- <view class="conter" v-html=""></view> -->
|
||||||
</view>
|
</view>
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
<view class="iconfont icon-jiantou"></view>
|
<view class="iconfont icon-jiantou"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="product-intro">
|
<view class="product-intro">
|
||||||
<view class="title">产品介绍</view>
|
<text class="title"><text>产品介绍</text></text>
|
||||||
<view class="conter" v-html="storeInfo.description"></view>
|
<view class="conter" v-html="storeInfo.description"></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@
|
|||||||
|
|
||||||
<!-- 商品详情 -->
|
<!-- 商品详情 -->
|
||||||
<view class="product-intro">
|
<view class="product-intro">
|
||||||
<text class="title">产品介绍</text>
|
<text class="title"><text>产品介绍</text></text>
|
||||||
<view class="conter" v-html="storeInfo.description"></view>
|
<view class="conter" v-html="storeInfo.description"></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
<!-- 商品详情 -->
|
<!-- 商品详情 -->
|
||||||
<view class="product-intro">
|
<view class="product-intro">
|
||||||
<text class="title">产品介绍</text>
|
<text class="title"><text>产品介绍</text></text>
|
||||||
<view class="conter" v-html="storeInfo.description"></view>
|
<view class="conter" v-html="storeInfo.description"></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ export default {
|
|||||||
StorePoster,
|
StorePoster,
|
||||||
ShareInfo,
|
ShareInfo,
|
||||||
},
|
},
|
||||||
data: function () {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
shareInfoStatus: false,
|
shareInfoStatus: false,
|
||||||
weixinStatus: false,
|
weixinStatus: false,
|
||||||
@ -154,7 +154,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: mapGetters(['isLogin', 'location']),
|
computed: mapGetters(['isLogin', 'location']),
|
||||||
mounted: function () {
|
mounted: function() {
|
||||||
this.$store.commit('get_to', 'goodcon')
|
this.$store.commit('get_to', 'goodcon')
|
||||||
let url = handleQrCode()
|
let url = handleQrCode()
|
||||||
if (!url) {
|
if (!url) {
|
||||||
@ -185,7 +185,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onShareAppMessage: function () {
|
onShareAppMessage: function() {
|
||||||
return {
|
return {
|
||||||
title: this.storeInfo.storeName,
|
title: this.storeInfo.storeName,
|
||||||
imageUrl: this.storeInfo.image,
|
imageUrl: this.storeInfo.image,
|
||||||
@ -235,7 +235,7 @@ export default {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
showChang: function (data) {
|
showChang: function(data) {
|
||||||
this.$yrouter.push({
|
this.$yrouter.push({
|
||||||
path: '/pages/map/index',
|
path: '/pages/map/index',
|
||||||
query: data,
|
query: data,
|
||||||
@ -244,23 +244,23 @@ export default {
|
|||||||
updateTitle() {
|
updateTitle() {
|
||||||
// document.title = this.storeInfo.storeName || this.$yroute.meta.title;
|
// document.title = this.storeInfo.storeName || this.$yroute.meta.title;
|
||||||
},
|
},
|
||||||
setShareInfoStatus: function () {
|
setShareInfoStatus: function() {
|
||||||
this.shareInfoStatus = !this.shareInfoStatus
|
this.shareInfoStatus = !this.shareInfoStatus
|
||||||
this.posters = false
|
this.posters = false
|
||||||
},
|
},
|
||||||
shareCode: function () {
|
shareCode: function() {
|
||||||
var that = this
|
var that = this
|
||||||
getProductCode(that.id).then(res => {
|
getProductCode(that.id).then(res => {
|
||||||
that.posterData.code = res.data.code
|
that.posterData.code = res.data.code
|
||||||
that.listenerActionSheet()
|
that.listenerActionSheet()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
setPosterImageStatus: function () {
|
setPosterImageStatus: function() {
|
||||||
this.posterImageStatus = !this.posterImageStatus
|
this.posterImageStatus = !this.posterImageStatus
|
||||||
this.posters = false
|
this.posters = false
|
||||||
},
|
},
|
||||||
//产品详情接口;
|
//产品详情接口;
|
||||||
productCon: function () {
|
productCon: function() {
|
||||||
let that = this
|
let that = this
|
||||||
let from = this.location
|
let from = this.location
|
||||||
if (this.$deviceType == 'app') {
|
if (this.$deviceType == 'app') {
|
||||||
@ -320,7 +320,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
//默认选中属性;
|
//默认选中属性;
|
||||||
DefaultSelect: function () {
|
DefaultSelect: function() {
|
||||||
let productAttr = this.attr.productAttr
|
let productAttr = this.attr.productAttr
|
||||||
let value = []
|
let value = []
|
||||||
for (let i = 0; i < productAttr.length; i++) {
|
for (let i = 0; i < productAttr.length; i++) {
|
||||||
@ -362,7 +362,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
//购物车;
|
//购物车;
|
||||||
ChangeCartNum: function (changeValue) {
|
ChangeCartNum: function(changeValue) {
|
||||||
//changeValue:是否 加|减
|
//changeValue:是否 加|减
|
||||||
//获取当前变动属性
|
//获取当前变动属性
|
||||||
let productSelect = this.productValue[this.attrValue]
|
let productSelect = this.productValue[this.attrValue]
|
||||||
@ -395,29 +395,29 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
//将父级向子集多次传送的函数合二为一;
|
//将父级向子集多次传送的函数合二为一;
|
||||||
changeFun: function (opt) {
|
changeFun: function(opt) {
|
||||||
if (typeof opt !== 'object') opt = {}
|
if (typeof opt !== 'object') opt = {}
|
||||||
let action = opt.action || ''
|
let action = opt.action || ''
|
||||||
let value = opt.value === undefined ? '' : opt.value
|
let value = opt.value === undefined ? '' : opt.value
|
||||||
this[action] && this[action](value)
|
this[action] && this[action](value)
|
||||||
},
|
},
|
||||||
//打开优惠券插件;
|
//打开优惠券插件;
|
||||||
couponTap: function () {
|
couponTap: function() {
|
||||||
let that = this
|
let that = this
|
||||||
that.coupons()
|
that.coupons()
|
||||||
that.coupon.coupon = true
|
that.coupon.coupon = true
|
||||||
},
|
},
|
||||||
changecoupon: function (msg) {
|
changecoupon: function(msg) {
|
||||||
this.coupon.coupon = msg
|
this.coupon.coupon = msg
|
||||||
this.coupons()
|
this.coupons()
|
||||||
},
|
},
|
||||||
currentcoupon: function (res) {
|
currentcoupon: function(res) {
|
||||||
let that = this
|
let that = this
|
||||||
that.coupon.coupon = false
|
that.coupon.coupon = false
|
||||||
that.$set(that.coupon.list[res], 'is_use', true)
|
that.$set(that.coupon.list[res], 'is_use', true)
|
||||||
},
|
},
|
||||||
//可领取优惠券接口;
|
//可领取优惠券接口;
|
||||||
coupons: function () {
|
coupons: function() {
|
||||||
let that = this,
|
let that = this,
|
||||||
q = {
|
q = {
|
||||||
page: 1,
|
page: 1,
|
||||||
@ -429,18 +429,18 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
//打开属性插件;
|
//打开属性插件;
|
||||||
selecAttrTap: function () {
|
selecAttrTap: function() {
|
||||||
this.attr.cartAttr = true
|
this.attr.cartAttr = true
|
||||||
this.isOpen = true
|
this.isOpen = true
|
||||||
},
|
},
|
||||||
changeattr: function (msg) {
|
changeattr: function(msg) {
|
||||||
// 修改了规格
|
// 修改了规格
|
||||||
console.log(msg)
|
console.log(msg)
|
||||||
this.attr.cartAttr = msg
|
this.attr.cartAttr = msg
|
||||||
this.isOpen = false
|
this.isOpen = false
|
||||||
},
|
},
|
||||||
//选择属性;
|
//选择属性;
|
||||||
ChangeAttr: function (res) {
|
ChangeAttr: function(res) {
|
||||||
// 修改了规格
|
// 修改了规格
|
||||||
|
|
||||||
let productSelect = this.productValue[res.value]
|
let productSelect = this.productValue[res.value]
|
||||||
@ -467,27 +467,27 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
//收藏商品
|
//收藏商品
|
||||||
setCollect: function () {
|
setCollect: function() {
|
||||||
let that = this,
|
let that = this,
|
||||||
id = that.storeInfo.id,
|
id = that.storeInfo.id,
|
||||||
category = 'collect'
|
category = 'collect'
|
||||||
if (that.storeInfo.userCollect) {
|
if (that.storeInfo.userCollect) {
|
||||||
getCollectDel(id, category).then(function () {
|
getCollectDel(id, category).then(function() {
|
||||||
that.storeInfo.userCollect = !that.storeInfo.userCollect
|
that.storeInfo.userCollect = !that.storeInfo.userCollect
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
getCollectAdd(id, category).then(function () {
|
getCollectAdd(id, category).then(function() {
|
||||||
that.storeInfo.userCollect = !that.storeInfo.userCollect
|
that.storeInfo.userCollect = !that.storeInfo.userCollect
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 点击加入购物车按钮
|
// 点击加入购物车按钮
|
||||||
joinCart: function () {
|
joinCart: function() {
|
||||||
//0=加入购物车
|
//0=加入购物车
|
||||||
this.goCat(0)
|
this.goCat(0)
|
||||||
},
|
},
|
||||||
// 加入购物车;
|
// 加入购物车;
|
||||||
goCat: function (news) {
|
goCat: function(news) {
|
||||||
let that = this,
|
let that = this,
|
||||||
productSelect = that.productValue[this.attrValue]
|
productSelect = that.productValue[this.attrValue]
|
||||||
//打开属性
|
//打开属性
|
||||||
@ -516,7 +516,7 @@ export default {
|
|||||||
uniqueId: that.attr.productSelect !== undefined ? that.attr.productSelect.unique : '',
|
uniqueId: that.attr.productSelect !== undefined ? that.attr.productSelect.unique : '',
|
||||||
}
|
}
|
||||||
postCartAdd(q)
|
postCartAdd(q)
|
||||||
.then(function (res) {
|
.then(function(res) {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
that.isOpen = false
|
that.isOpen = false
|
||||||
that.attr.cartAttr = false
|
that.attr.cartAttr = false
|
||||||
@ -558,7 +558,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
//获取购物车数量
|
//获取购物车数量
|
||||||
getCartCount: function (isAnima) {
|
getCartCount: function(isAnima) {
|
||||||
let that = this
|
let that = this
|
||||||
const isLogin = that.isLogin
|
const isLogin = that.isLogin
|
||||||
if (isLogin) {
|
if (isLogin) {
|
||||||
@ -569,7 +569,7 @@ export default {
|
|||||||
//加入购物车后重置属性
|
//加入购物车后重置属性
|
||||||
if (isAnima) {
|
if (isAnima) {
|
||||||
that.animated = true
|
that.animated = true
|
||||||
setTimeout(function () {
|
setTimeout(function() {
|
||||||
that.animated = false
|
that.animated = false
|
||||||
}, 500)
|
}, 500)
|
||||||
}
|
}
|
||||||
@ -577,20 +577,20 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
//立即购买;
|
//立即购买;
|
||||||
tapBuy: function () {
|
tapBuy: function() {
|
||||||
// 1=直接购买
|
// 1=直接购买
|
||||||
this.goCat(1)
|
this.goCat(1)
|
||||||
},
|
},
|
||||||
listenerActionSheet: function () {
|
listenerActionSheet: function() {
|
||||||
if (isWeixin() === true) {
|
if (isWeixin() === true) {
|
||||||
this.weixinStatus = true
|
this.weixinStatus = true
|
||||||
}
|
}
|
||||||
this.posters = true
|
this.posters = true
|
||||||
},
|
},
|
||||||
listenerActionClose: function () {
|
listenerActionClose: function() {
|
||||||
this.posters = false
|
this.posters = false
|
||||||
},
|
},
|
||||||
setOpenShare: function () {
|
setOpenShare: function() {
|
||||||
var data = this.storeInfo
|
var data = this.storeInfo
|
||||||
var href = this.location.href
|
var href = this.location.href
|
||||||
if (this.$deviceType == 'weixin') {
|
if (this.$deviceType == 'weixin') {
|
||||||
|
@ -89,7 +89,6 @@ function baseRequest(options) {
|
|||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
const data = res.data || {}
|
const data = res.data || {}
|
||||||
|
|
||||||
if (res.status !== 200) {
|
if (res.status !== 200) {
|
||||||
return Promise.reject({ msg: '请求失败', res, data })
|
return Promise.reject({ msg: '请求失败', res, data })
|
||||||
}
|
}
|
||||||
@ -100,7 +99,7 @@ function baseRequest(options) {
|
|||||||
} else if (data.status === 200) {
|
} else if (data.status === 200) {
|
||||||
return Promise.resolve(data, res)
|
return Promise.resolve(data, res)
|
||||||
} else if (data.status == 5101) {
|
} else if (data.status == 5101) {
|
||||||
return Promise.resolve(data, res)
|
return Promise.reject({ msg: res.data.msg, res, data })
|
||||||
} else {
|
} else {
|
||||||
return Promise.reject({ msg: res.data.msg, res, data })
|
return Promise.reject({ msg: res.data.msg, res, data })
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user