pull/14/head
zhangyouji 10 months ago
parent 607e13f266
commit 16bbe24e5b
  1. 76
      BagStation/pages/components/price-select-tab.vue
  2. 12
      api/user.js

@ -188,6 +188,18 @@
</view>
</view>
</view>
<view>
<view>车牌识别</view>
<view>
<view class="cu-tn btn-box" @tap="srcPhoto">
拍照
</view>
</view>
</view>
<view class="bg-white padding">
<view class="">
<text class="text-bold">优惠</text>
@ -377,6 +389,7 @@
import oilOssApi from '@/api/oil-oss.js'
import utils from '@/utils/encode'
import oilInterfacesApi from '@/api/oil-interfaces.js'
import user from '@/api/user.js'
export default {
props: {
channelList: {
@ -598,6 +611,69 @@
}
},
methods: {
srcPhoto(){
let _that = this
uni.chooseImage({
count: 1, //9
sizeType: ['original', 'compressed'], //
sourceType: ['camera'], //
success: function(res) {
console.log(res)
// uni.showLoading({
// title: '',
// mask: true
// });
uni.saveImageToPhotosAlbum({
filePath: res.tempFilePaths[0],
success: function (file) {
console.log('save success',res,file);
const JSESSIONID = utils.uuid()
uni.uploadFile({
url: 'http://uat.xingoil.com/oil-oss/obejct/uploadFile',
filePath: res.tempFilePaths[0],
formData: {
ossKey: 'xingyou',
pathKey: 'certificate',
encrypt: 'PUBLIC',
},
name: 'file',
header: {
"Content-Type": "multipart/form-data",
"Authorization": uni.getStorageSync('Authorization'),
'dataSources': 'MP',
"imei": uni.getStorageSync('unionid'),
"openId": uni.getStorageSync('openid'),
'JSESSIONID': JSESSIONID,
'token': utils.md5Salt(JSESSIONID)
},
success(e) {
uni.hideLoading()
console.log('进入2')
console.log(e)
// let obj = JSON.parse(e.data),
// url = obj.data.publicUrl
// user.carNoIdentify(data).then((res) => {
// console.log(res)
// let obj = JSON.parse(res.data)
// console.log(obj)
// })
},fail(res){
uni.hideLoading()
console.log(res,'fail')
}
})
}
});
}
})
},
typeChenk() {
return this.channelList[this.activeCur]?.secondChannelCode && this.thirdPartyDynamicData.includes(this
.channelList[this.activeCur].secondChannelCode)

@ -0,0 +1,12 @@
import request from '@/utils/request'
const service_name = "user"
const group_name = "oilCustomerInfo"
export default{
carNoIdentify(data) { //图片上传-ORC识别
return request({
url: `/${service_name}/${group_name}/carNoIdentify`,
method: 'post',
data: data
})
},
}
Loading…
Cancel
Save