Commit afe3a368 by 张立顺

Merge branch 'develop' of 192.168.3.233:saas_plus/business-assistant into develop

2 parents 52a55213 109d71b2
......@@ -32,5 +32,5 @@
</view>
</view>
</view>
<view wx:if="{{activityList[activityActive].productStatus != 2}}" class="btn-blue" bindtap="handleJump">点击开通</view>
<view wx:if="{{activityList[activityActive].productStatus != 2 && !merchantInfo.isSuper}}" class="btn-blue" bindtap="handleJump">点击开通</view>
</view>
\ No newline at end of file
......@@ -10,6 +10,7 @@ Page({
/**
* 页面的初始数据
*/
noPageAuth: true,
data: {
navStyle,
headerHeight: 0,
......@@ -95,14 +96,18 @@ Page({
actNum,
activeNavIdx,
apiData,
// isShare
});
let item = apiData[actNum]?.productList[activeNavIdx];
this.shareQuery = `sceneCode=${apiData[actNum].sceneCode}&productCode=${item?.productCode}&productName=${item?.productName}&category=${item?.category}`;
this.shareQuery = `sceneCode=${apiData[actNum].sceneCode}&productCode=${item?.productCode}&productName=${item?.productName}&category=${item?.category}&actNum=${actNum}&activeNavIdx=${activeNavIdx}&apiData=${apiData}`;
this.shareTrackData = {
sceneCode: apiData[actNum].sceneCode,
sceneCode: apiData[actNum]?.sceneCode,
productCode: item?.productCode,
productName: item?.productName,
category: item?.category,
actNum,
activeNavIdx,
apiData,
};
},
// 分享按钮
......@@ -143,74 +148,83 @@ Page({
}) +
98 * 2;
// // console.log("imgAllHeight: ", imgAllHeight);
// let drawFun = new Draw({
// width: 750,
// height: imgAllHeight,
// });
let drawFun = new Draw({
width: this.data.imgWidth,
height: this.data.imgHeight,
});
// let imgList = [
// {
// x: 0,
// y: 0,
// width: 750,
// height: imgAllHeight,
// url: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic${
// actNum + 1
// }.png`,
// },
// {
// x: 245 * 2,
// y: erCodeHeight + 30,
// width: 120 * 2,
// height: 120 * 2,
// url: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/discovery_prod1.png`, //二维码
// },
// ];
let _this = this;
wx.getImageInfo({
src: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic${
actNum + 1
}.png`,
success: async () => {
// // console.log("imgAllHeight: ", imgAllHeight);
// let drawFun = new Draw({
// width: 750,
// height: imgAllHeight,
// });
let drawFun = new Draw({
width: _this.data.imgWidth,
height: _this.data.imgHeight,
});
// let imgList = [
// {
// x: 0,
// y: 0,
// width: 750,
// height: imgAllHeight,
// url: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic${
// actNum + 1
// }.png`,
// },
// {
// x: 245 * 2,
// y: erCodeHeight + 30,
// width: 120 * 2,
// height: 120 * 2,
// url: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/discovery_prod1.png`, //二维码
// },
// ];
let arr = [456, 222, 0, 496];
let imgList = [
{
x: 0,
y: 0,
width: this.data.imgWidth,
height: this.data.imgHeight,
url: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic${
actNum + 1
}.png`,
},
{
// x: 245 * 2,
// y: erCodeHeight + 30,
// width: 120 * 2,
// height: 120 * 2,
x: this.data.imgWidth - 64,
y: this.data.imgHeight - arr[actNum] - 64,
width: 64,
height: 64,
url: res.data, //二维码
let arr = [456, 222, 0, 496];
let imgList = [
{
x: 0,
y: 0,
width: _this.data.imgWidth,
height: _this.data.imgHeight,
url: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic${
actNum + 1
}.png`,
},
{
// x: 245 * 2,
// y: erCodeHeight + 30,
// width: 120 * 2,
// height: 120 * 2,
x: _this.data.imgWidth - 64,
y: _this.data.imgHeight - arr[actNum] - 64,
width: 64,
height: 64,
url: res.data, //二维码
},
];
// console.log(imgList)
let posterUrl = await drawFun.begin({
imageList: imgList,
});
_this.setData({
posterUrl: posterUrl.path,
});
console.log("posterUrl.path", posterUrl.path);
if (_this.data.posterUrl) {
wx.saveImageToPhotosAlbum({
filePath: _this.data.posterUrl, //仅为示例,并非真实的资源
success(res) {
console.log("res: ", res);
wx.$api.showToast("下载成功!");
},
});
}
_this.modelcloseFn();
},
];
let posterUrl = await drawFun.begin({
imageList: imgList,
});
this.setData({
posterUrl: posterUrl.path,
});
console.log("posterUrl.path", posterUrl.path);
if (this.data.posterUrl) {
wx.pro.saveImageToPhotosAlbum({
url: this.data.posterUrl, //仅为示例,并非真实的资源
success(res) {
console.log("res: ", res);
},
});
}
this.modelcloseFn();
},
// //模态框关闭
// modelClose() {
......@@ -242,7 +256,12 @@ Page({
onLoad(options) {
// actNum,activeNavIdx isShare
// 扫码进来
let { actNum, activeNavIdx, isShare } = options;
let { actNum, activeNavIdx, isShare, merchantId } = options;
if (merchantId) {
this.setData({
isShow: false,
});
}
if (isShare) {
this.setData({
isShow: false,
......@@ -255,12 +274,14 @@ Page({
// 发请求
let senceItem = senceData[actNum];
let item = senceData[actNum]?.productList[activeNavIdx];
this.shareQuery = `sceneCode=${senceItem?.sceneCode}&productCode=${item?.productCode}&productName=${item?.productName}&category=${item?.category}`;
this.shareQuery = `sceneCode=${senceItem?.sceneCode}&productCode=${item?.productCode}&productName=${item?.productName}&category=${item?.category}&actNum=${actNum}&activeNavIdx=${activeNavIdx}`;
this.shareTrackData = {
sceneCode: senceItem.sceneCode,
sceneCode: senceItem?.sceneCode,
productCode: item?.productCode,
productName: item?.productName,
category: item?.category,
actNum,
activeNavIdx,
};
},
......
......@@ -227,7 +227,8 @@ Component({
wx.$router.go("checkProduct", {
actNum,
activeNavIdx,
apiData
apiData,
// isShare: true
});
},
},
......
......@@ -107,7 +107,8 @@ Component({
scene4: currentItem.scene4,
sceneCodeList: currentItem.sceneList.map(item => item.sceneCode),
pMerchantId: this.data.pMerchantId,
pMerchantName: this.data.pMerchantInfo.subLoginUser.merchantName
pMerchantName: this.data.pMerchantInfo.subLoginUser.merchantName,
isSuper: this.data.pMerchantInfo.isSuper
}
wx.$router.go('packageOutput.summary', params)
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!