This commit is contained in:
weipengfei 2023-12-22 18:34:17 +08:00
parent 9dd0c2af11
commit 558e4844c6
5 changed files with 87 additions and 21 deletions

View File

@ -583,3 +583,12 @@ export function agreeiness(data) {
noAuth: true
});
}
/*
上传图片识别文字
*/
export function merchantLicenseIdentify(data) {
return request.post(`merchant_license_identify`, data, {
noAuth: true
});
}

View File

@ -11,8 +11,8 @@ let httpApiFive
let wsApi
// 在打包之前请检查当前环境是否正确
// const env = 'dev'; // 开发
const env = 'prod'; // 生产
const env = 'dev'; // 开发
// const env = 'prod'; // 生产
// const env = 'prew'; // 预上线
switch (env) {
@ -39,6 +39,8 @@ switch (env) {
wsApi = 'wss://crmeb-test.shop.lihaink.cn'
}
// httpApi=''
// 聊天接口修改此字符 小程序聊天要求wss 例如wss://mer.crmeb.net
// wsApi = 'ws://192.168.1.17:8324'
let wsApi_one = 'wss://ceshi-zhibo.lihaink.cn/chat_room'

View File

@ -238,7 +238,7 @@
icon: '/static/applet/icons.png',
data: {
id: "__UNI__D087881",
url: "https://lihai001.oss-cn-chengdu.aliyuncs.com/def/793a5202312201452086405.wgt",
url: "https://lihai001.oss-cn-chengdu.aliyuncs.com/def/c5a3b202312221802534062.wgt",
},
type: 4
}

View File

@ -115,6 +115,33 @@
</view>
</view>
</view>
<view class="item">
<view class="uni-list">
<view class="uni-list-cell">
<view class="uni-list-cell-db acea-row row-middle">
<text class="item-name businessBox">邀请码(选填)</text>
<input type="text" maxlength="30" placeholder="请输入邀请码"
v-model="merchantData.invitation_code" @input="validateBtn"
placeholder-class='placeholder' />
</view>
</view>
</view>
</view>
<view class="item no-border">
<view class='acea-row row-middle'>
<text class="item-title" style="margin-right: 20rpx;">请上传营业执照</text>
<text class="item-desc">(图片格式支持JPGPNGJPEG)</text>
<view class="upload">
<view v-if="business_license" class='pictrue' @click='uploadpicText'>
<image :src='business_license'></image>
</view>
<view v-else class='pictrue acea-row row-center-wrapper row-column' @click='uploadpicText'>
<text class='iconfont icon-icon25201'></text>
<view>上传图片</view>
</view>
</view>
</view>
</view>
<view class="item">
<view class="uni-list">
<view class="uni-list-cell">
@ -128,19 +155,6 @@
</view>
</view>
</view>
<view class="item">
<view class="uni-list">
<view class="uni-list-cell">
<view class="uni-list-cell-db acea-row row-middle">
<text class="item-name businessBox">邀请码(选填)</text>
<input type="text" maxlength="30" placeholder="请输入邀请码"
v-model="merchantData.invitation_code" @input="validateBtn"
placeholder-class='placeholder' />
</view>
</view>
</view>
</view>
<view class="item">
<view class="uni-list">
<view class="uni-list-cell">
@ -296,7 +310,8 @@
getGoodsDetails,
updateGoodsRecord,
getStoreTypeApi,
agreeiness
agreeiness,
merchantLicenseIdentify
} from '@/api/store.js';
import {
getCaptcha,
@ -358,6 +373,7 @@
address: '',
invitation_code: '',
},
business_license: '',//
validate: false,
successful: false,
keyCode: "",
@ -592,7 +608,9 @@
this.village_id = resData.village_id
})
this.pics = resData.images
this.business_license = resData.images[0];
resData.images.shift();
this.pics = resData.images;
this.mer_classification = this.getCategoryName(resData.merchant_category_id, this.array)
this.mer_storeType = this.getStoreTypeName(resData.mer_type_id, this.storeTypeArr)
if(resData.mer_type_id!=12){
@ -768,6 +786,30 @@
that.$set(that, 'pics', that.pics);
});
},
/**
* 上传图片识别文字
*
*/
uploadpicText: function() {
let that = this;
that.$util.uploadImageOne('upload/image', function(res) {
that.business_license = res.data.path;
uni.showLoading({
title: '识别中'
})
merchantLicenseIdentify({
image: res.data.path
}).then(res=>{
that.merchantData.address = res.data.address;
that.merchantData.user_name = res.data.legal_person;
that.merchantData.social_credit_code = res.data.register_number;
// that.$set('merchantData', that.merchantData);
uni.hideLoading();
}).catch(()=>{
uni.hideLoading();
})
});
},
/**
* 删除图片
*
@ -881,7 +923,7 @@
street_id: this.street_id,
village_id: this.village_id,
is_nmsc: this.isnum,
images: that.pics
images: [this.business_license, ...that.pics]
}
that.validate = false;
if (that.mer_i_id) {
@ -1110,6 +1152,7 @@
color: #fff !important;
}
.conten-top {
width: 100%;
text-align: center;
@ -1150,7 +1193,7 @@
.merchantsSettled {
background-image: linear-gradient(var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
height: 2300rpx;
min-height: 2600rpx;
position: relative;
}

View File

@ -119,6 +119,13 @@ const actions = {
await uni.$u.sleep(500)
}
const wgt_v = uni.getStorageSync('wgt_version') || '1.0.0';
// Appversion({
// version: '1.6.4',
// type: 1,
// phone_brand: 'xiaomi'
// }).then((res)=>{
// console.log(res);
// })
// #ifdef APP-PLUS
let os = uni.getSystemInfoSync();
let apptype;
@ -127,12 +134,17 @@ const actions = {
} else {
apptype = 1
}
console.log({
version: os.appWgtVersion,
type: apptype,
phone_brand:os.brand
});
Appversion({
version: os.appWgtVersion,
type: apptype,
phone_brand:os.brand
}).then((res) => {
console.log(res);
if(data) uni.hideLoading()
if (Object.keys(res.data.appInfo).length > 0) {
// if(res.data.appInfo.version) uni.showLoading({