Commit 6c8000fe authored by 和慭琛's avatar 和慭琛

bug-fix

parent e7cf7cae
...@@ -25,8 +25,7 @@ ...@@ -25,8 +25,7 @@
//domain_Name: 'http://192.168.0.208:37080', //domain_Name: 'http://192.168.0.208:37080',
token:'', token:'',
//RTOKEN45f41a3053238cb72b3b72fe14df8d7040c9f502 //RTOKEN45f41a3053238cb72b3b72fe14df8d7040c9f502
openId:'',
//定位 图标 //定位 图标
icon_location:'https://qn-static.banshouhui.com/take_order/icon/location.png', icon_location:'https://qn-static.banshouhui.com/take_order/icon/location.png',
...@@ -95,7 +94,9 @@ ...@@ -95,7 +94,9 @@
configCompletion:'', configCompletion:'',
protocolContent:'', protocolContent:'',
settledInfo:null,
signUrl:'',
}, },
...@@ -136,26 +137,7 @@ ...@@ -136,26 +137,7 @@
}, },
methods: { methods: {
async getBaseInfo(vm,callBack){
console.log('getbaseifno')
uni.showLoading({
title:'加载中……'
})
const res = await vm.$u.api.getSettleBaseInfo()
if (!res.status) {
uni.showToast({
title: res.message || '获取基本信息错误',
icon: 'none'
});
return false;
}
this.globalData.settledInfo = res.data
console.log(res.data,'res.data')
callBack(vm,res.data)
uni.hideLoading()
return res.data
},
initAPIneedToken: function() { initAPIneedToken: function() {
......
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
// apiUrl: 'http://rest-u.yunya.com', // apiUrl: 'http://rest-u.yunya.com',
// fileUrl: 'https://s-fa.banshouhui.com', // fileUrl: 'https://s-fa.banshouhui.com',
// } // }
//yore
/*
let ucenterUrl = { let ucenterUrl = {
apiUrl: 'https://rest-u.banshouhui.com', //php端域名请求头 apiUrl: 'https://rest-u.banshouhui.com', //php端域名请求头
xueUrl:'https://xue.banshouhui.com', //学院 xueUrl:'https://xue.banshouhui.com', //学院
...@@ -18,19 +21,19 @@ let ucenterUrl = { ...@@ -18,19 +21,19 @@ let ucenterUrl = {
let systemUrl = { let systemUrl = {
apiUrl:'https://system.banshouhui.com', //java端域名请求头 apiUrl:'https://system.banshouhui.com', //java端域名请求头
} }
*/
/* --------------------------- prod end --------------------------- */ /* --------------------------- prod end --------------------------- */
/* --------------------------- test begin --------------------------- */ /* --------------------------- test begin --------------------------- */
ucenterUrl = { let ucenterUrl = {
apiUrl: 'https://rest-u.test.ibanshou.cn', apiUrl: 'https://rest-u.test.ibanshou.cn',
xueUrl:'https://xue.test.ibanshou.cn', //学院 xueUrl:'https://xue.test.ibanshou.cn', //学院
banshou:'https://m.test.ibanshou.cn/', //扳手app banshou:'https://m.test.ibanshou.cn/', //扳手app
} }
systemUrl = { let systemUrl = {
apiUrl:'https://system.dev.banshouhui.com' apiUrl:'https://system.dev.banshouhui.com'
} }
// askUrl = { // askUrl = {
......
...@@ -2,16 +2,16 @@ ...@@ -2,16 +2,16 @@
<view class="content"> <view class="content">
<view class="title">入驻基本信息</view> <view class="title">入驻基本信息</view>
<view class="base-list"> <view class="base-list">
<view class="item item-input flex-yc"> <!--view class="item item-input flex-yc">
<label class="label">姓名</label> <label class="label">姓名</label>
<span class="required">*</span> <span class="required">*</span>
<input placeholder="请输入您的姓名" v-model.trim="baseInfo.name" class="input flex1" /> <input placeholder="请输入您的姓名" v-model.trim="baseInfo.name" class="input flex1" />
</view> </view-->
<view class="item item-input flex u-row-between"> <!--view class="item item-input flex u-row-between">
<label class="label">电话</label> <label class="label">电话</label>
<span class="required">*</span> <span class="required">*</span>
<input placeholder="请输入您的电话" v-model="baseInfo.mobile" class="input flex1" /> <input placeholder="请输入您的电话" v-model="baseInfo.mobile" class="input flex1" />
</view> </view-->
<view class="item item-select u-row-between" @click="gopage('/pages/settle/select?selectType=area')"> <view class="item item-select u-row-between" @click="gopage('/pages/settle/select?selectType=area')">
<view class="label">接单城市:</view> <view class="label">接单城市:</view>
<p class="u-flex-1 u-text-right txt">{{ areaTxts.join(',') || "" }}</p> <p class="u-flex-1 u-text-right txt">{{ areaTxts.join(',') || "" }}</p>
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
placeholder="请输入师傅数量" placeholder="请输入师傅数量"
placeholder-style='color:#CCCCCC;font-size:32rpx;'/> placeholder-style='color:#CCCCCC;font-size:32rpx;'/>
</view> </view>
<view class="tips bottom_padding_80">(必选项)选择你从事电工工作的工龄</view> <view class="tips bottom_padding_80">(选填项)输入可投入交付服务的人员数量</view>
...@@ -122,7 +122,8 @@ ...@@ -122,7 +122,8 @@
computed: { computed: {
submitStatus() { submitStatus() {
const baseInfo = this.baseInfo const baseInfo = this.baseInfo
const flag = baseInfo.name && baseInfo.mobile && baseInfo.service_area && baseInfo.working_age !== '' //baseInfo.name && baseInfo.mobile &&
const flag = baseInfo.service_area && baseInfo.working_age !== ''
return flag && !this.saving; return flag && !this.saving;
}, },
}, },
...@@ -222,8 +223,11 @@ ...@@ -222,8 +223,11 @@
}); });
}, },
checkBaseInfo() { checkBaseInfo() {
console.log('非空判断-checkBaseInfo-this.baseInfo:')
console.log(this.baseInfo)
const baseInfo = this.baseInfo; const baseInfo = this.baseInfo;
let rulesObj = { let rulesObj = {
/*
name: function(value) { name: function(value) {
if (!value) { if (!value) {
uni.showToast({ uni.showToast({
...@@ -250,8 +254,11 @@ ...@@ -250,8 +254,11 @@
return false; return false;
} }
}, },
*/
service_area: function(value) { service_area: function(value) {
if (!value) { console.log('接单城市非空判断-value.length:')
console.log(value.length)
if (!value || value.length==0) {
uni.showToast({ uni.showToast({
title: '请选择您的接单城市', title: '请选择您的接单城市',
icon: 'none' icon: 'none'
...@@ -268,6 +275,16 @@ ...@@ -268,6 +275,16 @@
return false; return false;
} }
}, },
//address
address: function(value) {
if (value === '') {
uni.showToast({
title: '请选择您的地址',
icon: 'none'
});
return false;
}
},
}; };
...@@ -287,8 +304,8 @@ ...@@ -287,8 +304,8 @@
}, },
submitBaseInfo() { submitBaseInfo() {
// this.newSubmitBaseInfo() this.newSubmitBaseInfo()
// return return
const baseInfo = this.baseInfo; const baseInfo = this.baseInfo;
if (!this.checkBaseInfo()) { if (!this.checkBaseInfo()) {
...@@ -305,12 +322,17 @@ ...@@ -305,12 +322,17 @@
const res = this.$u.api.submitSettleBaseInfo(params) const res = this.$u.api.submitSettleBaseInfo(params)
this.saving = false; this.saving = false;
uni.hideLoading() uni.hideLoading()
if (res) { if (res.status != 200) {
uni.showToast({ uni.showToast({
title: '入驻基本信息提交成功', title: res.message,
icon: 'success' icon: 'none'
}); });
return;
} }
uni.showToast({
title: '入驻基本信息提交成功',
icon: 'success'
});
let timer = setTimeout(() => { let timer = setTimeout(() => {
clearTimeout(timer) clearTimeout(timer)
uni.navigateTo({ uni.navigateTo({
...@@ -320,84 +342,86 @@ ...@@ -320,84 +342,86 @@
}, },
// newSubmitBaseInfo: function(){ newSubmitBaseInfo: function(){
// const baseInfo = this.baseInfo; const baseInfo = this.baseInfo;
// if (!this.checkBaseInfo()) { if (!this.checkBaseInfo()) {
// return; return;
// } }
// this.saving = true; this.saving = true;
// uni.showLoading({ uni.showLoading({
// title: '加载中' title: '加载中'
// }); });
// const params = { const params = {
// ...baseInfo, ...baseInfo,
// } }
// params.service_area = baseInfo.service_area.join(',') params.service_area = baseInfo.service_area.join(',')
// let that = this //http://rest-u.yunya.com
// uni.request({ let that = this
// url: 'http://rest-u.yunya.com/v1/settled/save-info', uni.request({
// method: 'POST', url: 'https://rest-u.test.ibanshou.cn/v1/settled/save-info'
// data: { +'?access-token='+getApp().globalData.token,
// name: params.name, method: 'POST',
// mobile: params.mobile, data: {
// service_area: params.service_area, name: params.name,
// working_age: params.working_age, mobile: params.mobile,
// worker_num:params.worker_num, service_area: params.service_area,
// address:params.address, working_age: params.working_age,
// access_token:getApp().globalData.token worker_num:params.worker_num,
// }, address:params.address
// success: (res) => { //access_token:getApp().globalData.token
// uni.hideLoading() },
// console.log('提交 入驻信息 成功') success: (res) => {
// console.log(res) uni.hideLoading()
console.log('提交 入驻信息 成功')
console.log(res)
// if(res.statusCode==401){ if(res.statusCode==401){
// uni.navigateTo({ uni.navigateTo({
// url:'/pages/login/wxlogin' url:'/pages/login/wxlogin'
// }) })
// return return
// } }
// if(res.statusCode==200){ if(res.statusCode==200){
// console.log('提交 入驻信息 成功 200') console.log('提交 入驻信息 成功 200')
// uni.showToast({ uni.showToast({
// title: '入驻基本信息提交成功', title: '入驻基本信息提交成功',
// icon: 'success' icon: 'success'
// }); });
// let timer = setTimeout(() => { let timer = setTimeout(() => {
// clearTimeout(timer) clearTimeout(timer)
// uni.navigateTo({ uni.navigateTo({
// url:'/pages/settle/file' url:'/pages/settle/file'
// }) })
// }, 2000) }, 2000)
// }else{ }else{
// uni.showToast({ uni.showToast({
// icon:'none', icon:'none',
// title:res.data.message title:res.data.message
// }) })
// } }
// }, },
// fail: (e) => { fail: (e) => {
// uni.hideLoading() uni.hideLoading()
// uni.showToast({ uni.showToast({
// icon:'none', icon:'none',
// title:'提交入驻信息失败' title:'提交入驻信息失败'
// }) })
// console.log('提交 入驻信息 失败') console.log('提交 入驻信息 失败')
// console.log(e) console.log(e)
// } }
// }) })
// }, },
}, },
} }
...@@ -423,6 +447,13 @@ ...@@ -423,6 +447,13 @@
line-height: 44rpx; line-height: 44rpx;
color: #333; color: #333;
font-size: 32rpx; font-size: 32rpx;
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
word-wrap: break-word;
white-space: normal !important;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
} }
.required { .required {
...@@ -550,13 +581,14 @@ ...@@ -550,13 +581,14 @@
/*提交按钮*/ /*提交按钮*/
.btn-wrap { .btn-wrap {
position: fixed; //position: fixed;
// margin: px2rem(36); //left: 0;
left: 0; //right: 0;
right: 0; //bottom: 0;
bottom: 0;
padding: 30rpx 0; padding: 30rpx 0;
background: #f3f3f3; background: #f3f3f3;
width: 100%;
.btn-submit { .btn-submit {
width: 600rpx; width: 600rpx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment