1、客户端关键代码
- 页面布局代码(index.wxml)
显示密码
- 页面逻辑代码(index.js)
var OBJ_PAGE_DATA={};
OBJ_PAGE_DATA.data={
password:true
}
var STR_USERNAME='';
var STR_PASSWORD='';
OBJ_PAGE_DATA['getUserName']=function(params){
STR_USERNAME=params.detail.value;
}
OBJ_PAGE_DATA['getPassword']=function(params){
STR_PASSWORD=params.detail.value;
}
OBJ_PAGE_DATA['login']=function(){
wx.request({
url: '',//使用https开头的服务器地址
data: {
username:STR_USERNAME,
password:STR_PASSWORD
},
method: 'GET',
success: function(callback){
console.log(callback)
var str_serverRetureData=callback.