WordPress网站

网址: 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

将解压缩后的文件上传到 Linux 实例中的 alidata/www/phpwind 目录下

云服务器 ECS 实例搭建 WordPres

选购云服务器ECS
选择点击“从镜像市场选择”

1、购买阿里云ECS主机

2、购买域名

3、申请备案

4、环境配置

5、安装wordpress

6、域名解析

必须先将域名备案,才能通过域名访问阿里云的服务器

首先打开网址:http://www.aliyun.com/

阿里的云翼计划
网址:https://promotion.aliyun.com/ntms/act/campus2018.html

注册域名

免费云解析:https://help.aliyun.com/document_detail/29716.html?spm=a2c4g.11186623.6.552.67257cd2w3N5EL

一台阿里云服务器
二个域名

安装nginx,mysql,php
获取lnmp一键安装包链接

lnpm官网链接

小程序注册页面:

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 ,未被注册返回0method: "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 = thisif (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 = thisvar 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 () {}
})

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));}}}

如何通过经纬度查询到用户的当前位置成了一个问题

申请腾讯地图密钥(key),申请地址:申请密钥

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)); })}})

请点赞!因为你的鼓励是我写作的最大动力!

吹逼交流群:711613774

dashucoding记录2019.6.8相关推荐

  1. dashucoding记录2019.6.7

    购买阿里云ECS主机 购买域名 申请备案 环境配置 安装wordpress 域名解析 在"产品与服务"中选择云服务器ECS 购买完域名之后建议去实名认证 域名购买链接:http:/ ...

  2. [C/C++]员工考勤记录 - 2019校招编程刷题

    [C/C++]员工考勤记录 - 2019校招编程刷题 参考链接 题目描述 给定一个字符串来代表一个员工的考勤纪录,这个纪录仅包含以下两个字符: 'A' : Absent,缺勤 'P' : Presen ...

  3. [论文记录] 2019 - Utilizing Arousal-Valence Relationship for Continuous Prediction of Valence in Movies

    [论文记录] 2019 - Partners in Crime: Utilizing Arousal-Valence Relationship for Continuous Prediction of ...

  4. 生活记录--2019.11

    生活记录--2019.11  今天是大雪,二十四节气中冬季的第三个节气. 郑州的雪比去年来的稍微晚些,目前还没有过来,盼望着元旦前能来场雪吧......(明年的小麦还能多收成些) 回顾十一月份,基本上 ...

  5. web前端标题记录(2019)

    js 中的 number 为何很怪异  https://mp.weixin.qq.com/s/RjApZriNldMBlwpfVY0ETQ JavaScript 算法之复杂度分析  https://m ...

  6. 手动建站记录2019

    趁着有点时间,把一直想自己建个网站的想法实施了一下,特此记录 Step1.申请域名 既然是拿来练手的,就没必要购买域名了,在"https://www.freenom.com"上申请 ...

  7. 个人书法记录-2019.4.22

    书法心得:字要正气,摆正. 不要单独关注一个字,而应该关注一个句子的整体美观. 底端对齐

  8. 面试问题记录 2019.3.22(中国铁道科学研究院)

    问题:http的七层协议 握手几次 问题:es6 问题:浏览器是怎么渲染的 问题:mvvm 以及vue的了解 vue的双向绑定 问题:ajax 的请求头怎么知道是传输的是图片,ajax的优缺点 问题: ...

  9. 记录2019届秋季校园招聘:快手(2018.9.2)

    一面: 面试平台:牛客网视频面试 流程:项目介绍,基础知识问答,代码题 介绍项目,介绍RCNN,神经网络blob的维度,卷积核参数量,卷积层计算量,Faster R-CNN测试速度,SVM的目标函数, ...

最新文章

  1. JS实现每隔几个字符添加字符(串):实现每间隔10个字就换行一次,多用于echarts横坐标的显示文本拥挤换行;实现间隔8个字符就添加❤❤
  2. 内江将被打造成四川物联网西部副中心
  3. Ubuntu中如何使得程序在后台运行
  4. APUE读书笔记 之 进程关系
  5. 谈谈产品开发团队的配置管理规则
  6. 【转】IE浏览器快捷键大全
  7. Vue2.0 UI框架Element运用之DateTimePicker(el-date-picker)初始值及时间格式转化等细节问题
  8. Android通过使用系统广播监听网络状态的改变
  9. 大型网站技术架构:核心原理与案例分析笔记
  10. Wooden Sticks POJ - 1065(最大上升子序列+动态规划状态转移思维)
  11. 质因子分解(洛谷P2043题题解,Java语言描述)
  12. 橱窗布置(信息学奥赛一本通-T1279)
  13. 自然语言处理 —— 困惑度
  14. CCF201909-2 小明种苹果(续)
  15. piggy back是什么意思?
  16. ios13.7 iPhone/iPad Location-cleaned 驱动下载
  17. Win7如何简单的关闭445端口及445端口入侵详解
  18. SDN实验(三)——集线器hub的实现
  19. dvwa没有file1.php,文件包含漏洞-DVWA
  20. php-emoji使用微信,微信开发中emoji表情的问题

热门文章

  1. 对WEB应用的粗浅理解
  2. 新茶饮、新烘焙的2021:亏损与食安问题未解,元宇宙和第三空间又来凑热闹
  3. vue中beforeupdate意思_VUE的生命周期之beforeMount、mounted、beforeUpdate、updated
  4. 计算机知识传播策划书,关于计算机知识活动的策划书
  5. 盖亚假说:地球是一个生命体吗?
  6. 五招教你做好企业年终绩效考核,太实用了!
  7. 读书笔记-尖刀团队特训记
  8. 软件即服务:如何构建 SaaS 应用程序
  9. 2023年节假日数据放假补班数据json
  10. 平面度、 共面度、 翘曲度三者区别