上传代码
This commit is contained in:
46
uniapp04/unpackage/dist/dev/mp-weixin/pages/test/test.js
vendored
Normal file
46
uniapp04/unpackage/dist/dev/mp-weixin/pages/test/test.js
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const API_api = require("../../API/api.js");
|
||||
const _sfc_main = {
|
||||
__name: "test",
|
||||
setup(__props) {
|
||||
const onButton = () => {
|
||||
my.request({
|
||||
url: API_api.apiImageUrl + "/api/Alipay/payment/create",
|
||||
method: "GET",
|
||||
data: {
|
||||
id: "47"
|
||||
},
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
// 确保设置正确的 Content-Type
|
||||
"cookie": common_vendor.index.getStorageSync("cookie") || ""
|
||||
},
|
||||
success: function(result) {
|
||||
console.log(result);
|
||||
console.log(result.data.data);
|
||||
my.tradePay({
|
||||
tradeNO: result.data.data,
|
||||
success: (res) => {
|
||||
console.log("成功调用");
|
||||
console.log(res);
|
||||
},
|
||||
fail: (res) => {
|
||||
my.alert({
|
||||
content: JSON.stringify(res)
|
||||
});
|
||||
console.log("失败");
|
||||
console.log(res);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.o(onButton)
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
wx.createPage(_sfc_main);
|
5
uniapp04/unpackage/dist/dev/mp-weixin/pages/test/test.json
vendored
Normal file
5
uniapp04/unpackage/dist/dev/mp-weixin/pages/test/test.json
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"navigationBarTitleText": "测试",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {}
|
||||
}
|
1
uniapp04/unpackage/dist/dev/mp-weixin/pages/test/test.wxml
vendored
Normal file
1
uniapp04/unpackage/dist/dev/mp-weixin/pages/test/test.wxml
vendored
Normal file
@ -0,0 +1 @@
|
||||
<button bindtap="{{a}}">支付按钮</button>
|
0
uniapp04/unpackage/dist/dev/mp-weixin/pages/test/test.wxss
vendored
Normal file
0
uniapp04/unpackage/dist/dev/mp-weixin/pages/test/test.wxss
vendored
Normal file
Reference in New Issue
Block a user