Commit b97e6cba authored by zhengzy's avatar zhengzy
parents f4c2b692 97161d77
......@@ -6,6 +6,7 @@ const UNI_APP = {
},
systemUrl: {
apiUrl: 'http://192.168.1.22', //java端域名请求头
}
},
qn_base_url: 'https://qn-static.banshouhui.com/self-support/'
}
module.exports = UNI_APP;
;
(function() {
let NODE_ENV = 'dev'; // dev:开发环境 | test:测试环境
let NODE_ENV = 'test'; // dev:开发环境 | test:测试环境
let ENV_VAR = null;
if (process.env.NODE_ENV === "development") {
if (NODE_ENV === 'dev') {
......
......@@ -6,7 +6,8 @@ const UNI_APP = {
},
systemUrl: {
apiUrl:'https://system.banshouhui.com', //java端域名请求头
}
},
qn_base_url: 'https://qn-static.banshouhui.com/self-support/'
}
module.exports = UNI_APP;
......@@ -6,6 +6,7 @@ const UNI_APP = {
},
systemUrl: {
apiUrl: 'https://system.dev.banshouhui.com', //java端域名请求头
}
},
qn_base_url: 'https://qn-static.banshouhui.com/self-support/'
}
module.exports = UNI_APP;
......@@ -2,10 +2,15 @@
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
"version": "0.0",
"configurations": [{
"type": "uniCloud",
"default": {
"launchtype": "remote"
}
}
"default" :
{
"launchtype" : "remote"
},
"mp-weixin" :
{
"launchtype" : "remote"
},
"type" : "uniCloud"
}
]
}
This diff is collapsed.
......@@ -7,17 +7,20 @@ import {
import {
settledApiFun
} 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 commonApi = commonApiFun(vm);
let settledApi = settledApiFun(vm)
let cloudApi = cloudRulesApiFun(vm)
let learnApi=learnApiFun(vm)
let orderApi=orderApiFun(vm)
let apiUrl = {
...commonApi,
...settledApi,
...cloudApi,
...learnApi
...learnApi,
...orderApi,
}
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){
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'});
......@@ -36,7 +36,10 @@ let settledApiFun = function(vm){
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 = {
getSettleBaseInfo,
......@@ -52,6 +55,7 @@ let settledApiFun = function(vm){
checkSettleSignInfo,
listOrderingTutorials,
saveCourseRate,
listByNotice,
}
return settledApi
}
......
export default [{
"groupName": "女装",
"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,
"fieldsTitle": "A字裙",
"fieldsName": "name",
"fieldsType": "input",
"fieldsValue": "",
"span":8,
"key": "A字裙",
"icon": "https://cdn.uviewui.com/uview/common/classify/1/1.jpg",
"cat": 10
......@@ -55,19 +90,28 @@ export default [{
"cat": 10
},
{
"fieldsTitle": "连衣裙",
"fieldsTitle": "充电桩编码",
"fieldsName": "scan",
"fieldsType": "scan",
"required": true,
"key": "连衣裙",
"icon": "https://cdn.uviewui.com/uview/common/classify/1/7.jpg",
"cat": 10
},
{
"fieldsTitle": "妈妈装",
"fieldsTitle": "多级选择",
"fieldsName": "mutiPicker",
"fieldsType": "mutipicker",
"required": true,
"key": "妈妈装",
"icon": "https://cdn.uviewui.com/uview/common/classify/1/8.jpg",
"cat": 10
},
{
"fieldsTitle": "牛仔裤",
"fieldsTitle": "时间选择",
"fieldsName": "time",
"fieldsType": "time",
"required": true,
"key": "牛仔裤",
"icon": "https://cdn.uviewui.com/uview/common/classify/1/9.jpg",
"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) => {
// 请求拦截,配置Token等参数
Vue.prototype.$u.http.interceptor.request = (config) => {
const reg = /\?\w+/;
let token = util.getToken()
let token = vm.vuex_token
// if(!token && noLoginUrl.indexOf(config.url)<0){
// toLoginPage()
// return false
......
<!-- ******************* 多选框 ******************* -->
<template>
<view class="list">
<view v-for="(item,index) in settings" :key="index"
......
<!-- ******************* 文件上传 ******************* -->
<template>
<view class="file-box">
<view class="u-flex" @click="selectUpload">
......@@ -5,7 +6,7 @@
<u-icon name="arrow-right" color="#666" size="28"></u-icon>
</view>
<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> -->
</view>
<u-popup v-model="maskShow" mode="center" width="500">
......@@ -58,7 +59,7 @@
// 直接打开相册
let config = {
options:{
consourceType:['album'],//['album', 'camera']
sourceType:['album'],//['album', 'camera']
}
}
await this.chooseImage('qiniu',config)
......
<!-- ******************* 输入框 ******************* -->
<template>
<view>
<u-input v-model="dataValue" @input="valueChange" :type="type" />
......
<!-- ******************* 定位 ******************* -->
<template>
<view class="list u-flex u-row-between">
<text class="required" v-if="item.required">*</text>
......@@ -10,7 +11,7 @@
<script>
import objMixin from './objMixin'
export default {
name: 'XhRadio',
name: 'XhLocation',
components: {},
mixins: [objMixin],
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>
<view class="list">
<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>
<view>
<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 @@
},
computed: {
url() {
return qn_base_url + 'top' + this.index + '.png'
return process.uniEnv.qn_base_url + 'topl' + this.index + '.png'
}
}
}
......@@ -36,7 +36,7 @@
border-radius: 12rpx;
overflow: auto;
position: fixed;
top: 320rpx;
top: 370rpx;
bottom: 0rpx;
left: 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";
import vuexStore from "@/store/$u.mixin.js";
import store from '@/store/index'
import {router,RouterMount} from '@/router/index.js' //路径换成自己的
import './common/global.js'
Vue.config.productionTip = false
Vue.mixin(vuexStore)
......
......@@ -6,7 +6,8 @@
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "首页"
"navigationBarTitleText": "首页",
"navigationStyle": "custom"
}
},
{
......@@ -52,7 +53,8 @@
{
"path": "pages/learn/index",
"style": {
"navigationBarTitleText": "学习"
"navigationBarTitleText": "学习",
"navigationStyle":"custom"//隐藏系统导航栏
}
},
{
......@@ -67,11 +69,11 @@
"navigationBarTitleText": "考试答题"
}
},
{
"path": "pages/learn/result",
"style": {
"navigationBarTitleText": "考试结果页"
}
{
"path":"pages/learn/result",
"style":{
"navigationBarTitleText":"考试答题"
}
},
{
"path": "pages/learn/news-details",
......@@ -172,7 +174,7 @@
"enablePullDownRefresh": false
}
}
],
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
......@@ -259,11 +261,6 @@
"path": "pages/settle/sign-contract", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
},
{
"name": "缴纳保证金", //模式名称
"path": "pages/settle/pay-ensure", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
},
{
"name": "订单 - 完工配置", //模式名称
"path": "pages/order/complete", //启动页面,必选
......
<template>
<view class="backView">
<Settle :index="2">
<Settle :index="3">
<!-- <template v-if="isStart==false">
<view class="noticeView">
<text class="noticeText">规则:系统随机出现20道考试题目,每道题5分,每题答题时间100秒,在规定时间内答对题目的记分。
......@@ -15,8 +15,8 @@
<!-- <template v-if="isStart==true && currentItem"> -->
<view class="bottom-padding" v-if="currentItem">
<view class="title-view">
<view class="title-text">
<text>{{ titleText[Math.max(0, currentItem.question.answerType - 1)] }}</text>
<view :class="['title-text', {'radio': currentItem.question ? currentItem.question.answerType == 1 : true}]">
<text>{{ titleText[Math.max(0, currentItem.question ? currentItem.question.answerType - 1 : 0)] }}</text>
</view>
<view class="title-right-view">
<image class="timeIcon" :src="time1Image" mode=""></image>
......@@ -105,15 +105,15 @@
computed: {
titleText() {
return ['单选', '多选', '问答']
},
time1Image() {
return qn_base_url + 'time1.png'
},
chenggongImage() {
return qn_base_url + 'chenggong.png'
},
timuImage() {
return qn_base_url + 'timu.png'
},
time1Image() {
return process.uniEnv.qn_base_url + 'time1.png'
},
chenggongImage() {
return process.uniEnv.qn_base_url + 'chenggong.png'
},
timuImage() {
return process.uniEnv.qn_base_url + 'timu.png'
}
},
onLoad(e) {
......@@ -160,7 +160,7 @@
url: systemApiUrl +
'/wxh-worker-rest/rest/exam' +
'/serviceRule/userExamInfo/' +
getApp().globalData.token +
that.vuex_token +
'?examId=' + this.examId,
method: 'POST',
data: {
......@@ -231,7 +231,7 @@
url: systemApiUrl +
'/wxh-worker-rest/rest/exam' +
'/serviceRule/' +
getApp().globalData.token +
that.vuex_token +
'?examId=' + this.examId,
method: 'POST',
data: {
......@@ -297,7 +297,7 @@
url: systemApiUrl +
'/wxh-worker-rest/rest/exam' +
'/serviceRule/next/' +
getApp().globalData.token +
that.vuex_token +
'?userExamId=' + this.userExamId +
'&questionId=' + questionId +
'&userAnswerIds=' + this.userAnswerIds,
......@@ -468,7 +468,7 @@
let that = this
uni.request({
url: ucenterApiUrl + '/v1/settled/update-settled-exam-score' +
'?access-token=' + getApp().globalData.token,
'?access-token=' + that.vuex_token,
method: 'POST',
data: {
score: this.examScore || 0,
......@@ -738,6 +738,9 @@
display: flex;
align-items: center;
justify-content: center;
&.radio {
background-color: #2272FF;
}
}
.title-right-view {
......@@ -757,7 +760,7 @@
}
.time-count-down {
width: 80rpx;
width: 50rpx;
text-align: right;
}
}
......
This diff is collapsed.
......@@ -116,6 +116,7 @@
})
},
}
}
</script>
......
This diff is collapsed.
......@@ -10,8 +10,9 @@
<view class="learn-list" v-for="(item, key) in tutorials" :key="key">
<view class="learn-list-item">
<view class="item-content">
<view class="item-st"><text
class="item-st-text">{{item.title.split(' ') ? item.title.split(' ')[0] : ''}}</text>
<view class="item-st">
<image style="width: 80rpx;height: 36rpx;" :src="kcImage"></image>
<text class="item-st-text">{{item.title.split(' ') ? item.title.split(' ')[0] : ''}}</text>
</view>
<view class="item-title">{{item.title.split(' ') ? item.title.split(' ')[1] : ''}}</view>
</view>
......@@ -78,16 +79,16 @@
tipsTitle: '提示:',
// 简单使用固定培训视频
tutorials: [{
id: 'Course1',
id: 'course1',
courseId: 1,
title: '',
value: '已学习',
value: '去学习',
courseActive: {},
status: 1,
status: 0,
url: ''
},
{
id: 'Course2',
id: 'course2',
courseId: 2,
title: '',
value: '去学习',
......@@ -96,13 +97,22 @@
url: ''
},
{
id: 'Course3',
id: 'course3',
courseId: 3,
title: '',
value: '去学习',
courseActive: {},
status: 0,
url: ''
},
{
id: 'course4',
courseId: 4,
title: '',
value: '去学习',
courseActive: {},
status: 0,
url: ''
}
],
tipsDescription: '接单考核可让您快速了解如何使用小程序,建议先查看学习教程'
......@@ -136,9 +146,12 @@
'font-size': '32rpx',
'font-weight': 'bold'
}
},
tips1Image() {
return qn_base_url + 'tips1@3x.png'
},
tips1Image() {
return process.uniEnv.qn_base_url + 'tips1.png'
},
kcImage() {
return process.uniEnv.qn_base_url + 'kc.png'
}
},
onLoad() {
......@@ -148,6 +161,8 @@
item['value'] = item['status'] ? '已学习' : '去学习'
item['courseActive'] = item['status'] ? this.learnStyle : this.learnedStyle
})
},
onShow() {
this.loadLearnData();
},
methods: {
......@@ -157,7 +172,7 @@
.listOrderingTutorials()
.then(res => {
const results = res.data;
if (res.status == 200 && results && results.length > 0) {
if (res.code == 200 && results) {
that.tutorials.forEach((data, i) => {
if (results.hasOwnProperty(data.id)) {
data.status = results[data.id];
......@@ -173,7 +188,6 @@
}
})
.catch(e => {
debugger;
console.log(e, 'loadLearnData');
});
},
......@@ -238,7 +252,9 @@
}
.tip-image {
width: 28rpx;
width: 26rpx;
height: 32rpx;
flex-shrink: 0;
margin-right: 10rpx;
margin-top: 2rpx;
}
......@@ -289,15 +305,18 @@
.item-st {
width: 80rpx;
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;
text-align: center;
margin-right: 20rpx;
line-height: 24rpx;
position: relative;
.item-st-text {
color: #FFFFFF;
position: absolute;
font-size: 16rpx;
left: 20rpx;
top: 8rpx;
line-height: 28rpx;
}
}
......
<template>
<view class="study">
<view class="banner">
<u-swiper :list="banner"></u-swiper>
</view>
<u-navbar
:is-back="false"
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> -->
<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>
<swiper :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish" style="height: 755rpx;">
<swiper-item class="swiper-item">
......@@ -160,19 +166,6 @@
data() {
return {
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: [{
name: "交付规范",
},
......@@ -203,6 +196,9 @@
this.getCourseList();
},
computed:{
bannerImage() {
return process.uniEnv.qn_base_url + 'banner-xx.png'
},
},
methods: {
getList() {
......@@ -367,13 +363,20 @@
<style>
.study {
background: #f9f9f9;
padding: 15rpx;
height: 100%;
height: 100vh;
background-color: #f4f5f7;
padding: 0rpx 30rpx 0 30rpx;
}
.title-view{
color: #333333;
font-weight: bold;
font-size: 40rpx;
}
.banner {
padding: 2rpx;
width: 690rpx;
height: 240rpx;
/* margin-left: -15rpx; */
}
//交付规范
......@@ -408,8 +411,13 @@
background: #ffffff;
padding: 18rpx;
margin-bottom: 11px;
border-radius: 12rpx;
}
.title{
font-size: 32rpx;
font-weight: bold;
font-family: PingFang-SC-Bold, PingFang-SC;
}
.class1 {
display: flex;
justify-content: space-between;
......
<template>
<view class="content">
<view class="title">
考试结果
</view>
<view class="test-result">
<text class="title">考试结果</text>
<view class="result">
未通过
</view>
<view class="details">
<view class="">
<text class="first">合格条件:</text><text>答对20题</text>
</view>
<view class="">
<text class="first">考试结果:</text><text>答对10题</text>
<view class="test-explain">
<view class="hang">
<text class="text1">合格条件:</text><text class="text2">答对20题</text>
</view>
<view class="">
<text class="first">考试用时</text><text>16分29秒</text>
<view class="hang">
<text class="text1">考试结果:</text><text class="text2">答对10题</text>
</view>
<view class="btn">
<button class="btn1">再答一次</button>
<button class="btn2">退出重考</button>
<view class="hang">
<text class="text1">考试用时:</text><text class="text2">16分29秒</text>
</view>
</view>
<view class="btn">
<button class="btn1">再答一次</button>
<button class="btn2">退出重考</button>
</view>
</view>
</template>
......@@ -32,57 +29,61 @@
}
},
methods:{
methods: {
}
}
</script>
<style lang="scss">
.content{
width: 100%;
height: 950rpx;
background: #DCDFE6;
padding: 53rpx;
}
.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;
}
.test-result{
width: 610rpx;
height: 965rpx;
margin: 70rpx auto 0;
.title{
margin: 0 44rpx 0;
}
}
.btn{
.btn1{
width: 477rpx;
height: 61rpx;
border-radius: 27rpx;
line-height: 61rpx;
font-size: 29rpx;
background: #007AFF;
color: #FFFFFF;
margin: 140rpx auto 34rpx;
.result{
color: red;
font-size: 66rpx;
text-align: center;
border-bottom: 1px dashed #000000;
margin: 74rpx 0;
padding: 66rpx;
}
.test-explain{
.hang{
margin: 26rpx 26rpx;
.text1{
color: #a69999;
margin-right: 22rpx;
}
.text2{
color: #333333;
}
}
}
.btn2{
width: 477rpx;
height: 61rpx;
border-radius: 27rpx;
line-height: 61rpx;
font-size: 29rpx;
.btn{
margin-top: 236rpx;
.btn1{
width: 478rpx;
height: 60rpx;
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>
\ No newline at end of file
</style>
......@@ -83,14 +83,14 @@ export default {
let params = {
nickname: app.globalData.authUserInfo.nickName,
avatar: app.globalData.authUserInfo.avatarUrl,
wxAppNo: 1,
}
login.appLogin().then(res => {
params.code = res.code
return login.authorization(params);
}).then(res => {
uni.hideLoading();
if (res && util.getToken()) {
if (res) {
that.setUserData(res.data)
that.goBackPage()
} else {
this.setLoginStatus()
......@@ -118,14 +118,14 @@ export default {
avatar: app.globalData.authUserInfo.avatarUrl,
encryptedData: e.detail.encryptedData,
iv: e.detail.iv,
wxAppNo: 1,
}
login.appLogin().then(res => {
params.code = res.code
return login.signup(params);
}).then(res => {
uni.hideLoading()
if (res && util.getToken()) {
if (res) {
that.setUserData(res.data)
that.goBackPage()
} else {
uni.showToast({
......@@ -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) {
if (authed) {
......
......@@ -22,32 +22,52 @@
<view class="class-item" :key="groupIndex">
<view class="title">{{groupItem.groupName}}</view>
<view class="class-bd">
<u-form-item v-for="(item,itemIndex) in groupItem.item" :key="itemIndex"
label-position="top"
:prop="item.fieldsName">
<view class="label" v-if="toLowerCase(item.fieldsType)!=='location'" @click="nextStep(item)">
<u-form-item v-for="(item,itemIndex) in groupItem.item" :key="itemIndex"
label-position="top" :prop="item.fieldsName">
<view class="label" v-if="item.fieldsType!=='location'">
<text class="required" v-if="item.required">*</text>
{{item.fieldsTitle}}
</view>
<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">
</xh-input>
<xh-radio v-else-if="toLowerCase(item.fieldsType)==='radio'" :groupIndex="groupIndex"
:itemIndex="itemIndex" :item="item" @value-change="fieldValueChange">
<xh-multi-input v-else-if="typeToComponentType(item.fieldsType)==='multiinput'"
: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-checkbox v-else-if="toLowerCase(item.fieldsType)==='checkbox'" :groupIndex="groupIndex"
:itemIndex="itemIndex" :item="item" @value-change="fieldValueChange">
<xh-checkbox v-else-if="typeToComponentType(item.fieldsType)==='checkbox'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item"
@value-change="fieldValueChange">
</xh-checkbox>
<xh-select v-else-if="toLowerCase(item.fieldsType)==='select'" :groupIndex="groupIndex"
:itemIndex="itemIndex" :item="item" @value-change="fieldValueChange">
<xh-select v-else-if="typeToComponentType(item.fieldsType)==='select'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item"
@value-change="fieldValueChange">
</xh-select>
<xh-files v-else-if="toLowerCase(item.fieldsType)==='file'" :groupIndex="groupIndex"
:itemIndex="itemIndex" :item="item" @value-change="fieldValueChange">
<xh-files v-else-if="typeToComponentType(item.fieldsType)==='file'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item"
@value-change="fieldValueChange">
</xh-files>
<xh-location v-else-if="toLowerCase(item.fieldsType)==='location'" :groupIndex="groupIndex"
:itemIndex="itemIndex" :item="item" @value-change="fieldValueChange">
<xh-location v-else-if="typeToComponentType(item.fieldsType)==='location'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item"
@value-change="fieldValueChange">
</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>
</u-form-item>
</view>
......@@ -62,11 +82,16 @@
<script>
import classifyData from '@/common/classify.data.js';
import XhInput from '@/components/createCom/XhInput.vue'
import XhMultiInput from '@/components/createCom/XhMultiInput.vue'
import XhRadio from '@/components/createCom/XhRadio.vue'
import XhCheckbox from '@/components/createCom/XhCheckbox.vue'
import XhSelect from '@/components/createCom/XhSelect.vue'
import XhFiles from '@/components/createCom/XhFiles.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'
export default {
data() {
......@@ -116,12 +141,15 @@
},
components: {
XhInput,
XhMultiInput,
XhRadio,
XhCheckbox,
XhSelect,
XhFiles,
XhLocation
// formCom
XhLocation,
XhScan,
XhPicker,
XhTime,
},
created() {
// console.log(allComponents,'allComponents')
......@@ -147,24 +175,63 @@
if (groupItem.item) {
innerItem = groupItem.item[data.itemIndex]
}
console.log(innerItem, 'innerItem')
this.form[innerItem.fieldsName] = data.value
console.log(data.value,'data.value',innerItem, 'innerItem')
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')
},
nextStep(item) {
// 下一步
console.log(item, 'item')
},
fieldTypeStatus(type){
let typeArr = ['input','radio','checkbox','select','file']
let fieldsType = type.toLocaleLowerCase()
let flag = false
flag = typeArr.indexOf(fieldsType)>=0
return flag
},
toLowerCase(str){
str = str || ''
return str.toLocaleLowerCase()
typeToComponentType(type) {
// 将fieldType类型统一转换为公共组件判定类型
let formType = ''
type = type.toLocaleLowerCase()
console.log(type,'type')
switch (type) {
case 'text':
case 'password':
case 'textarea':
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 @@
<text class="label">电工工龄(年)</text>
</view>
<p :class="['u-flex-1 u-text-right area', {before: !baseInfo.working_age}]">
{{ baseInfo.working_age ? workingAgeTxt : '去选择'}}
{{ baseInfo.working_age !== '' ? workingAgeTxt : '去选择'}}
</p>
<u-icon name="arrow-right" color="#2272FF" size="28"></u-icon>
</view>
......@@ -66,9 +66,10 @@
<view class="seat"></view>
<template v-slot:bottom>
<view class="btn-wrap flex-xc">
<button class="btn-submit" :disabled="!submitStatus" @click="$u.debounce(submitBaseInfo, 500)">
确定
</button>
<u-button class="btn-submit" @click="$u.debounce(submitBaseInfo, 500)" :custom-style="buttonStyle"
type="primary" shape="circle" :hover-class="submitStatus ? '' : 'none'">
{{submitStatus ? '已确认信息,下一步' : '下一步'}}
</u-button>
</view>
</template>
</Settle>
......@@ -123,15 +124,32 @@
},
cityText() {
return this.areaTxts.join('、')
},
anquanImage() {
return qn_base_url + 'anquan.png'
},
mixingImage() {
return qn_base_url + 'mixing.png'
},
dizhiImage() {
return qn_base_url + 'dizhi.png'
},
anquanImage() {
return process.uniEnv.qn_base_url + 'anquan.png'
},
mixingImage() {
return process.uniEnv.qn_base_url + 'mixing.png'
},
dizhiImage() {
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: {
......@@ -572,20 +590,7 @@
.btn-wrap {
width: 100%;
.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;
}
}
.btn-submit {}
}
.itemView {
......@@ -680,7 +685,9 @@
}
.address-textarea {
font-size: 26rpx;
font-size: 26rpx;
width: 100%;
height: 100%;
}
.tip-text {
......@@ -696,7 +703,9 @@
}
.tip-image {
width: 34rpx;
width: 30rpx;
height: 32rpx;
flex-shrink: 0;
margin-right: 8rpx;
margin-top: 2rpx;
}
......
<template>
<view class="img-wrap rel">
<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)">
<span>正在上传中...{{file.percent}}%</span>
</view> -->
......
......@@ -30,23 +30,23 @@
<text class="card-item-text">{{ fileInfo[cardkey] }}</text>
</view>
<view class="line-view"></view>
<view class="card-item-error" v-if="fileInfo[cardkey]
&& ((cardkey == 'id_card_name' || cardkey == 'id_card_number') && frontErrorMsg)">{{frontErrorMsg}}</view>
<view class="card-item-error" v-if="((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>
</view>
<view v-if="index == 0" class="bottom-tip-view">
<image class="bottom-tip-image" mode="widthFix" :src="tishiImage"></image>
<text>所上传的身份证信息必须与银行卡开户绑定身份证信息一致,否则将导致订单报酬无法交付</text>
</view>
<view v-if="index == 0" class="bottom-tip-view">
<image class="bottom-tip-image" mode="widthFix" :src="tishiImage"></image>
<text>所上传的身份证信息必须与银行卡开户绑定身份证信息一致,否则将导致订单报酬无法交付</text>
</view>
</view>
</view>
<template v-slot:bottom>
<view class="btn-wrap flex-xc">
<button class="btn-submit" :disabled="!submitBtnStatus" @click="$u.debounce(submitFileInfo, 500)">
{{ !submitBtnStatus ? '完成必填项,可提交资料' : '提交' }}
</button>
<u-button class="btn-submit" @click="$u.debounce(submitFileInfo, 500)" :custom-style="buttonStyle"
type="primary" shape="circle" :hover-class="submitStatus ? '' : 'none'">
{{ !submitBtnStatus ? '下一步' : '我已确认信息,下一步' }}
</u-button>
</view>
</template>
......@@ -144,7 +144,7 @@ export default {
label: "实名认证",
tips: "上传二代身份证照片,图片大小不大于3M",
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",
......@@ -161,7 +161,7 @@ export default {
maxImgs: 1,
tips: "上传电工证证照片,图片大小不大于3M",
imgs: [],
placeholderImages: [qn_base_url + 'diangong.png']
placeholderImages: [process.uniEnv.qn_base_url + 'diangong.png']
},
{
filedName: "driver_license",
......@@ -169,7 +169,7 @@ export default {
imgs: [],
maxImgs: 999,
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",
......@@ -177,8 +177,8 @@ export default {
maxImgs: 1,
tips: "上传车辆照片",
imgs: [],
placeholderImages: [qn_base_url + 'zhengmian.png',
qn_base_url + 'cemian.png']
placeholderImages: [process.uniEnv.qn_base_url + 'zhengmian.png',
process.uniEnv.qn_base_url + 'cemian.png']
},
],
......@@ -223,15 +223,32 @@ export default {
'id_card_number': '身份证号',
'id_card_date': '有效期'
}
},
anquanImage() {
return qn_base_url + 'anquan.png'
},
mixingImage() {
return qn_base_url + 'mixing.png'
},
tishiImage() {
return qn_base_url + 'tishi.png'
},
anquanImage() {
return process.uniEnv.qn_base_url + 'anquan.png'
},
mixingImage() {
return process.uniEnv.qn_base_url + 'mixing.png'
},
tishiImage() {
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: {
......@@ -448,7 +465,6 @@ export default {
return;
}
let fileInfo = this.fileInfo;
debugger
fileInfo.other_photos = JSON.stringify(fileInfo.other_photos)
let submitInfoData = {
...fileInfo,
......@@ -656,9 +672,11 @@ export default {
}
.tip-image {
width: 34rpx;
width: 30rpx;
height: 32rpx;
margin-right: 8rpx;
margin-top: 2rpx;
flex-shrink: 0;
}
.bottom-tip-view {
......@@ -673,7 +691,7 @@ export default {
width: 22rpx;
height: 22rpx;
margin-right: 8rpx;
margin-top: 4rpx;
margin-top: 4rpx;
flex-shrink: 0;
}
......@@ -686,18 +704,7 @@ export default {
width: 100%;
.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 {
......
......@@ -2,65 +2,25 @@
<view class="back_view">
<Settle :index="1">
<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-label">
<text>招募要求</text>
<text>{{item.title}}</text>
</view>
<view class="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>
<text>{{item.content}}</text>
</view>
</view>
<view class="line-view" v-if="contentTexts.length > index + 1"></view>
</view>
</view>
<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">申请入驻</text>
</button>
</u-button>
</template>
</Settle>
</view>
......@@ -82,6 +42,44 @@
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) {
this.initpageData(e)
this.startCounting()
......@@ -166,7 +164,7 @@
this.jumpJudge()
},
jumpJudge() {
jumpJudge() {
if (Number(this.status) > 0) {
uni.navigateTo({
url: '/pages/settle/prompt'
......@@ -184,11 +182,11 @@
<style lang="scss" scoped>
.back_view {
background-color: #F4F5F7;
background-color: #F4F5F7;
position: absolute;
top: 0;
left: 0;
width: 100%;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
......@@ -204,9 +202,15 @@
background-color: #F4F5F7;
height: 2rpx;
width: 100%;
margin-bottom: 30rpx;
margin-top: 30rpx;
}
.item-list {
padding: 30rpx 30rpx 0rpx 30rpx;
&.last {
padding-bottom: 30rpx;
}
}
.item-label {
......@@ -220,29 +224,21 @@
color: #333333;
font-size: 26rpx;
line-height: 50rpx;
margin-top: 30rpx;
margin-top: 20rpx;
}
.bottom_btn {
width: 600rpx;
height: 104rpx;
line-height: 96rpx;
border-radius: 54rpx;
// border: 4rpx solid #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
background-color: #D1D4D4;
&.active {
background-color: #2272FF;
// .bottom_btn {
// width: 600rpx;
// height: 104rpx;
// line-height: 96rpx;
// display: flex;
// align-items: center;
// justify-content: center;
}
.bottom_title {
color: #fff;
}
}
// .bottom_title {
// color: #fff;
// }
// }
.bottom_title {
font-weight: bold;
......
......@@ -2,11 +2,11 @@
<view class="content">
<Settle :index="5">
<view class="base-list">
<view class="title">充电桩安装需缴纳设备押金</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">已缴纳金额</view>
<view class="txt-value">¥ 0.00</view>
</view>
<view class="line-view"></view>
......@@ -63,10 +63,10 @@
this.getBaseInfo()
}
},
computed: {
weixinImage() {
return qn_base_url + 'weixin.png'
}
computed: {
weixinImage() {
return process.uniEnv.qn_base_url + 'weixin.png'
}
},
watch: {
isRefresh(val) {
......@@ -102,7 +102,7 @@
...this.payResult
}
const res = await this.$u.api.getSettleDepositResult(params);
if (res.status !== true) {
if (res.data !== true) {
this.saving = false
return
}
......@@ -156,8 +156,9 @@
code: code
// appid:'wxd1d6eede324b0465'
}
const response = await this.$u.api.paySettleDeposit(params)
if (response.status !== true) {
const response = await this.$u.api.paySettleDeposit(params)
console.log(response)
if (response.code !== 200) {
uni.showToast({
title: response.message,
icon: 'none'
......
......@@ -2,38 +2,40 @@
<view class="container u-row-between" v-if="info">
<Settle :index="pageIndex">
<view class="content-view">
<view style="min-height: 120rpx;" v-if="status == 8"></view>
<view class="u-flex u-row-center">
<image :class="['icon', {active: status != 1}]"
:src="imageUrl">
</image>
</view>
<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 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>
v-for="(txt,index) in info.tipsArr" :key="index">{{txt}}</text>
</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>
<template v-slot:bottom>
<button class="btn-submit" @click="$u.debounce(goPage, 500)">{{info.btnTxt}}</button>
</template>
</view>
</Settle>
</view>
</template>
<script>
import Settle from '@/components/settle/index.vue'
import Services from '@/components/settle/services.vue'
// import Services from '@/components/settle/services.vue'
export default {
components: {
Settle,
Services
// Services
},
data() {
......@@ -93,13 +95,15 @@
}
},
computed: {
imageUrl() {
return this.status == 1 ? qn_base_url + 'chenggong.png' : qn_base_url + 'icon-prompt.png'
},
computed: {
imageUrl() {
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.pageIndex) {
this.pageIndex = e.pageIndex;
......@@ -110,8 +114,8 @@
// }
},
onShow() {
if (!this.settledInfo) {
onShow() {
if (!this.settledInfo) {
this.getBaseInfo()
}
},
......@@ -127,7 +131,28 @@
}
let settledInfo = await app.getBaseInfo(this, callBack)
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()
this.initInfo(settledInfo.record)
},
......@@ -161,7 +186,7 @@
},
goPage() {
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({
url,
});
......@@ -188,19 +213,20 @@
position: absolute;
.icon {
margin-top: 68rpx;
width: 334rpx;
height: 320rpx;
margin-top: 20rpx;
width: 224rpx;
height: 224rpx;
&.active {
width: 224rpx;
height: 224rpx;
margin-top: 38rpx;
width: 234rpx;
height: 222rpx;
}
}
.content-view {
background-color: #FFFFFF;
margin-bottom: 188rpx;
margin-bottom: 30rpx;
border-radius: 12rpx;
padding: 30rpx;
}
......@@ -239,13 +265,15 @@
}
.btn-submit {
margin-top: 112rpx;
margin-top: 50rpx;
margin-bottom: 30rpx;
width: 600rpx;
height: 104rpx;
line-height: 104rpx;
border-radius: 52rpx;
background: #2272ff;
font-size: 32rpx;
font-weight: bold;
color: #fff;
&:disabled {
......@@ -255,9 +283,18 @@
}
}
.services-view {
display: flex;
justify-content: center;
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>
......@@ -56,9 +56,10 @@
</view>
<template v-slot:bottom>
<view class="btn-wrap flex-xc">
<button class="btn-submit" :disabled="!submitStatus" @click="$u.debounce(submitBaseInfo, 500)">
我已阅读协议,点击签约{{count ? '('+count+')' : ''}}
</button>
<u-button class="btn-submit" @click="$u.debounce(submitBaseInfo, 500)" :custom-style="buttonStyle"
type="primary" shape="circle" :hover-class="submitStatus ? '' : 'none'">
我已确认信息,点击签约{{count ? '('+count+')' : ''}}
</u-button>
</view>
</template>
</Settle>
......@@ -79,9 +80,8 @@
},
data() {
return {
token: app.globalData.token,
baseInfo: {
name: "郭小清",
name: "",
id_card_no: "43072219800123456",
id: "",
bank_no: '', // 银行卡号
......@@ -130,9 +130,26 @@
},
placeholderStyle() {
return 'color:#999999;font-size:28rpx'
},
tips3Image() {
return qn_base_url + 'tips3.png'
},
tips3Image() {
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: {
......@@ -360,7 +377,7 @@
// }, 2000)
},
async goSign() {
const token = app.globalData.token;
const token = this.vuex_token;
const settledInfo = this.settledInfo
const baseInfo = this.baseInfo
const params = {
......
......@@ -104,7 +104,7 @@
try {
var dataObject = JSON.parse(dataString);
//do something
var imageUrl = config.qiniuImageURLPrefix + '/' + dataObject.key;
var imageUrl = config.qiniuImageURLPrefix + '/' + (dataObject.key || dataObject.src);
dataObject.imageURL = imageUrl;
if (success) {
success(dataObject);
......
......@@ -16,6 +16,7 @@ export const randomChar = function(l, url = "") {
}
//图片选择
export const chooseImage = function(data) {
console.log(data,'data-chooseImage')
return new Promise((resolve, reject) => {
uni.chooseImage({
count: data.count || 9, //默认9
......
......@@ -21,6 +21,6 @@ export default {
}
},
computed: {
...mapState(['ddd'])
...mapState($uStoreKey)
}
}
......@@ -29,10 +29,12 @@ function appLogin() {
// 小程序授权
function authorization(data) {
return new Promise(async function (resolve, reject) {
data.wxAppNo = app.globalData.wxAppNo
const res = await app.$vm.$u.api.loginWechatAuth(data)
if (res) {
if (res.code == 200 && res.data) {
app.setUserData(res.data)
// app.setUserData(res.data)
// app.getBaseInfo(app.$vm)
resolve(res);
} else {
reject(res);
......@@ -49,10 +51,12 @@ function authorization(data) {
// 小程序注册
function signup(data) {
return new Promise(async function (resolve, reject) {
data.wxAppNo = app.globalData.wxAppNo
const res = await app.$vm.$u.api.loginWechatAuth(data)
if (res) {
if (res.code == 200 && res.data) {
app.setUserData(res.data)
// app.setUserData(res.data)
// app.getBaseInfo(app.$vm)
resolve(res);
} else {
uni.showModal({
......
......@@ -24,6 +24,7 @@
* @property {Boolean} bold 激活选项的字体是否加粗(默认true)
* @property {String} bg-color 组件背景颜色,mode为button时有效(默认#eeeeef)
* @property {String} button-color 按钮背景颜色,mode为button时有效(默认#ffffff)
* @property {String Number} border-radius 圆角值,单位rpx(默认5)
* @event {Function} change 分段器选项发生改变时触发
* @example <u-subsection active-color="#ff9900"></u-subsection>
*/
......@@ -91,7 +92,12 @@
vibrateShort: {
type: Boolean,
default: false
}
},
// 圆角值
borderRadius: {
type: [Number, String],
default: 5
},
},
data() {
return {
......@@ -105,7 +111,7 @@
},
currentIndex: this.current,
buttonPadding: 3, // mode = button 时,组件的内边距
borderRadius: 5, // 圆角值
// borderRadius: 5, // 圆角值
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