diff --git a/packages/localLife/detail/index.vue b/packages/localLife/detail/index.vue
index fb7b7845..94ed6984 100644
--- a/packages/localLife/detail/index.vue
+++ b/packages/localLife/detail/index.vue
@@ -116,7 +116,7 @@
电话
-
+
点评
@@ -185,9 +185,25 @@ export default {
};
},
onLoad(options) {
- const params = {
- id: Number(uni.getStorageSync("merchantInfo").id)
- }
+ let id;
+ if (options.scene) {
+ const scene = decodeURIComponent(options.scene);
+ function getQueryParam(str, name) {
+ const reg = new RegExp(`(^|&)${name}=([^&]*)(&|$)`);
+ const match = str.match(reg);
+ return match ? decodeURIComponent(match[2]) : null;
+ }
+ const idStr = getQueryParam(scene, 'id'); // 得到 "22"
+ if (idStr) {
+ id = Number(idStr); // 得到 22
+ }
+ }else{
+ id = Number(uni.getStorageSync("merchantInfo").id)
+ }
+ console.log('scene:',options.scene,id)
+ const params = {
+ id: id
+ }
request(apiArr.getMerchantInfo, "POST", params).then(res => {
this.info = res
uni.setStorageSync('merchantInfo', res)
@@ -197,7 +213,7 @@ export default {
this.flag = false
this.commentList = []
this.getCommentList()
- })
+ });
},
onShow() {
if (this.info.id) {
diff --git a/packages/localLife/index/index.vue b/packages/localLife/index/index.vue
index ace4a9cd..5d2d3248 100644
--- a/packages/localLife/index/index.vue
+++ b/packages/localLife/index/index.vue
@@ -83,7 +83,7 @@
买单返积分
-
+
点评
@@ -119,6 +119,7 @@
import {
request,
picUrl,
+ RequestUrl,
uniqueByField,
menuButtonInfo,
calculateDistance,
@@ -155,8 +156,20 @@ export default {
console.log(this.address);
},
+ onPullDownRefresh() {
+ this.page_num = 1;
+ this.merchatList = [];
+ this.flag = false;
+ this.searchText = '';
+ this.getCateList();
+ this.getMechantList().then(() => {
+ uni.stopPullDownRefresh();
+ });
+ },
+
onReachBottom() {
if (this.flag) {
+ this.page_num += 1;
this.getMechantList();
}
},
diff --git a/pages.json b/pages.json
index 95b5465f..b7bac54c 100644
--- a/pages.json
+++ b/pages.json
@@ -5,6 +5,7 @@
"style": {
"navigationStyle": "custom",
"navigationBarBackgroundColor": "#FFF",
+ "enablePullDownRefresh": true,
"usingComponents": {
"nav-footer": "/components/nav/nav"
}
@@ -602,7 +603,8 @@
"path": "index/index",
"style": {
"navigationBarTitleText": "湖畔好店",
- "navigationBarBackgroundColor": "#fff"
+ "navigationBarBackgroundColor": "#fff",
+ "enablePullDownRefresh": true
}
},
{
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 82df8ace..20a0e4a5 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -1197,6 +1197,14 @@ export default {
}
},
+ onPullDownRefresh() {
+ this.bottomList = [];
+ this.bottomPageNum = 1;
+ this.flag = false;
+ this.init();
+ uni.stopPullDownRefresh();
+ },
+
async onReachBottom() {
if (this.flag) {
const res = await this.getHomeBottom();
diff --git a/pages/user/index.vue b/pages/user/index.vue
index 1e9a6252..7957af8f 100644
--- a/pages/user/index.vue
+++ b/pages/user/index.vue
@@ -71,11 +71,11 @@
src="https://static.hshuishang.com/property-img-file/page_user_Group_1557.png" />
我的工单
-
+
@@ -92,7 +92,7 @@
-
+
门店服务
@@ -169,16 +169,16 @@ export default {
name: "团购订单",
url: "/packages/myOrders/groupOrders/index",
},
- {
- image: "https://static.hshuishang.com/property-img-file/page_user_Group_1565.png",
- name: "我的收藏",
- url: "",
- },
- {
- image: "https://static.hshuishang.com/property-img-file/page_user_Group_1566.png",
- name: "售后服务",
- url: "",
- },
+ // {
+ // image: "https://static.hshuishang.com/property-img-file/page_user_Group_1565.png",
+ // name: "我的收藏",
+ // url: "",
+ // },
+ // {
+ // image: "https://static.hshuishang.com/property-img-file/page_user_Group_1566.png",
+ // name: "售后服务",
+ // url: "",
+ // },
{
image: "https://static.hshuishang.com/property-img-file/page_user_Group_1563.png",
name: "收货地址",
@@ -209,17 +209,17 @@ export default {
shopList: [{
image: "https://static.hshuishang.com/property-img-file/page_user_Group_1580.png",
name: "附近门店",
- url: "",
- },
- {
- image: "https://static.hshuishang.com/property-img-file/page_user_Group_1581.png",
- name: "服务券",
- url: "",
+ url: "/packages/localLife/index/index",
},
+ // {
+ // image: "https://static.hshuishang.com/property-img-file/page_user_Group_1581.png",
+ // name: "服务券",
+ // url: "",
+ // },
{
image: "https://static.hshuishang.com/property-img-file/page_user_Group_1582.png",
name: "支付记录",
- url: "",
+ url: "/packages/localLife/payInfo/index",
}
],
shopManagementList: [
diff --git a/utils/index.js b/utils/index.js
index 28c69acb..7abc27e7 100644
--- a/utils/index.js
+++ b/utils/index.js
@@ -16,11 +16,6 @@ const environments = {
// 判断当前环境
const getCurrentEnvironment = () => {
- // 1. 优先通过NODE_ENV判断
- if (process && process.env && process.env.NODE_ENV) {
- return process.env.NODE_ENV;
- }
-
// 2. 微信小程序环境判断
if (typeof wx !== "undefined" && wx.getAccountInfoSync) {
try {
@@ -30,7 +25,7 @@ const getCurrentEnvironment = () => {
if (envVersion === "release") {
return "production"; // 正式版
} else if (envVersion === "trial") {
- return "development"; // 体验版
+ return "production"; // 体验版
} else if (envVersion === "develop") {
return "development"; // 开发版
}
@@ -38,6 +33,11 @@ const getCurrentEnvironment = () => {
console.warn("获取小程序环境信息失败:", e);
}
}
+
+ // 1. 优先通过NODE_ENV判断
+ if (process && process.env && process.env.NODE_ENV) {
+ return process.env.NODE_ENV;
+ }
// 3. 通过全局配置判断(例如Vercel等平台的环境变量)
if (typeof global !== "undefined" && global.env) {
@@ -54,7 +54,7 @@ const getCurrentEnvironment = () => {
};
// 获取当前环境配置
-const currentEnv = getCurrentEnvironment();
+const currentEnv = "production";//getCurrentEnvironment();
const envConfig = environments[currentEnv] || environments.production;
export const RequsetUrl = envConfig.apiUrl; // 请求地址前缀
@@ -227,7 +227,7 @@ export const request = (
}
resolve(res.data.data); // 请求成功
} else {
- console.log("走到这列");
+ console.log("走到这列",RequsetUrl, url,res.header,res.data,res.profile);
uni.hideLoading();
// uni.showToast({
// title: res.data.msg || "请求失败",