This commit is contained in:
2025-09-14 00:21:54 +08:00
commit d40b3bbd62
766 changed files with 36275 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
.mt-8 {
margin-top: 8px;
}

View File

@@ -0,0 +1,44 @@
Page({
data: {
authInfo: "",
showLoading: true,
},
bindInput(e) {
this.setData({
authInfo: e.detail.value
});
},
changeLoading(e) {
this.setData({
showLoading: e.detail.value
});
},
auth() {
if (!xhs.alipayAuth) {
xhs.showModal({
title: 'xhs.alipayAuth 方法不存在'
});
}
const { authInfo, showLoading } = this.data;
console.log("%c Line:19 🍆 authInfo", "color:#ffdd4d", authInfo);
console.log("%c Line:19 🌽 showLoading", "color:#ed9ec7", showLoading);
xhs.alipayAuth({
authInfo,
showLoading,
success(res) {
xhs.showModal({
title: '支付宝授权成功',
content: JSON.stringify(res),
});
},
fail(err) {
xhs.showModal({
title: '支付宝授权失败',
content: JSON.stringify(err),
});
}
});
}
});

View File

@@ -0,0 +1,7 @@
{
"navigationBarTitleText": "支付宝信息授权",
"usingComponents": {
"showbox": "../../common/component/showbox/index",
"box": "../../common/component/container/index"
}
}

View File

@@ -0,0 +1,34 @@
<view class="container">
<showbox title="支付宝信息授权">
<box>
<view class="_ui-input">
<text style="word-break:break-all;">输入的 authInfo 为: {{authInfo}}</text>
</view>
<view class="_ui-input">
<input
value="{{authInfo}}"
placeholder="填参数 authInfo类型字符串"
placeholder-style="color: #3333334D;"
bindinput="bindInput"
maxlength="3000"
/>
</view>
<view class="_ui-input">
修改 showLoading
<switch
style="transform:scale(0.7)"
checked="{{showLoading}}"
color="rgba(255, 36, 66, 1)"
bindchange="changeLoading"
/>
</view>
<view class="_ui-space mt-8">
<button
class="_ui-button"
hover-class="_ui-button-hover"
bindtap="auth"
>点击授权</button>
</view>
</box>
</showbox>
</view>