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
5a49aea7
Commit
5a49aea7
authored
Sep 18, 2019
by
wangxuelai
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/20190918_lvtz' into wxl-develop
parents
7a47f1d1
9de74c09
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
116 additions
and
150 deletions
+116
-150
index.js
business/pages/datacenter/index.js
+19
-21
index.wxml
business/pages/datacenter/index.wxml
+3
-3
index.wxss
business/pages/datacenter/index.wxss
+22
-5
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
+19
-59
infovideo.js
src/pages/websiteindex/infovideo.js
+1
-1
No files found.
business/pages/datacenter/index.js
View file @
5a49aea7
...
...
@@ -54,27 +54,25 @@ Page({
this
.
analyzeclasshourGet
(
1
);
this
.
analyzeclasshourGet
(
2
);
this
.
analyzeclasscourseGet
();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
const
{
chartData
,
allcount
,
count1
,
count2
,
count3
}
=
this
.
data
;
try
{
var
res
=
wx
.
getSystemInfoSync
();
this
.
data
.
windowWidth
=
res
.
windowWidth
;
this
.
setData
({
windowWidth
:
res
.
windowWidth
})
}
catch
(
e
)
{
console
.
error
(
'getSystemInfoSync failed!'
);
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
},
/**
* 生命周期函数--监听页面显示
*/
...
...
@@ -235,6 +233,7 @@ Page({
});
},
initRingChart
(
index
,
data
){
let
canvasWidth
=
this
.
data
.
windowWidth
/
3
||
125
;
this
.
data
.
ringChart
[
index
]
=
new
wxCharts
({
animation
:
true
,
canvasId
:
`ringCanvas
${
index
}
`
,
...
...
@@ -242,31 +241,30 @@ Page({
extra
:
{
ringWidth
:
14
,
pie
:
{
offsetAngle
:
-
90
}
},
title
:
{
name
:
`
${
data
.
course_time_rate
}
%`
,
name
:
`
${
(
data
.
course_time_rate
*
100
).
toFixed
(
2
)
}
%`
,
color
:
'#000000'
,
fontSize
:
12
},
series
:
[{
name
:
'
成交量1
'
,
data
:
data
.
course_time_rate
,
name
:
'
已完成
'
,
data
:
data
.
course_time_rate
*
100
,
stroke
:
false
,
color
:
'#FFB97A'
,
},
{
name
:
'
成交量2
'
,
data
:
100
-
data
.
course_time_rate
,
name
:
'
除去已完成
'
,
data
:
100
-
data
.
course_time_rate
*
100
,
stroke
:
false
,
color
:
'#FFEBD9'
,
}],
disablePieStroke
:
true
,
width
:
140
,
height
:
140
,
width
:
canvasWidth
,
height
:
canvasWidth
,
dataLabel
:
false
,
legend
:
false
,
background
:
'#f5f5f5'
,
padding
:
0
});
}
...
...
business/pages/datacenter/index.wxml
View file @
5a49aea7
...
...
@@ -28,21 +28,21 @@
<view class="chart-box" wx:if="{{classCours.length>0}}">
<view class="chart-item" wx:if="{{classCours[0]}}">
<view class="canvas-box" >
<canvas canvas-id="ringCanvas1" class="ringcanvas"></canvas>
<canvas canvas-id="ringCanvas1" class="ringcanvas"
style="width: {{windowWidth? windowWidth/3: 125}}px;height: {{windowWidth? windowWidth/3: 125}}px;"
></canvas>
</view>
<view class="name" >{{classCours[0].title}}</view>
<view class="count" >{{classCours[0].course_time}}课时</view>
</view>
<view class="chart-item" wx:if="{{classCours[1]}}">
<view class="canvas-box" >
<canvas canvas-id="ringCanvas2" class="ringcanvas"></canvas>
<canvas canvas-id="ringCanvas2" class="ringcanvas"
style="width: {{windowWidth? windowWidth/3: 125}}px;height: {{windowWidth? windowWidth/3: 125}}px;"
></canvas>
</view>
<view class="name" >{{classCours[1].title}}</view>
<view class="count" >{{classCours[1].course_time}}课时</view>
</view>
<view class="chart-item" wx:if="{{classCours[2]}}">
<view class="canvas-box" >
<canvas canvas-id="ringCanvas3" class="ringcanvas"></canvas>
<canvas canvas-id="ringCanvas3" class="ringcanvas"
style="width: {{windowWidth? windowWidth/3: 125}}px;height: {{windowWidth? windowWidth/3: 125}}px;"
></canvas>
</view>
<view class="name" >{{classCours[2].title}}</view>
<view class="count" >{{classCours[2].course_time}}课时</view>
...
...
business/pages/datacenter/index.wxss
View file @
5a49aea7
...
...
@@ -4,10 +4,12 @@
height: 200px;
}
.ringcanvas{
width:100%;
height: 140px;
width: 250rpx;
height: 250rpx;
}
.container{
padding-bottom: 120rpx;
}
.container{}
.column-chart-box{
padding: 0 24rpx;
}
...
...
@@ -93,10 +95,25 @@
.ring-chart-box .chart-box{
display: flex;
position: relative;
left: -18rpx;
}
.ring-chart-box .chart-box .chart-item{
width: 33%;
flex: 1;
overflow: hidden;
max-width: 33.33%;
}
.ring-chart-box .chart-box .chart-item .canvas-box{
position: relative;
}
.ring-chart-box .chart-box .chart-item .canvas-box::after{
content: '';
width: 180rpx;
height: 180rpx;
border: 1px solid rgba(255,185,122,1);
border-radius: 50%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
.ring-chart-box .chart-box .chart-item .name{
font-size:24rpx;
...
...
components/customheader/index.wxml
View file @
5a49aea7
<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 @
5a49aea7
...
...
@@ -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 @
5a49aea7
...
...
@@ -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="{{imageRoot}}2c/websiteindex/map-icon
2
.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 @
5a49aea7
...
...
@@ -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 @
5a49aea7
<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 @
5a49aea7
...
...
@@ -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;
...
...
@@ -226,6 +185,7 @@ page{
justify-content: center;
position: relative;
margin: 0 auto;
overflow: hidden;
}
.booking-box .text{
font-size: 30rpx;
...
...
src/pages/websiteindex/infovideo.js
View file @
5a49aea7
...
...
@@ -309,7 +309,7 @@ Page({
school_id
:
this
.
data
.
sid
,
//机构维度
type
:
6
,
page
:
this
.
data
.
page
,
perPage
:
999
perPage
:
100
}).
then
((
res
)
=>
{
const
{
code
,
...
...
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