Commit 3d4a8d23 by luyt

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

# Conflicts:
#	pages/tab/index/index.js
2 parents a5bc8eba f95a5c12
......@@ -99,9 +99,38 @@ Component({
handleCopy(e) {
var { idx } = e.currentTarget.dataset
var currentItem = this.data.orderObj.activityList[idx]
console.log(currentItem)
// console.log(wxqrcode)
wxqrcode.createQrCodeImg(currentItem.activityUrl)
var qr = wxqrcode.createQrCodeImg(currentItem.activityUrl)
const base64src = function (base64data) {
return new Promise((resolve, reject) => {
const [a, format, bodyData] = /data:image\/(\w+);base64,(.*)/.exec(base64data) || []
if (!format) reject(new Error('ERROR_BASE64SRC_PARSE'))
const filePath = `${wx.env.USER_DATA_PATH}/tmp_base64src.${format}`
const buffer = wx.base64ToArrayBuffer(bodyData)
wx.getFileSystemManager().writeFile({
filePath,
data: buffer,
encoding: 'binary',
success() {
resolve(filePath)
},
fail() {
reject(new Error('ERROR_BASE64SRC_WRITE'))
}
})
})
}
base64src(qr).then(res => {
wx.getImageInfo({
src: res,
success(obj) {
wx.showShareImageMenu({
path: obj.path
})
},
fail() {
}
})
})
}
}
})
......@@ -13,9 +13,9 @@ Page({
scene1: null,
scene2: null,
scene3: null,
scene4: true
scene4: null
},
sceneActive: 4,
sceneActive: 1,
scenePriceList: [{
total: 0
}, {
......
......@@ -14,9 +14,9 @@ Page({
navStyle,
IMG_URL,
carObj: {
name: 'kafdkf',
model: 'dfdsf3443',
selNum: 132,
name: '',
model: '',
selNum: '',
contact: '',
phone: ''
}
......
......@@ -241,16 +241,16 @@ Page({
let sceneActive;
switch (this.data.actNum) {
case 0:
sceneActive = 1.1;
sceneActive = 1;
break;
case 1:
sceneActive = 1.2;
sceneActive = 2;
break;
case 2:
sceneActive = 1.3;
sceneActive = 3;
break;
case 3:
sceneActive = 1.4;
sceneActive = 4;
break;
}
// let pMerchantId = userInfo.subLoginUser.merchantId
......
/* pages/tab/output/components/client/client.wxss */
.client {
box-sizing: border-box;
height: calc(100vh - 170rpx);
height: 100%;
color: #323436;
padding: 16rpx 0 60rpx;
background-color: #F2F3F7;
......
......@@ -25,7 +25,7 @@
class="tabContainer" />
<!-- <view class="">{{IMG_URL}}</view> -->
<!-- 我的客户 -->
<view hidden="{{tabIndx != 0}}">
<view class="comCom" hidden="{{tabIndx != 0}}">
<client id="client" />
</view>
<!-- 我的门店 -->
......
......@@ -1578,7 +1578,7 @@ var createImgTag = function(width, height, getPixel, alt) {
base64.flush();
var img = '';
img += 'data:image/gif;base64,';
img += 'data:image/png;base64,';
img += base64;
return img;
......
......@@ -68,7 +68,7 @@ class Request {
if (code == '0') {
resolve(data.data)
} else {
console.log(data)
console.trace(data)
wx.showToast({
title: message || '系统异常',
icon: 'none'
......@@ -78,7 +78,7 @@ class Request {
},
fail(error) {
wx.hideLoading()
console.error(`接口异常:`, error)
console.log(`接口异常:`, error)
wx.showToast({
title: '系统异常',
icon: 'error'
......
......@@ -52,7 +52,7 @@ class Share {
if (sharePath) path = `/${sharePath}`
path += that.setCommonShareQuery()
if (shareQuery) path += `&${shareQuery}`
console.log(path)
console.log('::', path)
if (!noPageAuth) path = `/login/loading/loading?url=${encodeURIComponent(path)}`
if (shareFun) shareFun()
if (shareTrackData) that.reportShareData(shareTrackData)
......@@ -123,16 +123,17 @@ class Share {
const {
WXUSERINFO,
USERINFO
} = this.getCommonData()
} = this.getCommonData(),
thisPage = wx.$router.getPageInstance()
reportData({
openId: WXUSERINFO.openId || '',
unionId: WXUSERINFO.unionId || '',
nickName: WXUSERINFO.nickName || '',
avatar: WXUSERINFO.avatarUrl || '',
phone: USERINFO.phone || '',
merchantId: USERINFO.merchantId || '',
shareOpenId: WXUSERINFO.openId || '',
sharePhone: USERINFO.phone || '',
merchantId: thisPage.merchantId || USERINFO.merchantId || '',
shareOpenId: thisPage.shareOpenId || WXUSERINFO.openId || '',
sharePhone: thisPage.sharePhone || USERINFO.phone || '',
...shareTrackData
})
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!