Commit 457925f2 by 李乾广

修改bug

1 parent dbfcf319
import axios from 'axios'
import { Toast } from 'vant';
const baseURL = 'https://store.keliuyun.com';
const baseURL = 'https://patrol.huian365.com';
const Axios = axios.create({
baseURL: process.env.NODE_ENV === 'production' ? '' : baseURL, // 因为我本地做了反向代理
timeout: 0,
......
......@@ -222,6 +222,12 @@ export default {
// let regPng = new RegExp('data:image/png;base64,');
// let pic = imgData.replace(reg, '')
// pic = pic.replace(regPng, '')
const loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
let par = {
restaurantName:this.params.gateName,
fileData:imgData,
......@@ -229,7 +235,7 @@ export default {
// console.log(par)
this.$axios({
method: 'post',
url:process.env.NODE_ENV === 'production'?`/api/v1/upload_images`:`/qxh/api/v1/upload_images`,
url:process.env.NODE_ENV === 'production'?`https://openapi.huian365.com/api/v1/upload_images`:`/qxh/api/v1/upload_images`,
data:par,
headers:{
accessKeyid:'ca8e162ca2c9263a8f32882feea9d506',
......@@ -238,9 +244,21 @@ export default {
}).then((res)=> {
// console.log(res)
if (res.data.code === 0) {
setTimeout(() => {
loading.close();
}, 5000);
// 跳转页面
// console.log(`http://dining-sit.huian365.com/camera/CameraReport?userKey=${this.params.userKey}&restaurantId=${this.params.restaurantId}&imgUrl=${encodeURIComponent(res.data.data)}`)
window.open(`http://dining-sit.huian365.com/camera/CameraReport?userKey=${this.params.userKey}&restaurantId=${this.params.restaurantId}&imgUrl=${encodeURIComponent(res.data.data)}`)
// window.open(`http://dining-sit.huian365.com/camera/CameraReport?userKey=${this.params.userKey}&restaurantId=${this.params.restaurantId}&imgUrl=${encodeURIComponent(res.data.data)}`)
const strUrl = `http://dining-sit.huian365.com/camera/CameraReport?userKey=${this.params.userKey}&restaurantId=${this.params.restaurantId}&imgUrl=${encodeURIComponent(res.data.data)}`
// const a = document.createElement('a')
// a.style = 'display: none'
// a.target = '_blank'
// a.href = strUrl
// a.click()
// document.body.append(a)
// document.body.removeChild(a)
window.location.href = strUrl
}else {
this.$message({
message: '截图失败',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!