admin 发表于 2023-2-16 18:54:56

在微信小程序开发中,API页面请求数据

<div id="article_content" class="article_content clearfix">
      <link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/editerView/kdoc_html_views-1a98987dfd.css">
      <link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/editerView/ck_htmledit_views-6e43165c0a.css">
                <div id="content_views" class="htmledit_views">
                  <p>提示保存成功&#xff0c;使用</p>
<pre><code>wx.showToast({
title: '成功',
icon: 'success',
duration: 2000
})</code></pre>
<p>提示保存失败</p>
<pre><code>wx.showToast({
title: 'ERROR',
icon: 'error',
duration: 2000
})</code></pre>
<p>提示页面加载中.....</p>
<pre><code>wx.showLoading({
   title: '加载中...',
})

setTimeout(() &#61;> {
   wx.hideLoading()
},1000)</code></pre>
<p>动态模拟提示框</p>
<pre><code>      //动态模态弹窗
      wx.showModal({
      title: '提示',
      content: '这是一个模态弹窗',
      success (res) {
          if(res.confirm) {
             console.log('用户点击确定')
          }else if (res.cancel){
            console.log('用户点击取消')
          }
      }
      })</code></pre>
<p>隐藏返回首页的按钮</p>
<pre><code>onShow(){

        //隐藏返回首页的按钮

         wx.hideHomeButton()

}</code></pre>
<p></p>
<p></p>
<p></p>
<p></p>
                </div>
      </div>
      <div id="treeSkill"></div>
页: [1]
查看完整版本: 在微信小程序开发中,API页面请求数据