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

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

parent 4e18bac8
......@@ -28,7 +28,8 @@
icon_noData:'https://qn-static.banshouhui.com/empty.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获取用户信息(登录)
......
......@@ -14,14 +14,23 @@
},
{
"path": "pages/take/detail",
"path": "pages/take/finish",
"style": {
"navigationBarTitleText": "接单详情"
"navigationBarTitleText": "完工信息"
}
},
{
"path": "pages/take/detail",
"style": {
"navigationBarTitleText": "接单详情"
}
},
{
"path": "pages/index/index",
"style": {
......@@ -62,15 +71,7 @@
"navigationBarTitleText": "授权登录"
}
},
{
"path": "pages/take/finish",
"style": {
"navigationBarTitleText": "完工信息"
}
}
}
],
......
......@@ -82,7 +82,7 @@
<text class="contentText u-m-l-20" v-if="orderInfo.guaranteeExplain">{{orderInfo.guaranteeExplain}}</text>
</view>
</view>
<view class="bottomView" v-if="orderInfo.status != '已完工'">
<view class="bottomView" v-if="orderInfo.statusText != '已完工'">
<view class="bottomLeftView" @click="cancelClick()">
<text class="u-font-28 gray66">退单</text>
</view>
......@@ -97,6 +97,7 @@
export default {
data() {
return {
orderId:'',
orderInfo:{},
photoList:[
{image:''},{image:''},{image:''},{image:''},
......@@ -110,6 +111,7 @@
if(e && e.orderId){
this.orderId = e.orderId
}
this.domain_name = getApp().globalData.domain_Name
//this.orderId = '10704466'
//getApp().globalData.token = 'RTOKENc9496ce49b2dc61bbae67968979af4f19e0dfad0'
......@@ -176,11 +178,62 @@
cancelClick: function () {
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 () {
uni.navigateTo({
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 @@
onShow() {
//this.getData();
/*
uni.getStorage({
key: 'token',
success: function (res) {
......@@ -156,10 +156,12 @@
})
this.getData()
*/
this.getToken()
},
async getToken () {
await uni.getStorage({
key: 'token',
success: function (res) {
......@@ -172,8 +174,6 @@
})
await this.getData()
},
methods: {
......@@ -325,20 +325,23 @@
})
}else{
uni.navigateTo({
url: '/pages/take/detail'+'?orderId='+item.orderId
url: '/pages/take/detail'
+'?orderId='+item.orderId,
})
}
}
if(this.activeTop==1){
uni.navigateTo({
url: '/pages/take/detail'+'?orderId='+item.orderId
url: '/pages/take/detail'
+'?orderId='+item.orderId,
})
}
if(this.activeTop==2){
uni.navigateTo({
url: '/pages/take/detail'+'?orderId='+item.orderId
url: '/pages/take/detail'
+'?orderId='+item.orderId,
})
}
......
{
"pages": [
"pages/take/index",
"pages/take/finish",
"pages/take/detail",
"pages/index/index",
"pages/take/rob",
"pages/index/record",
"pages/index/success",
"pages/login/wxlogin",
"pages/take/finish"
"pages/login/wxlogin"
],
"subPackages": [],
"window": {
......
......@@ -131,7 +131,8 @@ var _default =
icon_noData: 'https://qn-static.banshouhui.com/empty.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获取用户信息(登录)
......
......@@ -3486,6 +3486,7 @@ u-dropdown {
/*每个页面公共css */
......
......@@ -229,6 +229,7 @@ var _default =
{
data: function data() {
return {
orderId: '',
orderInfo: {},
photoList: [
{ image: '' }, { image: '' }, { image: '' }, { image: '' }],
......@@ -242,6 +243,7 @@ var _default =
if (e && e.orderId) {
this.orderId = e.orderId;
}
this.domain_name = getApp().globalData.domain_Name;
//this.orderId = '10704466'
//getApp().globalData.token = 'RTOKENc9496ce49b2dc61bbae67968979af4f19e0dfad0'
......@@ -308,11 +310,62 @@ var _default =
cancelClick: function cancelClick() {
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() {
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;
/* 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__);
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var _default =
{
data: function data() {
return {
icon_arrow_right: '',
orderId: '',
inGuaranteePeriod: false,
orderInfo: {
name: '梵护博',
phone: '15811112222',
address: '广东省深圳市宝安区新安街道庭威产业园10C',
guard: '保内',
type: '维修-调试',
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' }] } };
contactName: '',
contactMobilephone: '',
contactAddress: '',
inGuaranteePeriodText: '',
orderServiceType: '',
orderInfo: {} };
},
onLoad: function onLoad(e) {
this.orderId = '10704466';
this.inGuaranteePeriod = false;
this.getTopInfo(e);
this.getConfig();
this.getCompletionConfigInfo();
},
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() {
console.log('获取 完工配置项');
uni.request({
url: getApp().globalData.domain_Name +
'/wxh-worker-rest/rest/config/' +
'RTOKEN52e603131ae93ac83ac0b3628064822690ee4de0' +
getApp().globalData.token +
'/completion/' + this.orderId +
'?inGuaranteePeriod=' + this.inGuaranteePeriod,
method: 'GET',
......@@ -247,12 +333,14 @@ var _default =
},
//获取完工页详情
getCompletionConfigInfo: function getCompletionConfigInfo() {
//http://system.banshouhui.com/wxh-sts-rest/rest/worker/RTOKEN222bdab78b0d2a74f159b640df53180772813250/order/11885887?withMaintainDetailInfo=true&completionConfigInfo=true
getCompletionConfigInfo: function getCompletionConfigInfo() {var _this = this;
uni.showLoading({
title: '加载中' });
uni.request({
url: getApp().globalData.domain_Name +
'/wxh-worker-rest/rest/config/' +
'RTOKEN52e603131ae93ac83ac0b3628064822690ee4de0' +
getApp().globalData.token +
'/completion/' + this.orderId +
'?inGuaranteePeriod=' + this.inGuaranteePeriod,
method: 'GET',
......@@ -263,10 +351,12 @@ var _default =
'Content-Type': 'application/x-www-form-urlencoded' },
success: function success(res) {
uni.hideLoading();
console.log('获取完工页详情 成功');
console.log(res);
if (res.data.code == 200) {
_this.adjustData(res);
} else {
uni.showToast({
......@@ -279,12 +369,35 @@ var _default =
},
fail: function fail(e) {
uni.hideLoading();
console.log('获取完工页详情 失败');
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) {
console.log('点击类 点击');
console.log(item.title);
......@@ -340,12 +453,12 @@ var _default =
//第五步:字典 转 JSON
*/
saveInfo: function saveInfo() {var _this = this;
saveInfo: function saveInfo() {var _this2 = this;
console.log('保存完工信息 点击');
uni.request({
url: getApp().globalData.domain_Name +
'/wxh-worker-rest/rest/' +
'RTOKEN52e603131ae93ac83ac0b3628064822690ee4de0' +
getApp().globalData.token +
'/order/' + this.orderId +
'/maintain',
method: 'POST',
......@@ -363,7 +476,7 @@ var _default =
if (res.statusCode == 200) {
_this.finishConfirm();
_this2.finishConfirm();
} else {
uni.showToast({
......@@ -401,7 +514,7 @@ var _default =
uni.request({
url: getApp().globalData.domain_Name +
'/wxh-worker-rest/rest/' +
'RTOKEN52e603131ae93ac83ac0b3628064822690ee4de0' +
getApp().globalData.token +
'/order/' + this.orderId +
'/finishedAndConfirm',
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>
\ No newline at end of file
<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
.topView{
background-color: #FFFFFF;
.backView{
background-color: #FAFAFA;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: -webkit-box;
display: -webkit-flex;
display: flex;
......@@ -9,31 +13,34 @@
-webkit-box-direction: normal;
-webkit-flex-direction: column;
flex-direction: column;
border-bottom: 2rpx solid #999999;
}
.nameView{
.topView{
background-color: #FFFFFF;
width: 100%;
margin-top: 24rpx;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: row;
flex-direction: row;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-flex-direction: column;
flex-direction: column;
}
.titleText{
color: #333333;
font-size: 28rpx;
font-weight: bold;
}
.contentText{
color: #333333;
font-size: 28rpx;
}
.underLine{
text-decoration:underline;
}
.bottomPadding{
padding-bottom: 144rpx;
}
.typeView{
.clickTypeView{
background-color: #FFFFFF;
width: 100%;
height: 80rpx;
height: 88rpx;
display: -webkit-box;
display: -webkit-flex;
display: flex;
......@@ -47,11 +54,12 @@
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between;
border: 2rpx solid #FAFAFA;
}
.bottomView{
.itemTitleView{
background-color: #FFFFFF;
width: 100%;
height: 110rpx;
width: 30%;
height: 88rpx;
display: -webkit-box;
display: -webkit-flex;
display: flex;
......@@ -62,25 +70,49 @@
-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;
.itemTitle {
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{
background-color: #999999;
width: 20rpx;
height: 50rpx;
background-color: #FFFFFF;
width: 16rpx;
height: 28rpx;
}
.clickTypeView{
.clickContent{
margin-right: 20rpx;
font-size: 28rpx;
color: #333333;
}
.inputTypeView{
background-color: #FFFFFF;
width: 100%;
height: 80rpx;
height: 88rpx;
display: -webkit-box;
display: -webkit-flex;
display: flex;
......@@ -94,7 +126,13 @@
-webkit-box-pack: justify;
-webkit-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{
background-color: #FFFFFF;
......@@ -145,19 +183,47 @@
.textAreaView{
background-color: #FFFFFF;
width: 100%;
height: 400rpx;
display: -webkit-box;
display: -webkit-flex;
display: flex;
height: 196rpx;
}
.textAreaBoxView{
background-color: #FFFFFF;
margin-left: 30rpx;
margin-right: 30rpx;
width: 690rpx;
height: 156rpx;
border: 2rpx solid #CCCCCC;
}
.textArea{
background-color: #FFFFFF;
margin-top: 24rpx;
margin-left: 25rpx;
width: 640rpx;
height: 108rpx;
}
.padding_bottom_180{
padding-bottom: 180rpx;
}
.nameView{
width: 100%;
height: 90%;
border: 2rpx solid #999999;
margin-top: 24rpx;
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{
background-color: #FFFFFF;
.underLine{
text-decoration:underline;
}
.bottomPadding{
padding-bottom: 144rpx;
}
.typeView{
width: 100%;
height: 80rpx;
display: -webkit-box;
......@@ -173,14 +239,43 @@
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between;
border: 2rpx solid #999999;
}
.input{
.bottomView{
background-color: #FFFFFF;
width: 50%;
height: 60rpx;
text-align: right;
width: 100%;
height: 110rpx;
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__);
onShow: function onShow() {
//this.getData();
uni.getStorage({
key: 'token',
success: function success(res) {
console.log('本地获取token成功');
console.log(res.data);
getApp().globalData.token = res.data;
} });
this.getData();
/*
uni.getStorage({
key: 'token',
success: function (res) {
console.log('本地获取token成功')
console.log(res.data);
getApp().globalData.token = res.data
}
})
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 (
uni.getStorage({
key: 'token',
success: function success(res) {
......@@ -304,8 +306,6 @@ __webpack_require__.r(__webpack_exports__);
_this.getData());case 4:case "end":return _context.stop();}}}, _callee);}))();
},
methods: {
......@@ -457,20 +457,23 @@ __webpack_require__.r(__webpack_exports__);
} else {
uni.navigateTo({
url: '/pages/take/detail' + '?orderId=' + item.orderId });
url: '/pages/take/detail' +
'?orderId=' + item.orderId });
}
}
if (this.activeTop == 1) {
uni.navigateTo({
url: '/pages/take/detail' + '?orderId=' + item.orderId });
url: '/pages/take/detail' +
'?orderId=' + item.orderId });
}
if (this.activeTop == 2) {
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