Skip to content

Commit

Permalink
v1.0.1
Browse files Browse the repository at this point in the history
1. 本地缓存500词
2. 开放反馈功能
3. 增加开发者muruko0713
  • Loading branch information
airingursb committed Feb 7, 2017
1 parent 87b7b17 commit ad5f883
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 59 deletions.
6 changes: 6 additions & 0 deletions data/word-list.js

Large diffs are not rendered by default.

Binary file added images/face2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions pages/settings/feedback/feedback.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,17 @@ Page({
"connect": this.data.connect,
"user": this.data.userInfo.nickName
});

wx.showModal({
title: '提示',
content: '提交成功!感谢您的反馈!',
showCancel: false,
success: function (res) {
if (res.confirm) {
console.log('用户点击确定')
}
}
})
}

})
8 changes: 6 additions & 2 deletions pages/settings/help/help.wxml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<view class="container">
<image class="logo" src="/images/search-logo.png"></image>
<text class="name">咩咩辞典 v0.0.1</text>
<text class="name">内测版</text>
<text class="name">咩咩单词 v1.0.1</text>
<text class="name">开发者信息</text>
<image class="user-avatar" src="/images/face.png"></image>
<text class="name">Airing</text>
<text class="name">微博:@Airing</text>
<text class="name">GitHub:@airingursb</text>
<text class="name">个人主页:https://ursb.me</text>
<image class="user-avatar" src="/images/face2.png"></image>
<text class="name">muruko0713</text>
<text class="name">GitHub:@maruko0713</text>
<text class="name">个人主页:http://maruko0713.github.io</text>
<text class="copy">本软件已开源:https://github.com/airingursb/miemie</text>
</view>
102 changes: 45 additions & 57 deletions pages/word/word.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,18 @@
var vocabulary = require('../../data/vocabulary.js')
var list = require('../../data/word-list.js')

Page({
data: {
},
onLoad: function (options) {

var idx = Math.floor(Math.random() * 12346) + 1
var word = vocabulary.wordList[idx]
var that = this;
wx.request({
url: 'https://api.shanbay.com/bdc/search/?word=' + word,
data: {},
method: 'GET',
success: function (res) {
console.log(res)
that.setData({
content: res.data.data.content,
audio: res.data.data.audio_addresses.us[0],
pron: res.data.data.pron,
definition: res.data.data.definition
})
// wx.downloadFile({
// url: res.data.data.audio_addresses.us[0],
// success: function (res) {
// wx.playVoice({
// filePath: res.tempFilePath
// })
// }
// })
},
fail: function () {
},
complete: function () {
}
var idx = Math.floor(Math.random() * 499) + 1
var word = list.wordList[idx]

this.setData({
content: word.content,
pron: word.pron,
definition: word.definition,
audio: word.audio
})

},
Expand All @@ -46,35 +26,43 @@ Page({
this.setData({
showNot: false
})
var idx = Math.floor(Math.random() * 12346) + 1
var word = vocabulary.wordList[idx]
var that = this;
wx.request({
url: 'https://api.shanbay.com/bdc/search/?word=' + word,
data: {},
method: 'GET',
success: function (res) {
console.log(res)
that.setData({
content: res.data.data.content,
audio: res.data.data.audio_addresses.us[0],
pron: res.data.data.pron,
definition: res.data.data.definition
})
// wx.downloadFile({
// url: res.data.data.audio_addresses.us[0],
// success: function (res) {
// wx.playVoice({
// filePath: res.tempFilePath
// })
// }
// })
},
fail: function () {
},
complete: function () {
}
var idx = Math.floor(Math.random() * 499) + 1
var word = list.wordList[idx]

this.setData({
content: word.content,
pron: word.pron,
definition: word.definition,
audio: word.audio
})

// var that = this;
// wx.request({
// url: 'https://api.shanbay.com/bdc/search/?word=' + word,
// data: {},
// method: 'GET',
// success: function (res) {
// console.log(res)
// that.setData({
// content: res.data.data.content,
// audio: res.data.data.audio_addresses.us[0],
// pron: res.data.data.pron,
// definition: res.data.data.definition
// })
// // wx.downloadFile({
// // url: res.data.data.audio_addresses.us[0],
// // success: function (res) {
// // wx.playVoice({
// // filePath: res.tempFilePath
// // })
// // }
// // })
// },
// fail: function () {
// },
// complete: function () {
// }
// })
},
read: function () {
console.log(this.data.audio)
Expand Down

0 comments on commit ad5f883

Please sign in to comment.