Skip to content

Commit d53214b

Browse files
committed
feat: 优化引导页
1 parent d61b2d2 commit d53214b

9 files changed

Lines changed: 162 additions & 69 deletions

File tree

miniprogram/images/intro/nav2.png

117 KB
Loading

miniprogram/images/intro/tips3.png

266 KB
Loading

miniprogram/pages/add/add.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,15 +206,15 @@ Page({
206206
let iconPath = "";
207207
switch (problemLabel) {
208208
case "盲道占用":
209-
iconPath = "/images/marker/occupy.png";
209+
iconPath = "../../images/marker/occupy.png";
210210
break;
211211

212212
case "盲道设计":
213-
iconPath = "/images/marker/design.png";
213+
iconPath = "../../images/marker/design.png";
214214
break;
215215

216216
default:
217-
iconPath = "/images/marker/error.png";
217+
iconPath = "../../images/marker/error.png";
218218
break;
219219
}
220220
this.setData({

miniprogram/pages/index/index.js

Lines changed: 15 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -21,55 +21,20 @@ Page({
2121
* 生命周期函数--监听页面加载
2222
*/
2323
onLoad: function (options) {
24-
try {
25-
const res = wx.getStorageSync('isNotShowIntroduction');
26-
console.log("isNotShowIntroduction缓存内容", res);
27-
if (res) {
28-
console.log("不需要展示引导");
29-
wx.navigateTo({
30-
url: "../map/map",
31-
});
32-
} else {
33-
console.log("需要展示引导");
34-
this.setData({ isNotShowIntroduction: false });
35-
}
36-
} catch (e) {
37-
console.log("缓存不支持", e);
38-
}
24+
// try {
25+
// const res = wx.getStorageSync('isNotShowIntroduction');
26+
// console.log("isNotShowIntroduction缓存内容", res);
27+
// if (res) {
28+
// console.log("不需要展示引导");
29+
// wx.navigateTo({
30+
// url: "../map/map",
31+
// });
32+
// } else {
33+
// console.log("需要展示引导");
34+
// this.setData({ isNotShowIntroduction: false });
35+
// }
36+
// } catch (e) {
37+
// console.log("缓存不支持", e);
38+
// }
3939
},
40-
41-
/**
42-
* 生命周期函数--监听页面初次渲染完成
43-
*/
44-
onReady: function () {},
45-
46-
/**
47-
* 生命周期函数--监听页面显示
48-
*/
49-
onShow: function () {},
50-
51-
/**
52-
* 生命周期函数--监听页面隐藏
53-
*/
54-
onHide: function () {},
55-
56-
/**
57-
* 生命周期函数--监听页面卸载
58-
*/
59-
onUnload: function () {},
60-
61-
/**
62-
* 页面相关事件处理函数--监听用户下拉动作
63-
*/
64-
onPullDownRefresh: function () {},
65-
66-
/**
67-
* 页面上拉触底事件的处理函数
68-
*/
69-
onReachBottom: function () {},
70-
71-
/**
72-
* 用户点击右上角分享
73-
*/
74-
onShareAppMessage: function () {},
7540
});

miniprogram/pages/index/index.wxml

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,51 @@
22
<!-- <van-popup closeable close-icon="close" show="{{ isShowIntroduction }}" bind:close="onCloseIntroduction">
33
<image class="introduction-image" mode="widthFix" src="https://6d61-map-4g0ciu1x80002ab0-1305236624.tcb.qcloud.la/introduction/introduction.jpg?sign=0d8be4112215554ac6b51f648c7eecb3&t=1616247894"></image>
44
</van-popup> -->
5-
<view class="page">
5+
<!-- <view class="page">
66
<image class="introduction-image" src="https://6d61-map-4g0ciu1x80002ab0-1305236624.tcb.qcloud.la/introduction/introduction.jpg?sign=1f8a2d647cacd20c63cea2d4977b5f8d&t=1616225044" mode="widthFix" bindtap="onCloseIntroduction"></image>
7-
</view>
7+
</view> -->
8+
9+
<!-- <view class="page">
10+
<view class="top-image">
11+
<view class="tips-image">
12+
<image src="../../images/intro/tips3.png" class="tips" mode="widthFix" bindtap="onCloseIntroduction"></image>
13+
<image src="../../images/intro/nav.png" class="nav" mode="widthFix" bindtap="onCloseIntroduction"></image>
14+
</view>
15+
</view>
16+
</view> -->
17+
18+
<map id="map" class="map" enable-building="true" enable-3D="true">
19+
<!-- 问题数量表 -->
20+
<cover-view class="numberList">
21+
<cover-view class="numberList-item">
22+
<cover-image class="numberList-item-image" src="../../images/home/design.png"></cover-image>
23+
<cover-view class="numberList-item-text">
24+
3
25+
<cover-view style="font-size:10px;">设计</cover-view>
26+
</cover-view>
27+
</cover-view>
28+
<cover-view class="numberList-item-line"></cover-view>
29+
<cover-view class="numberList-item">
30+
<cover-image class="numberList-item-image" src="../../images/home/occupy.png"></cover-image>
31+
<cover-view class="numberList-item-text">
32+
4
33+
<cover-view style="font-size:10px;">占用</cover-view>
34+
</cover-view>
35+
</cover-view>
36+
<cover-view class="numberList-item-line"></cover-view>
37+
<cover-view class="numberList-item">
38+
<cover-image class="numberList-item-image" src="../../images/home/error.png"></cover-image>
39+
<cover-view class="numberList-item-text">
40+
5
41+
<cover-view style="font-size:10px;">破损</cover-view>
42+
</cover-view>
43+
</cover-view>
44+
</cover-view>
45+
46+
<cover-view class="tips-image" bindtap="onCloseIntroduction">
47+
<cover-image src="../../images/intro/tips3.png" class="tips" mode="widthFix"></cover-image>
48+
<cover-image src="../../images/intro/nav2.png" class="nav" mode="widthFix"></cover-image>
49+
<!-- <image src="../../images/intro/tips3.png" class="tips" mode="widthFix"></image>
50+
<image src="../../images/intro/nav2.png" class="nav" mode="widthFix"></image> -->
51+
</cover-view>
52+
</map>

miniprogram/pages/index/index.wxss

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,74 @@
88
background-color: #454545;
99
}
1010

11+
.map {
12+
width: 100vw;
13+
height: 100vh;
14+
}
1115

1216
/* page {
1317
background-color: #454545;
1418
} */
19+
.top-image {
20+
width: 100vw;
21+
height: 100vh;
22+
}
1523

16-
.introduction-image {
24+
.tips-image {
25+
position: absolute;
26+
width: 100vw;
27+
height: 100vh;
28+
bottom: 0;
29+
background-color: rgba(0, 0, 0, 0.8);
30+
}
31+
32+
.tips {
33+
position: absolute;
1734
width: 750rpx;
18-
}
35+
height: 926rpx;
36+
bottom: 200rpx;
37+
}
38+
39+
.nav {
40+
position: absolute;
41+
width: 750rpx;
42+
height: 140rpx;
43+
bottom: 20rpx;
44+
}
45+
46+
47+
48+
/* 问题列表 */
49+
.numberList {
50+
position: absolute;
51+
right: 30rpx;
52+
top: 20rpx;
53+
text-align: center;
54+
background-color: #fff;
55+
box-shadow: 3px 3px 2px #bbbcbc;
56+
}
57+
58+
.numberList-item {
59+
display: flex;
60+
flex-direction: row;
61+
background-color: #fff;
62+
justify-content: center;
63+
align-items: center;
64+
padding: 10px 5px 10px 4px;
65+
}
66+
67+
.numberList-item-line {
68+
height: 1px;
69+
width: 80%;
70+
margin: 0px auto;
71+
background-color: #ededed;
72+
}
73+
74+
.numberList-item-image {
75+
width: 30px;
76+
margin-right: 5px;
77+
}
78+
79+
.numberList-item-text {
80+
font-size: 14px;
81+
}

miniprogram/pages/map/map.wxml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,31 @@
3636
</cover-view>
3737
<!-- 定位 -->
3838
<cover-view class="getLocation" bindtap="getCenterLocation">
39-
<cover-image src="/images/home/getLocation.png"></cover-image>
39+
<cover-image src="../../images/home/getLocation.png"></cover-image>
4040
</cover-view>
4141
<cover-view class="nav">
4242
<cover-view class="nav-tabbar">
4343
<!-- 上传新增 -->
4444
<cover-view class="nav-tabbar-left nav-button" bindtap='goArticle'>
45-
<cover-image class="nav-tabbar-image" src="/images/nav/article.png"></cover-image>
45+
<cover-image class="nav-tabbar-image" src="../../images/nav/article.png"></cover-image>
4646
<cover-view>盲道科普</cover-view>
4747
</cover-view>
4848
<!-- 上传新增 -->
49-
<cover-view class="nav-tabbar-center add" bindtap='addMarker'>
50-
<cover-image class="nav-tabbar-image" src="/images/nav/add.png" open-type='getUserInfo'></cover-image>
49+
<cover-view class="nav-tabbar-center add">
50+
<cover-image class="nav-tabbar-image" src="../../images/nav/add.png" open-type='getUserInfo'></cover-image>
5151
<cover-view>上传</cover-view>
5252
</cover-view>
5353
<!-- 查看全部 -->
5454
<cover-view class="nav-tabbar-right nav-button" bindtap="viewMyList" bindlongpress='showAdmin'>
55-
<cover-image class="nav-tabbar-image" src="/images/nav/list.png"></cover-image>
55+
<cover-image class="nav-tabbar-image" src="../../images/nav/list.png"></cover-image>
5656
<cover-view>筑路日志</cover-view>
5757
</cover-view>
5858
</cover-view>
5959
</cover-view>
60+
<cover-view class="postion-add" bindtap='addMarker'>
61+
<cover-image class="nav-tabbar-image" src="../../images/nav/add.png" open-type='getUserInfo'></cover-image>
62+
<cover-view>上传</cover-view>
63+
</cover-view>
6064
<!-- 管理入口 -->
6165
<!-- <cover-view class="cover" wx:if="{{showAdmin}}">
6266
<button class='button' open-type='getUserInfo' bindgetuserinfo='getUserInfo' bindlongpress='getOpenID'

miniprogram/pages/map/map.wxss

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ map {
1919
position: absolute;
2020
width: 300px;
2121
left: calc(50% - 150px);
22-
bottom: 20rpx;
22+
bottom: 40rpx;
2323
background-color: rgb(255, 255, 255);
2424
border-radius: 50rpx;
2525
box-shadow: 3px 3px 2px #bbbcbc;
@@ -39,6 +39,23 @@ map {
3939
margin-bottom: 3px;
4040
}
4141

42+
.postion-add {
43+
position: absolute;
44+
left: calc(50% - 35px);
45+
bottom: 15px;
46+
width: 70px;
47+
height: 70px;
48+
font-size: 25rpx;
49+
color: #fff;
50+
background-color: #0079e7;
51+
border-radius: 50%;
52+
overflow: hidden;
53+
display: flex;
54+
flex-direction: column;
55+
justify-content: center;
56+
align-items: center;
57+
}
58+
4259

4360
/* .nav-tabbar-left{
4461
position: absolute;
@@ -50,7 +67,6 @@ map {
5067
position: absolute;
5168
left: calc(50% - 30px);
5269
bottom: 0px;
53-
5470
}
5571

5672
.nav-tabbar-right{
@@ -67,7 +83,6 @@ map {
6783
/* color: #7795f8; */
6884
background-color: rgb(255, 255, 255);
6985
/* line-height: 100rpx; */
70-
7186
display: flex;
7287
flex-direction: column;
7388
justify-content: center;
@@ -79,10 +94,9 @@ map {
7994
height: 60px;
8095
font-size: 25rpx;
8196
color: #fff;
82-
background-color: #0079e7;
97+
background-color: #fff;
8398
border-radius: 50%;
8499
overflow: hidden;
85-
86100
display: flex;
87101
flex-direction: column;
88102
justify-content: center;
@@ -168,8 +182,8 @@ map {
168182
font-size: 20rpx;
169183
margin-top: 6rpx;
170184
text-overflow: ellipsis;
171-
white-space: nowrap;
172-
overflow: hidden;
185+
white-space: nowrap;
186+
overflow: hidden;
173187
}
174188

175189
.trangle {

project.private.config.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"setting": {},
23
"condition": {
34
"plugin": {
45
"list": []
@@ -81,6 +82,7 @@
8182
{
8283
"name": "pages/test/test",
8384
"pathName": "pages/test/test",
85+
"query": "",
8486
"scene": null
8587
}
8688
]

0 commit comments

Comments
 (0)