zoukankan      html  css  js  c++  java
  • 微信小程序之wx.showmodal

    1.

    .

    wx.showModal({
          title: "2222步",
          content: currentCache ? "确定为自己城市添加步数吗" : "确定取消为自己城市添加步数吗?",
          showCancel: true,
          cancelText: "取消111",
          cancelColor: "#000",
          confirmText: "确定",
          confirmColor: "#0f0",
          success: function (res) {
            console.log(res)
            if (res.confirm) {
              // 重新设置缓存
              //wx.setStorageSync('cache_key', cache);
              // 更新数据绑定,从而切换图片
              //that.setData({
                //collection: currentCache
              //})
            }
          }
        })
    

      

    2...

     wx.showModal({
          title: "2222步",
          content: currentCache ? "确定为自己城市添加步数吗" : "确定取消为自己城市添加步数吗?",
          showCancel: false,
          // cancelText: "取消111",
          // cancelColor: "#000",
          confirmText: "确定",
          confirmColor: "#0f0",
          success: function (res) {
            console.log(res)

         success: function (res) {
          if (res.cancel) {
            //点击取消,默认隐藏弹框
          } else {
            //点击确定
            temp.splice(index, 1),
            that.setData({
              tempFilePaths: temp,
            })
           }
          },
          fail: function (res) { },//接口调用失败的回调函数
          complete: function (res) { },//接口调用结束的回调函数(调用成功、失败都会执行)

          }
        })
    

      

  • 相关阅读:
    2.6、实战案例(三)
    2.5、实战案例(二)
    2.4、实战案例(一)
    2.3、视频采集(二):分辨率、摄像头切换、帧率、滤镜
    2.2、视频采集(一):初步采集
    2.1、列举媒体设备
    1.0、本章导读
    linux 下搭建vsftpd
    解决.net core 3.1跨域问题
    SQLServer for linux安装
  • 原文地址:https://www.cnblogs.com/520BigBear/p/9308949.html
Copyright © 2011-2022 走看看