Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
wechatapp.shangjiadao.com
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxuelai
wechatapp.shangjiadao.com
Commits
934b48d6
Commit
934b48d6
authored
Sep 18, 2019
by
lvtz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
e32737d0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
70 additions
and
120 deletions
+70
-120
index.wxml
components/customheader/index.wxml
+1
-1
index.wxss
components/customheader/index.wxss
+1
-4
businessinfolist.wxml
src/pages/websiteindex/businessinfolist.wxml
+1
-1
index.js
src/pages/websiteindex/index.js
+44
-44
index.wxml
src/pages/websiteindex/index.wxml
+5
-11
index.wxss
src/pages/websiteindex/index.wxss
+18
-59
No files found.
components/customheader/index.wxml
View file @
934b48d6
<view class="topbar" style="padding-top: {{statusBarHeight}}px">
<view class="nav-contentbox">
<view class="nav-contentbox"
style="height: {{titleBarHeight}}px"
>
<slot name="navcustom"></slot>
</view>
</view>
\ No newline at end of file
components/customheader/index.wxss
View file @
934b48d6
...
...
@@ -7,8 +7,5 @@
z-index: 99;
}
.nav-contentbox{
/* width: 100%;
display: flex;
align-items: center;
justify-content: center */
width: 100%;
}
\ No newline at end of file
src/pages/websiteindex/businessinfolist.wxml
View file @
934b48d6
...
...
@@ -9,7 +9,7 @@
</view>
<view class="address-box" >
<view class="content" >
<image class="map-icon" src="{{
imageRoot}}2c/websiteindex/map-icon
.png" lazy-load="false" binderror="" bindload=""></image>
<image class="map-icon" src="{{
localImageRoot}}2c/websiteindex/map-icon2
.png" lazy-load="false" binderror="" bindload=""></image>
<view class="address-box-text" >
<text wx:if="{{latitude&&longitude}}" class="distance" selectable="false" space="false" decode="false">距离{{schoolInfo.distance}}公里</text>{{schoolInfo.location_address?schoolInfo.location_address:schoolDetail.address}}</view>
</view>
...
...
src/pages/websiteindex/index.js
View file @
934b48d6
...
...
@@ -131,27 +131,27 @@ Page({
this
.
clockListGet
();
const
myLocation
=
LocalStorage
.
getItem
(
'myLocation'
);
const
that
=
this
;
if
(
myLocation
)
{
this
.
setData
({
latitude
:
Number
(
myLocation
.
split
(
'-'
)[
0
]),
longitude
:
Number
(
myLocation
.
split
(
'-'
)[
1
]),
})
}
else
{
wx
.
getLocation
({
type
:
'wgs84'
,
success
(
res
)
{
const
{
latitude
,
longitude
}
=
res
;
LocalStorage
.
setItem
(
'myLocation'
,
latitude
+
'-'
+
longitude
)
that
.
setData
({
latitude
:
latitude
,
longitude
:
longitude
,
})
}
})
}
//
if (myLocation) {
//
this.setData({
//
latitude: Number(myLocation.split('-')[0]),
//
longitude: Number(myLocation.split('-')[1]),
//
})
//
} else {
//
wx.getLocation({
//
type: 'wgs84',
//
success(res) {
//
const {
//
latitude,
//
longitude
//
} = res;
//
LocalStorage.setItem('myLocation', latitude + '-' + longitude)
//
that.setData({
//
latitude: latitude,
//
longitude: longitude,
//
})
//
}
//
})
//
}
wx
.
login
({
success
(
res
)
{
...
...
@@ -592,29 +592,29 @@ Page({
if
(
data
)
{
const
myLocation
=
LocalStorage
.
getItem
(
'myLocation'
);
const
that
=
this
;
if
(
myLocation
)
{
this
.
setData
({
latitude
:
Number
(
myLocation
.
split
(
'-'
)[
0
]),
longitude
:
Number
(
myLocation
.
split
(
'-'
)[
1
]),
})
data
.
distance
=
getFlatternDistance
(
this
.
data
.
latitude
,
this
.
data
.
longitude
,
Number
(
data
.
latitude
),
Number
(
data
.
longitude
))
}
else
{
wx
.
getLocation
({
type
:
'wgs84'
,
success
(
res
)
{
const
{
latitude
,
longitude
}
=
res
;
LocalStorage
.
setItem
(
'myLocation'
,
latitude
+
'-'
+
longitude
)
that
.
setData
({
latitude
:
latitude
,
longitude
:
longitude
,
'schoolInfo.distance'
:
getFlatternDistance
(
latitude
,
longitude
,
Number
(
data
.
latitude
),
Number
(
data
.
longitude
))
})
}
})
}
//
if (myLocation) {
//
this.setData({
//
latitude: Number(myLocation.split('-')[0]),
//
longitude: Number(myLocation.split('-')[1]),
//
})
//
data.distance = getFlatternDistance(this.data.latitude, this.data.longitude, Number(data.latitude), Number(data.longitude))
//
} else {
//
wx.getLocation({
//
type: 'wgs84',
//
success(res) {
//
const {
//
latitude,
//
longitude
//
} = res;
//
LocalStorage.setItem('myLocation', latitude + '-' + longitude)
//
that.setData({
//
latitude: latitude,
//
longitude: longitude,
//
'schoolInfo.distance': getFlatternDistance(latitude,longitude, Number(data.latitude), Number(data.longitude))
//
})
//
}
//
})
//
}
data
.
banner
=
data
.
banner
?
JSON
.
parse
(
data
.
banner
)
:
''
;
// 排序处理,体验课放在第三位
let
dataSort
=
''
;
...
...
src/pages/websiteindex/index.wxml
View file @
934b48d6
<wxs src="../../../filter/index.wxs" module="filter" />
<view class="scroll-container-box" >
<
view class="nav-custombox" style="padding-top: {{statusBarHeight}}px"
>
<view class="nav-
title-box" style="height: {{titleBarHeight}}px
">
<
custom-header
>
<view class="nav-
custombox" slot="navcustom
">
<view class="title">{{schoolInfo.title?schoolInfo.title:schoolDetail.title}}</view>
<view class="num-box">{{schoolInfo.join_count?schoolInfo.join_count:500}}人想学</view>
</view>
<view class="address-box">
<image class="map-icon" src="{{imageRoot}}2c/websiteindex/map-icon.png?{{imageVersion}}"></image>
<view class="distance-box">
<text wx:if="{{latitude&&longitude&&schoolInfo}}" class="distance" >距离{{schoolInfo.distance}}公里</text>
<text class="name" >{{schoolInfo.location_address?schoolInfo.location_address:schoolDetail.address}}</text>
</view>
</view>
</view>
<view class="container" bindtouchmove="touchStart" bindtouchend="touchEnd" style="padding-bottom: {{websiteCourses.switch==1? '105rpx': '0'}}">
</custom-header>
<view class="container" bindtouchmove="touchStart" bindtouchend="touchEnd" style="padding-bottom: {{websiteCourses.switch==1? '105rpx': '0'}};padding-top: {{navH!=0?navH:40}}px">
<view class="share-btn-wrapper" style="top:{{titleBarHeight+statusBarHeight+50}}px" >
<view class="share-btn {{shareBtnShow==1?'share-btn-hide':''}} {{shareBtnShow==2?'share-btn-show':''}}" >
<button open-type="share"></button>
...
...
src/pages/websiteindex/index.wxss
View file @
934b48d6
...
...
@@ -30,15 +30,14 @@ page{
margin-top: 24rpx;
}
.nav-custombox{
background: #fff;
}
.nav-title-box{
width: 100%;
height: 100%;
display: flex;
align-items: center;
padding: 0 2
24rpx 0 2
4rpx;
position: relative;
padding: 0 24rpx;
/* min-height: 88rpx; */
}
.nav-
title-
box .title{
.nav-
custom
box .title{
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
...
...
@@ -47,6 +46,18 @@ page{
font-size: 32rpx;
color: #000;
}
.nav-custombox .num-box{
padding: 0 10rpx;
display: inline-block;
height:30rpx;
line-height: 30rpx;
background:rgba(255,209,70,1);
border-radius:15rpx;
font-size:22rpx;
font-family:PingFang-SC-Regular;
font-weight:400;
color:rgba(0,0,0,1);
}
.top-bar{
width: 100%;
position: fixed;
...
...
@@ -116,60 +127,8 @@ page{
.share-btn-hide {
animation: btnHide .5s forwards;
}
.nav-custombox .nav-title-box .num-box{
/* position: absolute; */
left: 22rpx;
bottom: -15rpx;
padding: 0 10rpx;
display: inline-block;
height:30rpx;
line-height: 30rpx;
background:rgba(255,209,70,1);
border-radius:15rpx;
font-size:22rpx;
font-family:PingFang-SC-Regular;
font-weight:400;
color:rgba(0,0,0,1);
}
.nav-custombox .address-box{
/* padding-top: 30rpx; */
padding-right: 24rpx;
padding-left: 24rpx;
font-size:20rpx;
line-height: 1;
font-family:PingFang-SC-Regular;
font-weight:400;
color:rgba(255,255,255,.94);
display: flex;
align-items: center;
padding-top: 4rpx;
}
.nav-custombox .address-box .map-icon{
width:20rpx;
height:23rpx;
margin-right: 22rpx;
}
.distance-box{
flex: 1;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 20rpx;
}
.nav-custombox .address-box .distance{
font-size:20rpx;
font-family:PingFang-SC-Regular;
font-weight:400;
color:rgba(255,255,255,.94);
padding-right: 20rpx;
}
.nav-custombox .address-box .name{
font-size:20rpx;
font-family:PingFang-SC-Regular;
font-weight:400;
color:rgba(255,255,255,.94);
}
.banner-box{
padding: 0 24rpx;
background: #fff;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment