Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
nyx
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
发现
nyx
Commits
dc0b0a4e
Commit
dc0b0a4e
authored
Mar 28, 2020
by
jscat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nyx: discover.js
1. 发现功能的页面优化
parent
06874d25
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
80 行增加
和
37 行删除
+80
-37
增值产品-小程序及app/nyx-master/pages/discover/discover.js
+24
-1
增值产品-小程序及app/nyx-master/pages/discover/discover.wxml
+22
-7
增值产品-小程序及app/nyx-master/pages/discover/discover.wxss
+29
-27
增值产品-小程序及app/nyx_app_key/api/src/main/resources/cn/com/fun/nyxkey/api/repository/Rockwell_keyMapper.xml
+5
-2
没有找到文件。
增值产品-小程序及app/nyx-master/pages/discover/discover.js
查看文件 @
dc0b0a4e
// pa
ges/kinds/kinds.js
// pa
ges/kinds/kinds.js
...
@@ -56,6 +56,14 @@ Page({
...
@@ -56,6 +56,14 @@ Page({
//分页加载部分
//分页加载部分
isHideLoadMore
:
false
,
isHideLoadMore
:
false
,
pageIndex
:
1
,
//分页搜索的page index
pageIndex
:
1
,
//分页搜索的page index
//页面格式
deviceRatio
:
1
,
navHeight
:
0
,
searchHeight
:
0
,
noteTop
:
0
,
noteHeight
:
0
,
},
},
switchCategory
(
e
)
{
switchCategory
(
e
)
{
...
@@ -78,6 +86,21 @@ Page({
...
@@ -78,6 +86,21 @@ Page({
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
var
_this
=
this
;
var
_this
=
this
;
var
device
=
wx
.
getSystemInfoSync
()
//self.device = app.globalData.myDevice
// jscat miniprogram default width is 750rpx
var
deviceRatio
=
device
.
windowWidth
/
750
var
winWidth
=
device
.
windowWidth
*
deviceRatio
var
noteHeight
=
device
.
windowHeight
-
(
40
-
60
)
_this
.
setData
({
searchHeight
:
40
,
navHeight
:
40
,
noteTop
:
(
40
+
40
),
noteHeight
:
noteHeight
,
deviceRatio
:
deviceRatio
,
})
wx
.
setNavigationBarTitle
({
wx
.
setNavigationBarTitle
({
title
:
'发现'
,
title
:
'发现'
,
})
})
...
...
增值产品-小程序及app/nyx-master/pages/discover/discover.wxml
查看文件 @
dc0b0a4e
<view
class="page">
<view
class="page">
<view class="page">
<view class="page">
<!-- 搜索框 -->
<!-- 搜索框 -->
<view class="search">
<view class="weui-search-bar">
<view class="searchBar">
<view class="weui-search-bar__form">
<view class="weui-search-bar__box">
<icon class="weui-icon-search_in-box" type="search" size="14"></icon>
<input type="text" class="weui-search-bar__input" placeholder="搜索" value="{{inputVal}}" focus="{{inputShowed}}" bindinput="inputTyping" />
<view class="weui-icon-clear" wx:if="{{inputVal.length > 0}}" bindtap="clearInput">
<icon type="clear" size="14"></icon>
</view>
</view>
<label class="weui-search-bar__label" hidden="{{inputShowed}}" bindtap="showInput">
<icon class="weui-icon-search" type="search" size="14"></icon>
<icon class="weui-icon-search" type="search" size="14"></icon>
<input class="input" placeholder="大家都在搜" bindtap="entrySearch" disabled />
<view class="weui-search-bar__text">搜索</view>
</label>
</view>
<view class="weui-search-bar__cancel-btn" hidden="{{!inputShowed}}" bindtap="hideInput">取消
</view>
</view>
</view>
</view>
<!-- 导航栏 -->
<!-- 导航栏 -->
...
@@ -16,12 +27,12 @@
...
@@ -16,12 +27,12 @@
</view>
</view>
<!-- 文章列表 -->
<!-- 文章列表 -->
<scroll-view class="list-block" scroll-y="true">
<scroll-view class="list-block" scroll-y="true"
style="height:{{noteHeight}}px"
>
<!-- 文章封面内容 -->
<!-- 文章封面内容 -->
<view class="notes-block" wx:for="{{notes}}" wx:for-item="item" wx:key="{{index}}">
<view class="notes-block" wx:for="{{notes}}" wx:for-item="item" wx:key="{{index}}">
<view class="note-info">
<view class="note-info">
<navigator url="../discover/note-info/note-info?title={{item.title}}&content={{item.content}}&like={{item.like}}¬e_image={{item.note_image}}&writer_name={{item.writer_name}}&writer_image={{item.writer_image}}" >
<navigator url="../discover/note-info/note-info?title={{item.title}}&content={{item.content}}&like={{item.like}}¬e_image={{item.note_image}}&writer_name={{item.writer_name}}&writer_image={{item.writer_image}}" >
<view class="
home-
note-img">
<view class="note-img">
<image src="{{item.note_image[0]}}"/>
<image src="{{item.note_image[0]}}"/>
</view>
</view>
<span>{{item.title}}</span>
<span>{{item.title}}</span>
...
@@ -39,7 +50,7 @@
...
@@ -39,7 +50,7 @@
</view>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
<!-- 加载更多 -->
<!-- 加载更多 -->
<view class="weui-loadmore" hidden="{{isHideLoadMore}}">
<view class="weui-loadmore" hidden="{{isHideLoadMore}}">
...
@@ -50,6 +61,10 @@
...
@@ -50,6 +61,10 @@
<view class="weui-loadmore__tips">没有更多啦 {{'>'}}_{{'<'}} </view>
<view class="weui-loadmore__tips">没有更多啦 {{'>'}}_{{'<'}} </view>
</view>
</view>
</scroll-view>
</view>
</view>
增值产品-小程序及app/nyx-master/pages/discover/discover.wxss
查看文件 @
dc0b0a4e
.page
{
.page
{
.page{
.page{
height:100%vh;
height:100vh;
display:flex;
flex-direction:column;
background-color:#f5f8fa;
background-color:#f5f8fa;
}
}
.search{
.search{
background: #fff;
background: #fff;
height: 40rpx;
}
}
.searchBar{
.searchBar{
margin: 20rpx 30rpx;
height: 40rpx;
margin: 20rpx;
border-radius: 30px;
border-radius: 30px;
border:1px solid #f5f5f5;
border:1px solid #f5f5f5;
background: #f5f5f5;
background: #f5f5f5;
...
@@ -40,6 +40,27 @@
...
@@ -40,6 +40,27 @@
font-weight: bold;
font-weight: bold;
}
}
/* */
.list-block{
height:100%;
display:flex;
box-sizing:border-box;
flex-direction:column;
align-items:center;
justify-content:center;
}
.notes-block{
width: 46%;
/* height: 20%; */
margin: 6px;
background: #fff;
border-radius: 5px;
position: relative;
float: left;
display: block;
}
/*item title*/
.note-info span{
.note-info span{
font-size: 17px;
font-size: 17px;
overflow : hidden;
overflow : hidden;
...
@@ -49,7 +70,7 @@
...
@@ -49,7 +70,7 @@
-webkit-box-orient: vertical;
-webkit-box-orient: vertical;
margin: 5px;
margin: 5px;
}
}
.
home-
note-img image{
.note-img image{
width: 100%;
width: 100%;
height: 170px;
height: 170px;
border-radius: 5px;
border-radius: 5px;
...
@@ -62,7 +83,7 @@
...
@@ -62,7 +83,7 @@
margin-left: 0px;
margin-left: 0px;
text-align: center;
text-align: center;
line-height: 38px;
line-height: 38px;
font-size:
15
px;
font-size:
30r
px;
}
}
.writer image{
.writer image{
width: 30px;
width: 30px;
...
@@ -70,7 +91,7 @@
...
@@ -70,7 +91,7 @@
border-radius: 50%;
border-radius: 50%;
}
}
.like{
.like{
margin-left: 1
5
px;
margin-left: 1
0
px;
display: flex;
display: flex;
}
}
.like image{
.like image{
...
@@ -84,25 +105,6 @@
...
@@ -84,25 +105,6 @@
margin: auto;
margin: auto;
}
}
.list-block{
height:100%;
display:flex;
box-sizing:border-box;
flex-direction:column;
align-items:center;
justify-content:center;
}
.notes-block{
width: 46%;
height: 20%;
margin: 6px;
background: #fff;
border-radius: 5px;
position: relative;
float: left;
display: block;
}
/* 加载更多 */
/* 加载更多 */
...
...
增值产品-小程序及app/nyx_app_key/api/src/main/resources/cn/com/fun/nyxkey/api/repository/Rockwell_keyMapper.xml
查看文件 @
dc0b0a4e
<?xml
version="1.0" encoding="UTF-8"?>
<?xml
version="1.0" encoding="UTF-8"?>
...
@@ -270,8 +270,10 @@ limitations under the License.
...
@@ -270,8 +270,10 @@ limitations under the License.
<select
id=
"getCityInfo"
parameterType=
"cn.com.fun.nyxkey.api.domain.query.Rockwell_keyT_areaQuery"
resultType=
"cn.com.fun.nyxkey.api.domain.Rockwell_keyV_area_total"
>
<select
id=
"getCityInfo"
parameterType=
"cn.com.fun.nyxkey.api.domain.query.Rockwell_keyT_areaQuery"
resultType=
"cn.com.fun.nyxkey.api.domain.Rockwell_keyV_area_total"
>
SELECT * FROM view_area_total
SELECT * FROM view_area_total
WHERE 1=1
WHERE 1=1
<if
test=
"city != null and city != '' "
>
AND city=#{city}
AND city=#{city}
order by city asc
</if>
order by city asc, district DESC
</select>
</select>
<!-- post api 4.1 从 view_post_info 获取 post信息
<!-- post api 4.1 从 view_post_info 获取 post信息
...
@@ -281,6 +283,7 @@ limitations under the License.
...
@@ -281,6 +283,7 @@ limitations under the License.
WHERE 1=1
WHERE 1=1
<if
test=
"areaId != 0 "
>
<if
test=
"areaId != 0 "
>
AND area_id = #{areaId}f
AND area_id = #{areaId}f
</if>
</if>
<if
test=
"areaName != null and areaName != '' "
>
<if
test=
"areaName != null and areaName != '' "
>
AND area_name = #{areaName}
AND area_name = #{areaName}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论