|
@@ -28,7 +28,11 @@
|
|
|
import LSignature from '@/components/l-signature/l-signature.vue'
|
|
|
import * as API from '@/apis/finance.js'
|
|
|
import * as API_Common from '@/apis/common.js'
|
|
|
-
|
|
|
+ import {
|
|
|
+
|
|
|
+ parseUnixTime,
|
|
|
+
|
|
|
+ } from '@/utils'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -42,12 +46,16 @@
|
|
|
nowTime:"",
|
|
|
serverUrl: "",
|
|
|
token: "",
|
|
|
+ uuid:"",
|
|
|
}
|
|
|
},onLoad(op){
|
|
|
//this.userInfo=this.carhelp.getPersonInfo("merchantUser")
|
|
|
-
|
|
|
+ this.uuid=op.uuid;
|
|
|
this.id=op.id
|
|
|
this.getInfo()
|
|
|
+ // alert(this.carhelp.getToken({
|
|
|
+ // jp_identity:"merchantUser"
|
|
|
+ // }))
|
|
|
},
|
|
|
methods: {
|
|
|
//上传图片
|
|
@@ -157,9 +165,12 @@
|
|
|
uni.showLoading({
|
|
|
title: '上传中'
|
|
|
});
|
|
|
- this.token=this.carhelp.getToken();
|
|
|
+ this.token=this.carhelp.getToken({
|
|
|
+ jp_identity:"merchantUser"
|
|
|
+ });
|
|
|
this.serverUrl=process.car.BASE_URL;
|
|
|
-
|
|
|
+ var time= "";//parseUnixTime(new Date(), '{y}{m}{d}-{h}-{i}');
|
|
|
+
|
|
|
uni.request({
|
|
|
url: this.serverUrl + "/uploadBase64Json",
|
|
|
method: "POST",
|
|
@@ -167,7 +178,7 @@
|
|
|
Authorization: this.token
|
|
|
},
|
|
|
data: {
|
|
|
- "photoName":"signature.png",
|
|
|
+ "photoName":"signature"+time+".png",
|
|
|
"photoBase64Data": this.url
|
|
|
},
|
|
|
success: (res) => {
|
|
@@ -188,7 +199,7 @@
|
|
|
}
|
|
|
else{
|
|
|
uni.showToast({
|
|
|
- title: '签名保存失败!',
|
|
|
+ title: '签名保存失败!'+ JSON.stringify(res),
|
|
|
duration: 2000
|
|
|
});
|
|
|
}
|