my_set.html
8.2 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<script src="../../assets/js/fontsize.js"></script>
<link rel="stylesheet" href="../../assets/css/api.css"/>
<link rel="stylesheet" href="../../assets/css/style.css">
<link rel="stylesheet" href="../../assets/icon/iconfont.css">
<title></title>
<style>
body, html {
background-color: #f4f4f4;
height: 100%;
overflow: hidden;
}
.set_box {
background-color: #fff;
margin: 0.09rem 0 0 0;
}
.set_item {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 15px;
color: #424242;
border-bottom: 1px solid #F7f7f7;
padding: 0.3rem 0.43rem;
}
.set_item:last-child {
border: 0;
}
.set_item .iconfont {
color: #C0C0C0;
font-size: 15px;
}
.set_item .work_time {
font-size: 12px;
color: #C0C0C0;
}
.fontBold {
font-weight: 600;
}
</style>
</head>
<body>
<div id="app">
<div class="set_box">
<div class="set_item" @click="argeement">
<span>慈界用户服务协议</span><span class="iconfont icon-xiangyou"></span>
</div>
<div class="set_item" @click="forget">
<span>修改密码</span><span class="iconfont icon-xiangyou"></span>
</div>
</div>
<div class="set_box">
<div class="set_item" @click="clear_ache">
<span>清除缓存</span>
<div><span v-text="size+'M'"></span> <span class="iconfont icon-xiangyou"></span></div>
</div>
<div class="set_item" @click="about_us">
<span>关于我们</span><span class="iconfont icon-xiangyou"></span>
</div>
</div>
<div class="set_box">
<div class="set_item" @click="callNumber">
<span>联系客服</span><span class="iconfont icon-xiangyou"></span>
</div>
<div class="set_item" @click="sever">
<span>在线客服</span>
<div class="work_time"><span>工作时间: 周一至周日 9:00-17:00</span><span class="iconfont icon-xiangyou"></span></div>
</div>
</div>
<!--<div class="set_box">-->
<!--<div class="set_item" @click="provider">-->
<!--<span>服务商入口</span><span class="iconfont icon-xiangyou"></span>-->
<!--</div>-->
<!--</div>-->
<div class="save_btn" @click="login_out">退出登录</div>
</div>
</body>
</html>
<script type="text/javascript" src="../../assets/js/api.js"></script>
<script type="text/javascript" src="../../assets/js/vue.min.js"></script>
<script type="text/javascript" src="../../assets/js/index.js"></script>
<script type="text/javascript" src="../../assets/js/public.js"></script>
<script type="text/javascript" src="../../assets/js/fastclick.js"></script>
<script>
new FastClick(document.body);
</script>
<script type="text/javascript" src="../../assets/js/axios.min.js"></script>
<script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
<script>
var app = new Vue({
el: "#app",
data: {
isIos: false,
size: 0,
tel: '',
user_info:[]
},
created: function () {
apiready = function () {
app.getCall();
app.getUserIndexInfo();
api.getCacheSize(function (ret) {
app.size = (ret.size / 1048576).toFixed(2);
});
}
},
methods: {
// 获取客服电话
getCall: function () {
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
};
getRequest('post', 'home/site/getWebsiteTel', null, header).then(function (res) {
if (res.data.code == 1) {
app.tel = res.data.data.tel;
} else {
toastMsg(res.data.msg)
}
})
},
// 去慈界用户服务协议
argeement: function () {
openView('agree_content', 'common/agree_content', '慈界用户服务协议', 'agree_content', false, {id: 3}, false)
},
// 修改密码
forget: function () {
openView('forgot_f', 'login/forgot_f', '修改密码')
},
// 清除缓存
clear_ache: function () {
api.clearCache(function () {
api.clearCache(function () {
app.size = 0;
toastMsg('清除完成')
});
});
},
// 退出登录
login_out: function () {
$api.rmStorage('token');
openView('login_index', 'login/login_index', '登录');
window.location.reload()
},
// 关于我们
about_us: function () {
openView('my_about', 'my/my_about', '关于我们')
},
// 去医护端
// provider: function () {
// api.openWin({
// name: 'doctor_win',
// url: '../doctor/doctor_win.html',
// });
// api.sendEvent({
// name: 'doctor_index0',
// extra: {
// index: 0
// }
// });
// },
// 拨打客服电话
callNumber: function () {
api.call({
type: 'tel_prompt',
number: app.tel
});
},
// 获取个人的基本信息
getUserIndexInfo: function () {
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken()
};
getRequest('post', 'user/index/getUserIndexInfo', null, header).then(function (res) {
if (res.data.code == 1) {
app.user_info = res.data.data;
} else {
toastMsg(res.data.msg)
}
})
},
// 打开客服
sever: function () {
// app.getRongYunToken();
function callBack(ret, err) {
if (ret.type == 1) {
// api.closeFrame({}
// );
}
}
var param = {
appkey: "1da38c74bc3746cea6b767727683ca83",
titleImgId: '#dbb25f',
themeColor: '#dbb25f',
backgroundColor: '#f8f9f8',
userId: app.userId,
customBannerColor: '#dbb25f',
nickName: app.user_info.name,
avatarUrl: app.user_info.avatar,
transferKeyWord: '人工服务,人工,电话',
isShowEvaluate: true,
isSettingSkillSet: false,
skillSetId: "",
customUserOutWord: '欢迎再次咨询',
customAdminTipWord: '请稍等... 正在查询资料',
customAdminNonelineTitle: '人工客服忙~',
isShowTansfer: true,
titleFont: 18.0,
bottomLineColor: '#dbb25f',
};
var zhichi = api.require('zhiChiSobot');
zhichi.startZhiChiSobot(param, callBack);
},
}
})
</script>