diff --git a/1517060342/final/juedi/app.js b/1517060342/final/juedi/app.js new file mode 100644 index 0000000..6dd225b --- /dev/null +++ b/1517060342/final/juedi/app.js @@ -0,0 +1,42 @@ +//app.js +App({ + + onLaunch: function () { + // 展示本地存储能力 + var logs = wx.getStorageSync('logs') || [] + logs.unshift(Date.now()) + wx.setStorageSync('logs', logs) + + // 登录 + wx.login({ + success: res => { + // 发送 res.code 到后台换取 openId, sessionKey, unionId + } + }) + // 获取用户信息 + wx.getSetting({ + success: res => { + if (res.authSetting['scope.userInfo']) { + // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框 + wx.getUserInfo({ + success: res => { + // 可以将 res 发送给后台解码出 unionId + this.globalData.userInfo = res.userInfo + + // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 + // 所以此处加入 callback 以防止这种情况 + if (this.userInfoReadyCallback) { + this.userInfoReadyCallback(res) + } + } + }) + } + } + }) + }, + globalData: { + + logincg: "0", + userInfo: null + } +}) \ No newline at end of file diff --git a/1517060342/final/juedi/app.json b/1517060342/final/juedi/app.json new file mode 100644 index 0000000..5288de0 --- /dev/null +++ b/1517060342/final/juedi/app.json @@ -0,0 +1,42 @@ +{ + + "pages":[ + "pages/index/index", + "pages/logs/logs", + "pages/faxian/faxian", + "pages/AK47/AK47", + "pages/M16A4/M16A4", + "pages/game/game", + "pages/login/login", + "pages/shezhi/shezhi" + ], + "window":{ + "backgroundTextStyle":"light", + "navigationBarBackgroundColor": "#fff", + "navigationBarTitleText": "绝地求生游戏盒子", + "navigationBarTextStyle":"black" + }, + "tabBar": { + + "list": [ + { + "pagePath": "pages/index/index", + "iconPath": "pages/images/b.png", + "selectedIconPath": "pages/images/b.png", + "text": "排行榜" + }, + { + "pagePath": "pages/faxian/faxian", + "iconPath": "pages/images/a.png", + "selectedIconPath": "pages/images/a.png", + "text": "发现" + }, + { + "pagePath": "pages/shezhi/shezhi", + "iconPath": "pages/images/c.png", + "selectedIconPath": "pages/images/c.png", + "text": "留言" + } + ] + } +} diff --git a/1517060342/final/juedi/app.wxss b/1517060342/final/juedi/app.wxss new file mode 100644 index 0000000..f58bfe5 --- /dev/null +++ b/1517060342/final/juedi/app.wxss @@ -0,0 +1,11 @@ +/**app.wxss**/ +@import 'style/weui.wxss'; +.container { + height: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: space-between; + padding: 200rpx 0; + box-sizing: border-box; +} diff --git a/1517060342/final/juedi/pages/AK47/AK47.js b/1517060342/final/juedi/pages/AK47/AK47.js new file mode 100644 index 0000000..dfd80ed --- /dev/null +++ b/1517060342/final/juedi/pages/AK47/AK47.js @@ -0,0 +1,66 @@ +// pages/AK47/AK47.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/1517060342/final/juedi/pages/AK47/AK47.json b/1517060342/final/juedi/pages/AK47/AK47.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/1517060342/final/juedi/pages/AK47/AK47.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/1517060342/final/juedi/pages/AK47/AK47.wxml b/1517060342/final/juedi/pages/AK47/AK47.wxml new file mode 100644 index 0000000..d2539ed --- /dev/null +++ b/1517060342/final/juedi/pages/AK47/AK47.wxml @@ -0,0 +1,5 @@ + + + +AK-47突击步枪,是由苏联枪械设计师米哈伊尔·季莫费耶维奇·卡拉什尼科夫(Михаил Тимофеевич Калашников)设计的自动步枪。“AK”的意思是“Автомат Калашникова”(“自动步枪”的首字母缩写)“47”的意思是“1947年产”。是苏联的第一代突击步枪。 +AK-47属于突击步枪,与第二次世界大战时期的步枪相比,枪身短小、射程较短,适合较近距离的战斗。采用导气式自动原理,导气管位于枪管上方,通过活塞推动枪机动作,回转式闭锁枪机。 diff --git a/1517060342/final/juedi/pages/AK47/AK47.wxss b/1517060342/final/juedi/pages/AK47/AK47.wxss new file mode 100644 index 0000000..1c08cbc --- /dev/null +++ b/1517060342/final/juedi/pages/AK47/AK47.wxss @@ -0,0 +1 @@ +/* pages/AK47/AK47.wxss */ \ No newline at end of file diff --git a/1517060342/final/juedi/pages/M16A4/M16A4.js b/1517060342/final/juedi/pages/M16A4/M16A4.js new file mode 100644 index 0000000..e2276e1 --- /dev/null +++ b/1517060342/final/juedi/pages/M16A4/M16A4.js @@ -0,0 +1,66 @@ +// pages/m16a4/m16a4.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/1517060342/final/juedi/pages/M16A4/M16A4.json b/1517060342/final/juedi/pages/M16A4/M16A4.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/1517060342/final/juedi/pages/M16A4/M16A4.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/1517060342/final/juedi/pages/M16A4/M16A4.wxml b/1517060342/final/juedi/pages/M16A4/M16A4.wxml new file mode 100644 index 0000000..11af5f8 --- /dev/null +++ b/1517060342/final/juedi/pages/M16A4/M16A4.wxml @@ -0,0 +1,4 @@ + + +M16A4自动步枪是M16自动步枪的一种改型。M16A4作为前线美国陆军和美国海豹突击队的标准装备,它是将枪械与火控系统分别进行模块化来设计的。 +M16A4自动步枪是M16自动步枪的一种改型,使用30发5.56毫米口径子弹装填的并具有3发点射功能的突击步枪。稳定的命中率和独特的3发点射功能充分体现了它瞬间火力强大的优点,但3发点射后是有较长延迟的。。 diff --git a/1517060342/final/juedi/pages/M16A4/M16A4.wxss b/1517060342/final/juedi/pages/M16A4/M16A4.wxss new file mode 100644 index 0000000..b4e47ef --- /dev/null +++ b/1517060342/final/juedi/pages/M16A4/M16A4.wxss @@ -0,0 +1 @@ +/* pages/m16a4/m16a4.wxss */ \ No newline at end of file diff --git a/1517060342/final/juedi/pages/faxian/faxian.js b/1517060342/final/juedi/pages/faxian/faxian.js new file mode 100644 index 0000000..e4a66a0 --- /dev/null +++ b/1517060342/final/juedi/pages/faxian/faxian.js @@ -0,0 +1,66 @@ +// pages/faxian/faxian.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/1517060342/final/juedi/pages/faxian/faxian.json b/1517060342/final/juedi/pages/faxian/faxian.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/1517060342/final/juedi/pages/faxian/faxian.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/1517060342/final/juedi/pages/faxian/faxian.wxml b/1517060342/final/juedi/pages/faxian/faxian.wxml new file mode 100644 index 0000000..379a022 --- /dev/null +++ b/1517060342/final/juedi/pages/faxian/faxian.wxml @@ -0,0 +1,25 @@ + + + 绝地求生相关咨询 + + + 武器参数说明 + + + AK47卡宾枪详情 + 打开 + + + M16A4详情 + 打开 + + + 游戏更新详情 + + + 第十六周更新说明 + 打开 + + + + \ No newline at end of file diff --git a/1517060342/final/juedi/pages/faxian/faxian.wxss b/1517060342/final/juedi/pages/faxian/faxian.wxss new file mode 100644 index 0000000..f4319c7 --- /dev/null +++ b/1517060342/final/juedi/pages/faxian/faxian.wxss @@ -0,0 +1 @@ +/* pages/faxian/faxian.wxss */ \ No newline at end of file diff --git a/1517060342/final/juedi/pages/game/game.js b/1517060342/final/juedi/pages/game/game.js new file mode 100644 index 0000000..8d85017 --- /dev/null +++ b/1517060342/final/juedi/pages/game/game.js @@ -0,0 +1,66 @@ +// pages/game/game.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/1517060342/final/juedi/pages/game/game.json b/1517060342/final/juedi/pages/game/game.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/1517060342/final/juedi/pages/game/game.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/1517060342/final/juedi/pages/game/game.wxml b/1517060342/final/juedi/pages/game/game.wxml new file mode 100644 index 0000000..6c5f151 --- /dev/null +++ b/1517060342/final/juedi/pages/game/game.wxml @@ -0,0 +1,9 @@ + +昨晚,绝地求生在社区更新了第16周的更新内容,新版本将于星期三更新至测试服务器,如果测试进展顺利,将于星期四推送至正式服务器。 + +抢先体验 – 第 16 周 - 更新说明 +客户端性能 +Bug 修复 +修复了当使用数字键切换武器时打开物品栏将导致装备栏武器图标不显示的问题 + + diff --git a/1517060342/final/juedi/pages/game/game.wxss b/1517060342/final/juedi/pages/game/game.wxss new file mode 100644 index 0000000..b1d1066 --- /dev/null +++ b/1517060342/final/juedi/pages/game/game.wxss @@ -0,0 +1 @@ +/* pages/game/game.wxss */ \ No newline at end of file diff --git a/1517060342/final/juedi/pages/images/1.jpg b/1517060342/final/juedi/pages/images/1.jpg new file mode 100644 index 0000000..15b4edf Binary files /dev/null and b/1517060342/final/juedi/pages/images/1.jpg differ diff --git a/1517060342/final/juedi/pages/images/16.png b/1517060342/final/juedi/pages/images/16.png new file mode 100644 index 0000000..ac48cc5 Binary files /dev/null and b/1517060342/final/juedi/pages/images/16.png differ diff --git a/1517060342/final/juedi/pages/images/2.jpg b/1517060342/final/juedi/pages/images/2.jpg new file mode 100644 index 0000000..bb827ef Binary files /dev/null and b/1517060342/final/juedi/pages/images/2.jpg differ diff --git a/1517060342/final/juedi/pages/images/3.jpg b/1517060342/final/juedi/pages/images/3.jpg new file mode 100644 index 0000000..4894a65 Binary files /dev/null and b/1517060342/final/juedi/pages/images/3.jpg differ diff --git a/1517060342/final/juedi/pages/images/4.jpg b/1517060342/final/juedi/pages/images/4.jpg new file mode 100644 index 0000000..dd63a19 Binary files /dev/null and b/1517060342/final/juedi/pages/images/4.jpg differ diff --git a/1517060342/final/juedi/pages/images/5.jpg b/1517060342/final/juedi/pages/images/5.jpg new file mode 100644 index 0000000..7cdeda8 Binary files /dev/null and b/1517060342/final/juedi/pages/images/5.jpg differ diff --git a/1517060342/final/juedi/pages/images/a.png b/1517060342/final/juedi/pages/images/a.png new file mode 100644 index 0000000..ddb191c Binary files /dev/null and b/1517060342/final/juedi/pages/images/a.png differ diff --git a/1517060342/final/juedi/pages/images/ak.jpg b/1517060342/final/juedi/pages/images/ak.jpg new file mode 100644 index 0000000..3914d28 Binary files /dev/null and b/1517060342/final/juedi/pages/images/ak.jpg differ diff --git a/1517060342/final/juedi/pages/images/b.png b/1517060342/final/juedi/pages/images/b.png new file mode 100644 index 0000000..cc27587 Binary files /dev/null and b/1517060342/final/juedi/pages/images/b.png differ diff --git a/1517060342/final/juedi/pages/images/c.png b/1517060342/final/juedi/pages/images/c.png new file mode 100644 index 0000000..e4a778b Binary files /dev/null and b/1517060342/final/juedi/pages/images/c.png differ diff --git a/1517060342/final/juedi/pages/images/key.png b/1517060342/final/juedi/pages/images/key.png new file mode 100644 index 0000000..2eed77e Binary files /dev/null and b/1517060342/final/juedi/pages/images/key.png differ diff --git a/1517060342/final/juedi/pages/images/login.png b/1517060342/final/juedi/pages/images/login.png new file mode 100644 index 0000000..e482a20 Binary files /dev/null and b/1517060342/final/juedi/pages/images/login.png differ diff --git a/1517060342/final/juedi/pages/images/m16a4.jpg b/1517060342/final/juedi/pages/images/m16a4.jpg new file mode 100644 index 0000000..2a2a016 Binary files /dev/null and b/1517060342/final/juedi/pages/images/m16a4.jpg differ diff --git a/1517060342/final/juedi/pages/images/name.png b/1517060342/final/juedi/pages/images/name.png new file mode 100644 index 0000000..f528050 Binary files /dev/null and b/1517060342/final/juedi/pages/images/name.png differ diff --git a/1517060342/final/juedi/pages/index/index.js b/1517060342/final/juedi/pages/index/index.js new file mode 100644 index 0000000..42a37d3 --- /dev/null +++ b/1517060342/final/juedi/pages/index/index.js @@ -0,0 +1,115 @@ +// pages/comp/scroll.js +var base64 = require("../example/images/base64"); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + isEnd: false, + messages: [{ + name: "玩家:杰西卡", + last: "排名:No1", + tupian: "../images/1.jpg" + }, { + name: "玩家:莫妮卡", + last: "排名:No2", + tupian: "../images/5.jpg" + }, { + name: "玩家:阿比盖尔", + last: "排名:No3", + tupian: "../images/2.jpg" + }, { + name: "玩家:艾达", + last: "排名:No4", + tupian: "../images/3.jpg" + }, { + name: "玩家:阿德莱德", + last: "排名:No5", + tupian: "../images/4.jpg" + }] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + console.dir(getApp()) + if (getApp().globalData.logincg==0){ + wx.redirectTo({ + url: '../login/login' + }) + } + this.setData({ + icon20: base64.icon20, + icon60: base64.icon60 + }); + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + + onEnd: function () { + console.log("onEnd") + var that = this; + var data = that.data; + that.setData({ + isEnd: true /*, + messages: data.messages.concat([{ + name: "Tom", + last: "Hello!" + }, { + name: "john", + last: "yes." + }]) */ + }); + + } +}) \ No newline at end of file diff --git a/1517060342/final/juedi/pages/index/index.wxml b/1517060342/final/juedi/pages/index/index.wxml new file mode 100644 index 0000000..79e59e6 --- /dev/null +++ b/1517060342/final/juedi/pages/index/index.wxml @@ -0,0 +1,14 @@ + + + + + + + {{item.name}} + {{item.last}} + + + + 正在加载…… + + \ No newline at end of file diff --git a/1517060342/final/juedi/pages/index/index.wxss b/1517060342/final/juedi/pages/index/index.wxss new file mode 100644 index 0000000..0d36f6f --- /dev/null +++ b/1517060342/final/juedi/pages/index/index.wxss @@ -0,0 +1 @@ +/**index.wxss**/ diff --git a/1517060342/final/juedi/pages/login/login.js b/1517060342/final/juedi/pages/login/login.js new file mode 100644 index 0000000..3280e48 --- /dev/null +++ b/1517060342/final/juedi/pages/login/login.js @@ -0,0 +1,45 @@ +// pages/login/login.js +Page({ + data: { + phone: '', + password: '' + }, + + // 获取输入账号 + phoneInput: function (e) { + this.setData({ + phone: e.detail.value + }) + }, + + // 获取输入密码 + passwordInput: function (e) { + this.setData({ + password: e.detail.value + }) + }, + + // 登录 + login: function () { + if (this.data.phone.length == 0 || this.data.password.length == 0) { + wx.showToast({ + title: '用户名和密码不能为空', + icon: 'loading', + duration: 2000 + }) + } else { + // 这里修改成跳转的页面 + getApp().globalData.logincg = 1 + wx.showToast({ + title: '登录成功', + icon: 'success', + duration: 5000, + success:function(){ + wx.switchTab({ + url: '../index/index' + }) + } + }) + } + } +}) \ No newline at end of file diff --git a/1517060342/final/juedi/pages/login/login.json b/1517060342/final/juedi/pages/login/login.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/1517060342/final/juedi/pages/login/login.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/1517060342/final/juedi/pages/login/login.wxml b/1517060342/final/juedi/pages/login/login.wxml new file mode 100644 index 0000000..1747f0b --- /dev/null +++ b/1517060342/final/juedi/pages/login/login.wxml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/1517060342/final/juedi/pages/login/login.wxss b/1517060342/final/juedi/pages/login/login.wxss new file mode 100644 index 0000000..6a581cf --- /dev/null +++ b/1517060342/final/juedi/pages/login/login.wxss @@ -0,0 +1,75 @@ +/* pages/login/login.wxss */ +page{ + height: 100%; +} + +.container { + height: 100%; + display: flex; + flex-direction: column; + padding: 0; + box-sizing: border-box; + background-color: #f2f2f2 +} + +/*登录图片*/ +.login-icon{ + flex: none; +} +.login-img{ + width: 750rpx; +} + +/*表单内容*/ +.login-from { + margin-top: 20px; + flex: auto; + height:100%; +} + +.inputView { + background-color: #fff; + line-height: 44px; +} +/*输入框*/ +.nameImage, .keyImage { + margin-left: 22px; + width: 14px; + height: 14px +} + +.loginLab { + margin: 15px 15px 15px 10px; + color: #545454; + font-size: 14px +} +.inputText { + flex: block; + float: right; + text-align: right; + margin-right: 22px; + margin-top: 11px; + color: #cccccc; + font-size: 14px +} + +.line { + width: 100%; + height: 1px; + background-color: #cccccc; + margin-top: 1px; +} +/*按钮*/ +.loginBtnView { + width: 100%; + height: auto; + background-color: #f2f2f2; + margin-top: 0px; + margin-bottom: 0px; + padding-bottom: 0px; +} + +.loginBtn { + width: 80%; + margin-top: 35px; +} diff --git a/1517060342/final/juedi/pages/logs/logs.js b/1517060342/final/juedi/pages/logs/logs.js new file mode 100644 index 0000000..b2b967d --- /dev/null +++ b/1517060342/final/juedi/pages/logs/logs.js @@ -0,0 +1,15 @@ +//logs.js +const util = require('../../utils/util.js') + +Page({ + data: { + logs: [] + }, + onLoad: function () { + this.setData({ + logs: (wx.getStorageSync('logs') || []).map(log => { + return util.formatTime(new Date(log)) + }) + }) + } +}) diff --git a/1517060342/final/juedi/pages/logs/logs.json b/1517060342/final/juedi/pages/logs/logs.json new file mode 100644 index 0000000..28379bc --- /dev/null +++ b/1517060342/final/juedi/pages/logs/logs.json @@ -0,0 +1,3 @@ +{ + "navigationBarTitleText": "查看启动日志" +} \ No newline at end of file diff --git a/1517060342/final/juedi/pages/logs/logs.wxml b/1517060342/final/juedi/pages/logs/logs.wxml new file mode 100644 index 0000000..b5a85ac --- /dev/null +++ b/1517060342/final/juedi/pages/logs/logs.wxml @@ -0,0 +1,6 @@ + + + + {{index + 1}}. {{log}} + + diff --git a/1517060342/final/juedi/pages/logs/logs.wxss b/1517060342/final/juedi/pages/logs/logs.wxss new file mode 100644 index 0000000..94d4b88 --- /dev/null +++ b/1517060342/final/juedi/pages/logs/logs.wxss @@ -0,0 +1,8 @@ +.log-list { + display: flex; + flex-direction: column; + padding: 40rpx; +} +.log-item { + margin: 10rpx; +} diff --git a/1517060342/final/juedi/pages/shezhi/shezhi.js b/1517060342/final/juedi/pages/shezhi/shezhi.js new file mode 100644 index 0000000..5a5e634 --- /dev/null +++ b/1517060342/final/juedi/pages/shezhi/shezhi.js @@ -0,0 +1,114 @@ +// pages/shezhi/shezhi.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + text: "请输入留言标题" + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + var that = this; + /* + wx.getStorage({ + key: 'formData', + success: function (res) { + console.log(res.data) + that.setData({ + text: res.data.text, + paragh: res.data.paragh + }); + } + }) + */ + wx.request({ + url: 'https://infoaas.com/data/hzc.json', //仅为示例,并非真实的接口地址 + + data: {}, + header: { + 'content-type': 'application/json' // 默认值 + }, + success: function (res) { + console.log(res.data) + that.setData({ + text: res.data.name, + paragh: "任课老师是:" + res.data.teacher + " 2017" + }); + } + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + + doSubmit: function (e) { + console.dir(e) + var that = this; + var text = e.detail.value.text; + var paragh = e.detail.value.paragh; + + wx.setStorage({ + key: "formData", + data: { + text: text, + paragh: paragh + } + }) + + wx.showToast({ + title: '成功', + icon: 'success', + duration: 2000 + }) + } +}) \ No newline at end of file diff --git a/1517060342/final/juedi/pages/shezhi/shezhi.json b/1517060342/final/juedi/pages/shezhi/shezhi.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/1517060342/final/juedi/pages/shezhi/shezhi.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/1517060342/final/juedi/pages/shezhi/shezhi.wxml b/1517060342/final/juedi/pages/shezhi/shezhi.wxml new file mode 100644 index 0000000..e7c7237 --- /dev/null +++ b/1517060342/final/juedi/pages/shezhi/shezhi.wxml @@ -0,0 +1,32 @@ + + + +
+ + {{text + ", " + paragh}} + + 留言标题 + + + + + + + + + 留言内容 + + + +