Commit 834a10a8 by songbingqi

修复部分bug

parent abc500e6
...@@ -158,7 +158,7 @@ export default { ...@@ -158,7 +158,7 @@ export default {
console.log(this.shopInfo); console.log(this.shopInfo);
const { shopInfo } = this; const { shopInfo } = this;
const { startTime, endTime, state } = shopInfo; const { startTime, endTime, state } = shopInfo;
if (!startTime || !endTime || !state) return true; if (!startTime || !endTime || (!state&&state!==0)) return true;
function getNowFormatDate() { function getNowFormatDate() {
let date = new Date(), let date = new Date(),
seperator1 = "/", //格式分隔符 seperator1 = "/", //格式分隔符
...@@ -178,7 +178,7 @@ export default { ...@@ -178,7 +178,7 @@ export default {
if ( if (
startTimeNew < new Date().valueOf() && startTimeNew < new Date().valueOf() &&
new Date().valueOf() < endTimeNew && new Date().valueOf() < endTimeNew &&
state === 1 (state === 1||state === 0)
) { ) {
uni.setStorageSync("shopState", true); uni.setStorageSync("shopState", true);
return true; return true;
...@@ -238,9 +238,9 @@ export default { ...@@ -238,9 +238,9 @@ export default {
// 已经授权位置不获取默认店铺 // 已经授权位置不获取默认店铺
if (res.authSetting["scope.userLocation"]) { if (res.authSetting["scope.userLocation"]) {
User.getLocation((state, params) => { User.getLocation((state, params) => {
if (state != 1) { // if (state != 1) {
return; // return;
} // }
this.getShopMenus(params); this.getShopMenus(params);
}); });
} else { } else {
......
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