"optimization": { | "optimization": { | ||||
"subPackages": true | "subPackages": true | ||||
}, | }, | ||||
"requiredPrivateInfos": ["chooseLocation", "getLocation", "chooseAddress"], | |||||
"plugins": { | |||||
"issuer-plugin": { | |||||
"version": "dev-07f01f43a2c98f29fd406c2906ed3d1b", | |||||
"provider": "wxa2d9acdd1054e69b" | |||||
} | |||||
} | |||||
"requiredPrivateInfos": ["chooseLocation", "getLocation", "chooseAddress"] | |||||
// "plugins": { | |||||
// "issuer-plugin": { | |||||
// "version": "dev-07f01f43a2c98f29fd406c2906ed3d1b", | |||||
// "provider": "wxa2d9acdd1054e69b" | |||||
// } | |||||
// } | |||||
}, | }, | ||||
"mp-alipay": { | "mp-alipay": { | ||||
"usingComponents": true, | "usingComponents": true, |
<view class="btns" v-else-if="item.orderStep == OrderStatus.待激活"> | <view class="btns" v-else-if="item.orderStep == OrderStatus.待激活"> | ||||
<view class="btn btn-normal" @click.stop="gotoReturnOrder(item)" v-if="item.applyReturn">申请退货</view> | <view class="btn btn-normal" @click.stop="gotoReturnOrder(item)" v-if="item.applyReturn">申请退货</view> | ||||
<view class="btn btn-normal" @click.stop="gotoExchangeOrder(item)">申请换货</view> | <view class="btn btn-normal" @click.stop="gotoExchangeOrder(item)">申请换货</view> | ||||
<view class="btn btn-primary" @click.stop="gotoReplenishmentOrder(item)">申请补货</view> | |||||
<view class="btn btn-primary" @click.stop="gotoReplenishmentOrder(item)" v-if="item.deviceType == deviceType">申请补货</view> | |||||
<view class="btn btn-primary" @click.stop="gotoActiveOrder(item)">去激活</view> | <view class="btn btn-primary" @click.stop="gotoActiveOrder(item)">去激活</view> | ||||
<view class="btn btn-primary" @click.stop="closeOrder(item)" v-if="item.finishOrder">结束订单</view> | <view class="btn btn-primary" @click.stop="closeOrder(item)" v-if="item.finishOrder">结束订单</view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="btns" v-else-if="item.orderStep==33"> | <view class="btns" v-else-if="item.orderStep==33"> | ||||
<view class="btn btn-primary" @click.stop="gotoExchangeOrder(item)" v-if="item.orderType!='REPLENISHMENT'">换货</view> | <view class="btn btn-primary" @click.stop="gotoExchangeOrder(item)" v-if="item.orderType!='REPLENISHMENT'">换货</view> | ||||
<!-- <view class="btn btn-primary" @click.stop="gotoReplenishmentOrder(item)" v-if="item.orderType=='REPLENISHMENT'">申请补货</view> --> | |||||
</view> | </view> | ||||
<!-- 已完成 售后订单不允许评价产品,储值卡转记账卡除外--> | <!-- 已完成 售后订单不允许评价产品,储值卡转记账卡除外--> |
</view> | </view> | ||||
</view> | </view> | ||||
<view class="up_btn" v-if="state.showBtn"> | <view class="up_btn" v-if="state.showBtn"> | ||||
<button aria-disabled="true" @click="btn" v-if="!state.isSuccess" :disabled="!state.disabled" | |||||
<button aria-disabled="true" @click="btn" v-if="!state.isSuccess" | |||||
:class="state.disabled?'button':'hui'"> | :class="state.disabled?'button':'hui'"> | ||||
点击开始激活 | 点击开始激活 | ||||
</button> | </button> | ||||
}); | }); | ||||
function cmdResult() { | function cmdResult() { | ||||
uni.showLoading({ | |||||
title: '执行指令', | |||||
mask: true | |||||
}); | |||||
const options = { | const options = { | ||||
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) | type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) | ||||
data: { | data: { | ||||
issueType: state.transfer?2:1 //1正常激活 2 过户激活 | issueType: state.transfer?2:1 //1正常激活 2 过户激活 | ||||
}, //请求参数 | }, //请求参数 | ||||
method: "POST", //提交方式(默认POST) | method: "POST", //提交方式(默认POST) | ||||
showLoading: true, //是否显示加载中(默认显示) | |||||
}; | }; | ||||
console.log("options==",options) | console.log("options==",options) | ||||
//BDS-二发指令申请 | //BDS-二发指令申请 | ||||
request('4b001421f5354c248a7759971881b52f', options) | request('4b001421f5354c248a7759971881b52f', options) | ||||
.then((res) => { | .then((res) => { | ||||
// tools.hideLoadingAlert(); | |||||
console.log("在线激活 请求"); | console.log("在线激活 请求"); | ||||
console.log(stringToJson(res.bizContent)); | console.log(stringToJson(res.bizContent)); | ||||
const datas = stringToJson(res.bizContent).data; | const datas = stringToJson(res.bizContent).data; | ||||
tools.showLoadingAlert("执行指令"); | |||||
console.log("datas===",datas) | console.log("datas===",datas) | ||||
uni.showLoading({ | |||||
title: '执行指令', | |||||
mask: true | |||||
}); | |||||
bluetoothUtil.transCmd(datas.cmd.split(','), datas.cmdType=='CARD'?'10':'20', function(res) { | bluetoothUtil.transCmd(datas.cmd.split(','), datas.cmdType=='CARD'?'10':'20', function(res) { | ||||
console.log("res申请",res) | console.log("res申请",res) | ||||
implementCmd(datas.transOrderId,datas.cmd,res.toString(),datas.stepNo) | implementCmd(datas.transOrderId,datas.cmd,res.toString(),datas.stepNo) | ||||
}) | }) | ||||
.catch((err) => { | .catch((err) => { | ||||
console.log(err); | console.log(err); | ||||
});L | |||||
}); | |||||
} | } | ||||
function implementCmd(transOrderId, cmd, cmdResult, stepNo) { | function implementCmd(transOrderId, cmd, cmdResult, stepNo) { | ||||
uni.showLoading({ | |||||
title: '执行指令', | |||||
mask: true | |||||
}); | |||||
const options = { | const options = { | ||||
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) | type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) | ||||
data: { | data: { | ||||
stepNo | stepNo | ||||
}, //请求参数 | }, //请求参数 | ||||
method: "POST", //提交方式(默认POST) | method: "POST", //提交方式(默认POST) | ||||
showLoading: true, //是否显示加载中(默认显示) | |||||
}; | }; | ||||
console.log("options2222",options) | console.log("options2222",options) | ||||
//BDS-二发指令回传 | //BDS-二发指令回传 | ||||
request('88d98f2db7df4f06b22d58b507db7854', options) | request('88d98f2db7df4f06b22d58b507db7854', options) | ||||
.then((res) => { | .then((res) => { | ||||
tools.hideLoadingAlert(); | |||||
console.log(stringToJson(res.bizContent)); | console.log(stringToJson(res.bizContent)); | ||||
const datas = stringToJson(res.bizContent).data; | const datas = stringToJson(res.bizContent).data; | ||||
console.log("在线激活 请求",datas); | console.log("在线激活 请求",datas); | ||||
tools.showLoadingAlert("执行指令"); | |||||
// tools.showLoadingAlert("执行指令"); | |||||
if (datas.stepNo == 100) { | if (datas.stepNo == 100) { | ||||
msg("激活成功",{'icon':'success','duration':2000}) | |||||
state.disabled = true | |||||
tools.hideLoadingAlert(); | |||||
msg("激活成功",{'icon':'success','duration':3000}) | |||||
setTimeout(() => { | setTimeout(() => { | ||||
uni.navigateTo({ | uni.navigateTo({ | ||||
url: "/subpackage/after-sale/deviceInfo/deviceInfo", | url: "/subpackage/after-sale/deviceInfo/deviceInfo", |
uni.chooseImage({ | uni.chooseImage({ | ||||
count: 1, | count: 1, | ||||
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 | sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 | ||||
//sourceType: ['album','camera'], | |||||
sourceType: ['camera'], | |||||
success: function(res) { | success: function(res) { | ||||
console.log(res.tempFilePaths); | console.log(res.tempFilePaths); | ||||
</view> | </view> | ||||
</u-form> | </u-form> | ||||
<view class="attention">{{params.msg}}</view> | <view class="attention">{{params.msg}}</view> | ||||
<view class="no_pay"><text>*</text>不支持货到付款</view> | |||||
<!-- 物流弹窗 --> | <!-- 物流弹窗 --> | ||||
<view> | <view> | ||||
<!-- 物流 --> | <!-- 物流 --> | ||||
padding: 20rpx; | padding: 20rpx; | ||||
font-size: 30rpx; | font-size: 30rpx; | ||||
} | } | ||||
.no_pay{ | |||||
font-size: 28rpx; | |||||
padding: 0 20rpx; | |||||
} | |||||
.no_pay>text{ | |||||
color: red; | |||||
margin-right: 10rpx; | |||||
} | |||||
</style> | </style> |
<view class="btn space" @click="gotoReturnOrder(state.orderInfo)" | <view class="btn space" @click="gotoReturnOrder(state.orderInfo)" | ||||
v-if="state.orderInfo.applyReturn">申请退货</view> | v-if="state.orderInfo.applyReturn">申请退货</view> | ||||
<view class="btn space" @click="gotoExchangeOrder(state.orderInfo)">申请换货</view> | <view class="btn space" @click="gotoExchangeOrder(state.orderInfo)">申请换货</view> | ||||
<view class="btn space" @click.stop="gotoReplenishmentOrder(state.orderInfo)">申请补货</view> | |||||
<view class="btn space" @click.stop="gotoReplenishmentOrder(state.orderInfo)" v-if="state.orderInfo.deviceType == deviceType">申请补货</view> | |||||
<view class="btn-green space" @click="gotoActiveOrder(state.orderInfo)">去激活</view> | <view class="btn-green space" @click="gotoActiveOrder(state.orderInfo)">去激活</view> | ||||
<view class="btn-green" @click.stop="closeOrder(state.orderInfo)" | <view class="btn-green" @click.stop="closeOrder(state.orderInfo)" | ||||
v-if="state.orderInfo.finishOrder">结束订单</view> | v-if="state.orderInfo.finishOrder">结束订单</view> | ||||
</view> | </view> | ||||
<view v-if="state.orderInfo.orderStep == 33" class="btn-status"> | <view v-if="state.orderInfo.orderStep == 33" class="btn-status"> | ||||
<view class="btn btn-green" @click="gotoExchangeOrder(state.orderInfo)" v-if="state.orderInfo.orderType!='REPLENISHMENT'">换货</view> | <view class="btn btn-green" @click="gotoExchangeOrder(state.orderInfo)" v-if="state.orderInfo.orderType!='REPLENISHMENT'">换货</view> | ||||
<!-- <view class="btn btn-green" @click="gotoReplenishmentOrder(state.orderInfo)" v-if="state.orderInfo.orderType=='REPLENISHMENT'">申请补货</view> --> | |||||
</view> | </view> | ||||
<!-- 异地结束--> | <!-- 异地结束--> | ||||
<!-- 订单完成 --> | <!-- 订单完成 --> |
export const decrypt9901 = "c6e7c27e774c493d82c942dc69507d67" | export const decrypt9901 = "c6e7c27e774c493d82c942dc69507d67" | ||||
export const getMailingAddressApi = "1babe3f09d0b458a84c798e89895664f" //更换设备获取邮寄地址 | |||||
export const getMailingAddressApi = "1babe3f09d0b458a84c798e89895664f" //更换设备获取邮寄地址 | |||||
export const addAddressApi = "09d4ba9985394ef8a241acabe888273c" //支付完添加收货地址 |
} | } | ||||
}); | }); | ||||
} else { | } else { | ||||
tools.showLoadingAlert("执行指令"); | |||||
tools.hideLoadingAlert(); | |||||
console.log("请求失败返回参数", code, res) | console.log("请求失败返回参数", code, res) | ||||
uni.showModal({ | uni.showModal({ | ||||
title: '提示', | title: '提示', |