|
@@ -1,8 +1,7 @@
|
|
|
<template>
|
|
|
<view class="poster-img-content">
|
|
|
<image v-if="enable==1" @click="canvasGet" src="https://hzstatic.hzinsights.com/yb_xcx/download-img.png" class="download-img">
|
|
|
- <image @click="detailGo" src="https://hzstatic.hzinsights.com/static/icon/hzyb/default_avatar.png" class="download-img download-img-two">
|
|
|
- <image v-if="imgBg" mode="widthFix" :src="imgBg"></image>
|
|
|
+ <image v-if="imgBg" :show-menu-by-longpress="enable != 1 ? true : false" mode="widthFix" :src="imgBg"></image>
|
|
|
<view class="code">
|
|
|
<image v-if="imgBg" show-menu-by-longpress mode="widthFix" :src="qrcodeImg"></image>
|
|
|
</view>
|
|
@@ -41,6 +40,8 @@ export default {
|
|
|
this.title = op.title;
|
|
|
this.bannerId = op.id;
|
|
|
this.enable = op.enable;
|
|
|
+ console.log(this.imgBg, this.title);
|
|
|
+
|
|
|
this.enable == 1 && this.getQrcCode();
|
|
|
uni.setNavigationBarTitle({
|
|
|
title: this.title,
|
|
@@ -51,7 +52,7 @@ export default {
|
|
|
title: this.title,
|
|
|
path:
|
|
|
"/pages-report/disseminatePage/disseminatePage?imgHb=" +
|
|
|
- this.imgBg +
|
|
|
+ encodeURIComponent(this.imgBg) +
|
|
|
"&title=" +
|
|
|
this.title +
|
|
|
"&id=" +
|
|
@@ -59,7 +60,7 @@ export default {
|
|
|
"&InviteShareCode=" +
|
|
|
this.userInfo.user_id +
|
|
|
"&enable=" +
|
|
|
- item.enable,
|
|
|
+ this.enable,
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -83,6 +84,11 @@ export default {
|
|
|
drawImg(path) {
|
|
|
let ctx = uni.createCanvasContext("canvasDom", this);
|
|
|
ctx.drawImage(path, 0, 0, this.canvasW, this.canvasH);
|
|
|
+ if (this.$store.state.user.userInfo.is_bind === 0) {
|
|
|
+ ctx.draw();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
wx.getImageInfo({
|
|
|
src: this.qrcodeImg,
|
|
|
success: (res) => {
|
|
@@ -101,18 +107,6 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
- // 上线前删除
|
|
|
- detailGo() {
|
|
|
- const title = encodeURIComponent("迪拜&阿布扎比");
|
|
|
-
|
|
|
- uni.navigateTo({
|
|
|
- url:
|
|
|
- "/pages-report/signUpPage/signUpPage?RealName=席子文&CompanyName=杭州大式数字科技有限公司&Mobile=15906624664&BannerId=4&Title=" +
|
|
|
- title,
|
|
|
- });
|
|
|
-
|
|
|
- return;
|
|
|
- },
|
|
|
// 保存二维码到本地
|
|
|
canvasGet() {
|
|
|
uni.canvasToTempFilePath({
|
|
@@ -177,7 +171,7 @@ export default {
|
|
|
// 获取code 二维码
|
|
|
async getQrcCode() {
|
|
|
const res = await bannerGetQrcode({
|
|
|
- UserId: this.userInfo.user_id,
|
|
|
+ UserId: this.$store.state.report.inviteShareCode || this.userInfo.user_id,
|
|
|
BannerId: this.bannerId,
|
|
|
Remark: this.title,
|
|
|
});
|