dashucoding 기록 2019년 6월 8일

면책 조항 :이 문서는 블로거 원본입니다가, 차 틈새까지 허용 블로거없이 복제 할 수 없다 : 그의 삶의 나머지를 역방향, 당신은 제외 https://blog.csdn.net/qq_36232611/article/details/91346696

워드 프레스 웹 사이트

URL :  https://cn.wordpress.org/

알리 클라우드 시장
https://market.aliyun.com/products/53616009?spm=a2c4e.11153940.blogcont160877.13.5e1f6ce7n0PL2Z&tag=WordPress&jianzhanSoft=%E5%8D%9A%E5%AE%A2

리눅스 인스턴스 alidata / www /에서 phpwind 디렉토리에 업로드 된 파일의 압축을 풉니 다

ECS 클라우드 서버 인스턴스는 WordPres를 구축

ECS는 클라우드 서버 구매
클릭 옵션을 "거울에서 시장을 선택합니다."

1, ECS 알리 클라우드 호스트를 구입

2, 도메인 이름을 구입

3, 기록에 대한

4, 환경 설정

5, 워드 프레스를 설치

(6), DNS

첫 번째 도메인 이름 등록 알리에 액세스 할 수 있어야하는 것은 도메인 이름 서버를 통해 간다

의 image.png

첫째, URL 열 http://www.aliyun.com/을

의 image.png

알리 구름 날개 계획
URL : https://promotion.aliyun.com/ntms/act/campus2018.html

의 image.png

도메인 이름 등록

의 image.png

무료 클라우드 해상도 : https://help.aliyun.com/document_detail/29716.html?spm=a2c4g.11186623.6.552.67257cd2w3N5EL

알리, 클라우드 서버
두 개의 도메인 이름

nginx를 설치, MySQL은, PHP는
주요 설치 패키지 링크를 lnmp 수

공식 웹 사이트 링크를 lnpm
의 image.png

애플릿 등록 페이지 :

의 image.png

Page({
data: {
    text: '获取验证码', //按钮文字
    currentTime: 61, //倒计时
    disabled: false, //按钮是否禁用
    phone: '', //获取到的手机栏中的值
    VerificationCode: '',
    Code: '',
    NewChanges: '',
    NewChangesAgain: '',
    success: false,
    state: '0',
    url: ''
  },
  /**
    * 获取验证码
    */
  return_home: function (e) {
    wx.navigateTo({
      url: '/pages/register/register',
    })
 
  },
  handleInputPhone: function (e) {
    this.setData({
      phone: e.detail.value
    })
  },
  handleVerificationCode: function (e) {
    console.log(e);
    this.setData({
      Code: e.detail.value
    })
  },
  handleNewChanges: function (e) {
    console.log(e);
    this.setData({
      NewChanges: e.detail.value
    })
  },
  handleNewChangesAgain: function (e) {
    console.log(e);
    this.setData({
      NewChangesAgain: e.detail.value
    })
 
  },
  doGetCode: function () {
    var that = this;
    that.setData({
      disabled: true, //只要点击了按钮就让按钮禁用 (避免正常情况下多次触发定时器事件)
      color: '#ccc',
    })
 
    var phone = that.data.phone;
    var currentTime = that.data.currentTime //把手机号跟倒计时值变例成js值
    var warn = null; //warn为当手机号为空或格式不正确时提示用户的文字,默认为空
wx.request({
      url: 'http://192.168.41.40:8002/isExist', //后端判断是否已被注册, 已被注册返回1 ,未被注册返回0
      method: "GET",
      header: {
        'content-type': 'application/x-www-form-urlencoded'
      },
      success: function (res) {
        that.setData({
          state: res.data
        })
        if (phone == '') {
          warn = "号码不能为空";
        } else if (phone.trim().length != 11 || !/^1[3|4|5|6|7|8|9]\d{9}$/.test(phone)) {
          warn = "手机号格式不正确";
        } //手机号已被注册提示信息
        else if (that.data.state == 1) {  //判断是否被注册
          warn = "手机号已被注册";
 
        }
        else {
          wx.request({
            url: 'http:///sendCode', //填写发送验证码接口
            method: "POST",
            data: {
              coachid: that.data.phone
            },
            header: {
              'content-type': 'application/x-www-form-urlencoded'
            },
            success: function (res) {
              console.log(res.data)
              that.setData({
                VerificationCode: res.data.verifycode
              })
 
 
              //当手机号正确的时候提示用户短信验证码已经发送
              wx.showToast({
                title: '短信验证码已发送',
                icon: 'none',
                duration: 2000
              });
              //设置一分钟的倒计时
              var interval = setInterval(function () {
                currentTime--; //每执行一次让倒计时秒数减一
                that.setData({
                  text: currentTime + 's', //按钮文字变成倒计时对应秒数
 
                })
         
                if (currentTime <= 0) {
                  clearInterval(interval)
                  that.setData({
                    text: '重新发送',
                    currentTime: 61,
                    disabled: false,
                    color: '#33FF99'
                  })
                }
              }, 100);
            }
          })
        };
        
        if (warn != null) {
          wx.showModal({
            title: '提示',
            content: warn
          })
          that.setData({
            disabled: false,
            color: '#33FF99'
          })
          return;
        }
      }
 
    })
 
  },
  submit: function (e) {
    var that = this
    if (this.data.Code == '') {
      wx.showToast({
        title: '请输入验证码',
        image: '/images/error.png',
        duration: 2000
      })
      return
    } else if (this.data.Code != this.data.VerificationCode) {
      wx.showToast({
        title: '验证码错误',
        image: '/images/error.png',
        duration: 2000
      })
      return
    }
    else if (this.data.NewChanges == '') {
      wx.showToast({
        title: '请输入密码',
        image: '/images/error.png',
        duration: 2000
      })
      return
    } else if (this.data.NewChangesAgain != this.data.NewChanges) {
      wx.showToast({
        title: '两次密码不一致',
        image: '/images/error.png',
        duration: 2000
      })
      return
    } else {
      var that = this
      var phone = that.data.phone;
      wx.request({
        url: 'http:///register',
        method: "POST",
        data: {
          coachid: phone,
          coachpassword: that.data.NewChanges
        },
        header: {
          "content-type": "application/x-www-form-urlencoded"
        },
        success: function (res) {
          wx.showToast({
            title: '提交成功~',
            icon: 'loading',
            duration: 2000
          })
          console.log(res.data)
          that.setData({
            success: true,
            url: res.data
          })
        }
      })
    }
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
 
  }
})

의 image.png

Page({
  data: {
    phone: '',
    password: '',
    success: false,
    text: ''
 
  },
 
  // 获取输入账号 
  phoneInput: function (e) {
    this.setData({
      phone: e.detail.value
    })
  },
 
  // 获取输入密码 
  passwordInput: function (e) {
    this.setData({
      password: e.detail.value
    })
  },
 
  // 登录 
  login: function () {
    var that = this;   
 
    var warn = null; 
    if (that.data.phone.length == 0) {
      wx.showToast({
        title: '用户名不能为空',
        icon: 'loading',
        duration: 1000
      })
    } else if (that.data.password.length == 0) {
      wx.showToast({
        title: '密码不能为空',
        icon: 'loading',
        duration: 1000
      })
    }else {
      
      wx.request({
        url: 'http:///login',
        method: "POST",
        data: {
          cardNo: that.data.phone,
          password: that.data.password
        },
        header: {
          'content-type': 'application/x-www-form-urlencoded'
        },
        success: function (res) {
          if (res.data.state == 1) {  //判断是否能正常登录
            warn = "卡号密码不匹配";
            wx.showModal({
              title: '提示',
              content: warn
            })
            return;
          } else {
            that.setData({
              success: true,
              text: res.data.url
            })
          }
        }
 
      })
 
 
 
    }
  },
  // 注册 
  register: function () {
    wx.navigateTo({
      url: '/pages/register/register',
    })
  }
 
})

전송

open-type="share"`

공유하거나 전달하는 방법은 두 가지가 있습니다 애플릿

onShareAppMessage: function (ops) {
   if (ops.from === 'button') {
     // 来自页面内转发按钮
     console.log(ops.target)
   }
   return {
     title: 'xx小程序',
     path: 'pages/index/index',
     success: function (res) {
       // 转发成功
       console.log("转发成功:" + JSON.stringify(res));
     },
     fail: function (res) {
       // 转发失败
       console.log("转发失败:" + JSON.stringify(res));
     }
   }

 }

의 image.png

어떻게 사용자의 위도와 현재 위치의 경도를 확인하는 것은 문제가된다

텐센트지도 응용 프로그램 키 (키), 응용 프로그램 주소 : 애플리케이션 키

의 image.png

wx.getLocation({
      type: 'wgs84',
      success: function (res) {
        //console.log("获取当前经纬度:" + JSON.stringify(res));
        //发送请求通过经纬度反查地址信息  
        var getAddressUrl = "https://apis.map.qq.com/ws/geocoder/v1/?location=" + res.latitude + "," + res.longitude + "&key=你的key值&get_poi=1";
        common.Request(getAddressUrl, "get", "", function (ops) {
          //console.log(JSON.stringify(ops)); 
        })
      }
    }) 

엄지 손가락주세요! 당신의 격려는 내 글의 가장 큰 힘 때문에!

어떤 공무원 마이크로 편지 없습니다

분사력 교환기 : 711,613,774

분사력 교환기

추천

출처blog.csdn.net/qq_36232611/article/details/91346696