Commit bcc825c7 by 前端

Merge branch 'fix_v2.10.3' into 'master'

Fix v2.10.3

See merge request !4
2 parents fe950f7e a2c48ff8
Showing 37 changed files with 298 additions and 79 deletions
......@@ -9,7 +9,9 @@ import {
import {trackData} from './utils/data'
App({
onLaunch: function (options) {
console.log(options)
/**挂载到wx对象 */
this.autoUpdate()
wx.$util = util
wx.$router = router
wx.$imgUrl = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/'
......@@ -41,16 +43,37 @@ App({
util.setSessionId(res.data.sessionId)
openId = res.data.openId
util.setStorageSync('openId', openId)
console.log(wx.$trackData)
if (wx.$trackData.scene) {
// 初次进入小程序默认埋首页
_this.getScene(wx.$trackData.scene).then(res => {
wx.$trackData.merchant = res.merchantId
wx.$trackData.cardId = res.cardId
console.log('wx.$trackData.cardId', wx.$trackData.cardId)
util.setStorageSync('scene', res)
const systemInfo = JSON.parse(wx.getStorageSync('aicard_system_info'))
wx.$trackData.type = systemInfo.environment ? 2 : 1
wx.$Track.sendTrack(trackData.COMPANY, openId)
})
}
} else if(wx.$trackData.detailShare) {
// d+产品分享在这里设置埋点
const detailShare = wx.$trackData.detailShare
console.log(1211)
for(let i in trackData) {
console.log(i)
if (trackData[i].pageName == detailShare) {
console.log(trackData[i])
wx.$Track.sendTrack(trackData[i], openId)
break
}
}
} else if (!wx.$trackData.detailShare && wx.$trackData.cardId) {
// 名片分享在这里设置埋点
util.setStorageSync('scene', wx.$trackData)
const systemInfo = JSON.parse(wx.getStorageSync('aicard_system_info'))
wx.$trackData.type = systemInfo.environment ? 2 : 1
wx.$Track.sendTrack(trackData.COMPANY, openId)
}
ssoApi.getUserInfo({
openId
}).then(result => {
......@@ -88,6 +111,68 @@ App({
})
})
},
/**
* 下载小程序新版本并重启应用
*/
autoUpdate: function () {
// console.log(new Date())
const self = this
// 获取小程序更新机制兼容
if (wx.canIUse('getUpdateManager')) {
const updateManager = wx.getUpdateManager()
//1. 检查小程序是否有新版本发布
updateManager.onCheckForUpdate(function (res) {
// 请求完新版本信息的回调
if (res.hasUpdate) {
//2. 小程序有新版本,则静默下载新版本,做好更新准备
updateManager.onUpdateReady(function () {
console.log(new Date())
wx.showModal({
title: '更新提示',
content: '新版本已经准备好,是否重启应用?',
success: function (res) {
if (res.confirm) {
//3. 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager.applyUpdate()
} else if (res.cancel) {
//如果需要强制更新,则给出二次弹窗,如果不需要,则这里的代码都可以删掉了
// wx.showModal({
// title: '温馨提示~',
// content: '本次版本更新涉及到新的功能添加,旧版本无法正常访问的哦~',
// success: function (res) {
// self.autoUpdate()
// return;
// //第二次提示后,强制更新
// if (res.confirm) {
// // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
// updateManager.applyUpdate()
// } else if (res.cancel) {
// //重新回到版本更新提示
// self.autoUpdate()
// }
// }
// })
}
}
})
})
updateManager.onUpdateFailed(function () {
// 新的版本下载失败
wx.showModal({
title: '已经有新版本了哟~',
content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~'
})
})
}
})
} else {
// 如果希望用户在最新版本的客户端上体验您的小程序,可以这样子提示
wx.showModal({
title: '提示',
content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
})
}
},
globalData: {
}
})
\ No newline at end of file
......@@ -15,6 +15,15 @@ Component({
});
},
},
shareDisabled: {
type: Boolean,
defalut: true,
observer(n) {
this.setData({
shareDisabled: n
})
}
}
},
/**
......@@ -22,6 +31,7 @@ Component({
*/
data: {
showWechant: false,
// shareDisabled: true
},
/**
......@@ -88,5 +98,14 @@ Component({
phoneNumber: staffPhone,
});
},
shareClick() {
if (this.data.shareDisabled) {
wx.showToast({
title: '正在生成名片缩略图,请稍后分享',
icon: 'none',
duration: 2000
})
}
}
},
});
......@@ -34,7 +34,8 @@
<view class="phone-text">拨打电话</view>
</view>
<button class="btn-plain btn" bindtap="addPhone">保存名片</button>
<button class="btn-primary btn" open-type="share">分享名片</button>
<button wx:if="{{shareDisabled}}" class="btn-primary btn" bindtap="shareClick">分享名片</button>
<button wx:else class="btn-primary btn" open-type="share">分享名片</button>
</view>
</view>
<authorize buttonType="openSetting" show="{{showAuth}}" isShowCheck="{{false}}"></authorize>
\ No newline at end of file
......@@ -19,7 +19,7 @@ module.exports = Behavior({
// title: '敬请期待',
// icon: 'none'
// })
// wx.$Track.sendTrack(trackData.DIJIA)
wx.$Track.sendTrack(trackData.DIJIA)
break
default:
this.setData({
......
......@@ -29,14 +29,14 @@ Page({
},
formData: {
sales: 100,
flow: 100,
flow: 10000,
},
productList: [],
isReset: false,
hasPhoneNumber: false,
lastFormData: {
sales: 100,
flow: 100,
flow: 10000,
},
isFirst: true
},
......@@ -161,7 +161,7 @@ Page({
isReset: false,
formData: {
sales: 100,
flow: 100,
flow: 10000,
},
});
},
......
// pages/productDetail/ambientLighting/ambientLighting.js
import { trackData } from "../../../utils/data";
import util from '../../../utils/util'
Page({
/**
......@@ -27,7 +28,17 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
wx.$Track.sendTrack(trackData.LIGHT)
const options = wx.getEnterOptionsSync()
if (options.query.cardId) {
wx.$trackData = options.query
}
getApp()
.login()
.then(({ data }) => {
if (!wx.$trackData.detailShare) {
wx.$Track.sendTrack(trackData.LIGHT)
}
});
},
/**
......@@ -64,7 +75,7 @@ Page({
onShareAppMessage() {
return {
title: trackData.LIGHT.pageName,
path: 'pages/productDetail/ambientLighting/ambientLighting?cardId=' + util.getStorageSync('scene').cardId
path: 'pages/productDetail/ambientLighting/ambientLighting?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+util.getStorageSync("scene").merchantId+'&detailShare=' +trackData.LIGHT.pageName
}
}
})
\ No newline at end of file
......@@ -24,8 +24,6 @@
<video poster="{{IMGURL}}video/light_bitmap.png?v={{img_version}}" title="单品类氛围灯" custom-cache="{{false}}" src="{{IMGURL}}video/light.mp4?v={{img_version}}"></video>
</view>
</view>
<!-- 收益测算 -->
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/productDetail/ambientLighting/light_income.png?v={{img_version}}"></image>
</view>
</view>
<view class="btn-bottm">
......
......@@ -33,11 +33,11 @@
top: 1204rpx;
}
.box-content image {
.box-content view {
margin-bottom: 56rpx;
}
.box-content image:last-child {
.box-content view:last-child {
margin-bottom: 110rpx;
}
......
// pages/productDetail/arNavigation/arNavigation.js
import { trackData } from "../../../utils/data";
import util from '../../../utils/util'
Page({
/**
......@@ -27,7 +28,17 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
wx.$Track.sendTrack(trackData.ARNAVIGATION)
const options = wx.getEnterOptionsSync()
if (options.query.cardId) {
wx.$trackData = options.query
}
getApp()
.login()
.then(({ data }) => {
if (!wx.$trackData.detailShare) {
wx.$Track.sendTrack(trackData.ARNAVIGATION)
}
});
},
/**
......@@ -64,7 +75,7 @@ Page({
onShareAppMessage() {
return {
title: trackData.ARNAVIGATION.pageName,
path: 'pages/productDetail/arNavigation/arNavigation?cardId=' + util.getStorageSync('scene').cardId
path: 'pages/productDetail/arNavigation/arNavigation?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+util.getStorageSync("scene").merchantId+'&detailShare=' +trackData.ARNAVIGATION.pageName
}
}
})
\ No newline at end of file
......@@ -24,8 +24,6 @@
<video poster="{{IMGURL}}video/AR_bitmap.png?v={{img_version}}" title="单品AR导航" custom-cache="{{false}}" src="{{IMGURL}}video/AR.mp4?v={{img_version}}"></video>
</view>
</view>
<!-- 收益测算 -->
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/productDetail/AR-navigation/AR_income.png?v={{img_version}}"></image>
</view>
</view>
<view class="btn-bottm">
......
......@@ -3,11 +3,11 @@
width: 702rpx;
}
.box-content image {
.box-content view {
margin-bottom: 56rpx;
}
.box-content image:last-child {
.box-content view:last-child {
margin-bottom: 110rpx;
}
......
......@@ -21,7 +21,17 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
wx.$Track.sendTrack(trackData.CARBEAUTY);
const options = wx.getEnterOptionsSync()
if (options.query.cardId) {
wx.$trackData = options.query
}
getApp()
.login()
.then(({ data }) => {
if (!wx.$trackData.detailShare) {
wx.$Track.sendTrack(trackData.CARBEAUTY);
}
});
},
/**
......@@ -52,7 +62,7 @@ Page({
title: trackData.CARBEAUTY.pageName,
path:
"pages/productDetail/carBeauty/carBeauty?cardId=" +
util.getStorageSync("scene").cardId,
util.getStorageSync("scene").cardId+"&merchant="+util.getStorageSync("scene").merchantId+'&detailShare=' +trackData.CARBEAUTY.pageName
};
},
});
......@@ -25,8 +25,6 @@
<!-- <video poster="{{IMGURL}}image/productDetail/carBeauty/beauty_bitmap.png?v={{img_version}}" src="{{IMGURL}}video/light.mp4?v={{img_version}}"></video> -->
</view>
</view>
<!-- 收益测算 -->
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/productDetail/carBeauty/beauty_income.png?v={{img_version}}"></image>
</view>
</view>
<view class="btn-bottm">
......
......@@ -8,11 +8,11 @@
height: 1672rpx;
}
.box-content image {
.box-content view {
margin-bottom: 56rpx;
}
.box-content image:last-child {
.box-content view:last-child {
margin-bottom: 110rpx;
}
......
// pages/productDetail/changingFilm/changingFilm.js
import { trackData } from "../../../utils/data";
import util from '../../../utils/util'
Page({
/**
......@@ -27,7 +28,17 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
wx.$Track.sendTrack(trackData.CHANGEFILM)
const options = wx.getEnterOptionsSync()
if (options.query.cardId) {
wx.$trackData = options.query
}
getApp()
.login()
.then(({ data }) => {
if (!wx.$trackData.detailShare) {
wx.$Track.sendTrack(trackData.CHANGEFILM)
}
});
},
/**
......@@ -64,7 +75,7 @@ Page({
onShareAppMessage() {
return {
title: trackData.CHANGEFILM.pageName,
path: 'pages/productDetail/changingFilm/changingFilm?cardId=' + util.getStorageSync('scene').cardId
path: 'pages/productDetail/changingFilm/changingFilm?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+util.getStorageSync("scene").merchantId+'&detailShare=' +trackData.CHANGEFILM.pageName
}
}
})
\ No newline at end of file
<!--改色膜-->
<view class="box-bg box-relative">
<view class="box-content">
<!-- 阶段玩法 -->
<!-- 阶段玩法 -->
<view class="box-relative play_bg">
<image mode="widthFix" class="play_bg" webp src="{{IMGURL}}image/productDetail/changingFilm/play_bg.png?v={{img_version}}"></image>
<view class="bg_img1">
......@@ -18,16 +18,13 @@
</view>
</view>
<!-- 产品介绍 -->
<image mode="widthFix" style="margin-top: 66rpx;" class="img" webp src="{{IMGURL}}image/productDetail/changingFilm/changing_product.png?v={{img_version}}"></image>
<!-- <view style="margin-top: 56rpx;">
<view>
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/productDetail/changingFilm/changing_product.png?v={{img_version}}"></image>
<view class="box-video beauty-video1">
<image mode="widthFix" class="video_img" webp src="{{IMGURL}}image/productDetail/changingFilm/changing_bitmap.png?v={{img_version}}"></image>
<video poster="{{IMGURL}}image/productDetail/changingFilm/changing_bitmap.png?v={{img_version}}" src="{{IMGURL}}video/light.mp4?v={{img_version}}"></video>
<!-- <image mode="widthFix" class="video_img" webp src="{{IMGURL}}image/productDetail/changingFilm/changing_bitmap.png?v={{img_version}}"></image>
<video poster="{{IMGURL}}image/productDetail/changingFilm/changing_bitmap.png?v={{img_version}}" src="{{IMGURL}}video/light.mp4?v={{img_version}}"></video> -->
</view>
</view> -->
<!-- 收益测算 -->
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/productDetail/changingFilm/changing_income.png?v={{img_version}}"></image>
</view>
</view>
</view>
<view class="btn-bottm">
......
......@@ -8,11 +8,11 @@
height: 1672rpx;
}
.box-content image {
.box-content view {
margin-bottom: 56rpx;
}
.box-content image:last-child {
.box-content view:last-child {
margin-bottom: 110rpx;
}
......
......@@ -2,6 +2,7 @@
import {
trackData
} from "../../../utils/data";
import util from '../../../utils/util'
Page({
/**
......@@ -14,7 +15,6 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
......@@ -28,7 +28,19 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
wx.$Track.sendTrack(trackData.EQUITYCARD)
const options = wx.getEnterOptionsSync()
if (options.query.cardId) {
wx.$trackData = options.query
}
console.log(options, 'onshow')
getApp()
.login()
.then(({ data }) => {
console.log(data)
if (!wx.$trackData.detailShare) {
wx.$Track.sendTrack(trackData.EQUITYCARD)
}
});
},
/**
......@@ -65,7 +77,7 @@ Page({
onShareAppMessage() {
return {
title: trackData.EQUITYCARD.pageName,
path: 'pages/productDetail/equity/equity?cardId=' + util.getStorageSync('scene').cardId
path: 'pages/productDetail/equity/equity?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+util.getStorageSync("scene").merchantId+'&detailShare=' +trackData.EQUITYCARD.pageName
}
}
})
\ No newline at end of file
// pages/productDetail/lossPhase/lossPhase.js
import { trackData } from "../../../utils/data";
import util from '../../../utils/util'
Page({
/**
......@@ -27,7 +28,17 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
wx.$Track.sendTrack(trackData.LOSSPGASE)
const options = wx.getEnterOptionsSync()
if (options.query.cardId) {
wx.$trackData = options.query
}
getApp()
.login()
.then(({ data }) => {
if (!wx.$trackData.detailShare) {
wx.$Track.sendTrack(trackData.LOSSPGASE)
}
});
},
/**
......@@ -64,7 +75,7 @@ Page({
onShareAppMessage() {
return {
title: trackData.LOSSPGASE.pageName,
path: 'pages/productDetail/lossPhase/lossPhase?cardId=' + util.getStorageSync('scene').cardId
path: 'pages/productDetail/lossPhase/lossPhase?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+util.getStorageSync("scene").merchantId+'&detailShare=' +trackData.LOSSPGASE.pageName
}
}
})
\ No newline at end of file
......@@ -25,8 +25,6 @@
<!-- <video poster="{{IMGURL}}image/productDetail/lossPhase/loss_bitmap.png?v={{img_version}}" src="{{IMGURL}}video/light.mp4?v={{img_version}}"></video> -->
</view>
</view>
<!-- 收益测算 -->
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/productDetail/lossPhase/loss_income.png?v={{img_version}}"></image>
</view>
</view>
<view class="btn-bottm">
......
......@@ -8,11 +8,11 @@
height: 1672rpx;
}
.box-content image {
.box-content view {
margin-bottom: 56rpx;
}
.box-content image:last-child {
.box-content view:last-child {
margin-bottom: 110rpx;
}
......
// pages/productDetail/navigationArround/navigationArround.js
import { trackData } from "../../../utils/data";
import util from '../../../utils/util'
Page({
/**
......@@ -27,7 +28,17 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
wx.$Track.sendTrack(trackData.NAVIGATIONARROUND)
const options = wx.getEnterOptionsSync()
if (options.query.cardId) {
wx.$trackData = options.query
}
getApp()
.login()
.then(({ data }) => {
if (!wx.$trackData.detailShare) {
wx.$Track.sendTrack(trackData.NAVIGATIONARROUND)
}
});
},
/**
......@@ -64,7 +75,7 @@ Page({
onShareAppMessage() {
return {
title: trackData.NAVIGATIONARROUND.pageName,
path: 'pages/productDetail/navigationArround/navigationArround?cardId=' + util.getStorageSync('scene').cardId
path: 'pages/productDetail/navigationArround/navigationArround?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+util.getStorageSync("scene").merchantId+'&detailShare=' +trackData.NAVIGATIONARROUND.pageName
}
}
})
\ No newline at end of file
......@@ -24,8 +24,6 @@
<video poster="{{IMGURL}}video/360_AR_bitmap.png?v={{img_version}}" title="360全景导航" custom-cache="{{false}}" src="{{IMGURL}}video/360_AR.mp4?v={{img_version}}"></video>
</view>
</view>
<!-- 收益测算 -->
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/productDetail/navigation-360/income.png?v={{img_version}}"></image>
</view>
</view>
<view class="btn-bottm">
......
......@@ -8,11 +8,11 @@
height: 1632rpx;
}
.box-content image {
.box-content view {
margin-bottom: 56rpx;
}
.box-content image:last-child {
.box-content view:last-child {
margin-bottom: 110rpx;
}
......
// pages/productDetail/paintProtect/paintProtect.js
import { trackData } from "../../../utils/data";
import util from '../../../utils/util'
Page({
/**
......@@ -27,7 +28,17 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
wx.$Track.sendTrack(trackData.PAINTPROTECT)
const options = wx.getEnterOptionsSync()
if (options.query.cardId) {
wx.$trackData = options.query
}
getApp()
.login()
.then(({ data }) => {
if (!wx.$trackData.detailShare) {
wx.$Track.sendTrack(trackData.PAINTPROTECT)
}
});
},
/**
......@@ -64,7 +75,7 @@ Page({
onShareAppMessage() {
return {
title: trackData.PAINTPROTECT.pageName,
path: 'pages/productDetail/paintProtect/paintProtect?cardId=' + util.getStorageSync('scene').cardId
path: 'pages/productDetail/paintProtect/paintProtect?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+util.getStorageSync("scene").merchantId+'&detailShare=' +trackData.PAINTPROTECT.pageName
}
}
})
\ No newline at end of file
......@@ -25,8 +25,6 @@
<!-- <video poster="{{IMGURL}}image/productDetail/paintProtect/paint_bitmap.png?v={{img_version}}" src="{{IMGURL}}video/light.mp4?v={{img_version}}"></video> -->
</view>
</view>
<!-- 收益测算 -->
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/productDetail/paintProtect/paint_income.png?v={{img_version}}"></image>
</view>
</view>
<view class="btn-bottm">
......
......@@ -8,11 +8,11 @@
height: 1672rpx;
}
.box-content image {
.box-content view {
margin-bottom: 56rpx;
}
.box-content image:last-child {
.box-content view:last-child {
margin-bottom: 110rpx;
}
......
// pages/productDetail/seatVentilate/seatVentilate.js
import { trackData } from "../../../utils/data";
import util from '../../../utils/util'
Page({
/**
......@@ -27,7 +28,17 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
wx.$Track.sendTrack(trackData.SEATVENTILATE)
const options = wx.getEnterOptionsSync()
if (options.query.cardId) {
wx.$trackData = options.query
}
getApp()
.login()
.then(({ data }) => {
if (!wx.$trackData.detailShare) {
wx.$Track.sendTrack(trackData.SEATVENTILATE)
}
});
},
/**
......@@ -64,7 +75,7 @@ Page({
onShareAppMessage() {
return {
title: trackData.SEATVENTILATE.pageName,
path: 'pages/productDetail/seatVentilate/seatVentilate?cardId=' + util.getStorageSync('scene').cardId
path: 'pages/productDetail/seatVentilate/seatVentilate?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+util.getStorageSync("scene").merchantId+'&detailShare=' +trackData.SEATVENTILATE.pageName
}
}
})
\ No newline at end of file
......@@ -24,8 +24,6 @@
<video poster="{{IMGURL}}video/seat_bitmap.png?v={{img_version}}" title="座椅通风系统" custom-cache="{{false}}" src="{{IMGURL}}video/seat.mp4?v={{img_version}}"></video>
</view>
</view>
<!-- 收益测算 -->
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/productDetail/seatVentilate/seat_income.png?v={{img_version}}"></image>
</view>
</view>
<view class="btn-bottm">
......
......@@ -8,11 +8,11 @@
height: 1632rpx;
}
.box-content image {
.box-content view {
margin-bottom: 56rpx;
}
.box-content image:last-child {
.box-content view:last-child {
margin-bottom: 110rpx;
}
......
// pages/productDetail/solarFilm/solarFilm.js
import { trackData } from "../../../utils/data";
import util from '../../../utils/util'
Page({
/**
......@@ -27,7 +28,19 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
wx.$Track.sendTrack(trackData.SOLARFILM)
const options = wx.getEnterOptionsSync()
if (options.query.cardId) {
wx.$trackData = options.query
}
console.log(options, 'onshow')
getApp()
.login()
.then(({ data }) => {
console.log(data)
if (!wx.$trackData.detailShare) {
wx.$Track.sendTrack(trackData.SOLARFILM)
}
});
},
/**
......@@ -62,9 +75,10 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage() {
console.log(util.getStorageSync('scene'))
return {
title: trackData.SOLARFILM.pageName,
path: 'pages/productDetail/solarFilm/solarFilm?cardId=' + util.getStorageSync('scene').cardId
path: 'pages/productDetail/solarFilm/solarFilm?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+util.getStorageSync("scene").merchantId+'&detailShare=' +trackData.SOLARFILM.pageName
}
}
})
\ No newline at end of file
......@@ -62,7 +62,8 @@ Page({
clueList: ['clue-img2.webp', 'clue-img3.webp', 'clue-img4.webp', 'clue-img5.webp', 'clue-img6.webp', 'clue-img7.webp', 'clue-img8.webp', 'clue-img9.webp', 'clue-img10.webp', 'clue-img11.webp', 'clue-img12.webp', 'clue-img13.webp'],
clueCurrent: 0,
awardBanner: [{src: 'company-img7.png', name: '组织荣誉'}, {src: 'company-img71.png', name: '行业奖项'}],
awardCurrent: 0
awardCurrent: 0,
shareDisabled: true
},
introduce(e) {
const curTabIndex = e.currentTarget.dataset.index;
......@@ -142,7 +143,6 @@ Page({
getApp()
.login()
.then(({ data }) => {
wx.hideLoading()
if (data && data.nickName) {
this.setData({
hasUserInfo: true,
......@@ -160,6 +160,9 @@ Page({
}
this.getCardDetail();
});
wx.hideShareMenu({
menus: ['shareAppMessage']
})
},
/**
......@@ -202,12 +205,14 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage() {
const cardId = util.getStorageSync("scene").cardId
const merchant = util.getStorageSync("scene").merchantId || util.getStorageSync("scene").merchant
return {
title: `您好,我向你推荐了广联数科${this.data.cardInfo.staffName}的智能名片~`,
imageUrl: this.data.shareImg,
path:
"pages/tab/index/index?cardId=" +
util.getStorageSync("scene").cardId,
cardId + "&merchant="+merchant
};
},
setShareInfo(data = {}) {
......@@ -325,8 +330,14 @@ Page({
draw_function.toDataURL(({ path }) => {
this.setData({
shareImg: path,
});
shareDisabled: false
}, () => {
wx.showShareMenu({
menus: ['shareAppMessage']
})
})
});
}
});
};
......@@ -369,6 +380,7 @@ Page({
cardId: wx.$trackData.cardId || scene.cardId
};
entmicroApi.getCardDetail(params).then(({data, code, message}) => {
wx.hideLoading()
if (code == -1) {
wx.showToast({
title: message,
......@@ -376,10 +388,12 @@ Page({
duration: 2000
})
}
const cardInfo = data || this.data.defaultInfo
this.setData({
cardInfo: data || this.data.defaultInfo
cardInfo
},()=>{
this.setShareInfo(cardInfo);
})
this.setShareInfo(this.data.cardInfo);
});
},
});
......@@ -5,7 +5,7 @@
<import src="index.skeleton.wxml"/>
<template is="skeleton" wx:if="true" />
<view class="main-box" wx:if="{{cardInfo}}" >
<user-info data-skeleton-hide="cardInfo" cardInfo="{{cardInfo}}"></user-info>
<user-info data-skeleton-hide="cardInfo" shareDisabled="{{shareDisabled}}" cardInfo="{{cardInfo}}"></user-info>
<view class="main-bottom">
<!-- 面向渠道 -->
<template is="channel"></template>
......@@ -39,7 +39,7 @@
</block> -->
</block>
</view>
<view wx:if="{{!hasUserInfo}}" class="user-profile" bindtap="getUserProfile"></view>
<!-- 服务咨询 -->
<view bindtap="goConsult">
......
......@@ -40,7 +40,7 @@
"minifyWXML": true,
"showES6CompileOption": false,
"useCompilerPlugins": false,
"ignoreUploadUnusedFiles": true
"ignoreUploadUnusedFiles": false
},
"compileType": "miniprogram",
"libVersion": "2.25.4",
......
......@@ -43,7 +43,7 @@
{
"name": "",
"pathName": "pages/tab/index/index",
"query": "scene=sceneId%3D3102",
"query": "scene=sceneId%3D3233",
"launchMode": "default",
"scene": null
},
......@@ -129,5 +129,6 @@
},
"setting": {
"urlCheck": false
}
},
"libVersion": "2.26.1"
}
\ No newline at end of file
......@@ -62,7 +62,7 @@ class Draw {
let image = this[_canvas_].createImage()
new Promise(resolve => {
image.onload = resolve
image.src = url
image.src = `${url}?v=${Date.now()}`
}).then(() => {
this[_ctx_].drawImage(image, x, y, width, height)
this[_ctx_].restore()
......@@ -394,6 +394,7 @@ class Draw {
})
}
base64src(url).then(img => {
console.log('img', img)
createLocalImg(img, callBack)
})
}
......
......@@ -124,7 +124,7 @@ class TRACK {
let params = {
method: 'entmicro.api.business.card.cardRecord',
cardId: wx.$trackData.cardId,
merchant: wx.$trackData.merchant,
merchant: wx.$trackData.merchant || wx.$trackData.merchantId,
type: wx.$trackData.type
}
let userInfo = { }
......@@ -152,7 +152,9 @@ class TRACK {
data,
message
}) => {
console.log('埋点设置成功')
if (code == 0) {
console.log('埋点设置成功')
}
})
}
/**获取页面对象实例 */
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!