0
点赞
收藏
分享

微信扫一扫

计算机视觉驾驶行为识别应用简述

 目前支持 wxml、wxs、js/ts、json,less/sass 等文件类型,资源支持通过配置区分不同平台

wxml中使用 

<!-- #if MP -->
  <view class="test-view">wechat</view>
  <!-- #elif IOS -->
  <view class="test-view">iOS</view>
  <!-- #elif ANDROID -->
  <view class="test-view">android</view>
  <!-- #endif -->

wxss

.test-view{
  /* #if MP */
  color: red;
  /* #elif IOS */
  color: green;
  /* #elif ANDROID */
  color: yellow;
  /* #endif */
}

 

js中微信小程序登录:

// #if MP
wx.login({})

// #elif IOS
wx.getMiniProgramCode({})

// #elif ANDROID
wx.getMiniProgramCode({})

// #endif

JSON

{
    "window": {
        "navigationBarTitleText": "Weixin",
    },
    "mini-wechat": {
        "window": {
        "navigationBarTitleText": "wechat demo"
        }
    },
    "mini-ios": {
        "window": {
        "navigationBarTitleText": "iOS demo"
        }
    },
    "mini-android": {
        "window": {
            "navigationBarTitleText": "android demo"
        }
    }
}

官方文档藏得较深,点此跳转

举报

相关推荐

0 条评论