Commit b97e6cba authored by zhengzy's avatar zhengzy
parents f4c2b692 97161d77
...@@ -6,6 +6,7 @@ const UNI_APP = { ...@@ -6,6 +6,7 @@ const UNI_APP = {
}, },
systemUrl: { systemUrl: {
apiUrl: 'http://192.168.1.22', //java端域名请求头 apiUrl: 'http://192.168.1.22', //java端域名请求头
} },
qn_base_url: 'https://qn-static.banshouhui.com/self-support/'
} }
module.exports = UNI_APP; module.exports = UNI_APP;
; ;
(function() { (function() {
let NODE_ENV = 'dev'; // dev:开发环境 | test:测试环境 let NODE_ENV = 'test'; // dev:开发环境 | test:测试环境
let ENV_VAR = null; let ENV_VAR = null;
if (process.env.NODE_ENV === "development") { if (process.env.NODE_ENV === "development") {
if (NODE_ENV === 'dev') { if (NODE_ENV === 'dev') {
......
...@@ -6,7 +6,8 @@ const UNI_APP = { ...@@ -6,7 +6,8 @@ const UNI_APP = {
}, },
systemUrl: { systemUrl: {
apiUrl:'https://system.banshouhui.com', //java端域名请求头 apiUrl:'https://system.banshouhui.com', //java端域名请求头
} },
qn_base_url: 'https://qn-static.banshouhui.com/self-support/'
} }
module.exports = UNI_APP; module.exports = UNI_APP;
...@@ -6,6 +6,7 @@ const UNI_APP = { ...@@ -6,6 +6,7 @@ const UNI_APP = {
}, },
systemUrl: { systemUrl: {
apiUrl: 'https://system.dev.banshouhui.com', //java端域名请求头 apiUrl: 'https://system.dev.banshouhui.com', //java端域名请求头
} },
qn_base_url: 'https://qn-static.banshouhui.com/self-support/'
} }
module.exports = UNI_APP; module.exports = UNI_APP;
...@@ -2,10 +2,15 @@ ...@@ -2,10 +2,15 @@
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
"version": "0.0", "version": "0.0",
"configurations": [{ "configurations": [{
"type": "uniCloud", "default" :
"default": { {
"launchtype": "remote" "launchtype" : "remote"
} },
} "mp-weixin" :
{
"launchtype" : "remote"
},
"type" : "uniCloud"
}
] ]
} }
This diff is collapsed.
...@@ -7,17 +7,20 @@ import { ...@@ -7,17 +7,20 @@ import {
import { import {
settledApiFun settledApiFun
} from '@/common/api/settled.js'; } from '@/common/api/settled.js';
import { learnApiFun } from "@/common/api/learn.js"; import {learnApiFun} from "@/common/api/learn.js";
import { orderApiFun } from "@/common/api/order.js";
let apiFun = function(vm) { let apiFun = function(vm) {
let commonApi = commonApiFun(vm); let commonApi = commonApiFun(vm);
let settledApi = settledApiFun(vm) let settledApi = settledApiFun(vm)
let cloudApi = cloudRulesApiFun(vm) let cloudApi = cloudRulesApiFun(vm)
let learnApi=learnApiFun(vm) let learnApi=learnApiFun(vm)
let orderApi=orderApiFun(vm)
let apiUrl = { let apiUrl = {
...commonApi, ...commonApi,
...settledApi, ...settledApi,
...cloudApi, ...cloudApi,
...learnApi ...learnApi,
...orderApi,
} }
return apiUrl return apiUrl
} }
......
let orderApiFun = function(vm){
let listByRecommendOrder = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/recommend/order', params);
const orderApi = {
listByRecommendOrder,
}
return orderApi
}
module.exports = {
orderApiFun
}
\ No newline at end of file
...@@ -19,7 +19,7 @@ let settledApiFun = function(vm){ ...@@ -19,7 +19,7 @@ let settledApiFun = function(vm){
let submitSettleFileInfo = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/submit-info', 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'}); let paySettleDeposit = async (params = {}) => await vm.$u.post(ucenterApiUrl + '/v2/settled/pay-deposit' , params,{'content-type': 'application/x-www-form-urlencoded'});
let getSettleDepositResult = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/settled/check-oid', params,{'content-type': 'application/x-www-form-urlencoded'}); let getSettleDepositResult = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/settled/check-oid', params,{'content-type': 'application/x-www-form-urlencoded'});
...@@ -36,7 +36,10 @@ let settledApiFun = function(vm){ ...@@ -36,7 +36,10 @@ let settledApiFun = function(vm){
let listOrderingTutorials = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/settled/get-course-rate', params); let listOrderingTutorials = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/settled/get-course-rate', params);
/* 更新接单教程状态 */ /* 更新接单教程状态 */
let saveCourseRate = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/settled/save-course-rate', params); let saveCourseRate = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/save-course-rate', params);
/* 获取消息内容列表 */
let listByNotice = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/notice/list', params);
const settledApi = { const settledApi = {
getSettleBaseInfo, getSettleBaseInfo,
...@@ -52,6 +55,7 @@ let settledApiFun = function(vm){ ...@@ -52,6 +55,7 @@ let settledApiFun = function(vm){
checkSettleSignInfo, checkSettleSignInfo,
listOrderingTutorials, listOrderingTutorials,
saveCourseRate, saveCourseRate,
listByNotice,
} }
return settledApi return settledApi
} }
......
export default [{ export default [{
"groupName": "女装", "groupName": "女装",
"item": [{ "item": [{
"required": true,
"fieldsTitle": "A字裙多个",
"fieldsName": "name",
"fieldsType": "multiInput",
"fieldsValue": "",
"inputOptions":[{
"fieldsTitle": "A字裙",
"fieldsName": "name1",
"fieldsType": "text",
},{
"fieldsTitle": "A字裙",
"fieldsName": "name2",
"fieldsType": "text",
},{
"fieldsTitle": "A字裙",
"fieldsName": "name3",
"fieldsType": "text",
},{
"fieldsTitle": "A字裙",
"fieldsName": "name3",
"fieldsType": "text",
},{
"fieldsTitle": "A字裙",
"fieldsName": "name4",
"fieldsType": "text",
},{
"fieldsTitle": "A字裙",
"fieldsName": "name5",
"fieldsType": "text",
},],
"key": "A字裙",
"icon": "https://cdn.uviewui.com/uview/common/classify/1/1.jpg",
"cat": 10
},{
"required": true, "required": true,
"fieldsTitle": "A字裙", "fieldsTitle": "A字裙",
"fieldsName": "name", "fieldsName": "name",
"fieldsType": "input", "fieldsType": "input",
"fieldsValue": "", "fieldsValue": "",
"span":8,
"key": "A字裙", "key": "A字裙",
"icon": "https://cdn.uviewui.com/uview/common/classify/1/1.jpg", "icon": "https://cdn.uviewui.com/uview/common/classify/1/1.jpg",
"cat": 10 "cat": 10
...@@ -55,19 +90,28 @@ export default [{ ...@@ -55,19 +90,28 @@ export default [{
"cat": 10 "cat": 10
}, },
{ {
"fieldsTitle": "连衣裙", "fieldsTitle": "充电桩编码",
"fieldsName": "scan",
"fieldsType": "scan",
"required": true,
"key": "连衣裙", "key": "连衣裙",
"icon": "https://cdn.uviewui.com/uview/common/classify/1/7.jpg", "icon": "https://cdn.uviewui.com/uview/common/classify/1/7.jpg",
"cat": 10 "cat": 10
}, },
{ {
"fieldsTitle": "妈妈装", "fieldsTitle": "多级选择",
"fieldsName": "mutiPicker",
"fieldsType": "mutipicker",
"required": true,
"key": "妈妈装", "key": "妈妈装",
"icon": "https://cdn.uviewui.com/uview/common/classify/1/8.jpg", "icon": "https://cdn.uviewui.com/uview/common/classify/1/8.jpg",
"cat": 10 "cat": 10
}, },
{ {
"fieldsTitle": "牛仔裤", "fieldsTitle": "时间选择",
"fieldsName": "time",
"fieldsType": "time",
"required": true,
"key": "牛仔裤", "key": "牛仔裤",
"icon": "https://cdn.uviewui.com/uview/common/classify/1/9.jpg", "icon": "https://cdn.uviewui.com/uview/common/classify/1/9.jpg",
"cat": 10 "cat": 10
......
qn_base_url = 'https://qn-static.banshouhui.com/self-support/'
\ No newline at end of file
...@@ -35,7 +35,7 @@ const install = (Vue, vm) => { ...@@ -35,7 +35,7 @@ const install = (Vue, vm) => {
// 请求拦截,配置Token等参数 // 请求拦截,配置Token等参数
Vue.prototype.$u.http.interceptor.request = (config) => { Vue.prototype.$u.http.interceptor.request = (config) => {
const reg = /\?\w+/; const reg = /\?\w+/;
let token = util.getToken() let token = vm.vuex_token
// if(!token && noLoginUrl.indexOf(config.url)<0){ // if(!token && noLoginUrl.indexOf(config.url)<0){
// toLoginPage() // toLoginPage()
// return false // return false
......
<!-- ******************* 多选框 ******************* -->
<template> <template>
<view class="list"> <view class="list">
<view v-for="(item,index) in settings" :key="index" <view v-for="(item,index) in settings" :key="index"
......
<!-- ******************* 文件上传 ******************* -->
<template> <template>
<view class="file-box"> <view class="file-box">
<view class="u-flex" @click="selectUpload"> <view class="u-flex" @click="selectUpload">
...@@ -5,7 +6,7 @@ ...@@ -5,7 +6,7 @@
<u-icon name="arrow-right" color="#666" size="28"></u-icon> <u-icon name="arrow-right" color="#666" size="28"></u-icon>
</view> </view>
<view class="pics u-flex u-flex-wrap"> <view class="pics u-flex u-flex-wrap">
<u-image class="pic" v-for="(item,index) in imgList" width="170rpx" height="170" :src="item.path"></u-image> <u-image class="pic" v-for="(item,index) in imgList" width="170rpx" height="170" :src="item.path" :key="index"></u-image>
<!-- <u-image class="pic" v-for="item in 6" width="170rpx" height="170" src="'https://cdn.uviewui.com/uview/example/fade.jpg"></u-image> --> <!-- <u-image class="pic" v-for="item in 6" width="170rpx" height="170" src="'https://cdn.uviewui.com/uview/example/fade.jpg"></u-image> -->
</view> </view>
<u-popup v-model="maskShow" mode="center" width="500"> <u-popup v-model="maskShow" mode="center" width="500">
...@@ -58,7 +59,7 @@ ...@@ -58,7 +59,7 @@
// 直接打开相册 // 直接打开相册
let config = { let config = {
options:{ options:{
consourceType:['album'],//['album', 'camera'] sourceType:['album'],//['album', 'camera']
} }
} }
await this.chooseImage('qiniu',config) await this.chooseImage('qiniu',config)
......
<!-- ******************* 输入框 ******************* -->
<template> <template>
<view> <view>
<u-input v-model="dataValue" @input="valueChange" :type="type" /> <u-input v-model="dataValue" @input="valueChange" :type="type" />
......
<!-- ******************* 定位 ******************* -->
<template> <template>
<view class="list u-flex u-row-between"> <view class="list u-flex u-row-between">
<text class="required" v-if="item.required">*</text> <text class="required" v-if="item.required">*</text>
...@@ -10,7 +11,7 @@ ...@@ -10,7 +11,7 @@
<script> <script>
import objMixin from './objMixin' import objMixin from './objMixin'
export default { export default {
name: 'XhRadio', name: 'XhLocation',
components: {}, components: {},
mixins: [objMixin], mixins: [objMixin],
props: {}, props: {},
......
<!-- ******************* 多个输入框 ******************* -->
<template>
<view class="u-flex u-flex-wrap">
<u-input class="input-item" v-for="(item,index) in inputOptions" v-model="item.value" @input="val=>{getValue(item)}" type="text" :key="index"/>
</view>
</template>
<script>
import objMixin from './objMixin'
export default {
name: 'XhMultiInput',
components: {},
mixins: [objMixin],
props: {},
data() {
return {}
},
computed: {
inputOptions() {
let options = this.item.inputOptions || []
let result = options.map(item => {
return {
...item,
value: ''
}
})
return result
}
},
watch: {},
mounted() {},
methods: {
getValue(item){
let currentValue = {}
currentValue[item.fieldsName] = item.value
// 以key,value的对象形式传递
this.valueChange(currentValue)
}
}
}
</script>
<style>
.input-item{
width:33.3%;
}
</style>
<!-- ******************* 单级/多级 选择 ******************* -->
<template>
<view class="picker-box">
<view class="u-flex u-row-between" @click="openPicker">
<view class="txt u-flex-1">{{item.fieldsTitle}}</view>
<u-icon name="arrow-right" color="#666" size="28"></u-icon>
</view>
<u-picker v-model="showPicker" :rangeKey="rangeKey" @columnchange="columnchange" mode="multiSelector" @confirm="pickerConfirm" :default-selector='[0, 1]' :range="settings"></u-picker>
</view>
</template>
<script>
import objMixin from './objMixin'
export default {
name: 'XhPicker',
components: {},
mixins: [objMixin],
props: {
// 当mode=selector或者mode=multiSelector时,提供的默认选中的下标
defaultSelector: {
type: Array,
default() {
return [0];
}
},
// 当 range 是一个 Array<Object> 时,通过 range-key 来指定 Object 中 key 的值作为选择器显示内容
rangeKey: {
type: String,
default: ''
},
},
filters:{},
data() {
return {
showPicker:false,
settings:[
[1, 2, 3],
[4, 5, 6]
]
}
},
computed: {
// settings() {
// let setting = [
// [1, 2, 3],
// [4, 5, 6]
// ]
// return setting
// // return this.item.settings || []
// }
},
watch: {},
mounted() {},
methods: {
openPicker(){
this.showPicker = true
},
pickerConfirm(data){
let result = []
data&&data.map((item,index)=>{
let val = this.settings[index][item]
result.push(val)
})
this.dataValue = result
this.valueChange(result)
console.log(result,'result')
},
columnchange(data){
console.log(data,'data')
// 树列改变时进行联动操作
const {column ,index} = data
let arr = [9,10,50]
this.settings.splice(column+1,1,arr)
console.log(this.settings,'this.settings')
},
}
}
</script>
<style lang="scss" scoped>
</style>
<!-- ******************* 单选框 ******************* -->
<template> <template>
<view class="list"> <view class="list">
<view v-for="(item,index) in settings" :key="index" :class="{'txt':true,'active':item===dataValue}" <view v-for="(item,index) in settings" :key="index" :class="{'txt':true,'active':item===dataValue}"
......
<!-- ******************* 扫码 ******************* -->
<template>
<view class="">
<view class="u-flex">
请输入:<u-input class="u-flex-1" v-model="dataValue" @input="valueChange" type="text" />
</view>
<view class="u-flex" @click="scanCode">
<view class="txt u-flex-1">扫描二维码(仅挚达充电桩可扫描)</view>
<u-icon name="arrow-right" color="#666" size="28"></u-icon>
</view>
</view>
</template>
<script>
import stringMixin from './stringMixin'
export default {
name: 'XhScan',
components: {},
mixins: [stringMixin],
props: {},
filters:{},
data() {
return {}
},
computed: {
valueTxt() {
let str = ''
const dataValue = this.dataValue
if(dataValue && dataValue.length>1){
str = '经度:'+dataValue[0]+','+'维度:'+dataValue[1]
}
return str
}
},
watch: {},
mounted() {},
methods: {
scanCode(type){
const self = this
// qrCode 二维码;barCode 条形码
let scanType = type && [type] || ['qrCode']
uni.scanCode({
// scanType: scanType,
success: function (res) {
self.dataValue = res.result
self.valueChange(res.result)
// console.log('条码类型:' + res.scanType);
// console.log('条码内容:' + res.result);
}
});
},
// setValue(txt) {
// this.valueChange(this.dataValue)
// }
}
}
</script>
<style lang="scss" scoped>
.required {
padding-right: 10rpx;
font-size: 28rpx;
line-height: 40rpx;
color: #fa3534;
}
</style>
<!-- ******************* 单个下拉选择 ******************* -->
<template> <template>
<view> <view>
<u-input v-model="dataValue" readOnly @click="show=true" type="select" /> <u-input v-model="dataValue" readOnly @click="show=true" type="select" />
......
<!-- ******************* 输入框 ******************* -->
<template>
<view class="picker-box">
<view class="u-flex u-row-between" @click="openPicker">
<view class="txt">{{item.fieldsTitle}}</view>
<view class="txt u-flex-1">{{dataValue}}</view>
<u-icon name="arrow-right" color="#666" size="28"></u-icon>
</view>
<u-picker :params="params" v-model="showPicker" mode="time" @confirm="pickerConfirm"></u-picker>
<!-- <u-picker v-model="showPicker" :rangeKey="rangeKey" @columnchange="columnchange" mode="multiSelector" @confirm="pickerConfirm" :default-selector='[0, 1]' :range="settings"></u-picker> -->
</view>
</template>
<script>
import stringMixin from './stringMixin'
export default {
name: 'XhInput', // 新建 input
components: {},
mixins: [stringMixin],
props: {},
data() {
return {
showPicker: false,
params: {
year: true,
month: true,
day: true,
hour: true,
minute: true,
second: true,
// 选择时间的时间戳
timestamp: true,
}
}
},
computed: {
type() {
if (this.item && this.item.fieldsType == 'password') {
return this.item.fieldsType
} else {
return 'text'
}
}
},
watch: {},
mounted() {},
methods: {
openPicker() {
this.showPicker = true
},
pickerConfirm(data) {
console.log(data, 'DATA')
let result = []
let dataValue = data.year + '-' + data.month + '-' + data.day + ' ' + data.hour + ':' + data.minute +
':' + data.second
console.log(dataValue, 'dataValue')
this.dataValue = dataValue
this.valueChange(dataValue)
},
}
}
</script>
<style>
</style>
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
}, },
computed: { computed: {
url() { url() {
return qn_base_url + 'top' + this.index + '.png' return process.uniEnv.qn_base_url + 'topl' + this.index + '.png'
} }
} }
} }
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
border-radius: 12rpx; border-radius: 12rpx;
overflow: auto; overflow: auto;
position: fixed; position: fixed;
top: 320rpx; top: 370rpx;
bottom: 0rpx; bottom: 0rpx;
left: 30rpx; left: 30rpx;
right: 30rpx; right: 30rpx;
......
<template>
<view class="content-view">
<view class="headimage-view">
<image class="headimage-view-image" :src="kefuImage"></image>
<text class="name-text">朱曼婷</text>
</view>
<view class="content-info">
<view>
<view class="content-info-title">深圳唯修汇科技有限公司</view>
<view class="content-info-tip">长按二维码添加官方客服微信及时了解审核进度</view>
</view>
<view class="QRcode-view">
<image class="content-info-QRcode":src="erweimaImage"></image>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
},
data() {
return {}
},
computed: {
erweimaImage() {
return qn_base_url + 'erweima.png'
},
kefuImage() {
return qn_base_url + 'kefu.png'
}
}
}
</script>
<style lang="scss" scoped>
.content-view {
background-color: #FFFFFF;
width: 440rpx;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
.headimage-view {
position: relative;
.headimage-view-image {
width: 440rpx;
height: 400rpx;
}
.name-text {
position: absolute;
bottom: 20rpx;
left: 20rpx;
color: #FFFFFF;
font-size: 28rpx;
}
}
.content-info {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
padding: 0rpx 12rpx 20rpx 12rpx;
.content-info-title {
font-size: 24rpx;
color: #333333;
margin-bottom: 10rpx;
}
.content-info-tip {
font-size: 20rpx;
color: #666666;
}
.QRcode-view {
margin-left: 30rpx;
}
.content-info-QRcode {
padding-top: 12rpx;
width: 104rpx;
height: 104rpx;
}
}
}
</style>
...@@ -4,7 +4,6 @@ import uView from "uview-ui"; ...@@ -4,7 +4,6 @@ import uView from "uview-ui";
import vuexStore from "@/store/$u.mixin.js"; import vuexStore from "@/store/$u.mixin.js";
import store from '@/store/index' import store from '@/store/index'
import {router,RouterMount} from '@/router/index.js' //路径换成自己的 import {router,RouterMount} from '@/router/index.js' //路径换成自己的
import './common/global.js'
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.mixin(vuexStore) Vue.mixin(vuexStore)
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationBarTitleText": "首页" "navigationBarTitleText": "首页",
"navigationStyle": "custom"
} }
}, },
{ {
...@@ -52,7 +53,8 @@ ...@@ -52,7 +53,8 @@
{ {
"path": "pages/learn/index", "path": "pages/learn/index",
"style": { "style": {
"navigationBarTitleText": "学习" "navigationBarTitleText": "学习",
"navigationStyle":"custom"//隐藏系统导航栏
} }
}, },
{ {
...@@ -67,11 +69,11 @@ ...@@ -67,11 +69,11 @@
"navigationBarTitleText": "考试答题" "navigationBarTitleText": "考试答题"
} }
}, },
{ {
"path": "pages/learn/result", "path":"pages/learn/result",
"style": { "style":{
"navigationBarTitleText": "考试结果页" "navigationBarTitleText":"考试答题"
} }
}, },
{ {
"path": "pages/learn/news-details", "path": "pages/learn/news-details",
...@@ -172,7 +174,7 @@ ...@@ -172,7 +174,7 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app", "navigationBarTitleText": "uni-app",
...@@ -259,11 +261,6 @@ ...@@ -259,11 +261,6 @@
"path": "pages/settle/sign-contract", //启动页面,必选 "path": "pages/settle/sign-contract", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到 "query": "" //启动参数,在页面的onLoad函数里面得到
}, },
{
"name": "缴纳保证金", //模式名称
"path": "pages/settle/pay-ensure", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
},
{ {
"name": "订单 - 完工配置", //模式名称 "name": "订单 - 完工配置", //模式名称
"path": "pages/order/complete", //启动页面,必选 "path": "pages/order/complete", //启动页面,必选
......
<template> <template>
<view class="backView"> <view class="backView">
<Settle :index="2"> <Settle :index="3">
<!-- <template v-if="isStart==false"> <!-- <template v-if="isStart==false">
<view class="noticeView"> <view class="noticeView">
<text class="noticeText">规则:系统随机出现20道考试题目,每道题5分,每题答题时间100秒,在规定时间内答对题目的记分。 <text class="noticeText">规则:系统随机出现20道考试题目,每道题5分,每题答题时间100秒,在规定时间内答对题目的记分。
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
<!-- <template v-if="isStart==true && currentItem"> --> <!-- <template v-if="isStart==true && currentItem"> -->
<view class="bottom-padding" v-if="currentItem"> <view class="bottom-padding" v-if="currentItem">
<view class="title-view"> <view class="title-view">
<view class="title-text"> <view :class="['title-text', {'radio': currentItem.question ? currentItem.question.answerType == 1 : true}]">
<text>{{ titleText[Math.max(0, currentItem.question.answerType - 1)] }}</text> <text>{{ titleText[Math.max(0, currentItem.question ? currentItem.question.answerType - 1 : 0)] }}</text>
</view> </view>
<view class="title-right-view"> <view class="title-right-view">
<image class="timeIcon" :src="time1Image" mode=""></image> <image class="timeIcon" :src="time1Image" mode=""></image>
...@@ -105,15 +105,15 @@ ...@@ -105,15 +105,15 @@
computed: { computed: {
titleText() { titleText() {
return ['单选', '多选', '问答'] return ['单选', '多选', '问答']
}, },
time1Image() { time1Image() {
return qn_base_url + 'time1.png' return process.uniEnv.qn_base_url + 'time1.png'
}, },
chenggongImage() { chenggongImage() {
return qn_base_url + 'chenggong.png' return process.uniEnv.qn_base_url + 'chenggong.png'
}, },
timuImage() { timuImage() {
return qn_base_url + 'timu.png' return process.uniEnv.qn_base_url + 'timu.png'
} }
}, },
onLoad(e) { onLoad(e) {
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
url: systemApiUrl + url: systemApiUrl +
'/wxh-worker-rest/rest/exam' + '/wxh-worker-rest/rest/exam' +
'/serviceRule/userExamInfo/' + '/serviceRule/userExamInfo/' +
getApp().globalData.token + that.vuex_token +
'?examId=' + this.examId, '?examId=' + this.examId,
method: 'POST', method: 'POST',
data: { data: {
...@@ -231,7 +231,7 @@ ...@@ -231,7 +231,7 @@
url: systemApiUrl + url: systemApiUrl +
'/wxh-worker-rest/rest/exam' + '/wxh-worker-rest/rest/exam' +
'/serviceRule/' + '/serviceRule/' +
getApp().globalData.token + that.vuex_token +
'?examId=' + this.examId, '?examId=' + this.examId,
method: 'POST', method: 'POST',
data: { data: {
...@@ -297,7 +297,7 @@ ...@@ -297,7 +297,7 @@
url: systemApiUrl + url: systemApiUrl +
'/wxh-worker-rest/rest/exam' + '/wxh-worker-rest/rest/exam' +
'/serviceRule/next/' + '/serviceRule/next/' +
getApp().globalData.token + that.vuex_token +
'?userExamId=' + this.userExamId + '?userExamId=' + this.userExamId +
'&questionId=' + questionId + '&questionId=' + questionId +
'&userAnswerIds=' + this.userAnswerIds, '&userAnswerIds=' + this.userAnswerIds,
...@@ -468,7 +468,7 @@ ...@@ -468,7 +468,7 @@
let that = this let that = this
uni.request({ uni.request({
url: ucenterApiUrl + '/v1/settled/update-settled-exam-score' + url: ucenterApiUrl + '/v1/settled/update-settled-exam-score' +
'?access-token=' + getApp().globalData.token, '?access-token=' + that.vuex_token,
method: 'POST', method: 'POST',
data: { data: {
score: this.examScore || 0, score: this.examScore || 0,
...@@ -738,6 +738,9 @@ ...@@ -738,6 +738,9 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
&.radio {
background-color: #2272FF;
}
} }
.title-right-view { .title-right-view {
...@@ -757,7 +760,7 @@ ...@@ -757,7 +760,7 @@
} }
.time-count-down { .time-count-down {
width: 80rpx; width: 50rpx;
text-align: right; text-align: right;
} }
} }
......
This diff is collapsed.
...@@ -116,6 +116,7 @@ ...@@ -116,6 +116,7 @@
}) })
}, },
} }
} }
</script> </script>
......
This diff is collapsed.
...@@ -10,8 +10,9 @@ ...@@ -10,8 +10,9 @@
<view class="learn-list" v-for="(item, key) in tutorials" :key="key"> <view class="learn-list" v-for="(item, key) in tutorials" :key="key">
<view class="learn-list-item"> <view class="learn-list-item">
<view class="item-content"> <view class="item-content">
<view class="item-st"><text <view class="item-st">
class="item-st-text">{{item.title.split(' ') ? item.title.split(' ')[0] : ''}}</text> <image style="width: 80rpx;height: 36rpx;" :src="kcImage"></image>
<text class="item-st-text">{{item.title.split(' ') ? item.title.split(' ')[0] : ''}}</text>
</view> </view>
<view class="item-title">{{item.title.split(' ') ? item.title.split(' ')[1] : ''}}</view> <view class="item-title">{{item.title.split(' ') ? item.title.split(' ')[1] : ''}}</view>
</view> </view>
...@@ -78,16 +79,16 @@ ...@@ -78,16 +79,16 @@
tipsTitle: '提示:', tipsTitle: '提示:',
// 简单使用固定培训视频 // 简单使用固定培训视频
tutorials: [{ tutorials: [{
id: 'Course1', id: 'course1',
courseId: 1, courseId: 1,
title: '', title: '',
value: '已学习', value: '去学习',
courseActive: {}, courseActive: {},
status: 1, status: 0,
url: '' url: ''
}, },
{ {
id: 'Course2', id: 'course2',
courseId: 2, courseId: 2,
title: '', title: '',
value: '去学习', value: '去学习',
...@@ -96,13 +97,22 @@ ...@@ -96,13 +97,22 @@
url: '' url: ''
}, },
{ {
id: 'Course3', id: 'course3',
courseId: 3, courseId: 3,
title: '', title: '',
value: '去学习', value: '去学习',
courseActive: {}, courseActive: {},
status: 0, status: 0,
url: '' url: ''
},
{
id: 'course4',
courseId: 4,
title: '',
value: '去学习',
courseActive: {},
status: 0,
url: ''
} }
], ],
tipsDescription: '接单考核可让您快速了解如何使用小程序,建议先查看学习教程' tipsDescription: '接单考核可让您快速了解如何使用小程序,建议先查看学习教程'
...@@ -136,9 +146,12 @@ ...@@ -136,9 +146,12 @@
'font-size': '32rpx', 'font-size': '32rpx',
'font-weight': 'bold' 'font-weight': 'bold'
} }
}, },
tips1Image() { tips1Image() {
return qn_base_url + 'tips1@3x.png' return process.uniEnv.qn_base_url + 'tips1.png'
},
kcImage() {
return process.uniEnv.qn_base_url + 'kc.png'
} }
}, },
onLoad() { onLoad() {
...@@ -148,6 +161,8 @@ ...@@ -148,6 +161,8 @@
item['value'] = item['status'] ? '已学习' : '去学习' item['value'] = item['status'] ? '已学习' : '去学习'
item['courseActive'] = item['status'] ? this.learnStyle : this.learnedStyle item['courseActive'] = item['status'] ? this.learnStyle : this.learnedStyle
}) })
},
onShow() {
this.loadLearnData(); this.loadLearnData();
}, },
methods: { methods: {
...@@ -157,7 +172,7 @@ ...@@ -157,7 +172,7 @@
.listOrderingTutorials() .listOrderingTutorials()
.then(res => { .then(res => {
const results = res.data; const results = res.data;
if (res.status == 200 && results && results.length > 0) { if (res.code == 200 && results) {
that.tutorials.forEach((data, i) => { that.tutorials.forEach((data, i) => {
if (results.hasOwnProperty(data.id)) { if (results.hasOwnProperty(data.id)) {
data.status = results[data.id]; data.status = results[data.id];
...@@ -173,7 +188,6 @@ ...@@ -173,7 +188,6 @@
} }
}) })
.catch(e => { .catch(e => {
debugger;
console.log(e, 'loadLearnData'); console.log(e, 'loadLearnData');
}); });
}, },
...@@ -238,7 +252,9 @@ ...@@ -238,7 +252,9 @@
} }
.tip-image { .tip-image {
width: 28rpx; width: 26rpx;
height: 32rpx;
flex-shrink: 0;
margin-right: 10rpx; margin-right: 10rpx;
margin-top: 2rpx; margin-top: 2rpx;
} }
...@@ -289,15 +305,18 @@ ...@@ -289,15 +305,18 @@
.item-st { .item-st {
width: 80rpx; width: 80rpx;
height: 36rpx; height: 36rpx;
background-image: linear-gradient(to right, #FF930D, #FFC174);
font-size: 16rpx;
border-radius: 6rpx 36rpx 36rpx 6rpx;
padding-top: 8rpx;
padding-right: 2rpx; padding-right: 2rpx;
text-align: center; text-align: center;
margin-right: 20rpx; margin-right: 20rpx;
line-height: 24rpx;
position: relative;
.item-st-text { .item-st-text {
color: #FFFFFF; color: #FFFFFF;
position: absolute;
font-size: 16rpx;
left: 20rpx;
top: 8rpx;
line-height: 28rpx;
} }
} }
......
<template> <template>
<view class="study"> <view class="study">
<view class="banner"> <u-navbar
<u-swiper :list="banner"></u-swiper> :is-back="false"
</view> background="{background: transparent}"
:border-bottom="false"
:is-fixed="false"
>
<text class="title-view">学习</text>
</u-navbar>
<image :src="bannerImage" mode="" class="banner"></image>
<!-- <u-tabs :list="tabs" :is-scroll="false" :current="current" @change="change"></u-tabs> --> <!-- <u-tabs :list="tabs" :is-scroll="false" :current="current" @change="change"></u-tabs> -->
<view> <view>
<u-tabs-swiper ref="uTabs" :list="tabs" :current="current" @change="tabsChange" :is-scroll="false" swiperWidth="750"></u-tabs-swiper> <u-tabs-swiper bg-color="#F4F5F7" inactive-color="#999999" font-size="28" ref="uTabs" :list="tabs" :current="current" @change="tabsChange" :is-scroll="false" swiperWidth="750"></u-tabs-swiper>
</view> </view>
<swiper :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish" style="height: 755rpx;"> <swiper :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish" style="height: 755rpx;">
<swiper-item class="swiper-item"> <swiper-item class="swiper-item">
...@@ -160,19 +166,6 @@ ...@@ -160,19 +166,6 @@
data() { data() {
return { return {
msg:"赣南吴彦祖", msg:"赣南吴彦祖",
banner: [{
image: "https://cdn.uviewui.com/uview/swiper/1.jpg",
title: "昨夜星辰昨夜风,画楼西畔桂堂东",
},
{
image: "https://cdn.uviewui.com/uview/swiper/2.jpg",
title: "身无彩凤双飞翼,心有灵犀一点通",
},
{
image: "https://cdn.uviewui.com/uview/swiper/3.jpg",
title: "谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳",
},
],
tabs: [{ tabs: [{
name: "交付规范", name: "交付规范",
}, },
...@@ -203,6 +196,9 @@ ...@@ -203,6 +196,9 @@
this.getCourseList(); this.getCourseList();
}, },
computed:{ computed:{
bannerImage() {
return process.uniEnv.qn_base_url + 'banner-xx.png'
},
}, },
methods: { methods: {
getList() { getList() {
...@@ -367,13 +363,20 @@ ...@@ -367,13 +363,20 @@
<style> <style>
.study { .study {
background: #f9f9f9; height: 100vh;
padding: 15rpx; background-color: #f4f5f7;
height: 100%; padding: 0rpx 30rpx 0 30rpx;
}
.title-view{
color: #333333;
font-weight: bold;
font-size: 40rpx;
} }
.banner { .banner {
padding: 2rpx; width: 690rpx;
height: 240rpx;
/* margin-left: -15rpx; */
} }
//交付规范 //交付规范
...@@ -408,8 +411,13 @@ ...@@ -408,8 +411,13 @@
background: #ffffff; background: #ffffff;
padding: 18rpx; padding: 18rpx;
margin-bottom: 11px; margin-bottom: 11px;
border-radius: 12rpx;
}
.title{
font-size: 32rpx;
font-weight: bold;
font-family: PingFang-SC-Bold, PingFang-SC;
} }
.class1 { .class1 {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
......
<template> <template>
<view class="content"> <view class="test-result">
<view class="title"> <text class="title">考试结果</text>
考试结果
</view>
<view class="result"> <view class="result">
未通过 未通过
</view> </view>
<view class="details"> <view class="test-explain">
<view class=""> <view class="hang">
<text class="first">合格条件:</text><text>答对20题</text> <text class="text1">合格条件:</text><text class="text2">答对20题</text>
</view>
<view class="">
<text class="first">考试结果:</text><text>答对10题</text>
</view> </view>
<view class=""> <view class="hang">
<text class="first">考试用时</text><text>16分29秒</text> <text class="text1">考试结果:</text><text class="text2">答对10题</text>
</view> </view>
<view class="btn"> <view class="hang">
<button class="btn1">再答一次</button> <text class="text1">考试用时:</text><text class="text2">16分29秒</text>
<button class="btn2">退出重考</button>
</view> </view>
</view> </view>
<view class="btn">
<button class="btn1">再答一次</button>
<button class="btn2">退出重考</button>
</view>
</view> </view>
</template> </template>
...@@ -32,57 +29,61 @@ ...@@ -32,57 +29,61 @@
} }
}, },
methods:{ methods: {
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.content{ .test-result{
width: 100%; width: 610rpx;
height: 950rpx; height: 965rpx;
background: #DCDFE6; margin: 70rpx auto 0;
padding: 53rpx; .title{
} margin: 0 44rpx 0;
.title{
font-size: 30rpx;
}
.result{
color: red;
font-size: 73rpx;
text-align: center;
margin: 46rpx 0;
}
.details{
border-top: 2rpx dashed #808080;
height: 600rpx;
padding-top: 94rpx;
view{
margin: 26rpx 0 0;
.first{
margin: 0 20rpx 0;
}
} }
} .result{
.btn{ color: red;
.btn1{ font-size: 66rpx;
width: 477rpx; text-align: center;
height: 61rpx; border-bottom: 1px dashed #000000;
border-radius: 27rpx; margin: 74rpx 0;
line-height: 61rpx; padding: 66rpx;
font-size: 29rpx; }
background: #007AFF; .test-explain{
color: #FFFFFF; .hang{
margin: 140rpx auto 34rpx; margin: 26rpx 26rpx;
.text1{
color: #a69999;
margin-right: 22rpx;
}
.text2{
color: #333333;
}
}
} }
.btn2{ .btn{
width: 477rpx; margin-top: 236rpx;
height: 61rpx; .btn1{
border-radius: 27rpx; width: 478rpx;
line-height: 61rpx; height: 60rpx;
font-size: 29rpx; background: #0079fe;
color: #fff;
font-size: 26rpx;
line-height: 60rpx;
margin: 20rpx auto;
}
.btn2{
width: 478rpx;
height: 60rpx;
background: #f2f2f2;
color: #333333;
font-size: 26rpx;
line-height: 60rpx;
margin:0 auto;
}
} }
} }
</style> </style>
\ No newline at end of file
...@@ -83,14 +83,14 @@ export default { ...@@ -83,14 +83,14 @@ export default {
let params = { let params = {
nickname: app.globalData.authUserInfo.nickName, nickname: app.globalData.authUserInfo.nickName,
avatar: app.globalData.authUserInfo.avatarUrl, avatar: app.globalData.authUserInfo.avatarUrl,
wxAppNo: 1,
} }
login.appLogin().then(res => { login.appLogin().then(res => {
params.code = res.code params.code = res.code
return login.authorization(params); return login.authorization(params);
}).then(res => { }).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res && util.getToken()) { if (res) {
that.setUserData(res.data)
that.goBackPage() that.goBackPage()
} else { } else {
this.setLoginStatus() this.setLoginStatus()
...@@ -118,14 +118,14 @@ export default { ...@@ -118,14 +118,14 @@ export default {
avatar: app.globalData.authUserInfo.avatarUrl, avatar: app.globalData.authUserInfo.avatarUrl,
encryptedData: e.detail.encryptedData, encryptedData: e.detail.encryptedData,
iv: e.detail.iv, iv: e.detail.iv,
wxAppNo: 1,
} }
login.appLogin().then(res => { login.appLogin().then(res => {
params.code = res.code params.code = res.code
return login.signup(params); return login.signup(params);
}).then(res => { }).then(res => {
uni.hideLoading() uni.hideLoading()
if (res && util.getToken()) { if (res) {
that.setUserData(res.data)
that.goBackPage() that.goBackPage()
} else { } else {
uni.showToast({ uni.showToast({
...@@ -169,6 +169,16 @@ export default { ...@@ -169,6 +169,16 @@ export default {
} }
}, },
setUserData(userInfo) {
if (userInfo && userInfo.token) {
// 如果已经登录则直接获取相关信息
util.setOpenid(userInfo.wxopenid);
this.$u.vuex('vuex_token', userInfo.token);
uni.setStorageSync("user-info", userInfo);
} else {
this.$u.vuex('vuex_token', '');
}
},
setLoginStatus(authed = true) { setLoginStatus(authed = true) {
if (authed) { if (authed) {
......
...@@ -22,32 +22,52 @@ ...@@ -22,32 +22,52 @@
<view class="class-item" :key="groupIndex"> <view class="class-item" :key="groupIndex">
<view class="title">{{groupItem.groupName}}</view> <view class="title">{{groupItem.groupName}}</view>
<view class="class-bd"> <view class="class-bd">
<u-form-item v-for="(item,itemIndex) in groupItem.item" :key="itemIndex" <u-form-item v-for="(item,itemIndex) in groupItem.item" :key="itemIndex"
label-position="top" label-position="top" :prop="item.fieldsName">
:prop="item.fieldsName"> <view class="label" v-if="item.fieldsType!=='location'">
<view class="label" v-if="toLowerCase(item.fieldsType)!=='location'" @click="nextStep(item)">
<text class="required" v-if="item.required">*</text> <text class="required" v-if="item.required">*</text>
{{item.fieldsTitle}} {{item.fieldsTitle}}
</view> </view>
<template v-if="item.fieldsType"> <template v-if="item.fieldsType">
<xh-input v-if="toLowerCase(item.fieldsType)==='input'" :groupIndex="groupIndex" <xh-input v-if="typeToComponentType(item.fieldsType)==='input'" :groupIndex="groupIndex"
:itemIndex="itemIndex" :item="item" @value-change="fieldValueChange"> :itemIndex="itemIndex" :item="item" @value-change="fieldValueChange">
</xh-input> </xh-input>
<xh-radio v-else-if="toLowerCase(item.fieldsType)==='radio'" :groupIndex="groupIndex" <xh-multi-input v-else-if="typeToComponentType(item.fieldsType)==='multiinput'"
:itemIndex="itemIndex" :item="item" @value-change="fieldValueChange"> :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item"
@value-change="fieldValueChange">
</xh-multi-input>
<xh-radio v-else-if="typeToComponentType(item.fieldsType)==='radio'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item"
@value-change="fieldValueChange">
</xh-radio> </xh-radio>
<xh-checkbox v-else-if="toLowerCase(item.fieldsType)==='checkbox'" :groupIndex="groupIndex" <xh-checkbox v-else-if="typeToComponentType(item.fieldsType)==='checkbox'"
:itemIndex="itemIndex" :item="item" @value-change="fieldValueChange"> :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item"
@value-change="fieldValueChange">
</xh-checkbox> </xh-checkbox>
<xh-select v-else-if="toLowerCase(item.fieldsType)==='select'" :groupIndex="groupIndex" <xh-select v-else-if="typeToComponentType(item.fieldsType)==='select'"
:itemIndex="itemIndex" :item="item" @value-change="fieldValueChange"> :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item"
@value-change="fieldValueChange">
</xh-select> </xh-select>
<xh-files v-else-if="toLowerCase(item.fieldsType)==='file'" :groupIndex="groupIndex" <xh-files v-else-if="typeToComponentType(item.fieldsType)==='file'"
:itemIndex="itemIndex" :item="item" @value-change="fieldValueChange"> :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item"
@value-change="fieldValueChange">
</xh-files> </xh-files>
<xh-location v-else-if="toLowerCase(item.fieldsType)==='location'" :groupIndex="groupIndex" <xh-location v-else-if="typeToComponentType(item.fieldsType)==='location'"
:itemIndex="itemIndex" :item="item" @value-change="fieldValueChange"> :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item"
@value-change="fieldValueChange">
</xh-location> </xh-location>
<xh-scan v-else-if="typeToComponentType(item.fieldsType)==='scan'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item"
@value-change="fieldValueChange">
</xh-scan>
<xh-picker v-else-if="typeToComponentType(item.fieldsType)==='picker'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item"
@value-change="fieldValueChange">
</xh-picker>
<xh-time v-else-if="typeToComponentType(item.fieldsType)==='time'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item"
@value-change="fieldValueChange">
</xh-time>
</template> </template>
</u-form-item> </u-form-item>
</view> </view>
...@@ -62,11 +82,16 @@ ...@@ -62,11 +82,16 @@
<script> <script>
import classifyData from '@/common/classify.data.js'; import classifyData from '@/common/classify.data.js';
import XhInput from '@/components/createCom/XhInput.vue' import XhInput from '@/components/createCom/XhInput.vue'
import XhMultiInput from '@/components/createCom/XhMultiInput.vue'
import XhRadio from '@/components/createCom/XhRadio.vue' import XhRadio from '@/components/createCom/XhRadio.vue'
import XhCheckbox from '@/components/createCom/XhCheckbox.vue' import XhCheckbox from '@/components/createCom/XhCheckbox.vue'
import XhSelect from '@/components/createCom/XhSelect.vue' import XhSelect from '@/components/createCom/XhSelect.vue'
import XhFiles from '@/components/createCom/XhFiles.vue' import XhFiles from '@/components/createCom/XhFiles.vue'
import XhLocation from '@/components/createCom/XhLocation.vue' import XhLocation from '@/components/createCom/XhLocation.vue'
import XhScan from '@/components/createCom/XhScan.vue'
import XhPicker from '@/components/createCom/XhPicker.vue'
import XhTime from '@/components/createCom/XhTime.vue'
// import XhRadio from '@/components/createCom/XhRadio.vue' // import XhRadio from '@/components/createCom/XhRadio.vue'
export default { export default {
data() { data() {
...@@ -116,12 +141,15 @@ ...@@ -116,12 +141,15 @@
}, },
components: { components: {
XhInput, XhInput,
XhMultiInput,
XhRadio, XhRadio,
XhCheckbox, XhCheckbox,
XhSelect, XhSelect,
XhFiles, XhFiles,
XhLocation XhLocation,
// formCom XhScan,
XhPicker,
XhTime,
}, },
created() { created() {
// console.log(allComponents,'allComponents') // console.log(allComponents,'allComponents')
...@@ -147,24 +175,63 @@ ...@@ -147,24 +175,63 @@
if (groupItem.item) { if (groupItem.item) {
innerItem = groupItem.item[data.itemIndex] innerItem = groupItem.item[data.itemIndex]
} }
console.log(innerItem, 'innerItem') console.log(data.value,'data.value',innerItem, 'innerItem')
this.form[innerItem.fieldsName] = data.value if(innerItem.fieldsType ==='multiInput'){
// 多个输入框的值触发
let key = Object.keys(data.value)[0]
this.form[key] = data.value[key]
}else{
this.form[innerItem.fieldsName] = data.value
}
console.log(this.form, 'this.form') console.log(this.form, 'this.form')
}, },
nextStep(item) { nextStep(item) {
// 下一步 // 下一步
console.log(item, 'item') console.log(item, 'item')
}, },
fieldTypeStatus(type){ typeToComponentType(type) {
let typeArr = ['input','radio','checkbox','select','file'] // 将fieldType类型统一转换为公共组件判定类型
let fieldsType = type.toLocaleLowerCase() let formType = ''
let flag = false type = type.toLocaleLowerCase()
flag = typeArr.indexOf(fieldsType)>=0 console.log(type,'type')
return flag switch (type) {
}, case 'text':
toLowerCase(str){ case 'password':
str = str || '' case 'textarea':
return str.toLocaleLowerCase() case 'number':
formType = 'input'
break
case 'multiinput':
formType = 'multiinput'
break;
case 'select':
formType = 'select'
break
case 'checkbox':
formType = 'checkbox'
break
case 'file':
formType = 'file'
break
case 'location':
formType = 'location'
break
case 'scan':
formType = 'scan'
break
case 'picker':
case 'mutipicker':
formType = 'picker'
break
case 'time':
formType = 'time'
break
// case 'file':
// formType = 'XhFiles'
// break
}
console.log(formType,'formType')
return formType
}, },
// ------------------------- 以下方法为展示滚动切换 ------------------------- // ------------------------- 以下方法为展示滚动切换 -------------------------
// 点击左边的栏目切换 // 点击左边的栏目切换
......
This diff is collapsed.
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<text class="label">电工工龄(年)</text> <text class="label">电工工龄(年)</text>
</view> </view>
<p :class="['u-flex-1 u-text-right area', {before: !baseInfo.working_age}]"> <p :class="['u-flex-1 u-text-right area', {before: !baseInfo.working_age}]">
{{ baseInfo.working_age ? workingAgeTxt : '去选择'}} {{ baseInfo.working_age !== '' ? workingAgeTxt : '去选择'}}
</p> </p>
<u-icon name="arrow-right" color="#2272FF" size="28"></u-icon> <u-icon name="arrow-right" color="#2272FF" size="28"></u-icon>
</view> </view>
...@@ -66,9 +66,10 @@ ...@@ -66,9 +66,10 @@
<view class="seat"></view> <view class="seat"></view>
<template v-slot:bottom> <template v-slot:bottom>
<view class="btn-wrap flex-xc"> <view class="btn-wrap flex-xc">
<button class="btn-submit" :disabled="!submitStatus" @click="$u.debounce(submitBaseInfo, 500)"> <u-button class="btn-submit" @click="$u.debounce(submitBaseInfo, 500)" :custom-style="buttonStyle"
确定 type="primary" shape="circle" :hover-class="submitStatus ? '' : 'none'">
</button> {{submitStatus ? '已确认信息,下一步' : '下一步'}}
</u-button>
</view> </view>
</template> </template>
</Settle> </Settle>
...@@ -123,15 +124,32 @@ ...@@ -123,15 +124,32 @@
}, },
cityText() { cityText() {
return this.areaTxts.join('、') return this.areaTxts.join('、')
}, },
anquanImage() { anquanImage() {
return qn_base_url + 'anquan.png' return process.uniEnv.qn_base_url + 'anquan.png'
}, },
mixingImage() { mixingImage() {
return qn_base_url + 'mixing.png' return process.uniEnv.qn_base_url + 'mixing.png'
}, },
dizhiImage() { dizhiImage() {
return qn_base_url + 'dizhi.png' return process.uniEnv.qn_base_url + 'dizhi.png'
},
buttonStyle() {
return this.submitStatus ? {
'color': '#FFFFFF',
'background-color': '#2272FF;',
'width': '600rpx',
'height': '104rpx',
'font-size': '32rpx',
'font-weight': 'bold'
} : {
'color': '#FFFFFF',
'background-color': '#D1D4D4;',
'width': '600rpx',
'height': '104rpx',
'font-size': '32rpx',
'font-weight': 'bold'
}
} }
}, },
components: { components: {
...@@ -572,20 +590,7 @@ ...@@ -572,20 +590,7 @@
.btn-wrap { .btn-wrap {
width: 100%; width: 100%;
.btn-submit { .btn-submit {}
width: 600rpx;
height: 104rpx;
line-height: 104rpx;
border-radius: 52rpx;
background: #2272FF;
font-size: 32rpx;
color: #fff;
&[disabled] {
background-color: #D1D4D4;
color: #FFFFFF;
}
}
} }
.itemView { .itemView {
...@@ -680,7 +685,9 @@ ...@@ -680,7 +685,9 @@
} }
.address-textarea { .address-textarea {
font-size: 26rpx; font-size: 26rpx;
width: 100%;
height: 100%;
} }
.tip-text { .tip-text {
...@@ -696,7 +703,9 @@ ...@@ -696,7 +703,9 @@
} }
.tip-image { .tip-image {
width: 34rpx; width: 30rpx;
height: 32rpx;
flex-shrink: 0;
margin-right: 8rpx; margin-right: 8rpx;
margin-top: 2rpx; margin-top: 2rpx;
} }
......
<template> <template>
<view class="img-wrap rel"> <view class="img-wrap rel">
<view class="upload-box"> <view class="upload-box">
<view class="img-item pic" v-for="(file,index) in imgList" > <view class="img-item pic" v-for="(file,index) in imgList" :key="index" >
<!-- <view class="tip-sucess u-flex u-row-center" v-if="file && (file.status == status.QUEUED || file.status == status.UPLOADING)"> <!-- <view class="tip-sucess u-flex u-row-center" v-if="file && (file.status == status.QUEUED || file.status == status.UPLOADING)">
<span>正在上传中...{{file.percent}}%</span> <span>正在上传中...{{file.percent}}%</span>
</view> --> </view> -->
......
...@@ -30,23 +30,23 @@ ...@@ -30,23 +30,23 @@
<text class="card-item-text">{{ fileInfo[cardkey] }}</text> <text class="card-item-text">{{ fileInfo[cardkey] }}</text>
</view> </view>
<view class="line-view"></view> <view class="line-view"></view>
<view class="card-item-error" v-if="fileInfo[cardkey] <view class="card-item-error" v-if="((cardkey == 'id_card_name' || cardkey == 'id_card_number') && frontErrorMsg)">{{ frontErrorMsg }}</view>
&& ((cardkey == 'id_card_name' || cardkey == 'id_card_number') && frontErrorMsg)">{{frontErrorMsg}}</view>
<view class="card-item-error" v-if="(cardkey == 'id_card_date' && backErrorMsg)">{{ backErrorMsg }}</view> <view class="card-item-error" v-if="(cardkey == 'id_card_date' && backErrorMsg)">{{ backErrorMsg }}</view>
</view> </view>
</view> </view>
<view v-if="index == 0" class="bottom-tip-view"> <view v-if="index == 0" class="bottom-tip-view">
<image class="bottom-tip-image" mode="widthFix" :src="tishiImage"></image> <image class="bottom-tip-image" mode="widthFix" :src="tishiImage"></image>
<text>所上传的身份证信息必须与银行卡开户绑定身份证信息一致,否则将导致订单报酬无法交付</text> <text>所上传的身份证信息必须与银行卡开户绑定身份证信息一致,否则将导致订单报酬无法交付</text>
</view> </view>
</view> </view>
</view> </view>
<template v-slot:bottom> <template v-slot:bottom>
<view class="btn-wrap flex-xc"> <view class="btn-wrap flex-xc">
<button class="btn-submit" :disabled="!submitBtnStatus" @click="$u.debounce(submitFileInfo, 500)"> <u-button class="btn-submit" @click="$u.debounce(submitFileInfo, 500)" :custom-style="buttonStyle"
{{ !submitBtnStatus ? '完成必填项,可提交资料' : '提交' }} type="primary" shape="circle" :hover-class="submitStatus ? '' : 'none'">
</button> {{ !submitBtnStatus ? '下一步' : '我已确认信息,下一步' }}
</u-button>
</view> </view>
</template> </template>
...@@ -144,7 +144,7 @@ export default { ...@@ -144,7 +144,7 @@ export default {
label: "实名认证", label: "实名认证",
tips: "上传二代身份证照片,图片大小不大于3M", tips: "上传二代身份证照片,图片大小不大于3M",
imgs: [], imgs: [],
placeholderImages: [qn_base_url + 'renxiang.png', qn_base_url + 'guohui.png'] placeholderImages: [process.uniEnv.qn_base_url + 'renxiang.png', process.uniEnv.qn_base_url + 'guohui.png']
}, },
// { // {
// filedName: "id_card_back", // filedName: "id_card_back",
...@@ -161,7 +161,7 @@ export default { ...@@ -161,7 +161,7 @@ export default {
maxImgs: 1, maxImgs: 1,
tips: "上传电工证证照片,图片大小不大于3M", tips: "上传电工证证照片,图片大小不大于3M",
imgs: [], imgs: [],
placeholderImages: [qn_base_url + 'diangong.png'] placeholderImages: [process.uniEnv.qn_base_url + 'diangong.png']
}, },
{ {
filedName: "driver_license", filedName: "driver_license",
...@@ -169,7 +169,7 @@ export default { ...@@ -169,7 +169,7 @@ export default {
imgs: [], imgs: [],
maxImgs: 999, maxImgs: 999,
tips: "两证单张照片需包含两页内容,每种证件只上传一张照片", tips: "两证单张照片需包含两页内容,每种证件只上传一张照片",
placeholderImages: [qn_base_url + 'jiashi.png', qn_base_url + 'jiashi.png'] placeholderImages: [process.uniEnv.qn_base_url + 'jiashi.png', process.uniEnv.qn_base_url + 'jiashi.png']
}, },
{ {
filedName: "vehicle_front", filedName: "vehicle_front",
...@@ -177,8 +177,8 @@ export default { ...@@ -177,8 +177,8 @@ export default {
maxImgs: 1, maxImgs: 1,
tips: "上传车辆照片", tips: "上传车辆照片",
imgs: [], imgs: [],
placeholderImages: [qn_base_url + 'zhengmian.png', placeholderImages: [process.uniEnv.qn_base_url + 'zhengmian.png',
qn_base_url + 'cemian.png'] process.uniEnv.qn_base_url + 'cemian.png']
}, },
], ],
...@@ -223,15 +223,32 @@ export default { ...@@ -223,15 +223,32 @@ export default {
'id_card_number': '身份证号', 'id_card_number': '身份证号',
'id_card_date': '有效期' 'id_card_date': '有效期'
} }
}, },
anquanImage() { anquanImage() {
return qn_base_url + 'anquan.png' return process.uniEnv.qn_base_url + 'anquan.png'
}, },
mixingImage() { mixingImage() {
return qn_base_url + 'mixing.png' return process.uniEnv.qn_base_url + 'mixing.png'
}, },
tishiImage() { tishiImage() {
return qn_base_url + 'tishi.png' return process.uniEnv.qn_base_url + 'tishi.png'
},
buttonStyle() {
return this.submitBtnStatus ? {
'color': '#FFFFFF',
'background-color': '#2272FF;',
'width': '600rpx',
'height': '104rpx',
'font-size': '32rpx',
'font-weight': 'bold'
} : {
'color': '#FFFFFF',
'background-color': '#D1D4D4;',
'width': '600rpx',
'height': '104rpx',
'font-size': '32rpx',
'font-weight': 'bold'
}
} }
}, },
components: { components: {
...@@ -448,7 +465,6 @@ export default { ...@@ -448,7 +465,6 @@ export default {
return; return;
} }
let fileInfo = this.fileInfo; let fileInfo = this.fileInfo;
debugger
fileInfo.other_photos = JSON.stringify(fileInfo.other_photos) fileInfo.other_photos = JSON.stringify(fileInfo.other_photos)
let submitInfoData = { let submitInfoData = {
...fileInfo, ...fileInfo,
...@@ -656,9 +672,11 @@ export default { ...@@ -656,9 +672,11 @@ export default {
} }
.tip-image { .tip-image {
width: 34rpx; width: 30rpx;
height: 32rpx;
margin-right: 8rpx; margin-right: 8rpx;
margin-top: 2rpx; margin-top: 2rpx;
flex-shrink: 0;
} }
.bottom-tip-view { .bottom-tip-view {
...@@ -673,7 +691,7 @@ export default { ...@@ -673,7 +691,7 @@ export default {
width: 22rpx; width: 22rpx;
height: 22rpx; height: 22rpx;
margin-right: 8rpx; margin-right: 8rpx;
margin-top: 4rpx; margin-top: 4rpx;
flex-shrink: 0; flex-shrink: 0;
} }
...@@ -686,18 +704,7 @@ export default { ...@@ -686,18 +704,7 @@ export default {
width: 100%; width: 100%;
.btn-submit { .btn-submit {
width: 600rpx;
height: 104rpx;
line-height: 104rpx;
border-radius: 52rpx;
background: #2272FF;
font-size: 32rpx;
color: #fff;
&[disabled] {
background-color: #D1D4D4;
color: #FFFFFF;
}
} }
} }
.card-info-view { .card-info-view {
......
...@@ -2,65 +2,25 @@ ...@@ -2,65 +2,25 @@
<view class="back_view"> <view class="back_view">
<Settle :index="1"> <Settle :index="1">
<view class="content-view"> <view class="content-view">
<view style="padding: 30rpx;"> <view v-for="(item, index) in contentTexts" :key="index"
:class="['item-list', {last: contentTexts.length <= index + 1}]">
<view class="item"> <view class="item">
<view class="item-label"> <view class="item-label">
<text>招募要求</text> <text>{{item.title}}</text>
</view> </view>
<view class="item-content"> <view class="item-content">
<text> <text>{{item.content}}</text>
1.必须具备相关的从业证书——电工证;
2.有汽车:皮卡、小面包、小轿车等;
3.需具备一定的作业工具:如液压压线钳、冲击钻、电锤、登高安全带、电锤、绝缘电阻仪(摇表)、交流充电模拟器等;
4.有充电桩安装经验优先;
</text>
</view>
</view>
<view class="line-view"></view>
<view class="item">
<view class="item-label">
<text>结算价格</text>
</view>
<view class="item-content">
<text>
1.不同车企品牌结算价格不一,675元-1890元不等;
2.结算价格为包工包料价,安装材料根据车企品牌规格自行采购(电缆、空开、漏保);
3.结算账期:周结50%,剩余50%次月20号结算;
</text>
</view>
</view>
<view class="line-view"></view>
<view class="item">
<view class="item-label">
<text>入驻资料</text>
</view>
<view class="item-content">
<text>
1.身份证正反面照片
2.高/低压电工证正反面照片
3.车辆照片
</text>
</view>
</view>
<view class="line-view"></view>
<view class="item">
<view class="item-label">
<text>注意事项:</text>
</view>
<view class="item-content">
<text>
1.身份证,银行卡,签约人共有同一人,否则无法入驻。
2.充电桩材料按要求自行准备。
</text>
</view> </view>
</view> </view>
<view class="line-view" v-if="contentTexts.length > index + 1"></view>
</view> </view>
</view> </view>
<template v-slot:bottom> <template v-slot:bottom>
<button :class="['bottom_btn', {'active': isStop}]" @click="$u.debounce(applyClick, 500)"> <u-button class="bottom_btn" @click="$u.debounce(applyClick, 500)" :custom-style="buttonStyle"
type="primary" shape="circle" :hover-class="isStop ? '' : 'none'">
<text class="bottom_title" v-if="!isStop">浏览 {{count}} 秒后可申请入驻</text> <text class="bottom_title" v-if="!isStop">浏览 {{count}} 秒后可申请入驻</text>
<text class="bottom_title" v-if="isStop">申请入驻</text> <text class="bottom_title" v-if="isStop">申请入驻</text>
</button> </u-button>
</template> </template>
</Settle> </Settle>
</view> </view>
...@@ -82,6 +42,44 @@ ...@@ -82,6 +42,44 @@
saving: true saving: true
} }
}, },
computed: {
contentTexts() {
return [{
title: '招募要求',
content: '1.必须具备相关的从业证书——电工证;\n\
2.有汽车:皮卡、小面包、小轿车等\n\
3.需具备一定的作业工具:如液压压线钳、冲击钻、电锤、登高安全带、电锤、绝缘电阻仪(摇表)、交流充电模拟器等;\n\
4.有充电桩安装经验优先;'
}, {
title: '结算价格',
content: '1.不同车企品牌结算价格不一,675元-1890元不等;\n\
2.结算价格为包工包料价,安装材料根据车企品牌规格自行采购(电缆、空开、漏保);\n\
3.结算账期:周结50%,剩余50%次月20号结算;'
}, {
title: '入驻资料',
content: '1.身份证正反面照片\n\
2.高/低压电工证正反面照片\n\
3.车辆照片'
}, {
title: '注意事项',
content: '1.身份证,银行卡,签约人共有同一人,否则无法入驻。\n\
2.充电桩材料按要求自行准备。'
}]
},
buttonStyle() {
return this.isStop ? {
'color': '#FFFFFF',
'background-color': '#2272FF;',
'width': '600rpx',
'height': '104rpx',
} : {
'color': '#FFFFFF',
'background-color': '#D1D4D4;',
'width': '600rpx',
'height': '104rpx'
}
}
},
onLoad(e) { onLoad(e) {
this.initpageData(e) this.initpageData(e)
this.startCounting() this.startCounting()
...@@ -166,7 +164,7 @@ ...@@ -166,7 +164,7 @@
this.jumpJudge() this.jumpJudge()
}, },
jumpJudge() { jumpJudge() {
if (Number(this.status) > 0) { if (Number(this.status) > 0) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/settle/prompt' url: '/pages/settle/prompt'
...@@ -184,11 +182,11 @@ ...@@ -184,11 +182,11 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.back_view { .back_view {
background-color: #F4F5F7; background-color: #F4F5F7;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -204,9 +202,15 @@ ...@@ -204,9 +202,15 @@
background-color: #F4F5F7; background-color: #F4F5F7;
height: 2rpx; height: 2rpx;
width: 100%; width: 100%;
margin-bottom: 30rpx;
margin-top: 30rpx; margin-top: 30rpx;
}
.item-list {
padding: 30rpx 30rpx 0rpx 30rpx;
&.last {
padding-bottom: 30rpx;
}
} }
.item-label { .item-label {
...@@ -220,29 +224,21 @@ ...@@ -220,29 +224,21 @@
color: #333333; color: #333333;
font-size: 26rpx; font-size: 26rpx;
line-height: 50rpx; line-height: 50rpx;
margin-top: 30rpx; margin-top: 20rpx;
} }
.bottom_btn { // .bottom_btn {
width: 600rpx; // width: 600rpx;
height: 104rpx; // height: 104rpx;
line-height: 96rpx; // line-height: 96rpx;
border-radius: 54rpx; // display: flex;
// border: 4rpx solid #FFFFFF; // align-items: center;
display: flex; // justify-content: center;
align-items: center;
justify-content: center;
background-color: #D1D4D4;
&.active {
background-color: #2272FF;
} // .bottom_title {
// color: #fff;
.bottom_title { // }
color: #fff; // }
}
}
.bottom_title { .bottom_title {
font-weight: bold; font-weight: bold;
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
<view class="content"> <view class="content">
<Settle :index="5"> <Settle :index="5">
<view class="base-list"> <view class="base-list">
<view class="title">充电桩安装需缴纳设备押金</view> <view class="title">充电桩安装需缴纳配件押金</view>
<view class="price"><text>¥ </text>{{settledInfo.record.deposit}}</view> <view class="price"><text>¥ </text>{{settledInfo.record.deposit}}</view>
<view class="list"> <view class="list">
<view class="item u-flex u-row-between"> <view class="item u-flex u-row-between">
<view class="txt">您已缴纳金额</view> <view class="txt">已缴纳金额</view>
<view class="txt-value">¥ 0.00</view> <view class="txt-value">¥ 0.00</view>
</view> </view>
<view class="line-view"></view> <view class="line-view"></view>
...@@ -63,10 +63,10 @@ ...@@ -63,10 +63,10 @@
this.getBaseInfo() this.getBaseInfo()
} }
}, },
computed: { computed: {
weixinImage() { weixinImage() {
return qn_base_url + 'weixin.png' return process.uniEnv.qn_base_url + 'weixin.png'
} }
}, },
watch: { watch: {
isRefresh(val) { isRefresh(val) {
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
...this.payResult ...this.payResult
} }
const res = await this.$u.api.getSettleDepositResult(params); const res = await this.$u.api.getSettleDepositResult(params);
if (res.status !== true) { if (res.data !== true) {
this.saving = false this.saving = false
return return
} }
...@@ -156,8 +156,9 @@ ...@@ -156,8 +156,9 @@
code: code code: code
// appid:'wxd1d6eede324b0465' // appid:'wxd1d6eede324b0465'
} }
const response = await this.$u.api.paySettleDeposit(params) const response = await this.$u.api.paySettleDeposit(params)
if (response.status !== true) { console.log(response)
if (response.code !== 200) {
uni.showToast({ uni.showToast({
title: response.message, title: response.message,
icon: 'none' icon: 'none'
......
...@@ -2,38 +2,40 @@ ...@@ -2,38 +2,40 @@
<view class="container u-row-between" v-if="info"> <view class="container u-row-between" v-if="info">
<Settle :index="pageIndex"> <Settle :index="pageIndex">
<view class="content-view"> <view class="content-view">
<view style="min-height: 120rpx;" v-if="status == 8"></view>
<view class="u-flex u-row-center"> <view class="u-flex u-row-center">
<image :class="['icon', {active: status != 1}]" <image :class="['icon', {active: status != 1}]"
:src="imageUrl"> :src="imageUrl">
</image> </image>
</view> </view>
<view class="txt-box"> <view class="txt-box">
<text :class="['title', {failed: status == 4} ,index ? 'active' : '']" v-for="(txt,index) in info.txtArr">{{txt}}</text> <text :class="['title', {failed: status == 4} ,index ? 'active' : '']" v-for="(txt,index) in info.txtArr" :key="index">{{txt}}</text>
</view> </view>
<view class="tips-box" v-if="info.tipsArr"> <view class="tips-box" v-if="info.tipsArr">
<text :class="['tips',info.tipsArr.length>1 && index===0 ? 'red' : '']" <text :class="['tips',info.tipsArr.length>1 && index===0 ? 'red' : '']"
v-for="(txt,index) in info.tipsArr">{{txt}}</text> v-for="(txt,index) in info.tipsArr" :key="index">{{txt}}</text>
</view> </view>
<view class="services-view"> <view class="services-view">
<Services/> <view v-if="status != 8">
<image class="service-info-image" :src="erweimaImage"></image>
<view class="content-info-tip">长按二维码添加官方客服微信</view>
<view class="content-info-tip">及时了解审核进度</view>
</view>
</view> </view>
</view>
<template v-slot:bottom>
<button class="btn-submit" @click="$u.debounce(goPage, 500)">{{info.btnTxt}}</button> <button class="btn-submit" @click="$u.debounce(goPage, 500)">{{info.btnTxt}}</button>
</template> </view>
</Settle> </Settle>
</view> </view>
</template> </template>
<script> <script>
import Settle from '@/components/settle/index.vue' import Settle from '@/components/settle/index.vue'
import Services from '@/components/settle/services.vue' // import Services from '@/components/settle/services.vue'
export default { export default {
components: { components: {
Settle, Settle,
Services // Services
}, },
data() { data() {
...@@ -93,13 +95,15 @@ ...@@ -93,13 +95,15 @@
} }
}, },
computed: { computed: {
imageUrl() { imageUrl() {
return this.status == 1 ? qn_base_url + 'chenggong.png' : qn_base_url + 'icon-prompt.png' return this.status == 1 ? process.uniEnv.qn_base_url + 'chenggong.png' : process.uniEnv.qn_base_url + 'icon-prompt.png'
}, },
erweimaImage() {
return process.uniEnv.qn_base_url + 'erweima-bg.png'
},
}, },
onLoad(e) { onLoad(e) {
if (e) { if (e) {
if (e.pageIndex) { if (e.pageIndex) {
this.pageIndex = e.pageIndex; this.pageIndex = e.pageIndex;
...@@ -110,8 +114,8 @@ ...@@ -110,8 +114,8 @@
// } // }
}, },
onShow() { onShow() {
if (!this.settledInfo) { if (!this.settledInfo) {
this.getBaseInfo() this.getBaseInfo()
} }
}, },
...@@ -127,7 +131,28 @@ ...@@ -127,7 +131,28 @@
} }
let settledInfo = await app.getBaseInfo(this, callBack) let settledInfo = await app.getBaseInfo(this, callBack)
this.settledInfo = settledInfo this.settledInfo = settledInfo
this.status = settledInfo.record.status this.status = settledInfo.record.status
switch (this.status) {
case 1:
case 2:
case 3:
case 4:
this.pageIndex = 2;
break;
case 8:
this.pageIndex = 3;
break;
case 5:
case 6:
this.pageIndex = 4;
break;
case 7:
this.pageIndex = 5;
break;
default:
this.pageIndex = 1;
break;
}
uni.hideLoading() uni.hideLoading()
this.initInfo(settledInfo.record) this.initInfo(settledInfo.record)
}, },
...@@ -161,7 +186,7 @@ ...@@ -161,7 +186,7 @@
}, },
goPage() { goPage() {
const url = this.info.url const url = this.info.url
if (this.status == 1 || this.status == 3 || this.status == 3) { if (this.status == 1 || this.status == 3 || this.status == 7) {
uni.reLaunch({ uni.reLaunch({
url, url,
}); });
...@@ -188,19 +213,20 @@ ...@@ -188,19 +213,20 @@
position: absolute; position: absolute;
.icon { .icon {
margin-top: 68rpx; margin-top: 20rpx;
width: 334rpx; width: 224rpx;
height: 320rpx; height: 224rpx;
&.active { &.active {
width: 224rpx; margin-top: 38rpx;
height: 224rpx; width: 234rpx;
height: 222rpx;
} }
} }
.content-view { .content-view {
background-color: #FFFFFF; background-color: #FFFFFF;
margin-bottom: 188rpx; margin-bottom: 30rpx;
border-radius: 12rpx; border-radius: 12rpx;
padding: 30rpx; padding: 30rpx;
} }
...@@ -239,13 +265,15 @@ ...@@ -239,13 +265,15 @@
} }
.btn-submit { .btn-submit {
margin-top: 112rpx; margin-top: 50rpx;
margin-bottom: 30rpx;
width: 600rpx; width: 600rpx;
height: 104rpx; height: 104rpx;
line-height: 104rpx; line-height: 104rpx;
border-radius: 52rpx; border-radius: 52rpx;
background: #2272ff; background: #2272ff;
font-size: 32rpx; font-size: 32rpx;
font-weight: bold;
color: #fff; color: #fff;
&:disabled { &:disabled {
...@@ -255,9 +283,18 @@ ...@@ -255,9 +283,18 @@
} }
} }
.services-view { .services-view {
display: flex;
justify-content: center;
padding-top: 50rpx; padding-top: 50rpx;
text-align: center;
min-height: 120rpx;
.service-info-image {
margin-bottom: 30rpx;
width: 220rpx;
height: 220rpx;
}
.content-info-tip {
font-size: 22rpx;
color: #666666;
}
} }
} }
</style> </style>
...@@ -56,9 +56,10 @@ ...@@ -56,9 +56,10 @@
</view> </view>
<template v-slot:bottom> <template v-slot:bottom>
<view class="btn-wrap flex-xc"> <view class="btn-wrap flex-xc">
<button class="btn-submit" :disabled="!submitStatus" @click="$u.debounce(submitBaseInfo, 500)"> <u-button class="btn-submit" @click="$u.debounce(submitBaseInfo, 500)" :custom-style="buttonStyle"
我已阅读协议,点击签约{{count ? '('+count+')' : ''}} type="primary" shape="circle" :hover-class="submitStatus ? '' : 'none'">
</button> 我已确认信息,点击签约{{count ? '('+count+')' : ''}}
</u-button>
</view> </view>
</template> </template>
</Settle> </Settle>
...@@ -79,9 +80,8 @@ ...@@ -79,9 +80,8 @@
}, },
data() { data() {
return { return {
token: app.globalData.token,
baseInfo: { baseInfo: {
name: "郭小清", name: "",
id_card_no: "43072219800123456", id_card_no: "43072219800123456",
id: "", id: "",
bank_no: '', // 银行卡号 bank_no: '', // 银行卡号
...@@ -130,9 +130,26 @@ ...@@ -130,9 +130,26 @@
}, },
placeholderStyle() { placeholderStyle() {
return 'color:#999999;font-size:28rpx' return 'color:#999999;font-size:28rpx'
}, },
tips3Image() { tips3Image() {
return qn_base_url + 'tips3.png' return process.uniEnv.qn_base_url + 'tips3.png'
},
buttonStyle() {
return this.submitStatus ? {
'color': '#FFFFFF',
'background-color': '#2272FF;',
'width': '600rpx',
'height': '104rpx',
'font-size': '32rpx',
'font-weight': 'bold'
} : {
'color': '#FFFFFF',
'background-color': '#D1D4D4;',
'width': '600rpx',
'height': '104rpx',
'font-size': '32rpx',
'font-weight': 'bold'
}
} }
}, },
components: { components: {
...@@ -360,7 +377,7 @@ ...@@ -360,7 +377,7 @@
// }, 2000) // }, 2000)
}, },
async goSign() { async goSign() {
const token = app.globalData.token; const token = this.vuex_token;
const settledInfo = this.settledInfo const settledInfo = this.settledInfo
const baseInfo = this.baseInfo const baseInfo = this.baseInfo
const params = { const params = {
......
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
try { try {
var dataObject = JSON.parse(dataString); var dataObject = JSON.parse(dataString);
//do something //do something
var imageUrl = config.qiniuImageURLPrefix + '/' + dataObject.key; var imageUrl = config.qiniuImageURLPrefix + '/' + (dataObject.key || dataObject.src);
dataObject.imageURL = imageUrl; dataObject.imageURL = imageUrl;
if (success) { if (success) {
success(dataObject); success(dataObject);
......
...@@ -16,6 +16,7 @@ export const randomChar = function(l, url = "") { ...@@ -16,6 +16,7 @@ export const randomChar = function(l, url = "") {
} }
//图片选择 //图片选择
export const chooseImage = function(data) { export const chooseImage = function(data) {
console.log(data,'data-chooseImage')
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni.chooseImage({ uni.chooseImage({
count: data.count || 9, //默认9 count: data.count || 9, //默认9
......
...@@ -21,6 +21,6 @@ export default { ...@@ -21,6 +21,6 @@ export default {
} }
}, },
computed: { computed: {
...mapState(['ddd']) ...mapState($uStoreKey)
} }
} }
...@@ -29,10 +29,12 @@ function appLogin() { ...@@ -29,10 +29,12 @@ function appLogin() {
// 小程序授权 // 小程序授权
function authorization(data) { function authorization(data) {
return new Promise(async function (resolve, reject) { return new Promise(async function (resolve, reject) {
data.wxAppNo = app.globalData.wxAppNo
const res = await app.$vm.$u.api.loginWechatAuth(data) const res = await app.$vm.$u.api.loginWechatAuth(data)
if (res) { if (res) {
if (res.code == 200 && res.data) { if (res.code == 200 && res.data) {
app.setUserData(res.data) // app.setUserData(res.data)
// app.getBaseInfo(app.$vm)
resolve(res); resolve(res);
} else { } else {
reject(res); reject(res);
...@@ -49,10 +51,12 @@ function authorization(data) { ...@@ -49,10 +51,12 @@ function authorization(data) {
// 小程序注册 // 小程序注册
function signup(data) { function signup(data) {
return new Promise(async function (resolve, reject) { return new Promise(async function (resolve, reject) {
data.wxAppNo = app.globalData.wxAppNo
const res = await app.$vm.$u.api.loginWechatAuth(data) const res = await app.$vm.$u.api.loginWechatAuth(data)
if (res) { if (res) {
if (res.code == 200 && res.data) { if (res.code == 200 && res.data) {
app.setUserData(res.data) // app.setUserData(res.data)
// app.getBaseInfo(app.$vm)
resolve(res); resolve(res);
} else { } else {
uni.showModal({ uni.showModal({
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
* @property {Boolean} bold 激活选项的字体是否加粗(默认true) * @property {Boolean} bold 激活选项的字体是否加粗(默认true)
* @property {String} bg-color 组件背景颜色,mode为button时有效(默认#eeeeef) * @property {String} bg-color 组件背景颜色,mode为button时有效(默认#eeeeef)
* @property {String} button-color 按钮背景颜色,mode为button时有效(默认#ffffff) * @property {String} button-color 按钮背景颜色,mode为button时有效(默认#ffffff)
* @property {String Number} border-radius 圆角值,单位rpx(默认5)
* @event {Function} change 分段器选项发生改变时触发 * @event {Function} change 分段器选项发生改变时触发
* @example <u-subsection active-color="#ff9900"></u-subsection> * @example <u-subsection active-color="#ff9900"></u-subsection>
*/ */
...@@ -91,7 +92,12 @@ ...@@ -91,7 +92,12 @@
vibrateShort: { vibrateShort: {
type: Boolean, type: Boolean,
default: false default: false
} },
// 圆角值
borderRadius: {
type: [Number, String],
default: 5
},
}, },
data() { data() {
return { return {
...@@ -105,7 +111,7 @@ ...@@ -105,7 +111,7 @@
}, },
currentIndex: this.current, currentIndex: this.current,
buttonPadding: 3, // mode = button 时,组件的内边距 buttonPadding: 3, // mode = button 时,组件的内边距
borderRadius: 5, // 圆角值 // borderRadius: 5, // 圆角值
firstTimeVibrateShort: true // 组件初始化时,会触发current变化,此时不应震动 firstTimeVibrateShort: true // 组件初始化时,会触发current变化,此时不应震动
}; };
}, },
......
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