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 @@ ...@@ -32,5 +32,5 @@
</view> </view>
</view> </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> </view>
\ No newline at end of file \ No newline at end of file
...@@ -10,6 +10,7 @@ Page({ ...@@ -10,6 +10,7 @@ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
noPageAuth: true,
data: { data: {
navStyle, navStyle,
headerHeight: 0, headerHeight: 0,
...@@ -95,14 +96,18 @@ Page({ ...@@ -95,14 +96,18 @@ Page({
actNum, actNum,
activeNavIdx, activeNavIdx,
apiData, apiData,
// isShare
}); });
let item = apiData[actNum]?.productList[activeNavIdx]; 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 = { this.shareTrackData = {
sceneCode: apiData[actNum].sceneCode, sceneCode: apiData[actNum]?.sceneCode,
productCode: item?.productCode, productCode: item?.productCode,
productName: item?.productName, productName: item?.productName,
category: item?.category, category: item?.category,
actNum,
activeNavIdx,
apiData,
}; };
}, },
// 分享按钮 // 分享按钮
...@@ -143,74 +148,83 @@ Page({ ...@@ -143,74 +148,83 @@ Page({
}) + }) +
98 * 2; 98 * 2;
// // console.log("imgAllHeight: ", imgAllHeight); let _this = this;
// let drawFun = new Draw({ wx.getImageInfo({
// width: 750, src: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic${
// height: imgAllHeight, actNum + 1
// }); }.png`,
let drawFun = new Draw({ success: async () => {
width: this.data.imgWidth, // // console.log("imgAllHeight: ", imgAllHeight);
height: this.data.imgHeight, // let drawFun = new Draw({
}); // width: 750,
// let imgList = [ // height: imgAllHeight,
// { // });
// x: 0, let drawFun = new Draw({
// y: 0, width: _this.data.imgWidth,
// width: 750, height: _this.data.imgHeight,
// height: imgAllHeight, });
// url: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic${ // let imgList = [
// actNum + 1 // {
// }.png`, // x: 0,
// }, // y: 0,
// { // width: 750,
// x: 245 * 2, // height: imgAllHeight,
// y: erCodeHeight + 30, // url: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic${
// width: 120 * 2, // actNum + 1
// height: 120 * 2, // }.png`,
// url: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/discovery_prod1.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 arr = [456, 222, 0, 496];
let imgList = [ let imgList = [
{ {
x: 0, x: 0,
y: 0, y: 0,
width: this.data.imgWidth, width: _this.data.imgWidth,
height: this.data.imgHeight, height: _this.data.imgHeight,
url: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic${ url: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic${
actNum + 1 actNum + 1
}.png`, }.png`,
}, },
{ {
// x: 245 * 2, // x: 245 * 2,
// y: erCodeHeight + 30, // y: erCodeHeight + 30,
// width: 120 * 2, // width: 120 * 2,
// height: 120 * 2, // height: 120 * 2,
x: this.data.imgWidth - 64, x: _this.data.imgWidth - 64,
y: this.data.imgHeight - arr[actNum] - 64, y: _this.data.imgHeight - arr[actNum] - 64,
width: 64, width: 64,
height: 64, height: 64,
url: res.data, //二维码 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() { // modelClose() {
...@@ -242,7 +256,12 @@ Page({ ...@@ -242,7 +256,12 @@ Page({
onLoad(options) { onLoad(options) {
// actNum,activeNavIdx isShare // actNum,activeNavIdx isShare
// 扫码进来 // 扫码进来
let { actNum, activeNavIdx, isShare } = options; let { actNum, activeNavIdx, isShare, merchantId } = options;
if (merchantId) {
this.setData({
isShow: false,
});
}
if (isShare) { if (isShare) {
this.setData({ this.setData({
isShow: false, isShow: false,
...@@ -255,12 +274,14 @@ Page({ ...@@ -255,12 +274,14 @@ Page({
// 发请求 // 发请求
let senceItem = senceData[actNum]; let senceItem = senceData[actNum];
let item = senceData[actNum]?.productList[activeNavIdx]; 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 = { this.shareTrackData = {
sceneCode: senceItem.sceneCode, sceneCode: senceItem?.sceneCode,
productCode: item?.productCode, productCode: item?.productCode,
productName: item?.productName, productName: item?.productName,
category: item?.category, category: item?.category,
actNum,
activeNavIdx,
}; };
}, },
......
...@@ -227,7 +227,8 @@ Component({ ...@@ -227,7 +227,8 @@ Component({
wx.$router.go("checkProduct", { wx.$router.go("checkProduct", {
actNum, actNum,
activeNavIdx, activeNavIdx,
apiData apiData,
// isShare: true
}); });
}, },
}, },
......
...@@ -107,7 +107,8 @@ Component({ ...@@ -107,7 +107,8 @@ Component({
scene4: currentItem.scene4, scene4: currentItem.scene4,
sceneCodeList: currentItem.sceneList.map(item => item.sceneCode), sceneCodeList: currentItem.sceneList.map(item => item.sceneCode),
pMerchantId: this.data.pMerchantId, 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) 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!