Commit 74f5d78a by 李嘉林

获取参数加判断

parent ad9ab5bd
...@@ -551,6 +551,8 @@ export function themeScanningCodeClick() { ...@@ -551,6 +551,8 @@ export function themeScanningCodeClick() {
*/ */
export function setStoreInfo({ offlineShopCode, offlineShopName }) { export function setStoreInfo({ offlineShopCode, offlineShopName }) {
console.log(offlineShopCode, offlineShopName, '--setStoreInfo'); console.log(offlineShopCode, offlineShopName, '--setStoreInfo');
let ofCode = "", ofName = "";
wx.setStorageSync("offlineShopCode", offlineShopCode); wx.setStorageSync("offlineShopCode", offlineShopCode);
wx.setStorageSync("offlineShopName", offlineShopName); wx.setStorageSync("offlineShopName", offlineShopName);
} }
...@@ -559,9 +561,18 @@ export function setStoreInfo({ offlineShopCode, offlineShopName }) { ...@@ -559,9 +561,18 @@ export function setStoreInfo({ offlineShopCode, offlineShopName }) {
* 获取门店code、name * 获取门店code、name
*/ */
export function getStoreInfo() { export function getStoreInfo() {
let offlineShopCode = wx.getStorageSync("offlineShopCode");
let offlineShopName = wx.getStorageSync("offlineShopName");
let ofCode = "", ofName = "";
if (offlineShopCode != undefined && offlineShopCode != "" && offlineShopCode != null && offlineShopCode != "undefined" && offlineShopCode != "null") {
ofCode = offlineShopCode;
}
if (offlineShopName != undefined && offlineShopName != "" && offlineShopName != null && offlineShopName != "undefined" && offlineShopName != "null") {
ofName = offlineShopName;
}
return { return {
offlineShopCode: wx.getStorageSync("offlineShopCode") || "", offlineShopCode: ofCode || "",
offlineShopName: wx.getStorageSync("offlineShopName") || "" offlineShopName: ofName || ""
}; };
} }
......
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