fix qr_code, removed some features not implemented, added pulldown refresh logic for first page and merchant page

This commit is contained in:
Daniel Kou 2026-05-14 18:09:08 +08:00
parent 8f99a2b8b1
commit d3ac0573bf
6 changed files with 75 additions and 36 deletions

View File

@ -116,7 +116,7 @@
<image src="https://static.hshuishang.com/property-img-file/localLife_detail_Frame.png" mode="" />
<view>电话</view>
</view>
<view class="left_label" @click="handleDiscussClick">
<view v-if="isShow" class="left_label" @click="handleDiscussClick">
<image src="https://static.hshuishang.com/property-img-file/localLife_shopList_Group_1334.png" mode="" />
<view>点评</view>
</view>
@ -185,8 +185,24 @@ export default {
};
},
onLoad(options) {
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: Number(uni.getStorageSync("merchantInfo").id)
id: id
}
request(apiArr.getMerchantInfo, "POST", params).then(res => {
this.info = res
@ -197,7 +213,7 @@ export default {
this.flag = false
this.commentList = []
this.getCommentList()
})
});
},
onShow() {
if (this.info.id) {

View File

@ -83,7 +83,7 @@
买单返积分
</view>
</view>
<view class="merchantItem_right_con_right" @click="toJump(item)">
<view v-if="item.quick_purchase_enabled==1" class="merchantItem_right_con_right" @click.stop="toJump(item)">
<image src="https://static.hshuishang.com/property-img-file/local_review.png"
mode="aspectFill"></image>
点评
@ -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();
}
},

View File

@ -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
}
},
{

View File

@ -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();

View File

@ -71,11 +71,11 @@
src="https://static.hshuishang.com/property-img-file/page_user_Group_1557.png" />
<text class="device-title title-item">我的工单</text>
</view>
<view class="item_device" @click="handleMeApplyClick">
<!--view class="item_device" @click="handleMeApplyClick">
<image class="icon-img"
src="https://static.hshuishang.com/property-img-file/page_user_Group_1558.png" />
<text class="device-title title-item">我的管家</text>
</view>
</view-->
</view>
</view>
</view>
@ -92,7 +92,7 @@
</view>
</view>
<view class="main margin20">
<!--view class="main margin20">
<view class="main_title">到家服务</view>
<view class="item1 padding_bottom0">
<u-grid col="4" :border="false">
@ -102,7 +102,7 @@
</u-grid-item>
</u-grid>
</view>
</view>
</view-->
<view class="main margin20">
<view class="main_title">门店服务</view>
<view class="item1 padding_bottom0">
@ -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: [

View File

@ -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"; // 开发版
}
@ -39,6 +34,11 @@ const getCurrentEnvironment = () => {
}
}
// 1. 优先通过NODE_ENV判断
if (process && process.env && process.env.NODE_ENV) {
return process.env.NODE_ENV;
}
// 3. 通过全局配置判断例如Vercel等平台的环境变量
if (typeof global !== "undefined" && global.env) {
return 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 || "请求失败",