Commit 687a2976 authored by 郭晓清's avatar 郭晓清
parents 81af0cbd c8d016a0
const UNI_APP = { const UNI_APP = {
ucenterUrl: { ucenterUrl: {
apiUrl: 'http://rest-u.yunya.com', //php端域名请求头 apiUrl: 'http://rest-u.yunya.com', //php端域名请求头
xueUrl: 'http://xue.yunya.com', //学院 xueUrl: 'http://rest-xue.yunya.com', //学院
// banshou: 'https://m.banshou.com', //扳手app // banshou: 'https://m.banshou.com', //扳手app
}, },
systemUrl: { systemUrl: {
......
...@@ -10,11 +10,12 @@ ...@@ -10,11 +10,12 @@
} }
} else if (process.env.NODE_ENV === "production") { } else if (process.env.NODE_ENV === "production") {
ENV_VAR = require('./.env.prod.js'); // ENV_VAR = require('./.env.prod.js');
//ENV_VAR = require('./.env.test.js'); ENV_VAR = require('./.env.test.js');
} }
if (ENV_VAR) { if (ENV_VAR) {
process.uniEnv = {}; process.uniEnv = {};
process.uniEnv['node_env'] = NODE_ENV;
for (let key in ENV_VAR) { for (let key in ENV_VAR) {
process.uniEnv[key] = ENV_VAR[key]; process.uniEnv[key] = ENV_VAR[key];
} }
......
const UNI_APP = { const UNI_APP = {
ucenterUrl: { ucenterUrl: {
apiUrl: 'https://rest-u.banshouhui.com', //php端域名请求头 apiUrl: 'https://rest-u.banshouhui.com', //php端域名请求头
xueUrl:'https://xue.banshouhui.com', //学院 xueUrl:'https://rest-xue.banshouhui.com', //学院
banshou:'https://m.banshou.com' ,//扳手app banshou:'https://m.banshou.com' ,//扳手app
}, },
systemUrl: { systemUrl: {
......
const UNI_APP = { const UNI_APP = {
ucenterUrl: { ucenterUrl: {
apiUrl: 'https://rest-u.test.ibanshou.cn', //php端域名请求头 apiUrl: 'https://rest-u.test.ibanshou.cn', //php端域名请求头
// xueUrl: 'https://xue.banshouhui.com', //学院 xueUrl: 'https://rest-xue.test.ibanshou.cn', //学院
banshou: 'https://m.test.ibanshou.cn', //扳手app banshou: 'https://m.test.ibanshou.cn', //扳手app
}, },
systemUrl: { systemUrl: {
......
...@@ -53,7 +53,7 @@ let orderApiFun = function(vm){ ...@@ -53,7 +53,7 @@ let orderApiFun = function(vm){
/** /**
* 接单 * 接单
*/ */
let orderAccept = async (params = {},orderId) => await vm.$u.post(prefix + vm.vuex_token+'/order/'+orderId+'/accept', params); let orderAccept = async (params = {},orderId) => await vm.$u.post(prefix + vm.vuex_token+'/order/'+orderId+'/accept', params, {'content-type': 'application/x-www-form-urlencoded'});
/** /**
* 抢单 * 抢单
...@@ -88,7 +88,7 @@ let orderApiFun = function(vm){ ...@@ -88,7 +88,7 @@ let orderApiFun = function(vm){
/** /**
* 检查是否可以拒单 * 检查是否可以拒单
*/ */
let checkRejectable = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/order/'+ vm.vuex_token+'/wokerOrder/checkRejectable', params); let checkRejectable = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/'+ vm.vuex_token+'/wokerOrder/checkRejectable', params);
/** /**
* 获取签到距离 * 获取签到距离
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<view class="list u-flex u-row-between"> <view class="list u-flex u-row-between">
<image class="item-image" :src="mixingImage" v-if="item.required"></image> <image class="item-image" :src="mixingImage" v-if="item.required"></image>
<view class="u-m-r-20">{{item.fieldsTitle}}</view> <view class="u-m-r-20">{{item.fieldsTitle}}</view>
<view class="u-flex-1 location-name"> <view class="u-flex-1 location-name" @click="getLocation">
<u-icon name="map" color="#2979ff" size="30"></u-icon>自动定位 <u-icon name="map" color="#2979ff" size="30"></u-icon>自动定位
</view> </view>
</view> </view>
......
...@@ -17,10 +17,10 @@ ...@@ -17,10 +17,10 @@
<view class="address-view"> <view class="address-view">
<view class="address-left-view"> <view class="address-left-view">
<image class="address-image" :src="dizhiImage" mode="widthFix"></image> <image class="address-image" :src="dizhiImage" mode="widthFix"></image>
<text>{{orderData.contactAddress }}</text> <text>{{ formatAddress(orderData) }}</text>
</view> </view>
<view v-if="showDistance"> <view v-if="showDistance">
{{getDistance(orderData.contactAddressLatitud,orderData.contactAddressLongitud)}}km {{orderDistance}}km
</view> </view>
</view> </view>
</view> </view>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
</view> </view>
</view> </view>
<u-button class="right-btn" @click.stop="handleClick" :custom-style="buttonStyle" type="primary" <u-button class="right-btn" @click.stop="handleClick" :custom-style="buttonStyle" type="primary"
shape="circle"> shape="circle" :hover-class="buttonTextType ? 'none' : ''">
{{orderText}} {{orderText}}
</u-button> </u-button>
</view> </view>
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
currentWillOverTime: 10000, // 剩余时间 currentWillOverTime: 10000, // 剩余时间
currentOverTime: new Date().getTime() + 10000, // 超过时间点 currentOverTime: new Date().getTime() + 10000, // 超过时间点
auditDatetime: '2021.04.19 12:45:09', // 审核时间 auditDatetime: '2021.04.19 12:45:09', // 审核时间
submissionTime: '2021.04.19 16:24:48', // 提交时间 orderFinishDatetime: '2021.04.19 16:24:48', // 提交时间
auditResults: {}, // 审核结果 auditResults: {}, // 审核结果
orderBusinessType: 'R', // 业务类型 R 为抢单 orderBusinessType: 'R', // 业务类型 R 为抢单
orderId: '0', // 订单id orderId: '0', // 订单id
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
location: { // 当前坐标 location: { // 当前坐标
type: Array, type: Array,
default () { default () {
return [116.3896, 39.91917] // 经度,纬度 return [116.3896, 39.91917] // 纬度,经度
} }
} }
}, },
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
'width': '100rpx' 'width': '100rpx'
}] }]
}, },
buttonDisabled() { buttonTextType() {
return this.orderType == 4 || this.orderType == 6 return this.orderType == 4 || this.orderType == 6
}, },
dizhiImage() { dizhiImage() {
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
return this.orderType == 5 return this.orderType == 5
}, },
showDistance() { showDistance() {
return this.orderType == 0 return this.orderType == 0 && this.location.length >= 2
}, },
types() { types() {
return { return {
...@@ -208,6 +208,10 @@ ...@@ -208,6 +208,10 @@
'exception': 5, // 异常单、 'exception': 5, // 异常单、
'finish': 6, //已完工 'finish': 6, //已完工
} }
},
orderDistance() {
console.log('orderData.contactAddressLatitud:',this.orderData.contactAddressLatitud,'orderData.contactAddressLongitud',this.orderData.contactAddressLongitud, 'location:',this.location[0], this.location[1])
return this.distance(this.orderData.contactAddressLatitud,this.orderData.contactAddressLongitud, this.location[0], this.location[1])
} }
}, },
created() { created() {
...@@ -250,7 +254,7 @@ ...@@ -250,7 +254,7 @@
}, },
methods: { methods: {
handleClick() { handleClick() {
if (this.buttonDisabled) return // if (this.buttonDisabled) return
this.$emit('action') this.$emit('action')
}, },
handleClickCell() { handleClickCell() {
...@@ -265,8 +269,16 @@ ...@@ -265,8 +269,16 @@
}, 1000) }, 1000)
} }
}, },
getDistance(Latitud, Longitud) { formatAddress(order) {
return this.distance(Latitud, Longitud, this.location[0], this.location[1]) let address = ""
if(order) {
address = order.contactProvinceText || ""
address += order.contactCityText || ""
address += order.contactCommunityText || ""
address += order.contactStreetText || ""
address += order.contactAddress || ""
}
return address
}, },
/** /**
* echo distance(116.3896,39.91917,116.3940,39.91726); * echo distance(116.3896,39.91917,116.3940,39.91726);
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="wrap"> <view class="wrap">
<swiper class="swiper-box" :current="swiperCurrent" @transition="transition" <swiper class="swiper-box" :current="swiperCurrent" @transition="transition"
@animationfinish="animationfinish"> @animationfinish="animationfinish">
<swiper-item class="swiper-item"> <swiper-item class="swiper-item" v-if="currentItem.main_point && currentItem.main_point.length > 0">
<view class="inner txt-inner" :style="{'background-image':'url(/static/photo/shadow-bg.png)'}"> <view class="inner txt-inner" :style="{'background-image':'url(/static/photo/shadow-bg.png)'}">
<view class="title"> <view class="title">
拍照要求 拍照要求
......
<template>
<view class="settle-view">
<u-navbar style="position: absolute;" title="考核认证" background="{background: transparent}" :border-bottom="false"
back-icon-color="#333333" title-color="#333333"></u-navbar>
<view :class="['introduction', {'active': type}]">
<slot></slot>
</view>
<view class="settle-bottom">
<slot name="bottom"></slot>
</view>
</view>
</template>
<script>
export default {
props: {
index: {
type: Number,
default: 1
},
// 0: introduction距离底部168rpx 1: introduction距离底部0rpx
type: {
type: Number,
default: 0
}
},
data() {
return {}
},
computed: {
url() {
return process.uniEnv.qn_base_url + 'topl' + this.index + '.png'
}
}
}
</script>
<style lang="scss" scoped>
.settle-view {
::-webkit-scrollbar {
width: 0;
}
}
.introduction {
border-radius: 12rpx;
overflow: auto;
position: fixed;
top: 160rpx;
bottom: 168rpx;
left: 30rpx;
right: 30rpx;
&.active {
bottom: 0rpx;
}
}
.settle-bottom {
position: fixed;
bottom: 44rpx;
width: 100%;
}
</style>
...@@ -75,14 +75,15 @@ ...@@ -75,14 +75,15 @@
{ {
"path": "answer", "path": "answer",
"style": { "style": {
"navigationBarTitleText": "考试答题", "navigationBarTitleText": "考核认证",
"navigationStyle":"custom" "navigationStyle":"custom"
} }
}, },
{ {
"path":"result", "path":"result",
"style":{ "style":{
"navigationBarTitleText":"考试答题" "navigationBarTitleText":"",
"navigationStyle":"custom"
} }
}, },
{ {
...@@ -100,7 +101,8 @@ ...@@ -100,7 +101,8 @@
{ {
"path": "curriculum", "path": "curriculum",
"style": { "style": {
"navigationBarTitleText": "" "navigationBarTitleText": "",
"navigationStyle": "custom" // 隐藏系统导航栏
} }
}, },
{ {
...@@ -116,7 +118,16 @@ ...@@ -116,7 +118,16 @@
"path": "course-detail", "path": "course-detail",
"style": { "style": {
"navigationBarTitleText": "培训视频", "navigationBarTitleText": "培训视频",
"enablePullDownRefresh": false "enablePullDownRefresh": false,
"navigationStyle": "custom" // 隐藏系统导航栏
}
},
{
"path": "exam-pass",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom" // 隐藏系统导航栏
} }
} }
] ]
...@@ -231,7 +242,8 @@ ...@@ -231,7 +242,8 @@
"style": { "style": {
"navigationBarTitleText": "规范展示", "navigationBarTitleText": "规范展示",
"navigationBarBackgroundColor":"#FFFFFF", "navigationBarBackgroundColor":"#FFFFFF",
"backgroundColor":"#F4F5F7" "backgroundColor":"#F4F5F7",
"navigationStyle": "custom" // 隐藏系统导航栏
} }
} }
] ]
...@@ -390,7 +402,9 @@ ...@@ -390,7 +402,9 @@
{ {
"name": "完工配置", //模式名称 "name": "完工配置", //模式名称
"path": "pages/order/complete", //启动页面,必选 "path": "pages/order/complete", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到 "query": {
"id":11880091
} //启动参数,在页面的onLoad函数里面得到
}, },
{ {
"name": "资料信息", //模式名称 "name": "资料信息", //模式名称
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
data() { data() {
return { return {
status: 0, // 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',6=>'已签约',7=>'已支付保证金',8=>'已通过考试',9=>'待提交' status: 0, // 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',6=>'已签约',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
location: [116.3896, 39.91917], // 经纬度 location: [], // 经纬度
title: false, title: false,
title: "Hello", title: "Hello",
loaded: false, loaded: false,
...@@ -146,7 +146,8 @@ ...@@ -146,7 +146,8 @@
// 每次进入页面都刷新入驻状态 // 每次进入页面都刷新入驻状态
if (this.vuex_token) { if (this.vuex_token) {
this.initSettleInfo(); this.initSettleInfo();
} }
this.getLocation()
}, },
// onPullDownRefresh() { // onPullDownRefresh() {
// console.log('------下拉刷新------') // console.log('------下拉刷新------')
...@@ -365,6 +366,39 @@ ...@@ -365,6 +366,39 @@
} }
}); });
}, },
/**
* 获取当前位置的经纬度
*/
getLocation() {
let self = this
uni.getLocation({
type: 'gcj02',
success: function(res) {
self.location = [res.latitude, res.longitude]
},
complete: function(res) {
if (res.errMsg.indexOf('auth') != -1) {
uni.showModal({
title: '提示',
content: '获取权限失败,请到设置页面开启权限',
confirmText: '好的',
success(res) {
if (res.confirm) {
uni.openSetting({
success(res) {
console.log(res.authSetting)
}
});
}
}
})
}
},
fail: function(err) {
}
});
},
}, },
}; };
</script> </script>
......
This diff is collapsed.
...@@ -90,11 +90,14 @@ ...@@ -90,11 +90,14 @@
_freshing: false, _freshing: false,
}; };
}, },
onLoad() { onLoad(e) {
this._freshing = false; this._freshing = false;
this.getLocation(); // this.getLocation(); // 不需要获取位置
// this.getOrderCount(); // this.getOrderCount();
// this.getOrderList(0); // this.getOrderList(0);
if (e && e.type) {
this.current = e.type
}
}, },
onShow() { onShow() {
this.getOrderCount() this.getOrderCount()
...@@ -102,7 +105,7 @@ ...@@ -102,7 +105,7 @@
}, },
computed: { computed: {
subList() { subList() {
return ['待受理', '已完工'] return ['待处理', '已完工']
}, },
// 0:'去预约', 1:'去签到', 2:'去完工', 3:'审核中', 4:'去处理', 5'已完工' // 0:'去预约', 1:'去签到', 2:'去完工', 3:'审核中', 4:'去处理', 5'已完工'
orderType() { orderType() {
...@@ -170,8 +173,26 @@ ...@@ -170,8 +173,26 @@
dataValue.push(res.latitude) dataValue.push(res.latitude)
self.dataValue = dataValue self.dataValue = dataValue
}, },
fail(err) { complete: function(res) {
if (res.errMsg.indexOf('auth') != -1) {
uni.showModal({
title: '提示',
content: '获取权限失败,请到设置页面开启权限',
confirmText: '好的',
success(res) {
if (res.confirm) {
uni.openSetting({
success(res) {
console.log(res.authSetting)
}
});
}
}
})
}
},
fail: function(err) {
} }
}); });
}, },
......
This diff is collapsed.
...@@ -8,21 +8,21 @@ ...@@ -8,21 +8,21 @@
></u-navbar> ></u-navbar>
<view class="title">考试规则</view> <view class="title">考试规则</view>
<view class="test"> <view class="test">
<view class="slogan" <view class="slogan">
>这是一场严肃的考试,请认真查看 规则,预祝您顺利通过考试!</view 这是一场严肃的考试,请认真查看 规则,预祝您顺利通过考试!
> </view>
<view class="text"> <view class="text">
<text class="left">考试科目:</text <text class="left">考试科目:</text
><text style="color: #007aff">服务规范</text> ><text style="color: #007aff">{{ desc.title }}</text>
</view> </view>
<view class="text"> <view class="text">
<text class="left">合格条件:</text><text>60分</text> <text class="left">合格条件:</text><text>{{ desc.score }}</text>
</view> </view>
<view class="text"> <view class="text">
<text class="left">考试时间:</text><text>30分钟</text> <text class="left">考试时间:</text><text>{{ desc.time }}</text>
</view> </view>
<view class="text"> <view class="text">
<text class="left">题目来源:</text><text>系统随机20题</text> <text class="left">题目来源:</text><text>系统随机{{ desc.number }}题</text>
</view> </view>
<button @click="getUserExamId()">开始考试</button> <button @click="getUserExamId()">开始考试</button>
</view> </view>
...@@ -30,50 +30,122 @@ ...@@ -30,50 +30,122 @@
</template> </template>
<script> <script>
let condition = {
"dev": {
"id-2": {
"score": "60分",
"time": "30分钟",
"number": "20",
"title": "服务规范"
},
"id-3": {
"score": "30分",
"time": "15分钟",
"number": "10",
"title": "服务规范"
},
"id-4": {
"score": "15分",
"time": "6分钟",
"number": "4",
"title": "交付规范"
}
},
"test": {
"id-2": {
"score": "60分",
"time": "30分钟",
"number": "20",
"title": "服务规范"
},
"id-3": {
"score": "30分",
"time": "15分钟",
"number": "10",
"title": "服务规范"
},
"id-4": {
"score": "15分",
"time": "6分钟",
"number": "4",
"title": "交付规范"
}
},
"prod": {
"id-2": {
"score": "60分",
"time": "30分钟",
"number": "20",
"title": "服务规范"
},
"id-3": {
"score": "30分",
"time": "15分钟",
"number": "10",
"title": "服务规范"
},
"id-4": {
"score": "15分",
"time": "6分钟",
"number": "4",
"title": "交付规范"
}
}
};
let env = process.uniEnv.node_env;
let desc = condition[env];
export default { export default {
data() { data() {
return { return {
examId: 2, desc: null,
examId: null,
exam: null, exam: null,
userExamId: null, userExamId: null,
}; };
}, },
onLoad() { onLoad(param) {
this.examId = param.examId
this.desc = desc["id-" + this.examId]
// this.getUserExamInfo(); // this.getUserExamInfo();
}, },
methods: { methods: {
//申请考试获取userExamId //申请考试获取userExamId
getUserExamId: function () { getUserExamId: function () {
var that = this; let examId = this.examId;
console.log("这是一条消息"); wx.navigateTo({
url: "/pages/learn/answer?examId=" + examId,
});
},
getUserExamInfo() {
uni.request({ uni.request({
url: url:
"http://192.168.1.22" + process.uniEnv.systemUrl.apiUrl +
"/wxh-worker-rest/rest/exam/serviceRule/" + "/wxh-worker-rest/rest/exam/serviceRule/" +
that.vuex_token + this.vuex_token +
"?examId=" + "?examId=" +
this.examId, this.examId,
method: "POST", method: "POST",
header: { header: {
"Content-Type": "application/x-www-from-urlencoded", "Content-Type": "application/x-www-from-urlencoded",
}, },
success: (res) => { success: (res) => {
console.log("标识符1", res.data); console.log("标识符1", res.data);
uni.hideLoading(); uni.hideLoading();
if (res.data.code == 200) { if (res.data.code == 200) {
if (res.data.data.userExamId) { if (res.data.data.userExamId) {
that.userExamId = res.data.data.userExamId; this.userExamId = res.data.data.userExamId;
console.log("这个是个标识符", that.userExamId); console.log("这个是个标识符", this.userExamId);
} }
} }
}, },
}); });
setTimeout(() => { setTimeout(() => {
wx.navigateTo({ wx.navigateTo({
url: "./answer?userExamId=" + that.userExamId, url: "/pages/learn/answer?userExamId=" + this.userExamId,
}); });
}, 1000); }, 1000);
}, },
}, },
}; };
......
<template>
<view class="content">
<u-navbar
back-icon-color="#FFFFFF"
:background="background"
title-color="#fff"
:border-bottom="false"
></u-navbar>
<view class="title">考试结果</view>
<view class="test">
<view class="result">
<view class="circle">{{ score }}</view>
</view>
<view class="test-explain">
<view class="text1">
您已成功通过本次考试
</view>
<view class="text2">
通过本科目后,可进行其他科目考试
</view>
</view>
<view class="btn">
<button class="btnStyle btn2" @click="toIndex()">我知道了</button>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
text: "",
examId: 2,
result: null,
is_pass: false,
score: 0,
userExamId: null,
};
},
onLoad(a) {
this.userExamId = a.userExamId;
console.log("userExamId是", this.userExamId);
this.nextClick();
},
// onUnload() {
// wx.reLaunch({
// url: "./index",
// });
// },
methods: {
//考试结果
nextClick: function () {
console.log("wwwwwwwwww");
uni.request({
url:
process.uniEnv.systemUrl.apiUrl +
"/wxh-worker-rest/rest/exam" +
"/serviceRule/next/" +
this.vuex_token +
"?userExamId=" +
this.userExamId,
method: "POST",
header: {
"Content-Type": "application/x-www-form-urlencoded",
},
success: (res) => {
this.result = res.data.data;
this.text = res.data.data.examLevelResult;
this.score = this.result.examScore;
this.is_pass = this.result.result == '通过';
console.log("标识符55", this.result);
},
});
},
//再次考试
getAgain: function () {
wx.navigateTo({
url: "./assessment",
});
},
//下次再考跳转到学习主界面页面
toIndex: function () {
wx.reLaunch({
url: "/pages/index/learn?tabs=3",
});
// wx.navigateBack({ delta: 1 })//返回上一级页面
},
},
};
</script>
<style lang="scss">
.test {
margin: 0 30rpx;
overflow: hidden;
border-radius: 12rpx;
padding-bottom: 60rpx;
// background-image: url(../../static/photo/examination.png);
background-repeat: no-repeat;
background-size: 66%;
background-color: #fff;
background-position: right bottom;
min-height: 800rpx;
}
.content {
width: 750rpx;
height: 100vh;
overflow: auto;
background-color: #f4f5f7;
background-image: linear-gradient(to top, #f4f5f7 0%, #2272ff 50%);
background-size: 750rpx 600rpx;
background-repeat: no-repeat;
.title {
padding: 30rpx 30rpx 46rpx;
line-height: 40rpx;
font-size: 40rpx;
color: #fff;
font-weight: bold;
}
.result {
width: 320rpx;
height: 320rpx;
margin-top: 80rpx;
margin-left: 186rpx;
// color: red;
// font-size: 66rpx;
// text-align: center;
// // border:
// border-bottom: 1px dashed #000000;
// margin: 74rpx 0;
// padding: 66rpx;
background-image: linear-gradient(#47ABFF, #2272FF) ;
border-radius:50%;
text-align:center;
padding:10rpx;
font-size:28rpx;
box-sizing:border-box;
}
.result .circle{
width:100%;
height:100%;
background:#fff;
border-radius:50%;
font-size: 120rpx;
color: #2272FF;
text-align: center;
padding-top: 20%;
}
.test-explain {
margin-top: 80rpx;
margin-left: 84rpx;
margin-right: 84rpx;
text-align: center;
.text1 {
font-size: 40rpx;
font-weight: bold;
color: #2272FF;
}
.text2 {
font-size: 24rpx;
color: #666666;
margin-top: 30rpx;
}
}
.btn {
margin-top: 100rpx;
display: flex;
font-size: 32rpx;
font-weight: bold;
.btnStyle {
width: 600rpx;
height: 104rpx;
background-color: #ffffff;
color: #2272FF;
line-height: 90rpx;
margin: 20rpx auto;
border: 2rpx solid #2272FF;
border-radius: 52rpx;
}
.btn2 {
background-color: #2272FF;
color: #ffffff;
}
}
}
</style>
This diff is collapsed.
...@@ -2,11 +2,10 @@ ...@@ -2,11 +2,10 @@
<view> <view>
<view class="title"> <view class="title">
{{newsInfo.title}} {{newsInfo.title}}
</view> </view>
<view class="content" v-html="newsInfo.body"> <view class="u-content">
<button @click="add">aaa</button> <u-parse :html="newsInfo.body" :tag-style="style"></u-parse>
{{newsInfo.body}} </view>
</view>
</view> </view>
</template> </template>
...@@ -18,7 +17,10 @@ ...@@ -18,7 +17,10 @@
obj:{ obj:{
}, },
newsInfo:null newsInfo: {
title: '',
body: ''
}
} }
}, },
methods: { methods: {
...@@ -28,11 +30,10 @@ ...@@ -28,11 +30,10 @@
}, },
onShow(){ onShow(){
uni.$on('news',(news)=>{ uni.$on('news',(news)=>{
this.newsInfo = news; this.newsInfo = news;
console.log(news,'news') console.log(news,'news')
}) })
}, },
onLoad() { onLoad() {
this.$u.mpShare.path = '' this.$u.mpShare.path = ''
...@@ -41,11 +42,17 @@ ...@@ -41,11 +42,17 @@
</script> </script>
<style> <style>
.title{ .title{
text-align: center; font-size: 32rpx;
margin: 34rpx; font-weight: bold;
margin-left: 30rpx;
margin-top: 30rpx;
} }
.content{ .content{
padding: 38rpx; font-size: 24rpx;
line-height: 36rpx;
color: #666666;
margin-left: 30rpx;
margin-top: 30rpx;
} }
</style> </style>
<template> <template>
<view class="test-result"> <view class="content">
<text class="title">考试结果</text> <u-navbar
<view class="result"> {{ text }} </view> back-icon-color="#FFFFFF"
<view class="test-explain"> :background="background"
<view class="hang"> title-color="#fff"
<text class="text1">合格条件:</text :border-bottom="false"
><text class="text2">答对20题</text> ></u-navbar>
<!-- <u-navbar style="position: absolute;" background="{background: transparent}" :border-bottom="false"
back-icon-color="#ffffff" title-color="#ffffff"></u-navbar> -->
<view class="title">考试成绩</view>
<view class="test">
<view class="result">
<view class="circle">{{ score }}</view>
</view> </view>
<view class="hang"> <view class="test-explain">
<text class="text1">考试结果:</text <view class="text1">
><text class="text2">答对10题</text> 很遗憾,您未能通过本次考试
</view>
<view class="text2">
您可点击再考一次重新进行考试
</view>
</view> </view>
<view class="hang"> <view class="btn">
<text class="text1">考试用时:</text <button class="btnStyle" @click="getAgain()">再答一次</button>
><text class="text2">16分29秒</text> <button class="btnStyle btn2" @click="toIndex()">我知道了</button>
</view> </view>
</view> </view>
<view class="btn">
<button class="btn1" @click="getAgain()">再答一次</button>
<button class="btn2" @click="toIndex">下次再考</button>
</view>
</view> </view>
</template> </template>
...@@ -30,6 +38,7 @@ export default { ...@@ -30,6 +38,7 @@ export default {
text: "", text: "",
examId: 2, examId: 2,
result: null, result: null,
score: 0,
userExamId: null, userExamId: null,
}; };
}, },
...@@ -38,18 +47,18 @@ export default { ...@@ -38,18 +47,18 @@ export default {
console.log("userExamId是", this.userExamId); console.log("userExamId是", this.userExamId);
this.nextClick(); this.nextClick();
}, },
onUnload() { // onUnload() {
wx.reLaunch({ // wx.reLaunch({
url: "./index", // url: "./index",
}); // });
}, // },
methods: { methods: {
//考试结果 //考试结果
nextClick: function () { nextClick: function () {
console.log("wwwwwwwwww"); console.log("wwwwwwwwww");
uni.request({ uni.request({
url: url:
"http://192.168.1.22" + process.uniEnv.systemUrl.apiUrl +
"/wxh-worker-rest/rest/exam" + "/wxh-worker-rest/rest/exam" +
"/serviceRule/next/" + "/serviceRule/next/" +
this.vuex_token + this.vuex_token +
...@@ -63,73 +72,127 @@ export default { ...@@ -63,73 +72,127 @@ export default {
success: (res) => { success: (res) => {
this.result = res.data.data; this.result = res.data.data;
this.text = res.data.data.examLevelResult; this.text = res.data.data.examLevelResult;
this.score = this.result.examScore;
console.log("标识符55", this.result); console.log("标识符55", this.result);
}, },
}); });
}, },
//再次考试 //再次考试
getAgain: function () { getAgain: function () {
let examId = this.examId;
wx.navigateTo({ wx.navigateTo({
url: "./assessment", url: "/pages/learn/assessment?examId=" + examId,
}); });
}, },
//下次再考跳转到学习主界面页面 //下次再考跳转到学习主界面页面
toIndex: function () { toIndex: function () {
wx.reLaunch({ wx.reLaunch({
url: "./index", url: "/pages/index/learn?tabs=3",
}); });
// wx.navigateBack({ delta: 1 })//返回上一级页面
}, },
}, },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.test-result { .test {
width: 610rpx; margin: 0 30rpx;
height: 965rpx; overflow: hidden;
margin: 70rpx auto 0; border-radius: 12rpx;
padding-bottom: 60rpx;
// background-image: url(../../static/photo/examination.png);
background-repeat: no-repeat;
background-size: 66%;
background-color: #fff;
background-position: right bottom;
min-height: 800rpx;
}
.content {
width: 750rpx;
height: 100vh;
overflow: auto;
background-color: #f4f5f7;
background-image: linear-gradient(to top, #f4f5f7 0%, #2272ff 50%);
background-size: 750rpx 600rpx;
background-repeat: no-repeat;
.title { .title {
margin: 0 44rpx 0; padding: 30rpx 30rpx 46rpx;
line-height: 40rpx;
font-size: 40rpx;
color: #fff;
font-weight: bold;
} }
.result { .result {
color: red; width: 320rpx;
font-size: 66rpx; height: 320rpx;
text-align: center; margin-top: 80rpx;
border-bottom: 1px dashed #000000; margin-left: 186rpx;
margin: 74rpx 0; // color: red;
padding: 66rpx; // font-size: 66rpx;
// text-align: center;
// // border:
// border-bottom: 1px dashed #000000;
// margin: 74rpx 0;
// padding: 66rpx;
background-image: linear-gradient(#FF930D, #FA5A49) ;
border-radius:50%;
text-align:center;
padding:10rpx;
font-size:28rpx;
box-sizing:border-box;
}
.result .circle{
width:100%;
height:100%;
background:#fff;
border-radius:50%;
font-size: 120rpx;
color: #FA5A49;
text-align: center;
padding-top: 20%;
} }
.test-explain { .test-explain {
.hang { margin-top: 80rpx;
margin: 26rpx 26rpx; margin-left: 84rpx;
.text1 { margin-right: 84rpx;
color: #a69999; text-align: center;
margin-right: 22rpx; .text1 {
} font-size: 40rpx;
.text2 { font-weight: bold;
color: #333333; color: #FA5A49;
} }
.text2 {
font-size: 24rpx;
color: #666666;
margin-top: 30rpx;
} }
} }
.btn { .btn {
margin-top: 236rpx; margin-top: 100rpx;
.btn1 { display: flex;
width: 478rpx; font-size: 32rpx;
height: 60rpx; font-weight: bold;
background: #0079fe; .btnStyle {
color: #fff; width: 300rpx;
font-size: 26rpx; height: 104rpx;
line-height: 60rpx; background-color: #ffffff;
color: #2272FF;
line-height: 90rpx;
margin: 20rpx auto; margin: 20rpx auto;
border: 2rpx solid #2272FF;
border-radius: 52rpx;
} }
.btn2 { .btn2 {
width: 478rpx; background-color: #2272FF;
height: 60rpx; color: #ffffff;
background: #f2f2f2;
color: #333333;
font-size: 26rpx;
line-height: 60rpx;
margin: 0 auto;
} }
} }
} }
......
...@@ -9,20 +9,20 @@ ...@@ -9,20 +9,20 @@
<view class="item-content"> <view class="item-content">
<view class="item-st"> <view class="item-st">
<image style="width: 80rpx; height: 36rpx" :src="kcImage"></image> <image style="width: 80rpx; height: 36rpx" :src="kcImage"></image>
<text class="item-st-text">5课时</text> <text class="item-st-text">{{ courseTotal }}课时</text>
</view> </view>
<view class="item-title">服务规范</view> <view class="item-title">{{ courseTitle }}</view>
</view> </view>
<view>接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。</view> <view>{{ courseDesc }}</view>
</view> </view>
<view class="learn-view" v-if="courseId >= 0"> <view class="learn-view" v-if="courseId >= 0">
<view class="learn-view-title">课程讲师</view> <view class="learn-view-title color-teacher">课程讲师</view>
<view class="" style="padding-top: 30rpx;display: flex;padding-left: 30rpx;"> <view class="" style="padding-top: 30rpx;display: flex;padding-left: 30rpx;">
<u-avatar :style="{'width':'100rpx', 'height':'100rpx'}" :src="teacher.avatar" mode="circle"></u-avatar> <u-avatar :style="{'width':'100rpx', 'height':'100rpx'}" :src="teacherImage" mode="circle"></u-avatar>
<view style="height:120rpx;font-size: 30rpx;padding-left:30rpx;"> <view style="height:120rpx;font-size: 30rpx;padding-left:30rpx;">
<view class="" style="display: flex;font-size: 32rpx;"> <view class="" style="display: flex;font-size: 32rpx;">
<view class="" style="font-size: 32rpx;font-weight: bold;">{{ teacher.name }}</view> <view class="" style="font-size: 32rpx;font-weight: bold;">{{ teacher.name }}</view>
<view class="" style="font-size: 24rpx;margin-left: 30rpx;margin-top: 6rpx;">课程讲师</view> <view class="" style="font-size: 24rpx;margin-left: 30rpx;margin-top: 6rpx;color: #999999;">课程讲师</view>
</view> </view>
<view class="" style="font-size: 24rpx;margin-top: 30rpx;">反正这里就是放老师的简介,只是写啥我也不知道,反正就是写很厉害的简介啦</view> <view class="" style="font-size: 24rpx;margin-top: 30rpx;">反正这里就是放老师的简介,只是写啥我也不知道,反正就是写很厉害的简介啦</view>
</view> </view>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<view class="learn-view-title">目录</view> <view class="learn-view-title">目录</view>
<view class="" style="display: flex;overflow: auto;padding-top: 30rpx;padding-bottom: 30rpx;"> <view class="" style="display: flex;overflow: auto;padding-top: 30rpx;padding-bottom: 30rpx;">
<view v-for="(item, index) in list" :key="index"> <view v-for="(item, index) in list" :key="index">
<view @click="goNext(item.id)" class="list-cell list-default" :class="{'list-default-active': item.isActive}" style="width:280rpx;height:150rpx;margin-left: 20rpx;padding: 20rpx;border-radius: 12rpx;"> <view @click="goNext(item)" class="list-cell list-default" :class="{'list-default-active': item.isActive}" style="width:280rpx;height:150rpx;margin-left: 20rpx;padding: 20rpx;border-radius: 12rpx;">
<view class="" style="font-size: 24rpx;">{{ item.title }}</view> <view class="" style="font-size: 24rpx;">{{ item.title }}</view>
<view class="" style="font-size: 26rpx;margin-top: 16rpx;"> <view class="" style="font-size: 26rpx;margin-top: 16rpx;">
{{ item.intro }} {{ item.intro }}
...@@ -59,21 +59,24 @@ ...@@ -59,21 +59,24 @@
export default { export default {
data() { data() {
return { return {
teacherImage: process.uniEnv.qn_base_url + "avatar.gif",
courseId: "", courseId: "",
courseStatus: 0, courseStatus: 0,
courseSrc: "", courseSrc: "",
courseTitle: "", courseTitle: "",
courseDesc: "", courseDesc: "",
courseTotal: null,
currentIndex: -1, // 第几个视频 currentIndex: -1, // 第几个视频
section_id: 0, section_id: 0,
active_section_id: 0,
isShowVideo: false, isShowVideo: false,
CourseSectionlist: {name: '', content: ''}, //节信息 CourseSectionlist: {name: '', content: ''}, //节信息
list: [ list: [
{'title': '第一节', 'intro': '考核规则1:接单及 时率', 'isActive': true, "id": 288}, {'title': '第1节', 'intro': '考核规则1:接单及 时率', 'isActive': true, "id": null},
{'title': '第二节', 'intro': '考核规则1:接单及 时率', 'isActive': false, "id": 288}, {'title': '第2节', 'intro': '考核规则1:接单及 时率', 'isActive': false, "id": null},
{'title': '第三节', 'intro': '考核规则1:接单及 时率', 'isActive': false, "id": 288}, {'title': '第3节', 'intro': '考核规则1:接单及 时率', 'isActive': false, "id": null},
{'title': '第四节', 'intro': '考核规则1:接单及 时率', 'isActive': false, "id": 288}, {'title': '第4节', 'intro': '考核规则1:接单及 时率', 'isActive': false, "id": null},
{'title': '第五节', 'intro': '考核规则1:接单及 时率', 'isActive':false, "id": 288}, {'title': '第5节', 'intro': '考核规则1:接单及 时率', 'isActive':false, "id": null},
], ],
teacher: { teacher: {
name: "", name: "",
...@@ -97,7 +100,7 @@ ...@@ -97,7 +100,7 @@
} }
}, },
params:{ params:{
course_id:173, course_id:null,
}, },
gklog: '', gklog: '',
videoTotalTime: 0, videoTotalTime: 0,
...@@ -137,6 +140,8 @@ ...@@ -137,6 +140,8 @@
}, },
}, },
onLoad(e) { onLoad(e) {
this.active_section_id = e.section_id;
this.params.course_id = e.course_id;
this.getCourseSection({ this.getCourseSection({
section_id: e.section_id section_id: e.section_id
}) })
...@@ -148,9 +153,9 @@ ...@@ -148,9 +153,9 @@
// #endif // #endif
}, },
methods: { methods: {
goNext(id){ goNext(info){
uni.navigateTo({ uni.navigateTo({
url: "./section?section_id=" + id, url: "./section?section_id=" + info.id + "&course_id=" + info.course_id
}); });
}, },
onPlayerTimeupdate(player) { onPlayerTimeupdate(player) {
...@@ -197,7 +202,7 @@ ...@@ -197,7 +202,7 @@
let wareVal = this.CourseSectionlist.ware; let wareVal = this.CourseSectionlist.ware;
this.isShowVideo = wareVal == "0"; this.isShowVideo = wareVal == "0";
this.courseTitle = res.data.name; this.courseTitle = res.data.name;
this.courseDesc = res.data.content; this.courseDesc = res.data.content.replace(/<p.*?>|<\/p>/ig, "");
this.section_id = res.data.id; this.section_id = res.data.id;
this.section_content = res.data.content; this.section_content = res.data.content;
this.teacher.name = res.data.teachers[0].name; this.teacher.name = res.data.teachers[0].name;
...@@ -277,9 +282,16 @@ ...@@ -277,9 +282,16 @@
.then((res) => { .then((res) => {
if (res.code == 200) { if (res.code == 200) {
if (res.data) { if (res.data) {
// debugger this.list = res.data[0].section;
// this.list = this.list.concat(res.data); this.courseTotal = this.list.length;
// console.log(this.list) let length = this.list.length;
for(let i = 0; i < length; i++){
this.list[i].title = "第" + (i + 1) + "节";
this.list[i].intro = this.list[i].name;
this.list[i].isActive = this.active_section_id == this.list[i].id ? true : false;
}
console.log('--select-list--')
console.log(this.list)
} }
} else { } else {
//接口请求失败的处理 //接口请求失败的处理
...@@ -443,4 +455,8 @@ ...@@ -443,4 +455,8 @@
border: 2rpx solid #2272FF; border: 2rpx solid #2272FF;
box-sizing: border-box; box-sizing: border-box;
} }
.color-teacher {
color: #999999;
}
</style> </style>
...@@ -162,7 +162,7 @@ export default { ...@@ -162,7 +162,7 @@ export default {
if(index) { if(index) {
let prevPage = pages[index]; //上一个页面 let prevPage = pages[index]; //上一个页面
if(prevPage.route == "pages/login/index") { if(prevPage.route == "pages/login/index") {
uni.navigateTo({ uni.redirectTo({
url:'pages/index/index' url:'pages/index/index'
}) })
} else { } else {
...@@ -174,12 +174,12 @@ export default { ...@@ -174,12 +174,12 @@ export default {
}) })
} }
} else { } else {
uni.navigateTo({ uni.redirectTo({
url:'pages/index/index' url:'pages/index/index'
}) })
} }
} else { } else {
uni.navigateTo({ uni.reLaunch({
url: "pages/index/mine" url: "pages/index/mine"
}) })
} }
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
<u-navbar :background="{background: '#2272FF'}" back-icon-color="#fff" :title-size="32" title-color="#fff" :border-bottom="false" title="完工信息"></u-navbar> <u-navbar :background="{background: '#2272FF'}" back-icon-color="#fff" :title-size="32" title-color="#fff" :border-bottom="false" title="完工信息"></u-navbar>
<u-tabs-swiper class="order-tabs" ref="tabs" :current="tabIndex" name="panelName" :list="list" @change="tabsChange" :is-scroll="false" bg-color="#2272FF" inactive-color="#a6c6ff" active-color="#fff" height="80" font-size="32"></u-tabs-swiper> <u-tabs-swiper class="order-tabs" ref="tabs" :current="tabIndex" name="panelName" :list="list" @change="tabsChange" :is-scroll="false" bg-color="#2272FF" inactive-color="#a6c6ff" active-color="#fff" height="80" font-size="32"></u-tabs-swiper>
<view class="u-menu-wrap"> <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" v-if="list[tabIndex].items.length > 1"> <view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop" :scroll-into-view="itemId" v-if="list[tabIndex].items.length > 1">
<view v-for="(item,index) in list[tabIndex].items" :key="index" class="u-tab-item" <view v-for="(item,index) in list[tabIndex].items" :key="index" class="u-tab-item"
:class="[current == index ? 'u-tab-item-active' : '']" @tap.stop="swichMenu(index)"> :class="[current == index ? 'u-tab-item-active' : '']" @tap.stop="swichMenu(index)">
<text class="u-line-1">{{item.name}}</text> <text class="u-line-1">{{item.name}}</text>
</view> </view>
</scroll-view> </view>
<scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box" @scroll="rightScroll"> <view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box" @scroll="rightScroll">
<u-form :model="form" ref="uForm"> <u-form :model="form" ref="uForm">
<template v-for="(groupItem, groupIndex) in (list.length>0?list[tabIndex].items:[])"> <template v-for="(groupItem, groupIndex) in (list.length>0?list[tabIndex].items:[])">
<view class="class-item" :key="groupIndex"> <view class="class-item" :key="groupIndex">
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
</view> </view>
</template> </template>
</u-form> </u-form>
</scroll-view> </view>
</view> </view>
<view :class="['btn-wrap', 'flex-xc', {'btn-bottom': tabIndex > 0}]"> <view :class="['btn-wrap', 'flex-xc', {'btn-bottom': tabIndex > 0}]">
<u-button class="btn-submit" @click="saveComplete" <u-button class="btn-submit" @click="saveComplete"
...@@ -189,8 +189,8 @@ ...@@ -189,8 +189,8 @@
this.orderServiceType = decodeURIComponent(option.orderServiceType) this.orderServiceType = decodeURIComponent(option.orderServiceType)
this.inGuaranteePeriod = option.inGuaranteePeriod this.inGuaranteePeriod = option.inGuaranteePeriod
} else { } else {
this.orderId = 9708719 this.orderId = 11880091
this.categoryId = 88 this.categoryId = 1100000214
this.orderServiceType = '安装' this.orderServiceType = '安装'
this.inGuaranteePeriod = 'Y' this.inGuaranteePeriod = 'Y'
} }
...@@ -263,7 +263,15 @@ ...@@ -263,7 +263,15 @@
} }
}) })
}) })
}) })
if (!param.base[0].fieldsValue) {
return this.$refs.uToast.show({
title: '请先选择产品规格',
type: 'error',
})
}
self.$u.api.saveCompleteData(param,self.orderId).then((res)=>{ self.$u.api.saveCompleteData(param,self.orderId).then((res)=>{
if (res.code == 200) { if (res.code == 200) {
this.$refs.uToast.show({ this.$refs.uToast.show({
...@@ -312,8 +320,8 @@ ...@@ -312,8 +320,8 @@
return pass return pass
}, },
confirm(){// 检查结果窗口 确认回调 confirm(){// 检查结果窗口 确认回调
uni.switchTab({ uni.reLaunch({
url: '/pages/index/order' url: '/pages/index/order?type=3'
}) })
}, },
closeCheckResult(){// 检查结果窗口取消回调 closeCheckResult(){// 检查结果窗口取消回调
...@@ -382,7 +390,9 @@ ...@@ -382,7 +390,9 @@
nextStep() { nextStep() {
if (this.tabIndex < this.list.length - 1) { if (this.tabIndex < this.list.length - 1) {
this.tabIndex++ this.tabIndex++
this.arr = [] this.arr = []
this.scrollRightTop = 0
this.leftMenuStatus(0)
this.$nextTick(function() { this.$nextTick(function() {
this.getMenuItemTop() this.getMenuItemTop()
}) })
...@@ -394,8 +404,6 @@ ...@@ -394,8 +404,6 @@
type = type.toLocaleLowerCase() type = type.toLocaleLowerCase()
switch (type) { switch (type) {
case 'text': case 'text':
formType = 'input'
break
case 'password': case 'password':
case 'textarea': case 'textarea':
case 'number': case 'number':
...@@ -451,7 +459,7 @@ ...@@ -451,7 +459,7 @@
this.scrollRightTop = this.oldScrollTop; this.scrollRightTop = this.oldScrollTop;
this.$nextTick(function() { this.$nextTick(function() {
this.scrollRightTop = this.arr[index]; this.scrollRightTop = this.arr[index];
this.current = index; this.current = index;
this.leftMenuStatus(index); this.leftMenuStatus(index);
}) })
}, },
...@@ -648,7 +656,8 @@ ...@@ -648,7 +656,8 @@
.u-tab-view { .u-tab-view {
width: 200rpx; width: 200rpx;
height: 100%; height: 100%;
border: 4rpx solid #F4F5F7; border: 4rpx solid #F4F5F7;
overflow: auto;
} }
.u-tab-item { .u-tab-item {
...@@ -685,7 +694,9 @@ ...@@ -685,7 +694,9 @@
.right-box { .right-box {
// background-color: rgb(250, 250, 250); // background-color: rgb(250, 250, 250);
background-color: #FFFFFF; background-color: #FFFFFF;
overflow: auto;
width: 100%;
} }
.page-view { .page-view {
......
...@@ -32,9 +32,9 @@ ...@@ -32,9 +32,9 @@
<view class="between-cell address-cell"> <view class="between-cell address-cell">
<view class="left"> <view class="left">
<u-icon name="map" size="28"></u-icon> <u-icon name="map" size="28"></u-icon>
<text class="address-txt">{{ order.contactAddress }}</text> <text class="address-txt">{{ formatAddress }}</text>
</view> </view>
<u-image width="48rpx" height="48rpx" :src="navigationIcon" @click="openLocation"></u-image> <u-image width="48rpx" height="48rpx" :src="navigationIcon" @click="openLocation(order.contactAddress)"></u-image>
</view> </view>
<!-- <u-read-more ref="uReadMore" :show-height="40" :shadowStyle="{paddingTop: '0rpx',marginTop: '0rpx'}" close-text="查看更多" open-text="点击收起" toggle color="#2272FF" font-size="26"> --> <!-- <u-read-more ref="uReadMore" :show-height="40" :shadowStyle="{paddingTop: '0rpx',marginTop: '0rpx'}" close-text="查看更多" open-text="点击收起" toggle color="#2272FF" font-size="26"> -->
<view v-if="readMore" @click="readMore = false" class="read-more-toggle"> <view v-if="readMore" @click="readMore = false" class="read-more-toggle">
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
<!-- 过程反馈 --> <!-- 过程反馈 -->
<view class="left"> <view class="left">
<view v-if="allowFeedback" @click="clickFeedback" class="button"> <view v-if="allowFeedback" @click="clickFeedback" class="button">
<text>过程反馈</text> <text>反馈</text>
</view> </view>
</view> </view>
<!--接单,抢单,已被抢, 预约 ,签到 ,去完工 timestampDiff(order.currentOverTime)>0 --> <!--接单,抢单,已被抢, 预约 ,签到 ,去完工 timestampDiff(order.currentOverTime)>0 -->
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
<!-- 异常预约 ,现场拍照 这里是调用拍照的两个组件--> <!-- 异常预约 ,现场拍照 这里是调用拍照的两个组件-->
<view class="right"> <view class="right">
<view v-if="errorSignIn || scenePhoto" @click="$u.debounce(handleClickRight, 500)" :class="['button', {'active': scenePhoto}]"> <view v-if="errorSignIn || scenePhoto" @click="$u.debounce(handleClickRight, 500)" :class="['button', {'active': scenePhoto}]">
<text>{{errorSignIn ? '异常签到' : '现场拍照'}}</text> <text>{{errorSignIn ? '异常签到' : '拍照'}}</text>
</view> </view>
</view> </view>
...@@ -265,10 +265,22 @@ ...@@ -265,10 +265,22 @@
} else { } else {
return this.orderRecords return this.orderRecords
} }
} },
formatAddress() {
let self = this
let address = ""
if(self.order) {
address = self.order.contactProvinceText || ""
address += self.order.contactCityText || ""
address += self.order.contactCommunityText || ""
address += self.order.contactStreetText || ""
address += self.order.contactAddress || ""
}
return address
},
}, },
methods: { methods: {
openLocation(){ openLocation(address){
if(this.isAllowDianhuaAndDaohang){ if(this.isAllowDianhuaAndDaohang){
uni.getLocation({ uni.getLocation({
type: 'gcj02', //返回可以用于uni.openLocation的经纬度 type: 'gcj02', //返回可以用于uni.openLocation的经纬度
...@@ -281,7 +293,35 @@ ...@@ -281,7 +293,35 @@
success: function () { success: function () {
console.log('success'); console.log('success');
} }
}); });
},
complete: function(res) {
console.log('-------complete-----', res)
if (res.errMsg.indexOf('auth') != -1) {
uni.showModal({
title: '提示',
content: '获取权限失败,请到设置页面开启权限',
confirmText: '好的',
success(res) {
if (res.confirm) {
uni.openSetting({
success(res) {
console.log(res.authSetting)
}
});
}
}
})
} else {
uni.setClipboardData({
data: address,
success: function () {
console.log('success');
}
});
}
} }
}); });
} }
...@@ -346,7 +386,7 @@ ...@@ -346,7 +386,7 @@
self.order = res.data self.order = res.data
this.getCurrentBtn() this.getCurrentBtn()
var nowTime = new Date(); var nowTime = new Date();
if(nowTime.getTime() > this.order.currentOverTime){ if(this.showTimeOut && this.order.currentOverTime && nowTime.getTime() > this.order.currentOverTime){
this.btnClass='timeOut-btn' this.btnClass='timeOut-btn'
} }
if(self.order.isFirstOrder){ if(self.order.isFirstOrder){
...@@ -416,7 +456,7 @@ ...@@ -416,7 +456,7 @@
} }
}, },
dateChange(data){ dateChange(data){
this.loadTimerange() // this.loadTimerange()
// 点击日期选择 // 点击日期选择
console.log(data,'dateChange') console.log(data,'dateChange')
let self = this let self = this
...@@ -602,8 +642,8 @@ ...@@ -602,8 +642,8 @@
// 检查是否可以拒单 // 检查是否可以拒单
var data={} var data={}
this.$u.api.checkRejectable(data).then(res => { this.$u.api.checkRejectable(data).then(res => {
if (res.data.code === 200 ) { if (res.code === 200 ) {
if( res.data.data === true){ if( res.data === true){
uni.navigateTo({ uni.navigateTo({
url: 'pages/order/refuse?orderId='+this.order.orderId url: 'pages/order/refuse?orderId='+this.order.orderId
}) })
...@@ -796,6 +836,9 @@ ...@@ -796,6 +836,9 @@
line-height: 24rpx; line-height: 24rpx;
margin-top: 20rpx; margin-top: 20rpx;
margin-bottom: 40rpx; margin-bottom: 40rpx;
display: flex;
justify-content: space-between;
align-items: center;
.left { .left {
.address-txt { .address-txt {
margin-left: 8rpx; margin-left: 8rpx;
......
<template> <template>
<view class="backView"> <view class="backView">
<u-navbar :title-size="32" title-color="#000" :border-bottom="false" :title="title"></u-navbar>
<u-loading style="position: fixed;top: 50%;" :show="loading" size="36" mode="flower"></u-loading> <u-loading style="position: fixed;top: 50%;" :show="loading" size="36" mode="flower"></u-loading>
<view class="topView"> <view class="topView">
<view :class="['topItemView', {'active':activeTop===ikey}]" @click="handleTopItemChange(ikey,item)" <view :class="['topItemView', {'active':activeTop===ikey}]" @click="handleTopItemChange(ikey,item)"
...@@ -74,7 +75,8 @@ ...@@ -74,7 +75,8 @@
dataList: [], dataList: [],
loading: true, loading: true,
isPopShow: false, isPopShow: false,
userWatermark:{} userWatermark:{},
title: '规范展示'
} }
}, },
onLoad(e) { onLoad(e) {
...@@ -84,9 +86,7 @@ ...@@ -84,9 +86,7 @@
} }
if (e && e.brand) { if (e && e.brand) {
this.brand = decodeURIComponent(e.brand) this.brand = decodeURIComponent(e.brand)
uni.setNavigationBarTitle({ this.title = this.brand
title: this.brand
});
} }
if (e && e.orderId) { if (e && e.orderId) {
...@@ -351,7 +351,6 @@ ...@@ -351,7 +351,6 @@
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding-top: 100rpx;
padding-bottom: 50rpx; padding-bottom: 50rpx;
} }
......
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
v-for="(txt,index) in info.tipsArr" :key="index">{{txt}}</text> v-for="(txt,index) in info.tipsArr" :key="index">{{txt}}</text>
</view> </view>
<view class="services-view"> <view class="services-view">
<view v-if="[1, 2, 3, 4].indexOf(status) != -1"> <view v-if="[1, 2, 3, 4, 7].indexOf(status) != -1">
<image class="service-info-image" :src="erweimaImage"></image> <image class="service-info-image" :src="erweimaImage" @longtap="saveQrcode"></image>
<view class="content-info-tip">长按二维码添加官方客服微信</view> <view class="content-info-tip">长按二维码保存图片,添加官方客服微信</view>
<view class="content-info-tip">及时了解审核进度</view> <view class="content-info-tip">及时了解审核进度</view>
</view> </view>
</view> </view>
...@@ -183,6 +183,25 @@ ...@@ -183,6 +183,25 @@
} }
this.info = info this.info = info
}, },
saveQrcode() {
let that = this;
uni.downloadFile({ //获得二维码的临时地址
url: that.erweimaImage,
success:(res)=>{
if(res.statusCode == 200){
uni.saveImageToPhotosAlbum({
filePath:res.tempFilePath,//传入临时地址
success() {
that.$u.toast('保存成功!');
},
fail() {
that.$u.toast('保存失败!');
}
})
}
}
})
},
goPage() { goPage() {
const url = this.info.url const url = this.info.url
if (this.status == 1 || this.status == 3 || this.status == 7) { if (this.status == 1 || this.status == 3 || this.status == 7) {
......
src/static/photo/jianbian@3x.png

21.9 KB | W: | H:

src/static/photo/jianbian@3x.png

7.64 KB | W: | H:

src/static/photo/jianbian@3x.png
src/static/photo/jianbian@3x.png
src/static/photo/jianbian@3x.png
src/static/photo/jianbian@3x.png
  • 2-up
  • Swipe
  • Onion skin
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