Commit a3f57b0b authored by 李超鹏's avatar 李超鹏

'接口联调-签约页面'

parent 9d844c31
...@@ -22,7 +22,7 @@ let settledApiFun = function(vm){ ...@@ -22,7 +22,7 @@ let settledApiFun = function(vm){
/* 校验支付宝 */ /* 校验支付宝 */
let checkSettleAlipay = async (params = {}) => await vm.$u.get('/wxh-site-rest/rest/register/verifyAlipayAccount', params); let checkSettleAlipay = async (params = {}) => await vm.$u.get('/wxh-site-rest/rest/register/verifyAlipayAccount', params);
/* 提交认证资料 */ /* 提交认证资料 */
let checkSettleSignInfo = async (params = {}) => await vm.$u.get('/v1/settled/check-sign-info', params,{'content-type': 'application/x-www-form-urlencoded'}); let checkSettleSignInfo = async (params = {}) => await vm.$u.post(codeApiUrl+'/v1/settled/check-sign-info', params,{'content-type': 'application/x-www-form-urlencoded'});
/* 提交认证资料 */ /* 提交认证资料 */
const settledApi = { const settledApi = {
......
...@@ -32,7 +32,7 @@ ucenterUrl = { ...@@ -32,7 +32,7 @@ ucenterUrl = {
//apiBaseUrl: 'http://u.yunya.com', //apiBaseUrl: 'http://u.yunya.com',
apiBaseUrl: 'http://fa.test.ibanshou.cn' apiBaseUrl: 'http://fa.test.ibanshou.cn'
} }
codeUrl = { codeUrl = {
apiUrl: 'http://rest-u.yunya.com', apiUrl: 'http://rest-u.yunya.com',
apiBaseUrl: 'https://code.banshouhui.com', apiBaseUrl: 'https://code.banshouhui.com',
......
...@@ -53,12 +53,15 @@ ...@@ -53,12 +53,15 @@
<script> <script>
import globalUrl from '@/common/base_url.js' import globalUrl from '@/common/base_url.js'
const codeApiurl = globalUrl.codeUrl.apiUrl
const app = getApp()
export default { export default {
data() { data() {
return { return {
token:app.globalData.token,
baseInfo: { baseInfo: {
name: "张三", name: "郭小清",
id_card_no: "", id_card_no: "43072219800123456",
id: "", id: "",
bank_no: '',// 银行卡号 bank_no: '',// 银行卡号
bank_site:'', // 开户行 bank_site:'', // 开户行
...@@ -72,9 +75,7 @@ ...@@ -72,9 +75,7 @@
name:'支付宝', name:'支付宝',
value:'alipay' value:'alipay'
}], }],
baseInfo:{ info:{},
},
saving: false, saving: false,
} }
}, },
...@@ -201,18 +202,34 @@ ...@@ -201,18 +202,34 @@
// return true // return true
// }, // },
async getBaseInfo(){ async getBaseInfo(){
const params = { // uni.request({
// url: codeApiurl + '/v1/settled/get-settled-info?access-token='+this.token,
} // method: 'GET',
const res = this.$u.api.getSettleBaseInfo(params) // data: {},
if (res.status != 200) { // success: (res) => {
// console.log(res,'res')
// if (res.status != 200) {
// uni.showToast({
// title: res.message,
// icon: 'none'
// });
// return;
// }
// console.log(res,'res')
// }
// })
const res = await this.$u.api.getSettleBaseInfo()
console.log(res,'res')
if (!res.status) {
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
icon: 'none' icon: 'none'
}); });
return; return;
} }
console.log(res,'res') this.info = res.data.record
this.baseInfo.name = this.info.name
console.log(this.info,'res')
return true return true
}, },
async submitInfo(){ async submitInfo(){
...@@ -256,13 +273,16 @@ ...@@ -256,13 +273,16 @@
uni.showLoading({ uni.showLoading({
title: '加载中' title: '加载中'
}); });
const requestArr = ['submitBaseInfo','jumpSign'] const result = await this.submitInfo()
for(let i=0;i<requestArr.length;i++){ console.log(result)
const result = await this[requestArr[i]]() // const requestArr = ['submitBaseInfo','jumpSign']
if(!result){ // for(let i=0;i<requestArr.length;i++){
break; // const result = await this[requestArr[i]]()
} // console.log(result,'result')
} // if(!result){
// break;
// }
// }
this.saving = false; this.saving = false;
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
...@@ -278,12 +298,19 @@ ...@@ -278,12 +298,19 @@
}, },
async goSign(){ async goSign(){
const token = 'RTOKEN49eac6c2979528824a4d5a7b09c221fa954c70ce'; const token = 'RTOKEN49eac6c2979528824a4d5a7b09c221fa954c70ce';
const info = this.info
const params = { const params = {
namePsn:'郭小清', namePsn:'郭小清',
idNumberPsn:'43072219800123456', idNumberPsn:'43072219800123456',
province:'湖南省', province:'湖南省',
city:'长沙市' city:'长沙市'
} }
// const params = {
// namePsn:info.id_card_name,
// idNumberPsn:info.id_card_number,
// province:'湖南省',
// city:'长沙市'
// }
const res = await this.$u.post(globalUrl.systemUrl.apiUrl + '/wxh-worker-rest/rest/third/'+token+'/wuKong/sign',params,{'content-type': 'application/x-www-form-urlencoded'}) const res = await this.$u.post(globalUrl.systemUrl.apiUrl + '/wxh-worker-rest/rest/third/'+token+'/wuKong/sign',params,{'content-type': 'application/x-www-form-urlencoded'})
if(res.code!==200){ if(res.code!==200){
uni.showToast({ uni.showToast({
......
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