Appment_main.js
1.38 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
var e = getApp(),
a = e.globalData.setting,
os = a,
t = e.request;
Page({
/**
* 页面的初始数据
*/
data: {
iurl: a.imghost, //服务器网址
store: 0, //是否显示服务门店列表
beautician: 0, //是否显示美容师列表
beautician_name: "", //选中的美容师名称
placeholder: "填写备注",//备注为空的placeholder
},
onclickstore: function() {
var th = this;
var store = th.data.store;
if (store) {
th.setData({
store: 0
})
} else {
th.setData({
store: 1,
placeholder:""
})
}
},
onclickbea: function(e) {
var th = this;
var beautician = th.data.beautician;
var beaname = e.currentTarget.dataset.beaname;
if (beautician) {
// 判断是否选择美容师没有的话就把美容师列表收起来
if (beaname != undefined) {
th.setData({
beautician: 0,
beautician_name: beaname,
placeholder: "填写备注"
})
} else {
th.setData({
beautician: 0,
placeholder: "填写备注"
})
}
} else {
th.setData({
beautician: 1,
placeholder: ""
})
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
}
})