Commit 9baa17ed authored by Morson's avatar Morson
parents 7bf48276 ff6e3f4b
......@@ -17,6 +17,8 @@ npm run dev:mp-weixin // 运行dev环境
```
npm run build:mp-weixin // 运行生产环境
```
### 公共组件:
[图片上传参考](https://ext.dcloud.net.cn/plugin?id=822)
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
......@@ -7,14 +7,17 @@ import {
import {
settledApiFun
} from '@/common/api/settled.js';
import { learnApiFun } from "@/common/api/learn.js";
let apiFun = function(vm) {
let commonApi = commonApiFun(vm);
let settledApi = settledApiFun(vm)
let cloudApi = cloudRulesApiFun(vm)
let learnApi=learnApiFun(vm)
let apiUrl = {
...commonApi,
...settledApi,
...cloudApi
...cloudApi,
...learnApi
}
return apiUrl
}
......
const globalUrl = process.uniEnv || {}
const ucenterApiUrl = globalUrl.ucenterUrl.apiUrl
let learnApiFun = function(vm){
/* 查询用户基本信息 */
let getTrainingNoticeList = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/notice/list', params);
const learnApi = {
getTrainingNoticeList,
}
return learnApi
}
module.exports = {
learnApiFun
}
\ No newline at end of file
This diff is collapsed.
<template>
<view>
<u-input v-model="item.fieldsValue" />
</view>
</template>
<script>
export default {
name: 'xhInput',
props: {
item: {
type: Object,
default () {
return null
}
},
},
data() {
return {
value: '',
type: 'text',
border: true,
}
}
}
</script>
<style>
</style>
<template>
<view>
<u-input v-model="item.fieldsValue" />
</view>
</template>
<script>
export default {
name: 'xhInput',
props: {
item: {
type: Object,
default () {
return [{}]
}
},
},
data() {
return {
value: '',
type: 'text',
border: true,
}
}
}
</script>
<style>
</style>
......@@ -4,11 +4,10 @@
back-icon-color="#ffffff" title-color="#ffffff"></u-navbar>
<image :src="url" style="width: 100%;" mode="widthFix"></image>
<view class="introduction">
<slot></slot>
<view class="settle-bottom">
<slot name="bottom"></slot>
</view>
<slot></slot>
</view>
<view class="settle-bottom">
<slot name="bottom"></slot>
</view>
</view>
</template>
......@@ -19,7 +18,7 @@
index: {
type: Number,
default: 1
}
}
},
data() {
return {}
......@@ -32,23 +31,20 @@
}
</script>
<style lang="scss" scoped>
.settle-view {
background-color: #F4F5F7;
}
<style lang="scss" scoped>
.introduction {
border-radius: 12rpx;
margin-left: 30rpx;
margin-right: 30rpx;
margin-top: -112rpx;
background-color: #F4F5F7;
overflow: auto;
height: calc(100vh - 368rpx);
}
.settle-bottom {
position: fixed;
width: calc(100vw - 60rpx);
bottom: 44rpx;
position: fixed;
top: 320rpx;
bottom: 0rpx;
left: 30rpx;
right: 30rpx;
}
.settle-bottom {
position: fixed;
bottom: 44rpx;
width: 100%;
}
</style>
......@@ -15,6 +15,12 @@
"navigationBarTitleText": "订单"
}
},
{
"path": "pages/order/complete",
"style": {
"navigationBarTitleText": "订单-完工配置"
}
},
{
"path": "pages/mine/index",
"style": {
......@@ -82,7 +88,8 @@
{
"path": "pages/settle/select",
"style": {
"navigationBarTitleText": "选择可服务的城市"
"navigationBarTitleText": "选择可服务的城市",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
......@@ -100,7 +107,9 @@
{
"path": "pages/settle/prompt",
"style": {
"navigationBarTitleText": "入驻提示"
"navigationBarTitleText": "入驻提示",
"navigationStyle": "custom",
"disableScroll": true
}
},
{
......@@ -224,18 +233,8 @@
"query": "" //启动参数,在页面的onLoad函数里面得到
},
{
"name": "签约页面", //模式名称
"path": "pages/settle/sign-contract", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
},
{
"name": "授权登录", //模式名称
"path": "pages/login/index", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
},
{
"name": "在线考试", //模式名称
"path": "pages/learn/exam", //启动页面,必选
"name": "订单 - 完工配置", //模式名称
"path": "pages/order/complete", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
}
]
......
This diff is collapsed.
<template>
<view class="content">
<view class="">
<text class="dx">多选</text><text class="num">第1题</text><text class="all">/共30题</text>
<view class="">
<view class="" style="padding-left: 94rpx;margin:36rpx 0">
<text class="dx">多选</text><text class="num">第1题</text><text class="all">/共30题</text>
</view>
<view class="" style="text-align: center;">
一下对压缩机故障描述有误的是?
</view>
<view class="">
<button>A</button>
<button>B</button>
<button>C</button>
<button>D</button>
<button>E</button>
<view class="" style="margin-top: 130rpx;">
<view class="list-box">
<view v-for="(item,index) in list" :key="index" @click="choice(index)" :class="[item.selected?'selde':'noselde']">
{{item.selected?item.title:item.title}}
</view>
</view>
</view>
<button class="btn">下一题</button>
</view>
......@@ -21,35 +23,135 @@
export default {
data() {
return {
}
list: [{
selected: false,
title: 'A'
},
{
selected: false,
title: 'B'
},
{
selected: false,
title: 'C'
},
{
selected: false,
title: 'D'
},
{
selected: false,
title: 'E'
}
],
selectId:[],
};
},
methods: {
abc() {
console.log("11111")
var arr = document.querySelector(".btm");
for (let i = 0; i < arr.length; i++) {
arr[i].onclick = function() {
console.log(this.value)
}
}
},
//选择按钮
choice(index) {
if (this.list[index].selected == true) {
this.list[index].selected = false;
//取消选中时删除数组中的值
for (var i = 0; i < this.selectId.length; i++) {
if (this.selectId[i] === this.list[index].title) {
this.selectId.splice(i, 1);
}
}
console.log("选中的值", this.selectId)
} else {
this.list[index].selected = true;
this.selectId.push(this.list[index].title)
console.log("选中的值", this.selectId)
}
}
},
mounted() {
console.log("111111")
}
}
</script>
<style>
.content{
<style lang="scss">
.content {
width: 600rpx;
height: 800rpx;
/* background: #8F8F94; */
margin: 0 auto ;
margin: 0 auto;
}
.dx{
.dx {
padding: 0rpx;
background: #2979FF;
color: #FFFFFF;
border-radius: 0px;
}
.num{
.num {
color: #2B85E4;
}
.all{
.all {
color: #8F8F94;
}
.btn{
margin-top:0rpx;
.btn {
margin-top: 98rpx;
width: 476rpx;
height: 60rpx;
line-height: 30px;
background: #007AFF;
color: #FFFFFF;
}
.btm {
width: 476rpx;
height: 60rpx;
line-height: 30px;
margin: 34rpx auto;
}
.list-box {
// display: flex;
// flex-wrap: wrap;
padding: 16upx;
border-radius: 10upx;
view {
width: 476rpx;
height: 60upx;
line-height: 60upx;
text-align: center;
margin: 26rpx auto 0;
}
}
/*已选择*/
.selde {
background: #007AFF;
color: #FFFFFF;
border-radius: 20upx;
font-size: 26rpx;
padding: 0 10upx;
}
/*未选择*/
.noselde {
background: #E4E7ED;
color: #959595;
border-radius: 20upx;
font-size: 20upx;
padding: 0 10upx;
}
</style>
......@@ -18,60 +18,54 @@
<view class="" style="font-size: 40rpx;font-weight: 1000;">
第一章 充电桩常见问题答疑
</view>
<view class="" >
<view class="" style="display: flex; margin: 20rpx 0;">
<view class="" style="width: 100rpx;height:38rpx;border: 1px solid #8F8F94;text-align: center;line-height: 38rpx;">
<view class="video" >
<view class="video_1" >
<view class="text" >
视频
</view>
<text style="margin-left: 44rpx;">1-1唯修汇公司简介</text>
<text class="text2">1-1唯修汇公司简介</text>
</view>
<view class="" style="display: flex;margin:20rpx 0;">
<view class="" style="width: 100rpx;height:38rpx;border:1px solid #8F8F94;text-align: center;line-height: 38rpx;" >
<view class="video_1" >
<view class="text">
视频
</view>
<text style="margin-left:44rpx;">1-2可接单评定标准</text>
<text class="text2">1-2可接单评定标准</text>
</view>
<view class="" style="display: flex;margin:20rpx 0;">
<view class="" style="width: 100rpx;height: 38rpx;border:1px solid #8F8F94;text-align: center;line-height: 38rpx;">
<view class="video_1" >
<view class="text">
视频
</view>
<text style="margin-left:44rpx;">1-3结算规则</text>
<text class="text2">1-3结算规则</text>
</view>
<view class="" style="display: flex;margin: 20rpx 0;">
<view class="" style="width: 100rpx;height: 38rpx;border:1px solid #8F8F94;text-align: center;line-height: 38rpx;">
<view class="video_1">
<view class="text">
视频
</view>
<text style="margin-left: 44rpx;">1-4充电桩安装开城计划</text>
<text class="text2">1-4充电桩安装开城计划</text>
</view>
<view class="" style="display: flex;margin: 20rpx 0;">
<view class="" style="width: 100rpx;height: 38rpx;border:1px solid #8F8F94;text-align: center;line-height: 38rpx;">
<view class="video_1">
<view class="text">
视频
</view>
<text style="margin-left: 44rpx;">1-5缴纳质保金和费用答疑</text>
<text class="text2">1-5缴纳质保金和费用答疑</text>
</view>
<view class="" style="display: flex;margin: 20rpx 0;">
<view class="" style="width: 100rpx;height: 38rpx;border: 1px solid #8F8F94;text-align: center;line-height: 38rpx;">
<view class="video_1" >
<view class="text" >
视频
</view>
<text style="margin-left:44rpx;">1-6安装材料品牌答疑1</text>
<text class="text2">1-6安装材料品牌答疑1</text>
</view>
<view class="" style="display: flex;margin: 20rpx 0;">
<view class="" style="width: 100rpx;height: 38rpx;border:1px solid #8F8F94;text-align: center;line-height: 38rpx;">
<view class="video_1" >
<view class="text">
视频
</view>
<text style="margin-left:44rpx;">1-7安装材料答疑2</text>
<text class="text2">1-7安装材料答疑2</text>
</view>
<view class="" style="display: flex;margin: 20rpx 0;">
<view class="" style="width: 100rpx;height: 38rpx;border:1px solid #8F8F94;text-align: center;">
<view class="video_1">
<view class="text">
视频
</view>
<text style="margin-left:44rpx;">1-8其他问题答疑</text>
</view>
<view class="" style="display: flex;margin: 20rpx 0;">
<view class="" style="width: 100rpx;height: 38rpx;border: 1px solid #8F8F94;text-align: center;">
</view>
<text class="text2">1-8其他问题答疑</text>
</view>
</view>
</view>
......@@ -92,7 +86,7 @@
}
</script>
<style>
<style lang="scss">
.title{
height: 164rpx;
font-size: 40rpx;
......@@ -107,4 +101,21 @@
width: 128rpx;
height: 128rpx;
}
.video_1{
display: flex;
margin: 20rpx 0;
.text{
width: 100rpx;
height: 38rpx;
border:1px solid #8F8F94;
text-align: center;
line-height: 38rpx;
margin-right: 82rpx;
}
.text2{
font-size: 33rpx;
color: #82848A;
}
}
</style>
This diff is collapsed.
......@@ -4,21 +4,24 @@
考试结果
</view>
<view class="result">
考试不通过
未通过
</view>
<view class="details">
<view class="text1">
<text>合格条件:</text><text>答对20题</text>
<view class="">
<text class="first">合格条件:</text><text>答对20题</text>
</view>
<view class="text1">
<text>考试结果:</text><text>答对10题</text>
<view class="">
<text class="first">考试结果:</text><text>答对10题</text>
</view>
<view class="text1">
<text>考试用时:</text><text>16分29秒</text>
<view class="">
<text class="first">考试用时</text><text>16分29秒</text>
</view>
<view class="btn">
<button class="btn1">再答一次</button>
<button class="btn2">退出重考</button>
</view>
<button class="btn">再答一次</button>
<button class="btn2">退出重考</button>
</view>
</view>
</template>
......@@ -29,47 +32,57 @@
}
},
methods: {
methods:{
}
}
</script>
<style>
<style lang="scss">
.content{
width: 592rpx;
height: 800rpx;
/* background: #19BE6B; */
margin: 84rpx auto;
overflow: hidden;
width: 100%;
height: 950rpx;
background: #DCDFE6;
padding: 53rpx;
}
.title{
margin:7px 13px;
font-size: 30rpx;
}
.result{
color: red;
font-size: 56rpx;
font-size: 73rpx;
text-align: center;
margin: 52rpx 0;
margin: 46rpx 0;
}
.details{
height: 400rpx;
border-top: 1px dashed #808080;
}
.text1{
margin: 16rpx 24rpx;
border-top: 2rpx dashed #808080;
height: 600rpx;
padding-top: 94rpx;
view{
margin: 26rpx 0 0;
.first{
margin: 0 20rpx 0;
}
}
}
.btn{
width: 476rpx;
height: 80rpx;
background: #007AFF;
font-size: 32rpx;
margin:206rpx auto 38rpx ;
}
.btn2{
width: 476rpx;
height: 80rpx;
font-size: 30rpx;
margin: 0 auto ;
.btn1{
width: 477rpx;
height: 61rpx;
border-radius: 27rpx;
line-height: 61rpx;
font-size: 29rpx;
background: #007AFF;
color: #FFFFFF;
margin: 140rpx auto 34rpx;
}
.btn2{
width: 477rpx;
height: 61rpx;
border-radius: 27rpx;
line-height: 61rpx;
font-size: 29rpx;
}
}
</style>
</style>
\ No newline at end of file
<template>
<view class="u-wrap">
<view class="u-search-box">
<view class="u-search-inner">
<u-icon name="search" color="#909399" :size="28"></u-icon>
<text class="u-search-text">搜索</text>
</view>
</view>
<view class="u-menu-wrap">
<scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop"
:scroll-into-view="itemId">
<view v-for="(item,index) in tabbar" :key="index" class="u-tab-item" :class="[current == index ? 'u-tab-item-active' : '']"
@tap.stop="swichMenu(index)">
<text class="u-line-1">{{item.name}}</text>
</view>
</scroll-view>
<scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box" @scroll="rightScroll">
<!-- <form-com :item="tabbar"></form-com> -->
<u-form :model="form" ref="uForm">
<template v-for="(groupItem,index) in tabbar">
<view class="class-item" :key="index">
<view class="title" >{{groupItem.name}}</view>
<view class="class-bd">
<u-form-item :label-width="0" :required="groupItem.required"
v-for="(item,itemIndex) in groupItem.foods" :key="itemIndex">
<!-- <view :key="index"> -->
<view>{{item.name}}</view>
<xh-input></xh-input>
<!-- <xh-input :item="item" v-if="item.fieldsType==='input'"></xh-input> -->
<!-- </view> -->
</u-form-item>
</view>
</view>
</template>
</u-form>
<!-- <xh-input></xh-input> -->
<!-- <view class="page-view">
<view class="class-item" :id="'item' + index" v-for="(item , index) in tabbar" :key="index">
<view class="item-title">
<text>{{item.name}}</text>
</view>
<view class="item-container">
<view class="thumb-box" v-for="(item1, index1) in item.foods" :key="index1">
<image class="item-menu-image" :src="item1.icon" mode=""></image>
<view class="item-menu-name">{{item1.name}}</view>
</view>
</view>
</view>
</view> -->
</scroll-view>
</view>
</view>
</template>
<script>
import classifyData from '@/common/classify.data.js';
// import allComponents from '@/components/createCom/index.js'
// import XhInput from '@/components/createCom/XhInput.vue'
// import formCom from './components/formCom.vue'
import XhInput from '@/components/createCom/XhInput.vue'
export default {
data() {
return {
scrollTop: 0, //tab标题的滚动条位置
oldScrollTop: 0,
current: 0, // 预设当前项的值
menuHeight: 0, // 左边菜单的高度
menuItemHeight: 0, // 左边菜单item的高度
itemId: '', // 栏目右边scroll-view用于滚动的id
tabbar: classifyData,
menuItemPos: [],
arr: [],
scrollRightTop: 0, // 右边栏目scroll-view的滚动条高度
timer: null, // 定时器
}
},
components: {
'xh-input': XhInput,
},
created(){
// console.log(allComponents,'allComponents')
},
onLoad() {
},
onReady() {
this.getMenuItemTop()
},
methods: {
// 点击左边的栏目切换
async swichMenu(index) {
if(this.arr.length == 0) {
await this.getMenuItemTop();
}
if (index == this.current) return;
this.scrollRightTop = this.oldScrollTop;
this.$nextTick(function(){
this.scrollRightTop = this.arr[index];
this.current = index;
this.leftMenuStatus(index);
})
},
// 获取一个目标元素的高度
getElRect(elClass, dataVal) {
new Promise((resolve, reject) => {
const query = uni.createSelectorQuery().in(this);
query.select('.' + elClass).fields({
size: true
}, res => {
// 如果节点尚未生成,res值为null,循环调用执行
if (!res) {
setTimeout(() => {
this.getElRect(elClass);
}, 10);
return;
}
this[dataVal] = res.height;
resolve();
}).exec();
})
},
// 观测元素相交状态
async observer() {
this.tabbar.map((val, index) => {
let observer = uni.createIntersectionObserver(this);
// 检测右边scroll-view的id为itemxx的元素与right-box的相交状态
// 如果跟.right-box底部相交,就动态设置左边栏目的活动状态
observer.relativeTo('.right-box', {
top: 0
}).observe('#item' + index, res => {
if (res.intersectionRatio > 0) {
let id = res.id.substring(4);
this.leftMenuStatus(id);
}
})
})
},
// 设置左边菜单的滚动状态
async leftMenuStatus(index) {
this.current = index;
// 如果为0,意味着尚未初始化
if (this.menuHeight == 0 || this.menuItemHeight == 0) {
await this.getElRect('menu-scroll-view', 'menuHeight');
await this.getElRect('u-tab-item', 'menuItemHeight');
}
// 将菜单活动item垂直居中
this.scrollTop = index * this.menuItemHeight + this.menuItemHeight / 2 - this.menuHeight / 2;
},
// 获取右边菜单每个item到顶部的距离
getMenuItemTop() {
new Promise(resolve => {
let selectorQuery = uni.createSelectorQuery();
selectorQuery.selectAll('.class-item').boundingClientRect((rects) => {
// 如果节点尚未生成,rects值为[](因为用selectAll,所以返回的是数组),循环调用执行
if(!rects.length) {
setTimeout(() => {
this.getMenuItemTop();
}, 10);
return ;
}
rects.forEach((rect) => {
// 这里减去rects[0].top,是因为第一项顶部可能不是贴到导航栏(比如有个搜索框的情况)
this.arr.push(rect.top - rects[0].top);
resolve();
})
}).exec()
})
},
// 右边菜单滚动
async rightScroll(e) {
this.oldScrollTop = e.detail.scrollTop;
if(this.arr.length == 0) {
await this.getMenuItemTop();
}
if(this.timer) return ;
if(!this.menuHeight) {
await this.getElRect('menu-scroll-view', 'menuHeight');
}
setTimeout(() => { // 节流
this.timer = null;
// scrollHeight为右边菜单垂直中点位置
let scrollHeight = e.detail.scrollTop + this.menuHeight / 2;
for (let i = 0; i < this.arr.length; i++) {
let height1 = this.arr[i];
let height2 = this.arr[i + 1];
// 如果不存在height2,意味着数据循环已经到了最后一个,设置左边菜单为最后一项即可
if (!height2 || scrollHeight >= height1 && scrollHeight < height2) {
this.leftMenuStatus(i);
return ;
}
}
}, 10)
}
}
}
</script>
<style lang="scss" scoped>
.u-wrap {
height: calc(100vh);
/* #ifdef H5 */
height: calc(100vh - var(--window-top));
/* #endif */
display: flex;
flex-direction: column;
}
.u-search-box {
padding: 18rpx 30rpx;
}
.u-menu-wrap {
flex: 1;
display: flex;
overflow: hidden;
}
.u-search-inner {
background-color: rgb(234, 234, 234);
border-radius: 100rpx;
display: flex;
align-items: center;
padding: 10rpx 16rpx;
}
.u-search-text {
font-size: 26rpx;
color: $u-tips-color;
margin-left: 10rpx;
}
.u-tab-view {
width: 200rpx;
height: 100%;
}
.u-tab-item {
height: 110rpx;
background: #f6f6f6;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
font-size: 26rpx;
color: #444;
font-weight: 400;
line-height: 1;
}
.u-tab-item-active {
position: relative;
color: #000;
font-size: 30rpx;
font-weight: 600;
background: #fff;
}
.u-tab-item-active::before {
content: "";
position: absolute;
border-left: 4px solid $u-type-primary;
height: 32rpx;
left: 0;
top: 39rpx;
}
.u-tab-view {
height: 100%;
}
.right-box {
background-color: rgb(250, 250, 250);
}
.page-view {
padding: 16rpx;
}
.class-item {
margin-bottom: 30rpx;
background-color: #fff;
padding: 16rpx;
border-radius: 8rpx;
}
.class-item:last-child {
min-height: 100vh;
}
.item-title {
font-size: 26rpx;
color: $u-main-color;
font-weight: bold;
}
.item-menu-name {
font-weight: normal;
font-size: 24rpx;
color: $u-main-color;
}
.item-container {
display: flex;
flex-wrap: wrap;
}
.thumb-box {
width: 33.333333%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
margin-top: 20rpx;
}
.item-menu-image {
width: 120rpx;
height: 120rpx;
}
</style>
<!-- 实现动态组件的绑定 -->
<template>
<view class="group-list">
书籍及
<u-form :model="form" ref="uForm">
<template v-for="(groupItem,index) in group">
<view class="group-item">
<view class="group-title" :key="index">{{groupItem.name}}</view>
<view class="group-items" :key="index">
<u-form-item :label-width="0" :required="item.required"
v-for="(item,itemIndex) in groupItem.foods" :key="index">
<!-- <view :key="index"> -->
<view>{{item.name}}</view>
<xh-input></xh-input>
<!-- <xh-input :item="item" v-if="item.fieldsType==='input'"></xh-input> -->
<!-- </view> -->
</u-form-item>
</view>
</view>
</template>
</u-form>
</view>
</template>
<script>
// import {
// // XhInput,
// // XhSelect,
// // XhMultipleSelect,
// // XhFiles,
// // XhSwitch,
// // XhTextarea,
// // XhServiceMore,
// // XhDate
// } from '@/components/createCom/index.js'
import XhInput from '@/components/createCom/XhInput.vue'
export default {
components: {
'xh-input': XhInput,
},
props: {
item: {
type: Array,
default () {
return []
}
},
},
watch:{
"item":function(newVal){
this.group = newVal
console.log(this.group,'this.group')
}
},
data() {
return {
list: [{
fieldsId: '产品规格',
fieldsType: 'input',
fieldsName: '产品规格',
fieldsValue: '',
required: true,
fields_options: [{
key: '',
label: ''
}]
},],
// 完工信息的不同项
group: [{
groupName: '接入点信息',
item: [{
fieldsId: '基础信息',
fieldsType: 'input',
fieldsName: '产品规格',
fieldsValue: '',
required: true,
fields_options: [{
key: '',
label: ''
}]
},]
}],
configList: [{
panelName: '',
panelType: '',
group: [{
groupName: '接入点信息',
item: [{
fieldsId: '基础信息',
fieldsType: 'input',
fieldsName: '',
fieldsValue: '',
required: true,
fields_options: [{
key: '',
label: ''
}]
}]
}]
}],
form: {
name: '',
intro: '',
sex: ''
},
checkboxList: [{
name: '苹果',
checked: false,
disabled: false
},
{
name: '雪梨',
checked: false,
disabled: false
},
{
name: '柠檬',
checked: false,
disabled: false
}
],
radioList: [{
name: '鲜甜',
disabled: false
},
{
name: '麻辣',
disabled: false
}
],
radio: '',
switchVal: false
}
},
created() {
this.group = this.item
console.log(this.group,'this.group')
console.log(XhInput, 'XhInput')
}
}
</script>
<style lang="scss" scoped>
.group-list{
.group-item{
}
}
</style>
This diff is collapsed.
<template>
<view class="img-wrap rel">
<view class="upload-box">
<view class="img-item pic" v-for="(file,index) in imgList" >
<!-- <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> -->
<img :src="file.src" mode="aspectFill" @click="perviewImg(index)">
<view class="close" @click="removeImg(index)">
<u-icon name="close" color="#fff" size="20"></u-icon>
</view>
</view>
<view>
<view class="pic upload" @click="chooseImage">
<u-icon name="camera" color="#fff" size="100"></u-icon>
<span class="txt">点击拍摄</span>
</view>
</view>
</view>
</view>
</template>
<script>
import base from '@/components/upload/upload';
export default {
mixins:[base],
data() {
return {
initImgList:[],
currentIndex: 0,
uploadType: '',
pageTitle:''
}
},
computed: {
},
onLoad(option) {
this.initPage(option)
// this.initworkingAgeList();
// this.getareaList()
},
beforeDestroy(){
this.setPrevPageData()
},
methods: {
goBack(type) {
// if (type) {
// this.setPrevPageData()
// }
this.setPrevPageData()
uni.navigateBack({
delta: 2
});
},
initPage(option) {
const uploadType = option.uploadType
this.uploadType = uploadType
let pages = getCurrentPages()
if (pages.length < 2) {
return
}
let prevVue = pages[pages.length - 2].$vm
this.imgList = prevVue.imgObj[uploadType] || []
const formShowList = prevVue.formShowList
formShowList.map(item=>{
if(item.filedName===uploadType){
this.pageTitle = item.label || '图片上传'
}
})
if(this.uploadType!=='other_certificates'){
this.selectNum = 1
}
uni.setNavigationBarTitle({
title: this.pageTitle
});
},
setPrevPageData() {
let pages = getCurrentPages()
if (pages.length < 2) {
return
}
let selected = this.selected
let prevVue = pages[pages.length - 2].$vm
const uploadType = this.uploadType
prevVue.imgObj[uploadType] = this.imgList
},
initworkingAgeList() {
let list = [{
value: 0,
name: "1年内",
}, ];
for (let i = 1; i < 10; i++) {
const item = {
value: i,
name: i + "年",
};
list.push(item);
}
list.push({
value: 10,
name: "10年+",
});
this.workingAgeList = list;
},
getareaList(code, level, provinceIndex) {
provinceIndex = provinceIndex || 0
this.currentIndex = provinceIndex
let areaList = this.areaList
if (level) {
if (areaList[provinceIndex].children) {
return
}
}
uni.showLoading({
title: '加载中'
});
let params = {
type: '充电桩安装',
level: level || 0,
code: code
}
const res = this.$u.api.getSettleArea(params)
uni.hideLoading()
if (res.status != 200) {
return;
}
if (!level) {
this.areaList = res.data
const parmas = [res.data[0].id, 1]
this.getareaList(...parmas)
} else {
this.$set(areaList[provinceIndex], 'children', res.data)
}
},
selectAge(item) {
this.selected.working_age = item.value
this.selected.workingAgeTxt = item.name
},
selectArea(areaItem) {
const code = areaItem.id
const selected = this.selected
const idx = selected.areaIds.indexOf(code)
const currentProvince = this.areaList[this.currentIndex]
let txt = currentProvince.name + '-' + areaItem.name
if (idx >= 0) {
selected.areaTxts.splice(idx, 1)
selected.areaIds.splice(idx, 1)
} else {
selected.areaIds.push(code)
selected.areaTxts.push(txt)
}
this.selected = selected
},
},
}
</script>
<style lang="scss">
.upload-box {
padding: 30rpx 16rpx;
.pic {
position: relative;
display: block;
width: 720rpx;
height: 450rpx;
// overflow: hidden;
border-radius: 12rpx;
margin-bottom: 30rpx;
img {
width: 100%;
height: 100%;
}
}
.pic.upload {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
img {
display: block;
width: 60rpx;
height: 52rpx;
}
.txt {
font-weight: bold;
margin-top: 18rpx;
font-size: 32rpx;
color: #fff;
&.iconfont {
font-size: 60rpx;
}
}
background-color: rgba(0, 0, 0, 0.3);
}
}
.close{
position: absolute;
width:50rpx;
height:50rpx;
right:0;
top:0;
text-align: center;
line-height:50rpx;
border-radius: 50%;
background: red;
color: #fff;
}
.tip-sucess {
position: absolute;
bottom: 0;
left: 0;
padding: 20rpx 0;
width: 100%;
z-index: 5;
background: rgba(0, 0, 0, .4);
border-radius: 0;
color: #fff;
font-size: 28rpx;
&.tip-fail i {
background: red;
}
i {
margin-right: 12rpx;
width: 50rpx;
height: 50rpx;
background: #7fbe4c;
border-radius: 50%;
text-align: center;
line-height: 50rpx;
font-size: 24rpx;
}
}
</style>
This diff is collapsed.
......@@ -2,60 +2,65 @@
<view class="back_view">
<Settle :index="1">
<view class="content-view">
<view class="item">
<view class="item-label">
<text>招募要求</text>
<view style="padding: 30rpx;">
<view class="item">
<view class="item-label">
<text>招募要求</text>
</view>
<view class="item-content">
<text>
1.必须具备相关的从业证书——电工证;
2.有汽车:皮卡、小面包、小轿车等;
3.需具备一定的作业工具:如液压压线钳、冲击钻、电锤、登高安全带、电锤、绝缘电阻仪(摇表)、交流充电模拟器等;
4.有充电桩安装经验优先;
</text>
</view>
</view>
<view class="item-content">
<text>
1.必须具备相关的从业证书——电工证;
2.有汽车:皮卡、小面包、小轿车等;
3.需具备一定的作业工具:如液压压线钳、冲击钻、电锤、登高安全带、电锤、绝缘电阻仪(摇表)、交流充电模拟器等;
4.有充电桩安装经验优先;
</text>
<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>
<view class="item">
<view class="item-label">
<text>结算价格</text>
<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="item-content">
<text>
1.不同车企品牌结算价格不一,675元-1890元不等;
2.结算价格为包工包料价,安装材料根据车企品牌规格自行采购(电缆、空开、漏保);
3.结算账期:周结50%,剩余50%次月20号结算;
</text>
<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 class="item">
<view class="item-label">
<text>入驻资料</text>
</view>
<view class="item-content">
<text>
1.身份证正反面照片
2.高/低压电工证正反面照片
3.车辆照片
</text>
</view>
</view>
<view class="item">
<view class="item-label">
<text>注意事项:</text>
</view>
<view class="item-content">
<text>
1.身份证,银行卡,签约人共有同一人,否则无法入驻。
2.充电桩材料按要求自行准备。
</text>
</view>
</view>
</view>
<template v-slot:bottom>
<button :class="['bottom_btn', {'active': isStop}]" @click="$u.debounce(applyClick, 500)">
<text class="bottom_title" v-if="!isStop">浏览 {{count}} 秒后可申请入驻</text>
<text class="bottom_title" v-if="isStop">申请入驻</text>
</button>
</view>
<template v-slot:bottom>
<button :class="['bottom_btn', {'active': isStop}]" @click="$u.debounce(applyClick, 500)">
<text class="bottom_title" v-if="!isStop">浏览 {{count}} 秒后可申请入驻</text>
<text class="bottom_title" v-if="isStop">申请入驻</text>
</button>
</template>
</Settle>
</view>
......@@ -179,33 +184,43 @@
<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;
}
.content-view {
background-color: #FFFFFF;
margin-bottom: 188rpx;
border-radius: 12rpx;
}
.line-view {
background-color: #F4F5F7;
height: 2rpx;
width: 100%;
margin-bottom: 30rpx;
margin-top: 30rpx;
}
.item-label {
color: #333333;
font-weight: bold;
font-size: 32rpx;
padding-top: 36rpx;
margin-left: 30rpx;
margin-top: 8rpx;
}
.item-content {
color: #333333;
font-size: 26rpx;
margin-top: 30rpx;
margin-left: 30rpx;
line-height: 50rpx;
margin-top: 30rpx;
}
.bottom_btn {
......@@ -218,10 +233,12 @@
align-items: center;
justify-content: center;
background-color: #D1D4D4;
&.active {
background-color: #2272FF;
}
.bottom_title {
color: #fff;
}
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
<view class="content">
<view class="area-nav flex" v-if="selectType == 'area'">
<view class="nav-left">
<view :class="['nav-item',{'active':currentProvinceIndex===index}]" v-for="(areaItem, index) in areaList" :key="index"
<view :class="['nav-item',{'active':currentIndex===index}]" v-for="(areaItem, index) in areaList" :key="index"
@click="getareaList(areaItem.id,1,index)">
{{ areaItem.name }}
</view>
......@@ -28,7 +28,7 @@
<!-- <i class="iconfont icon-tijiao"></i> -->
</view>
</view>
<view class="btn-wrap fixed flex flex-xc">
<view class="btn-wrap fixed flex flex-xc" v-if="selectType == 'area'">
<button class="btn-submit" @click="goBack('confirm')">
确定
</button>
......@@ -202,13 +202,13 @@
areaIds: prevVue.baseInfo.service_area,
areaTxts: prevVue.areaTxts
}
title = '选择可服务的城市'
title = '接单城市'
} else if (selectType === 'working_age') {
this.selected = {
working_age: prevVue.baseInfo.working_age,
workingAgeTxt: prevVue.workingAgeTxt
}
title = '选择工作工龄'
title = '电工工龄'
}
uni.setNavigationBarTitle({
title
......@@ -385,6 +385,7 @@
selectAge(item) {
this.selected.working_age = item.value
this.selected.workingAgeTxt = item.name
this.goBack('confirm')
},
selectAllarea(idx){
const allChildren = this.areaList[this.currentIndex]
......@@ -409,7 +410,10 @@
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.content {
background-color: #F3F3F3;
}
.nav-item,
.age-item {
position: relative;
......@@ -474,9 +478,9 @@
.age-box {
padding-top: 40rpx;
height: calc(100vh - 180rpx);
// height: calc(100vh - 180rpx);
overflow: auto;
margin-bottom: 44rpx;
.age-item {
position: relative;
}
......
src/static/settle/bachground1@3x.png

72.7 KB | W: | H:

src/static/settle/bachground1@3x.png

73.5 KB | W: | H:

src/static/settle/bachground1@3x.png
src/static/settle/bachground1@3x.png
src/static/settle/bachground1@3x.png
src/static/settle/bachground1@3x.png
  • 2-up
  • Swipe
  • Onion skin
src/static/settle/bachground2@3x.png

85.3 KB | W: | H:

src/static/settle/bachground2@3x.png

117 KB | W: | H:

src/static/settle/bachground2@3x.png
src/static/settle/bachground2@3x.png
src/static/settle/bachground2@3x.png
src/static/settle/bachground2@3x.png
  • 2-up
  • Swipe
  • Onion skin
src/static/settle/bachground3@3x.png

68.8 KB | W: | H:

src/static/settle/bachground3@3x.png

93.1 KB | W: | H:

src/static/settle/bachground3@3x.png
src/static/settle/bachground3@3x.png
src/static/settle/bachground3@3x.png
src/static/settle/bachground3@3x.png
  • 2-up
  • Swipe
  • Onion skin
src/static/settle/bachground4@3x.png

77.3 KB | W: | H:

src/static/settle/bachground4@3x.png

106 KB | W: | H:

src/static/settle/bachground4@3x.png
src/static/settle/bachground4@3x.png
src/static/settle/bachground4@3x.png
src/static/settle/bachground4@3x.png
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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