Commit f03f0b18 by 张立顺

代码合并

2 parents 8535aadd 9ecddf0a
...@@ -44,6 +44,8 @@ module.exports = { ...@@ -44,6 +44,8 @@ module.exports = {
}, },
/** 根据商户号获取员工列表信息(转化人员) */ /** 根据商户号获取员工列表信息(转化人员) */
getConversionEmployeeList(data) { getConversionEmployeeList(data) {
// 0->2.0 1->1.1 2->1.2 3->1.3 场景对应
data.sceneList = [1]
return api.post('dj.api.smartcarlife.employee.getByMerchantId', data) return api.post('dj.api.smartcarlife.employee.getByMerchantId', data)
}, },
/** 根据园区店商户号获取绑定4S店列表 */ /** 根据园区店商户号获取绑定4S店列表 */
...@@ -132,7 +134,9 @@ module.exports = { ...@@ -132,7 +134,9 @@ module.exports = {
}, },
// 获取订单信息 // 获取订单信息
getWorkList(data) { getWorkList(data) {
return api.post('dj.api.smartcarlife.order.search', data) params = data || {}
params.sceneType = 1
return api.post('dj.api.smartcarlife.order.search', params)
}, },
// 获取园区店开通的场景入口 // 获取园区店开通的场景入口
getYqMerchantSceneConfigAPI(data) { getYqMerchantSceneConfigAPI(data) {
......
import api from '~/utils/request/request.js' import api from '~/utils/request/request.js'
export default { export default {
getCarBrandList(data = {}) { getCarBrandList(data = {}) {
...@@ -25,6 +24,7 @@ export default { ...@@ -25,6 +24,7 @@ export default {
/** 根据商户号获取员工列表信息 */ /** 根据商户号获取员工列表信息 */
getEmployeeList(data) { getEmployeeList(data) {
let params = data || {} let params = data || {}
params.sceneList = [0]
return api.post('dj.api.smartcarlife.employee.getByMerchantId', params) return api.post('dj.api.smartcarlife.employee.getByMerchantId', params)
}, },
/** 查询权益订单详情 */ /** 查询权益订单详情 */
...@@ -52,5 +52,4 @@ export default { ...@@ -52,5 +52,4 @@ export default {
let params = data || {} let params = data || {}
return api.post('dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.print', params) return api.post('dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.print', params)
} }
}
\ No newline at end of file \ No newline at end of file
}
...@@ -5,6 +5,7 @@ import qrcode from '~/utils/lib/wxqrcode' ...@@ -5,6 +5,7 @@ import qrcode from '~/utils/lib/wxqrcode'
// const imgUrl = { // const imgUrl = {
// wechat: '/packageEquity/images/pay/wechat.png' // wechat: '/packageEquity/images/pay/wechat.png'
// } // }
// import { setWebSocket } from '~/store/index'
let time = null let time = null
Page({ Page({
/** /**
...@@ -87,6 +88,24 @@ Page({ ...@@ -87,6 +88,24 @@ Page({
}) })
this.getDetail() this.getDetail()
}, },
createQRCode(text) {
console.log(text)
let size = 0
try {
const info = wx.getSystemInfoSync()
let scale = info.windowWidth / 750 //不同屏幕下QRcode的适配比例;设计稿是750宽
let width = 300 * scale
size = width
} catch (e) {
size = 150
}
let _img = qrcode.createQrCodeImg(text, {
size: parseInt(size)
})
this.setData({
qr: _img
})
},
// getOrderDetail() { // getOrderDetail() {
// // console.log(wx.$router, 'wx.$router') // // console.log(wx.$router, 'wx.$router')
// let _this = this // let _this = this
...@@ -189,7 +208,9 @@ Page({ ...@@ -189,7 +208,9 @@ Page({
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) {}, onLoad(options) {
// setWebSocket()
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
......
...@@ -28,6 +28,7 @@ Page({ ...@@ -28,6 +28,7 @@ Page({
}) })
}, },
onLoad(options) { onLoad(options) {
let { windowWidth, windowHeight } = wx.getSystemInfoSync()
if (options.writeOffCode) { if (options.writeOffCode) {
this.writeOffCode = options.writeOffCode this.writeOffCode = options.writeOffCode
} }
...@@ -36,7 +37,7 @@ Page({ ...@@ -36,7 +37,7 @@ Page({
this.canvasCtx = wx.createCanvasContext('signature', that) this.canvasCtx = wx.createCanvasContext('signature', that)
// 设置线的样式 // 设置线的样式
this.canvasCtx.setFillStyle('white') this.canvasCtx.setFillStyle('white')
this.canvasCtx.fillRect(0, 0, 600, 600) this.canvasCtx.fillRect(0, 0, windowWidth, windowHeight)
this.canvasCtx.setLineCap('round') this.canvasCtx.setLineCap('round')
this.canvasCtx.setLineJoin('round') this.canvasCtx.setLineJoin('round')
// 初始化颜色 // 初始化颜色
...@@ -145,6 +146,17 @@ Page({ ...@@ -145,6 +146,17 @@ Page({
canvasId: 'signature', canvasId: 'signature',
fileType: 'png', fileType: 'png',
success(res) { success(res) {
// //将图片保存到本地相册
// wx.saveImageToPhotosAlbum({
// filePath: res.tempFilePath,
// success(res) {
// // wx.$util.showToast('已将图片保存到本地相册', res)
// },
// fail(err) {
// wx.$util.showToast('失败', err)
// console.log(err)
// }
// })
if (res.tempFilePath) { if (res.tempFilePath) {
that.toUploadImage(res.tempFilePath) that.toUploadImage(res.tempFilePath)
} }
......
...@@ -153,6 +153,7 @@ Page({ ...@@ -153,6 +153,7 @@ Page({
return return
} }
wx.$util.showLoading() wx.$util.showLoading()
api api
.selectAccountLogin({ .selectAccountLogin({
id id
...@@ -162,6 +163,7 @@ Page({ ...@@ -162,6 +163,7 @@ Page({
if (data) { if (data) {
app.globalData.YQorderSetting = null app.globalData.YQorderSetting = null
wx.$util.setUserInfo(data.loginUserInfoList[0]) wx.$util.setUserInfo(data.loginUserInfoList[0])
app.globalData.YQorderSetting = null
// console.log(data.loginUserInfoList[0]) // console.log(data.loginUserInfoList[0])
checkYqdSuper(app, data.loginUserInfoList[0]) checkYqdSuper(app, data.loginUserInfoList[0])
const SCENE = wx.$SCENE const SCENE = wx.$SCENE
...@@ -178,6 +180,7 @@ Page({ ...@@ -178,6 +180,7 @@ Page({
wx.$router.reLaunch(`${target}.${name}`, query) wx.$router.reLaunch(`${target}.${name}`, query)
wx.$SCENE = null wx.$SCENE = null
} else { } else {
// 超管默认开通所有场景 // 超管默认开通所有场景
if (isSuper) { if (isSuper) {
// 0 会员权益/升级 1 精品升级 // 0 会员权益/升级 1 精品升级
...@@ -211,7 +214,6 @@ Page({ ...@@ -211,7 +214,6 @@ Page({
} }
}) })
} }
// app.
getYQorderInfo() getYQorderInfo()
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
......
...@@ -97,6 +97,11 @@ export const getYQorderInfo = () => { ...@@ -97,6 +97,11 @@ export const getYQorderInfo = () => {
// console.log(res) // console.log(res)
let { code, data } = res let { code, data } = res
if (code == 0) { if (code == 0) {
// console.log(data);
// debugger
console.log(data.yqPhoneConfig,'data.yqPhoneConfig');
console.log(typeof data.yqPhoneConfig,'data.yqPhoneConfig');
// 过滤园区店是否需要屏蔽手机号选项 // 过滤园区店是否需要屏蔽手机号选项
let filterYqPhoneConfig = JSON.parse(data.yqPhoneConfig) let filterYqPhoneConfig = JSON.parse(data.yqPhoneConfig)
// console.log(filterYqPhoneConfig) // console.log(filterYqPhoneConfig)
...@@ -188,7 +193,7 @@ export const checkScene = options => { ...@@ -188,7 +193,7 @@ export const checkScene = options => {
} }
} }
/** 查询微信和pos订单是否已支付成功 */ /** 查询pos订单是否已支付成功 */
export const setWebSocket = () => { export const setWebSocket = () => {
api.getWsUrl().then(res => { api.getWsUrl().then(res => {
console.log(res.data) console.log(res.data)
......
...@@ -4,9 +4,11 @@ import api from '~/utils/request/request.js' ...@@ -4,9 +4,11 @@ import api from '~/utils/request/request.js'
module.exports = { module.exports = {
/** 工单列表 */ /** 工单列表 */
getWorkList(data) { getWorkList(data) {
let params = data || {}
params.sceneType = 1
return api.post('dj.api.smartcarlife.order.search', { return api.post('dj.api.smartcarlife.order.search', {
pageSize: 10, pageSize: 10,
...data ...params
}) })
}, },
...@@ -74,6 +76,8 @@ module.exports = { ...@@ -74,6 +76,8 @@ module.exports = {
/** 根据订单状态统计订单数*/ /** 根据订单状态统计订单数*/
statByStatus(data) { statByStatus(data) {
data = data || {}
data.sceneType = 1
return api.post('dj.api.smartcarlife.order.statByStatus', data) return api.post('dj.api.smartcarlife.order.statByStatus', data)
}, },
......
...@@ -595,7 +595,7 @@ Page({ ...@@ -595,7 +595,7 @@ Page({
// app . // app .
getYQorderInfo() getYQorderInfo()
.then(merchantSettingInfo => { .then(merchantSettingInfo => {
// console.log(merchantSettingInfo) console.log(merchantSettingInfo,'merchantSettingInfo')
let dictionaryObj = { let dictionaryObj = {
carTypeRequiredFlag: 'carBrand', carTypeRequiredFlag: 'carBrand',
standNoRequiredFlag: 'standNo', standNoRequiredFlag: 'standNo',
...@@ -607,7 +607,7 @@ Page({ ...@@ -607,7 +607,7 @@ Page({
requiredList.push(dictionaryObj[key]) requiredList.push(dictionaryObj[key])
} }
} }
// console.log(merchantSettingInfo.yqPhoneConfig,'merchantSettingInfo.yqPhoneConfig'); console.log(merchantSettingInfo.yqPhoneConfig,'merchantSettingInfo.yqPhoneConfig');
// console.log(deepClone(merchantSettingInfo.yqPhoneConfig), 'deepClone(merchantSettingInfo.yqPhoneConfig)') // console.log(deepClone(merchantSettingInfo.yqPhoneConfig), 'deepClone(merchantSettingInfo.yqPhoneConfig)')
this.setData({ this.setData({
requiredList: [...new Set(requiredList)], requiredList: [...new Set(requiredList)],
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!