Commit aaa6d7dc authored by Morson's avatar Morson
parents c156fdfc 97c5ce5f
...@@ -4,7 +4,7 @@ export default [{ ...@@ -4,7 +4,7 @@ export default [{
"required": true, "required": true,
"fieldsTitle": "A字裙", "fieldsTitle": "A字裙",
"fieldsName": "name", "fieldsName": "name",
"fieldsType": "input", "fieldsType": "text",
"fieldsValue": "", "fieldsValue": "",
"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",
...@@ -55,13 +55,19 @@ export default [{ ...@@ -55,13 +55,19 @@ 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
......
<!-- ******************* 多选框 ******************* -->
<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">
...@@ -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>
<view>
<u-input v-model="dataValue" @input="valueChange" :type="type" />
</view>
</template>
<script>
import stringMixin from './stringMixin'
export default {
name: 'XhInput', // 新建 input
components: {},
mixins: [stringMixin],
props: {},
data() {
return {}
},
computed: {
type() {
if (this.item && this.item.fieldsType == 'password') {
return this.item.fieldsType
} else {
return 'text'
}
}
},
watch: {},
mounted() {},
methods: {}
}
</script>
<style>
</style>
<!-- ******************* 输入框 ******************* -->
<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="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" />
......
...@@ -46,5 +46,8 @@ ...@@ -46,5 +46,8 @@
position: fixed; position: fixed;
bottom: 44rpx; bottom: 44rpx;
width: 100%; width: 100%;
display: flex;
align-items: center;
justify-content: center;
} }
</style> </style>
...@@ -6,7 +6,9 @@ ...@@ -6,7 +6,9 @@
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationBarTitleText": "首页" "navigationBarTitleText": "首页",
"navigationStyle": "custom",
"disableScroll": true
} }
}, },
{ {
......
<template> <template>
<view class="content"> <view class="content">
<scroll-view <scroll-view class="scroll-view" scroll-y style="height: 100%; width: 100%" @scrolltolower="reachBottom"
scroll-y @scroll="handleScroll" refresher-enabled :refresher-triggered="triggered" @refresherrefresh="onRefresh"
style="height: 100%; width: 100%" scroll-anchoring @refresherrestore="onRestore" @refresherpulling="triggered = true" :show-scrollbar="false"
@scrolltolower="reachBottom" enable-back-to-top>
@scroll="handleScroll" <!-- <view class="title-view">充电桩自营平台</view> -->
refresher-enabled <u-navbar :is-back="false" background="{background: transparent}" :border-bottom="false" :is-fixed="false">
:refresher-triggered="triggered" <text class="title-view">充电桩自营平台</text>
@refresherrefresh="onRefresh" </u-navbar>
scroll-anchoring <u-swiper :height="240" :list="list" :indicator-pos="indicatorPos" :mode="mode" :interval="3000"
@refresherrestore="onRestore" @click="clickSwiper">
@refresherpulling="triggered = true"
>
<u-swiper
:height="250"
:list="list"
:indicator-pos="indicatorPos"
:mode="mode"
:interval="3000"
@click="clickSwiper"
>
</u-swiper> </u-swiper>
<view> <view class="msg-view">
<text class="title">最新消息</text> <view class="msg-title">最新消息</view>
<view v-for="(item, index) in messageList" :key="index"> <view class="msg-list-view">
<text class="title">{{ item.body }}</text> <view class="msg-content" v-for="(item, index) in messageList" :key="index">
<view class="msg-content-view">
<view class="left-view">
<image class="msg-icon"></image>
<text>{{item.body}}</text>
</view>
<image class="right-icon"></image>
</view>
<view class="line-view" v-if="messageList.length > index + 1"></view>
</view>
</view>
</view> </view>
<view class="order-view"> <view class="order-view">
<!-- 订单推荐吸顶 --> <!-- 订单推荐吸顶 -->
...@@ -34,31 +34,24 @@ ...@@ -34,31 +34,24 @@
</view> </view>
</u-sticky> </u-sticky>
<!-- 入驻成功之后显示推荐订单列表 --> <!-- 入驻成功之后显示推荐订单列表 -->
<view v-if="status == 7 && orderList.length > 0"> <view class="order-list-view">
<view v-if="status == 7 && orderList.length > 0" class="order-item-view">
<view v-for="(item, index) in orderList" :key="index"> <view v-for="(item, index) in orderList" :key="index">
<OrderCell :orderData="item"> </OrderCell> <OrderCell :orderData="item"> </OrderCell>
</view> </view>
<u-loadmore <u-loadmore :status="currentLoadStatus" bgColor="#f2f2f2"></u-loadmore>
:status="currentLoadStatus"
bgColor="#f2f2f2"
></u-loadmore>
</view> </view>
<!-- 入驻成功之后无推荐订单 --> <!-- 入驻成功之后无推荐订单 -->
<view v-else-if="status == 7 && orderList.length <= 0"> <view v-else-if="status == 7 && orderList.length <= 0" class="no-order-view">
暂无订单 暂无订单
</view> </view>
<!-- 入驻前--> <!-- 入驻前-->
<view v-else-if="loaded"> <view v-else-if="loaded" class="tip-view">
<text class="title" <view class="tip-title">当前订单(笔)</view>
>当前订单{{ count }}笔\n入驻通过后,平台将向您推荐订单</text <view class="tip-count">{{ count }}</view>
> <view class="tip-other">入驻通过后平台将向您推荐订单</view>
<u-button <u-button class="settle-button" type="primary" shape="circle" @click="immediatelyIn"
class="settle-button" :custom-style="buttonStyle">
type="primary"
shape="circle"
@click="immediatelyIn"
:custom-style="buttonStyle"
>
立即入驻 立即入驻
</u-button> </u-button>
</view> </view>
...@@ -69,12 +62,12 @@ ...@@ -69,12 +62,12 @@
</template> </template>
<script> <script>
import util from "@/utils/util.js"; import util from "@/utils/util.js";
const app = getApp(); const app = getApp();
import OrderCell from "@/components/order/index.vue"; import OrderCell from "@/components/order/index.vue";
export default { export default {
components: { components: {
OrderCell, OrderCell,
}, },
...@@ -82,8 +75,7 @@ export default { ...@@ -82,8 +75,7 @@ export default {
return { return {
status: 0, // 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交' status: 0, // 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
triggered: false, triggered: false,
list: [ list: [{
{
image: "https://cdn.uviewui.com/uview/swiper/1.jpg", image: "https://cdn.uviewui.com/uview/swiper/1.jpg",
}, },
{ {
...@@ -99,8 +91,7 @@ export default { ...@@ -99,8 +91,7 @@ export default {
title: "Hello", title: "Hello",
loaded: false, loaded: false,
count: 0, // 推荐订单数量 count: 0, // 推荐订单数量
messageList: [ messageList: [{
{
id: 1234, id: 1234,
type: "", type: "",
level: "", level: "",
...@@ -134,9 +125,17 @@ export default { ...@@ -134,9 +125,17 @@ export default {
computed: { computed: {
buttonStyle() { buttonStyle() {
return { return {
width: "300rpx", 'width': '400rpx',
'height': '104rpx',
}; };
}, },
msgStyle() {
return {
'1': '', // 置顶
'2': '', // 通知
'3': '' // 消息
}
}
}, },
onLoad() { onLoad() {
this._freshing = false; this._freshing = false;
...@@ -157,7 +156,6 @@ export default { ...@@ -157,7 +156,6 @@ export default {
if (result && result.record) { if (result && result.record) {
vm.loaded = true; vm.loaded = true;
vm.status = Number(result.record.status); vm.status = Number(result.record.status);
// vm.status = 1
} }
}; };
await app.getBaseInfo(this, callBack); await app.getBaseInfo(this, callBack);
...@@ -195,10 +193,10 @@ export default { ...@@ -195,10 +193,10 @@ export default {
this.orderList.push(...[{}, {}, {}, {}, {}, {}, {}, {}, {}, {}]); this.orderList.push(...[{}, {}, {}, {}, {}, {}, {}, {}, {}, {}]);
// 加载完成 // 加载完成
this.currentLoadStatus = false /*是否还有*/ this.currentLoadStatus = false /*是否还有*/ ?
? this.loadStatus[1] this.loadStatus[1] :
: this.loadStatus[2]; this.loadStatus[2];
this.$nextTick(function () { this.$nextTick(function() {
this.bottomLoading = false; this.bottomLoading = false;
}); });
}, 1000); }, 1000);
...@@ -219,39 +217,142 @@ export default { ...@@ -219,39 +217,142 @@ export default {
} }
}, },
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content { .content {
height: 100vh; height: 100vh;
} background-color: #F4F5F7;
padding: 0rpx 30rpx 0 30rpx;
.scroll-view {
::-webkit-scrollbar {/*隐藏滚轮*/
display: none;
}
}
.title-view {
color: #333333;
font-weight: bold;
font-size: 40rpx;
}
.msg-view {
.msg-title {
color: #333333;
font-size: 32rpx;
font-weight: bold;
padding: 50rpx 0rpx 30rpx 0rpx;
}
.msg-list-view {
border-radius: 12rpx;
background-color: #FFFFFF;
padding: 6rpx 30rpx;
}
.msg-content {
color: #333333;
font-size: 26rpx;
.msg-content-view {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 20rpx;
margin-bottom: 20rpx;
.left-view {
display: flex;
align-items: center;
.msg-icon {
width: 80rpx;
height: 36rpx;
}
}
.right-icon {
width: 14rpx;
height: 24px;
}
}
.line-view {
height: 2rpx;
background-color: #F4F5F7;
}
}
}
}
.logo { .logo {
height: 200 rpx; height: 200 rpx;
width: 100%; width: 100%;
margin: 0 rpx auto 50 rpx auto; margin: 0 rpx auto 50 rpx auto;
} }
.text-area { .text-area {
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
.title { .title {
font-size: 36 rpx; font-size: 36 rpx;
color: #8f8f94; color: #8f8f94;
} }
.order-view {
text-align: center;
.sticky { .sticky {
height: 120 rpx; background-color: #F4F5F7;
background-color: #2979ff;
color: #fff; color: #fff;
padding: 24 rpx; padding: 24 rpx;
text-align: left; text-align: left;
} font-size: 32rpx;
font-weight: bold;
color: #333333;
padding: 46rpx 0 28rpx 0;
}
.order-view { .order-list-view {
text-align: center; background-color: #FFFFFF;
} border-radius: 12rpx;
min-height: 460rpx;
padding: 30rpx;
margin-bottom: 30rpx;
.order-item-view {}
.no-order-view {}
.tip-view {
.tip-title {
font-size: 32rpx;
font-weight: bold;
color: #333333;
margin-top: 30rpx;
}
.tip-count {
color: #2272FF;
font-size: 70rpx;
font-weight: bold;
margin-top: 50rpx;
margin-bottom: 20rpx;
}
.tip-other {
font-size: 28rpx;
color: #333333;
margin-bottom: 50rpx;
}
}
}
}
</style> </style>
...@@ -12,11 +12,10 @@ ...@@ -12,11 +12,10 @@
</view> </view>
<view>接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。</view> <view>接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。</view>
</view> </view>
<view class="learn-view"> <view class="learn-view" v-if="currentIndex >= 0">
<view class="learn-view-title">内容大纲</view> <view class="learn-view-title">视频内容介绍</view>
<view class="learn-list" v-for="(item, key) in courseOutline" :key="key"> <view class="learn-list" v-for="(item, key) in courseOutlines[currentIndex]" :key="key">
<view class="learn-list-item">{{item}}</view> <view class="learn-list-item">{{item}}</view>
<view class="line-view"></view>
</view> </view>
</view> </view>
</view> </view>
...@@ -33,9 +32,39 @@ ...@@ -33,9 +32,39 @@
courseSrc: '', courseSrc: '',
courseTitle: '', courseTitle: '',
courseDesc: '', courseDesc: '',
courseOutline: ['1 aaa', '2 bbb'] // 视频大纲 currentIndex: -1 // 第几个视频
}; };
}, },
computed: {
courseOutlines() { // 视频内容介绍
return [[
'1、考核规则:接单及时率',
'2、考核规则:上门及时率',
'3、考核规则:安装完工率',
'4、考核规则:资料提交及时率',
'5、考核规则:安装完工率',
'6、考核规则:客户满意度'
],
[
'1、必备材料4大类',
'2、施工工具准备'
],
[
'1、接线安装工艺标准',
'2、PVC、镀锌管电缆管明敷',
'3、电缆敷设的防火要求',
'4、电源点标识',
'5、配电箱接线及安装',
'6、管线敷设接头处理',
'7、充电桩内部接线',
'8、配电箱安装'
],
[
'1、勘测环节录单要求',
'2、安装环节录单要求'
]]
}
},
onLoad(e) { onLoad(e) {
if (e) { if (e) {
if (e.courseId) { if (e.courseId) {
......
...@@ -23,31 +23,43 @@ ...@@ -23,31 +23,43 @@
<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-radio v-else-if="typeToComponentType(item.fieldsType)==='radio'"
:itemIndex="itemIndex" :item="item" @value-change="fieldValueChange"> :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>
</template> </template>
</u-form-item> </u-form-item>
</view> </view>
...@@ -67,6 +79,8 @@ ...@@ -67,6 +79,8 @@
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 XhRadio from '@/components/createCom/XhRadio.vue' // import XhRadio from '@/components/createCom/XhRadio.vue'
export default { export default {
data() { data() {
...@@ -120,7 +134,9 @@ ...@@ -120,7 +134,9 @@
XhCheckbox, XhCheckbox,
XhSelect, XhSelect,
XhFiles, XhFiles,
XhLocation XhLocation,
XhScan,
XhPicker
// formCom // formCom
}, },
created() { created() {
...@@ -155,16 +171,41 @@ ...@@ -155,16 +171,41 @@
// 下一步 // 下一步
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 switch (type) {
return flag case 'text':
}, case 'password':
toLowerCase(str){ case 'textarea':
str = str || '' case 'number':
return str.toLocaleLowerCase() formType = 'input'
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 'file':
// formType = 'XhFiles'
// break
}
return formType
}, },
// ------------------------- 以下方法为展示滚动切换 ------------------------- // ------------------------- 以下方法为展示滚动切换 -------------------------
// 点击左边的栏目切换 // 点击左边的栏目切换
......
...@@ -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>
...@@ -132,6 +133,23 @@ ...@@ -132,6 +133,23 @@
}, },
dizhiImage() { dizhiImage() {
return qn_base_url + 'dizhi.png' return 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 {
...@@ -696,7 +701,9 @@ ...@@ -696,7 +701,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;
} }
......
...@@ -44,9 +44,10 @@ ...@@ -44,9 +44,10 @@
<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>
...@@ -232,6 +233,23 @@ export default { ...@@ -232,6 +233,23 @@ export default {
}, },
tishiImage() { tishiImage() {
return qn_base_url + 'tishi.png' return 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 +466,6 @@ export default { ...@@ -448,7 +466,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 +673,11 @@ export default { ...@@ -656,9 +673,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 {
...@@ -686,18 +705,7 @@ export default { ...@@ -686,18 +705,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()
...@@ -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,24 +224,16 @@ ...@@ -220,24 +224,16 @@
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;
// border: 4rpx solid #FFFFFF;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: #D1D4D4;
&.active {
background-color: #2272FF;
}
.bottom_title { .bottom_title {
color: #fff; color: #fff;
......
...@@ -188,13 +188,14 @@ ...@@ -188,13 +188,14 @@
position: absolute; position: absolute;
.icon { .icon {
margin-top: 68rpx; margin-top: 20rpx;
width: 334rpx;
height: 320rpx;
&.active {
width: 224rpx; width: 224rpx;
height: 224rpx; height: 224rpx;
&.active {
margin-top: 38rpx;
width: 234rpx;
height: 222rpx;
} }
} }
......
...@@ -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
......
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