|
@@ -40,16 +40,14 @@
|
|
|
suburl: '',
|
|
|
openSmooth: true,
|
|
|
nowTime:"",
|
|
|
- serverUrl: "https://51team.xiaoxinda.com/charging-station-server",
|
|
|
- token: "Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWJqZWN0IjoiNzJkYzQ4MGUtNjgxNi00YmUzLTkxOGQtZGEyNDM2ZjM5NjI3IiwiZXhwIjoxNjg4Mjc3Nzc1fQ.Hpqzj7P0tOx2qMdkl09snEzQapG2a5_kPndBFjjHtRo",
|
|
|
+ serverUrl: "",
|
|
|
+ token: "",
|
|
|
}
|
|
|
},onLoad(op){
|
|
|
//this.userInfo=this.carhelp.getPersonInfo("merchantUser")
|
|
|
|
|
|
- if(op.id){
|
|
|
- this.id=op.id
|
|
|
- this.getInfo()
|
|
|
- }
|
|
|
+ this.id=op.id
|
|
|
+ this.getInfo()
|
|
|
},
|
|
|
methods: {
|
|
|
//上传图片
|
|
@@ -87,7 +85,7 @@
|
|
|
|
|
|
|
|
|
uni.showLoading({
|
|
|
- title: "加载中",
|
|
|
+ title: "提交中...",
|
|
|
mask: true,
|
|
|
})
|
|
|
|
|
@@ -151,45 +149,52 @@
|
|
|
this.url ="";
|
|
|
}else{
|
|
|
this.url = res.tempFilePath
|
|
|
- }
|
|
|
|
|
|
- console.log(this.url)
|
|
|
- // 生成图片的临时路径
|
|
|
- // app | H5 | 微信小程序 生成的是base64
|
|
|
- this.uploadpic()
|
|
|
- // uni.showLoading({
|
|
|
- // title: '上传中'
|
|
|
- // });
|
|
|
-
|
|
|
- // uni.request({
|
|
|
- // url: this.serverUrl + "/uploadBase64Json",
|
|
|
- // method: "POST",
|
|
|
- // header: {
|
|
|
- // Authorization: this.token
|
|
|
- // },
|
|
|
- // data: {
|
|
|
- // "photoName":"signature.png",
|
|
|
- // "photoBase64Data": this.url
|
|
|
- // },
|
|
|
- // success: (res) => {
|
|
|
- // uni.hideLoading();
|
|
|
-
|
|
|
- // console.log(res)
|
|
|
-
|
|
|
- // if(res.data.result){
|
|
|
- // uni.showToast({
|
|
|
- // title: '签名保存成功!',
|
|
|
- // duration: 2000
|
|
|
- // });
|
|
|
- // }
|
|
|
- // else{
|
|
|
- // uni.showToast({
|
|
|
- // title: '签名保存失败!',
|
|
|
- // duration: 2000
|
|
|
- // });
|
|
|
- // }
|
|
|
- // }
|
|
|
- // })
|
|
|
+ console.log(this.url)
|
|
|
+ // 生成图片的临时路径
|
|
|
+ // app | H5 | 微信小程序 生成的是base64
|
|
|
+ //this.uploadpic()
|
|
|
+ uni.showLoading({
|
|
|
+ title: '上传中'
|
|
|
+ });
|
|
|
+ this.token=this.carhelp.getToken();
|
|
|
+ this.serverUrl=process.car.BASE_URL;
|
|
|
+
|
|
|
+ uni.request({
|
|
|
+ url: this.serverUrl + "/uploadBase64Json",
|
|
|
+ method: "POST",
|
|
|
+ header: {
|
|
|
+ Authorization: this.token
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ "photoName":"signature.png",
|
|
|
+ "photoBase64Data": this.url
|
|
|
+ },
|
|
|
+ success: (res) => {
|
|
|
+ uni.hideLoading();
|
|
|
+
|
|
|
+ console.log(res)
|
|
|
+
|
|
|
+ if(res.data.result){
|
|
|
+ uni.showToast({
|
|
|
+ title: '签名保存成功!',
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+
|
|
|
+ this.info.status=0;
|
|
|
+ this.info.signUrl=response.data;
|
|
|
+ //this.$emit("signsubmit",0,this.suburl)
|
|
|
+ this.submitFrom()
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ uni.showToast({
|
|
|
+ title: '签名保存失败!',
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
return
|