上传代码
This commit is contained in:
0
uniapp04/unpackage/dist/dev/mp-alipay/pages/run/run.acss
vendored
Normal file
0
uniapp04/unpackage/dist/dev/mp-alipay/pages/run/run.acss
vendored
Normal file
1
uniapp04/unpackage/dist/dev/mp-alipay/pages/run/run.axml
vendored
Normal file
1
uniapp04/unpackage/dist/dev/mp-alipay/pages/run/run.axml
vendored
Normal file
@ -0,0 +1 @@
|
||||
<view class="page"><view class="page-section"><view>请不要一进入小程序就弹框授权,建议先了解小程序的服务内容</view><button type="primary" onTap="getAuthCode"> 获取授权码 </button><button type="primary" onTap="myrequest"> 我的请求 </button></view></view>
|
48
uniapp04/unpackage/dist/dev/mp-alipay/pages/run/run.js
vendored
Normal file
48
uniapp04/unpackage/dist/dev/mp-alipay/pages/run/run.js
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
Page({
|
||||
onLoad() {
|
||||
},
|
||||
data: {},
|
||||
getAuthCode: () => {
|
||||
my.getAuthCode({
|
||||
scopes: "auth_user",
|
||||
success: ({ authCode }) => {
|
||||
console.log(`authCode:`, authCode);
|
||||
my.alert({
|
||||
content: authCode
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
myrequest: () => {
|
||||
my.getAuthCode({
|
||||
scopes: "auth_user",
|
||||
success: ({ authCode }) => {
|
||||
console.log(`authCode:`, authCode);
|
||||
my.request({
|
||||
url: "http://localhost:9999/api/user/login/alipay",
|
||||
method: "GET",
|
||||
data: {
|
||||
authCode
|
||||
},
|
||||
header: {
|
||||
"content-type": "application/json"
|
||||
},
|
||||
success: function(res) {
|
||||
console.log(res);
|
||||
my.alert({
|
||||
content: res
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
const _sfc_main = {};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
my.createPage(MiniProgramPage);
|
5
uniapp04/unpackage/dist/dev/mp-alipay/pages/run/run.json
vendored
Normal file
5
uniapp04/unpackage/dist/dev/mp-alipay/pages/run/run.json
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"defaultTitle": "获取code码",
|
||||
"pullRefresh": false,
|
||||
"usingComponents": {}
|
||||
}
|
Reference in New Issue
Block a user