feedback.js 1.78 KB
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
//hospitalList.js 医院列表 联系医院

// 网络请求工具类
var networkUtil = require('../../utils/network_util.js')
var api = require('../../utils/apiFile.js')

// 页码
var page = 0
// 地理位置信息
var latitude = 0
var longitude = 0
// 是否有更多
var hasMore = true

Page({
data: {
chooseOne: 0,
chooseTwo: 0,
chooseThree: 0,
content: ""

},
onLoad: function (e) {
wx.getSystemInfo({
success: function (res) {
console.log(res)
var system = res.system
var number = system.split(" ")[1]
console.log(system.split(" ")[1])
if (system.split(" ")[0] == "Android") {

if (number.split(".")[0] >= 6) {
console.log("beyond")
} else {
console.log("not beyond")
}
} else {
console.log("ios")
}



}
})

},
chooseOne: function () {
this.setData({
chooseOne: 1,
chooseTwo: 0,
chooseThree: 0,
})
},
chooseTwo: function () {
this.setData({
chooseOne: 0,
chooseTwo: 1,
chooseThree: 0,
})
},
chooseThree: function () {
this.setData({
chooseOne: 0,
chooseTwo: 0,
chooseThree: 1,
})
},
inputOver: function (e) {

var value = e.detail.value
this.setData({
content: value
})
},
submit: function () {
if (this.data.content.length==0){
wx.showToast({
title: '请填写意见或建议',
})
return
}
if (this.data.chooseOne == 0 && this.data.chooseTwo == 0 && this.data.chooseThree == 0 ){
wx.showToast({
title: '选择反馈类型',
})
return
}
console.log(this.data.content)
wx.showToast({
title: '提交成功',
})
wx.navigateBack({
})
}
})