三年中文在线观看免费大全_三年大片免费高清哔哩哔哩_三年在线观看免费大全哔哩_三年大全免费大片三年大片_三年在线观看免费大全_三年大片观看免费大全哔哩哔哩_三年中文在线观看免费高清第4版_三年中文免费视频大全_三年大片大全免费观看大全_三年大片在线观看哔哩哔哩_三年在线观看中文免费观看_三年成都中文在线观看免费版

小(xiǎo)程序生(shēng)成海(hǎi)報(≥‌ bào)插件(jiàn)painter(原生(shē'∏₽ng)小(xiǎo)程序版) - 新聞資訊 - 雲南(nán)§§小(xiǎo)程序開(kāi)發|雲南(nán)軟件(jiàn)開(k£≥āi)發|雲南(nán)網站(zhàn)建設-雲南維串信息科技有限公司

159-8711-8523

雲南(nán)網建設/小(xiǎo)程序開(kāi)發/•Ω軟件(jiàn)開(kāi)發

知(zhī)識

不(bù)管是(shì)網站(zhàn),軟件(jiàn)還(hái)是(shπ≈ì)小(xiǎo)程序,都(dōu)要(yào)直接或間(jiān)接能(né≤♦ng)為(wèi)您産生(shēng)價值,我們在追求其視(shì)覺表現(xiàn)的(d€•✘±e)同時(shí),更側重于功能(néng)的(de)便捷,營銷的(de)便利,運營的∏→ ↕(de)高(gāo)效,讓網站(zhàn)成為(wèi)營銷工(g§✔÷ōng)具,讓軟件(jiàn)能(néng)切實提升企業(yè)內(nèi)部管理(÷€ "lǐ)水(shuǐ)平和(hé)效率。優秀的(de)程序為(wèi)後期升級提供倩便捷的(de)支持!

小(xiǎo)程序生(shēng)成海(hǎi)報(bào)插件(jiàn)painter♣®>✘(原生(shēng)小(xiǎo)程序版)

發表時(shí)間(jiān):2020-10-19

發布人(rén):葵宇科(kē)技(jì)

浏覽次數(shù):122

1.先去(qù)下(xià)載插件(jiàn)github★♠< 下(xià)載 https://github.com/Kujiale-Mobile/Pain>↓ter 下(xià)載好(hǎo)了(le)把painter整個(gè)文(wéγε®©n)件(jiàn)放(fàng)在components裡(lǐ)面
在這(zhè)裡(lǐ)插入圖片描述

index.json

{
  "usingComponents": {
    "painter":"/components/painter/p≠βainter"
  }
}

index.wxml

<button open-type="getUserInfo" bindgetuserinfo="getUserInfo"> 獲取頭像昵稱 </button>
<button bind:tap='createPoster'>生(shēng)成海(hǎi)報(bào)</button>
<image class="poster" src="{{imgURL}}" mode="cover"></image>
<painter 
	wx-if="{{showPainter}}"
    palette="{{template}}"
    bind:imgOK="onImgOK" 
    />

index.js

Page({
  data: {
    template: {},
    imgURL:'',
	showPainter:false,
	avatarUrl:''
  },
  createPoster(){
    this.getPattle()
  },
  onImgOK(e) {
    console.log("onImgOK")
    console.log(e.detail.path)
    this.setData({
      imgURL: e.detail.path
    })
  },
  getPattle(){
	  let _this = this
	  _this.setData({
	    template: {
	      width:"750rpx",
	      height:"1624rpx",
	      views:[
	         {
	            type: 'image',
	            url: "https://campaign.uglobal.c∏₹om.cn/ikea/images/havemeda> 'l.jpg",
	            css: {
	              top: '0rpx',
	              left: '0px',
	              width: '750rpx',
	              height: '1624rpx'
	            }
	          },{
	            type: 'image',
	            url: _this.data.avatarUrl,
	            css: {
	              top: '450rpx',
	              left: '270rpx',
	              width: '200rpx',
	              height: '200rpx',
	              borderRadius: '100rpx',
	              borderWidth: "10rpx",
				  borderColor: '#fed931'
	            }
	          }
	      ]
	    },
		showPainter:true
	  })
  },
  getUserInfo: function(e) {
    console.log(e)
    this.setData({
	  avatarUrl:e.detail.userInfo.avatarUrl
    })
  }
})

注意:
網絡圖片真機(jī)顯示空(kōng)白(bái)請(qǐng)檢查 微(wēi)信公衆平台 ≠™服務器(qì)域名裡(lǐ)面的(de)安全域名有(yǒu)沒有(yǒu)添加"€λ'
微(wēi)信頭像顯示空(kōng)白(bái) 請(qǐδε↔₽ng)添加 https://thirdwx.qlogo.cn; 添加域名後重新啓動項目就λ§γ≥(jiù)可(kě)以成功顯示了(le)。

在這(zhè)裡(lǐ)插入圖片描述

相(xiàng)關案例查看(kàn)更多(duō)

相(xiàng)關閱讀(dú)

三年中文在线观看免费大全_三年大片免费高清哔哩哔哩_三年在线观看免费大全哔哩_三年大全免费大片三年大片_三年在线观看免费大全_三年大片观看免费大全哔哩哔哩_三年中文在线观看免费高清第4版_三年中文免费视频大全_三年大片大全免费观看大全_三年大片在线观看哔哩哔哩_三年在线观看中文免费观看_三年成都中文在线观看免费版