Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
xiaoshangaihuida
概览
Overview
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
姚志忠
xiaoshangaihuida
Commits
349de62b
提交
349de62b
authored
4月 15, 2026
作者:
姚志忠
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增需求修改
父级
c7d02181
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
116 行增加
和
20 行删除
+116
-20
app.js
+50
-0
components/lang-btn/index.js
+1
-0
pages/nav-end/index.js
+29
-13
pages/nav-end/index.less
+7
-1
pages/nav-end/index.wxml
+6
-3
pages/shop/index.js
+1
-1
pluginReport.js
+22
-2
没有找到文件。
app.js
查看文件 @
349de62b
...
...
@@ -352,6 +352,56 @@ const buildings = [
},
],
},
{
name
:
"三区"
,
nameEn
:
"District 3"
,
displayName
:
"国际商贸城三区"
,
displayNameEn
:
"International Trade City District 3"
,
marketCode
:
"1004"
,
zone
:
"03"
,
buildingId
:
"3307001557131"
,
latlng
:
{
lat
:
29.340763
,
lng
:
120.110371
},
floors
:
[
"-1F"
,
"1F"
,
"2F"
,
"3F"
,
"4F"
,
"5F"
],
scale
:
18.6
,
formats
:
[
{
name
:
"年画挂历对联(-1F)"
,
key
:
"N_03_-1_NHGLDL"
,
nameEn
:
"New Year paintings, calendars, couplets"
},
{
name
:
"笔墨用品/纸制品"
,
key
:
"N_03_1_BMYP_ZZP"
,
nameEn
:
"Writing and drawing supplies / Paper products"
},
{
name
:
"年画挂历对联(1F)"
,
key
:
"N_03_1_NHGLDL"
,
nameEn
:
"New Year paintings, calendars, couplets"
,},
{
name
:
"眼镜"
,
key
:
"N_03_1_YJ"
,
nameEn
:
"Glasses"
},
{
name
:
"办公学习用品"
,
key
:
"N_03_2_BGXXYP"
,
nameEn
:
"Office study supplies"
},
{
name
:
"运动器材/体育休闲用品"
,
key
:
"N_03_2_YDQC_TYXXYP"
,
nameEn
:
"Sports equipment / Sports and leisure products"
,},
{
name
:
"化妆品"
,
key
:
"N_03_3_HZP"
,
nameEn
:
"Cosmetics"
},
{
name
:
"纽扣/拉链/服装辅料"
,
key
:
"N_03_3_NK_LL_FZFL"
,
nameEn
:
"Buttons / zippers / garment accessories"
},
{
name
:
"生产企业直销中心"
,
key
:
"N_03_4_HZP"
,
nameEn
:
"Direct sales center of the manufacturing enterprise"
,},
{
name
:
"装饰画"
,
key
:
"N_03_5_ZSH"
,
nameEn
:
"Decorative painting"
,},
],
},
{
name
:
"五区"
,
nameEn
:
"District 5"
,
displayName
:
"国际商贸城五区"
,
displayNameEn
:
"International Trade City District 5"
,
marketCode
:
"1007"
,
zone
:
"05"
,
buildingId
:
"3307001915188"
,
latlng
:
{
lat
:
29.340690
,
lng
:
120.120676
},
floors
:
[
"1F"
,
"2F"
,
"3F"
,
"4F"
,
"5F"
],
scale
:
18.6
,
formats
:
[
{
name
:
"义乌中国进口商品城"
,
key
:
"N_05_1_XSPPS"
,
nameEn
:
"Yiwu China Import Commodities City"
},
{
name
:
"宠物(水族)用品"
,
key
:
"N_05_2_CWSZYP"
,
nameEn
:
"Pet (aquarium) supplies"
},
{
name
:
"床上用品"
,
key
:
"N_05_2_CSYP"
,
nameEn
:
"Bedding"
,},
{
name
:
"发制品"
,
key
:
"N_05_2_FZP"
,
nameEn
:
"Hair extensions"
},
{
name
:
"婚庆用品(2F)"
,
key
:
"N_05_2_HQYP"
,
nameEn
:
"Wedding supplies"
},
{
name
:
"针织布(窗帘布)"
,
key
:
"N_05_3_CLBL"
,
nameEn
:
"Knitted fabric (curtain fabric)"
,},
{
name
:
"婚庆用品(3F)"
,
key
:
"N_05_3_HQYP"
,
nameEn
:
"Wedding supplies"
},
{
name
:
"酒店用品"
,
key
:
"N_05_3_JDYP"
,
nameEn
:
"Hotel supplies"
},
{
name
:
"针棉布(窗帘布)"
,
key
:
"N_05_3_ZFBL"
,
nameEn
:
"Cotton fabric (curtain fabric)"
,},
{
name
:
"针织原材料"
,
key
:
"N_05_3_ZZYCL"
,
nameEn
:
"Knitted raw materials"
,},
{
name
:
"汽车用品及配件"
,
key
:
"N_05_4_QCMTCPJ"
,
nameEn
:
"Automotive supplies and accessories"
,},
{
name
:
"网商服务区"
,
key
:
"N_05_5_WSFWQ"
,
nameEn
:
"Online Business Service Area"
},
],
},
];
const
buildingIdNameMap
=
buildings
.
reduce
(
(
acc
,
nxt
)
=>
({
...
acc
,
[
nxt
.
buildingId
]:
nxt
.
name
}),
...
...
components/lang-btn/index.js
查看文件 @
349de62b
...
...
@@ -45,6 +45,7 @@ Component({
handleLang
()
{
// this.setData({ showOptions: true });
this
.
setData
({
showTip
:
true
});
},
closeOptions
()
{
this
.
setData
({
showOptions
:
false
});
...
...
pages/nav-end/index.js
查看文件 @
349de62b
...
...
@@ -23,10 +23,20 @@ Page({
* 生命周期函数--监听页面加载
*/
async
onLoad
(
options
)
{
// 从 options 中获取商位号
this
.
setData
({
boothNo
:
options
.
boothNo
||
''
});
console
.
log
(
this
.
data
.
boothNo
,
"boothNo"
);
// 现场联调:确认是否从插件 navEndPageUrl 带回 boothNo
console
.
error
(
"[NavEndPage] onLoad options:"
,
JSON
.
parse
(
JSON
.
stringify
(
options
||
{})),
);
const
{
lastNav
}
=
getApp
().
globalData
;
// boothNo 优先取 URL 参数,其次兜底取 lastNav.boothNo
const
boothNo
=
options
.
boothNo
||
lastNav
?.
boothNo
||
""
;
this
.
setData
({
boothNo
});
console
.
error
(
"[NavEndPage] boothNo(final)="
,
this
.
data
.
boothNo
);
console
.
error
(
"[NavEndPage] globalData.lastNav.boothNo="
,
lastNav
?.
boothNo
);
if
(
!
lastNav
)
return
this
.
toIndex
();
this
.
setData
({
lastNav
});
try
{
...
...
@@ -36,12 +46,13 @@ Page({
}
catch
(
error
)
{
console
.
error
(
"设置卡路里失败"
,
error
);
}
const
poi
=
this
.
getEndPoi
();
const
poi
=
await
this
.
getEndPoi
();
if
(
poi
)
{
console
.
log
(
"导航结束页面poi"
,
poi
);
this
.
setData
({
poi
});
}
// 自动收藏
// if (poi) this.collectPoi(poi);
this
.
setData
({
poi
});
if
(
getApp
().
isCardNav
)
{
getApp
().
isCardNav
=
false
;
const
checkInResult
=
await
this
.
checkIn
(
poi
);
...
...
@@ -248,9 +259,14 @@ Page({
shopType
:
baseInfo
.
facilityId
?
"2"
:
"1"
,
shopId
:
baseInfo
.
shopId
||
baseInfo
.
facilityId
,
boothNo
:
baseInfo
.
boothNo
,
ywZh
:
baseInfo
.
ywZh
?
baseInfo
.
ywZh
:
''
,
});
console
.
log
(
"getEndPoi result:"
,
poi
);
if
(
poi
?.
ywZh
?.
cover
&&
typeof
poi
.
ywZh
.
cover
===
'string'
)
{
poi
.
ywZh
.
cover
=
poi
.
ywZh
.
cover
.
replace
(
'/200x'
,
'/700x'
);
}
console
.
log
(
"getEndPoi result:"
,
poi
.
ywZh
?
poi
.
ywZh
.
cover
:
poi
.
ywZh
);
return
poi
;
}
catch
(
error
)
{
console
.
error
(
"getEndPoi error:"
,
error
);
...
...
@@ -361,18 +377,18 @@ Page({
closePois
()
{
this
.
setData
({
pois
:
null
});
},
doNothing
()
{},
onReady
()
{},
doNothing
()
{
},
onReady
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{},
onShow
()
{
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
()
{},
onHide
()
{
},
/**
* 生命周期函数--监听页面卸载
...
...
@@ -384,12 +400,12 @@ Page({
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
()
{},
onPullDownRefresh
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
()
{},
onReachBottom
()
{
},
/**
* 用户点击右上角分享
...
...
pages/nav-end/index.less
查看文件 @
349de62b
...
...
@@ -11,7 +11,7 @@
}
.content {
position: absolute;
top:
30
6px;
top:
25
6px;
left: 0;
right: 0;
bottom: 0;
...
...
@@ -73,6 +73,12 @@
border-radius: 50%;
background: #fe5252;
}
.yellow{
width: 6px;
height: 6px;
border-radius: 50%;
background: #bcfe52;
}
}
.right {
display: inline-flex;
...
...
pages/nav-end/index.wxml
查看文件 @
349de62b
...
...
@@ -26,10 +26,14 @@
</view>
</view>
<view class="border" wx:if="{{boothNo}}"></view>
<view class="row booth-row" wx:if="{{boothNo}}">
<view class="left">商位号</view>
<view class="row" wx:if="{{boothNo}}">
<view class="left">
<view class="yellow"></view>
商位号
</view>
<view class="right end">
<view>{{boothNo}}</view>
<view>{{lastNav.endPoint.floorName}}</view>
</view>
</view>
</view>
...
...
@@ -54,7 +58,6 @@
<view class="r41" bind:tap="toIndex">返回首页</view>
<button class="r42" open-type="share">邀请好友使用</button>
</view>
</view>
<view class="tip1" wx:if="{{showTip1}}">
<view class="t1">积分领取成功!</view>
...
...
pages/shop/index.js
查看文件 @
349de62b
...
...
@@ -44,7 +44,7 @@ Page({
const
fixCoverUrl
=
(
url
)
=>
{
if
(
!
url
)
return
''
;
// 将 200x 替换为 空
return
url
.
replace
(
'/200x'
,
''
);
return
url
.
replace
(
'/200x'
,
'
/600x
'
);
};
// 处理中文信息中的 cover
...
...
pluginReport.js
查看文件 @
349de62b
...
...
@@ -133,6 +133,7 @@ const handleNavStart = async (options) => {
?
{
nav_target_type
:
poi
.
facility
.
name
,
booth_floor
:
poi
.
tx
.
poi_fl_seq
,
booth_cover_img
:
poi
.
ywZh
.
cover
,
}
:
{
main_product_arr
:
poi
.
ywZh
.
mainGoods
,
...
...
@@ -151,7 +152,11 @@ const handleNavStart = async (options) => {
const
handleNavEnd
=
async
(
options
)
=>
{
const
poi
=
await
getPoiByPoint
(
options
.
endPoint
);
const
boothNo
=
poi
?.
ywZh
?.
boothNo
||
poi
?.
ywEn
?.
boothNo
||
""
;
console
.
log
(
"导航结束poi"
,
poi
);
// 现场联调日志:确认结束时 POI 及 boothNo 是否取到
console
.
error
(
"[NavEnd] endPoint:"
,
options
?.
endPoint
);
console
.
error
(
"[NavEnd] boothNo(from poi)="
,
boothNo
);
if
(
!
poi
)
return
;
const
{
lastNavHistoryId
,
buildingIdNameMap
}
=
getApp
();
if
(
!
lastNavHistoryId
)
return
console
.
error
(
"未获取到开始导航的历史id"
);
...
...
@@ -177,6 +182,7 @@ const handleNavEnd = async (options) => {
?
{
nav_target_type
:
poi
.
facility
.
name
,
booth_floor
:
poi
.
tx
.
poi_fl_seq
,
booth_cover_img
:
poi
.
ywZh
.
cover
,
}
:
{
main_product_arr
:
poi
.
ywZh
.
mainGoods
,
...
...
@@ -204,8 +210,13 @@ module.exports = {
// type 类型(start_navigation/end_navigation)
// location 用户当前位置
// isArrive 是否到达目的地结束导航
report
(
options
)
{
console
.
error
(
"report 上报:"
,
options
);
async
report
(
options
)
{
// 现场联调日志:确认结束回调结构
console
.
error
(
"[NavReport] report 上报(type):"
,
options
?.
type
);
console
.
error
(
"[NavReport] report 上报(完整options):"
,
JSON
.
parse
(
JSON
.
stringify
(
options
||
{})),
);
if
(
options
.
type
===
"start_navigation"
)
{
getApp
().
lastNavHistoryId
=
null
;
handleNavStart
(
options
);
...
...
@@ -213,7 +224,16 @@ module.exports = {
if
(
options
.
type
===
"end_navigation"
)
{
handleNavEnd
(
options
);
if
(
options
.
isArrive
)
{
// 现场联调:把 boothNo 一并塞入 lastNav,便于结束页对照 options.boothNo
try
{
const
poi
=
await
getPoiByPoint
(
options
.
endPoint
);
const
boothNo
=
poi
?.
ywZh
?.
boothNo
||
poi
?.
ywEn
?.
boothNo
||
""
;
getApp
().
globalData
.
lastNav
=
{
...
options
,
boothNo
};
console
.
error
(
"[NavReport] 已写入 globalData.lastNav,boothNo="
,
boothNo
);
}
catch
(
e
)
{
getApp
().
globalData
.
lastNav
=
options
;
console
.
error
(
"[NavReport] 写入 globalData.lastNav 失败(仅写 options)"
,
e
);
}
}
}
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论