2 Star 2 Fork 1

AlanLee/uniapp_panda_appointment

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
main.js 1.15 KB
一键复制 编辑 原始数据 按行查看 历史
李步官 提交于 2019-12-23 21:55 . 2019-12-23 21:58 更新内容:
import Vue from 'vue'
import App from './App'
Vue.config.productionTip = false
Vue.prototype.checkLogin = function(backpage, backtype){
var SUID = uni.getStorageSync('SUID');
var SRAND = uni.getStorageSync('SRAND');
var SNAME = uni.getStorageSync('SNAME');
var SFACE = uni.getStorageSync('SFACE');
if(SUID == '' || SRAND == '' || SFACE== ''){
uni.redirectTo({
url:'/pages/user/login?backpage=' + backpage + '&backtype=' + backtype
});
return false;
}
return {
SUID:'',
SRAND:'',
SNAME:'',
SFACE:''
}
}
// let domain = 'localhost';
let domain = '47.103.204.62';
let port = '8083';
Vue.prototype.createApiUrl = function(reqUrl){
return 'http://' + domain + ':' + port + '/' + reqUrl;
}
Vue.prototype.getUserInfo = function(){
let userinfo = uni.getStorageSync('userinfo');
// console.log('main.js -> userinfo:');
// console.log(userinfo);
return userinfo;
}
Vue.prototype.gotoPage = function (pageUrl){
uni.navigateTo({
url: pageUrl
});
}
Vue.prototype.previewImage = function(index, urls){
uni.previewImage({
current:index,
urls:urls,
indicator:"default"
})
}
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/AlanLee97/uniapp_panda_appointment.git
git@gitee.com:AlanLee97/uniapp_panda_appointment.git
AlanLee97
uniapp_panda_appointment
uniapp_panda_appointment
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385