Commit ed8eb0d2 authored by 和慭琛's avatar 和慭琛

接单首页 尝试使用 async 和 await使用报错

parent 4e18bac8
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
icon_noData:'https://qn-static.banshouhui.com/empty.png', icon_noData:'https://qn-static.banshouhui.com/empty.png',
//抢单 图标 //抢单 图标
icon_rob:'https://qn-static.banshouhui.com/take_order/icon/rob.png', icon_rob:'https://qn-static.banshouhui.com/take_order/icon/rob.png',
//右箭头 图标
icon_arrow_right:'https://qn-static.banshouhui.com/arrow_right.png',
//登录注册页-- //登录注册页--
//通过code获取用户信息(登录) //通过code获取用户信息(登录)
......
...@@ -14,14 +14,23 @@ ...@@ -14,14 +14,23 @@
}, },
{ {
"path": "pages/take/detail", "path": "pages/take/finish",
"style": { "style": {
"navigationBarTitleText": "接单详情" "navigationBarTitleText": "完工信息"
} }
}, },
{
"path": "pages/take/detail",
"style": {
"navigationBarTitleText": "接单详情"
}
},
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
...@@ -62,15 +71,7 @@ ...@@ -62,15 +71,7 @@
"navigationBarTitleText": "授权登录" "navigationBarTitleText": "授权登录"
} }
}, }
{
"path": "pages/take/finish",
"style": {
"navigationBarTitleText": "完工信息"
}
}
], ],
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<text class="contentText u-m-l-20" v-if="orderInfo.guaranteeExplain">{{orderInfo.guaranteeExplain}}</text> <text class="contentText u-m-l-20" v-if="orderInfo.guaranteeExplain">{{orderInfo.guaranteeExplain}}</text>
</view> </view>
</view> </view>
<view class="bottomView" v-if="orderInfo.status != '已完工'"> <view class="bottomView" v-if="orderInfo.statusText != '已完工'">
<view class="bottomLeftView" @click="cancelClick()"> <view class="bottomLeftView" @click="cancelClick()">
<text class="u-font-28 gray66">退单</text> <text class="u-font-28 gray66">退单</text>
</view> </view>
...@@ -97,6 +97,7 @@ ...@@ -97,6 +97,7 @@
export default { export default {
data() { data() {
return { return {
orderId:'',
orderInfo:{}, orderInfo:{},
photoList:[ photoList:[
{image:''},{image:''},{image:''},{image:''}, {image:''},{image:''},{image:''},{image:''},
...@@ -110,6 +111,7 @@ ...@@ -110,6 +111,7 @@
if(e && e.orderId){ if(e && e.orderId){
this.orderId = e.orderId this.orderId = e.orderId
} }
this.domain_name = getApp().globalData.domain_Name this.domain_name = getApp().globalData.domain_Name
//this.orderId = '10704466' //this.orderId = '10704466'
//getApp().globalData.token = 'RTOKENc9496ce49b2dc61bbae67968979af4f19e0dfad0' //getApp().globalData.token = 'RTOKENc9496ce49b2dc61bbae67968979af4f19e0dfad0'
...@@ -176,11 +178,62 @@ ...@@ -176,11 +178,62 @@
cancelClick: function () { cancelClick: function () {
console.log('退单点击') console.log('退单点击')
uni.request({
url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/'
+getApp().globalData.token
+'/order/'+this.orderId+'/workerReject',
method: 'POST',
data: {
rejectReason:'不想接单了',
remark:'不想接单了'
},
header:{
'Content-Type': 'application/x-www-form-urlencoded'
},
success: (res) => {
console.log('退单 成功')
console.log(res)
if(res.data.code==200){
uni.showToast({
title:'退单成功',
})
uni.navigateBack({
})
}else{
uni.showToast({
title:res.data.message
})
}
},
fail: (e) => {
console.log('退单 失败')
console.log(e)
uni.showToast({
title:'退单失败',
})
}
})
}, },
finishClick: function () { finishClick: function () {
uni.navigateTo({ uni.navigateTo({
url: '/pages/take/finish' url: '/pages/take/finish'
+'?orderId='+this.orderId
+'&inGuaranteePeriod='+this.orderInfo.inGuaranteePeriod
+'&contactName='+this.orderInfo.contactName
+'&contactMobilephone='+this.orderInfo.contactMobilephone
+'&contactAddress='+this.orderInfo.contactAddress
+'&inGuaranteePeriodText='+this.orderInfo.inGuaranteePeriodText
+'&orderServiceType='+this.orderInfo.orderServiceType,
}) })
}, },
......
This diff is collapsed.
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
onShow() { onShow() {
//this.getData(); /*
uni.getStorage({ uni.getStorage({
key: 'token', key: 'token',
success: function (res) { success: function (res) {
...@@ -156,10 +156,12 @@ ...@@ -156,10 +156,12 @@
}) })
this.getData() this.getData()
*/
this.getToken()
}, },
async getToken () { async getToken () {
await uni.getStorage({ await uni.getStorage({
key: 'token', key: 'token',
success: function (res) { success: function (res) {
...@@ -172,8 +174,6 @@ ...@@ -172,8 +174,6 @@
}) })
await this.getData() await this.getData()
}, },
methods: { methods: {
...@@ -325,20 +325,23 @@ ...@@ -325,20 +325,23 @@
}) })
}else{ }else{
uni.navigateTo({ uni.navigateTo({
url: '/pages/take/detail'+'?orderId='+item.orderId url: '/pages/take/detail'
+'?orderId='+item.orderId,
}) })
} }
} }
if(this.activeTop==1){ if(this.activeTop==1){
uni.navigateTo({ uni.navigateTo({
url: '/pages/take/detail'+'?orderId='+item.orderId url: '/pages/take/detail'
+'?orderId='+item.orderId,
}) })
} }
if(this.activeTop==2){ if(this.activeTop==2){
uni.navigateTo({ uni.navigateTo({
url: '/pages/take/detail'+'?orderId='+item.orderId url: '/pages/take/detail'
+'?orderId='+item.orderId,
}) })
} }
......
{ {
"pages": [ "pages": [
"pages/take/index", "pages/take/index",
"pages/take/finish",
"pages/take/detail", "pages/take/detail",
"pages/index/index", "pages/index/index",
"pages/take/rob", "pages/take/rob",
"pages/index/record", "pages/index/record",
"pages/index/success", "pages/index/success",
"pages/login/wxlogin", "pages/login/wxlogin"
"pages/take/finish"
], ],
"subPackages": [], "subPackages": [],
"window": { "window": {
......
...@@ -131,7 +131,8 @@ var _default = ...@@ -131,7 +131,8 @@ var _default =
icon_noData: 'https://qn-static.banshouhui.com/empty.png', icon_noData: 'https://qn-static.banshouhui.com/empty.png',
//抢单 图标 //抢单 图标
icon_rob: 'https://qn-static.banshouhui.com/take_order/icon/rob.png', icon_rob: 'https://qn-static.banshouhui.com/take_order/icon/rob.png',
//右箭头 图标
icon_arrow_right: 'https://qn-static.banshouhui.com/arrow_right.png',
//登录注册页-- //登录注册页--
//通过code获取用户信息(登录) //通过code获取用户信息(登录)
......
...@@ -3486,6 +3486,7 @@ u-dropdown { ...@@ -3486,6 +3486,7 @@ u-dropdown {
/*每个页面公共css */ /*每个页面公共css */
......
...@@ -229,6 +229,7 @@ var _default = ...@@ -229,6 +229,7 @@ var _default =
{ {
data: function data() { data: function data() {
return { return {
orderId: '',
orderInfo: {}, orderInfo: {},
photoList: [ photoList: [
{ image: '' }, { image: '' }, { image: '' }, { image: '' }], { image: '' }, { image: '' }, { image: '' }, { image: '' }],
...@@ -242,6 +243,7 @@ var _default = ...@@ -242,6 +243,7 @@ var _default =
if (e && e.orderId) { if (e && e.orderId) {
this.orderId = e.orderId; this.orderId = e.orderId;
} }
this.domain_name = getApp().globalData.domain_Name; this.domain_name = getApp().globalData.domain_Name;
//this.orderId = '10704466' //this.orderId = '10704466'
//getApp().globalData.token = 'RTOKENc9496ce49b2dc61bbae67968979af4f19e0dfad0' //getApp().globalData.token = 'RTOKENc9496ce49b2dc61bbae67968979af4f19e0dfad0'
...@@ -308,11 +310,62 @@ var _default = ...@@ -308,11 +310,62 @@ var _default =
cancelClick: function cancelClick() { cancelClick: function cancelClick() {
console.log('退单点击'); console.log('退单点击');
uni.request({
url: getApp().globalData.domain_Name +
'/wxh-worker-rest/rest/' +
getApp().globalData.token +
'/order/' + this.orderId + '/workerReject',
method: 'POST',
data: {
rejectReason: '不想接单了',
remark: '不想接单了' },
header: {
'Content-Type': 'application/x-www-form-urlencoded' },
success: function success(res) {
console.log('退单 成功');
console.log(res);
if (res.data.code == 200) {
uni.showToast({
title: '退单成功' });
uni.navigateBack({});
} else {
uni.showToast({
title: res.data.message });
}
},
fail: function fail(e) {
console.log('退单 失败');
console.log(e);
uni.showToast({
title: '退单失败' });
} });
}, },
finishClick: function finishClick() { finishClick: function finishClick() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/take/finish' }); url: '/pages/take/finish' +
'?orderId=' + this.orderId +
'&inGuaranteePeriod=' + this.orderInfo.inGuaranteePeriod +
'&contactName=' + this.orderInfo.contactName +
'&contactMobilephone=' + this.orderInfo.contactMobilephone +
'&contactAddress=' + this.orderInfo.contactAddress +
'&inGuaranteePeriodText=' + this.orderInfo.inGuaranteePeriodText +
'&orderServiceType=' + this.orderInfo.orderServiceType });
} } };exports.default = _default; } } };exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"])) /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
......
...@@ -174,45 +174,131 @@ __webpack_require__.r(__webpack_exports__); ...@@ -174,45 +174,131 @@ __webpack_require__.r(__webpack_exports__);
// //
// //
// //
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var _default = var _default =
{ {
data: function data() { data: function data() {
return { return {
icon_arrow_right: '',
orderId: '', orderId: '',
inGuaranteePeriod: false, inGuaranteePeriod: false,
orderInfo: { contactName: '',
name: '梵护博', contactMobilephone: '',
phone: '15811112222', contactAddress: '',
address: '广东省深圳市宝安区新安街道庭威产业园10C', inGuaranteePeriodText: '',
guard: '保内', orderServiceType: '',
type: '维修-调试', orderInfo: {} };
product: '小米 新风机',
typeList: [
{ title: '产品规格', type: 'click' },
{ title: '购买日期', type: 'click' },
{ title: '机身条码', type: 'scan' },
{ title: '照片', type: 'photo', images: [{ image: '111' }, { image: '222' }, { image: '333' }, { image: '444' }] },
{ title: '备注', type: 'textArea' },
{ title: '长度', type: 'textField' }] } };
}, },
onLoad: function onLoad(e) { onLoad: function onLoad(e) {
this.orderId = '10704466';
this.inGuaranteePeriod = false; this.getTopInfo(e);
this.getConfig(); this.getConfig();
this.getCompletionConfigInfo(); this.getCompletionConfigInfo();
}, },
methods: { methods: {
getTopInfo: function getTopInfo(e) {
this.icon_arrow_right = getApp().globalData.icon_arrow_right;
if (e && e.orderId) {
this.orderId = e.orderId;
}
if (e && e.inGuaranteePeriod) {
this.inGuaranteePeriod = e.inGuaranteePeriod;
}
if (e && e.contactName) {
this.contactName = e.contactName;
}
if (e && e.contactMobilephone) {
this.contactMobilephone = e.contactMobilephone;
}
if (e && e.contactAddress) {
this.contactAddress = e.contactAddress;
}
if (e && e.inGuaranteePeriodText) {
this.inGuaranteePeriodText = e.inGuaranteePeriodText;
}
if (e && e.orderServiceType) {
this.orderServiceType = e.orderServiceType;
}
//测试
/*
getApp().globalData.token = 'RTOKEN9336b56cffb3c2bafec54b3687f86c38bfaa364a'
this.orderId = '10704464'
this.inGuaranteePeriod = true
this.contactName = '小青一号'
this.contactMobilephone = '123123123123'
this.contactAddress = '广东省深圳市宝安区创业一路'
this.inGuaranteePeriodText = '保内'
this.orderServiceType = '维修'
*/
},
getConfig: function getConfig() { getConfig: function getConfig() {
console.log('获取 完工配置项'); console.log('获取 完工配置项');
uni.request({ uni.request({
url: getApp().globalData.domain_Name + url: getApp().globalData.domain_Name +
'/wxh-worker-rest/rest/config/' + '/wxh-worker-rest/rest/config/' +
'RTOKEN52e603131ae93ac83ac0b3628064822690ee4de0' + getApp().globalData.token +
'/completion/' + this.orderId + '/completion/' + this.orderId +
'?inGuaranteePeriod=' + this.inGuaranteePeriod, '?inGuaranteePeriod=' + this.inGuaranteePeriod,
method: 'GET', method: 'GET',
...@@ -247,12 +333,14 @@ var _default = ...@@ -247,12 +333,14 @@ var _default =
}, },
//获取完工页详情 //获取完工页详情
getCompletionConfigInfo: function getCompletionConfigInfo() { getCompletionConfigInfo: function getCompletionConfigInfo() {var _this = this;
//http://system.banshouhui.com/wxh-sts-rest/rest/worker/RTOKEN222bdab78b0d2a74f159b640df53180772813250/order/11885887?withMaintainDetailInfo=true&completionConfigInfo=true uni.showLoading({
title: '加载中' });
uni.request({ uni.request({
url: getApp().globalData.domain_Name + url: getApp().globalData.domain_Name +
'/wxh-worker-rest/rest/config/' + '/wxh-worker-rest/rest/config/' +
'RTOKEN52e603131ae93ac83ac0b3628064822690ee4de0' + getApp().globalData.token +
'/completion/' + this.orderId + '/completion/' + this.orderId +
'?inGuaranteePeriod=' + this.inGuaranteePeriod, '?inGuaranteePeriod=' + this.inGuaranteePeriod,
method: 'GET', method: 'GET',
...@@ -263,10 +351,12 @@ var _default = ...@@ -263,10 +351,12 @@ var _default =
'Content-Type': 'application/x-www-form-urlencoded' }, 'Content-Type': 'application/x-www-form-urlencoded' },
success: function success(res) { success: function success(res) {
uni.hideLoading();
console.log('获取完工页详情 成功'); console.log('获取完工页详情 成功');
console.log(res); console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
_this.adjustData(res);
} else { } else {
uni.showToast({ uni.showToast({
...@@ -279,12 +369,35 @@ var _default = ...@@ -279,12 +369,35 @@ var _default =
}, },
fail: function fail(e) { fail: function fail(e) {
uni.hideLoading();
console.log('获取完工页详情 失败'); console.log('获取完工页详情 失败');
console.log(e); console.log(e);
} }); } });
}, },
//数据处理
adjustData: function adjustData(res) {
res.data.data.fieldsItems.forEach(function (item) {
//照片
if (item.fieldsType == 'PHOTOS') {
console.log('处理前 的 照片数组:');
console.log(item.fieldsValue);
var photoList = [{ image: '111' }, { image: '222' }, { image: '333' }, { image: '444' }];
item.fieldsValue = photoList;
console.log('处理后 的 照片数组:');
console.log(item.fieldsValue);
}
});
this.orderInfo = res.data.data;
},
clickTypeClick: function clickTypeClick(item) { clickTypeClick: function clickTypeClick(item) {
console.log('点击类 点击'); console.log('点击类 点击');
console.log(item.title); console.log(item.title);
...@@ -340,12 +453,12 @@ var _default = ...@@ -340,12 +453,12 @@ var _default =
//第五步:字典 转 JSON //第五步:字典 转 JSON
*/ */
saveInfo: function saveInfo() {var _this = this; saveInfo: function saveInfo() {var _this2 = this;
console.log('保存完工信息 点击'); console.log('保存完工信息 点击');
uni.request({ uni.request({
url: getApp().globalData.domain_Name + url: getApp().globalData.domain_Name +
'/wxh-worker-rest/rest/' + '/wxh-worker-rest/rest/' +
'RTOKEN52e603131ae93ac83ac0b3628064822690ee4de0' + getApp().globalData.token +
'/order/' + this.orderId + '/order/' + this.orderId +
'/maintain', '/maintain',
method: 'POST', method: 'POST',
...@@ -363,7 +476,7 @@ var _default = ...@@ -363,7 +476,7 @@ var _default =
if (res.statusCode == 200) { if (res.statusCode == 200) {
_this.finishConfirm(); _this2.finishConfirm();
} else { } else {
uni.showToast({ uni.showToast({
...@@ -401,7 +514,7 @@ var _default = ...@@ -401,7 +514,7 @@ var _default =
uni.request({ uni.request({
url: getApp().globalData.domain_Name + url: getApp().globalData.domain_Name +
'/wxh-worker-rest/rest/' + '/wxh-worker-rest/rest/' +
'RTOKEN52e603131ae93ac83ac0b3628064822690ee4de0' + getApp().globalData.token +
'/order/' + this.orderId + '/order/' + this.orderId +
'/finishedAndConfirm', '/finishedAndConfirm',
method: 'POST', method: 'POST',
......
<view><view class="topView"><view class="nameView"><text class="u-font-24 u-m-l-24">{{"联系人:"+orderInfo.name}}</text><text data-event-opts="{{[['tap',[['phoneCallClick',['$0'],['orderInfo.phone']]]]]}}" class="u-font-24 u-m-l-24 underLine" bindtap="__e">{{orderInfo.phone}}</text></view><text class="u-font-24 u-m-l-24 u-m-t-24">{{"地址:"+orderInfo.address}}</text><view class="typeView"><text class="u-font-24 u-m-l-24">{{"类型:("+orderInfo.guard+") "+orderInfo.type}}</text><text class="u-font-24 u-m-r-24">{{"产品:"+orderInfo.product}}</text></view></view><block wx:for="{{orderInfo.typeList}}" wx:for-item="item" wx:for-index="ikey"><block wx:if="{{item.type=='click'||item.type=='scan'}}"><view data-event-opts="{{[['tap',[['clickTypeClick',['$0'],[[['orderInfo.typeList','',ikey]]]]]]]}}" class="clickTypeView" bindtap="__e"><text class="u-font-24 u-m-l-24">{{item.title}}</text><image class="arrowIcon u-m-r-24" src mode></image></view></block><block wx:if="{{item.type=='photo'}}"><view class="inputTypeView"><text class="u-font-24 u-m-l-24">{{item.title}}</text><input class="input u-m-r-24" type="text" value="" placeholder="请输入内容"/></view></block><block wx:if="{{item.type=='photo'}}"><view class="photoTypeView"><text class="u-font-24 u-m-l-24 u-m-t-24">{{item.title}}</text><block wx:if="{{item.images.length>0}}"><view class="photoBackView u-p-b-24"><block wx:for="{{item.images}}" wx:for-item="item" wx:for-index="ikey" wx:key="ikey"><view data-event-opts="{{[['tap',[['photoClick',['$0'],[[['orderInfo.typeList','',ikey],['images','',ikey]]]]]]]}}" class="photoItemView" bindtap="__e"><image class="photoImage" src="{{item.image}}" mode="aspectFill"></image></view></block></view></block></view></block><block wx:if="{{item.type=='textArea'}}"><view class="textAreaTypeView bottomPadding"><text class="u-font-24 u-m-l-24 u-m-t-24">{{item.title}}</text><view class="textAreaView"><textarea class="textArea u-m-l-24 u-m-r-24 u-m-t-24 u-m-b-24" value="" placeholder="请输入备注"></textarea></view></view></block></block><view data-event-opts="{{[['tap',[['confirmClick']]]]}}" class="bottomView" bindtap="__e"><text class="bottomTitle">确认完工</text></view></view> <view class="backView"><view class="topView u-p-b-30"><view class="itemView u-m-t-30"><text class="titleText u-m-l-30">联系人:</text><block wx:if="{{contactName}}"><text class="contentText u-m-l-20">{{contactName}}</text></block><block wx:if="{{contactMobilephone}}"><text class="contentText u-m-l-20 underLine">{{contactMobilephone}}</text></block></view><view class="itemView u-m-t-30"><text class="titleText u-m-l-30">地址:</text><block wx:if="{{contactAddress}}"><text class="contentText u-m-l-20">{{contactAddress}}</text></block></view><view class="itemView u-m-t-30"><text class="titleText u-m-l-30">类型:</text><block wx:if="{{inGuaranteePeriodText}}"><text class="contentText u-m-l-20">{{"("+inGuaranteePeriodText+") "+orderServiceType}}</text></block></view></view><view class="padding_bottom_180"><block wx:for="{{orderInfo.fieldsItems}}" wx:for-item="item" wx:for-index="ikey"><block wx:if="{{item.fieldsType=='SPECIFICATIONS'||item.fieldsType=='PRODUCT_NUMBER'||item.fieldsType=='MACHINE_CODE'||item.fieldsType=='DATE'||item.fieldsType=='SERVICE_MEASURES'||item.fieldsType=='WEBPAGE'||item.fieldsType=='RADIO'||item.fieldsType=='CHECKBOX'||item.fieldsType=='RADIO_BIG'||item.fieldsType=='CHECKBOX_BIG'}}"><view data-event-opts="{{[['tap',[['clickTypeClick',['$0'],[[['orderInfo.fieldsItems','',ikey]]]]]]]}}" class="clickTypeView" bindtap="__e"><view class="itemTitleView borderBottom"><text class="itemTitle bold">{{item.fieldsTitle}}</text><block wx:if="{{item.required}}"><text class="itemRedStar">*</text></block></view><view class="clickRightView"><image class="arrowIcon u-m-r-30" src="{{icon_arrow_right}}" mode></image><block wx:if="{{item.fieldsValue}}"><text class="clickContent">{{item.fieldsValue}}</text></block></view></view></block><block wx:if="{{item.fieldsType=='INTEGER'||item.fieldsType=='DECIMAL'||item.fieldsType=='DOUBLE'||item.fieldsType=='STRING'||item.fieldsType=='FILE'||item.fieldsType=='ICN'}}"><view class="inputTypeView"><view class="itemTitleView borderBottom"><text class="itemTitle bold">{{item.fieldsTitle}}</text><block wx:if="{{item.required}}"><text class="itemRedStar">*</text></block></view><input class="input u-m-r-30" type="text" value="" placeholder="{{'请输入'+item.fieldsTitle}}"/></view></block><block wx:if="{{item.fieldsType=='PHOTOS'}}"><view class="photoTypeView"><view class="itemTitleView borderBottom"><text class="itemTitle bold">{{item.fieldsTitle}}</text><block wx:if="{{item.required}}"><text class="itemRedStar">*</text></block></view><block wx:if="{{item.fieldsValue}}"><view class="photoBackView u-p-b-30"><block wx:for="{{item.fieldsValue}}" wx:for-item="item" wx:for-index="ikey" wx:key="ikey"><view data-event-opts="{{[['tap',[['photoClick',['$0'],[[['orderInfo.fieldsItems','',ikey],['fieldsValue','',ikey]]]]]]]}}" class="photoItemView" bindtap="__e"><image class="photoImage" src="{{item.image}}" mode="aspectFill"></image></view></block></view></block></view></block><block wx:if="{{item.fieldsType=='TEXT'}}"><view class="textAreaTypeView"><view class="itemTitleView borderBottom"><text class="itemTitle bold">{{item.fieldsTitle}}</text><block wx:if="{{item.required}}"><text class="itemRedStar">*</text></block></view><view class="textAreaView"><view class="textAreaBoxView"><textarea class="textArea" value="{{demandContent}}" placeholder="请输入服务需求或故障说明,如:空调不冷、洗衣机漏水、安装晾衣架、安装洗衣机等" placeholder-style="color:#CCCCCC;font-size:28rpx;" data-event-opts="{{[['input',[['__set_model',['','demandContent','$event',[]]]]]]}}" bindinput="__e"></textarea></view></view></view></block></block></view><view data-event-opts="{{[['tap',[['confirmClick']]]]}}" class="bottomView" bindtap="__e"><text class="bottomTitle">确认完工</text></view></view>
\ No newline at end of file \ No newline at end of file
.topView{ .backView{
background-color: #FFFFFF; background-color: #FAFAFA;
position: absolute;
top: 0;
left: 0;
width: 100%; width: 100%;
height: 100%;
display: -webkit-box; display: -webkit-box;
display: -webkit-flex; display: -webkit-flex;
display: flex; display: flex;
...@@ -9,31 +13,34 @@ ...@@ -9,31 +13,34 @@
-webkit-box-direction: normal; -webkit-box-direction: normal;
-webkit-flex-direction: column; -webkit-flex-direction: column;
flex-direction: column; flex-direction: column;
border-bottom: 2rpx solid #999999;
} }
.nameView{ .topView{
background-color: #FFFFFF;
width: 100%; width: 100%;
margin-top: 24rpx;
display: -webkit-box; display: -webkit-box;
display: -webkit-flex; display: -webkit-flex;
display: flex; display: flex;
-webkit-box-orient: horizontal; -webkit-box-orient: vertical;
-webkit-box-direction: normal; -webkit-box-direction: normal;
-webkit-flex-direction: row; -webkit-flex-direction: column;
flex-direction: row; flex-direction: column;
-webkit-box-align: center; }
-webkit-align-items: center; .titleText{
align-items: center; color: #333333;
font-size: 28rpx;
font-weight: bold;
}
.contentText{
color: #333333;
font-size: 28rpx;
} }
.underLine{ .underLine{
text-decoration:underline; text-decoration:underline;
} }
.bottomPadding{ .clickTypeView{
padding-bottom: 144rpx; background-color: #FFFFFF;
}
.typeView{
width: 100%; width: 100%;
height: 80rpx; height: 88rpx;
display: -webkit-box; display: -webkit-box;
display: -webkit-flex; display: -webkit-flex;
display: flex; display: flex;
...@@ -47,11 +54,12 @@ ...@@ -47,11 +54,12 @@
-webkit-box-pack: justify; -webkit-box-pack: justify;
-webkit-justify-content: space-between; -webkit-justify-content: space-between;
justify-content: space-between; justify-content: space-between;
border: 2rpx solid #FAFAFA;
} }
.bottomView{ .itemTitleView{
background-color: #FFFFFF; background-color: #FFFFFF;
width: 100%; width: 30%;
height: 110rpx; height: 88rpx;
display: -webkit-box; display: -webkit-box;
display: -webkit-flex; display: -webkit-flex;
display: flex; display: flex;
...@@ -62,25 +70,49 @@ ...@@ -62,25 +70,49 @@
-webkit-box-align: center; -webkit-box-align: center;
-webkit-align-items: center; -webkit-align-items: center;
align-items: center; align-items: center;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
border-top: 2rpx solid #999999;
position: fixed;
bottom: 0;
} }
.bottomTitle{ .itemTitle {
font-size: 32rpx; background-color: #FFFFFF;
margin-left: 30rpx;
font-size: 28rpx;
color: #333333;
}
.bold {
font-weight: bold;
}
.itemRedStar {
font-size: 28rpx;
color: #D02B2B;
}
.clickRightView{
background-color: #FFFFFF;
width: 40%;
height: 88rpx;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: reverse;
-webkit-flex-direction: row-reverse;
flex-direction: row-reverse;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
} }
.arrowIcon{ .arrowIcon{
background-color: #999999; background-color: #FFFFFF;
width: 20rpx; width: 16rpx;
height: 50rpx; height: 28rpx;
} }
.clickTypeView{ .clickContent{
margin-right: 20rpx;
font-size: 28rpx;
color: #333333;
}
.inputTypeView{
background-color: #FFFFFF; background-color: #FFFFFF;
width: 100%; width: 100%;
height: 80rpx; height: 88rpx;
display: -webkit-box; display: -webkit-box;
display: -webkit-flex; display: -webkit-flex;
display: flex; display: flex;
...@@ -94,7 +126,13 @@ ...@@ -94,7 +126,13 @@
-webkit-box-pack: justify; -webkit-box-pack: justify;
-webkit-justify-content: space-between; -webkit-justify-content: space-between;
justify-content: space-between; justify-content: space-between;
border: 2rpx solid #999999; border: 2rpx solid #FAFAFA;
}
.input{
background-color: #FFFFFF;
width: 50%;
height: 60rpx;
text-align: right;
} }
.photoTypeView{ .photoTypeView{
background-color: #FFFFFF; background-color: #FFFFFF;
...@@ -145,19 +183,47 @@ ...@@ -145,19 +183,47 @@
.textAreaView{ .textAreaView{
background-color: #FFFFFF; background-color: #FFFFFF;
width: 100%; width: 100%;
height: 400rpx; height: 196rpx;
display: -webkit-box; }
display: -webkit-flex; .textAreaBoxView{
display: flex; background-color: #FFFFFF;
margin-left: 30rpx;
margin-right: 30rpx;
width: 690rpx;
height: 156rpx;
border: 2rpx solid #CCCCCC;
} }
.textArea{ .textArea{
background-color: #FFFFFF; background-color: #FFFFFF;
margin-top: 24rpx;
margin-left: 25rpx;
width: 640rpx;
height: 108rpx;
}
.padding_bottom_180{
padding-bottom: 180rpx;
}
.nameView{
width: 100%; width: 100%;
height: 90%; margin-top: 24rpx;
border: 2rpx solid #999999; display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-webkit-flex-direction: row;
flex-direction: row;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
} }
.inputTypeView{ .underLine{
background-color: #FFFFFF; text-decoration:underline;
}
.bottomPadding{
padding-bottom: 144rpx;
}
.typeView{
width: 100%; width: 100%;
height: 80rpx; height: 80rpx;
display: -webkit-box; display: -webkit-box;
...@@ -173,14 +239,43 @@ ...@@ -173,14 +239,43 @@
-webkit-box-pack: justify; -webkit-box-pack: justify;
-webkit-justify-content: space-between; -webkit-justify-content: space-between;
justify-content: space-between; justify-content: space-between;
border: 2rpx solid #999999;
} }
.input{ .bottomView{
background-color: #FFFFFF; background-color: #FFFFFF;
width: 50%; width: 100%;
height: 60rpx; height: 110rpx;
text-align: right; display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-webkit-flex-direction: row;
flex-direction: row;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
border-top: 2rpx solid #999999;
position: fixed;
bottom: 0;
} }
.bottomTitle{
font-size: 32rpx;
}
...@@ -275,23 +275,25 @@ __webpack_require__.r(__webpack_exports__); ...@@ -275,23 +275,25 @@ __webpack_require__.r(__webpack_exports__);
onShow: function onShow() { onShow: function onShow() {
//this.getData(); /*
uni.getStorage({ uni.getStorage({
key: 'token', key: 'token',
success: function success(res) { success: function (res) {
console.log('本地获取token成功'); console.log('本地获取token成功')
console.log(res.data); console.log(res.data);
getApp().globalData.token = res.data; getApp().globalData.token = res.data
} }); }
})
this.getData(); this.getData()
*/
this.getToken();
}, },
getToken: function getToken() {var _this = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee() {return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:_context.next = 2;return ( getToken: function getToken() {var _this = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee() {return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:_context.next = 2;return (
uni.getStorage({ uni.getStorage({
key: 'token', key: 'token',
success: function success(res) { success: function success(res) {
...@@ -304,8 +306,6 @@ __webpack_require__.r(__webpack_exports__); ...@@ -304,8 +306,6 @@ __webpack_require__.r(__webpack_exports__);
_this.getData());case 4:case "end":return _context.stop();}}}, _callee);}))(); _this.getData());case 4:case "end":return _context.stop();}}}, _callee);}))();
}, },
methods: { methods: {
...@@ -457,20 +457,23 @@ __webpack_require__.r(__webpack_exports__); ...@@ -457,20 +457,23 @@ __webpack_require__.r(__webpack_exports__);
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pages/take/detail' + '?orderId=' + item.orderId }); url: '/pages/take/detail' +
'?orderId=' + item.orderId });
} }
} }
if (this.activeTop == 1) { if (this.activeTop == 1) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/take/detail' + '?orderId=' + item.orderId }); url: '/pages/take/detail' +
'?orderId=' + item.orderId });
} }
if (this.activeTop == 2) { if (this.activeTop == 2) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/take/detail' + '?orderId=' + item.orderId }); url: '/pages/take/detail' +
'?orderId=' + item.orderId });
} }
......
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