@@ -119,7 +119,8 @@ | |||
const result = stringToJson(res.bizContent); | |||
console.log("获取微信小程序openid", result); | |||
// setItem("QYorder", result.data); | |||
state.openid = result.data.openid | |||
const openidData = stringToJson(result.data); | |||
state.openid = openidData.openid | |||
}); | |||
// #endif | |||
} |
@@ -293,8 +293,9 @@ | |||
request(getOpenidApi, options).then((res) => { | |||
const result = stringToJson(res.bizContent); | |||
console.log("获取微信小程序openid", result); | |||
const openidData = stringToJson(result.data); | |||
// setItem("QYorder", result.data); | |||
state.openid = result.data.openid | |||
state.openid = openidData.openid | |||
}); | |||
// #endif | |||
} |
@@ -118,8 +118,9 @@ | |||
request(getOpenidApi, options).then((res) => { | |||
const result = stringToJson(res.bizContent); | |||
console.log("获取微信小程序openid", result); | |||
const openidData = stringToJson(result.data); | |||
// setItem("QYorder", result.data); | |||
state.openid = result.data.openid | |||
state.openid = openidData.openid | |||
}); | |||
// #endif | |||
} |
@@ -179,7 +179,8 @@ | |||
const result = stringToJson(res.bizContent); | |||
console.log("获取微信小程序openid", result); | |||
// setItem("QYorder", result.data); | |||
state.openid = result.data.openid | |||
const openidData = stringToJson(result.data); | |||
state.openid = openidData.openid | |||
}); | |||
// #endif | |||
} |
@@ -119,7 +119,8 @@ | |||
const result = stringToJson(res.bizContent); | |||
console.log("获取微信小程序openid", result); | |||
// setItem("QYorder", result.data); | |||
state.openid = result.data.openid | |||
const openidData = stringToJson(result.data); | |||
state.openid = openidData.openid | |||
}); | |||
// #endif | |||
} |
@@ -74,6 +74,7 @@ s<template> | |||
state.orderId = option.orderId; | |||
state.clientFee = option.clientFee; | |||
state.id = option.id; | |||
console.log("option", option) | |||
}) | |||
const addInterestsList = () => { | |||
@@ -121,7 +122,7 @@ s<template> | |||
console.log("optionss", optionss); | |||
request(addProduct, optionss).then((res) => { | |||
uni.navigateTo({ | |||
url: `/subpackage/orders/order_payment?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}&&data=${items}`, | |||
url: `/subpackage/orders/order_payment?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}&&data=${items}&&isValueCard=${state.detailsObj.isValueCard}`, | |||
}); | |||
}); | |||
@@ -191,7 +192,8 @@ s<template> | |||
request(getOpenidApi, options).then((res) => { | |||
const result = stringToJson(res.bizContent); | |||
console.log("获取微信小程序openid", result); | |||
state.openid = result.data.openid; | |||
const openidData = stringToJson(result.data); | |||
state.openid = openidData.openid; | |||
setItem("QYorder", state); | |||
// setItem("QYorder", result.data); | |||
// state.openid = result.data.openid | |||
@@ -249,6 +251,7 @@ s<template> | |||
}); | |||
} else if (data.userState === "NORMAL") { | |||
msg("已开通车主服务"); | |||
uni.navigateTo({ | |||
url: `/subpackage/orders/product-detail?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}&&data=${items}`, | |||
}); |
@@ -62,7 +62,9 @@ | |||
CardBillPayStatus, | |||
wechatPayConfigId, | |||
aliPayConfigId, | |||
obtainUserId, getOpenidApi | |||
obtainUserId, | |||
getOpenidApi, | |||
orderDetail | |||
} from "@/utils/network/api.js"; | |||
import { request } from "@/utils/network/request.js"; | |||
@@ -159,6 +161,7 @@ | |||
// uni.request({ | |||
// url: `https://api.weixin.qq.com/sns/jscode2session?appid=${wechatAppID}&secret=${wechatSecret}&js_code=${e.code}&grant_type=authorization_code`, | |||
// success: (res : any) => { | |||
const options1 = { | |||
type: 2, | |||
data: { | |||
@@ -169,11 +172,13 @@ | |||
}; | |||
request(getOpenidApi, options1).then((res) => { | |||
const result = stringToJson(res.bizContent); | |||
const openidData = stringToJson(result.data); | |||
console.log("获取openId",openidData) | |||
const options = { | |||
type: 2, | |||
data: { | |||
orderId: state.orderId, | |||
wxOpenid: result.data.openid, | |||
wxOpenid: openidData.openid, | |||
payType: val.payType | |||
}, | |||
method: "POST", | |||
@@ -236,7 +241,8 @@ | |||
request(getOpenidApi, options).then((res) => { | |||
const result = stringToJson(res.bizContent); | |||
console.log("获取微信小程序openid", result); | |||
state.openid = result.data.openid; | |||
const openidData = stringToJson(result.data); | |||
state.openid = openidData.openid; | |||
}); | |||
// #endif | |||
} | |||
@@ -339,7 +345,7 @@ | |||
// option.orderId; | |||
var data = { | |||
orderId: state.orderId, | |||
source: 'ALI' //请求方来源 | |||
source: source //请求方来源 | |||
}; | |||
const options = { | |||
type: 2, | |||
@@ -442,21 +448,23 @@ | |||
}); | |||
}; | |||
const gotoEditUserOrUnitInfo = () => { | |||
if (state.isValueCard != 1) { | |||
uni.redirectTo({ | |||
url: `/subpackage/orders/release-products?orderId=${state.orderId}`, | |||
}); | |||
} else { | |||
uni.switchTab({ | |||
url: "/pages/order/order" | |||
}) | |||
} | |||
if (state.isValueCard != 1) { | |||
uni.redirectTo({ | |||
url: `/subpackage/orders/release-products?orderId=${state.orderId}`, | |||
}); | |||
} else { | |||
uni.switchTab({ | |||
url: "/pages/order/order" | |||
}) | |||
} | |||
} | |||
const state = reactive({ | |||
isValueCard: 1, //卡的类型 | |||
radiolist1: [], //选择卡的数据列表 | |||
choiceCardShow: false, //选择卡的弹出框 | |||
isSign: '', | |||
id:"", | |||
orderId: "", | |||
userType: 1, //1 个人 2单位 | |||
type: 0, //0 客车 1货车 |
@@ -264,7 +264,8 @@ | |||
request(getOpenidApi, options).then((res) => { | |||
const result = stringToJson(res.bizContent); | |||
console.log("获取微信小程序openid", result); | |||
state.openid = result.data.openid; | |||
const openidData = stringToJson(result.data); | |||
state.openid = openidData.openid; | |||
}); | |||
// #endif | |||
} |
@@ -181,7 +181,8 @@ | |||
request(getOpenidApi, options).then((res) => { | |||
const result = stringToJson(res.bizContent); | |||
console.log("获取微信小程序openid", result); | |||
state.openid = result.data.openid; | |||
const openidData = stringToJson(result.data); | |||
state.openid = openidData.openid; | |||
}); | |||
// #endif | |||
} |
@@ -100,7 +100,8 @@ | |||
request(getOpenidApi, options).then((res) => { | |||
const result = stringToJson(res.bizContent); | |||
console.log("获取微信小程序openid", result); | |||
state.openid = result.data.openid; | |||
const openidData = stringToJson(result.data); | |||
state.openid = openidData.openid; | |||
setItem("QYorder", state); | |||
}); | |||
// #endif |