优化头信息app_id 问题

This commit is contained in:
吴学文 2020-04-28 21:02:11 +08:00
parent b269ddc4b9
commit 207c9a68ce
5 changed files with 84 additions and 22 deletions

View File

@ -17,11 +17,11 @@ const factory = require("../factory/index.js");
const getHeaders = function() {
return {
app_id: constant.app.appId,
transaction_id: util.core.wxuuid(),
req_time: util.date.getDateYYYYMMDDHHMISS(),
sign: '1234567',
user_id: '-1',
'app-id': constant.app.appId,
'transaction-id': util.core.wxuuid(),
'req-time': util.date.getDateYYYYMMDDHHMISS(),
'sign': '1234567',
'user-id': '-1',
cookie: '_java110_token_=' + wx.getStorageSync('token')
};
};

View File

@ -77,7 +77,7 @@ class LoginFactory {
url: constant.url.loginUrl,
method: 'post',
header: {
APP_ID: constant.app.appId
'APP-ID': constant.app.appId
},
data: _tmpUserInfo,
success: function (res) {

View File

@ -128,9 +128,9 @@
}
},
{
"path" : "pages/myModify/myModifyDetail",
"path" : "pages/repairDetail/repairDetail",
"style" : {
"navigationBarTitleText": "我的维修详情"
"navigationBarTitleText": "维修详情"
}
}
],

View File

@ -1,7 +1,7 @@
<template>
<view>
<view class="padding margin-top">
<text>保修详情</text>
<text>报修单详情</text>
</view>
<view class="cu-list menu" >
<view class="cu-item">
@ -10,7 +10,7 @@
<text class="text-grey">报修ID</text>
</view>
<view class="action">
<text class="text-grey text-sm">{{modifyComplaint.repairId}}</text>
<text class="text-grey text-sm">{{repairDetailInfo.repairId}}</text>
</view>
</view>
<view class="cu-item">
@ -19,7 +19,7 @@
<text class="text-grey">报修类型</text>
</view>
<view class="action">
<text class="text-grey text-sm">{{modifyComplaint.repairTypeName}}</text>
<text class="text-grey text-sm">{{repairDetailInfo.repairTypeName}}</text>
</view>
</view>
<view class="cu-item">
@ -28,7 +28,7 @@
<text class="text-grey">报修人</text>
</view>
<view class="action">
<text class="text-grey text-sm">{{modifyComplaint.userName}}</text>
<text class="text-grey text-sm">{{repairDetailInfo.userName}}</text>
</view>
</view>
<view class="cu-item">
@ -37,7 +37,7 @@
<text class="text-grey">联系方式</text>
</view>
<view class="action">
<text class="text-grey text-sm">{{modifyComplaint.tel}}</text>
<text class="text-grey text-sm">{{repairDetailInfo.tel}}</text>
</view>
</view>
<view class="cu-item">
@ -46,7 +46,7 @@
<text class="text-grey">房屋编号</text>
</view>
<view class="action">
<text class="text-grey text-sm">{{modifyComplaint.roomId}}</text>
<text class="text-grey text-sm">{{repairDetailInfo.roomId}}</text>
</view>
</view>
<view class="cu-item">
@ -55,7 +55,7 @@
<text class="text-grey">预约时间</text>
</view>
<view class="action">
<text class="text-grey text-sm">{{modifyComplaint.appointmentTime}}</text>
<text class="text-grey text-sm">{{repairDetailInfo.appointmentTime}}</text>
</view>
</view>
<view class="cu-item">
@ -64,7 +64,7 @@
<text class="text-grey">维修师傅</text>
</view>
<view class="action">
<text class="text-grey text-sm">{{modifyComplaint.repairName}}</text>
<text class="text-grey text-sm">{{repairDetailInfo.repairName}}</text>
</view>
</view>
<view class="cu-item">
@ -73,7 +73,7 @@
<text class="text-grey">状态</text>
</view>
<view class="action">
<text class="text-grey text-sm">{{modifyComplaint.stateName}}</text>
<text class="text-grey text-sm">{{repairDetailInfo.stateName}}</text>
</view>
</view>
<view class="cu-item">
@ -82,7 +82,7 @@
<text class="text-grey">报修内容</text>
</view>
<view class="action">
<text class="text-grey text-sm">{{modifyComplaint.context}}</text>
<text class="text-grey text-sm">{{repairDetailInfo.context}}</text>
</view>
</view>
</view>
@ -94,12 +94,15 @@
export default {
data() {
return {
complaintId:'',
modifyComplaint:{}
repairDetailInfo:{},
storeId:'',
repairId:''
}
},
onLoad(options) {
let _complaintId = options.complaintId;
this.storeId = options.storeId;
this.repairId = options.repairId;
console.log('options',options);
this.complaintId = _complaintId;
@ -111,6 +114,48 @@
this.modifyComplaint = wx.getStorageSync("_toModifyComplaint_"+this.complaintId);
},
_queryRepairDetail:function(){
let _that = this;
let _objData = {
page: 1,
row: 1,
storeId: _that.storeId,
communityId:_that.java110Context.getCurrentCommunity().communityId,
repairId:_that.repairId
};
this.java110Context.request({
url: _that.java110Constant.url.listOwnerRepairs,
header: _that.java110Context.getHeaders(),
method: "GET",
data: _objData, //
success: function(res) {
console.log("请求返回信息:", res);
if (res.statusCode != 200) {
uni.showToast({
icon:'none',
title:res.data
});
return;
}
let _data = res.data;
_that.repairDetailInfo = _data.ownerRepairs[0];
_data.ownerRepairs.forEach(function(item){
let dateStr = item.appointmentTime;
console.log(dateStr);
let _date=new Date(dateStr);
item.appointmentTime = (_date.getMonth()+1) +'-'+_date.getDate();
});
},
fail: function(e) {
wx.showToast({
title: "服务器异常了",
icon: 'none',
duration: 2000
});
}
});
}
}
}
</script>

View File

@ -14,7 +14,7 @@
<view class="margin-top" v-if="state=='10001'">
<view class="cu-list menu-avatar">
<view class="cu-item arrow" v-for="(item,index) in myRepairOrders" :key="index" @tap="_toAuditComplaintOrder(item)">
<view class="cu-item arrow" v-for="(item,index) in myRepairOrders" :key="index" @tap="_toRepairOrderDetail(item)">
<view class="cu-avatar round lg" :style="'background-image:url('+orderImg+');'">
</view>
<view class="content">
@ -22,7 +22,8 @@
<view class="text-gray text-sm flex">
<view class="text-cut">
{{item.repairName}}
</view> </view>
</view>
</view>
</view>
<view class="action">
<view class="text-grey text-xs">{{item.appointmentTime}}</view>
@ -167,8 +168,17 @@
minDate: new Date().getTime(),
bindDate: '请选择',
bindTime: '请选择',
storeId:''
}
},
onLoad(){
let _userInfo = this.java110Context.getUserInfo();
let _storeId = _userInfo.storeId;
this.storeId = _storeId;
},
onShow() {
//this._loadMyOrders();
@ -316,9 +326,16 @@
timeChange:function(e){
this.bindTime = e.detail.value;
},
_toRepairOrderDetail:function(_item){
let repairId = _item.repairId;
uni.navigateTo({
url:'/pages/repairDetail/repairDetail?repairId='+repairId + '&storeId='+this.storeId
});
},
_submitRepair: function(e) {
let _that = this;
let _userInfo = this.java110Context.getUserInfo();
let storeId = _userInfo.storeId;
let obj = {