Commit e7ec7028 authored by Damon's avatar Damon
parents 2581c2ae 9578e392
...@@ -5,8 +5,8 @@ const UNI_APP = { ...@@ -5,8 +5,8 @@ const UNI_APP = {
// banshou: 'https://m.banshou.com', //扳手app // banshou: 'https://m.banshou.com', //扳手app
}, },
systemUrl: { systemUrl: {
// apiUrl: 'http://192.168.1.22', //java端域名请求头 apiUrl: 'http://192.168.1.22', //java端域名请求头
apiUrl: 'http://apidoc.banshouhui.com:3000/mock/31', // mock端域名请求头 // apiUrl: 'http://apidoc.banshouhui.com:3000/mock/31', // mock端域名请求头
}, },
qn_base_url: 'https://qn-static.banshouhui.com/self-support/' qn_base_url: 'https://qn-static.banshouhui.com/self-support/'
} }
......
# self-support # self-support
## Project setup ### 项目设置
``` ```
npm install -g mirror-config-china --registry=http://registry.npm.taobao.org npm install -g mirror-config-china --registry=http://registry.npm.taobao.org
npm install npm install
``` ```
### Compiles and hot-reloads for development
```
### 开发环境编译和热重装
```bash
npm run dev:mp-weixin // 运行dev环境 npm run dev:mp-weixin // 运行dev环境
``` ```
### Compiles and minifies for production
```
### 生产环境编译和压缩
```bash
npm run build:mp-weixin // 运行生产环境 npm run build:mp-weixin // 运行生产环境
``` ```
### 公共组件: ### 公共组件:
[图片上传参考](https://ext.dcloud.net.cn/plugin?id=822) [图片上传参考](https://ext.dcloud.net.cn/plugin?id=822)
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
### 自定义配置
查看 [配置参考](https://cli.vuejs.org/config/)
### Easycom [组件模式](https://uniapp.dcloud.io/collocation/pages?id=easycom)
只要组件安装在项目的components目录下,并符合components/组件名称/组件名称.vue目录结构。就可以不用引用、注册,直接在页面中使用
### Mock接口使用
1. 项目根目录下找到 *.env.js* 文件,查看参数:NODE_ENV值
2. 找到对应NODE_ENV值的 .env文件,如:.env.dev.js
3. 添加mock请求头,注释真实请求头,参考下面例子:
```js
const UNI_APP = {
ucenterUrl: {
apiUrl: 'http://192.168.1.46', //php端域名请求头
xueUrl: 'http://192.168.1.46:8088', //学院
// banshou: 'https://m.banshou.com', //扳手app
},
systemUrl: {
// apiUrl: 'http://192.168.1.22', //java端域名请求头
apiUrl: 'http://apidoc.banshouhui.com:3000/mock/31', // mock端域名请求头
},
qn_base_url: 'https://qn-static.banshouhui.com/self-support/'
}
module.exports = UNI_APP;
```
...@@ -157,9 +157,9 @@ export default { ...@@ -157,9 +157,9 @@ export default {
}) })
}, },
setUserData(userInfo) { setUserData(userInfo) {
if (userInfo && userInfo.token) { if (userInfo && userInfo.token) {
// 如果已经登录则直接获取相关信息 // 如果已经登录则直接获取相关信息
this.$u.vuex('vuex_token', userInfo.token); this.$u.vuex('vuex_token',userInfo.token); // RTOKENf22df8e7b9db396f560e8f61bebceea2000cb05c
this.$u.vuex('vuex_user', userInfo); this.$u.vuex('vuex_user', userInfo);
this.$u.vuex('vuex_wx_uid', userInfo.wxopenid); this.$u.vuex('vuex_wx_uid', userInfo.wxopenid);
} else { } else {
......
...@@ -5,7 +5,7 @@ let orderApiFun = function(vm){ ...@@ -5,7 +5,7 @@ let orderApiFun = function(vm){
/** /**
* 工单数量查询接口 * 工单数量查询接口
*/ */
let listOrderCount = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/'+ vm.vuex_token+'/order/queryOrdersCount/V2', params); let listOrderCount = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/'+ vm.vuex_token+'/wokerOrder/queryOrdersCount/V2', params);
/** /**
* 工单列表接口 wxh-worker-rest/rest/order/revision/{token}/list * 工单列表接口 wxh-worker-rest/rest/order/revision/{token}/list
...@@ -31,10 +31,14 @@ let orderApiFun = function(vm){ ...@@ -31,10 +31,14 @@ let orderApiFun = function(vm){
/** /**
* 订单详情查询 * 订单详情查询
*/ */
let orderDetail = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/order/revision/'+ vm.vuex_token+'/'+params.orderId, params); let orderDetail = async (params = {},orderId) => await vm.$u.get('/wxh-worker-rest/rest/order/revision/'+ vm.vuex_token+'/'+orderId, params);
/* 过程反馈查询接口 */ /* 过程反馈查询接口 */
let feedbackConfig = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rst/order/v2/getFeedBack/' + vm.vuex_token, params) let feedbackConfig = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rst/order/v2/getFeedBack/' + vm.vuex_token, params)
/* 预约+过程反馈 接口 */
let traceAndAppointment = async (params = {}, orderId) => await vm.$u.post(`/wxh-worker-rest/rest/order/traceAndAppointment/trace/V2/`+vm.vuex_token+`/`+orderId, params)
/** /**
* 查询工单操作记录列表接口 * 查询工单操作记录列表接口
*/ */
...@@ -50,6 +54,20 @@ let orderApiFun = function(vm){ ...@@ -50,6 +54,20 @@ let orderApiFun = function(vm){
*/ */
let orderGan = async (params = {},orderId) => await vm.$u.post('/wxh-worker-rest/rest/order/revision/applets/'+ vm.vuex_token+'/order/acceptAppletsOrder', params,{'content-type': 'application/x-www-form-urlencoded'}); let orderGan = async (params = {},orderId) => await vm.$u.post('/wxh-worker-rest/rest/order/revision/applets/'+ vm.vuex_token+'/order/acceptAppletsOrder', params,{'content-type': 'application/x-www-form-urlencoded'});
/**
* 获取拍照标准
*/
let orderStandard = async (params = {}) => await vm.$u.get('wxh-worker-rest/rest/'+ vm.vuex_token+'/photo/standard', params);
/**
* 保存图片信息
*/
let saveImage = async (params = {},orderId) => await vm.$u.post('/wxh-worker-rest/rest/'+ vm.vuex_token+'/order/'+orderId+'/maintain/saveImage', params);
/**
* 获取师傅水印 or 默认水印
*/
let getWatermark= async (params = {}) => await vm.$u.get('wxh-worker-rest/rest/'+ vm.vuex_token+'/photo/watermark', params);
const orderApi = { const orderApi = {
listByRecommendOrder, listByRecommendOrder,
...@@ -63,7 +81,11 @@ let orderApiFun = function(vm){ ...@@ -63,7 +81,11 @@ let orderApiFun = function(vm){
orderAccept, orderAccept,
orderGan, orderGan,
maintainWorkerCheckin, maintainWorkerCheckin,
feedbackConfig feedbackConfig,
traceAndAppointment,
orderStandard,
saveImage,
getWatermark
} }
return orderApi return orderApi
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<view class="select-date"> <view class="select-date">
<view class="u-flex u-row-between "> <view class="u-flex u-row-between ">
<view class="txt">选择日期</view> <view class="txt">选择日期</view>
<view class="txt active">2021.04.21</view> <view class="txt active">{{ dateList[currentDay].day }}</view>
</view> </view>
<view class="u-m-t-30 u-flex u-row-between date-list"> <view class="u-m-t-30 u-flex u-row-between date-list">
<view :class="{'date-item':true,'active':index===currentDay}" <view :class="{'date-item':true,'active':index===currentDay}"
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<view class="select-time u-p-t-50"> <view class="select-time u-p-t-50">
<view class="u-flex u-row-between"> <view class="u-flex u-row-between">
<view class="txt">选择时间</view> <view class="txt">选择时间</view>
<view class="txt active">14:00-16:00</view> <view class="txt active">{{ timeList[currentTime] }}</view>
</view> </view>
<view class="u-p-t-30 u-flex u-flex-wrap time-list"> <view class="u-p-t-30 u-flex u-flex-wrap time-list">
<view @click="timeChange(item,index,timeList)" <view @click="timeChange(item,index,timeList)"
...@@ -71,8 +71,8 @@ ...@@ -71,8 +71,8 @@
weekDay: '周三', weekDay: '周三',
day: '21' day: '21'
}, ], }, ],
timeList: ['06:00-08:00', '06:00-08:00', '06:00-08:00', '06:00-08:00', '06:00-08:00', '06:00-08:00', timeList: ['06:00-08:00', '08:00-10:00', '10:00-12:00', '12:00-14:00', '14:00-16:00', '16:00-18:00',
'06:00-08:00', '06:00-08:00', '06:00-08:00' '18:00-20:00', '20:00-22:00', '22:00-24:00'
] ]
} }
}, },
......
<template>
<view class="no-order-view">
<image class="no-order-image" :src="wudingdanImage"></image>
<text>当前暂无订单</text>
</view>
</template>
<script>
export default {
computed: {
wudingdanImage() {
return process.uniEnv.qn_base_url + 'wudingdan.png'
}
}
}
</script>
<style lang="scss" scoped>
.no-order-view {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: #666666;
font-size: 28rpx;
padding: 30rpx;
background-color: #ffffff;
border-radius: 12rpx;
min-height: 460rpx;
.no-order-image {
width: 374rpx;
height: 218rpx;
margin-top: 60rpx;
margin-bottom: 20rpx;
}
}
</style>
<template>
<u-popup border-radius="12" v-model="visible" safe-area-inset-bottom mode="center" width="690rpx"
:mask-close-able="false">
<view class="order-pop-view">
<view class="order-pop-title">
<text>{{title}}</text>
</view>
<view class="line-view" />
<view class="order-pop-text">
<text>{{message}}</text>
</view>
<view class="order-pop-btn-view">
<u-button :custom-style="customStyleCancel" hover-class="none" shape="circle" type="primary"
@click="handleClickCancel">
取消
</u-button>
<u-button :custom-style="customStyleSave" shape="circle" type="primary" @click="handleClickSure">
确定
</u-button>
</view>
</view>
</u-popup>
</template>
<script>
export default {
props: {
visible: Boolean,
title: String,
message: String,
},
data() {
return {}
},
computed: {
customStyleCancel() {
return {
'background-color': '#D1D4D4',
'width': '300rpx',
'height': '104rpx',
'background-color': 'transparent',
'border': '1px solid #2272FF',
'color': '#2272FF',
'font-weight': 'bold',
'font-size': '32rpx',
}
},
customStyleSave() {
return {
'background-color': '#2272FF',
'width': '300rpx',
'height': '104rpx',
'font-weight': 'bold',
'font-size': '32rpx',
'margin-left': '30rpx'
}
}
},
methods: {
changeVisibleValue(val) {
this.$emit('update:visible', val)
},
handleClickCancel() {
this.changeVisibleValue(false)
this.$emit('cancel')
},
handleClickSure() {
this.$emit('click')
}
}
}
</script>
<style lang="scss" scoped>
.order-pop-view {
padding: 30rpx;
.order-pop-title {
font-size: 40rpx;
margin-top: 40rpx;
margin-bottom: 40rpx;
text-align: center;
color: #333333;
}
.order-pop-text {
color: #999999;
text-align: center;
margin-top: 40rpx;
font-size: 28rpx;
margin-bottom: 260rpx;
}
.line-view {
background-color: #F4F5F7;
height: 2rpx;
width: 100%;
}
.order-pop-btn-view {
display: flex;
position: absolute;
bottom: 50rpx;
align-items: center;
justify-content: center;
}
}
</style>
...@@ -257,6 +257,16 @@ ...@@ -257,6 +257,16 @@
} }
} }
,{
"path" : "pages/order/search",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor":"#F4F5F7"
}
}
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
...@@ -315,8 +325,8 @@ ...@@ -315,8 +325,8 @@
"query": "" //启动参数,在页面的onLoad函数里面得到 "query": "" //启动参数,在页面的onLoad函数里面得到
}, },
{ {
"name": "入驻首页", "name": "工单搜索",
"path": "pages/settle/index", "path": "pages/order/search",
"query": "" "query": ""
}, },
{ {
......
...@@ -28,8 +28,7 @@ ...@@ -28,8 +28,7 @@
<view class="order-list-view" v-if="loaded"> <view class="order-list-view" v-if="loaded">
<!-- 入驻前--> <!-- 入驻前-->
<view v-if="needSettled" class="tip-view"> <view v-if="needSettled" class="tip-view">
<view class="tip-title">当前订单(笔)</view> <image :src="weiruzhuImage" class="tip-view-image"></image>
<view class="tip-count">{{ count }}</view>
<view class="tip-other">入驻通过后平台将向您推荐订单</view> <view class="tip-other">入驻通过后平台将向您推荐订单</view>
<u-button class="settle-button" type="primary" shape="circle" @click="immediatelyIn" <u-button class="settle-button" type="primary" shape="circle" @click="immediatelyIn"
:custom-style="buttonStyle"> :custom-style="buttonStyle">
...@@ -45,8 +44,7 @@ ...@@ -45,8 +44,7 @@
</view> </view>
<!-- 入驻成功之后无推荐订单 --> <!-- 入驻成功之后无推荐订单 -->
<view v-else-if="!needSettled && orderList.length <= 0" class="no-order-view"> <view v-else-if="!needSettled && orderList.length <= 0" class="no-order-view">
<image class="no-order-image" :src="wudingdanImage"></image> <NoOrder/>
<text>当前暂无订单</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -62,14 +60,16 @@ ...@@ -62,14 +60,16 @@
<script> <script>
import util from "@/utils/util.js"; import util from "@/utils/util.js";
import TabBarPage from "@/components/tabBarList/index.vue" import TabBarPage from "@/components/tabBarList/index.vue"
import NoOrder from "@/components/order/noOrder.vue"
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,
TabBarPage TabBarPage,
NoOrder
}, },
data() { data() {
return { return {
...@@ -120,10 +120,10 @@ ...@@ -120,10 +120,10 @@
}, },
shouyeyouImage() { shouyeyouImage() {
return process.uniEnv.qn_base_url + 'shouyeyou.png' return process.uniEnv.qn_base_url + 'shouyeyou.png'
},
weiruzhuImage() {
return process.uniEnv.qn_base_url + 'weiruzhu.png'
}, },
wudingdanImage() {
return process.uniEnv.qn_base_url + 'wudingdan.png'
}
}, },
onLoad() {}, onLoad() {},
onShow() { onShow() {
...@@ -380,26 +380,19 @@ ...@@ -380,26 +380,19 @@
padding: 30rpx; padding: 30rpx;
background-color: #ffffff; background-color: #ffffff;
border-radius: 12rpx; border-radius: 12rpx;
min-height: 460rpx;
.tip-title { .tip-view-image {
font-size: 32rpx; width: 328rpx;
font-weight: bold; height: 200rpx;
color: #333333; margin-top: 30rpx;
margin-top: 30rpx;
}
.tip-count {
color: #2272ff;
font-size: 70rpx;
font-weight: bold;
margin-top: 50rpx;
margin-bottom: 20rpx;
} }
.tip-other { .tip-other {
font-size: 28rpx; font-size: 28rpx;
color: #333333; color: #333333;
margin-bottom: 56rpx; margin-bottom: 20rpx;
}
.settle-button {
} }
} }
...@@ -407,28 +400,6 @@ ...@@ -407,28 +400,6 @@
background-color: #F4F5F7; background-color: #F4F5F7;
border-radius: 12rpx; border-radius: 12rpx;
} }
.no-order-view {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: #666666;
font-size: 28rpx;
padding: 30rpx;
background-color: #ffffff;
border-radius: 12rpx;
min-height: 460rpx;
.no-order-image {
width: 374rpx;
height: 218rpx;
margin-top: 70rpx;
margin-bottom: 20rpx;
}
}
} }
} }
......
...@@ -6,8 +6,12 @@ ...@@ -6,8 +6,12 @@
class="course-video" class="course-video"
id="courseVideo" id="courseVideo"
:src="courseSrc" :src="courseSrc"
:options="playerOptions"
:playsinline="true"
@play="playCourse" @play="playCourse"
@error="videoErrorCallback" @error="videoErrorCallback"
@ready="playerReadied"
@timeupdate = "onPlayerTimeupdate($event)"
controls controls
></video ></video
></view> ></view>
...@@ -64,6 +68,34 @@ export default { ...@@ -64,6 +68,34 @@ export default {
section_id:0, section_id:0,
isShowVideo: false, isShowVideo: false,
CourseSectionlist: {},//节信息 CourseSectionlist: {},//节信息
playerOptions : {
playbackRates: [0.7, 1.0, 1.5, 2.0], //播放速度
autoplay: false, //如果true,浏览器准备好时开始回放。
muted: false, // 默认情况下将会消除任何音频。
loop: false, // 导致视频一结束就重新开始。
preload: 'auto',
language: 'zh-CN',
aspectRatio: '16:9',
fluid: true,
// sources: [{
// type: "",
// src: "" //url地址
// }],
// poster: "../../static/images/test.jpg", //你的封面地址
// width: document.documentElement.clientWidth,
notSupportedMessage: '此视频暂无法播放,请稍后再试',
controlBar: {
timeDivider: true,
durationDisplay: true,
remainingTimeDisplay: false,
fullscreenToggle: true //全屏按钮
}
},
gklog: '',
videoTotalTime: 0,
howTimeToUpdateLearnedStatus: 5,//设置几秒提交一次状态
status: 1,//是否已学习默认1已学习
howLongIsLearned: this.videoTotalTime/2,//默认设置观看1/2就是已学
}; };
}, },
computed: { computed: {
...@@ -97,10 +129,6 @@ export default { ...@@ -97,10 +129,6 @@ export default {
}, },
}, },
onLoad(e) { onLoad(e) {
this.courseSrc = 'https://qn-static.banshouhui.com/self-support/videoen.mp4';
this.courseTitle = '大吉大利';
this.courseDesc = '今晚吃鸡';
this.section_id = e.section_id
this.getCourseSection({section_id:e.section_id}) this.getCourseSection({section_id:e.section_id})
}, },
onReady: function (res) { onReady: function (res) {
...@@ -109,6 +137,14 @@ export default { ...@@ -109,6 +137,14 @@ export default {
// #endif // #endif
}, },
methods: { methods: {
onPlayerTimeupdate (player) {
console.log('-----onplay----');
console.log(player);
let intCurrentTime = parseInt(player.detail.currentTime);
this.updateLearnedStatus(intCurrentTime);
this.gklog = intCurrentTime;
console.log(' onPlayerTimeupdate!', this.gklog)
},
videoErrorCallback: function (e) { videoErrorCallback: function (e) {
uni.showModal({ uni.showModal({
content: e.target.errMsg, content: e.target.errMsg,
...@@ -130,6 +166,10 @@ export default { ...@@ -130,6 +166,10 @@ export default {
} }
this.changeCourseStatus(); this.changeCourseStatus();
}, },
playerReadied (player) {
console.log('i go to playerReadied gklog:' + this.gklog)
player.currentTime(this.gklog)
},
changeCourseStatus() { changeCourseStatus() {
let that = this; let that = this;
if (that.courseId) { if (that.courseId) {
...@@ -162,22 +202,49 @@ export default { ...@@ -162,22 +202,49 @@ export default {
console.log(this.CourseSectionlist) console.log(this.CourseSectionlist)
let wareVal = this.CourseSectionlist.ware; let wareVal = this.CourseSectionlist.ware;
this.isShowVideo = wareVal == "0"; this.isShowVideo = wareVal == "0";
if(this.isShowVideo){
let coureWareList = res.data.courseware;
this.courseSrc = coureWareList[0].src;
this.videoTotalTime = parseInt(JSON.parse(coureWareList[0].info).time);
console.log('视频时长信息:' + this.videoTotalTime);
this.courseTitle = res.data.name;
this.courseDesc = res.data.content;
this.section_id = res.data.id;
}
} }
} }
}) })
.catch((err) => { .catch((err) => {
console.log('--------settttt---------');
console.log(err);
uni.showToast({ uni.showToast({
title: err, title: err,
icon: "none", icon: "none",
}); });
this.isLoadMore = false;
if (this.params.start > 0) {
this.page -= 5;
}
}); });
},
updateLearnedStatus(nowLength) {
if(this.gklog != nowLength && nowLength%this.howTimeToUpdateLearnedStatus == 0){
if(nowLength < this.howLongIsLearned){
this.status = 0;
}else{
this.status = 1;
console.log('--已学习--');
}
//大于
let param = {
section_id: this.section_id,
video_time: nowLength,
status: this.status,
};
this.$u.api.updateLearnCourses(param).then((res) => {
console.log('--'+this.howTimeToUpdateLearnedStatus+'更新一次观看状态--time:' + nowLength);
});
}
} }
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -203,6 +270,19 @@ export default { ...@@ -203,6 +270,19 @@ export default {
padding: 80rpx 60rpx 40rpx 60rpx; padding: 80rpx 60rpx 40rpx 60rpx;
} }
.title {
font-weight: 700;
font-family: Medium,Helvetica Neue,Helvetica,Arial,sans-serif;
font-size: 77rpx;
color: #333;
padding: 80rpx 60rpx 40rpx 60rpx;
}
.content {
padding: 40rpx 30rpx;
margin-bottom: 20rpx;
}
.course-desc { .course-desc {
margin-left: 60rpx; margin-left: 60rpx;
} }
......
...@@ -183,7 +183,7 @@ export default { ...@@ -183,7 +183,7 @@ export default {
if (userInfo && userInfo.token) { if (userInfo && userInfo.token) {
// 如果已经登录则直接获取相关信息 // 如果已经登录则直接获取相关信息
util.setOpenid(userInfo.wxopenid); util.setOpenid(userInfo.wxopenid);
this.$u.vuex('vuex_token', userInfo.token); this.$u.vuex('vuex_token',userInfo.token );
uni.setStorageSync("user-info", userInfo); uni.setStorageSync("user-info", userInfo);
} else { } else {
this.$u.vuex('vuex_token', ''); this.$u.vuex('vuex_token', '');
......
...@@ -112,16 +112,19 @@ ...@@ -112,16 +112,19 @@
</view> </view>
</view> </view>
<take-photo type="test" v-if="takeStatus" @close="closeTake"></take-photo> <take-photo type="test" v-if="takeStatus" @close="closeTake"></take-photo>
<PopView title="查看交互规范" message="为完善交付质量,请查看对应的交付规范" :visible.sync="visibale" @click="handleClick"/>
</view> </view>
</template> </template>
<script> <script>
import appointTime from '@/components/appoint/appoint-time.vue' import appointTime from '@/components/appoint/appoint-time.vue'
import takePhoto from '@/components/take/index.vue' import takePhoto from '@/components/take/index.vue'
import PopView from "@/components/popView/index.vue"
export default { export default {
components: { components: {
appointTime, appointTime,
'take-photo': takePhoto 'take-photo': takePhoto,
PopView
}, },
data() { data() {
return { return {
...@@ -133,6 +136,7 @@ ...@@ -133,6 +136,7 @@
// backgroundSize: 'cover', // backgroundSize: 'cover',
// 渐变色 // 渐变色
}, },
visibale: false,
orderId: null, orderId: null,
order: {}, order: {},
allowRejection: false, // 允许拒单 allowRejection: false, // 允许拒单
...@@ -149,7 +153,7 @@ ...@@ -149,7 +153,7 @@
btnClass:'appoint-btn', btnClass:'appoint-btn',
takeStatus:false, takeStatus:false,
errorSignIn:false, errorSignIn:false,
scenePhoto: false scenePhoto: true
} }
}, },
onLoad(option) { onLoad(option) {
...@@ -187,10 +191,25 @@ ...@@ -187,10 +191,25 @@
uni.hideTabBar() uni.hideTabBar()
this.takeStatus = true this.takeStatus = true
}, },
closeTake() { closeTake(img) {
console.log(img)
this.takeStatus = false this.takeStatus = false
// 获取返回的图片 ,如果返回的图片存在则直接异常签约,成功后跳转到去完工页面, // 获取返回的图片 ,如果返回的图片存在则直接异常签约,成功后跳转到去完工页面,
if(img){ // 拍照完成
this.$refs.uToast.show({
title: '签到成功',
type: 'success',
url: 'pages/order/detail',
params: {
id: 1
}
})
}else{
this.$refs.uToast.show({
title: '异常签到失败,请先按要求拍照',
type: 'waning'
})
}
}, },
loadOrderDetail() { // 获取工单详情 loadOrderDetail() { // 获取工单详情
let self = this let self = this
...@@ -198,11 +217,12 @@ ...@@ -198,11 +217,12 @@
var data = { var data = {
'orderId': self.orderId 'orderId': self.orderId
}; };
self.$u.api.orderDetail(data).then((res) => { self.$u.api.orderDetail(data, self.orderId).then((res) => {
if (res.code == 200) { if (res.code == 200) {
console.log("===", res.data.list[0]) console.log("===", res.data)
self.order = res.data.list[0] self.order = res.data
this.getCurrentBtn() this.getCurrentBtn()
this.visibale = true
// self.order.operationType = "accept" // self.order.operationType = "accept"
// }else{ // }else{
// self.order.operationType = "appointment" // self.order.operationType = "appointment"
...@@ -421,6 +441,12 @@ ...@@ -421,6 +441,12 @@
this.btnClass='timeOut-btn' this.btnClass='timeOut-btn'
self.$refs['uCountDown'].seconds += 2 self.$refs['uCountDown'].seconds += 2
} }
},handleClick(){
this.visibale = false
// 去完工
uni.navigateTo({
url: 'pages/photo/list'
})
} }
} }
}; };
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<appoint-time @dateChange="dateChange" @timeChange="timeChange" @weekChange="weekChange"></appoint-time> <appoint-time @dateChange="dateChange" @timeChange="timeChange" @weekChange="weekChange"></appoint-time>
</view> </view>
<view class="u-m-60"> <view class="u-m-60">
<button class="btn" @click="submitFrom" :loading="submiting" :disabled="disabledSubmitBtn">确定</button> <button class="btn" @click="submitFrom" :loading="submiting" :disabled="disabledSubmit">确定</button>
</view> </view>
</view> </view>
</template> </template>
...@@ -114,19 +114,19 @@ ...@@ -114,19 +114,19 @@
} }
}, },
computed: { computed: {
disabledSubmitBtn() {
debugger disabledSubmit() {
let self = this let self = this
if(self.trace.reasonType == '预约' debugger
&& (self.trace.appointmentDatetime == null || self.trace.appointmentDatetimeRange == '' if(self.trace.reasonType
|| self.trace.nextTraceDatetime == '')) { && (self.trace.reasonType == '报备' || self.trace.reasonType == '改约')){
return true if(self.trace.reasonRelegation && self.trace.reason
} else if(self.trace.reasonType != '预约' && self.trace.appointmentDatetimeRange) {
&& (!self.trace.reasonType || !self.trace.reasonRelegation || !self.trace.reason)) { return false
return true }
} }
return false return true
}, },
}, },
async onLoad(e) { async onLoad(e) {
...@@ -323,8 +323,13 @@ ...@@ -323,8 +323,13 @@
&::after{ &::after{
content:''; content:'';
height:0; height:0;
border: none;
} }
} }
button[disabled]:not([type]) {
background: #D1D4D4;
color: #FFFFFF;
}
.btn{ .btn{
padding:30rpx; padding:30rpx;
border-radius: 52rpx; border-radius: 52rpx;
......
...@@ -4,58 +4,58 @@ ...@@ -4,58 +4,58 @@
<view class="tools-box"> <view class="tools-box">
<view class="search-sub"> <view class="search-sub">
<u-subsection :current="curNow" :list="subList" active-color="white" bg-color="white" <u-subsection :current="curNow" :list="subList" active-color="white" bg-color="white"
inactive-color="#666" button-color="#2272FF" border-radius="36" @change="sectionChange"> inactive-color="#666" button-color="#2272FF" border-radius="36" @change="sectionChange" height="72"
bold>
</u-subsection> </u-subsection>
</view> </view>
<view class="search-btn"> <view class="search-btn" @click="handleClickSearch">
<u-icon name="search" color="#666" size="32"></u-icon> <image class="search-image" mode="widthFix" :src="sousuoImage"></image>
<text class="search-btn-text">搜订单</text> <text class="search-btn-text">搜订单</text>
</view> </view>
</view> </view>
<view class="u-tabs-box" v-show="curNow == 0"> <view class="u-tabs-box" v-show="curNow == 0">
<u-tabs activeColor="#2272FF" bg-color="none" inactive-color="#999" bar-height="4" bar-width="44" <u-tabs height="66" activeColor="#2272FF" bg-color="none" inactive-color="#999" bar-height="4" bar-width="44"
:offset="[-1,10]" :list="list" count="total" :current="current" @change="change" :offset="[0,0]" :list="list" count="total" :current="current" @change="change"
:is-scroll="false"></u-tabs> :is-scroll="false" font-size="28" bold></u-tabs>
</view> </view>
<!-- <swiper class="swiper-box" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish"> --> <view class="tab-view">
<!-- <swiper-item class="swiper-item" v-for="(res, ind) in orderList" :key="ind"> --> <!-- <swiper-item class="swiper-item" v-for="(res, ind) in orderList" :key="ind"> -->
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom" scroll-anchoring> <scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom" scroll-anchoring>
<view class="page-box">
<view v-for="(item, index) in orderList" :key="item.orderId"> <view v-for="(item, index) in orderList" :key="item.orderId">
<OrderCell :orderData="item" :orderType="orderType" :location="dataValue" <OrderCell :orderData="item" :orderType="orderType" :location="dataValue"
@click="handleClick(item)" @action="handleAction(item)"> </OrderCell> @click="handleClick(item)" @action="handleAction(item)"> </OrderCell>
</view> </view>
<u-loadmore :status="loadStatus" bgColor="#F4F5F7"></u-loadmore> <u-loadmore :status="loadStatus" bgColor="#F4F5F7"></u-loadmore>
</view>
</scroll-view> </scroll-view>
<!-- </swiper-item> <!-- </swiper-item> -->
</swiper> --> </view>
<!-- </view> --> <!-- </view> -->
<PopView title="aaaa" message="bbbb" :visible="visibale"/>
</TabBarPage> </TabBarPage>
</template> </template>
<script> <script>
import TabBarPage from "@/components/tabBarList/index.vue" import TabBarPage from "@/components/tabBarList/index.vue"
import OrderCell from "@/components/order/index.vue"; import OrderCell from "@/components/order/index.vue"
export default { export default {
components: { components: {
TabBarPage, TabBarPage,
OrderCell OrderCell
}, },
data() { data() {
return { return {
visibale: false,
showSview: true, showSview: true,
curNow: 0, curNow: 0,
pageNumber: 0, pageNumber: 0,
pageSize: 10, pageSize: 10,
//waitAccept、waitAppointment、waitCheckIn、waitFinish、exception、finish //waitAccept、waitAppointment、waitCheckIn、waitFinish、exception、finish
indexStatus: { indexStatus: {
0: 'waitAccept', 0: 'waitAppointment',
1: 'waitAppointment', 1: 'waitCheckIn',
2: 'waitCheckIn', 2: 'waitFinish',
3: 'waitFinish', 3: 'exception',
4: 'exception',
5: 'finish' 5: 'finish'
}, },
orderList: [], orderList: [],
...@@ -100,6 +100,9 @@ ...@@ -100,6 +100,9 @@
}, },
currentIndex() { currentIndex() {
return this.curNow == 0 ? this.current : 5 return this.curNow == 0 ? this.current : 5
},
sousuoImage() {
return process.uniEnv.qn_base_url + 'sousuo.png'
} }
}, },
methods: { methods: {
...@@ -145,7 +148,7 @@ ...@@ -145,7 +148,7 @@
// 页面数据 // 页面数据
getOrderList(index) { getOrderList(index) {
// 状态处理 // 状态处理
this.pageNumber += 1 // this.pageNumber += 1
var param = { var param = {
pageNumber: this.pageNumber, pageNumber: this.pageNumber,
pageSize: this.pageSize, pageSize: this.pageSize,
...@@ -179,6 +182,7 @@ ...@@ -179,6 +182,7 @@
submissionTime: '2021.04.19 16:24:48', // 提交时间 submissionTime: '2021.04.19 16:24:48', // 提交时间
auditResults: {}, // 审核结果 auditResults: {}, // 审核结果
orderBusinessType: 'R', // 业务类型 R 为抢单 orderBusinessType: 'R', // 业务类型 R 为抢单
orderId:'1100000216'
}] }]
} }
...@@ -190,7 +194,9 @@ ...@@ -190,7 +194,9 @@
// 后台需要返回orderType,防止数据返回延迟期间点击了其他的tab // 后台需要返回orderType,防止数据返回延迟期间点击了其他的tab
if (res.data) { if (res.data) {
self.orderList.push(...res.data.list) self.orderList.push(...res.data.list)
self.list[res.data.orderType].total = res.data.total if (self.list[res.data.orderType]) {
self.list[res.data.orderType].total = res.data.total
}
self.loadStatus = res.data.total > self.orderList.length ? 'loadmore' : 'nomore' self.loadStatus = res.data.total > self.orderList.length ? 'loadmore' : 'nomore'
} }
} else { } else {
...@@ -238,6 +244,11 @@ ...@@ -238,6 +244,11 @@
handleAction(item) { handleAction(item) {
console.log('click button') console.log('click button')
this.viewOderItem(item.orderId) this.viewOderItem(item.orderId)
},
handleClickSearch() {
uni.navigateTo({
url: 'pages/order/search'
})
} }
} }
}; };
...@@ -423,24 +434,30 @@ ...@@ -423,24 +434,30 @@
flex-direction: column; flex-direction: column;
height: calc(100vh - var(--window-top)); height: calc(100vh - var(--window-top));
width: 100%; width: 100%;
}
.tab-view {
height: 100%;
overflow: auto;
padding-bottom: 20rpx;
} }
.swiper-box { // .swiper-box {
flex: 1; // flex: 1;
} // }
.swiper-item { // .swiper-item {
height: 100%; // height: 100%;
.page-box { // .page-box {
padding-bottom: 20rpx; // padding-bottom: 20rpx;
} // }
} // }
.tools-box { .tools-box {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
padding: 20rpx 0rpx 18rpx 0rpx; padding-bottom: 20rpx;
.search-sub { .search-sub {
height: 72rpx; height: 72rpx;
...@@ -452,12 +469,16 @@ ...@@ -452,12 +469,16 @@
width: 220rpx; width: 220rpx;
background-color: #ffffff; background-color: #ffffff;
border-radius: 36rpx; border-radius: 36rpx;
color: #666666; color: #999999;
display: flex; display: flex;
flex-direction: row; justify-content: center;
justify-content: space-around;
align-items: center; align-items: center;
.search-image {
width: 36rpx;
height: 32rpx;
flex-shrink: 0;
margin-right: 24rpx;
}
.search-btn-text { .search-btn-text {
line-height: 36rpx; line-height: 36rpx;
font-weight: 400; font-weight: 400;
......
<!-- 工单-搜索页 -->
<template>
<view class="search-wrap">
<view class="top-item">
<u-search
v-model="search.keyword"
bg-color="#FFFFFF"
placeholder="搜订单"
search-icon-color="#999999"
color="#333333"
placeholder-color="#999999"
height="72"
margin="0 30rpx"
:animation="true"
:action-style="{
'font-size': '32rpx',
'font-weight': 500,
'color': '#2272FF'
}"
@search="searchOrder"
@custorm="searchOrder"
></u-search>
</view>
<view class="content-item">
<view v-if="orderList && orderList.length > 0" class="order-row">
<view v-for="(item, index) in orderList" :key="item.orderId">
<OrderCell :orderData="item" :orderType="orderType" :location="dataValue"
@click="handleClick(item)" @action="handleAction(item)"> </OrderCell>
</view>
<u-loadmore :status="loadStatus" bgColor="#F4F5F7"></u-loadmore>
</view>
<view v-else="search.keyword" class="empty-result">
<u-image width="374" height="256" :src="searchEmpty">
<u-loading slot="loading"></u-loading>
</u-image>
<text class="empty-message">
当前暂无搜索结果
</text>
</view>
</view>
</view>
</template>
<script>
import OrderCell from "@/components/order/index.vue";
export default {
components: {
OrderCell
},
data() {
return {
search: {
type: '',
keyword: '',
pageSize: 10,
pageNumber: 0,
orderStatusRangeType: '',
},
orderList: [],
};
},
onLoad() {
// this.searchOrder()
},
computed: {
searchEmpty() {
return process.uniEnv.qn_base_url + 'SearchEmpty.png'
},
},
methods: {
searchOrder(index) {
this.search.pageNumber = 0
this.getOrderList()
},
// 页面数据
getOrderList() {
// 状态处理
var self = this;
self.search.pageNumber += 1
self.$u.api.listOrder(self.search).then((res) => {
if (res.code == 200) {
console.log("getOrderList", res.data)
var res = {
data: {
total: 15,
orderType: this.currentIndex,
list: [{
orderServiceType: '安装', // 服务类型:安装、维修
categoryName: '充电桩', // 品类:充电桩
orderBusinessTypeText: '分配单', // 业务类型:分配单、订单池
orderNumber: 'OR2021041809827', // 工单编号
contactName: '郭小清', // 客户信息
contactPhone: '13631612077', // 联系方式
contactAddress: '湾街道荔枝花园D座125号', // 详细地址
contactAddressLatitud: '116.3896', // 联系人地址经度
contactAddressLongitud: '39.91917', // 联系人地址纬度
orderStatus: 0, // 工单状态
appointmentDatetime: '', // 预约时间
currentWillOverTime: 10000, // 剩余时间
currentOverTime: 0, // 超过时间
auditDatetime: '2021.04.19 12:45:09', // 审核时间
submissionTime: '2021.04.19 16:24:48', // 提交时间
auditResults: {}, // 审核结果
orderBusinessType: 'R', // 业务类型 R 为抢单
}]
}
}
res.data.list = [...res.data.list, ...res.data.list, ...res.data.list, ...res.data.list,
...res.data.list,...res.data.list,...res.data.list,...res.data.list,...res.data.list,...res.data.list]
// 后台需要返回order_type,防止数据返回延迟期间点击了其他的tab
if (res.data) {
self.orderList.push(...res.data.list)
self.loadStatus = res.data.total > self.orderList.length ? 'loadmore' : 'nomore'
}
} else {
console.log(res.message, "获取订单数量失败!");
}
});
},
viewOderItem(orderId) { // 跳转工单详情页面
uni.navigateTo({
url: 'pages/order/detail?id=' + orderId
})
},
handleClick(item) {
console.log('click cell')
this.viewOderItem(item.orderId)
},
handleAction(item) {
console.log('click button')
this.viewOderItem(item.orderId)
},
},
}
</script>
<style lang="scss">
.search-wrap {
.top-item {
position: sticky;
padding: 20rpx 0;
top: 0rpx;
background-color: #F4F5F7;
z-index: 2;
/deep/ .u-search .u-content {
padding: 0 20rpx 0 40rpx;
}
/deep/ .u-search .u-input {
margin: 0 24rpx;
}
/deep/ .u-search .u-icon--right .u-iconfont {
font-size: 36rpx !important;
}
/deep/ .u-search .u-close-wrap .u-iconfont {
color: #CCCCCC;
}
}
.content-item {
padding: 10rpx 30rpx 20rpx 30rpx;
.empty-result {
padding-top: 354rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.empty-message {
padding-top: 28rpx;
font-size: 28rpx;
font-weight: 400;
color: #666666;
line-height: 28rpx;
}
}
}
}
</style>
...@@ -4,30 +4,34 @@ ...@@ -4,30 +4,34 @@
<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)"
v-for="(item,ikey) in dataList" :key="ikey"> v-for="(item,ikey) in dataList" :key="ikey">
<text :class="['ph-lst-top-index', {'active':activeTop===ikey}]">{{ ikey + 1 }}</text> <text :class="['ph-lst-top-index', {'active':activeTop===ikey}]">{{ ikey + 1 }}</text>
<text class="topItemTitle">{{item.type}}</text> <text class="topItemTitle">{{item.type}}</text>
</view> </view>
</view> </view>
<view class="rightView"> <view class="rightView">
<view class="right-view-title">拍照项有:</view> <view class="right-view-title">拍照项有:</view>
<template v-for="(item,ikey) in rightList"> <template v-for="(item,ikey) in rightList">
<view class="rightItemView" @click="rightItemClick(item,ikey)" :key="ikey"> <view class="rightItemView" @click="take(item,ikey)" :key="ikey">
<view :class="['rightContentView', {'active':item.imageList[0]}]"> <view :class="['rightContentView', {'active':item.images[0]}]">
<text class="ph-lst-item-index">{{ ikey + 1 }}</text> <text class="ph-lst-item-index">{{ ikey + 1 }}</text>
<text class="">{{item.name}}</text> <text class="">{{item.name}}</text>
<image class="ph-list-item-arrow" src="/static/photo/arrow.png"></image> <image class="ph-list-item-arrow" src="/static/photo/arrow.png"></image>
<!-- <text class="rightContent u-m-t-14 u-m-l-30 u-p-b-30">{{item.describe}}</text> --> <!-- <text class="rightContent u-m-t-14 u-m-l-30 u-p-b-30">{{item.describe}}</text> -->
</view> </view>
<view class="rightImageView" v-if="item.imageList.length > 0"> <view class="rightImageView" v-if="item.images.length > 0">
<image class="rightImage" v-for="(image, index) in item.imageList.slice(0 , 10)" :src="image" <image class="rightImage" v-for="(image, index) in item.images.slice(0 , 10)" :src="image"
:key="index" @click.stop="handleClickImage(item, index)" mode="aspectFill"></image> :key="index" @click.stop="handleClickImage(item, index)" mode="aspectFill"></image>
</view> </view>
</view> </view>
</template> </template>
<u-button v-if="activeTop + 1 === dataList.length" class="ph-list-button" type="error" shape="circle" <take-photo type="test" v-if="takeStatus" :currentItem="currentItemDate" @close="closeTake"></take-photo>
:disabled="buttonDisabled" :custom-style="buttonStyle" @click="isPopShow = true">一键清空展示图片</u-button> <!-- <u-button v-if="activeTop + 1 === dataList.length" class="ph-list-button" type="error" shape="circle"
:disabled="buttonDisabled" :custom-style="buttonStyle" @click="isPopShow = true">一键清空展示图片</u-button> -->
</view> </view>
<u-popup border-radius="10" v-model="isPopShow" safe-area-inset-bottom mode="center" width="690rpx"
<!-- <u-popup border-radius="10" v-model="isPopShow" safe-area-inset-bottom mode="center" width="690rpx"
height="600rpx"> height="600rpx">
<view class="ph-list-pop-title"> <view class="ph-list-pop-title">
<text>是否一键清空系统展示的图片?</text> <text>是否一键清空系统展示的图片?</text>
...@@ -44,14 +48,20 @@ ...@@ -44,14 +48,20 @@
确定 确定
</u-button> </u-button>
</view> </view>
</u-popup> </u-popup> -->
</view> </view>
</template> </template>
<script> <script>
import takePhoto from '@/components/take/index.vue'
export default { export default {
components: {
'take-photo': takePhoto
},
data() { data() {
return { return {
takeStatus: false,
currentItemDate:{},
topList: [], topList: [],
activeTop: 0, activeTop: 0,
leftList: [], leftList: [],
...@@ -60,9 +70,11 @@ ...@@ -60,9 +70,11 @@
systemId: '', systemId: '',
brand: '', brand: '',
brandId: '', brandId: '',
orderId:'',
dataList: [], dataList: [],
loading: true, loading: true,
isPopShow: false isPopShow: false,
userWatermark:{}
} }
}, },
onLoad(e) { onLoad(e) {
...@@ -70,14 +82,21 @@ ...@@ -70,14 +82,21 @@
if (e && e.brandId) { if (e && e.brandId) {
this.brandId = e.brandId this.brandId = e.brandId
} }
if (e && e.brand) { uni.setNavigationBarTitle({
this.brand = e.brand title: "郭小清"
uni.setNavigationBarTitle({ });
title: this.brand
}); // if (e && e.brand) {
// this.brand = e.brand!==undefined?e.brand:"郭小清"
// uni.setNavigationBarTitle({
// title: this.brand
// });
// }
if (e && e.orderId) {
this.orderId = e.orderId
} }
if (e && e.systemId) { if (e && e.systemId) {
this.systemId = e.systemId this.systemId = e.systemId
...@@ -86,8 +105,8 @@ ...@@ -86,8 +105,8 @@
if (e && e.classifyId) { if (e && e.classifyId) {
this.classifyId = e.classifyId this.classifyId = e.classifyId
} }
// this.getListData()
this.getListData() this.getListDataNew()
}, },
...@@ -108,7 +127,6 @@ ...@@ -108,7 +127,6 @@
} }
} }
} }
return true return true
}, },
customStyleCancel() { customStyleCancel() {
...@@ -127,7 +145,6 @@ ...@@ -127,7 +145,6 @@
} }
} }
}, },
methods: { methods: {
getListData: function() { getListData: function() {
this.loading = true this.loading = true
...@@ -149,17 +166,60 @@ ...@@ -149,17 +166,60 @@
} }
} }
}) })
}, },
getListDataNew() {
handleData: function(result) { this.loading = true
let self = this
var data = {
partnerCompanyId:this.systemId ,
orderId:this.orderId,
categoryId:this.classifyId,
brandId:this.brandId
};
self.$u.api.orderStandard(data).then((res) => {
this.loading = false
if (res.code == 200) {
console.log("===", res.data)
if(res.data && res.data.length > 0){
let dataList = []
var flag = false;
res.data.forEach(item=>{
if(dataList.length===0 ){
var dataItem = {type:'',list:[]}
dataItem.type = item.type
dataItem.list.push(item)
dataList.push(dataItem)
}else{
dataList.forEach(dataListItem=>{
if(dataListItem.type===item.type){
dataListItem.list.push(item)
flag = true
return false;
}else{
flag = false
}
})
if(!flag){
var dataItem = {type:'',list:[]}
dataItem.type = item.type
dataItem.list.push(item)
dataList.push(dataItem)
}
}
})
this.handleData(dataList)
}
} else {
console.log(res.code.message)
}
});
},
handleData: function(result) {
this.activeTop = 0 this.activeTop = 0
const globalData = getApp().globalData
globalData.photo.productList = result
this.dataList = result this.dataList = result
if (result.length > 0) { if (result.length > 0) {
var item = result[0] var item = result[0]
globalData.photo.waterSetting = item.userWatermark globalData.photo.waterSetting = this.userWatermark
this.rightList = item.list this.rightList = item.list
} }
}, },
...@@ -176,7 +236,6 @@ ...@@ -176,7 +236,6 @@
duration: 0 duration: 0
}); });
}, },
// 点击图片 // 点击图片
handleClickImage(item, index) { handleClickImage(item, index) {
uni.previewImage({ uni.previewImage({
...@@ -184,7 +243,6 @@ ...@@ -184,7 +243,6 @@
current: index current: index
}) })
}, },
//右侧点击 //右侧点击
rightItemClick: function(item, ikey) { rightItemClick: function(item, ikey) {
const photo = getApp().globalData.photo const photo = getApp().globalData.photo
...@@ -196,7 +254,6 @@ ...@@ -196,7 +254,6 @@
url: '/pages/photo/take' url: '/pages/photo/take'
}) })
}, },
// 清除图片 // 清除图片
handleClickSure: function() { handleClickSure: function() {
this.$u.cloudApi.cleanImage({ this.$u.cloudApi.cleanImage({
...@@ -207,6 +264,42 @@ ...@@ -207,6 +264,42 @@
this.getListData() this.getListData()
} }
}) })
},
take(item,ikey) {
this.currentItemDate = item
uni.hideTabBar()
this.takeStatus = true
},
closeTake(img) {
console.log(img)
if(img !==undefined ){
// step1 添加图片
this.currentItemDate.images.push(img)
// step2 保存图片
var data={
type : this.currentItemDate.type,
images : this.currentItemDate.images,
fieldsName:this.currentItemDate.fieldName
}
this.$u.api.saveImage(data,this.orderId).then((res) => {
if (res.code == 200) {
console.log("===", res.data)
} else {
console.log("保存图片异常",res.data.message)
}
});
}
this.takeStatus = false
},
getWatermark(){
this.$u.api.getWatermark(data,this.orderId).then((res) => {
if (res.code == 200) {
console.log("===", res.data)
this.userWatermark = res.data
} else {
console.log("获取水印备注异常",res.data.message)
}
});
} }
} }
} }
......
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