<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                > uniapp已經封裝了微信、QQ、微博的分享SDK,開發者可以直接調用相關功能。 [TOC] ## 獲取appid和appsecret > 在 manifest.json配置的相關信息需要打包后生效,真機運行仍然是HBuilder基座的設置,可使用[自定義基座包](http://ask.dcloud.net.cn/article/12723)調試 ### 微信分享 > **在 manifest.json 的 App SDK 配置里,勾選微信消息及朋友圈,并填寫 appid,如需在iOS平臺使用還需要配置通用鏈接** > 微信appid申請教程:https://ask.dcloud.net.cn/article/208 > iOS平臺微信SDK配置通用鏈接:https://ask.dcloud.net.cn/article/36445 ![](https://img.kancloud.cn/f7/10/f7108ebfab49b0c54e60a81107e9ccf8_717x253.png) ### 新浪微博分享 > **在 manifest.json 的 App SDK 配置里,勾選勾選新浪微博,并填寫相關appkey** > 新浪微博 appkey 申請教程:https://ask.dcloud.net.cn/article/209 ![](https://img.kancloud.cn/74/03/74030cfabfd0609f74fcf63491972468_614x294.png) ### QQ分享 > **在 manifest.json 的 App SDK 配置里,勾選分享到QQ好友,并填寫相關appkey,QQ分享 appkey 申請步驟:** > QQ appid申請教程:https://uniapp.dcloud.io/api/plugins/share?id=qq-%E5%88%86%E4%BA%AB ![](https://img.kancloud.cn/b9/02/b90255d371572d7af4aefc9c9ea07ce8_533x133.png) ## 實例代碼 > > 該代碼會用到provider,具體值可參考《獲取服務提供商》篇 ~~~ <template> <view> <!-- #ifdef APP-PLUS --> <button type="default" @click="share">分享</button> <!-- #endif --> <!-- #ifdef MP-WEIXIN --> <button type="default" open-type="share">小程序分享</button> <!-- #endif --> </view> </template> <script> export default { data() { return {}; }, methods: { // APP端的分享方式,小程序無法uni.share()的方式調用,只能 “用戶主動點擊觸發分享。可使用自定義按鈕方式 或監聽系統右上角的分享按鈕” share() { // 分享圖文代碼 uni.share({ provider: "weixin", //此處provider到https://uniapp.dcloud.io/api/plugins/provider獲取 scene: "WXSenceTimeline", type: 0, href: "http://uniapp.dcloud.io/", title: "uni-app分享", summary: "我正在使用HBuilderX開發uni-app,趕緊跟我一起來體驗!", imageUrl: "https://img-cdn-qiniu.dcloud.net.cn/uniapp/images/uni@2x.png", success: function (res) { console.log("success:" + JSON.stringify(res)); }, fail: function (err) { console.log("fail:" + JSON.stringify(err)); } }); }, //設置小程序的分享信息 onShareAppMessage(res){ if (res.from === 'button') {// 來自按鈕分享 console.log(res.target) } return { title: '自定義分享標題222', path: '/pages/test/test?id=123' } } } } </script> ~~~ > 參考文檔:https://uniapp.dcloud.io/api/plugins/share
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看