Commit bba6ba27 by 张立顺

功能开发中

1 parent 9cb1fa3f
...@@ -4,6 +4,7 @@ node_modules ...@@ -4,6 +4,7 @@ node_modules
/.history /.history
/.svn /.svn
.svn .svn
miniprogram_npm
# local env files # local env files
.env.local .env.local
......
// import api from './request.js' // import api from './request.js'
import api from '~/utils/request/request.js' import api from '~/utils/request/request.js'
module.exports = { module.exports = {
/**企业微信登录 */
login(data) {
data.productCode = 'PC00c2'
return api.post('dj.api.smartcarlife.workWechat.login', data)
},
/**微信登录 */ /**微信登录 */
wxLogin(data) { wxLogin(data) {
data.productCode = 'PC00c2' data.productCode = 'PC00c2'
...@@ -87,10 +82,10 @@ module.exports = { ...@@ -87,10 +82,10 @@ module.exports = {
return api.post('dj.api.smartcarlife.config.list', data) return api.post('dj.api.smartcarlife.config.list', data)
}, },
/** 获取指定商户指定日期范围的邀约统计 */ // /** 获取指定商户指定日期范围的邀约统计 */
getInviteDateList(data) { // getInviteDateList(data) {
return api.post('dj.api.smartcarlife.inviteStat.merchant.list', data) // return api.post('dj.api.smartcarlife.inviteStat.merchant.list', data)
}, // },
/** 获取WebSocket地址 */ /** 获取WebSocket地址 */
getWsUrl() { getWsUrl() {
return api.post('dj.api.smartcarlife.getWsUrl') return api.post('dj.api.smartcarlife.getWsUrl')
...@@ -139,5 +134,4 @@ module.exports = { ...@@ -139,5 +134,4 @@ module.exports = {
getWorkList(data) { getWorkList(data) {
return api.post('dj.api.smartcarlife.order.search', data) return api.post('dj.api.smartcarlife.order.search', data)
} }
// 获取
} }
...@@ -60,7 +60,9 @@ ...@@ -60,7 +60,9 @@
"pages/carQuotation/index/index", "pages/carQuotation/index/index",
"pages/carQuotation/fullSignture/fullSignture", "pages/carQuotation/fullSignture/fullSignture",
"pages/carQuotation/CarQuotationDetail/CarQuotationDetail", "pages/carQuotation/CarQuotationDetail/CarQuotationDetail",
"pages/carQuotation/CarQuotationPay/CarQuotationPay" "pages/carQuotation/CarQuotationPay/CarQuotationPay",
"pages/carQuotation/createOrderCarQuotation/createOrderCarQuotation",
"pages/carQuotation/createOrderUserInfo/createOrderUserInfo"
] ]
}, },
{ {
......
...@@ -16,7 +16,7 @@ export const appId = 'wx570d9331f9ace0bd' ...@@ -16,7 +16,7 @@ export const appId = 'wx570d9331f9ace0bd'
* 2测试 * 2测试
* 3生产环境 * 3生产环境
*/ */
export const env = 1 export const env = 3
// sentry Dsn 地址 // sentry Dsn 地址
export const dsnUrl = 'https://ddaadc52bf8d4ecc92eca632683d456a@sentry.glsx.com.cn/23' export const dsnUrl = 'https://ddaadc52bf8d4ecc92eca632683d456a@sentry.glsx.com.cn/23'
// packageEquity/pages/carQuotation/createOrderCarQuotation/createOrderCarQuotation.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/carQuotation/createOrderCarQuotation/createOrderCarQuotation.wxss */
\ No newline at end of file \ No newline at end of file
<!--packageEquity/pages/carQuotation/createOrderCarQuotation/createOrderCarQuotation.wxml-->
<text>packageEquity/pages/carQuotation/createOrderCarQuotation/createOrderCarQuotation.wxml</text>
// packageEquity/pages/carQuotation/createOrderUserInfo/createOrderUserInfo.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/carQuotation/createOrderUserInfo/createOrderUserInfo.wxss */
\ No newline at end of file \ No newline at end of file
<!--packageEquity/pages/carQuotation/createOrderUserInfo/createOrderUserInfo.wxml-->
<text>packageEquity/pages/carQuotation/createOrderUserInfo/createOrderUserInfo.wxml</text>
{
"component": true,
"usingComponents": {},
"navigationBarTitleText": "识别"
}
\ No newline at end of file \ No newline at end of file
<!-- components/OcrPhoto.wxml -->
<!-- <text>components/OcrPhoto.wxml</text> -->
<view class="cameraContainer">
<camera device-position="back" flash="auto" style="width: 100%; height:100vh;">
<cover-view class="camerabgImage-view">
<cover-view class='cameratop-tips'>{{tips[typeClass]}}</cover-view>
<!-- <cover-view class='cameratop-view2'>
<cover-view class='cameratop-view2-detail'>{{currentTime}}</cover-view>
<cover-view class='cameratop-view2-detail'>
经度:{{gps.longitude}} 纬度:{{gps.latitude}}
</cover-view>
<cover-view class='cameratop-view2-detail'>{{district}}附近</cover-view>
</cover-view> -->
<cover-view class="camera-background">
<cover-image src='{{bgSrc}}' />
</cover-view>
<cover-view class="upload-view" bindtap="choseImg">
<cover-image src="{{picUploadSrc}}" class="uploag-icon" />
<cover-view class="upload-label">相册选择</cover-view>
</cover-view>
<cover-view class="camerabotton-view">
<cover-image src='{{cameraBtnSrc}}' class='takephoto' bindtap='takePhoto' />
</cover-view>
</cover-view>
<!-- 上部线条 -->
<!-- 下部线条 -->
<!-- 右部线条 -->
<!-- 左部线条 -->
<!-- <cover-view class='biaochi' style='top:{{gap}}px; left:30px; width:{{width-30*2}}px; height:2px;' />
<cover-view class='biaochi' style='top:{{gap+460}}px; left:30px; width:{{width-30*2}}px; height:2px;' />
<cover-view class='biaochi' style='top:{{gap}}px; right:30px; width:2px; height:460px;' />
<cover-view class='biaochi' style='top:{{gap}}px; left:30px; width:2px; height:460px;' /> -->
</camera>
</view>
<!-- <view style="opacity: 0;"> -->
<!-- wx:if='{{isShowImage}}' -->
<!-- style='width:{{windowWidth}}px; height:{{windowHeight}}px;' -->
<!-- position:fixed;left: 10000rpx -->
<canvas
style='width:{{windowWidth}}px; height:{{windowHeight}}px;'
canvas-id="image-canvas"
id="image-canvas"
type="2d" />
<!-- </view> -->
/* components/OcrPhoto.wxss */
.cameraContainer{
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 10;
background-color: #fff;
}
.camerabgImage-view{
height: 100%;
width: 100%;
position:absolute;
/* background-position: center 0px;
background-size: cover; */
/* background-color: greenyellow; */
/* background: url('./image/backGroundImage.png') no-repeat 100% 100%; */
}
.cameratop-tips{
position: absolute;
text-align: center;
width: 100%;
color: #FFFFFF;
top: 35%;
z-index: 12;
}
.camera-background{
position: absolute;
width: 100%;
height: 100%;
/* z-index: ; */
}
/* .cameratop-view2-detail{
height: 44rpx;
margin:25rpx 55rpx;
width: 100%;
color: #FFFFFF;
} */
.camerabotton-view{
height: 144rpx;
width:144rpx;
bottom: 15%;
left: 50%;
transform: translateX(-50%);
position:absolute;
display: flex;
justify-content: space-around;
align-items: center;
z-index: 11;
}
.takephoto{
width: 144rpx;
height: 144rpx;
border-radius: 999px;
/* box-shadow: 0 0 50rpx gray; */
}
.upload-view {
height: 144rpx;
width: 144rpx;
bottom: 15%;
left: 10%;
position:absolute;
display: flex;
flex-direction: column;
/* justify-content: space-around; */
align-items: center;
justify-content: center;
z-index: 11;
}
.upload-label{
color: #fff;
font-size: 28rpx;
line-height: 40rpx;
margin-top: 15rpx;
}
.uploag-icon{
width: 38rpx;
height: 32rpx;
}
/* .biaochi{
position: absolute;
border: 1px dotted red;
} */
{
"component": true,
"usingComponents": {},
"navigationBarTitleText": "识别"
}
\ No newline at end of file \ No newline at end of file
<!-- components/OcrPhoto.wxml -->
<!-- <text>components/OcrPhoto.wxml</text> -->
<view class="cameraContainer">
<camera device-position="back" flash="auto" style="width: 100%; height:100vh;">
<cover-view class="camerabgImage-view">
<cover-view class='cameratop-tips'>{{tips[typeClass]}}</cover-view>
<!-- <cover-view class='cameratop-view2'>
<cover-view class='cameratop-view2-detail'>{{currentTime}}</cover-view>
<cover-view class='cameratop-view2-detail'>
经度:{{gps.longitude}} 纬度:{{gps.latitude}}
</cover-view>
<cover-view class='cameratop-view2-detail'>{{district}}附近</cover-view>
</cover-view> -->
<cover-view class="camera-background">
<cover-image src='{{bgSrc}}' />
</cover-view>
<cover-view class="upload-view" bindtap="choseImg">
<cover-image src="{{picUploadSrc}}" class="uploag-icon" />
<cover-view class="upload-label">相册选择</cover-view>
</cover-view>
<cover-view class="camerabotton-view">
<cover-image src='{{cameraBtnSrc}}' class='takephoto' bindtap='takePhoto' />
</cover-view>
</cover-view>
<!-- 上部线条 -->
<!-- 下部线条 -->
<!-- 右部线条 -->
<!-- 左部线条 -->
<!-- <cover-view class='biaochi' style='top:{{gap}}px; left:30px; width:{{width-30*2}}px; height:2px;' />
<cover-view class='biaochi' style='top:{{gap+460}}px; left:30px; width:{{width-30*2}}px; height:2px;' />
<cover-view class='biaochi' style='top:{{gap}}px; right:30px; width:2px; height:460px;' />
<cover-view class='biaochi' style='top:{{gap}}px; left:30px; width:2px; height:460px;' /> -->
</camera>
</view>
<!-- <view style="opacity: 0;"> -->
<!-- wx:if='{{isShowImage}}' -->
<!-- style='width:{{windowWidth}}px; height:{{windowHeight}}px;' -->
<!-- position:fixed;left: 10000rpx -->
<canvas
style='width:{{windowWidth}}px; height:{{windowHeight}}px;'
canvas-id="image-canvas"
id="image-canvas"
type="2d" />
<!-- </view> -->
/* components/OcrPhoto.wxss */
.cameraContainer{
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 10;
background-color: #fff;
}
.camerabgImage-view{
height: 100%;
width: 100%;
position:absolute;
/* background-position: center 0px;
background-size: cover; */
/* background-color: greenyellow; */
/* background: url('./image/backGroundImage.png') no-repeat 100% 100%; */
}
.cameratop-tips{
position: absolute;
text-align: center;
width: 100%;
color: #FFFFFF;
top: 35%;
z-index: 12;
}
.camera-background{
position: absolute;
width: 100%;
height: 100%;
/* z-index: ; */
}
/* .cameratop-view2-detail{
height: 44rpx;
margin:25rpx 55rpx;
width: 100%;
color: #FFFFFF;
} */
.camerabotton-view{
height: 144rpx;
width:144rpx;
bottom: 15%;
left: 50%;
transform: translateX(-50%);
position:absolute;
display: flex;
justify-content: space-around;
align-items: center;
z-index: 11;
}
.takephoto{
width: 144rpx;
height: 144rpx;
border-radius: 999px;
/* box-shadow: 0 0 50rpx gray; */
}
.upload-view {
height: 144rpx;
width: 144rpx;
bottom: 15%;
left: 10%;
position:absolute;
display: flex;
flex-direction: column;
/* justify-content: space-around; */
align-items: center;
justify-content: center;
z-index: 11;
}
.upload-label{
color: #fff;
font-size: 28rpx;
line-height: 40rpx;
margin-top: 15rpx;
}
.uploag-icon{
width: 38rpx;
height: 32rpx;
}
/* .biaochi{
position: absolute;
border: 1px dotted red;
} */
// components/OcrPhoto.js // components/OcrPhoto.js
import api from '../../../api/api.js' import api from '~/api/api.js'
Page({ Page({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -202,85 +202,6 @@ Page({ ...@@ -202,85 +202,6 @@ Page({
}) })
}, },
// loadTempImagePath: function (options) {
// var that = this
// wx.getSystemInfo({
// success: function (res) {
// // px与rpx之间转换的公式:px = rpx / 750 * wx.getSystemInfoSync().windowWidth;
// // 矩形的位置
// // var image_x = 0;
// // var image_y = 0;
// // var image_width = that.data.windowWidth;
// // var image_height = that.data.windowHeight
// var image_x = (60 / 750) * wx.getSystemInfoSync().windowWidth
// var image_y = (200 / 750) * wx.getSystemInfoSync().windowHeight
// var image_width = (680 / 750) * wx.getSystemInfoSync().windowWidth
// var image_height = (280 / 750) * wx.getSystemInfoSync().windowHeight
// console.log(image_x, image_y, image_width, image_height)
// wx.getImageInfo({
// src: options,
// success: function (res) {
// that.setData({
// isShowImage: true
// })
// that.canvas = wx.createCanvasContext('image-canvas', that)
// //过渡页面中,图片的路径坐标和大小
// that.canvas.drawImage(options, 0, 0, that.data.windowWidth, that.data.windowHeight)
// wx.showLoading({
// title: '数据处理中...',
// icon: 'loading',
// duration: 10000
// })
// // 这里有一些很神奇的操作,总结就是MD拍出来的照片规格居然不是统一的过渡页面中,对裁剪框的设定
// that.canvas.setStrokeStyle('black')
// that.canvas.strokeRect(image_x, image_y, image_width, image_height)
// that.canvas.draw()
// setTimeout(function () {
// wx.canvasToTempFilePath({
// //裁剪对参数
// canvasId: 'image-canvas',
// x: image_x, //画布x轴起点
// y: image_y, //画布y轴起点
// width: image_width, //画布宽度
// height: image_height, //画布高度
// destWidth: image_width, //输出图片宽度
// destHeight: image_height, //输出图片高度
// success: function (res) {
// that.setData({
// image: res.tempFilePath
// })
// //清除画布上在该矩形区域内的内容。
// // that.canvas.clearRect(0, 0, that.data.width, that.data.height)
// // that.canvas.drawImage(res.tempFilePath, image_x, image_y, image_width, image_height)
// // that.canvas.draw()
// wx.hideLoading()
// console.log(res.tempFilePath)
// wx.getFileSystemManager().readFile({
// filePath: res.tempFilePath, //图片路径
// encoding: 'base64', //编码格式
// success: result => {
// //成功的回调
// console.log('data:image/png;base64,' + result.data)
// //在此可进行网络请求
// },
// fail: function (e) {
// wx.hideLoading()
// wx.showToast({
// title: '出错啦...',
// icon: 'loading'
// })
// }
// })
// }
// })
// }, 1000)
// }
// })
// }
// })
// },
// 获取摄像头授权 // 获取摄像头授权
getCameraSetting() { getCameraSetting() {
// console.log('获取权限') // console.log('获取权限')
...@@ -349,89 +270,6 @@ Page({ ...@@ -349,89 +270,6 @@ Page({
} }
}) })
}) })
// wx.getSetting({
// success: res => {
// console.log(res)
// if (res.authSetting['scope.camera']) {
// // 用户已经授权
// console.log('用户已经授权')
// _this.setData({
// isAuth: true
// // isNeedSettingButton: false
// })
// } else {
// // 用户还没有授权,向用户发起授权请求
// wx.authorize({
// scope: 'scope.camera',
// success() {
// console.log('用户同意授权')
// // 用户同意授权
// _this.setData({
// isAuth: true
// // isNeedSettingButton: false
// })
// },
// fail() {
// // 用户不同意授权
// wx.showModal({
// title: '提示',
// content: '如需正常使用此小程序功能,请您按确定并在设置页面授权用户信息',
// cancelText: '不授权',
// cancelColor: '#999',
// confirmText: '授权',
// // confirmColor: '#f94218',
// success(res) {
// if (res.confirm) {
// wx.openSetting({
// success(res) {
// if (res.authSetting['scope.camera']) {
// //设置允许获取摄像头
// console.log('设置允许获取摄像头')
// wx.showToast({
// title: '授权成功',
// icon: 'success',
// duration: 1000
// })
// _this.setData({
// isAuth: true
// })
// } else {
// //不允许
// wx.showToast({
// title: '授权失败',
// icon: 'none',
// duration: 1000
// })
// wx.$router.back()
// }
// }
// })
// } else if (res.cancel) {
// console.log('用户点击取消')
// wx.showToast({
// title: '授权失败',
// icon: 'none',
// duration: 1000
// })
// wx.$router.back()
// }
// }
// })
// }
// })
// }
// },
// fail: res => {
// console.log('获取用户授权信息失败')
// wx.showToast({
// title: '获取用户授权信息失败',
// icon: 'none',
// duration: 3000
// })
// wx.$router.back()
// }
// })
}, },
// 获取存图片授权 // 获取存图片授权
...@@ -501,90 +339,6 @@ Page({ ...@@ -501,90 +339,6 @@ Page({
}) })
} }
}) })
// })
// wx.getSetting({
// success: res => {
// console.log(res)
// if (res.authSetting['scope.camera']) {
// // 用户已经授权
// console.log('用户已经授权')
// _this.setData({
// isAuth: true
// // isNeedSettingButton: false
// })
// } else {
// // 用户还没有授权,向用户发起授权请求
// wx.authorize({
// scope: 'scope.camera',
// success() {
// console.log('用户同意授权')
// // 用户同意授权
// _this.setData({
// isAuth: true
// // isNeedSettingButton: false
// })
// },
// fail() {
// // 用户不同意授权
// wx.showModal({
// title: '提示',
// content: '如需正常使用此小程序功能,请您按确定并在设置页面授权用户信息',
// cancelText: '不授权',
// cancelColor: '#999',
// confirmText: '授权',
// // confirmColor: '#f94218',
// success(res) {
// if (res.confirm) {
// wx.openSetting({
// success(res) {
// if (res.authSetting['scope.camera']) {
// //设置允许获取摄像头
// console.log('设置允许获取摄像头')
// wx.showToast({
// title: '授权成功',
// icon: 'success',
// duration: 1000
// })
// _this.setData({
// isAuth: true
// })
// } else {
// //不允许
// wx.showToast({
// title: '授权失败',
// icon: 'none',
// duration: 1000
// })
// wx.$router.back()
// }
// }
// })
// } else if (res.cancel) {
// console.log('用户点击取消')
// wx.showToast({
// title: '授权失败',
// icon: 'none',
// duration: 1000
// })
// wx.$router.back()
// }
// }
// })
// }
// })
// }
// },
// fail: res => {
// console.log('获取用户授权信息失败')
// wx.showToast({
// title: '获取用户授权信息失败',
// icon: 'none',
// duration: 3000
// })
// wx.$router.back()
// }
// })
}, },
onShow: function (data) { onShow: function (data) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!