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
3b48ed94
Commit
3b48ed94
authored
Oct 09, 2020
by
jscat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nyx weapp: 功能更新
1. 添加园区和园区活动query功能
parent
a80d7bba
全部展开
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
226 行增加
和
77 行删除
+226
-77
增值产品-小程序及app/nyx-dev/app.js
+2
-1
增值产品-小程序及app/nyx-dev/app.json
+2
-2
增值产品-小程序及app/nyx-dev/config.js
+2
-1
增值产品-小程序及app/nyx-dev/pages/community/community.js
+143
-36
增值产品-小程序及app/nyx-dev/pages/fair/fair.js
+53
-17
增值产品-小程序及app/nyx-dev/pages/fair/fair.wxml
+11
-18
增值产品-小程序及app/nyx-dev/pages/fair/fair.wxss
+11
-1
增值产品-小程序及app/nyx-dev/pages/switchcity/switchcity.js
+2
-1
没有找到文件。
增值产品-小程序及app/nyx-dev/app.js
查看文件 @
3b48ed94
//app
.js
//app
.js
...
@@ -77,6 +77,7 @@ App({
...
@@ -77,6 +77,7 @@ App({
defaultCity
:
'上海'
,
defaultCity
:
'上海'
,
defaultCounty
:
'静安区'
,
defaultCounty
:
'静安区'
,
citySwitched
:
0
,
},
},
...
...
增值产品-小程序及app/nyx-dev/app.json
查看文件 @
3b48ed94
{
{
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
},
},
{
{
"pagePath"
:
"pages/fair/fair"
,
"pagePath"
:
"pages/fair/fair"
,
"text"
:
"
夜
市"
,
"text"
:
"
集
市"
,
"iconPath"
:
"./icon/fair/fair.png"
,
"iconPath"
:
"./icon/fair/fair.png"
,
"selectedIconPath"
:
"./icon/fair/fair.png"
"selectedIconPath"
:
"./icon/fair/fair.png"
},
},
...
...
增值产品-小程序及app/nyx-dev/config.js
查看文件 @
3b48ed94
//con
fig.js API全局域名配置
//con
fig.js API全局域名配置
...
@@ -51,6 +51,7 @@ var config={
...
@@ -51,6 +51,7 @@ var config={
notes_query_url
:
host_key
+
"/api/nyx/post/query"
,
notes_query_url
:
host_key
+
"/api/nyx/post/query"
,
activity_query_url
:
host_key
+
"/api/nyx/activity/query"
,
activity_query_url
:
host_key
+
"/api/nyx/activity/query"
,
activity_period_query_url
:
host_key
+
"/api/nyx/activity/query/period"
,
activity_period_query_url
:
host_key
+
"/api/nyx/activity/query/period"
,
activity_stat_query_url
:
host_key
+
"/api/nyx/activity/stat/query"
,
order_detail_query_url
:
host_key
+
"/api/nyx/order/detail/query"
,
order_detail_query_url
:
host_key
+
"/api/nyx/order/detail/query"
,
order_add_url
:
host_key
+
"/api/nyx/add/order"
,
order_add_url
:
host_key
+
"/api/nyx/add/order"
,
match_query_url
:
host_key
+
"/api/nyx/match/query"
,
match_query_url
:
host_key
+
"/api/nyx/match/query"
,
...
...
增值产品-小程序及app/nyx-dev/pages/community/community.js
查看文件 @
3b48ed94
差异被折叠。
点击展开。
增值产品-小程序及app/nyx-dev/pages/fair/fair.js
查看文件 @
3b48ed94
// pa
ges/activity/activity.js
// pa
ges/activity/activity.js
...
@@ -51,24 +51,34 @@ Page({
...
@@ -51,24 +51,34 @@ Page({
//搜索模块
//搜索模块
inputShowed
:
false
,
//初始文本框不显示内容
inputShowed
:
false
,
//初始文本框不显示内容
strSearch
:
""
,
//搜索的字串
strSearch
:
""
,
//搜索的title字串
strAddress
:
"思南公馆"
,
//搜索的address字串
inputVal
:
""
,
//输入字符串,主要用于页面显示
inputVal
:
""
,
//输入字符串,主要用于页面显示
//二维码信息
//二维码信息
qRCodeMsg
:
""
,
qRCodeMsg
:
""
,
//园区
communities
:
[
'思南公馆'
,
'永平里'
,
],
curCommunity
:
0
,
},
},
switchCategory
(
e
)
{
switchCategory
(
e
)
{
var
_this
=
this
;
var
_this
=
this
;
var
curIndex
=
e
.
currentTarget
.
dataset
.
index
?
e
.
currentTarget
.
dataset
.
index
:
0
var
curIndex
=
e
.
currentTarget
.
dataset
.
index
?
e
.
currentTarget
.
dataset
.
index
:
0
var
strCity
=
_this
.
__data__
.
city
var
curCommunity
=
_this
.
__data__
.
curCommunity
var
strAddress
=
_this
.
__data__
.
communities
[
curCommunity
]
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strSearch
=
_this
.
__data__
.
strSearch
var
strSearch
=
_this
.
__data__
.
strSearch
this
.
setData
({
this
.
setData
({
curIndex
:
curIndex
,
curIndex
:
curIndex
,
})
})
_this
.
getActivities
(
0
,
1
,
4
,
str
City
,
strCategory
,
strSearch
);
_this
.
getActivities
(
0
,
1
,
4
,
str
Address
,
strCategory
,
strSearch
);
},
},
// 搜索点击事件
// 搜索点击事件
entrySearch
(
e
)
{
entrySearch
(
e
)
{
...
@@ -180,13 +190,13 @@ Page({
...
@@ -180,13 +190,13 @@ Page({
}
}
)
)
// step5 初始载入四个推荐的活动 - local page
// step5 初始载入四个推荐的活动 - local page
if
(
_this
.
__data__
.
activities
.
length
==
0
)
if
(
_this
.
__data__
.
activities
.
length
==
0
)
{
{
var
switchId
=
app
.
globalData
.
switchId
var
switchId
=
app
.
globalData
.
switchId
var
curIndex
=
switchId
!=
""
?
switchId
:
_this
.
__data__
.
curIndex
var
curIndex
=
switchId
!=
""
?
switchId
:
_this
.
__data__
.
curIndex
var
strCity
=
_this
.
__data__
.
city
var
curCommunity
=
_this
.
__data__
.
curCommunity
var
strAddress
=
_this
.
__data__
.
communities
[
curCommunity
]
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strSearch
=
_this
.
__data__
.
strSearch
var
strSearch
=
_this
.
__data__
.
strSearch
this
.
setData
({
this
.
setData
({
...
@@ -194,7 +204,7 @@ Page({
...
@@ -194,7 +204,7 @@ Page({
});
});
app
.
globalData
.
switchId
=
""
app
.
globalData
.
switchId
=
""
_this
.
getActivities
(
0
,
1
,
4
,
str
City
,
strCategory
,
strSearch
);
_this
.
getActivities
(
0
,
1
,
4
,
str
Address
,
strCategory
,
strSearch
);
}
}
...
@@ -288,7 +298,8 @@ Page({
...
@@ -288,7 +298,8 @@ Page({
console
.
log
(
'页面上拉触底'
)
console
.
log
(
'页面上拉触底'
)
var
_this
=
this
;
var
_this
=
this
;
var
curIndex
=
_this
.
__data__
.
curIndex
var
curIndex
=
_this
.
__data__
.
curIndex
var
strCity
=
_this
.
__data__
.
city
var
curCommunity
=
_this
.
__data__
.
curCommunity
var
strAddress
=
_this
.
__data__
.
communities
[
curCommunity
]
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strSearch
=
_this
.
__data__
.
strSearch
var
strSearch
=
_this
.
__data__
.
strSearch
var
isHideLoadMore
=
_this
.
__data__
.
isHideLoadMore
;
var
isHideLoadMore
=
_this
.
__data__
.
isHideLoadMore
;
...
@@ -301,7 +312,7 @@ Page({
...
@@ -301,7 +312,7 @@ Page({
console
.
log
(
'加载更多'
)
console
.
log
(
'加载更多'
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
_this
.
getActivities
(
1
,
pageIndex
,
4
,
str
City
,
strCategory
,
strSearch
);
_this
.
getActivities
(
1
,
pageIndex
,
4
,
str
Address
,
strCategory
,
strSearch
);
},
1000
)
},
1000
)
}
}
else
{
else
{
...
@@ -328,12 +339,12 @@ Page({
...
@@ -328,12 +339,12 @@ Page({
2. tab, tag=strSearch
2. tab, tag=strSearch
3. 新增的search tab, '搜索'tab的时候,需要转换为搜索的关键词(_this.__data__.strSearch)
3. 新增的search tab, '搜索'tab的时候,需要转换为搜索的关键词(_this.__data__.strSearch)
*/
*/
getActivities
:
function
(
scrollType
,
pageNum
,
pageCount
,
str
City
,
strCategory
,
strSearch
)
{
getActivities
:
function
(
scrollType
,
pageNum
,
pageCount
,
str
Address
,
strCategory
,
strSearch
)
{
var
_this
=
this
;
var
_this
=
this
;
// 如果是"推荐"和"搜索",需要单独处理
// 如果是"推荐"和"搜索",需要单独处理
// '搜索'tab的时候, 需要转换为搜索的关键词(_this.__data__.strSearch)
// '搜索'tab的时候, 需要转换为搜索的关键词(_this.__data__.strSearch)
var
query_url
=
'&title='
+
strSearch
+
'&orderType='
+
strCategory
+
'&city='
+
str
City
var
query_url
=
'&title='
+
strSearch
+
'&orderType='
+
strCategory
+
'&city='
+
str
Address
var
strUrl
=
config
.
activity_query_url
+
"?pageCount="
+
pageCount
var
strUrl
=
config
.
activity_query_url
+
"?pageCount="
+
pageCount
+
"&pageNum="
+
pageNum
+
query_url
+
"&pageNum="
+
pageNum
+
query_url
...
@@ -436,7 +447,8 @@ Page({
...
@@ -436,7 +447,8 @@ Page({
hideInput
:
function
()
{
hideInput
:
function
()
{
var
_this
=
this
;
var
_this
=
this
;
var
curIndex
=
_this
.
__data__
.
curIndex
var
curIndex
=
_this
.
__data__
.
curIndex
var
strCity
=
_this
.
__data__
.
city
var
curCommunity
=
_this
.
__data__
.
curCommunity
var
strAddress
=
_this
.
__data__
.
communities
[
curCommunity
]
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strSearch
=
""
var
strSearch
=
""
...
@@ -445,7 +457,7 @@ Page({
...
@@ -445,7 +457,7 @@ Page({
inputShowed
:
false
,
inputShowed
:
false
,
});
});
_this
.
getActivities
(
0
,
1
,
4
,
str
City
,
strCategory
,
strSearch
);
_this
.
getActivities
(
0
,
1
,
4
,
str
Address
,
strCategory
,
strSearch
);
},
},
// * 删除输入字符串
// * 删除输入字符串
...
@@ -460,10 +472,11 @@ Page({
...
@@ -460,10 +472,11 @@ Page({
var
_this
=
this
;
var
_this
=
this
;
var
strSearch
=
e
.
detail
.
value
var
strSearch
=
e
.
detail
.
value
var
curIndex
=
_this
.
__data__
.
curIndex
var
curIndex
=
_this
.
__data__
.
curIndex
var
strCity
=
_this
.
__data__
.
city
var
curCommunity
=
_this
.
__data__
.
curCommunity
var
strAddress
=
_this
.
__data__
.
communities
[
curCommunity
]
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
console
.
log
(
"===input search text_"
+
strSearch
)
console
.
log
(
"===input search text_"
+
strSearch
)
_this
.
getActivities
(
0
,
1
,
4
,
str
City
,
strCategory
,
strSearch
);
_this
.
getActivities
(
0
,
1
,
4
,
str
Address
,
strCategory
,
strSearch
);
_this
.
setData
({
_this
.
setData
({
strSearch
:
strSearch
,
strSearch
:
strSearch
,
...
@@ -593,14 +606,37 @@ Page({
...
@@ -593,14 +606,37 @@ Page({
onUpdateData
:
function
(){
onUpdateData
:
function
(){
var
_this
=
this
;
var
_this
=
this
;
var
strCity
=
app
.
globalData
.
defaultCity
var
curIndex
=
_this
.
__data__
.
curIndex
var
curIndex
=
_this
.
__data__
.
curIndex
var
curCommunity
=
_this
.
__data__
.
curCommunity
var
strAddress
=
_this
.
__data__
.
communities
[
curCommunity
]
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strSearch
=
_this
.
__data__
.
strSearch
var
strSearch
=
_this
.
__data__
.
strSearch
_this
.
getActivities
(
0
,
1
,
4
,
strCity
,
strCategory
,
strSearch
);
_this
.
getActivities
(
0
,
1
,
4
,
strAddress
,
strCategory
,
strSearch
);
},
/*
* 更换某一个memberInfo的地址信息
*/
onCommunityPicker
:
function
(
e
)
{
var
_this
=
this
;
var
curCommunity
=
e
.
detail
.
value
var
switchId
=
app
.
globalData
.
switchId
var
curIndex
=
switchId
!=
""
?
switchId
:
_this
.
__data__
.
curIndex
var
strAddress
=
_this
.
__data__
.
communities
[
curCommunity
]
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strSearch
=
""
this
.
setData
({
curIndex
,
curCommunity
,
strSearch
});
app
.
globalData
.
switchId
=
""
_this
.
getActivities
(
0
,
1
,
4
,
strAddress
,
strCategory
,
strSearch
);
},
},
})
})
//通过Promise方式为wx.request添加同步操作
//通过Promise方式为wx.request添加同步操作
...
...
增值产品-小程序及app/nyx-dev/pages/fair/fair.wxml
查看文件 @
3b48ed94
<wxs
module="tutil" src="./../../utils/date.wxs"></wxs>
<wxs
module="tutil" src="./../../utils/date.wxs"></wxs>
...
@@ -7,21 +7,21 @@
...
@@ -7,21 +7,21 @@
<!-- refer https://www.jb51.net/article/158292.htm -->
<!-- refer https://www.jb51.net/article/158292.htm -->
<!-- refer https://github.com/cinoliu/-selectCity -->
<!-- refer https://github.com/cinoliu/-selectCity -->
<view class="weui-search-bar">
<view class="weui-search-bar">
<
navigator url="../switchcity/switchcity?city={{city}}&type=index">
<
picker mode="selector" range="{{communities}}" value="{{curCommunity}}" bindchange="onCommunityPicker" class='address_member'>
<text>{{c
ity
}}</text>
<text>{{c
ommunities[curCommunity]
}}</text>
<image src='../../icon/down.png' style='width:
32rpx;height: 32
rpx;' class='selecrtImg'></image>
<image src='../../icon/down.png' style='width:
40rpx;height: 40
rpx;' class='selecrtImg'></image>
</
navigato
r>
</
picke
r>
<view class="weui-search-bar__form">
<view class="weui-search-bar__form">
<view class="weui-search-bar__box">
<view class="weui-search-bar__box">
<icon class="weui-icon-search_in-box" type="search" size="16"></icon>
<icon class="weui-icon-search_in-box" type="search" size="16"></icon>
<input type="text" class="weui-search-bar__input" placeholder="发现
感兴趣的活动
" value="{{inputVal}}" focus="{{inputShowed}}" bindconfirm="startSearch" />
<input type="text" class="weui-search-bar__input" placeholder="发现
{{communities[curCommunity]}}
" value="{{inputVal}}" focus="{{inputShowed}}" bindconfirm="startSearch" />
<view class="weui-icon-clear" wx:if="{{inputVal.length > 0}}" bindtap="clearInput">
<view class="weui-icon-clear" wx:if="{{inputVal.length > 0}}" bindtap="clearInput">
<icon type="clear" size="16"></icon>
<icon type="clear" size="16"></icon>
</view>
</view>
</view>
</view>
<label class="weui-search-bar__label" hidden="{{inputShowed}}" bindtap="showInput">
<label class="weui-search-bar__label" hidden="{{inputShowed}}" bindtap="showInput">
<icon class="weui-icon-search" type="search" size="16"></icon>
<icon class="weui-icon-search" type="search" size="16"></icon>
<view class="weui-search-bar__text">发现
感兴趣的夜市
活动</view>
<view class="weui-search-bar__text">发现
{{communities[curCommunity]}}·感兴趣的
活动</view>
</label>
</label>
</view>
</view>
<view class="weui-search-bar__cancel-btn" hidden="{{!inputShowed}}" bindtap="hideInput">取消
<view class="weui-search-bar__cancel-btn" hidden="{{!inputShowed}}" bindtap="hideInput">取消
...
@@ -48,26 +48,19 @@
...
@@ -48,26 +48,19 @@
<!-- jscat20200816 添加活动日历 for convinience -->
<!-- jscat20200816 添加活动日历 for convinience -->
<block>
<block>
<view class="items">
<view class="items">
<navigator url="/pages/activity/activity-list/activity-list?
city={{city
}}">
<navigator url="/pages/activity/activity-list/activity-list?
strAddress={{communities[curCommunity]
}}">
<image src="../../icon/member/schedule.png" style="margin-top:10rpx; margin-bottom:-10rpx"></image>
<image src="../../icon/member/schedule.png" style="margin-top:10rpx; margin-bottom:-10rpx"></image>
<text style="font-size:28rpx;">本周活动</text>
<text style="font-size:28rpx;">本周活动</text>
</navigator>
</navigator>
</view>
</view>
</block>
</block>
<view class="items">
<navigator url="/pages/my/my-collects/my-collects">
<image src="../../icon/my/fav.png" style="margin-top:10rpx; margin-bottom:-10rpx"></image>
<text style="font-size:28rpx;">我的收藏</text>
</navigator>
</view>
<!-- todo 0828 我的活动暂时也不实现 -->
<!-- todo 0828 我的活动暂时也不实现 -->
<view class="items">
<view class="items">
<navigator url="/pages/
my/my-orders/my-orders
">
<navigator url="/pages/
community/introduction/introduction?strAddress={{communities[curCommunity]}}
">
<image src="../../icon/activity/order.png" style="margin-top:10rpx; margin-bottom:-10rpx"></image>
<image src="../../icon/activity/order.png" style="margin-top:10rpx; margin-bottom:-10rpx"></image>
</navigator>
</navigator>
<text>
我的预订
</text>
<text>
{{communities[curCommunity]}}介绍
</text>
</view>
</view>
</view>
</view>
...
@@ -102,7 +95,7 @@
...
@@ -102,7 +95,7 @@
<view class="note-column">
<view class="note-column">
<navigator url='{{item.url}}&num_like={{item.num_like}}' >
<navigator url='{{item.url}}&num_like={{item.num_like}}' >
<!-- 商家信息 -->
<!-- 商家信息 -->
{{item.title}}
<text>{{item.title}}</text>
<!-- 商品价格 -->
<!-- 商品价格 -->
<span>
<span>
<view class="price-row">
<view class="price-row">
...
...
增值产品-小程序及app/nyx-dev/pages/fair/fair.wxss
查看文件 @
3b48ed94
/*
/*
...
@@ -335,6 +335,16 @@
...
@@ -335,6 +335,16 @@
width: 55%;
width: 55%;
}
}
.note-column text{
/* 多行溢出省略 */
display: -webkit-box;
word-break: break-all;
-webkit-box-orient: vertical;
-webkit-line-clamp:2;
overflow: hidden;
text-overflow:ellipsis;
}
.writer-image{
.writer-image{
width: 240rpx;
width: 240rpx;
height: 240rpx;
height: 240rpx;
...
...
增值产品-小程序及app/nyx-dev/pages/switchcity/switchcity.js
查看文件 @
3b48ed94
impor
t
{
LETTERS
,
HOT_CITY_LIST
}
from
'../../locale/citydata'
impor
t
{
LETTERS
,
HOT_CITY_LIST
}
from
'../../locale/citydata'
...
@@ -100,6 +100,7 @@ Page({
...
@@ -100,6 +100,7 @@ Page({
//直接更新app.globalData
//直接更新app.globalData
appInstance
.
globalData
.
defaultCity
=
city
appInstance
.
globalData
.
defaultCity
=
city
appInstance
.
globalData
.
defaultCounty
=
''
appInstance
.
globalData
.
defaultCounty
=
''
appInstance
.
globalData
.
citySwitched
=
1
// 同步更新storage记录
// 同步更新storage记录
// start 记录最近访问
// start 记录最近访问
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论