Commit d6c6a414 authored by Mac's avatar Mac

Merge branch 'master' of http://gitlab.oytour.com/viitto/mallapp

parents 8cca2479 0192353a
......@@ -23,7 +23,9 @@
<u-row gutter="20">
<u-col span="6" v-for="(cx, ci) in g" :key="ci">
<view class="good" @click="clickHandler(cx)">
<view class="sharebox" v-if="cx.ExtensionImg&&cx.ExtensionImg!=''" @click.native.stop="goshare(cx.ExtensionImg)">
<!-- <view class="sharebox" v-if="cx.ExtensionImg&&cx.ExtensionImg!=''" @click.native.stop="goshare(cx.ExtensionImg)"> -->
<view class="sharebox" v-if="cx.ExtensionImg&&cx.ExtensionImg!=''" @click.native.stop="goshare(cx.ExtensionImg,
cx.LiveQrCodePaddingTop,cx.LiveQrCodePaddingLeft,cx.LiveQrCodeSize,cx.LiveQrCodeType)">
<image src="../../static/images/share.png" mode="widthFix" class="share" />
</view>
<!-- <view class="good-img" :style="{ 'background-image': 'url(' + (cx.cover_img ? cx.cover_img : '') + ')', backgroundSize: '100% 100%' }"> -->
......@@ -170,9 +172,8 @@ export default {
}
},
methods: {
goshare(img){
console.log(img)
uni.navigateTo({url: '/pages/live/share?pic='+img});
goshare(img,top,left,size,type){
uni.navigateTo({url: '/pages/live/share?pic='+img+'&top='+top+'&left='+left+'&size='+size+'&type='+type});
},
initPage() {
let currentPages = getCurrentPages();
......
......@@ -26,7 +26,8 @@ export default {
qrCodeSize:126, //二维码宽高
qrCodeLeft:595, //二维码左边距
qrCodeTop:1200 ,//二维码上边距
halfCode:63 //二维码一半高度
halfCode:63 ,//二维码一半高度
type:0, //二维码形状(0-圆形,1-方形)
};
},
created() {
......@@ -36,25 +37,24 @@ export default {
this.UserInfo = uni.getStorageSync("mall_UserInfo")
? uni.getStorageSync("mall_UserInfo")
: {};
this.qrCodeConfig = uni.getStorageSync('basedata') ? uni.getStorageSync('basedata').liveConfig : {};
if(this.qrCodeConfig){
if(this.qrCodeConfig.LiveQrCodePaddingLeft){
this.qrCodeLeft=this.qrCodeConfig.LiveQrCodePaddingLeft;
}
if(this.qrCodeConfig.LiveQrCodePaddingTop){
this.qrCodeTop=this.qrCodeConfig.LiveQrCodePaddingTop;
}
if(this.qrCodeConfig.LiveQrCodeSize){
this.qrCodeSize=this.qrCodeConfig.LiveQrCodeSize;
this.halfCode=parseInt(this.qrCodeConfig.LiveQrCodeSize/2);
}
}
},
onLoad(option) {
this.bgPic =
option.pic ??
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1597312414000_253.jpg";
if(option.left){
this.qrCodeLeft=parseInt(option.left);
}
if(option.top){
this.qrCodeTop=parseInt(option.top);
}
if(option.size){
this.qrCodeSize=parseInt(option.size);
this.halfCode=parseInt(option.size/2);
}
if(option.type){
this.type=parseInt(option.type);
}
},
onReady() {
this.init();
......@@ -66,24 +66,11 @@ export default {
},
methods: {
init() {
// uni.showNavigationBarLoading();
// this.request2(
// {
// url: "/api/AppletUser/GetFenXiaoPoster",
// data: {},
// },
// (res) => {
// uni.hideNavigationBarLoading();
// this.qrcode = res.data;
// this.getWeiXinQRCode();
// }
// );
this.getWeiXinQRCode();
},
getWeiXinQRCode() {
let that = this;
uni.showNavigationBarLoading();
console.log(that.UserInfo,'that.UserInfo')
let SmallShopId = that.UserInfo.SmallShopId?that.UserInfo.SmallShopId:0;
if(SmallShopId==0){
SmallShopId = that.UserInfo.UserSmallShopId?that.UserInfo.UserSmallShopId:0;
......@@ -126,6 +113,7 @@ export default {
ctx.save();
ctx.beginPath();
// ctx.arc(595 + 63, 1200 + 63, 63, 0, Math.PI * 2);
ctx.arc(that.qrCodeLeft + that.halfCode, that.qrCodeTop + that.halfCode, that.halfCode, 0, Math.PI * 2);
ctx.setFillStyle("#ffffff");
ctx.fill();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment