Commit 74f5d78a by 李嘉林

获取参数加判断

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