var url = 'https://www.daweilinli.com/smartcommunity-api/';//https://vote.chuanghai-tech.com/smartcommunity-api/
var url2 = 'https://www.jinganrenjiams.com/cloud-mall';
// var url = 'http://192.168.31.143:9999/';
var nameList = ['赣', '京','辽','吉','黑', '冀', '晋','津','蒙','苏','浙','皖','闽','鲁','沪','豫','湘','鄂','粤','琼','桂','川','滇','贵','渝','藏','陕','甘','青','宁','新','港','澳','台']
export default{
	url,
	url2,
	nameList,
	islogin(token) {
		if(!token) {
			uni.navigateTo({
				url: "../login/login"
			})
		}
	},
	islogin2(token) {
		if(!token) {
			uni.navigateTo({
				url: "../../login/login"
			})
		}
	},
	isOverdue(){
		uni.showModal({
		    content: '你的身份已过期，请重新登录~',
			showCancel: false,
		    success: function (res) {
		        if (res.confirm) {
					uni.removeStorageSync('tokenId');
		            uni.navigateTo({
		            	url: '../../login/login'
		            })
		        }
		    }
		})
	},
	isOverdue2(){
		uni.showModal({
		    content: '你的身份已过期，请重新登录~',
			showCancel: false,
		    success: function (res) {
		        if (res.confirm) {
					uni.removeStorageSync('tokenId');
		            uni.navigateTo({
		            	url: '../login/login'
					})
		        }
		    }
		})
	}
}