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

'接口联调-签约页面'

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