fix: 微信支付,code修改。
This commit is contained in:
@@ -389,7 +389,7 @@ Taro.useDidShow(() => {
|
||||
// 支付选项
|
||||
function getPayItem() {
|
||||
payOption().then((res: any) => {
|
||||
if (res.statusCode == 200) {
|
||||
if (res.code == 200) {
|
||||
payItem.value = res.data;
|
||||
reType.value = res.data[0]["id"];
|
||||
}
|
||||
@@ -442,7 +442,7 @@ function changeEx(state) {
|
||||
/** 下一步 */
|
||||
function next() {
|
||||
payOption().then((res: any) => {
|
||||
if (res.statusCode == 200) {
|
||||
if (res.code == 200) {
|
||||
res.data.forEach((item) => {
|
||||
// 分转元
|
||||
item.amount = item.amount / 100;
|
||||
@@ -471,13 +471,14 @@ function wxpay() {
|
||||
success: function (r) {
|
||||
if (r.code) {
|
||||
const data = {
|
||||
js_code: r.code,
|
||||
jsCode: r.code,
|
||||
payId: reType.value,
|
||||
listDeviceId: rechargeList.value,
|
||||
};
|
||||
console.log(data)
|
||||
// 创建订单
|
||||
createOrder(data).then((res: any) => {
|
||||
if (res.statusCode == 200) {
|
||||
if (res.code == 200) {
|
||||
const orderInfo = res.data;
|
||||
// 时间戳
|
||||
const timestamp = String(Math.floor(Date.now() / 1000));
|
||||
|
||||
Reference in New Issue
Block a user