@@ -2,7 +2,7 @@ | |||
<view class="nav-bar" :style="{height:navHeight+'px'}"> | |||
<view class="title" | |||
:style="{paddingTop:searchMarginTop+'px',height:searchHeight+'px',lineHeight:searchHeight+'px'}"> | |||
<block v-if="isBack"> | |||
<block v-if="isBack && !isAlipay"> | |||
<image :src="`/static/image/icon-back.png`" mode="aspectFill" | |||
:style="{height:searchHeight+'px',width:searchHeight+'px'}" class="back" @click="back"></image> | |||
</block> | |||
@@ -22,8 +22,11 @@ | |||
const searchMarginTop = ref(null) | |||
const searchHeight = ref(32) | |||
const searchWidth = ref(32) | |||
const isAlipay = ref(false) | |||
onMounted(() => { | |||
const menuButtonInfo = uni.getMenuButtonBoundingClientRect() | |||
const type = uni.getSystemInfoSync().uniPlatform | |||
isAlipay.value = type === 'mp-alipay' | |||
const { | |||
top, | |||
width, |
@@ -40,7 +40,8 @@ | |||
"navigationStyle": "custom", | |||
"mp-alipay": { //在支付宝小程序中如果不生效 就加上这两行代码 就会生效啦 | |||
"transparentTitle": "always", | |||
"titlePenetrate": "YES" | |||
"titlePenetrate": "YES", | |||
"defaultTitle": "" // 将导航栏默认的 title 置空 | |||
} | |||
} | |||
}, |
@@ -49,7 +49,7 @@ | |||
//调用方式 | |||
request(accountLogin, options).then((res) => { | |||
let data = stringToJson(res.bizContent) | |||
let data = JSON.parse(res.bizContent); | |||
console.log(data, "#################"); | |||
navTo(`/subpackage/after-sale/account-recharge/index?name=state.name`); | |||
}) |
@@ -200,7 +200,7 @@ | |||
const options = { | |||
type: 2, | |||
data: { | |||
id: "cebc78a8aa024a0c96c0d1b0da3752e5", | |||
id: id, | |||
}, | |||
method: "POST", | |||
showLoading: true, |
@@ -382,6 +382,7 @@ | |||
.then((res) => { | |||
tools.hideLoadingAlert(); | |||
let result = JSON.parse(res.bizContent); | |||
console.log("写卡指令============",result) | |||
if (result.orderStatus == 1 || result.orderStatus == "1") { | |||
tools.showLoadingAlert("执行指令中"); | |||
bluetoothUtil.transCmd(result.command.split(","), "10", function(res) { | |||
@@ -415,7 +416,8 @@ | |||
expireTime: formatTime(new Date()), | |||
accountOrganization: "", | |||
accountCardNo: "", | |||
cosRecordId: "" | |||
cosRecordId: "", | |||
openId: getItem('openId') | |||
}, //请求参数 | |||
method: "POST", //提交方式(默认POST) | |||
showLoading: true, //是否显示加载中(默认显示) | |||
@@ -697,7 +699,8 @@ | |||
installType: "1", | |||
installChannelId: "5201010200601130001", | |||
obuId: obu.obuId, | |||
orderId: fileDataStrings.orderId | |||
orderId: fileDataStrings.orderId, | |||
openId: getItem('openId') | |||
}, //请求参数 | |||
method: "POST", //提交方式(默认POST) | |||
showLoading: true, //是否显示加载中(默认显示) |
@@ -154,7 +154,9 @@ | |||
CardBillQuery, | |||
CardBillPlaceOrder, | |||
CardBillPayStatus, | |||
wechatPayConfigId | |||
wechatPayConfigId, | |||
aliPayConfigId, | |||
obtainUserId | |||
} from "@/utils/network/api.js"; | |||
import { | |||
request | |||
@@ -281,44 +283,100 @@ | |||
//掉起微信支付 | |||
const wxPayment = () => { | |||
if (state.suppleNoList.length > 0) { | |||
// #ifdef MP-WEIXIN | |||
const options = { | |||
type: 2, | |||
data: { | |||
openid: state.openid, | |||
suppleNoList: state.suppleNoList, | |||
totalFee: allPrice.value * 100, | |||
payConfigId: wechatPayConfigId, | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(CardBillPlaceOrder, options).then((res) => { | |||
const data = stringToJson(res.bizContent); | |||
state.orderId = data.orderId | |||
uni.requestPayment({ | |||
provider: "wxpay", | |||
orderInfo: "", | |||
timeStamp: data.timestamp, | |||
nonceStr: data.noncestr, | |||
package: data.wxPackage ?data.wxPackage: "", | |||
signType: data.signType, | |||
paySign: data.sign, | |||
success: function(e) { | |||
console.log("支付成功", e); | |||
checkOrder(); | |||
}, | |||
fail: function(err) { | |||
confirm(err, () => {}, "支付失败", false); | |||
if (state.suppleNoList.length > 0) { | |||
// #ifdef MP-WEIXIN | |||
const options = { | |||
type: 2, | |||
data: { | |||
openid: state.openid, | |||
suppleNoList: state.suppleNoList, | |||
totalFee: allPrice.value * 100, | |||
payConfigId: wechatPayConfigId, | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(CardBillPlaceOrder, options).then((res) => { | |||
const data = stringToJson(res.bizContent); | |||
state.orderId = data.orderId | |||
uni.requestPayment({ | |||
provider: "wxpay", | |||
orderInfo: "", | |||
timeStamp: data.timestamp, | |||
nonceStr: data.noncestr, | |||
package: data.wxPackage ?data.wxPackage: "", | |||
signType: data.signType, | |||
paySign: data.sign, | |||
success: function(e) { | |||
console.log("支付成功", e); | |||
checkOrder(); | |||
}, | |||
fail: function(err) { | |||
confirm(err, () => {}, "支付失败", false); | |||
}, | |||
}); | |||
}); | |||
}); | |||
// #endif | |||
} else { | |||
msg("未勾选补缴订单!") | |||
} | |||
// #endif | |||
// #ifdef MP-ALIPAY | |||
my.getAuthCode({ | |||
scopes: 'auth_user', | |||
success: res => { | |||
const optionsUser = { | |||
type: 2, | |||
data: { | |||
payConfigId: aliPayConfigId, | |||
code: res.authCode | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
console.log('支付宝用户编号请求:',optionsUser) | |||
request(obtainUserId, optionsUser).then((res) => { | |||
console.log('支付宝用户编号返回:',res) | |||
const data = stringToJson(res.bizContent); | |||
const optionsali = { | |||
type: 2, | |||
data: { | |||
openid: data.userId, | |||
suppleNoList: state.suppleNoList, | |||
totalFee: allPrice.value * 100, | |||
payConfigId: aliPayConfigId, | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
console.log('支付下单请求:',optionsali) | |||
request(CardBillPlaceOrder, optionsali).then((res) => { | |||
console.log('支付下单返回:',res) | |||
const data = stringToJson(res.bizContent); | |||
state.orderId = data.orderId | |||
my.tradePay ({ | |||
// 调用统一收单交易创建接口(alipay.trade.create),获得返回字段支付宝交易号 trade_no | |||
tradeNO: data.prepayId, | |||
success: res => { | |||
console.log("支付成功", res); | |||
checkOrder(); | |||
}, | |||
fail: res => { | |||
confirm(res, () => {}, "支付失败", false); | |||
}, | |||
}); | |||
}); | |||
}); | |||
}, | |||
fail: err => { | |||
console.log('my.getAuthCode 调用失败', err) | |||
} | |||
}); | |||
// #endif | |||
} else { | |||
msg("未勾选补缴订单!") | |||
} | |||
}; | |||
@@ -1,5 +1,5 @@ | |||
<template> | |||
<view class="wrapper"> | |||
<view class="wrapper" v-if="state.haveData"> | |||
<!-- 背景颜色充满屏 --> | |||
<view class="bg-color"></view> | |||
<!-- 补卡额订单列表--> | |||
@@ -63,6 +63,7 @@ | |||
</view> | |||
</view> | |||
<view class="no">暂无补卡额圈存数据</view> | |||
</template> | |||
<script lang="ts" setup> | |||
@@ -104,6 +105,7 @@ | |||
id:"", | |||
list:"", | |||
cardBalance:"", | |||
haveData:false, //是否有数据 | |||
}) | |||
const listData = reactive(null) | |||
// const listData = reactive([ | |||
@@ -124,8 +126,11 @@ | |||
state.vehicleId=options.vehicleId | |||
//根据车牌查询信息.data | |||
queryRefundAction().then(val => { | |||
console.log("val",val.data) | |||
state.list = val.data | |||
console.log("val",val) | |||
if(val.hasData){ | |||
state.list = val.data | |||
state.haveData=true | |||
} | |||
}) | |||
/*监听蓝牙回调*/ | |||
uni.$on('bluetoothLink', function(status) { | |||
@@ -475,6 +480,11 @@ | |||
</script> | |||
<style lang="scss" scoped> | |||
.no{ | |||
text-align: center; | |||
font-size: 32rpx; | |||
margin: 20rpx auto; | |||
} | |||
.bg-color { | |||
position: fixed; | |||
top: 0; |
@@ -70,7 +70,7 @@ | |||
<view v-if="state.orderInfo.orderStatus == OrderStatus.已取消"> | |||
<view class="d-row" v-if="state.orderInfo.orderStep > OrderStatus.已支付"> | |||
<text class="d-label">付款时间:</text> | |||
<text class="d-value">{{getOrderTime(state.orderInfo.orderInfoExt.payTime)}}</text> | |||
<text class="d-value">{{getOrderTime(state.orderInfo.orderInfoExt?state.orderInfo.orderInfoExt.payTime:"")}}</text> | |||
</view> | |||
<view class="d-row"> | |||
<text class="d-label">取消时间:</text> | |||
@@ -91,7 +91,7 @@ | |||
<view v-if="state.orderInfo.orderStep == OrderStatus.审核不通过 || state.orderInfo.orderStep == OrderStatus.待审核"> | |||
<view class="d-row"> | |||
<text class="d-label">付款时间:</text> | |||
<text class="d-value">{{getOrderTime(state.orderInfo.orderInfoExt.payTime)}}</text> | |||
<text class="d-value">{{getOrderTime(state.orderInfo.orderInfoExt?state.orderInfo.orderInfoExt.payTime:"")}}</text> | |||
</view> | |||
<view class="d-row" v-if="state.orderInfo.orderStep == OrderStatus.审核不通过"> | |||
<text class="d-label">不通过原因:</text> | |||
@@ -103,7 +103,7 @@ | |||
<view v-if="state.orderInfo.orderStep == OrderStatus.待发货"> | |||
<view class="d-row"> | |||
<text class="d-label">付款时间:</text> | |||
<text class="d-value">{{getOrderTime(state.orderInfo.orderInfoExt.payTime)}}</text> | |||
<text class="d-value">{{getOrderTime(state.orderInfo.orderInfoExt?state.orderInfo.orderInfoExt.payTime:"")}}</text> | |||
</view> | |||
<view class="d-row" v-if="state.orderInfo.staffName"> | |||
<text class="d-label">业 务 员:</text> | |||
@@ -119,15 +119,15 @@ | |||
|| state.orderInfo.orderStep == OrderStatus['已申请-退货']"> | |||
<view class="d-row"> | |||
<text class="d-label">付款时间:</text> | |||
<text class="d-value">{{getOrderTime(state.orderInfo.orderInfoExt.payTime)}}</text> | |||
<text class="d-value">{{getOrderTime(state.orderInfo.orderInfoExt?state.orderInfo.orderInfoExt.payTime:'')}}</text> | |||
</view> | |||
<view class="d-row"> | |||
<text class="d-label">发货时间:</text> | |||
<text class="d-value">{{getOrderTime(state.orderInfo.orderInfoExt.deliveryTime)}}</text> | |||
<text class="d-value">{{getOrderTime(state.orderInfo.orderInfoExt?state.orderInfo.orderInfoExt.deliveryTime:"")}}</text> | |||
</view> | |||
<view class="d-row" v-if="state.orderInfo.orderStep != OrderStatus.待收货"> | |||
<text class="d-label">收货时间:</text> | |||
<text class="d-value">{{getOrderTime(state.orderInfo.orderInfoExt.receivingTime)}}</text> | |||
<text class="d-value">{{getOrderTime(state.orderInfo.orderInfoExt?state.orderInfo.orderInfoExt.receivingTime:"")}}</text> | |||
</view> | |||
<view class="d-row"> | |||
<text class="d-label">卡 号:</text> | |||
@@ -166,15 +166,15 @@ | |||
<view v-if="state.orderInfo.orderStep == OrderStatus.已完成"> | |||
<view class="d-row"> | |||
<text class="d-label">付款时间:</text> | |||
<text class="d-value">{{getOrderTime(state.orderInfo.orderInfoExt.payTime)}}</text> | |||
<text class="d-value">{{getOrderTime(state.orderInfo.orderInfoExt?state.orderInfo.orderInfoExt.payTime:"")}}</text> | |||
</view> | |||
<view class="d-row"> | |||
<text class="d-label">发货时间:</text> | |||
<text class="d-value">{{getOrderTime(state.orderInfo.orderInfoExt.deliveryTime)}}</text> | |||
<text class="d-value">{{getOrderTime(state.orderInfo.orderInfoExt?state.orderInfo.orderInfoExt.deliveryTime:"")}}</text> | |||
</view> | |||
<view class="d-row"> | |||
<text class="d-label">收货时间:</text> | |||
<text class="d-value">{{getOrderTime(state.orderInfo.orderInfoExt.receivingTime)}}</text> | |||
<text class="d-value">{{getOrderTime(state.orderInfo.orderInfoExt?state.orderInfo.orderInfoExt.receivingTime:"")}}</text> | |||
</view> | |||
<view class="d-row"> | |||
<text class="d-label">激活时间:</text> | |||
@@ -385,7 +385,7 @@ | |||
</view> | |||
<!-- 订单完成 --> | |||
<view v-if="state.orderInfo.orderStep == OrderStatus.已完成" class="btn-status"> | |||
<view class="btn space" @click="gotoEvaluateOrder(state.orderInfo)" v-if="!state.orderInfo.appraise">去评价</view> | |||
<view class="btn space" @click="gotoEvaluateOrder(state.orderInfo)" v-if="!state.orderInfo.appraise || state.orderInfo.appraise=='false'">去评价</view> | |||
<view class="btn space" v-else>已评价</view> | |||
</view> | |||
<!-- 换货中 --> | |||
@@ -501,6 +501,7 @@ | |||
onUnload(()=>{ | |||
uni.$off('refreshOrder'); | |||
uni.$off('selectAddressSuccess'); | |||
console.log("已评价") | |||
}) | |||
</script> | |||
<style> |
@@ -293,6 +293,9 @@ | |||
} | |||
</style> | |||
<style lang="scss" scoped> | |||
::v-deep .u-size-mini{ | |||
white-space: nowrap; | |||
} | |||
.main { | |||
// overflow: hidden; | |||
@@ -22,6 +22,7 @@ export const envs = { | |||
export const appId = "52030131"; //应用appid 综合业务支撑平台使用 | |||
export const loginTime = 86400; //登录有效时间(单位s) 1天 | |||
export const wechatPayConfigId = "6a9a54bc01f6443faea7ffe132b19f6"; //支付配置编号 微信小程序支付:6a9a54bc01f6443faea7ffe132b19f6 | |||
export const aliPayConfigId = "6a9a54bc01f6443123452b1234"; //支付配置编号 支付宝小程序支付:6a9a54bc01f6443123452b1234 | |||
export const wechatAppID = "wx8fba957179c1329a"; //九州小程序APPid:wx008c60533388527a | |||
export const wechatSecret = "699c10826113ddb350fbe58a96e2b015"; //九州小程序AppSecret:95197718b43b497f02732bd9f8011080 | |||
// export const sm4Key = "5dc11f854ceca1473e1a5075ed16eb226b4543a9a05fe50f7fba40f898099ce34abba69a07a20509f315f94d808a4d0e988935588858f65a"; | |||
@@ -43,6 +44,7 @@ export const getToken = "1006"; //统一会员平台登录确认接口(用于 | |||
export const updateToken = "225aa780a91b40f0b44e7e5fe204fc9a"; //统一会员平台登录确认接口(用于换取openId和token) | |||
export const checkCode = "966"; //校验验证码 | |||
export const register = "52de4029940f4e03b18c3a0b8d64c2db";//USER-无感注册登录(个人/企业) | |||
export const obtainUserId = "58760acb637245729e971597a1fb92c4";//获取第三方用户标识 | |||
/*地址管理*/ | |||
export const addressQuery = "27"; //地址管理查询 |