|
@@ -231,6 +231,7 @@
|
|
|
computed: {
|
|
|
...mapState(['hasLogin', 'userInfo', 'firstAuthentication']),
|
|
|
},
|
|
|
+
|
|
|
onShow() {
|
|
|
let payInfo = uni.getStorageSync("payInfo")
|
|
|
if (payInfo) {
|
|
@@ -251,26 +252,7 @@
|
|
|
|
|
|
})
|
|
|
}
|
|
|
- this.$request.baseRequest('get', '/commonUser/getSignatureAddress', {
|
|
|
- phone: this.userInfo.phone,
|
|
|
- identification: 1
|
|
|
- }).then(res => {
|
|
|
- if (res.data) {
|
|
|
- if (res.data.signImg) {
|
|
|
- // 获取远程图片,canvas无法直接绘制远程图片
|
|
|
- this.userInfo.signImg = res.data.signImg
|
|
|
- uni.getImageInfo({
|
|
|
- src: res.data.signImg,
|
|
|
- success(res) {
|
|
|
- var ctx = uni.createCanvasContext('handWriting')
|
|
|
- ctx.drawImage(res.path, 0, 0, 330, 244)
|
|
|
- ctx.save()
|
|
|
- ctx.draw()
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
+
|
|
|
console.log(this.dataDetails)
|
|
|
if (this.dataDetails.carNumber) {
|
|
|
this.$set(this.dataDetails.carrierInfo, 'carNo', this.dataDetails.carNumber)
|
|
@@ -316,8 +298,37 @@
|
|
|
this.canvasHeight = rect.height;
|
|
|
/* 将canvas背景设置为 白底,不设置 导出的canvas的背景为透明 */
|
|
|
this.setCanvasBg('#fff');
|
|
|
+ this.$request.baseRequest('get', '/commonUser/getSignatureAddress', {
|
|
|
+ phone: this.userInfo.phone,
|
|
|
+ identification: 1
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data) {
|
|
|
+ if (res.data.signImg) {
|
|
|
+ // 获取远程图片,canvas无法直接绘制远程图片
|
|
|
+ this.userInfo.signImg = res.data.signImg
|
|
|
+ uni.getImageInfo({
|
|
|
+ src: res.data.signImg,
|
|
|
+ success(res) {
|
|
|
+ var ctx = uni.createCanvasContext('handWriting')
|
|
|
+ ctx.drawImage(res.path, 0, 0, 330, 244)
|
|
|
+ ctx.save()
|
|
|
+ ctx.draw()
|
|
|
+ },
|
|
|
+ fail(res) {
|
|
|
+ console.log("fail -> res", res)
|
|
|
+ uni.showToast({
|
|
|
+ title: "图片下载异常",
|
|
|
+ duration: 2000,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
.exec();
|
|
|
+
|
|
|
});
|
|
|
uni.showLoading({
|
|
|
title: '加载中'
|
|
@@ -551,11 +562,15 @@
|
|
|
complete() {
|
|
|
uni.removeStorageSync(
|
|
|
"payInfo") //如果要有银行卡缓存就删除
|
|
|
- uni.$u.route(
|
|
|
- '/pages/order/confirmLoading', {
|
|
|
- obj: JSON.stringify(that
|
|
|
- .dataDetails),
|
|
|
- });
|
|
|
+ // uni.$u.route(
|
|
|
+ // '/pages/order/confirmLoading', {
|
|
|
+ // obj: JSON.stringify(that
|
|
|
+ // .dataDetails),
|
|
|
+ // });
|
|
|
+ uni.setStorageSync('contractdata',that.dataDetails)
|
|
|
+ uni.navigateBack({
|
|
|
+ delta:1
|
|
|
+ })
|
|
|
// that.upCallback({
|
|
|
// size: 10,
|
|
|
// num: 1
|