Commit 3adcf201 authored by 和慭琛's avatar 和慭琛

完工页面 接口对接

parent 2b061b66
......@@ -9,8 +9,9 @@
globalData: {
//https://system.banshouhui.com
//https://system.dev.banshouhui.com
domain_Name: 'https://system.dev.banshouhui.com',
//http://192.168.0.208:8192
domain_Name: 'http://192.168.0.208:37080',
//domain_Name: 'http://192.168.0.208:37080',
token:'',
//RTOKEN45f41a3053238cb72b3b72fe14df8d7040c9f502
......@@ -30,6 +31,8 @@
icon_rob:'https://qn-static.banshouhui.com/take_order/icon/rob.png',
//右箭头 图标
icon_arrow_right:'https://qn-static.banshouhui.com/arrow_right.png',
//照片添加 图标
icon_photo_add:'https://qn-static.banshouhui.com/take_order/icon/photo_add.png',
//登录注册页--
//通过code获取用户信息(登录)
......
......@@ -7,36 +7,52 @@
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/take/finish",
"path": "pages/take/index",
"style": {
"navigationBarTitleText": "完工信息"
"navigationBarTitleText": "接单"
}
},
{
"path": "pages/take/index",
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "接单"
"navigationBarTitleText": "下单"
}
},
{
"path": "pages/take/detail",
"path": "pages/take/finish",
"style": {
"navigationBarTitleText": "接单详情"
"navigationBarTitleText": "完工信息"
}
},
{
"path": "pages/index/index",
"path": "pages/take/measure",
"style": {
"navigationBarTitleText": "下单"
"navigationBarTitleText": "服务措施"
}
},
{
"path": "pages/take/detail",
"style": {
"navigationBarTitleText": "接单详情"
}
},
{
"path": "pages/take/rob",
"style": {
......
......@@ -11,7 +11,7 @@
</view>
</view>
<view class="listView">
<view class="itemView" v-if="activeTop == 0" v-for="(item,ikey) in unfinishList":key="ikey">
<view class="itemView" @click="itemClick(item)" v-if="activeTop == 0" v-for="(item,ikey) in unfinishList":key="ikey">
<view class="nameView">
<view class="nameLeftView">
<text class="nameText" v-if="item.contactName">{{item.contactName}}</text>
......@@ -35,7 +35,7 @@
<image class="noDataIcon" :src="icon_noData" mode=""></image>
<text class="noDataText">暂无数据</text>
</view>
<view class="itemView" v-if="activeTop == 1" v-for="(item,ikey) in finishList":key="ikey">
<view class="itemView" @click="itemClick(item)" v-if="activeTop == 1" v-for="(item,ikey) in finishList":key="ikey">
<view class="nameView">
<view class="nameLeftView">
<text class="nameText" v-if="item.contactName">{{item.contactName}}</text>
......@@ -91,12 +91,17 @@
methods: {
//'/wxh-worker-rest/rest/order/revision/applets/'
//+this.globalData.token+'/order/customer'
//getApp().globalData.createOrderList
//获取下单列表
createOrderList: function () {
let that = this
uni.request({
url: getApp().globalData.domain_Name
+getApp().globalData.createOrderList,
+'/wxh-worker-rest/rest/order/revision/applets/'
+getApp().globalData.token+'/order/customer',
method: 'GET',
data: {
type:this.activeTop,
......@@ -137,6 +142,7 @@
})
},
//顶部点击
topClick: function (active) {
if(this.activeTop!=active){
this.activeTop = active
......@@ -144,6 +150,7 @@
}
},
//拨打电话
callClick: function (phone) {
console.log(phone)
uni.makePhoneCall({
......@@ -151,6 +158,14 @@
});
},
//详情点击
itemClick: function (item) {
uni.navigateTo({
url: '/pages/take/detail'
+'?orderId='+item.orderId,
})
},
}
......
......@@ -21,7 +21,7 @@
export default {
data() {
return {
domain_name:'http://192.168.0.208:8192',
//domain_name:'http://192.168.0.208:8192',
isNewUser:false,
unionID:'',
openID:'',
......@@ -128,7 +128,7 @@
title:'加载中'
})
uni.request({
url: this.domain_name
url: getApp().globalData.domain_Name
+getApp().globalData.getUsersByCode,
method: 'GET',
data: {
......@@ -227,7 +227,7 @@
title:'加载中'
})
uni.request({
url: this.domain_name
url: getApp().globalData.domain_Name
+getApp().globalData.findByMobile,
method: 'POST',
data: {
......
......@@ -144,9 +144,7 @@
this.orderInfo = res.data.data
if(res.data.data.images){
this.photoList = res.data.data.images.split(',');
console.log('照片数组:')
console.log(this.photoList)
this.adjustPhotoList(res.data.data.images)
}
}else{
......@@ -166,6 +164,20 @@
})
},
//https://system.banshouhui.com/wxh-sts-rest/rest/file/image/order/13767/1442887919988.jpg
adjustPhotoList: function (images) {
var photoArray = images.split(',')
var newPhotoArray = []
photoArray.forEach(item => {
var imageURL = getApp().globalData.domain_Name + '/wxh-sts-rest' + item
newPhotoArray.push(imageURL)
})
this.photoList = newPhotoArray
console.log('照片数组:')
console.log(this.photoList)
},
phoneCallClick: function (phone) {
uni.makePhoneCall({
phoneNumber: phone
......
......@@ -62,7 +62,7 @@
<text class="itemRedStar" v-if="item.required">*</text>
</view>
<view class="photoBackView u-p-b-30" v-if="item.fieldsValue">
<view class="photoItemView" @click="photoClick(item)" v-for="(item,ikey) in item.fieldsValue":key="ikey">
<view class="photoItemView" @click="photoClick(item,ikey)" v-for="(item,ikey) in photoList":key="ikey">
<image class="photoImage" :src="item.image" mode="aspectFill"></image>
</view>
</view>
......@@ -137,6 +137,7 @@
data() {
return {
icon_arrow_right:'',
icon_photo_add:'',
orderId:'',
categoryId:'',
brandId:'',
......@@ -148,6 +149,9 @@
inGuaranteePeriodText:'',
orderServiceType:'',
orderInfo:{},
currentIndex:0,
//产品规格 相关
is_SPECIFICATIONS_picker_show:false,
result:{
result:""
......@@ -158,6 +162,10 @@
},
SPECIFICATIONS_list:[],
current_SPECIFICATIONS_specificationId:'',
SPECIFICATIONS_fieldsValue:'',
SPECIFICATIONS_fieldsOptions:'',
//产品型号相关
is_PRODUCT_NUMBER_picker_show:false,
PRODUCT_NUMBER_defaultProps:{
label:"name",
......@@ -165,23 +173,48 @@
},
PRODUCT_NUMBER_list:[],
current_PRODUCT_NUMBER_Id:'',
//日期相关
is_DATE_show:false,
type: 'date',
date: '2020/01/01',
value: '',
currentIndex:0
//处理措施 相关
measure_showContent:'',
measure_measureTypeName:'',
measure_measureTypeId:'',
measure_inGuaranteeCommission:'',
measure_outGuaranteeCharge:'',
measure_fieldsValue:'',
//照片相关
photoList:[],
photo_fieldsValue:'',
}
},
onLoad(e) {
this.getTopInfo(e)
//this.getConfig()
this.getCompletionConfigInfo()
},
onShow() {
this.checkMeasureInfo()
},
methods: {
//获取顶部信息
getTopInfo: function (e) {
this.icon_arrow_right = getApp().globalData.icon_arrow_right
this.icon_photo_add = getApp().globalData.icon_photo_add
if(e && e.orderId){
this.orderId = e.orderId
......@@ -225,7 +258,7 @@
//测试
///*
/*
getApp().globalData.token = 'RTOKEN9336b56cffb3c2bafec54b3687f86c38bfaa364a'
this.orderId = '10704464'
this.categoryId = '88',
......@@ -237,7 +270,7 @@
this.contactAddress = '广东省深圳市宝安区创业一路'
this.inGuaranteePeriodText = '保内'
this.orderServiceType = '维修'
//*/
*/
},
......@@ -295,12 +328,13 @@
//照片
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.photoList = [{image:'111'},{image:'222'},{image:'333'},{image:'444'}]
// 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)
}
})
......@@ -356,7 +390,7 @@
//服务措施 SERVICE_MEASURES
if(item.fieldsType == 'SERVICE_MEASURES'){
this.goToMeasure(item,ikey)
}
//网页 WEBPAGE (海尔需求 新增 网页类型)
......@@ -484,9 +518,7 @@
this.current_SPECIFICATIONS_specificationId = res.value
this.updateInfo('','SPECIFICATIONS',res.result)
//currentIndex,currentType,newValue
/*
"fieldsOptions":"{\"specificationId\":10006,\"specificationName\":\"变频3P\"}","sort":2}
*/
this.handleSPECIFICATIONSinfo(res.result,res.value)
},
......@@ -496,6 +528,33 @@
console.log('产品规格 取消选择')
},
//"fieldsOptions":"{\"specificationId\":10006,\"specificationName\":\"变频3P\"}","sort":2}
//处理产品规格 上传格式
handleSPECIFICATIONSinfo: function(specificationName,specificationId){
//上传格式 说明
//第一步 字段放进字典
var specificationDic = {
specificationId:specificationId,
specificationName:specificationName
}
//第二步 字典转JSON
var specificationJSON = {}
specificationJSON[0] = specificationDic
var specificationString = ''
specificationString = JSON.stringify(specificationJSON)
console.log('转为JSON后的产品规格数据')
console.log(specificationString)
this.SPECIFICATIONS_fieldsValue = specificationId
this.SPECIFICATIONS_fieldsOptions = specificationString
console.log('this.SPECIFICATIONS_fieldsValue:'+this.SPECIFICATIONS_fieldsValue)
console.log('this.SPECIFICATIONS_fieldsOptions:'+this.SPECIFICATIONS_fieldsOptions)
},
//http://system.banshouhui.com/wxh-sts-rest/rest/productinfo/category/88/brand/320/product
//http://192.168.1.22/wxh-sts-rest/rest/productinfo/category/88/brand/3897/product
//getApp().globalData.domain_Name
......@@ -503,7 +562,7 @@
//获取 产品型号 数据
getPRODUCT_NUMBERinfo: function () {
uni.request({
url: 'http://192.168.1.22'
url: getApp().globalData.domain_Name
+'/wxh-sts-rest/rest/productinfo/category/'
+this.categoryId
+'/brand/'+this.brandId
......@@ -598,6 +657,86 @@
this.updateInfo(this.currentIndex,'DATE',e.value)
}
},
//跳转到 服务措施 页面
goToMeasure: function (item,ikey) {
if(this.current_SPECIFICATIONS_specificationId.length==0){
uni.showToast({
title:'请先选择产品规格'
})
return
}
//this.currentIndex = ikey
uni.navigateTo({
url: '/pages/take/measure'
+ '?orderId=' + this.orderId
+ '&serviceType=' + this.orderServiceType
+ '&specificationId=' + this.current_SPECIFICATIONS_specificationId,
})
},
//检查获取 服务措施 信息
checkMeasureInfo: function () {
let pages = getCurrentPages();
let currPage = pages[pages.length-1];
console.log('检查获取 服务措施 信息')
this.measure_measureTypeName = currPage.data.measure_measureTypeName
this.measure_measureTypeId = currPage.data.measure_measureTypeId
this.measure_inGuaranteeCommission = currPage.data.measure_inGuaranteeCommission
this.measure_outGuaranteeCharge = currPage.data.measure_outGuaranteeCharge
this.measure_showContent = currPage.data.measure_showContent
if(this.measure_measureTypeName.length>0){
this.updateInfo('','SERVICE_MEASURES',this.measure_showContent)
this.handleMeasureInfo()
}
},
/*
[{\"categoryId\":88,
\"categoryName\":\"家用空调\",
\"deleteFlag\":false,
\"errorCause\":\"压缩机四通阀串气\",
\"errorDesc\":\"制冷效果差\",
\"inGuaranteeCommission\":280.0,
\"measureName\":\"更换四通阀\",
\"measureTypeId\":10022,
\"measureTypeName\":\"大修2\",
\"outGuaranteeRake\":-15.0,
\"repairType\":\"维修\"}]"
*/
//处理 服务措施 上传格式
handleMeasureInfo: function(){
//格式说明
//第一步:字段放进字典里
var measureDic = {
MeasureName:this.measure_showContent,
measureTypeName:this.measure_measureTypeName,
measureTypeId:this.measure_measureTypeId,
inGuaranteeCommission:this.measure_inGuaranteeCommission,
measure_outGuaranteeCharge:this.measure_outGuaranteeCharge
}
//第二步:字典放进数组里
var measureArray = [measureDic]
//第三步:数组转JSON
var measureJSON = {}
measureJSON[0] = measureArray
var measureString = ''
measureString = JSON.stringify(measureJSON)
measureString = JSON.stringify(measureArray)
console.log('转为JSON后 的 服务措施 数据')
console.log(measureString)
this.measure_fieldsValue = measureString
},
//输入类 事件处理
......@@ -677,6 +816,15 @@
}
//处理措施单独判断
if (item.fieldsType == 'SERVICE_MEASURES'
&& currentType == 'SERVICE_MEASURES'){
item.fieldsValue = newValue
console.log('处理措施单独判断')
break
}
if(item.fieldsType == currentType
&& i == currentIndex){
console.log('处理前 的 选项内容:')
......@@ -694,18 +842,124 @@
},
photoClick: function (item) {
console.log(item.image)
//console.log(key)
photoClick: function (item,ikey) {
console.log('照片点击')
console.log(ikey)
},
confirmClick: function () {
console.log('确认完工 点击')
this.saveInfo()
this.checkAllRequired()
},
//判断所有必填项
checkAllRequired: function (){
var isAllDone = true
for (var i=0;i<this.orderInfo.fieldsItems.length;i++)
{
var item = this.orderInfo.fieldsItems[i]
if(item.required == true){
if(!item.fieldsValue || item.fieldsValue.length==0){
isAllDone = false
uni.showToast({
title:'请填写'+item.fieldsTitle
})
break
}
}
}
if(isAllDone == false){
return
}
//处理 数据 上传格式
this.handleAllDataFormatStepOne()
},
//处理 数据 上传格式 第一步
handleAllDataFormatStepOne: function (){
console.log('处理 数据 上传格式 第一步')
//特殊格式添加替换
for (var i=0;i<this.orderInfo.fieldsItems.length;i++)
{
var item = this.orderInfo.fieldsItems[i]
//产品规格 单独处理
if (item.fieldsType == 'SPECIFICATIONS' ){
item.fieldsValue = this.SPECIFICATIONS_fieldsValue
item.fieldsOptions = this.SPECIFICATIONS_fieldsOptions
console.log('单独处理后的 产品规格')
console.log(item.fieldsValue)
console.log(item.fieldsOptions)
}
//产品型号 单独处理
// if (item.fieldsType == 'PRODUCT_NUMBER' ){
// item.fieldsValue = this.produ
// console.log('单独处理后的 产品型号')
// }
//处理措施 单独处理
if (item.fieldsType == 'SERVICE_MEASURES' ){
item.fieldsValue = this.measure_fieldsValue
console.log('单独处理后的 处理措施')
console.log(item.fieldsValue)
}
}
//处理 数据 上传格式 第二步
this.handleAllDataFormatStepTwo()
},
//处理 数据 上传格式 第二步
handleAllDataFormatStepTwo: function (){
console.log('处理 数据 上传格式 第二步')
//第一步 配置项数组 转 JSON
var orderInfoJSON = {}
for(var i=0; i<this.orderInfo.fieldsItems.length; i++){
orderInfoJSON[i] = this.orderInfo.fieldsItems[i]
}
var dataString = ''
dataString = JSON.stringify(orderInfoJSON)
dataString = JSON.stringify(this.orderInfo.fieldsItems)
console.log('转为JSON后的配置项数组')
console.log(dataString)
//第二步 放入key为maintainFields的字典中
var maintainFieldsDic = {maintainFields:dataString}
//第三步 maintainFields的字典 转 JSON
var maintainFieldsJSON = {}
maintainFieldsJSON[0] = maintainFieldsDic
var maintainString = ''
maintainString = JSON.stringify(maintainFieldsJSON)
//maintainString = JSON.stringify(maintainFieldsJSON)
console.log('转为JSON后的配置项 maintainString')
console.log(maintainString)
this.saveInfo(dataString)
},
//保存完工信息
/*
......@@ -728,7 +982,7 @@
//第五步:字典 转 JSON
*/
saveInfo: function () {
saveInfo: function (maintainFieldsJSON) {
console.log('保存完工信息 点击')
uni.request({
url: getApp().globalData.domain_Name
......@@ -738,13 +992,13 @@
+'/maintain',
method: 'POST',
data: {
maintainFields:''
maintainFields:maintainFieldsJSON
},
header:{
'Content-Type': 'application/x-www-form-urlencoded',
},
success: (res) => {
console.log('获取完工页详情 成功')
console.log('保存完工信息 成功')
console.log(res)
console.log(res.statusCode)
......@@ -764,7 +1018,7 @@
},
fail: (e) => {
console.log('获取完工页详情 失败')
console.log('保存完工信息 失败')
console.log(e)
uni.showToast({
title:'完工失败'
......@@ -1004,11 +1258,11 @@
}
.photoImage{
background-color: #FAFAFA;
background-color: #F3F3F3;
margin-left: 24rpx;
margin-right: 24rpx;
margin-top: 24rpx;
height: 260rpx;
height: 200rpx;
}
.textAreaTypeView{
......
......@@ -173,11 +173,11 @@
console.log(res.data);
getApp().globalData.token = res.data
this.getData()
}
})
await this.getData()
//await this.getData()
},
//获取数据
......
<template>
<view class="backView">
<view class="listView border_right_2">
<view class="itemView" @click="itemClick(0,item)" v-for="(item,ikey) in leftList":key="ikey">
<text :class="current_symptomsId == item.symptomsId ? 'selectedTitle' : 'itemTitle' ">{{item.symptomsName}}</text>
<image class="arrowIcon" :src="icon_arrow_right" mode=""></image>
</view>
</view>
<view class="listView border_right_2" v-if="is_mid_show">
<view class="itemView" @click="itemClick(1,item)" v-for="(item,ikey) in midList":key="ikey">
<text :class="current_causeId == item.causeId ? 'selectedTitle' : 'itemTitle' ">{{item.symptomsName}}</text>
<image class="arrowIcon" :src="icon_arrow_right" mode=""></image>
</view>
</view>
<view class="listView" v-if="is_right_show">
<view class="itemView" @click="itemClick(2,item)" v-for="(item,ikey) in rightList":key="ikey">
<text :class="current_measureId == item.measureId ? 'selectedTitle' : 'itemTitle' ">{{item.measureName}}</text>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
orderId:'',
serviceType:'',
specificationId:'',
icon_arrow_right:'',
current_symptomsId:'',
current_causeId:'',
current_measureId:'',
current_measureName:'',
is_mid_show:false,
is_right_show:false,
leftList:[{title:'左左左1'},{title:'左左左很长很长怎么办呢很长很长怎么办呢2'},{title:'左左左3'}],
midList:[{title:'中中中1'},{title:'中中中2'},{title:'中中中很长很长怎么办呢很长很长怎么办呢3'}],
rightList:[{title:'右右右很长很长怎么办呢很长很长怎么办呢1'},{title:'右右右2'},{title:'右右右3'}],
}
},
onLoad(e) {
if(e && e.orderId){
this.orderId = e.orderId
}
if(e && e.serviceType){
this.serviceType = e.serviceType
}
if(e && e.specificationId){
this.specificationId = e.specificationId
}
this.icon_arrow_right = getApp().globalData.icon_arrow_right
},
onShow() {
this.getConfig()
this.getLeftData()
},
methods: {
getConfig: function (){
//测试
/*
getApp().globalData.token = 'RTOKEN9336b56cffb3c2bafec54b3687f86c38bfaa364a'
this.orderId = '10704464'
this.serviceType = '维修'
this.specificationId = '10005'
*/
},
//选项点击
itemClick: function (side,item) {
console.log('item 点击')
console.log(side)
console.log(item)
//左边 现象
if(side == 0){
this.current_symptomsId = item.symptomsId
this.getMidData()
this.is_right_show = false
this.current_causeId = ''
this.current_measureId = ''
}
//中间 原因
if(side == 1){
this.current_causeId = item.causeId
this.getRightData()
this.current_measureId = ''
}
//右边 措施
if(side == 2){
this.current_measureId = item.measureId
this.current_measureName = item.measureName
this.getFinalData()
}
},
// http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKENa8f4a27fef05fbcc27d473f32694e51a68101242/price/newsymptoms/V2/11885888
//左边 获取 故障现象 数据
getLeftData: function () {
uni.request({
url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/order/'
+getApp().globalData.token
+'/price/newsymptoms/V2/'+this.orderId,
method: 'GET',
data: {
serviceType:this.serviceType
},
header:{
//'Content-Type': 'application/x-www-form-urlencoded',
},
success: (res) => {
uni.hideLoading()
console.log('获取 故障现象 成功')
console.log(res)
if(res.statusCode==200){
this.leftList = res.data
}else{
uni.showToast({
title:res.errMsg
})
}
},
fail: (e) => {
uni.hideLoading()
console.log('获取 故障现象 失败')
console.log(e)
}
})
},
// http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKEN1b8789e3a69982704a7c493a3877d55ab8f15c7d/price/cause/V2/11885888/10000
//中间 获取 查询故障现象 关联的 故障原因 数据
getMidData: function (){
uni.request({
url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/order/'
+getApp().globalData.token
+'/price/cause/V2/'+this.orderId
+'/'+this.current_symptomsId,
method: 'GET',
data: {
//serviceType:this.serviceType
},
header:{
//'Content-Type': 'application/x-www-form-urlencoded',
},
success: (res) => {
uni.hideLoading()
console.log('获取 查询故障现象 关联的 故障原因 成功')
console.log(res)
if(res.statusCode==200){
this.midList = res.data
this.is_mid_show = true
}else{
uni.showToast({
title:res.errMsg
})
}
},
fail: (e) => {
uni.hideLoading()
console.log('获取 查询故障现象 关联的 故障原因 失败')
console.log(e)
}
})
},
// http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKEN1b8789e3a69982704a7c493a3877d55ab8f15c7d/price/measure/V2/11885888/10001
//右边 获取 查询故障原因 关联的 服务措施详情以及价格 数据
getRightData: function(){
uni.request({
url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/order/'
+getApp().globalData.token
+'/price/measure/V2/'+this.orderId
+'/'+this.current_causeId,
method: 'GET',
data: {
//serviceType:this.serviceType
},
header:{
//'Content-Type': 'application/x-www-form-urlencoded',
},
success: (res) => {
uni.hideLoading()
console.log('获取 查询故障原因 关联的 服务措施详情以及价格 成功')
console.log(res)
if(res.statusCode==200){
this.rightList = res.data
this.is_right_show = true
}else{
uni.showToast({
title:res.errMsg
})
}
},
fail: (e) => {
uni.hideLoading()
console.log('获取 查询故障原因 关联的 服务措施详情以及价格 失败')
console.log(e)
}
})
},
//getToken,_specificationId,measuresId,_orderId
//http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKEN6c30a6be9e59f428455abd2fdb38fbaf360b4ae0/price/11634/charge/10001/measure/11885888
//最终请求
getFinalData: function () {
uni.request({
url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/order/'
+getApp().globalData.token
+'/price/'+this.specificationId
+'/charge/'+this.current_measureId
+'/measure/'+this.orderId,
method: 'GET',
data: {
//serviceType:this.serviceType
},
header:{
//'Content-Type': 'application/x-www-form-urlencoded',
},
success: (res) => {
uni.hideLoading()
console.log('最终请求 成功')
console.log(res)
if(res.statusCode==200){
uni.showToast({
title:'请求成功'
})
this.passValueAndBack(res)
}else{
uni.showToast({
title:res.errMsg
})
}
},
fail: (e) => {
uni.hideLoading()
console.log('最终请求 失败')
console.log(e)
}
})
},
//传值返回
passValueAndBack: function (res) {
let pages = getCurrentPages();
let prevPage = pages[pages.length - 2]; //上一个页面
prevPage.$vm.measure_measureTypeName = res.data.measureTypeName,
prevPage.$vm.measure_measureTypeId = res.data.measureTypeId,
prevPage.$vm.measure_inGuaranteeCommission = res.data.inGuaranteeCommission,
prevPage.$vm.measure_outGuaranteeCharge = res.data.outGuaranteeCharge,
prevPage.$vm.measure_showContent = this.current_measureName
uni.navigateBack({
})
},
}
}
</script>
<style>
.backView{
background-color: #FAFAFA;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
flex-direction: row;
}
.listView{
background-color: #FFFFFF;
width: 33%;
height: 100%;
display: flex;
flex-direction: column;
}
.border_right_2{
border-right: 2rpx solid #F3F3F3;
}
.itemView{
background-color: #FFFFFF;
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
border-bottom: 2rpx solid #F3F3F3;
}
.itemTitle{
margin-left: 30rpx;
font-size: 28rpx;
color: #333333;
padding-top: 30rpx;
padding-bottom: 30rpx;
}
.selectedTitle{
margin-left: 30rpx;
font-size: 28rpx;
color: #2272FF;
padding-top: 30rpx;
padding-bottom: 30rpx;
}
.arrowIcon{
background-color: #FFFFFF;
width: 16rpx;
height: 28rpx;
margin-right: 30rpx;
}
</style>
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