|
|
@ -6,8 +6,15 @@ |
|
|
|
<view class="money font-color-red"> |
|
|
|
<view class="money font-color-red"> |
|
|
|
<text>¥</text> |
|
|
|
<text>¥</text> |
|
|
|
<text class="num">{{ storeInfo.price }}</text> |
|
|
|
<text class="num">{{ storeInfo.price }}</text> |
|
|
|
<text class="vip-money" v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0">¥{{ storeInfo.vipPrice }}</text> |
|
|
|
<text |
|
|
|
<image src="@/static/images/vip.png" class="image" v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0" /> |
|
|
|
class="vip-money" |
|
|
|
|
|
|
|
v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0" |
|
|
|
|
|
|
|
>¥{{ storeInfo.vipPrice }}</text> |
|
|
|
|
|
|
|
<image |
|
|
|
|
|
|
|
src="@/static/images/vip.png" |
|
|
|
|
|
|
|
class="image" |
|
|
|
|
|
|
|
v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0" |
|
|
|
|
|
|
|
/> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="iconfont icon-fenxiang" @click="listenerActionSheet"></view> |
|
|
|
<view class="iconfont icon-fenxiang" @click="listenerActionSheet"></view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -20,7 +27,11 @@ |
|
|
|
<view class="coupon acea-row row-between-wrapper" @click="couponTap" v-if="couponList.length"> |
|
|
|
<view class="coupon acea-row row-between-wrapper" @click="couponTap" v-if="couponList.length"> |
|
|
|
<text class="hide line1 acea-row"> |
|
|
|
<text class="hide line1 acea-row"> |
|
|
|
<text>优惠券:</text> |
|
|
|
<text>优惠券:</text> |
|
|
|
<text class="activity" v-for="(item, couponListEq) in couponList" :key="couponListEq">满{{ item.use_min_price }}减{{ item.coupon_price }}</text> |
|
|
|
<text |
|
|
|
|
|
|
|
class="activity" |
|
|
|
|
|
|
|
v-for="(item, couponListEq) in couponList" |
|
|
|
|
|
|
|
:key="couponListEq" |
|
|
|
|
|
|
|
>满{{ item.use_min_price }}减{{ item.coupon_price }}</text> |
|
|
|
</text> |
|
|
|
</text> |
|
|
|
<view class="iconfont icon-jiantou"></view> |
|
|
|
<view class="iconfont icon-jiantou"></view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -99,7 +110,11 @@ |
|
|
|
<view class="iconfont" :class="storeInfo.userCollect ? 'icon-shoucang1' : 'icon-shoucang'"></view> |
|
|
|
<view class="iconfont" :class="storeInfo.userCollect ? 'icon-shoucang1' : 'icon-shoucang'"></view> |
|
|
|
<text>收藏</text> |
|
|
|
<text>收藏</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view @click="goShoppingCart()" class="item animated" :class="animated === true ? 'bounceIn' : ''"> |
|
|
|
<view |
|
|
|
|
|
|
|
@click="goShoppingCart()" |
|
|
|
|
|
|
|
class="item animated" |
|
|
|
|
|
|
|
:class="animated === true ? 'bounceIn' : ''" |
|
|
|
|
|
|
|
> |
|
|
|
<view class="iconfont icon-gouwuche1"> |
|
|
|
<view class="iconfont icon-gouwuche1"> |
|
|
|
<text class="num bg-color-red" v-if="CartCount > 0">{{CartCount}}</text> |
|
|
|
<text class="num bg-color-red" v-if="CartCount > 0">{{CartCount}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -116,7 +131,11 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<CouponPop v-on:changeFun="changeFun" :coupon="coupon"></CouponPop> |
|
|
|
<CouponPop v-on:changeFun="changeFun" :coupon="coupon"></CouponPop> |
|
|
|
<ProductWindow v-on:changeFun="changeFun" :attr="attr" :cartNum="cart_num"></ProductWindow> |
|
|
|
<ProductWindow v-on:changeFun="changeFun" :attr="attr" :cartNum="cart_num"></ProductWindow> |
|
|
|
<StorePoster v-on:setPosterImageStatus="setPosterImageStatus" :posterImageStatus="posterImageStatus" :posterData="posterData"></StorePoster> |
|
|
|
<StorePoster |
|
|
|
|
|
|
|
v-on:setPosterImageStatus="setPosterImageStatus" |
|
|
|
|
|
|
|
:posterImageStatus="posterImageStatus" |
|
|
|
|
|
|
|
:posterData="posterData" |
|
|
|
|
|
|
|
></StorePoster> |
|
|
|
<ShareInfo v-on:setShareInfoStatus="setShareInfoStatus" :shareInfoStatus="shareInfoStatus"></ShareInfo> |
|
|
|
<ShareInfo v-on:setShareInfoStatus="setShareInfoStatus" :shareInfoStatus="shareInfoStatus"></ShareInfo> |
|
|
|
<view class="generate-posters acea-row row-middle" :class="posters ? 'on' : ''"> |
|
|
|
<view class="generate-posters acea-row row-middle" :class="posters ? 'on' : ''"> |
|
|
|
<view class="item" v-if="weixinStatus === true" @click="setShareInfoStatus"> |
|
|
|
<view class="item" v-if="weixinStatus === true" @click="setShareInfoStatus"> |
|
|
@ -130,7 +149,13 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="mask" @touchmove.prevent @click="listenerActionClose" v-show="posters"></view> |
|
|
|
<view class="mask" @touchmove.prevent @click="listenerActionClose" v-show="posters"></view> |
|
|
|
<view class="geoPage" v-if="mapShow"> |
|
|
|
<view class="geoPage" v-if="mapShow"> |
|
|
|
<iframe width="100%" height="100%" frameborder="0" scrolling="no" :src="'https://apis.map.qq.com/uri/v1/geocoder?coord=' +system_store.latitude +',' +system_store.longitude +'&referer=' +mapKey"></iframe> |
|
|
|
<iframe |
|
|
|
|
|
|
|
width="100%" |
|
|
|
|
|
|
|
height="100%" |
|
|
|
|
|
|
|
frameborder="0" |
|
|
|
|
|
|
|
scrolling="no" |
|
|
|
|
|
|
|
:src="'https://apis.map.qq.com/uri/v1/geocoder?coord=' +system_store.latitude +',' +system_store.longitude +'&referer=' +mapKey" |
|
|
|
|
|
|
|
></iframe> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
</template> |
|
|
@ -156,18 +181,10 @@ |
|
|
|
getCollectDel, |
|
|
|
getCollectDel, |
|
|
|
getUserInfo |
|
|
|
getUserInfo |
|
|
|
} from "@/api/user"; |
|
|
|
} from "@/api/user"; |
|
|
|
import { |
|
|
|
import { isWeixin, PosterCanvas, handleQrCode } from "@/utils"; |
|
|
|
isWeixin, |
|
|
|
|
|
|
|
PosterCanvas, |
|
|
|
|
|
|
|
handleQrCode |
|
|
|
|
|
|
|
} from "@/utils"; |
|
|
|
|
|
|
|
// import { wechatEvevt } from "@/libs/wechat"; |
|
|
|
// import { wechatEvevt } from "@/libs/wechat"; |
|
|
|
import { |
|
|
|
import { imageBase64 } from "@/api/public"; |
|
|
|
imageBase64 |
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
} from "@/api/public"; |
|
|
|
|
|
|
|
import { |
|
|
|
|
|
|
|
mapGetters |
|
|
|
|
|
|
|
} from "vuex"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
name: "GoodsCon", |
|
|
|
name: "GoodsCon", |
|
|
@ -237,7 +254,7 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: mapGetters(["isLogin"]), |
|
|
|
computed: mapGetters(["isLogin"]), |
|
|
|
mounted: function() { |
|
|
|
mounted: function() { |
|
|
|
console.log(this) |
|
|
|
console.log(this); |
|
|
|
let url = handleQrCode(); |
|
|
|
let url = handleQrCode(); |
|
|
|
console.log(url); |
|
|
|
console.log(url); |
|
|
|
if (url && url.productId) { |
|
|
|
if (url && url.productId) { |
|
|
@ -305,11 +322,11 @@ |
|
|
|
//产品详情接口; |
|
|
|
//产品详情接口; |
|
|
|
productCon: function() { |
|
|
|
productCon: function() { |
|
|
|
let that = this; |
|
|
|
let that = this; |
|
|
|
let form = {} |
|
|
|
let form = {}; |
|
|
|
if (this.$deviceType == 'app') { |
|
|
|
if (this.$deviceType == "app") { |
|
|
|
form.form = 'app' |
|
|
|
form.form = "app"; |
|
|
|
} |
|
|
|
} |
|
|
|
console.log(form, 2222) |
|
|
|
console.log(form, 2222); |
|
|
|
getProductDetail(that.id, form) |
|
|
|
getProductDetail(that.id, form) |
|
|
|
.then(res => { |
|
|
|
.then(res => { |
|
|
|
that.$set(that, "storeInfo", res.data.storeInfo); |
|
|
|
that.$set(that, "storeInfo", res.data.storeInfo); |
|
|
@ -485,27 +502,15 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
//选择属性; |
|
|
|
//选择属性; |
|
|
|
ChangeAttr: function(res) { |
|
|
|
ChangeAttr: function(res) { |
|
|
|
let productSelectValue = this.productValue[res]; |
|
|
|
let productSelect = this.productValue[res.value]; |
|
|
|
if (productSelectValue) { |
|
|
|
if (productSelect) { |
|
|
|
let productSelect = { |
|
|
|
this.attr.productAttr[res.indexw].index = res.indexn; |
|
|
|
...this.attr.productSelect, |
|
|
|
this.$set(this.attr.productSelect, "image", productSelect.image); |
|
|
|
image: productSelectValue.image, |
|
|
|
this.$set(this.attr.productSelect, "price", productSelect.price); |
|
|
|
price: productSelectValue.price, |
|
|
|
this.$set(this.attr.productSelect, "stock", productSelect.stock); |
|
|
|
stock: productSelectValue.stock, |
|
|
|
this.$set(this.attr.productSelect, "unique", productSelect.unique); |
|
|
|
unique: productSelectValue.unique, |
|
|
|
this.$set(this.attr.productSelect, "cart_num", 1); |
|
|
|
cart_num: 1 |
|
|
|
this.$set(this, "attrValue", res.value); |
|
|
|
}; |
|
|
|
|
|
|
|
let attr = { |
|
|
|
|
|
|
|
...this.attr, |
|
|
|
|
|
|
|
productSelect |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
this.attr = attr; |
|
|
|
|
|
|
|
// 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, "unique", productSelect.unique); |
|
|
|
|
|
|
|
// this.$set(this.attr.productSelect, "cart_num", 1); |
|
|
|
|
|
|
|
this.$set(this, "attrValue", res); |
|
|
|
|
|
|
|
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); |
|
|
@ -569,8 +574,10 @@ |
|
|
|
productId: that.id, |
|
|
|
productId: that.id, |
|
|
|
cartNum: that.attr.productSelect.cart_num, |
|
|
|
cartNum: that.attr.productSelect.cart_num, |
|
|
|
new: news, |
|
|
|
new: news, |
|
|
|
uniqueId: that.attr.productSelect !== undefined ? |
|
|
|
uniqueId: |
|
|
|
that.attr.productSelect.unique : "" |
|
|
|
that.attr.productSelect !== undefined |
|
|
|
|
|
|
|
? that.attr.productSelect.unique |
|
|
|
|
|
|
|
: "" |
|
|
|
}; |
|
|
|
}; |
|
|
|
postCartAdd(q) |
|
|
|
postCartAdd(q) |
|
|
|
.then(function(res) { |
|
|
|
.then(function(res) { |
|
|
|