Commit 5ff7840d authored by zhoucong's avatar zhoucong

123

parent ca45e67b
......@@ -6,12 +6,12 @@
//4.setStorageSync与setStorage的区别:如果后续的操作需要使用更新storage后保存的data,则使用setStorageSync使用异步性能更好,使用同步数据更安全
export default {
onLaunch: function() {//初始化完成时触发(全局只触发一次
// let openid=uni.getStorageSync("openid")
// if(!openid){
let openid=uni.getStorageSync("openid")
if(!openid){
uni.navigateTo({
url: "pages/vlog/vlogIndex/vlogIndex"
})
// }
}
},
onShow: function() {
......
......@@ -104,12 +104,12 @@ __webpack_require__.r(__webpack_exports__);
//4.setStorageSync与setStorage的区别:如果后续的操作需要使用更新storage后保存的data,则使用setStorageSync使用异步性能更好,使用同步数据更安全
var _default = {
onLaunch: function onLaunch() {//初始化完成时触发(全局只触发一次
// let openid=uni.getStorageSync("openid")
// if(!openid){
uni.navigateTo({
url: "pages/vlog/vlogIndex/vlogIndex" });
var openid = uni.getStorageSync("openid");
if (!openid) {
uni.navigateTo({
url: "pages/vlog/vlogIndex/vlogIndex" });
// }
}
},
onShow: function onShow() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment