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