achao 3 năm trước cách đây
mục cha
commit
571ba02bbf
2 tập tin đã thay đổi với 27 bổ sung3 xóa
  1. 2 2
      config/index.js
  2. 25 1
      pages/mine/company/addcompany.vue

+ 2 - 2
config/index.js

@@ -1,6 +1,6 @@
 const dev = {
-	baseUrlNew: 'https://apitest.eliangeyun.com',
-	// baseUrlNew: 'http://192.168.1.114:8099',
+	// baseUrlNew: 'https://apitest.eliangeyun.com',
+	baseUrlNew: 'http://192.168.1.114:8099',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 }

+ 25 - 1
pages/mine/company/addcompany.vue

@@ -14,7 +14,7 @@
 			<view class="flex border-bottom mt20 align-center">
 				<view class="left">企业名称</view>
 				<view class="flex right">
-					<u--input placeholder="输入企业名称" inputAlign='left' border="none" v-model="dataDetails.companyName">
+					<u--input placeholder="输入企业名称" inputAlign='left' border="none" v-model="dataDetails.companyName" @blur='companyNameBlur'>
 					</u--input>
 				</view>
 			</view>
@@ -235,6 +235,30 @@
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		methods: {
+			companyNameBlur(){
+				this.$request.baseRequest('get', '/companyInfo/repeatCompanyInfo', {
+						commonId: this.userInfo.id,
+						companyName:this.dataDetails.companyName
+					}).then(res => {
+						if (res.code==200) {debugger
+							// that.dataDetails.legalPersonName = res.data.name
+						}else{
+							uni.showToast({
+								title: res.message,
+								icon: 'none',
+								duration: 2000
+							})
+						}
+					})
+					.catch(res => {
+						uni.hideLoading()
+						uni.showToast({
+							title: res.message,
+							icon: 'none',
+							duration: 2000
+						})
+					});
+			},
 			getName(){
 				let that = this
 				this.$request.baseRequest('get', '/cargoOwnerInfo/selectCargoOwner', {