diff --git a/root/merchantManagement/setting.vue b/root/merchantManagement/setting.vue index c85cc7f..74d1920 100644 --- a/root/merchantManagement/setting.vue +++ b/root/merchantManagement/setting.vue @@ -32,8 +32,8 @@ @@ -52,8 +52,8 @@ @@ -94,15 +94,26 @@ export default { return this.G.shareFun(); }, onLoad(options) { + let that = this; this.applySwitch = this.appInfo.applyNumDisplay == 1 ? true : false; - this.getShareInfo(); + // this.getShareInfo(); + }, + onShow() { + let that = this; + that.G.Get(that.api.login_agencyInfo, {}, (aRes) => { + uni.setStorageSync("agencyInfo", aRes.agency); + let _data = aRes.agency; + that.fdb_Homecity = _data.fdbHomeCity == 1 ? true : false; + that.fdb_HomeTab = _data.fdbHomeTab == 1 ? true : false; + console.log("获取团队信息:", aRes, that.fdb_Homecity, that.fdb_HomeTab); + }); }, data() { return { applySwitch: false, jobSwitch: false, - defaultCitySwitch: false, - recommendSwitch: false, + fdb_Homecity: false, + fdb_HomeTab: false, appInfo: uni.getStorageSync("miniApp-info"), }; }, @@ -129,7 +140,15 @@ export default { }); } } if (type == "defaultCity") { + this.G.Put(this.api.merchantManagement_updateField, { fieldName: "fdbHomeCity", fieldValue: e ? 1 : 0 }, (res) => { + console.log(res); + resolve(); + }); }if (type == "recommend") { + this.G.Put(this.api.merchantManagement_updateField, { fieldName: "fdbHomeTab", fieldValue: e ? 1 : 0 }, (res) => { + console.log(res); + resolve(); + }); } else { this.G.Put(this.api.merchantManagement_updateField, { fieldName: "applyNumDisplay", fieldValue: e ? 1 : 0 }, (res) => { console.log(res); diff --git a/utils/common.js b/utils/common.js index 644ad96..77bd9cb 100644 --- a/utils/common.js +++ b/utils/common.js @@ -15,7 +15,7 @@ let data = { // coziID: '7491244881596809243', baseUrl: "https://daotian.matripe.com.cn",// 网络请求的基础路径 // baseUrl: "http://192.168.3.83:8001", // 网络请求的基础路径 - // baseUrl: "http://192.168.3.4:8001",// tom3 + baseUrl: "http://192.168.1.3:8001",// tom3 // #ifdef MP-WEIXIN version: uni.getAccountInfoSync().miniProgram.version || "1.0.0", mapKey: 'LHQBZ-MLTEG-BO4QK-QJ2TH-NLGZJ-7GFAS',