Commit f1ebcc8e authored by 李俊赕's avatar 李俊赕

add-web

parent f3366d32
......@@ -13,15 +13,15 @@ let settledApiFun = function(vm){
/* 校验身份证反面 */
let checkSettleIDCardBack = async (params = {}) => await vm.$u.post(codeApiUrl+'/v1/h5/settled/card-back', params);
/* 缴纳保证金 */
// let paySettleDeposit = async (params = {}) => await vm.$u.post('/rest-xue.yunya.com/v1/settled/pay-deposit', params,{'content-type': 'application/x-www-form-urlencoded'});
let paySettleDeposit = async (params = {}) => await vm.$u.post('http://apidoc.banshouhui.com:3000/mock/52/v1/settled/pay-deposit', params,{'content-type': 'application/x-www-form-urlencoded'});
let getSettleDepositResult = async (params = {}) => await vm.$u.post('http://apidoc.banshouhui.com:3000/mock/52/v1/settled/pay-deposit', params,{'content-type': 'application/x-www-form-urlencoded'});
let paySettleDeposit = async (params = {}) => await vm.$u.post(codeApiUrl+'/v1/settled/pay-deposit', params,{'content-type': 'application/x-www-form-urlencoded'});
let getSettleDepositResult = async (params = {}) => await vm.$u.post(codeApiUrl+'/v1/settled/pay-deposit', params,{'content-type': 'application/x-www-form-urlencoded'});
/* 校验银行卡 */
let checkSettleBank = async (params = {}) => await vm.$u.get('/wxh-site-rest/rest/register/verifyBankCard', 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'});
/* 提交认证资料 */
const settledApi = {
getSettleBaseInfo,
......
......@@ -13,6 +13,11 @@ let askUrl = {
let ucenterUrl = {
apiBaseUrl: 'https://u.banshouhui.com'
}
let systemUrl = {
apiUrl:'https://system.banshouhui.com'
}
/* --------------------------- prod end --------------------------- */
/* --------------------------- test begin --------------------------- */
......@@ -32,6 +37,9 @@ codeUrl = {
apiUrl: 'http://rest-u.yunya.com',
apiBaseUrl: 'https://code.banshouhui.com',
}
systemUrl = {
apiUrl:'http://192.168.0.208:37080' //小青
}
/* --------------------------- test end --------------------------- */
function getCodeUrl(uri) {
......@@ -45,5 +53,6 @@ export default {
askUrl,
ucenterUrl,
getCodeUrl,
getUcenterUrl
getUcenterUrl,
systemUrl
}
......@@ -71,6 +71,12 @@
"navigationBarTitleText": "签约页面"
}
},{
"path": "pages/settle/web",
"style": {
"navigationBarTitleText": "签约页面"
}
},
{
"path": "pages/index/index",
......
......@@ -52,11 +52,7 @@
</template>
<script>
let r = require("../../libs/bmap-wx.min.js");
let h = new r.BMapWX({
// ak: "rpVq5d3yxaRCoKzVwmFMo0o4iC524CAG",
ak: "lF1HoyXdiv4uZx6TrGQEZs48F5y8kEHI"
});
import globalUrl from '@/common/base_url.js'
export default {
data() {
return {
......@@ -84,6 +80,7 @@
},
onShow(){
console.log('onshow')
// this.goSign()
},
computed: {
submitStatus() {
......@@ -177,18 +174,28 @@
});
return !flagArr || flagArr.length < 1;
},
async checkBank(){
const type = this.baseInfo.pay_type
const request = {
bankcard:this.$u.api.checkSettleBank,
alipay:this.$u.api.checkSettleAlipay
}
const res = await request[type]()
if(res.code!==200){
return
}
return true
},
// async checkBank(){
// const baseInfo = this.baseInfo;
// const type = this.baseInfo.pay_type
// const request = {
// bankcard:this.$u.api.checkSettleBank,
// alipay:this.$u.api.checkSettleAlipay
// }
// const params = {
// name:baseInfo.bank_name,
// }
// if(type==='bankcard'){
// params['cardNumber'] = baseInfo.bank_no
// }else if(type==='alipay'){
// params['account'] = baseInfo.bank_no
// }
// const res = await request[type](params)
// if(res.code!==200){
// return
// }
// return true
// },
async submitInfo(){
// checkSettleSignInfo
const baseInfo = this.baseInfo;
......@@ -230,7 +237,7 @@
uni.showLoading({
title: '加载中'
});
const requestArr = ['checkBank','submitBaseInfo','jumpSign']
const requestArr = ['submitBaseInfo','jumpSign']
for(let i=0;i<requestArr.length;i++){
const result = await this[requestArr[i]]()
if(!result){
......@@ -250,6 +257,27 @@
})
}, 2000)
},
async goSign(){
const token = 'RTOKEN49eac6c2979528824a4d5a7b09c221fa954c70ce';
const params = {
namePsn:'郭小清',
idNumberPsn:'43072219800123456',
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({
title:'跳转签约失败',
icon:'none'
})
return
}
const url = res.data
uni.navigateTo({
url:'/pages/settle/web?url='+url
})
}
},
}
</script>
......
<template>
<view class="">
<web-view :src="webUrl"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
webUrl:'',
}
},
onLoad(e) {
this.initUrl(e)
},
methods: {
initUrl(e){
let webUrl = ''
if(e.url){
webUrl = e.url
}
this.webUrl = webUrl
}
}
}
</script>
<style>
</style>
......@@ -9,7 +9,6 @@
data() {
return {
webUrl:'',
from:'',
}
},
onLoad(e) {
......
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