init
This commit is contained in:
117
xhs-mini-demos/api-case/setting/setting.xhsml
Normal file
117
xhs-mini-demos/api-case/setting/setting.xhsml
Normal file
@@ -0,0 +1,117 @@
|
||||
<view class="container">
|
||||
|
||||
<showbox title="登录">
|
||||
<box>
|
||||
<view class="setting-title">
|
||||
点击下方按钮进行登录
|
||||
</view>
|
||||
<button
|
||||
class="_ui-button"
|
||||
hover-class="_ui-button-hover"
|
||||
bindtap="login"
|
||||
>登录</button>
|
||||
</box>
|
||||
</showbox>
|
||||
|
||||
<showbox title="getUserInfo">
|
||||
<box>
|
||||
<view class="setting-title">
|
||||
点击下方按钮进行getUserInfo
|
||||
</view>
|
||||
<button
|
||||
class="_ui-button"
|
||||
hover-class="_ui-button-hover"
|
||||
open-type="getUserInfo"
|
||||
bindgetuserinfo="handleUserInfo"
|
||||
>getUserInfo</button>
|
||||
</box>
|
||||
</showbox>
|
||||
|
||||
<showbox title="用户信息授权">
|
||||
<box>
|
||||
<view class="setting-title">
|
||||
点击下方按钮进行授权
|
||||
</view>
|
||||
<button
|
||||
data-scope="scope.userInfo"
|
||||
class="_ui-button"
|
||||
hover-class="_ui-button-hover"
|
||||
bindtap="handleAuthorize"
|
||||
>授权</button>
|
||||
</box>
|
||||
</showbox>
|
||||
|
||||
<showbox title="手机号授权">
|
||||
<box>
|
||||
<view class="setting-title">
|
||||
点击下方按钮进行授权
|
||||
</view>
|
||||
<button
|
||||
open-type="getPhoneNumber"
|
||||
class="_ui-button"
|
||||
hover-class="_ui-button-hover"
|
||||
bindgetphonenumber="getPhoneNumber"
|
||||
>授权</button>
|
||||
</box>
|
||||
</showbox>
|
||||
|
||||
<showbox title="地理位置授权">
|
||||
<box>
|
||||
<view class="setting-title">
|
||||
点击下方按钮进行授权
|
||||
</view>
|
||||
<button
|
||||
data-scope="scope.userLocation"
|
||||
class="_ui-button"
|
||||
hover-class="_ui-button-hover"
|
||||
bindtap="handleAuthorize"
|
||||
>授权</button>
|
||||
</box>
|
||||
</showbox>
|
||||
|
||||
<showbox title="保存相册授权">
|
||||
<box>
|
||||
<view class="setting-title">
|
||||
点击下方按钮进行授权
|
||||
</view>
|
||||
<button
|
||||
data-scope="scope.writePhotosAlbum"
|
||||
class="_ui-button"
|
||||
hover-class="_ui-button-hover"
|
||||
bindtap="handleAuthorize"
|
||||
>授权</button>
|
||||
</box>
|
||||
</showbox>
|
||||
|
||||
<showbox title="摄像头授权">
|
||||
<box>
|
||||
<view class="setting-title">
|
||||
点击下方按钮进行授权
|
||||
</view>
|
||||
<button
|
||||
data-scope="scope.camera"
|
||||
class="_ui-button"
|
||||
hover-class="_ui-button-hover"
|
||||
bindtap="handleAuthorize"
|
||||
>授权</button>
|
||||
</box>
|
||||
</showbox>
|
||||
|
||||
<showbox title="小红书权限设置">
|
||||
<box>
|
||||
<view class="_ui-space">
|
||||
<button
|
||||
class="_ui-button"
|
||||
hover-class="_ui-button-hover"
|
||||
bindtap="getSetting"
|
||||
>获取小程序设置</button>
|
||||
<button
|
||||
bindtap="openSetting"
|
||||
class="_ui-button"
|
||||
hover-class="_ui-button-hover"
|
||||
>打开小程序设置</button>
|
||||
</view>
|
||||
</box>
|
||||
</showbox>
|
||||
</view>
|
||||
<include src="templates.xhsml" />
|
||||
Reference in New Issue
Block a user