68 lines
1.8 KiB
JavaScript
68 lines
1.8 KiB
JavaScript
// var apiUrl = "$apiUrl";
|
|
// var token = "$token";
|
|
|
|
// var apiRequest = function (url, data = {}, method = "GET") {
|
|
// let _RES = null;
|
|
// $.ajax({
|
|
// url: apiUrl + url,
|
|
// beforeSend: function (request) {
|
|
// request.setRequestHeader("Authorization", token);
|
|
// },
|
|
// method: method,
|
|
// data: data,
|
|
// async: false,
|
|
// success: function (res) {
|
|
// _RES = res
|
|
// }
|
|
// });
|
|
// return _RES;
|
|
// }
|
|
|
|
// //延时异步请求
|
|
// var apiSyncRequest = function (url, data = {}, method = "GET") {
|
|
// var defer = $.Deferred();
|
|
// $.ajax({
|
|
// url: apiUrl + url,
|
|
// beforeSend: function (request) {
|
|
// request.setRequestHeader("Authorization", token);
|
|
// },
|
|
// method: method,
|
|
// data: data,
|
|
// async: false,
|
|
// success: function (res) {
|
|
// defer.resolve(res);
|
|
// }
|
|
// });
|
|
// return defer.promise();
|
|
// }
|
|
|
|
// var getQueryVal = function (name) {
|
|
// return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ""])[1].replace(/\+/g, '%20')) || null
|
|
// };
|
|
|
|
// var wxconfig = function () {
|
|
// let rs = apiRequest("Wechat/JSSDK");
|
|
// wx.config(rs.data);
|
|
// wx.error(function (res) {
|
|
// console.log(res)
|
|
// });
|
|
// }
|
|
|
|
// 底部导航路由配置
|
|
const TabBarRoutes = {
|
|
home: '/PatientApp/Index/index',
|
|
nurses: '/PatientApp/Nursing/index',
|
|
publish: '/PatientApp/Order/create',
|
|
order: '/PatientApp/Order/index',
|
|
mine: '/PatientApp/Mine/index'
|
|
};
|
|
|
|
// 通用跳转方法
|
|
function onTabBarChange(name) {
|
|
if (TabBarRoutes[name]) {
|
|
window.location.href = TabBarRoutes[name];
|
|
}
|
|
}
|
|
|
|
console.log('');
|