|
@@ -1,7 +1,7 @@
|
|
|
// pages/upload/upload.js
|
|
|
const app = getApp()
|
|
|
const $api = require('../../utils/api.js').API;
|
|
|
-const baseURL = 'https://test.hunanwanzhu.com';
|
|
|
+const baseURL = 'https://api.hunanwanzhu.com';
|
|
|
Page({
|
|
|
|
|
|
/**
|
|
@@ -214,7 +214,8 @@ Page({
|
|
|
})
|
|
|
let imgs = []
|
|
|
let valueArr = []
|
|
|
- // 需要oss 验签 此处是调取验签的接口
|
|
|
+ // 需要oss 验签 此处是调取验签的接口
|
|
|
+
|
|
|
$api.getOssSign(res).then((r) => {
|
|
|
wx.hideLoading()
|
|
|
const arr = res.tempFiles
|
|
@@ -245,13 +246,16 @@ Page({
|
|
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
|
},
|
|
|
success: (res) => {
|
|
|
+
|
|
|
if (res.statusCode == 200) {
|
|
|
var data=JSON.parse(res.data)
|
|
|
today_stock_img.push(data.data.url)
|
|
|
+ console.log(today_stock_img)
|
|
|
that.setData({
|
|
|
today_stock_img: today_stock_img
|
|
|
})
|
|
|
- that.loadOcr(imgs[0],data.data.url)
|
|
|
+
|
|
|
+ that.loadOcr(imgs[0],today_stock_img[0])
|
|
|
} else {
|
|
|
// 返回错误信息
|
|
|
console.log('error')
|