日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
創(chuàng)新互聯(lián)小程序教程:微信小程序API調(diào)起客戶端小程序設(shè)置界面

wx.openSetting(OBJECT)


基礎(chǔ)庫版本 1.1.0 開始支持,低版本需做兼容處理

成都創(chuàng)新互聯(lián)是專業(yè)的曲麻萊網(wǎng)站建設(shè)公司,曲麻萊接單;提供成都網(wǎng)站制作、做網(wǎng)站,網(wǎng)頁設(shè)計,網(wǎng)站設(shè)計,建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進(jìn)行曲麻萊網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴(kuò)展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團(tuán)隊,希望更多企業(yè)前來合作!

調(diào)起客戶端小程序設(shè)置界面,返回用戶設(shè)置的操作結(jié)果

Object 參數(shù)說明:

參數(shù) 類型 必填 說明
success Function 接口調(diào)用成功的回調(diào)函數(shù),返回內(nèi)容詳見返回參數(shù)說明。
fail Function 接口調(diào)用失敗的回調(diào)函數(shù)
complete Function 接口調(diào)用結(jié)束的回調(diào)函數(shù)(調(diào)用成功、失敗都會執(zhí)行)

success返回參數(shù)說明:

參數(shù) 類型 說明
authSetting Object 用戶授權(quán)結(jié)果,其中 key 為 scope 值,value 為 Bool 值,表示用戶是否允許授權(quán),詳見 scope 列表

示例代碼:

wx.openSetting({
  success: (res) => {
    /*
     * res.authSetting = {
     *   "scope.userInfo": true,
     *   "scope.userLocation": true
     * }
     */
  }
})

OpenSettingButton wx.createOpenSettingButton(string type, string text, string image, Object style)


支持版本 >= 2.0.7

創(chuàng)建打開設(shè)置頁面的按鈕。

參數(shù)

string type

按鈕的類型

type 的合法值:

說明
text 可以設(shè)置背景色和文本的按鈕
image 只能設(shè)置背景貼圖的按鈕,背景貼圖會直接拉伸到按鈕的寬高

string text

按鈕上的文本,僅當(dāng) type 為 text 時有效

string image

按鈕的背景圖片,僅當(dāng) type 為 image 時有效

Object style

按鈕的樣式

屬性 類型 默認(rèn)值 是否必填 說明 支持版本
left number 左上角橫坐標(biāo)
top number 左上角縱坐標(biāo)
width number 寬度
height number 高度
backgroundColor string 背景顏色
borderColor string 邊框顏色
borderWidth number 邊框?qū)挾?/td>
borderRadius number 邊框圓角
textAlign string 文本的水平居中方式
fontSize number 字號
lineHeight number 文本的行高

style.textAlign 的合法值:

說明
left 居左
center 居中
right 居右

返回值

OpenSettingButton

示例代碼

let button = wx.createOpenSettingButton({
    type: 'text',
    text: '打開設(shè)置頁面',
    style: {
        left: 10,
        top: 76,
        width: 200,
        height: 40,
        lineHeight: 40,
        backgroundColor: '#ff0000',
        color: '#ffffff',
        textAlign: 'center',
        fontSize: 16,
        borderRadius: 4
    }
})

wx.getSetting(OBJECT)


基礎(chǔ)庫 1.2.0 開始支持,低版本需做 兼容處理

獲取用戶的當(dāng)前設(shè)置

Object 參數(shù)說明:

參數(shù) 類型 必填 說明
success Function 接口調(diào)用成功的回調(diào)函數(shù),返回內(nèi)容詳見返回參數(shù)說明。
fail Function 接口調(diào)用失敗的回調(diào)函數(shù)
complete Function 接口調(diào)用結(jié)束的回調(diào)函數(shù)(調(diào)用成功、失敗都會執(zhí)行)

success返回參數(shù)說明:

參數(shù) 類型 說明
authSetting Object 用戶授權(quán)結(jié)果,其中 key 為 scope 值,value 為 Bool 值,表示用戶是否允許授權(quán),詳見 scope 列表

示例代碼:

wx.getSetting({
  success: (res) => {
    /*
     * res.authSetting = {
     *   "scope.userInfo": true,
     *   "scope.userLocation": true
     * }
     */
  }
})


文章標(biāo)題:創(chuàng)新互聯(lián)小程序教程:微信小程序API調(diào)起客戶端小程序設(shè)置界面
文章來源:http://www.5511xx.com/article/dhsiihh.html