Commit 445c1574 authored by 李俊赕's avatar 李俊赕

test

parent afb7a491
......@@ -93,8 +93,8 @@
//工单完工
configCompletion:'',
protocolContent:''
protocolContent:'',
settledInfo:null,
},
......@@ -135,7 +135,27 @@
},
methods: {
async getBaseInfo(vm,callBack){
console.log('getbaseifno')
uni.showLoading({
title:'加载中……'
})
console.log(vm.$u.api,'this.$u.api')
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() {
......
......@@ -7,7 +7,7 @@ let settledApiFun = function(vm){
/* 获取认证区域信息 */
let getSettleArea = async (params = {}) => await vm.$u.get(ucenterApiUrl + '/v1/settled/area', params);
/* 提交用户基本信息 */
let submitSettleBaseInfo = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/settled/save-info', params);
let submitSettleBaseInfo = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/save-info', params);
/* 校验身份证正面 */
let checkSettleIDCardFront = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/card-front', params);
......@@ -15,6 +15,9 @@ let settledApiFun = function(vm){
/* 校验身份证反面 */
let checkSettleIDCardBack = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/card-back', params);
/* 提交用户资料 */
let submitSettleFileInfo = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/submit-info', params);
/* 缴纳保证金 */
let paySettleDeposit = async (params = {}) => await vm.$u.post(ucenterApiUrl + '/v1/settled/pay-deposit' , params,{'content-type': 'application/x-www-form-urlencoded'});
......@@ -35,6 +38,7 @@ let settledApiFun = function(vm){
submitSettleBaseInfo,
checkSettleIDCardFront,
checkSettleIDCardBack,
submitSettleFileInfo,
paySettleDeposit,
getSettleDepositResult,
// checkSettleBank,
......
......@@ -11,7 +11,9 @@
// fileUrl: 'https://s-fa.banshouhui.com',
// }
let ucenterUrl = {
apiUrl: 'https://u.banshouhui.com', //php端域名请求头
apiUrl: 'https://rest-u.banshouhui.com', //php端域名请求头
xueUrl:'https://xue.banshouhui.com', //学院
banshou:'https://m.banshou.com' ,//扳手app
}
let systemUrl = {
apiUrl:'https://system.banshouhui.com', //java端域名请求头
......@@ -23,7 +25,10 @@ let systemUrl = {
/* --------------------------- test begin --------------------------- */
ucenterUrl = {
apiUrl: 'https://u.yunya.com'
apiUrl: 'https://rest-u.test.ibanshou.cn',
xueUrl:'https://xue.test.ibanshou.cn', //学院
banshou:'https://m.test.ibanshou.cn/', //扳手app
}
systemUrl = {
apiUrl:'https://system.dev.banshouhui.com'
......@@ -52,13 +57,17 @@ systemUrl = {
/* --------------------------- dev begin --------------------------- */
ucenterUrl = {
apiUrl: 'http://rest-u.yunya.com'
}
systemUrl = {
// apiUrl:'https://192.168.1.22'
apiUrl:'http://192.168.0.208:8192' //郭小青电脑
}
// ucenterUrl = {
// apiUrl: 'http://rest-u.yunya.com',
// xueUrl:'http://rest-xue.yunya.com', //学院
// banshou:'https://m.test.ibanshou.cn/', //扳手app
// }
// systemUrl = {
// // apiUrl:'https://192.168.1.22'
// // apiUrl:'http://192.168.0.208:37080' //郭小青电脑
// apiUrl:'http://192.168.0.208:8192'
// }
/* --------------------------- test end --------------------------- */
......
......@@ -154,13 +154,24 @@ const install = (Vue, vm) => {
return result;
default:
if (res.statusCode == 200) {
if(!result.data){
return {
data:res.data,
code:res.statusCode,
message:res.message || res.errMsg || ''
};
}
return res.data;
} else {
} else if(res.statusCode == 401){
vm.$u.route('/pages/login/wxlogin');
} else{
vm.$u.toast('网络请求错误!');
}
}
}
}
// 将返回值统一封装为直接返回对象的统一封装{data:data,code:200,message:message}形式
export default {
install
......
......@@ -6,7 +6,7 @@ export default {
data() {
return {
domain: 'http://upload.qiniup.com',
uptokenURL: globalUrl.codeUrl.apiUrl + '/v1/tokens',
uptokenURL: globalUrl.ucenterUrl.apiUrl + '/v1/tokens',
imgList: [],
imgs:[],
uploadToken: ''
......
{
"easycom": {
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
},
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/exam/start",
"style": {
"navigationBarTitleText": "考试"
}
},
{
"path": "pages/exam/index",
"style": {
"navigationBarTitleText": "入驻考试"
}
},
{
"path": "pages/settle/file",
"style": {
"navigationBarTitleText": "入驻资料"
}
},
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "下单"
}
},
{
"path": "pages/settle/index",
"style": {
"navigationBarTitleText": "充电桩安装招募"
}
},
{
"path": "pages/video/index",
"style": {
"navigationBarTitleText": "培训&考试"
}
},
{
"path": "pages/settle/base",
"style": {
"navigationBarTitleText": "入驻信息"
}
{
"path": "pages/settle/index",
"style": {
"navigationBarTitleText": "充电桩安装招募"
}
},{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "下单"
}
},
{
"path": "pages/exam/start",
"style": {
"navigationBarTitleText": "考试"
}
},
{
"path": "pages/exam/index",
"style": {
"navigationBarTitleText": "入驻考试"
}
},
{
"path": "pages/settle/file",
"style": {
"navigationBarTitleText": "入驻资料"
}
},
{
"path": "pages/video/index",
"style": {
"navigationBarTitleText": "培训&考试"
}
},
{
"path": "pages/settle/base",
"style": {
"navigationBarTitleText": "入驻信息"
}
},
{
"path": "pages/settle/select",
"style": {
"navigationBarTitleText": "选择可服务的城市"
}
},
{
"path": "pages/settle/file-upload",
"style": {
"navigationBarTitleText": "图片上传"
}
},
{
"path": "pages/settle/file-upload",
"style": {
"navigationBarTitleText": "图片上传"
}
},
{
"path": "pages/settle/pay-ensure",
"style": {
"navigationBarTitleText": "缴纳保证金"
}
},
{
"path": "pages/settle/prompt",
"style": {
"navigationBarTitleText": "入驻提示"
}
},{
}, {
"path": "pages/settle/sign-contract",
"style": {
"navigationBarTitleText": "签约页面"
}
},{
}, {
"path": "pages/settle/web",
"style": {
"navigationBarTitleText": "签约页面"
}
},
{
"path": "pages/sign/index",
"style": {
"navigationBarTitleText": "入驻签约"
}
},
{
"path": "pages/photo/product",
"style": {
"navigationBarTitleText": "扳手会工单规范"
}
},
{
"path": "pages/take/detail",
"style": {
"navigationBarTitleText": "工单详情"
}
},
{
"path": "pages/sign/index",
"style": {
"navigationBarTitleText": "入驻签约"
}
},
{
"path": "pages/photo/product",
"style": {
"navigationBarTitleText": "扳手会工单规范"
}
},
{
"path": "pages/take/detail",
"style": {
"navigationBarTitleText": "工单详情"
}
},
{
"path": "pages/photo/try",
"style": {
"navigationBarTitleText": "拍照",
"navigationBarBackgroundColor":"#333333",
"navigationBarTextStyle":"#FFFFFF",
"disableScroll":true
"navigationBarTitleText": "拍照",
"navigationBarBackgroundColor": "#333333",
"navigationBarTextStyle": "#FFFFFF",
"disableScroll": true
}
},
{
"path": "pages/photo/detail",
"style": {
"navigationBarTitleText": "图片展示",
"navigationBarBackgroundColor":"#333333",
"navigationBarTextStyle":"#FFFFFF",
"disableScroll":true
"navigationBarTitleText": "图片展示",
"navigationBarBackgroundColor": "#333333",
"navigationBarTextStyle": "#FFFFFF",
"disableScroll": true
}
},
......@@ -186,7 +168,7 @@
{
......@@ -198,8 +180,8 @@
{
"path": "pages/photo/take",
"style": {
"navigationBarTitleText": "拍照-ljd",
"disableScroll":true
"navigationBarTitleText": "拍照-ljd",
"disableScroll": true
}
},
......@@ -230,13 +212,13 @@
"navigationBarTitleText": "下载APP"
}
},
{
"path": "pages/take/index",
"style": {
"navigationBarTitleText": "接单"
}
},
{
"path": "pages/take/index",
"style": {
"navigationBarTitleText": "接单"
}
},
{
......@@ -271,7 +253,7 @@
}
},
{
"path": "pages/take/rob",
......@@ -302,13 +284,13 @@
"condition": { //模式配置,仅开发期间生效
"current": 0, //当前激活的模式(list 的索引项)
"list": [{
"name": "考试模块", //模式名称
"name": "观看视频", //模式名称
"path": "pages/video/index", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
},{
"name": "基本信息", //模式名称
"path": "pages/settle/base", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
// },{
// "name": "基本信息", //模式名称
// "path": "pages/settle/base", //启动页面,必选
// "query": "" //启动参数,在页面的onLoad函数里面得到
},{
"name": "资料信息", //模式名称
"path": "pages/settle/file", //启动页面,必选
......
......@@ -38,13 +38,16 @@
</template>
<script>
import globalData from '@/common/base_url.js'
const systemApiUrl = globalData.systemUrl.apiUrl
export default {
data() {
return {
examId:2,
userExamId:0,
userAnswerIds:'',
isStart:true,
isStart:false,
currentNumber:1,
currentItem:null,
isSelect:false,
......@@ -81,7 +84,7 @@
let that = this
uni.request({
url: getApp().globalData.domain_Name
url:systemApiUrl
+'/wxh-worker-rest/rest/exam'
+'/serviceRule/userExamInfo/'
+getApp().globalData.token
......@@ -95,10 +98,10 @@
},
success: (res) => {
uni.hideLoading()
console.log('获取考试信息 成功')
console.log(res)
if(res.statusCode==401 || res.statusCode==403 ){
if(!res.data){
return
}
if(res.data.code==401 || res.data.code==403 ){
uni.navigateTo({
url:'/pages/login/wxlogin'
})
......@@ -151,7 +154,7 @@
let that = this
uni.request({
url: getApp().globalData.domain_Name
url: systemApiUrl
+'/wxh-worker-rest/rest/exam'
+'/serviceRule/'
+getApp().globalData.token
......@@ -223,7 +226,7 @@
let that = this
uni.request({
url: getApp().globalData.domain_Name
url: systemApiUrl
+'/wxh-worker-rest/rest/exam'
+'/serviceRule/next/'
+getApp().globalData.token
......@@ -369,7 +372,7 @@
if(this.bottomTitle == '完成考试,现在签约'){
uni.navigateTo({
url:'/pages/sign/index'
url:'/pages/settle/sign-contract'
})
return
}
......
......@@ -287,8 +287,8 @@
},
submitBaseInfo() {
this.newSubmitBaseInfo()
return
// this.newSubmitBaseInfo()
// return
const baseInfo = this.baseInfo;
if (!this.checkBaseInfo()) {
......@@ -305,17 +305,12 @@
const res = this.$u.api.submitSettleBaseInfo(params)
this.saving = false;
uni.hideLoading()
if (res.status != 200) {
if (res) {
uni.showToast({
title: res.message,
icon: 'none'
title: '入驻基本信息提交成功',
icon: 'success'
});
return;
}
uni.showToast({
title: '入驻基本信息提交成功',
icon: 'success'
});
let timer = setTimeout(() => {
clearTimeout(timer)
uni.navigateTo({
......@@ -325,84 +320,84 @@
},
newSubmitBaseInfo: function(){
// newSubmitBaseInfo: function(){
const baseInfo = this.baseInfo;
if (!this.checkBaseInfo()) {
return;
}
this.saving = true;
uni.showLoading({
title: '加载中'
});
const params = {
...baseInfo,
}
params.service_area = baseInfo.service_area.join(',')
// const baseInfo = this.baseInfo;
// if (!this.checkBaseInfo()) {
// return;
// }
// this.saving = true;
// uni.showLoading({
// title: '加载中'
// });
// const params = {
// ...baseInfo,
// }
// params.service_area = baseInfo.service_area.join(',')
let that = this
uni.request({
url: 'http://rest-u.yunya.com/v1/settled/save-info',
method: 'POST',
data: {
name: params.name,
mobile: params.mobile,
service_area: params.service_area,
working_age: params.working_age,
worker_num:params.worker_num,
address:params.address,
access_token:getApp().globalData.token
},
success: (res) => {
uni.hideLoading()
console.log('提交 入驻信息 成功')
console.log(res)
// let that = this
// uni.request({
// url: 'http://rest-u.yunya.com/v1/settled/save-info',
// method: 'POST',
// data: {
// name: params.name,
// mobile: params.mobile,
// service_area: params.service_area,
// working_age: params.working_age,
// worker_num:params.worker_num,
// address:params.address,
// access_token:getApp().globalData.token
// },
// success: (res) => {
// uni.hideLoading()
// console.log('提交 入驻信息 成功')
// console.log(res)
if(res.statusCode==401){
uni.navigateTo({
url:'/pages/login/wxlogin'
})
return
}
// if(res.statusCode==401){
// uni.navigateTo({
// url:'/pages/login/wxlogin'
// })
// return
// }
if(res.statusCode==200){
console.log('提交 入驻信息 成功 200')
// if(res.statusCode==200){
// console.log('提交 入驻信息 成功 200')
uni.showToast({
title: '入驻基本信息提交成功',
icon: 'success'
});
let timer = setTimeout(() => {
clearTimeout(timer)
uni.navigateTo({
url:'/pages/settle/file'
})
}, 2000)
// uni.showToast({
// title: '入驻基本信息提交成功',
// icon: 'success'
// });
// let timer = setTimeout(() => {
// clearTimeout(timer)
// uni.navigateTo({
// url:'/pages/settle/file'
// })
// }, 2000)
}else{
uni.showToast({
icon:'none',
title:res.data.message
})
// }else{
// uni.showToast({
// icon:'none',
// title:res.data.message
// })
}
// }
},
fail: (e) => {
uni.hideLoading()
uni.showToast({
icon:'none',
title:'提交入驻信息失败'
})
console.log('提交 入驻信息 失败')
console.log(e)
}
})
// },
// fail: (e) => {
// uni.hideLoading()
// uni.showToast({
// icon:'none',
// title:'提交入驻信息失败'
// })
// console.log('提交 入驻信息 失败')
// console.log(e)
// }
// })
},
// },
},
}
......
This diff is collapsed.
......@@ -19,14 +19,25 @@
theme_url:'https://qn-static.banshouhui.com/settle_theme.png',
count:8,
isStop:false,
settledInfo:null,
status:'',
}
},
onLoad(e) {
this.startCounting()
this.getBaseInfo()
},
methods: {
async getBaseInfo(){
const app = getApp()
const callBack = (vm,result)=>{
vm.settledInfo = result
vm.status = result.record.status
}
let settledInfo = await app.getBaseInfo(this,callBack)
this.settledInfo = settledInfo
this.status = settledInfo.record.status
},
startCounting : function () {
if(this.isStop){
......@@ -50,6 +61,12 @@
if(!this.isStop){
return
}
if(this.status>=1){
uni.navigateTo({
url:'/pages/settle/prompt'
})
return
}
uni.navigateTo({
url:'/pages/settle/base'
......
<template>
<view class="content">
<view class="base-list">
<view class="tips">充电桩安装需缴纳保证金:1000元</view>
<view class="tips">你已缴纳金额:0元</view>
<view class="tips">充电桩安装需缴纳保证金:1000元待缴金额:1000元</view>
<view class="title">充电桩安装需缴纳保证金</view>
<view class="price"><text>¥</text>{{settledInfo.record.deposit}}</view>
<view class="list">
<view class="item u-flex u-row-between">
<view class="txt">您已缴纳金额</view>
<view class="txt">¥ 0.00</view>
</view>
<view class="item u-flex u-row-between">
<view class="txt">待缴纳金额</view>
<view class="txt">¥ {{settledInfo.record.deposit}}</view>
</view>
</view>
<!-- <view class="tips">你已缴纳金额:1000.00元</view>
<view class="tips">充电桩安装需缴纳保证金:1000元待缴金额:1000元</view> -->
</view>
<view class="seat"></view>
<view class="btn-wrap flex-xc">
......@@ -22,10 +33,14 @@
return {
saving: false,
paySuccess:false,
payResult:{
oid:''
},
settledInfo:null,
}
},
onLoad(e) {
this.getBaseInfo()
},
computed: {},
components: {
......@@ -39,52 +54,82 @@
})
})
},
pending(){
const timer = setTimeout(async ()=>{
clearTimeout(timer)
async getBaseInfo(){
const app = getApp()
const callBack = (vm,result)=>{
vm.settledInfo = result
}
let settledInfo = app.globalData.settledInfo
if(settledInfo){
callBack(this,settledInfo)
return
}
await app.getBaseInfo(this,callBack)
},
async pending(){
// const timer = setTimeout(async ()=>{
// clearTimeout(timer)
const params = {
oid:'2021022310015040247154'
...this.payResult
}
const res = await this.$u.api.getSettleDepositResult(params);
if(!res.status){
if(res.code !== 200){
return
}
const payStatus = res.data.status
switch (parseInt(payStatus)) {
case 0:
this.pending();
break;
case 1:
this.paySuccess = true
uni.showToast({
title:'支付成功',
icon:'none'
})
this.successCallback()
break;
default:
this.paySuccess = false
}
clearTimeout(timer)
},1000)
uni.showToast({
title:'支付成功'
})
let timer = setTimeout(()=>{
this.successCallback()
},3000)
// const payStatus = res.data.status
// switch (parseInt(payStatus)) {
// case 0:
// this.pending();
// break;
// case 1:
// this.paySuccess = true
// uni.showToast({
// title:'支付成功',
// icon:'none'
// })
// this.successCallback()
// break;
// default:
// this.paySuccess = false
// }
// },1000)
},
async paySubmit() {
codeApiUrl
const self = this
this.saving = true
uni.showLoading({
title:'支付中……'
})
// 提交支付订单
const params = {
oid: 2,
oid: this.settledInfo.record.id,
type: 'wx',
}
// const codeApiUrl = globalUrl.codeUrl.apiUrl;
const res = await this.$u.api.paySettleDeposit(params)
// const url = codeApiUrl+'/v1/settled/pay-deposit';
// const res = await this.$u.post(url, params,{'content-type': 'application/x-www-form-urlencoded'})
this.pending()
if (!res.status) {
const response = await this.$u.api.paySettleDeposit(params)
uni.showModal({
title: '提示',
content: '支付成功',
confirmText:'成功',
cancelText:'失败',
success: function (res) {
if (res.confirm) {
console.log(res.confirm,'res.confirm')
self.pending()
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
if (!response.status) {
uni.showToast({
title: '支付调用失败,请稍后重试',
icon:'none'
......@@ -92,8 +137,10 @@
return
}
const {
charge
} = res.data;
charge,
oid
} = response.data;
this.payResult.oid = oid
//Web 与微信内支付
pingpp.createPayment(charge, (result, err) => {
if (result == "success") {
......@@ -125,7 +172,43 @@
<style lang="scss">
.base-list {
text-align: center;
.txt{
line-height: 50rpx;
font-size:36rpx;
color: #333;
}
.title{
margin-top:120rpx;
font-weight: bold;
line-height: 50rpx;
font-size:36rpx;
color: #333;
}
.price{
margin-top:120rpx;
font-weight: bold;
line-height: 90rpx;
font-size:64rpx;
color: #333;
text{
font-size:32rpx;
}
}
.list{
margin-top:200rpx;
padding:0 50rpx;
.item{
padding:28rpx 0;
border-bottom: 1rpx solid #FDFDFD;
}
.txt{
line-height: 44rpx;
font-size:32rpx;
color: #333;
}
}
.tips {
margin-top: 20rpx;
padding: 0 30rpx;
......@@ -151,6 +234,7 @@
.btn-submit {
width: 600rpx;
border-radius: 52rpx;
// left: 5%;
// bottom: px2rem(36);
height: 104rpx;
......
<template>
<view class="container u-row-between" v-if="info">
<view class="u-flex u-row-center">
<image class="icon" src="@/static/settle/icon-prompt.png"></image>
</view>
<view class="txt-box">
<text class="title" v-for="txt in info.txtArr">{{txt}}</text>
<text :class="['title',index ? 'active' : '']" v-for="(txt,index) in info.txtArr">{{txt}}</text>
</view>
<view class="tips-box" v-if="info.tipsArr">
<text :class="['tips',info.tipsArr.length>1 && index===0 ? 'red' : '']" v-for="(txt,index) in info.tipsArr">{{txt}}</text>
</view>
<button class="btn-submit" @click="goPage(info.url)">{{info.btnTxt}}</button>
</view>
......@@ -11,42 +17,62 @@
export default {
data() {
return {
settledInfo:null,
promptList:[{
stepName:'step1',
txtArr:['你已通过充电桩安装入驻审核!','在培训学习后,可以正式签约了!'],
status:1,
statusName:'待审核',
txtArr:['你已成功提交资料','正在审核中'],
btnTxt:'去接单广场逛逛',
url:'/pages/exam/index'
},{
status:2,
statusName:'已通过',
txtArr:['你已通过','“充电桩安装入驻审核”'],
btnTxt:'去培训学习',
url:'/pages/exam/index'
},{
stepName:'step2',
txtArr:['你已成为充电桩安装备选服务商!','后续如有业务,请留意通知!'],
status:3,
statusName:'备选',
txtArr:['你已成为',"“充电桩安装备选服务商”"],
tipsArr:['后续如有业务,请留意通知!'],
btnTxt:'去接单广场逛逛',
url:'/pages/take/index'
},{
stepName:'step3',
txtArr:['你的入驻资料已被驳回!可重新提交资料!','理由:图片不够清晰!'],
status:4,
statusName:'已驳回',
txtArr:['你的入驻资料已被驳回!','可重新提交资料!'],
tipsArr:['原因:','图片不够清楚'],
btnTxt:'重新提交',
url:'/pages/settle/file'
},{
stepName:'step4',
txtArr:['你已通过充电桩安装入驻审核!','可以正式签约了!'],
status:5,
statusName:'step4',
txtArr:['你已通过','“充电桩安装入驻考试”'],
tipsArr:['可以正式签约了'],
btnTxt:'去签约',
url:'/pages/settle/file'
url:'/pages/settle/sign-contract'
},{
stepName:'step5',
txtArr:['你已成为充电桩安装签约服务商!','请缴纳1000元质保金'],
status:6,
statusName:'未支付保证金',
txtArr:['你已成为',"充电桩安装的签约服务商"],
tipsArr:['请缴纳1000元质保金'],
btnTxt:'去缴纳保证金',
url:'/pages/settle/pay-ensure'
},{
stepName:'step6',
txtArr:['你已成为充电桩安装的正式服务商!'],
status:7,
statusName:'已支付保证金',
txtArr:['你已成为',"充电桩安装的正式服务商"],
btnTxt:'去接单广场逛逛',
url:'/pages/take/index'
}],
info:null
// 入驻状态:1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金'
status:'',
info:null,
}
},
onLoad(e) {
this.initInfo(e)
this.getBaseInfo()
},
computed: {
},
......@@ -54,19 +80,35 @@
},
methods: {
initInfo(option){
let info
if(option.promptType){
const infoArr = this.promptList.filter(item=>{
item.stepName===option.promptType
})
info = infoArr.length>0 && infoArr[0]
}else{
info = this.promptList[0]
async getBaseInfo(){
const app = getApp()
const callBack = (vm,result)=>{
vm.settledInfo = result
vm.status = result.record.status
}
let settledInfo = await app.getBaseInfo(this,callBack)
this.settledInfo = settledInfo
this.status = settledInfo.record.status
uni.hideLoading()
console.log(settledInfo,'settledInfo')
this.initInfo(settledInfo.record)
},
initInfo(record){
if(!record){
this.info = this.promptList[0]
return
}
const status = record.status
const infoArr = this.promptList.filter(item=>{
return parseInt(item.status)===status
})
const info = infoArr.length>0 && infoArr[0]
if(status===6){
info.txtArr[1] = '请缴纳'+ this.settledInfo.record.deposit +'元质保金'
}
this.info = info
},
gopage(url) {
goPage(url) {
uni.navigateTo({
url,
});
......@@ -77,27 +119,53 @@
<style lang="scss">
.container{
display: flex;
width:750rpx;
height:500rpx;
// height:500rpx;
display: flex;
flex-direction: column;
.icon{
margin-top:180rpx;
width:316rpx;
height:312rpx
}
.txt-box{
margin-top:100rpx;
margin-top:112rpx;
}
.title{
display: block;
font-weight: bold;
margin-top: 20rpx;
padding: 0 30rpx;
// padding: 0 30rpx;
text-align: center;
font-weight: bold;
line-height: 40rpx;
font-size: 28rpx;
line-height: 66rpx;
font-size: 48rpx;
color: #333;
&.active{
color:#2272FF
}
}
.tips-box{
margin-top:32rpx;
text-align: center;
}
.tips{
text-align: center;
line-height: 44rpx;
font-size: 32rpx;
color: #666;
&.red{
color:red;
}
}
.btn-submit {
margin-top:112rpx;
width: 600rpx;
height: 104rpx;
line-height: 104rpx;
border-radius: 52rpx;
background: #2272ff;
font-size: 32rpx;
color: #fff;
......
......@@ -272,32 +272,28 @@
code: code
}
const res = await this.$u.api.getSettleArea(params)
console.log('res:')
console.log(res)
console.log('res.statusCode:')
console.log(res.statusCode)
console.log('level:')
console.log(level)
uni.hideLoading()
// if (res.status != 200) {
// return;
// }
if (res.code != 200) {
uni.showToast({
title:res.message,
icon:'none'
})
return;
}
if (!res) {
return;
}
if (!level) {
console.log('res.data:')
console.log(res.data)
// this.areaList = res.data
// const parmas = [res.data[0].id, 1]
this.areaList = res
const parmas = [res[0].id, 1]
this.areaList = res.data
const parmas = [res.data[0].id, 1]
this.getareaList(...parmas)
} else {
// this.$set(areaList[provinceIndex], 'children', res.data)
this.$set(areaList[provinceIndex], 'children', res)
this.$set(areaList[provinceIndex], 'children', res.data)
}
},
......
<template>
<view class="content">
<view class="title">入驻基本信息</view>
<view class="title">签约页面</view>
<view class="base-list">
<view class="item item-input flex-yc">
<label class="label">签约人</label>
......@@ -75,7 +75,7 @@
name:'支付宝',
value:'alipay'
}],
info:{},
settledInfo:{},
saving: false,
}
},
......@@ -212,36 +212,21 @@
// return true
// },
async getBaseInfo(){
// 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;
const app = getApp()
const callBack = (vm,result)=>{
vm.settledInfo = result
const record = result.record
vm.baseInfo.name = record.id_card_name
vm.baseInfo.id = record.id
}
this.info = res.data.record
// this.baseInfo.name = this.info.name
this.baseInfo.id = this.info.id
console.log(this.info,'res')
return true
let settledInfo = app.globalData.settledInfo
if(settledInfo){
callBack(this,settledInfo)
return
}
await app.getBaseInfo(this,callBack)
},
async submitInfo(){
// checkSettleSignInfo
......@@ -249,17 +234,17 @@
const params = {
...baseInfo,
}
console.log(params.pay_type,'params.pay_type')
if(params.pay_type==='alipay'){
params.bank_site = '支付宝'
}
const res = this.$u.api.checkSettleSignInfo(params)
if (res.status != 200) {
const res = await this.$u.api.checkSettleSignInfo(params)
console.log(res,'res')
if (res.code != 200) {
uni.showToast({
title: res.message,
icon: 'none'
});
return;
return false;
}
return true
},
......@@ -289,7 +274,11 @@
title: '加载中'
});
const result = await this.submitInfo()
console.log(result)
if(!result){
this.saving = false;
return
}
this.goSign()
// const requestArr = ['submitBaseInfo','jumpSign']
// for(let i=0;i<requestArr.length;i++){
// const result = await this[requestArr[i]]()
......@@ -298,27 +287,26 @@
// break;
// }
// }
this.saving = false;
uni.hideLoading()
uni.showToast({
title: '入驻基本信息提交成功',
icon: 'success'
});
let timer = setTimeout(() => {
clearTimeout(timer)
uni.navigateTo({
url:'/pages/settle/file'
})
}, 2000)
// let timer = setTimeout(() => {
// clearTimeout(timer)
// uni.navigateTo({
// url:'/pages/settle/file'
// })
// }, 2000)
},
async goSign(){
const token = 'RTOKEN49eac6c2979528824a4d5a7b09c221fa954c70ce';
const info = this.info
const token = app.globalData.token;
const settledInfo = this.settledInfo
const params = {
namePsn:'郭小清',
idNumberPsn:'43072219800123456',
province:'湖南省',
city:'长沙市'
namePsn:settledInfo.record.id_card_name,
idNumberPsn:settledInfo.record.id_card_number,
province:settledInfo.provinceList.join(','),
city:settledInfo.cityList.join(','),
}
// const params = {
// namePsn:info.id_card_name,
......@@ -327,6 +315,7 @@
// 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'})
console.log(res,'res')
if(res.code!==200){
uni.showToast({
title:'跳转签约失败',
......@@ -334,6 +323,7 @@
})
return
}
this.saving = false;
const url = res.data
uni.navigateTo({
url:'/pages/settle/web?url='+url
......
......@@ -27,12 +27,14 @@
</template>
<script>
import globalData from '@/common/base_url.js'
const xueApiUrl = globalData.ucenterUrl.xueUrl
export default {
data() {
return {
icon_arrow_right:'',
dataList:[],
course_id:172,
course_id:281,
section_id:0,
jumpUrl:'https://m.banshouhui.com/xue/course/section/',
}
......@@ -72,7 +74,7 @@
let that = this
uni.request({
url: 'http://rest-xue.yunya.com/v1/chapter-sections'
url: xueApiUrl + '/v1/chapter-sections'
+'?course_id=' + this.course_id,
method: 'GET',
data: {
......
......@@ -20,6 +20,8 @@
</template>
<script>
import globalData from '@/common/base_url.js'
const xueApiUrl = globalData.ucenterUrl.xueUrl
export default {
data() {
return {
......
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