欧美三级国产三级日韩三级_亚洲熟妇丰满大屁股熟妇_欧美亚洲成人一区二区三区_国产精品久久久久久模特

微信小程序人臉識別之人臉屬性檢測 - 新聞資訊 - 云南小程序開發(fā)|云南軟件開發(fā)|云南網(wǎng)站建設(shè)-昆明葵宇信息科技有限公司

159-8711-8523

云南網(wǎng)建設(shè)/小程序開發(fā)/軟件開發(fā)

知識

不管是網(wǎng)站,軟件還是小程序,都要直接或間接能為您產(chǎn)生價值,我們在追求其視覺表現(xiàn)的同時,更側(cè)重于功能的便捷,營銷的便利,運(yùn)營的高效,讓網(wǎng)站成為營銷工具,讓軟件能切實(shí)提升企業(yè)內(nèi)部管理水平和效率。優(yōu)秀的程序?yàn)楹笃谏壧峁┍憬莸闹С郑?

您當(dāng)前位置>首頁 » 新聞資訊 » 小程序相關(guān) >

微信小程序人臉識別之人臉屬性檢測

發(fā)表時間:2020-9-21

發(fā)布人:葵宇科技

瀏覽次數(shù):68

先看下效果

在這里插入圖片描述
在這里插入圖片描述

不多說廢話,直接上代碼

<view>
<button type="primary" bindtap="chooseImage">選擇圖片</button>
</view>


chooseImage(){
wx.chooseImage({
  count: 1,
  sizeType: ['original', 'compressed'],
  sourceType: ['album', 'camera'],
  success :(res) => {
    // tempFilePath可以作為img標(biāo)簽的src屬性顯示圖片
    const tempFilePaths = res.tempFilePaths
    this.setData({
      imageUrl:tempFilePaths[0]
    })
    //向后臺發(fā)送
    wx.uploadFile({
      url: 'http://www.thexxdd.cn/baidu/', //僅為示例,非真實(shí)的接口地址
      filePath: tempFilePaths[0],
      name: 'file',
      success : (res)=>{
        // const data = res.data
        console.log(res)
        //do something
      }
    })
  }
})

},

一般接口都是后臺通過AI直接給你配置好,然后你調(diào)用即可

紫色的動畫是為了有那么一個正在掃描的狀態(tài),避免比如用戶太多,然后掃描很慢,加一個狀態(tài),提高用戶體驗(yàn)

<!-- 動畫 -->
<view class="animation">
<view class="animation-list">

</view>
</view>

.animation{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 500rpx;

}
.animation-list{
  width: 100%;
  height: 450rpx;
  background: linear-gradient(to bottom,rgba(216,179,255,0),rgba(216,179,255,1));
  position: relative;
  top: -600rpx;
  animation: myfist 2s linear 1s infinite alternate;
}

/* 開始執(zhí)行動畫 */
@keyframes myfist{
  0%{
    background: linear-gradient(to bottom,rgba(216,179,255,0),rgba(216,179,255,1));
    left: 0;
    top: -600rpx;
  }
  25%{
    left: 0;
    top: 50rpx;
  }
  50%{
    left: 0;
    top: 50rpx;
  }
  75%{
    left: 0;
    top: 50rpx;
  }
  100%{
    left: 0;
    top: -600rpx;
  }
}

給它一個判斷,當(dāng)掃描完成就隱藏即可

相關(guān)案例查看更多