Home  >  Article  >  Backend Development  >  Recommended video resources for PHP WeChat development

Recommended video resources for PHP WeChat development

黄舟
黄舟Original
2017-08-31 10:31:431719browse

WeChat development has been very popular in recent years. Many friends are learning WeChat development. Today I will introduce to you a video about PHP WeChat development, in the course "PHP WeChat Development Video Tutorial" , which introduces in detail the preparatory conditions for WeChat development and how to apply for a WeChat public account. The course is from easy to deep and has detailed content, which is very suitable for novices to learn.

Recommended video resources for PHP WeChat development

Course playback address: http://www.php.cn/course/364.html

The teacher’s teaching style:

The teacher’s lectures are simple, clear, layer-by-layer analysis, interlocking, rigorous argumentation, rigorous structure, and use the logical power of thinking to attract students’ attention Strength, use reason to control the classroom teaching process. The teaching skills are full of wit. Various teaching methods and techniques are readily available and can be used freely and appropriately without any trace of polishing.

The more difficult part in this video should be: developing simple processing of positioning information and program optimization:

WeChat applet implements simple positioning function, easy to read, and obtains Latitude and longitude information

Create a single page under pages such as local

local.js is as follows

var app = getApp()    
Page({   
    data:{  
       latitude:'',  
       longitude:''  
    },  
  getLocation:function(e) {  
    console.log(e)  
    var that = this  
    wx.getLocation({  
      type: 'wgs84', // 默认为 wgs84 返回 gps 坐标,gcj02 返回可用于 wx.openLocation 的坐标  
      success: function(res){  
        console.log(res)       
      that.setData({  
              longitude:res.longitude,  
              latitude:res.latitude          
      })  
    }  
 })  
}  
})

local.wxml is as follows

<view class="page-body">  
<view class="page-body-form">  
    <text class="page-body-form-key">经度:</text>  
    <input class="page-body-form-value" type="text"   
    value="{{longitude}}" name="longitude"></input>  
    <text class="page-body-form-key">纬度:</text>  
    <input class="page-body-form-value" type="text"   
    value="{{latitude}}" name="latitude"></input>    
    <view class="page-body-buttons">  
    <button class="page-body-button" type="primary"   
    bindtap="getLocation">获取位置</button>  
    </view>  
</view>  
</view>

in app.json

{  
  "pages":[  
    "pages/local/local"  
  ],  
  "window":{  
    "backgroundTextStyle":"light",  
    "navigationBarBackgroundColor": "#fff",  
    "navigationBarTitleText": "定位",  
    "navigationBarTextStyle":"black"  
  }  
}

The above is the detailed content of Recommended video resources for PHP WeChat development. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn