Commit 9baa17ed authored by Morson's avatar Morson
parents 7bf48276 ff6e3f4b
...@@ -17,6 +17,8 @@ npm run dev:mp-weixin // 运行dev环境 ...@@ -17,6 +17,8 @@ npm run dev:mp-weixin // 运行dev环境
``` ```
npm run build:mp-weixin // 运行生产环境 npm run build:mp-weixin // 运行生产环境
``` ```
### 公共组件:
[图片上传参考](https://ext.dcloud.net.cn/plugin?id=822)
### Customize configuration ### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/). See [Configuration Reference](https://cli.vuejs.org/config/).
...@@ -7,14 +7,17 @@ import { ...@@ -7,14 +7,17 @@ import {
import { import {
settledApiFun settledApiFun
} from '@/common/api/settled.js'; } from '@/common/api/settled.js';
import { learnApiFun } from "@/common/api/learn.js";
let apiFun = function(vm) { let apiFun = function(vm) {
let commonApi = commonApiFun(vm); let commonApi = commonApiFun(vm);
let settledApi = settledApiFun(vm) let settledApi = settledApiFun(vm)
let cloudApi = cloudRulesApiFun(vm) let cloudApi = cloudRulesApiFun(vm)
let learnApi=learnApiFun(vm)
let apiUrl = { let apiUrl = {
...commonApi, ...commonApi,
...settledApi, ...settledApi,
...cloudApi ...cloudApi,
...learnApi
} }
return apiUrl 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>
...@@ -5,11 +5,10 @@ ...@@ -5,11 +5,10 @@
<image :src="url" style="width: 100%;" mode="widthFix"></image> <image :src="url" style="width: 100%;" mode="widthFix"></image>
<view class="introduction"> <view class="introduction">
<slot></slot> <slot></slot>
</view>
<view class="settle-bottom"> <view class="settle-bottom">
<slot name="bottom"></slot> <slot name="bottom"></slot>
</view> </view>
</view>
</view> </view>
</template> </template>
...@@ -33,22 +32,19 @@ ...@@ -33,22 +32,19 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.settle-view {
background-color: #F4F5F7;
}
.introduction { .introduction {
border-radius: 12rpx; border-radius: 12rpx;
margin-left: 30rpx;
margin-right: 30rpx;
margin-top: -112rpx;
background-color: #F4F5F7;
overflow: auto; overflow: auto;
height: calc(100vh - 368rpx); position: fixed;
top: 320rpx;
bottom: 0rpx;
left: 30rpx;
right: 30rpx;
} }
.settle-bottom { .settle-bottom {
position: fixed; position: fixed;
width: calc(100vw - 60rpx);
bottom: 44rpx; bottom: 44rpx;
width: 100%;
} }
</style> </style>
...@@ -15,6 +15,12 @@ ...@@ -15,6 +15,12 @@
"navigationBarTitleText": "订单" "navigationBarTitleText": "订单"
} }
}, },
{
"path": "pages/order/complete",
"style": {
"navigationBarTitleText": "订单-完工配置"
}
},
{ {
"path": "pages/mine/index", "path": "pages/mine/index",
"style": { "style": {
...@@ -82,7 +88,8 @@ ...@@ -82,7 +88,8 @@
{ {
"path": "pages/settle/select", "path": "pages/settle/select",
"style": { "style": {
"navigationBarTitleText": "选择可服务的城市" "navigationBarTitleText": "选择可服务的城市",
"navigationBarBackgroundColor": "#FFFFFF"
} }
}, },
{ {
...@@ -100,7 +107,9 @@ ...@@ -100,7 +107,9 @@
{ {
"path": "pages/settle/prompt", "path": "pages/settle/prompt",
"style": { "style": {
"navigationBarTitleText": "入驻提示" "navigationBarTitleText": "入驻提示",
"navigationStyle": "custom",
"disableScroll": true
} }
}, },
{ {
...@@ -224,18 +233,8 @@ ...@@ -224,18 +233,8 @@
"query": "" //启动参数,在页面的onLoad函数里面得到 "query": "" //启动参数,在页面的onLoad函数里面得到
}, },
{ {
"name": "签约页面", //模式名称 "name": "订单 - 完工配置", //模式名称
"path": "pages/settle/sign-contract", //启动页面,必选 "path": "pages/order/complete", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
},
{
"name": "授权登录", //模式名称
"path": "pages/login/index", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
},
{
"name": "在线考试", //模式名称
"path": "pages/learn/exam", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到 "query": "" //启动参数,在页面的onLoad函数里面得到
} }
] ]
......
<template> <template>
<view class="content"> <view class="content">
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom" @scroll="handleScroll" <scroll-view
refresher-enabled :refresher-triggered="triggered" @refresherrefresh="onRefresh" scroll-anchoring scroll-y
@refresherrestore="onRestore" @refresherpulling="triggered = true"> style="height: 100%; width: 100%"
@scrolltolower="reachBottom"
<u-swiper :height="250" :list="list" :indicator-pos="indicatorPos" :mode="mode" :interval="3000" @scroll="handleScroll"
@click="clickSwiper"> refresher-enabled
:refresher-triggered="triggered"
@refresherrefresh="onRefresh"
scroll-anchoring
@refresherrestore="onRestore"
@refresherpulling="triggered = true"
>
<u-swiper
:height="250"
:list="list"
:indicator-pos="indicatorPos"
:mode="mode"
:interval="3000"
@click="clickSwiper"
>
</u-swiper> </u-swiper>
<view> <view>
<text class="title">最新消息</text> <text class="title">最新消息</text>
...@@ -22,20 +36,29 @@ ...@@ -22,20 +36,29 @@
<!-- 入驻成功之后显示推荐订单列表 --> <!-- 入驻成功之后显示推荐订单列表 -->
<view v-if="status == 7 && orderList.length > 0"> <view v-if="status == 7 && orderList.length > 0">
<view v-for="(item, index) in orderList" :key="index"> <view v-for="(item, index) in orderList" :key="index">
<OrderCell :orderData="item"> <OrderCell :orderData="item"> </OrderCell>
</OrderCell>
</view> </view>
<u-loadmore :status="currentLoadStatus" bgColor="#f2f2f2"></u-loadmore> <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">
暂无订单 暂无订单
</view> </view>
<!-- 入驻前--> <!-- 入驻前-->
<view v-else> <view v-else-if="loaded">
<text class="title">当前订单{{ count }}笔\n入驻通过后,平台将向您推荐订单</text> <text class="title"
<u-button class="settle-button" type="primary" shape="circle" @click="immediatelyIn" >当前订单{{ count }}笔\n入驻通过后,平台将向您推荐订单</text
:custom-style="buttonStyle"> >
<u-button
class="settle-button"
type="primary"
shape="circle"
@click="immediatelyIn"
:custom-style="buttonStyle"
>
立即入驻 立即入驻
</u-button> </u-button>
</view> </view>
...@@ -46,68 +69,74 @@ ...@@ -46,68 +69,74 @@
</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,
}, },
data() { data() {
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",
}, },
{ {
image: 'https://cdn.uviewui.com/uview/swiper/2.jpg', image: "https://cdn.uviewui.com/uview/swiper/2.jpg",
}, },
{ {
image: 'https://cdn.uviewui.com/uview/swiper/3.jpg', image: "https://cdn.uviewui.com/uview/swiper/3.jpg",
} },
], ],
title: false, title: false,
mode: 'round', mode: "round",
indicatorPos: 'bottomCenter', indicatorPos: "bottomCenter",
title: 'Hello', title: "Hello",
loaded: false,
count: 0, // 推荐订单数量 count: 0, // 推荐订单数量
messageList: [{ messageList: [
{
id: 1234, id: 1234,
type: '', type: "",
level: '', level: "",
title: '', title: "",
url: '', url: "",
body: '好消息', body: "好消息",
}, { },
{
id: 1234, id: 1234,
type: '', type: "",
level: '', level: "",
title: '', title: "",
url: '', url: "",
body: '好消息', body: "好消息",
}, { },
{
id: 1234, id: 1234,
type: '', type: "",
level: '', level: "",
title: '', title: "",
url: '', url: "",
body: '好消息', body: "好消息",
}], },
loadStatus: ['more', 'loading', 'noMore'], ],
currentLoadStatus: 'loading', loadStatus: ["more", "loading", "noMore"],
currentLoadStatus: "loading",
orderList: [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}], orderList: [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}],
bottomLoading: false bottomLoading: false,
} };
}, },
computed: { computed: {
buttonStyle() { buttonStyle() {
return { return {
'width': '300rpx', width: "300rpx",
} };
} },
}, },
onLoad() { onLoad() {
this._freshing = false; this._freshing = false;
...@@ -117,27 +146,28 @@ ...@@ -117,27 +146,28 @@
// 每次进入页面都刷新入驻状态 // 每次进入页面都刷新入驻状态
if (app.globalData.token) { if (app.globalData.token) {
// 获取是否显示入驻按钮 // 获取是否显示入驻按钮
this.initSettleInfo() this.initSettleInfo();
} }
}, },
methods: { methods: {
async initSettleInfo() { async initSettleInfo() {
if (this.status == 7) return if (this.status == 7) return;
const callBack = (vm, result) => { const callBack = (vm, result) => {
// 后台自动判断入驻流程是否完成,前台通过status确定状态 // 后台自动判断入驻流程是否完成,前台通过status确定状态
if (result && result.record) { if (result && result.record) {
// vm.status = result.record.status vm.loaded = true;
vm.status = 0 vm.status = result.record.status;
} // vm.status = 1
} }
await app.getBaseInfo(this, callBack) };
await app.getBaseInfo(this, callBack);
}, },
onRefresh() { onRefresh() {
if (this._freshing) return; if (this._freshing) return;
this._freshing = true; this._freshing = true;
// 获取入驻状态 // 获取入驻状态
this.initSettleInfo() this.initSettleInfo();
// 获取推荐订单及数量 // 获取推荐订单及数量
// .... // ....
...@@ -145,83 +175,83 @@ ...@@ -145,83 +175,83 @@
// 数据加载完成更新入驻状态和推荐列表 // 数据加载完成更新入驻状态和推荐列表
this.triggered = false; this.triggered = false;
this._freshing = false; this._freshing = false;
}, 1000) }, 1000);
}, },
onRestore() { onRestore() {
this.triggered = 'restore'; this.triggered = "restore";
}, },
reachBottom() { reachBottom() {
console.log('-----bottom will-----') console.log("-----bottom will-----");
if (this.bottomLoading || this.currentLoadStatus == this.loadStatus[2]) { if (this.bottomLoading || this.currentLoadStatus == this.loadStatus[2]) {
return return;
} }
console.log('-----bottom did-----') console.log("-----bottom did-----");
this.bottomLoading = true this.bottomLoading = true;
setTimeout(() => { setTimeout(() => {
// 加载更多数据 // 加载更多数据
// ... // ...
this.orderList.push(...[{}, {}, {}, {}, {}, {}, {}, {}, {}, {}]) this.orderList.push(...[{}, {}, {}, {}, {}, {}, {}, {}, {}, {}]);
// 加载完成 // 加载完成
this.currentLoadStatus = false/*是否还有*/ ? this.loadStatus[1] : this.loadStatus[2] this.currentLoadStatus = false /*是否还有*/
this.$nextTick(function() { ? this.loadStatus[1]
this.bottomLoading = false : this.loadStatus[2];
}) this.$nextTick(function () {
this.bottomLoading = false;
});
}, 1000); }, 1000);
}, },
clickSwiper(index) { clickSwiper(index) {},
},
handleScroll() { handleScroll() {
console.log('-----scroll-------') console.log("-----scroll-------");
}, },
immediatelyIn() { immediatelyIn() {
if (util.getToken()) { if (util.getToken()) {
uni.navigateTo({ uni.navigateTo({
url: this.status > 0 ? '/pages/settle/prompt' : '/pages/settle/index' url: this.status > 0 ? "/pages/settle/prompt" : "/pages/settle/index",
}) });
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: 'pages/login/index' url: "pages/login/index",
}); });
} }
} },
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content { .content {
height: 100vh; height: 100vh;
} }
.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;
} }
.sticky { .sticky {
height: 120 rpx; height: 120 rpx;
background-color: #2979ff; background-color: #2979ff;
color: #fff; color: #fff;
padding: 24 rpx; padding: 24 rpx;
text-align: left; text-align: left;
} }
.order-view { .order-view {
text-align: center; text-align: center;
} }
</style> </style>
<template> <template>
<view class="content"> <view class="content">
<view class=""> <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> <text class="dx">多选</text><text class="num">第1题</text><text class="all">/共30题</text>
<view class=""> </view>
<view class="" style="text-align: center;">
一下对压缩机故障描述有误的是? 一下对压缩机故障描述有误的是?
</view> </view>
<view class=""> <view class="" style="margin-top: 130rpx;">
<button>A</button> <view class="list-box">
<button>B</button> <view v-for="(item,index) in list" :key="index" @click="choice(index)" :class="[item.selected?'selde':'noselde']">
<button>C</button> {{item.selected?item.title:item.title}}
<button>D</button> </view>
<button>E</button> </view>
</view> </view>
<button class="btn">下一题</button> <button class="btn">下一题</button>
</view> </view>
...@@ -21,35 +23,135 @@ ...@@ -21,35 +23,135 @@
export default { export default {
data() { data() {
return { return {
list: [{
selected: false,
title: 'A'
},
{
selected: false,
title: 'B'
},
{
selected: false,
title: 'C'
},
{
selected: false,
title: 'D'
},
{
selected: false,
title: 'E'
} }
],
selectId:[],
};
}, },
methods: { 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> </script>
<style> <style lang="scss">
.content{ .content {
width: 600rpx; width: 600rpx;
height: 800rpx; height: 800rpx;
/* background: #8F8F94; */ /* background: #8F8F94; */
margin: 0 auto ; margin: 0 auto;
} }
.dx{
.dx {
padding: 0rpx; padding: 0rpx;
background: #2979FF; background: #2979FF;
color: #FFFFFF; color: #FFFFFF;
border-radius: 0px; border-radius: 0px;
} }
.num{
.num {
color: #2B85E4; color: #2B85E4;
} }
.all{
.all {
color: #8F8F94; 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> </style>
...@@ -18,60 +18,54 @@ ...@@ -18,60 +18,54 @@
<view class="" style="font-size: 40rpx;font-weight: 1000;"> <view class="" style="font-size: 40rpx;font-weight: 1000;">
第一章 充电桩常见问题答疑 第一章 充电桩常见问题答疑
</view> </view>
<view class="" > <view class="video" >
<view class="" style="display: flex; margin: 20rpx 0;"> <view class="video_1" >
<view class="" style="width: 100rpx;height:38rpx;border: 1px solid #8F8F94;text-align: center;line-height: 38rpx;"> <view class="text" >
视频 视频
</view> </view>
<text style="margin-left: 44rpx;">1-1唯修汇公司简介</text> <text class="text2">1-1唯修汇公司简介</text>
</view> </view>
<view class="" style="display: flex;margin:20rpx 0;"> <view class="video_1" >
<view class="" style="width: 100rpx;height:38rpx;border:1px solid #8F8F94;text-align: center;line-height: 38rpx;" > <view class="text">
视频 视频
</view> </view>
<text style="margin-left:44rpx;">1-2可接单评定标准</text> <text class="text2">1-2可接单评定标准</text>
</view> </view>
<view class="" style="display: flex;margin:20rpx 0;"> <view class="video_1" >
<view class="" style="width: 100rpx;height: 38rpx;border:1px solid #8F8F94;text-align: center;line-height: 38rpx;"> <view class="text">
视频 视频
</view> </view>
<text style="margin-left:44rpx;">1-3结算规则</text> <text class="text2">1-3结算规则</text>
</view> </view>
<view class="" style="display: flex;margin: 20rpx 0;"> <view class="video_1">
<view class="" style="width: 100rpx;height: 38rpx;border:1px solid #8F8F94;text-align: center;line-height: 38rpx;"> <view class="text">
视频 视频
</view> </view>
<text style="margin-left: 44rpx;">1-4充电桩安装开城计划</text> <text class="text2">1-4充电桩安装开城计划</text>
</view> </view>
<view class="" style="display: flex;margin: 20rpx 0;"> <view class="video_1">
<view class="" style="width: 100rpx;height: 38rpx;border:1px solid #8F8F94;text-align: center;line-height: 38rpx;"> <view class="text">
视频 视频
</view> </view>
<text style="margin-left: 44rpx;">1-5缴纳质保金和费用答疑</text> <text class="text2">1-5缴纳质保金和费用答疑</text>
</view> </view>
<view class="" style="display: flex;margin: 20rpx 0;"> <view class="video_1" >
<view class="" style="width: 100rpx;height: 38rpx;border: 1px solid #8F8F94;text-align: center;line-height: 38rpx;"> <view class="text" >
视频 视频
</view> </view>
<text style="margin-left:44rpx;">1-6安装材料品牌答疑1</text> <text class="text2">1-6安装材料品牌答疑1</text>
</view> </view>
<view class="" style="display: flex;margin: 20rpx 0;"> <view class="video_1" >
<view class="" style="width: 100rpx;height: 38rpx;border:1px solid #8F8F94;text-align: center;line-height: 38rpx;"> <view class="text">
视频 视频
</view> </view>
<text style="margin-left:44rpx;">1-7安装材料答疑2</text> <text class="text2">1-7安装材料答疑2</text>
</view> </view>
<view class="" style="display: flex;margin: 20rpx 0;"> <view class="video_1">
<view class="" style="width: 100rpx;height: 38rpx;border:1px solid #8F8F94;text-align: center;"> <view class="text">
视频 视频
</view> </view>
<text style="margin-left:44rpx;">1-8其他问题答疑</text> <text class="text2">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>
</view> </view>
</view> </view>
</view> </view>
...@@ -92,7 +86,7 @@ ...@@ -92,7 +86,7 @@
} }
</script> </script>
<style> <style lang="scss">
.title{ .title{
height: 164rpx; height: 164rpx;
font-size: 40rpx; font-size: 40rpx;
...@@ -107,4 +101,21 @@ ...@@ -107,4 +101,21 @@
width: 128rpx; width: 128rpx;
height: 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> </style>
This diff is collapsed.
...@@ -4,22 +4,25 @@ ...@@ -4,22 +4,25 @@
考试结果 考试结果
</view> </view>
<view class="result"> <view class="result">
考试不通过 未通过
</view> </view>
<view class="details"> <view class="details">
<view class="text1"> <view class="">
<text>合格条件:</text><text>答对20题</text> <text class="first">合格条件:</text><text>答对20题</text>
</view> </view>
<view class="text1"> <view class="">
<text>考试结果:</text><text>答对10题</text> <text class="first">考试结果:</text><text>答对10题</text>
</view> </view>
<view class="text1"> <view class="">
<text>考试用时:</text><text>16分29秒</text> <text class="first">考试用时</text><text>16分29秒</text>
</view> </view>
<button class="btn">再答一次</button> <view class="btn">
<button class="btn1">再答一次</button>
<button class="btn2">退出重考</button> <button class="btn2">退出重考</button>
</view> </view>
</view> </view>
</view>
</template> </template>
<script> <script>
...@@ -29,47 +32,57 @@ ...@@ -29,47 +32,57 @@
} }
}, },
methods: { methods:{
} }
} }
</script> </script>
<style> <style lang="scss">
.content{ .content{
width: 592rpx; width: 100%;
height: 800rpx; height: 950rpx;
/* background: #19BE6B; */ background: #DCDFE6;
margin: 84rpx auto; padding: 53rpx;
overflow: hidden;
} }
.title{ .title{
margin:7px 13px; font-size: 30rpx;
} }
.result{ .result{
color: red; color: red;
font-size: 56rpx; font-size: 73rpx;
text-align: center; text-align: center;
margin: 52rpx 0; margin: 46rpx 0;
} }
.details{ .details{
height: 400rpx; border-top: 2rpx dashed #808080;
border-top: 1px dashed #808080; height: 600rpx;
padding-top: 94rpx;
view{
margin: 26rpx 0 0;
.first{
margin: 0 20rpx 0;
}
} }
.text1{
margin: 16rpx 24rpx;
} }
.btn{ .btn{
width: 476rpx; .btn1{
height: 80rpx; width: 477rpx;
height: 61rpx;
border-radius: 27rpx;
line-height: 61rpx;
font-size: 29rpx;
background: #007AFF; background: #007AFF;
font-size: 32rpx; color: #FFFFFF;
margin:206rpx auto 38rpx ; margin: 140rpx auto 34rpx;
} }
.btn2{ .btn2{
width: 476rpx; width: 477rpx;
height: 80rpx; height: 61rpx;
font-size: 30rpx; border-radius: 27rpx;
margin: 0 auto ; 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>
<template> <template>
<view class="page-content"> <view class="page-content">
<Settle :index="2"> <Settle :index="2">
<view class="title">入驻充电安装业务所需资料</view> <view class="tip-text">
<image class="tip-image" mode="widthFix" src="../../static/settle/anquan@3x.png"></image>
<text>身份证照片、电工证照片、行驶证/驾驶证照片及车辆照片仅用于申请入驻。</text>
</view>
<template v-slot:bottom>
<view class="btn-wrap flex-xc">
<button class="btn-submit" :disabled="!submitBtnStatus" @click="$u.debounce(submitFileInfo, 500)">
{{
!submitBtnStatus ? "完成必填项,可提交资料" : "提交"
}}
</button>
</view>
</template>
<view class="base-list"> <view class="base-list">
<template v-for="(fileItem, index) in formShowList"> <template v-for="(fileItem, index) in formShowList">
<view class="item item-select flex flex-yc" :key="index" @click="toUploadImg(fileItem, index)"> <view class="item item-select flex flex-yc" :key="index" @click="toUploadImg(fileItem, index)">
...@@ -16,7 +32,8 @@ ...@@ -16,7 +32,8 @@
<view class="tips" :key="index + 't'"> <view class="tips" :key="index + 't'">
{{ fileItem.tips }} {{ fileItem.tips }}
</view> </view>
<view class="tips id-identity-box" :key="index + 'identity'" v-if="fileItem.filedName === 'id_card_front'"> <view class="tips id-identity-box" :key="index + 'identity'"
v-if="fileItem.filedName === 'id_card_front'">
<view class="txt">请核实识别结果</view> <view class="txt">请核实识别结果</view>
<view class="txt"> <view class="txt">
身份证姓名:{{ fileInfo.id_card_name}}<span class="red" v-show=" 身份证姓名:{{ fileInfo.id_card_name}}<span class="red" v-show="
...@@ -34,14 +51,14 @@ ...@@ -34,14 +51,14 @@
</view> </view>
</template> </template>
</view> </view>
<view class="seat"></view> <!-- <view class="seat"></view>
<view class="btn-wrap fixed flex flex-xc"> <view class="btn-wrap fixed flex flex-xc">
<button class="btn-submit" :disabled="!submitBtnStatus" @click="$u.debounce(submitFileInfo, 500)"> <button class="btn-submit" :disabled="!submitBtnStatus" @click="$u.debounce(submitFileInfo, 500)">
{{ {{
!submitBtnStatus ? "完成必填项,可提交资料" : "提交" !submitBtnStatus ? "完成必填项,可提交资料" : "提交"
}} }}
</button> </button>
</view> </view> -->
</Settle> </Settle>
</view> </view>
</template> </template>
...@@ -125,7 +142,7 @@ ...@@ -125,7 +142,7 @@
this.checkIdCard("front"); this.checkIdCard("front");
} else { } else {
this.fileInfo.id_card_name = ""; this.fileInfo.id_card_name = "";
this.fileInfo.id_card_number =""; this.fileInfo.id_card_number = "";
} }
}, },
"fileInfo.id_card_back"() { "fileInfo.id_card_back"() {
...@@ -148,20 +165,20 @@ ...@@ -148,20 +165,20 @@
}, },
methods: { methods: {
updateImgs(){ updateImgs() {
const uploadType = this.uploadType const uploadType = this.uploadType
const uploadImgs = this.imgObj[uploadType] const uploadImgs = this.imgObj[uploadType]
if(uploadImgs.length<1){ if (uploadImgs.length < 1) {
return return
} }
if(uploadType==='other_certificates'){ if (uploadType === 'other_certificates') {
const otherImgs = this.imgObj['other_certificates'] const otherImgs = this.imgObj['other_certificates']
let imgs = [] let imgs = []
otherImgs.map(item=>{ otherImgs.map(item => {
const img = item.key || item.src || '' const img = item.key || item.src || ''
imgs.push(img) imgs.push(img)
}) })
this.fileInfo[uploadType] =imgs.join(',') this.fileInfo[uploadType] = imgs.join(',')
return return
} }
this.fileInfo[uploadType] = uploadImgs[0].key || uploadImgs[0].src || '' this.fileInfo[uploadType] = uploadImgs[0].key || uploadImgs[0].src || ''
...@@ -268,7 +285,7 @@ ...@@ -268,7 +285,7 @@
const fileInfo = this.fileInfo; const fileInfo = this.fileInfo;
let submitInfoData = { let submitInfoData = {
...fileInfo, ...fileInfo,
recommender:getApp().globalData.settleRecommend recommender: getApp().globalData.settleRecommend
} }
uni.showLoading({ uni.showLoading({
title: '加载中……' title: '加载中……'
...@@ -316,7 +333,18 @@ ...@@ -316,7 +333,18 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.page-content {
background-color: #F4F5F7;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
.base-list { .base-list {
.item { .item {
display: flex; display: flex;
...@@ -448,13 +476,22 @@ ...@@ -448,13 +476,22 @@
} }
} }
.title { .tip-text {
padding: 30rpx 0 40rpx; background-color: #FFFFFF;
text-align: center; border-radius: 12rpx;
line-height: 50rpx; padding: 38rpx 30rpx 30rpx 30rpx;
font-size: 36rpx; height: 140rpx;
color: #333; margin-bottom: 20rpx;
font-weight: bold; font-size: 24rpx;
color: #000000;
display: flex;
align-items: flex-start;
}
.tip-image {
width: 34rpx;
margin-right: 8rpx;
margin-top: 2rpx;
} }
.seat { .seat {
...@@ -463,30 +500,20 @@ ...@@ -463,30 +500,20 @@
/*提交按钮*/ /*提交按钮*/
.btn-wrap { .btn-wrap {
position: fixed; width: 100%;
// margin: px2rem(36);
left: 0;
right: 0;
bottom: 0;
padding: 30rpx 0;
background: #f3f3f3;
.btn-submit { .btn-submit {
width: 600rpx; width: 600rpx;
// left: 5%;
// bottom: px2rem(36);
height: 104rpx; height: 104rpx;
line-height: 104rpx; line-height: 104rpx;
border-radius: 52rpx; border-radius: 52rpx;
overflow: hidden; background: #2272FF;
background: #2272ff;
font-size: 32rpx; font-size: 32rpx;
color: #fff; color: #fff;
&[disabled] { &[disabled] {
border: 2rpx solid #999; background-color: #D1D4D4;
background-color: #f3f3f3; color: #FFFFFF;
color: #999;
} }
} }
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<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 class="item"> <view class="item">
<view class="item-label"> <view class="item-label">
<text>招募要求</text> <text>招募要求</text>
...@@ -15,6 +16,7 @@ ...@@ -15,6 +16,7 @@
</text> </text>
</view> </view>
</view> </view>
<view class="line-view"></view>
<view class="item"> <view class="item">
<view class="item-label"> <view class="item-label">
<text>结算价格</text> <text>结算价格</text>
...@@ -27,6 +29,7 @@ ...@@ -27,6 +29,7 @@
</text> </text>
</view> </view>
</view> </view>
<view class="line-view"></view>
<view class="item"> <view class="item">
<view class="item-label"> <view class="item-label">
<text>入驻资料</text> <text>入驻资料</text>
...@@ -39,6 +42,7 @@ ...@@ -39,6 +42,7 @@
</text> </text>
</view> </view>
</view> </view>
<view class="line-view"></view>
<view class="item"> <view class="item">
<view class="item-label"> <view class="item-label">
<text>注意事项:</text> <text>注意事项:</text>
...@@ -51,6 +55,7 @@ ...@@ -51,6 +55,7 @@
</view> </view>
</view> </view>
</view> </view>
</view>
<template v-slot:bottom> <template v-slot:bottom>
<button :class="['bottom_btn', {'active': isStop}]" @click="$u.debounce(applyClick, 500)"> <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">浏览 {{count}} 秒后可申请入驻</text>
...@@ -184,28 +189,38 @@ ...@@ -184,28 +189,38 @@
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.content-view { .content-view {
background-color: #FFFFFF; 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 { .item-label {
color: #333333; color: #333333;
font-weight: bold; font-weight: bold;
font-size: 32rpx; font-size: 32rpx;
padding-top: 36rpx; margin-top: 8rpx;
margin-left: 30rpx;
} }
.item-content { .item-content {
color: #333333; color: #333333;
font-size: 26rpx; font-size: 26rpx;
margin-top: 30rpx;
margin-left: 30rpx;
line-height: 50rpx; line-height: 50rpx;
margin-top: 30rpx;
} }
.bottom_btn { .bottom_btn {
...@@ -218,10 +233,12 @@ ...@@ -218,10 +233,12 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: #D1D4D4; background-color: #D1D4D4;
&.active { &.active {
background-color: #2272FF; background-color: #2272FF;
} }
.bottom_title { .bottom_title {
color: #fff; color: #fff;
} }
......
<template> <template>
<view class="container u-row-between" v-if="info"> <view class="container u-row-between" v-if="info">
<Settle :index="2">
<view class="content-view">
<view class="u-flex u-row-center"> <view class="u-flex u-row-center">
<image class="icon" src="@/static/settle/icon-prompt.png"></image> <image :class="['icon', {active: status != 1}]"
:src="status == 1 ? require('@/static/settle/chenggong@3x.png') : require('@/static/settle/icon-prompt@3x.png')">
</image>
</view> </view>
<view class="txt-box"> <view class="txt-box">
<text :class="['title',index ? 'active' : '']" v-for="(txt,index) in info.txtArr">{{txt}}</text> <text :class="['title',index ? 'active' : '']" v-for="(txt,index) in info.txtArr">{{txt}}</text>
</view> </view>
<view class="tips-box" v-if="info.tipsArr"> <view class="tips-box" v-if="info.tipsArr">
<text :class="['tips',info.tipsArr.length>1 && index===0 ? 'red' : '']" v-for="(txt,index) in info.tipsArr">{{txt}}</text> <text :class="['tips',info.tipsArr.length>1 && index===0 ? 'red' : '']"
v-for="(txt,index) in info.tipsArr">{{txt}}</text>
</view> </view>
</view>
<template v-slot:bottom>
<button class="btn-submit" @click="$u.debounce(goPage, 500)">{{info.btnTxt}}</button> <button class="btn-submit" @click="$u.debounce(goPage, 500)">{{info.btnTxt}}</button>
</template>
</Settle>
</view> </view>
</template> </template>
<script> <script>
import Settle from '@/components/settle/index.vue'
export default { export default {
components: {
Settle
},
data() { data() {
return { return {
settledInfo:null, settledInfo: null,
promptList:[{ promptList: [{
status:1, status: 1,
statusName:'待审核', statusName: '待审核',
txtArr:['已提交,等待审核','正在审核中'], txtArr: ['已提交,等待审核', '正在审核中'],
btnTxt:'去接单广场逛逛', btnTxt: '去接单广场逛逛',
url:'/pages/take/index' url: '/pages/take/index'
},{ }, {
status:2, status: 2,
statusName:'已通过', statusName: '已通过',
txtArr:['恭喜,审核通过','“充电桩安装入驻审核”'], txtArr: ['恭喜,审核通过', '“充电桩安装入驻审核”'],
btnTxt:'去考试', btnTxt: '去考试',
url:'/pages/exam/start' url: '/pages/exam/start'
},{ }, {
status:3, status: 3,
statusName:'备选', statusName: '备选',
txtArr:['您已成为',"“充电桩安装备选服务商”"], txtArr: ['您已成为', "“充电桩安装备选服务商”"],
tipsArr:['后续如有业务,请留意通知!'], tipsArr: ['后续如有业务,请留意通知!'],
btnTxt:'去接单广场逛逛', btnTxt: '去接单广场逛逛',
url:'/pages/take/index' url: '/pages/take/index'
},{ }, {
status:4, status: 4,
statusName:'已驳回', statusName: '已驳回',
txtArr:['您的入驻资料已被驳回!','可重新提交资料!'], txtArr: ['您的入驻资料已被驳回!', '可重新提交资料!'],
tipsArr:['原因:','图片不够清楚'], tipsArr: ['原因:', '图片不够清楚'],
btnTxt:'重新提交', btnTxt: '重新提交',
url:'/pages/settle/file' url: '/pages/settle/file'
},{ }, {
status:8, status: 8,
statusName:'step4', statusName: 'step4',
txtArr:['您已通过','“充电桩安装入驻考试”'], txtArr: ['您已通过', '“充电桩安装入驻考试”'],
tipsArr:['可以正式签约了'], tipsArr: ['可以正式签约了'],
btnTxt:'去签约', btnTxt: '去签约',
url:'/pages/settle/sign-contract' url: '/pages/settle/sign-contract'
},{ }, {
status:[5,6], status: [5, 6],
statusName:'未支付保证金', statusName: '未支付保证金',
txtArr:['您已成为',"充电桩安装的签约服务商"], txtArr: ['您已成为', "充电桩安装的签约服务商"],
tipsArr:['请缴纳1000元质保金'], tipsArr: ['请缴纳1000元质保金'],
btnTxt:'去缴纳保证金', btnTxt: '去缴纳保证金',
url:'/pages/settle/pay-ensure' url: '/pages/settle/pay-ensure'
},{ }, {
status:7, status: 7,
statusName:'已支付保证金', statusName: '已支付保证金',
txtArr:['您已成为',"充电桩安装的正式服务商"], txtArr: ['您已成为', "充电桩安装的正式服务商"],
btnTxt:'去接单广场逛逛', btnTxt: '去接单广场逛逛',
url:'/pages/take/index' url: '/pages/take/index'
}], }],
// 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交' // 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
status:'', status: '',
info:null, info: null,
} }
}, },
computed: {
imageUrl() {
return this.status == 1 ? require('@/static/settle/chenggong@3x.png') : require(
'@/static/settle/icon-prompt@3x.png')
}
},
onLoad(e) { onLoad(e) {
// if(!this.settledInfo){ // if(!this.settledInfo){
// this.getBaseInfo() // this.getBaseInfo()
// } // }
}, },
onShow(){ onShow() {
if(!this.settledInfo){ if (!this.settledInfo) {
this.getBaseInfo() this.getBaseInfo()
} }
}, },
computed: { computed: {},
},
components: { components: {
}, },
methods: { methods: {
async getBaseInfo(){ async getBaseInfo() {
const app = getApp() const app = getApp()
const callBack = (vm,result)=>{ const callBack = (vm, result) => {
vm.settledInfo = result vm.settledInfo = result
vm.status = result.record.status vm.status = result.record.status
} }
let settledInfo = await app.getBaseInfo(this,callBack) let settledInfo = await app.getBaseInfo(this, callBack)
this.settledInfo = settledInfo this.settledInfo = settledInfo
this.status = settledInfo.record.status this.status = settledInfo.record.status
uni.hideLoading() uni.hideLoading()
this.initInfo(settledInfo.record) this.initInfo(settledInfo.record)
}, },
initInfo(record){ initInfo(record) {
if(!record){ if (!record) {
this.info = this.promptList[0] this.info = this.promptList[0]
return return
} }
const status = record.status const status = record.status
// const status = 7 // const status = 7
const infoArr = this.promptList.filter(item=>{ const infoArr = this.promptList.filter(item => {
const itemStatus = item.status const itemStatus = item.status
// console.log(itemStatus,'itemStatus') // console.log(itemStatus,'itemStatus')
let idx = -2 let idx = -2
if(Array.isArray(itemStatus)){ if (Array.isArray(itemStatus)) {
idx = itemStatus.indexOf(status) idx = itemStatus.indexOf(status)
} }
return itemStatus===status || idx>=0 return itemStatus === status || idx >= 0
}) })
const info = infoArr.length>0 && infoArr[0] const info = infoArr.length > 0 && infoArr[0]
if(!info){ if (!info) {
this.info = this.promptList[0] this.info = this.promptList[0]
return return
} }
if(status===6){ if (status === 6) {
info.tipsArr[0] = '请缴纳'+ this.settledInfo.record.deposit +'元质保金' info.tipsArr[0] = '请缴纳' + this.settledInfo.record.deposit + '元质保金'
}else if(status===4){ } else if (status === 4) {
info.tipsArr[1] = this.settledInfo.record.reason || '' info.tipsArr[1] = this.settledInfo.record.reason || ''
} }
this.info = info this.info = info
...@@ -137,51 +157,74 @@ ...@@ -137,51 +157,74 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container{ .container {
display: flex; display: flex;
width:750rpx; width: 750rpx;
// height:500rpx; // height:500rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.icon{ background-color: #F4F5F7;
margin-top:180rpx; height: 100%;
width:316rpx; position: absolute;
height:312rpx
.icon {
margin-top: 68rpx;
width: 334rpx;
height: 320rpx;
&.active {
width: 224rpx;
height: 224rpx;
}
} }
.txt-box{ .content-view {
margin-top:112rpx; background-color: #FFFFFF;
margin-bottom: 188rpx;
border-radius: 12rpx;
padding: 30rpx;
} }
.title{
.txt-box {
padding-bottom: 50rpx;
}
.title {
display: block; display: block;
font-weight: bold; font-weight: bold;
margin-top: 20rpx;
// padding: 0 30rpx; // padding: 0 30rpx;
text-align: center; text-align: center;
font-weight: bold; font-weight: bold;
line-height: 66rpx; font-size: 44rpx;
font-size: 48rpx; color: #2272FF;
color: #333;
&.active{ &.active {
color:#2272FF color: #666666;
font-size: 24rpx;
font-weight: 300rpx;
margin-top: 26rpx;
} }
} }
.tips-box{
margin-top:32rpx; .tips-box {
margin-top: 32rpx;
text-align: center; text-align: center;
} }
.tips{
.tips {
text-align: center; text-align: center;
line-height: 44rpx; line-height: 44rpx;
font-size: 32rpx; font-size: 32rpx;
color: #666; color: #666;
&.red{
color:red; &.red {
color: red;
} }
} }
.btn-submit { .btn-submit {
margin-top:112rpx; margin-top: 112rpx;
width: 600rpx; width: 600rpx;
height: 104rpx; height: 104rpx;
line-height: 104rpx; line-height: 104rpx;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="content"> <view class="content">
<view class="area-nav flex" v-if="selectType == 'area'"> <view class="area-nav flex" v-if="selectType == 'area'">
<view class="nav-left"> <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)"> @click="getareaList(areaItem.id,1,index)">
{{ areaItem.name }} {{ areaItem.name }}
</view> </view>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<!-- <i class="iconfont icon-tijiao"></i> --> <!-- <i class="iconfont icon-tijiao"></i> -->
</view> </view>
</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 class="btn-submit" @click="goBack('confirm')">
确定 确定
</button> </button>
...@@ -202,13 +202,13 @@ ...@@ -202,13 +202,13 @@
areaIds: prevVue.baseInfo.service_area, areaIds: prevVue.baseInfo.service_area,
areaTxts: prevVue.areaTxts areaTxts: prevVue.areaTxts
} }
title = '选择可服务的城市' title = '接单城市'
} else if (selectType === 'working_age') { } else if (selectType === 'working_age') {
this.selected = { this.selected = {
working_age: prevVue.baseInfo.working_age, working_age: prevVue.baseInfo.working_age,
workingAgeTxt: prevVue.workingAgeTxt workingAgeTxt: prevVue.workingAgeTxt
} }
title = '选择工作工龄' title = '电工工龄'
} }
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title title
...@@ -385,6 +385,7 @@ ...@@ -385,6 +385,7 @@
selectAge(item) { selectAge(item) {
this.selected.working_age = item.value this.selected.working_age = item.value
this.selected.workingAgeTxt = item.name this.selected.workingAgeTxt = item.name
this.goBack('confirm')
}, },
selectAllarea(idx){ selectAllarea(idx){
const allChildren = this.areaList[this.currentIndex] const allChildren = this.areaList[this.currentIndex]
...@@ -409,7 +410,10 @@ ...@@ -409,7 +410,10 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.content {
background-color: #F3F3F3;
}
.nav-item, .nav-item,
.age-item { .age-item {
position: relative; position: relative;
...@@ -474,9 +478,9 @@ ...@@ -474,9 +478,9 @@
.age-box { .age-box {
padding-top: 40rpx; padding-top: 40rpx;
height: calc(100vh - 180rpx); // height: calc(100vh - 180rpx);
overflow: auto; overflow: auto;
margin-bottom: 44rpx;
.age-item { .age-item {
position: relative; 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
src/static/settle/bachground5@3x.png

75.8 KB | W: | H:

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

105 KB | W: | H:

src/static/settle/bachground5@3x.png
src/static/settle/bachground5@3x.png
src/static/settle/bachground5@3x.png
src/static/settle/bachground5@3x.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -17,8 +17,8 @@ module.exports = { ...@@ -17,8 +17,8 @@ module.exports = {
name: name, name: name,
resolve: { resolve: {
alias: { alias: {
"@src": resolve("src"), "@": resolve("src"),
"@i": resolve("src/api"), "@api": resolve("src/api"),
"@c": resolve("src/components"), "@c": resolve("src/components"),
"@a": resolve("src/assets"), "@a": resolve("src/assets"),
"@s": resolve("src/styles"), "@s": resolve("src/styles"),
......
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