|
@@ -247,6 +247,9 @@
|
|
|
</view>
|
|
|
</view> -->
|
|
|
</view>
|
|
|
+ <shareRedPackets :sharePacket="sharePacket" @listenerActionSheet="listenerActionSheet"
|
|
|
+ @closeChange="closeChange" :showAnimate="showAnimate" @boxStatus="boxStatus">
|
|
|
+ </shareRedPackets>
|
|
|
<!-- 组件 -->
|
|
|
<productWindow v-if="attr.cartAttr" :attr="attr" :isShow="1" :iSplus="1" @myevent="onMyEvent"
|
|
|
@ChangeAttr="ChangeAttr" @ChangeCartNum="ChangeCartNum" @attrVal="attrVal" @iptCartNum="iptCartNum"
|
|
@@ -259,6 +262,42 @@
|
|
|
@tabCouponType="tabCouponType">
|
|
|
</couponListWindow>
|
|
|
<!-- 分享按钮 -->
|
|
|
+ <view class="generate-posters acea-row row-middle" :class="posters ? 'on' : ''">
|
|
|
+ <!-- #ifndef MP -->
|
|
|
+ <button class="item" hover-class="none" v-if="weixinStatus === true" @click="H5ShareBox = true">
|
|
|
+ <view class="iconfont icon-weixin3"></view>
|
|
|
+ <view class="">{{$t(`发送给朋友`)}}</view>
|
|
|
+ </button>
|
|
|
+ <!-- #endif -->
|
|
|
+ <!-- #ifdef MP -->
|
|
|
+ <button class="item" open-type="share" hover-class="none" @click="goFriend">
|
|
|
+ <view class="iconfont icon-weixin3"></view>
|
|
|
+ <view class="">{{$t(`发送给朋友`)}}</view>
|
|
|
+ </button>
|
|
|
+ <!-- #endif -->
|
|
|
+ <!-- #ifdef H5 -->
|
|
|
+ <div class="item copy-data" v-if="storeInfo.command_word != ''"
|
|
|
+ :data-clipboard-text="storeInfo.command_word">
|
|
|
+ <view class="iconfont icon-fuzhikouling"></view>
|
|
|
+ <text>{{$t(`复制口令`)}}</text>
|
|
|
+ </div>
|
|
|
+ <!-- #endif -->
|
|
|
+ <!-- #ifdef APP-PLUS -->
|
|
|
+ <view class="item" @click="appShare('WXSceneSession')">
|
|
|
+ <view class="iconfont icon-weixin3"></view>
|
|
|
+ <view class="">{{$t(`微信好友`)}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="item" @click="appShare('WXSenceTimeline')">
|
|
|
+ <view class="iconfont icon-pengyouquan"></view>
|
|
|
+ <view class="">{{$t(`微信朋友圈`)}}</view>
|
|
|
+ </view>
|
|
|
+ <!-- #endif -->
|
|
|
+ <button class="item" hover-class="none" @click="goPoster">
|
|
|
+ <view class="iconfont icon-haibao"></view>
|
|
|
+ <view class="">{{$t(`生成海报`)}}</view>
|
|
|
+ </button>
|
|
|
+ </view>
|
|
|
+ <!-- 分享按钮 -->
|
|
|
<view class="mask" v-if="posters" @click="listenerActionClose"></view>
|
|
|
<!-- #ifdef MP -->
|
|
|
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
|
@@ -324,7 +363,7 @@ import productConSwiper from "@/components/productConSwiper";
|
|
|
import couponListWindow from "@/components/couponListWindow";
|
|
|
import productWindow from "@/components/productWindow";
|
|
|
import userEvaluation from "@/components/userEvaluation";
|
|
|
-// import shareRedPackets from "@/components/shareRedPackets";
|
|
|
+import shareRedPackets from "@/components/shareRedPackets";
|
|
|
import kefuIcon from "@/components/kefuIcon";
|
|
|
import {
|
|
|
silenceBindingSpread,
|
|
@@ -353,7 +392,7 @@ export default {
|
|
|
couponListWindow,
|
|
|
productWindow,
|
|
|
userEvaluation,
|
|
|
- // shareRedPackets,
|
|
|
+ shareRedPackets,
|
|
|
kefuIcon,
|
|
|
cusPreviewImg,
|
|
|
// #ifdef MP
|
|
@@ -410,8 +449,9 @@ export default {
|
|
|
PromotionCode: "", //二维码图片
|
|
|
canvasStatus: false, //海报绘图标签
|
|
|
posterImage: "", //海报路径
|
|
|
+ posterbackgd: "/static/images/posterbackgd.png",
|
|
|
sharePacket: {
|
|
|
- isState: true, //默认不显示
|
|
|
+ isState: false, //默认不显示
|
|
|
}, //分销商详细
|
|
|
circular: false,
|
|
|
autoplay: false,
|
|
@@ -463,10 +503,10 @@ export default {
|
|
|
skuArr: [],
|
|
|
selectSku: {},
|
|
|
currentPage: false,
|
|
|
- svip_price_open: 1
|
|
|
+ svip_price_open: 1,
|
|
|
};
|
|
|
},
|
|
|
- computed: mapGetters(["isLogin", "uid", "userInfo","selectAddr"]),
|
|
|
+ computed: mapGetters(["isLogin", "uid", "userInfo", "selectAddr"]),
|
|
|
watch: {
|
|
|
isLogin: {
|
|
|
handler: function (newV, oldV) {
|
|
@@ -504,73 +544,74 @@ export default {
|
|
|
});
|
|
|
setTimeout(() => {
|
|
|
// 未登录跳转登录
|
|
|
- uni.reLaunch({
|
|
|
+ uni.navigateTo({
|
|
|
url: '/pages/users/wechat_login/index'
|
|
|
})
|
|
|
}, 1500);
|
|
|
- }
|
|
|
- let userInfo = this.$Cache.get("USER_INFO", true)
|
|
|
- console.log("用户自己的推荐码:" + userInfo.code);
|
|
|
- console.log("受邀的推荐码:" + options.inviteCode);
|
|
|
- //1580 进入时
|
|
|
- if (options.zoneType == 8) {
|
|
|
- //判断是否为自己的要求码进入
|
|
|
- if (options.inviteCode !== userInfo.code) {
|
|
|
- if (options.inviteCode != "undefined") {
|
|
|
- this.$Cache.set('INVITE_CODE', options.inviteCode);
|
|
|
+ } else {
|
|
|
+ let userInfo = this.$Cache.get("USER_INFO", true)
|
|
|
+ console.log("用户自己的推荐码:" + userInfo.code);
|
|
|
+ console.log("受邀的推荐码:" + options.inviteCode);
|
|
|
+ //1580 进入时
|
|
|
+ if (options.zoneType == 8) {
|
|
|
+ //判断是否为自己的要求码进入
|
|
|
+ if (options.inviteCode !== userInfo.code) {
|
|
|
+ if (options.inviteCode != "undefined") {
|
|
|
+ this.$Cache.set('INVITE_CODE', options.inviteCode);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- let that = this;
|
|
|
- var pages = getCurrentPages();
|
|
|
- that.returnShow = pages.length === 1 ? false : true;
|
|
|
- // #ifdef MP
|
|
|
- that.navH = app.globalData.navHeight;
|
|
|
- // #endif
|
|
|
- // #ifdef H5
|
|
|
- that.navH = 96;
|
|
|
- // #endif
|
|
|
- // #ifdef APP-PLUS
|
|
|
- that.navH = 30;
|
|
|
- // #endif
|
|
|
- that.id = options.id;
|
|
|
- uni.getSystemInfo({
|
|
|
- success: function (res) {
|
|
|
- that.height = res.windowHeight;
|
|
|
- //res.windowHeight:获取整个窗口高度为px,*2为rpx;98为头部占据的高度;
|
|
|
- // #ifndef APP-PLUS || H5 || MP-ALIPAY
|
|
|
- that.navbarRight =
|
|
|
- res.windowWidth - uni.getMenuButtonBoundingClientRect().left;
|
|
|
- // #endif
|
|
|
- },
|
|
|
- });
|
|
|
- //扫码携带参数处理
|
|
|
- // #ifdef MP
|
|
|
- if (options.scene) {
|
|
|
- let value = that.$util.getUrlParams(decodeURIComponent(options.scene));
|
|
|
- if (value.id) options.id = value.id;
|
|
|
- //记录推广人uid
|
|
|
- if (value.pid) app.globalData.spid = value.pid;
|
|
|
- }
|
|
|
- if (!options.id) {
|
|
|
- this.showSkeleton = false;
|
|
|
- return that.$util.Tips({
|
|
|
- title: that.$t(`缺少参数无法查看商品`),
|
|
|
- }, {
|
|
|
- tab: 3,
|
|
|
- url: 1,
|
|
|
- });
|
|
|
- } else {
|
|
|
+ let that = this;
|
|
|
+ var pages = getCurrentPages();
|
|
|
+ that.returnShow = pages.length === 1 ? false : true;
|
|
|
+ // #ifdef MP
|
|
|
+ that.navH = app.globalData.navHeight;
|
|
|
+ // #endif
|
|
|
+ // #ifdef H5
|
|
|
+ that.navH = 96;
|
|
|
+ // #endif
|
|
|
+ // #ifdef APP-PLUS
|
|
|
+ that.navH = 30;
|
|
|
+ // #endif
|
|
|
that.id = options.id;
|
|
|
+ uni.getSystemInfo({
|
|
|
+ success: function (res) {
|
|
|
+ that.height = res.windowHeight;
|
|
|
+ //res.windowHeight:获取整个窗口高度为px,*2为rpx;98为头部占据的高度;
|
|
|
+ // #ifndef APP-PLUS || H5 || MP-ALIPAY
|
|
|
+ that.navbarRight =
|
|
|
+ res.windowWidth - uni.getMenuButtonBoundingClientRect().left;
|
|
|
+ // #endif
|
|
|
+ },
|
|
|
+ });
|
|
|
+ //扫码携带参数处理
|
|
|
+ // #ifdef MP
|
|
|
+ if (options.scene) {
|
|
|
+ let value = that.$util.getUrlParams(decodeURIComponent(options.scene));
|
|
|
+ if (value.id) options.id = value.id;
|
|
|
+ //记录推广人uid
|
|
|
+ if (value.pid) app.globalData.spid = value.pid;
|
|
|
+ }
|
|
|
+ if (!options.id) {
|
|
|
+ this.showSkeleton = false;
|
|
|
+ return that.$util.Tips({
|
|
|
+ title: that.$t(`缺少参数无法查看商品`),
|
|
|
+ }, {
|
|
|
+ tab: 3,
|
|
|
+ url: 1,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ that.id = options.id;
|
|
|
+ }
|
|
|
+ //记录推广人uid
|
|
|
+ if (options.spid) app.globalData.spid = options.spid;
|
|
|
+ // #endif
|
|
|
+ that.getGoodsDetails();
|
|
|
+ // that.getCouponList(0);
|
|
|
+ //#ifdef H5
|
|
|
+ that.isLogin && silenceBindingSpread();
|
|
|
+ //#endif
|
|
|
}
|
|
|
- //记录推广人uid
|
|
|
- if (options.spid) app.globalData.spid = options.spid;
|
|
|
- // #endif
|
|
|
- that.getGoodsDetails();
|
|
|
- // that.getCouponList(0);
|
|
|
- //#ifdef H5
|
|
|
- that.isLogin && silenceBindingSpread();
|
|
|
- //#endif
|
|
|
},
|
|
|
onReady: function () {
|
|
|
this.isNodes++;
|
|
@@ -614,7 +655,7 @@ export default {
|
|
|
return {
|
|
|
title: that.storeInfo.store_name || "",
|
|
|
imageUrl: that.storeInfo.image || "",
|
|
|
- path: "/pages/goods_details/index?id=" + that.id + "&spid=" + that.uid,
|
|
|
+ path: "/pages/goods_details/index?id=" + that.id + "&inviteCode=" + that.$Cache.get("USER_INFO", true).code,
|
|
|
};
|
|
|
},
|
|
|
|
|
@@ -906,9 +947,14 @@ export default {
|
|
|
.then((res) => {
|
|
|
let storeInfo = res.data;
|
|
|
that.storeInfo = res.data
|
|
|
+ // 处理分享
|
|
|
+ if (that.storeInfo.zoneType == 8) {
|
|
|
+ that.sharePacket.isState = true
|
|
|
+ }
|
|
|
that.skuArr = storeInfo.goodsSpecList
|
|
|
that.$set(that, "storeInfo", storeInfo);
|
|
|
that.$set(that.attr, "productAttr", storeInfo.goodsSpecList);
|
|
|
+ that.downloadFilestoreImage();
|
|
|
that.getUserAddressByUserId()
|
|
|
setTimeout(function () {
|
|
|
that.infoScroll();
|
|
@@ -1003,6 +1049,10 @@ export default {
|
|
|
if (value.canSale) {
|
|
|
this.attrValue = value.spceName
|
|
|
this.storeInfo.obtainIntegral = value.obtainIntegral - 0
|
|
|
+ // 处理分享
|
|
|
+ if (this.storeInfo.zoneType == 8) {
|
|
|
+ this.sharePacket.priceName = this.storeInfo.obtainIntegral
|
|
|
+ }
|
|
|
this.storeInfo.salePrice = value.salePrice - 0
|
|
|
this.attr.productSelect.totalStock = value.stock - 0
|
|
|
this.attr.attrValueId = value.id
|
|
@@ -1163,9 +1213,9 @@ export default {
|
|
|
toLogin();
|
|
|
} else {
|
|
|
//判断是否有地址
|
|
|
- if(!this.attrAddrValue && !this.attrAddrValue.id){
|
|
|
+ if (!this.attrAddrValue && !this.attrAddrValue.id) {
|
|
|
this.goCat();
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.$util.Tips({
|
|
|
title: this.$t(`请先至个人中心设置默认地址`),
|
|
|
});
|
|
@@ -1277,9 +1327,9 @@ export default {
|
|
|
toLogin();
|
|
|
} else {
|
|
|
//判断是否有地址
|
|
|
- if(this.attrAddrValue && this.attrAddrValue.id){
|
|
|
+ if (this.attrAddrValue && this.attrAddrValue.id) {
|
|
|
this.goCat(true);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.$util.Tips({
|
|
|
title: this.$t(`请先配置送至地址`),
|
|
|
});
|
|
@@ -1320,8 +1370,8 @@ export default {
|
|
|
|
|
|
}
|
|
|
// #endif
|
|
|
-
|
|
|
- this.posters = true;
|
|
|
+ // this.goPoster()
|
|
|
+ // this.posters = true;
|
|
|
}
|
|
|
},
|
|
|
// 分享关闭
|