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 个修改的文件
包含
243 行增加
和
94 行删除
+243
-94
增值产品-小程序及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
+159
-52
增值产品-小程序及app/nyx-dev/pages/fair/fair.js
+53
-17
增值产品-小程序及app/nyx-dev/pages/fair/fair.wxml
+12
-19
增值产品-小程序及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({
defaultCity
:
'上海'
,
defaultCounty
:
'静安区'
,
citySwitched
:
0
,
},
...
...
增值产品-小程序及app/nyx-dev/app.json
查看文件 @
3b48ed94
{
{
...
...
@@ -43,7 +43,7 @@
},
{
"pagePath"
:
"pages/fair/fair"
,
"text"
:
"
夜
市"
,
"text"
:
"
集
市"
,
"iconPath"
:
"./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={
notes_query_url
:
host_key
+
"/api/nyx/post/query"
,
activity_query_url
:
host_key
+
"/api/nyx/activity/query"
,
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_add_url
:
host_key
+
"/api/nyx/add/order"
,
match_query_url
:
host_key
+
"/api/nyx/match/query"
,
...
...
增值产品-小程序及app/nyx-dev/pages/community/community.js
查看文件 @
3b48ed94
// pa
ges/activity/activity.js
// pa
ges/activity/activity.js
...
...
@@ -59,11 +59,13 @@ Page({
qRCodeMsg
:
""
,
//园区
communities
:
[
'思南公馆'
,
'永平里'
,
],
activityType
:
"02-园区"
,
communities
:
[],
/*
园区所在的信息
community_name, num_activity, num_like
*/
communityInfos
:
{},
curCommunity
:
0
,
},
...
...
@@ -72,13 +74,14 @@ Page({
var
_this
=
this
;
var
curIndex
=
e
.
currentTarget
.
dataset
.
index
?
e
.
currentTarget
.
dataset
.
index
:
0
var
curCommunity
=
_this
.
__data__
.
curCommunity
var
strAddress
=
_this
.
__data__
.
communities
[
curCommunity
]
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strSearch
=
_this
.
__data__
.
strSearch
var
strAddress
=
app
.
globalData
.
defaultCity
var
strEntity
=
_this
.
__data__
.
communities
[
curCommunity
]
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strSearch
=
_this
.
__data__
.
strSearch
this
.
setData
({
curIndex
:
curIndex
,
})
_this
.
getActivities
(
0
,
1
,
4
,
strAddress
,
strCategory
,
strSearch
);
_this
.
getActivities
(
0
,
1
,
4
,
strAddress
,
str
Entity
,
str
Category
,
strSearch
);
},
// 搜索点击事件
entrySearch
(
e
)
{
...
...
@@ -190,25 +193,25 @@ Page({
}
)
// step5 初始载入四个推荐的活动 - local page
if
(
_this
.
__data__
.
activities
.
length
==
0
)
{
var
switchId
=
app
.
globalData
.
switchId
var
curIndex
=
switchId
!=
""
?
switchId
:
_this
.
__data__
.
curIndex
var
curCommunity
=
_this
.
__data__
.
curCommunity
var
strAddress
=
_this
.
__data__
.
communities
[
curCommunity
]
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strSearch
=
_this
.
__data__
.
strSearch
this
.
setData
({
curIndex
:
curIndex
,
});
app
.
globalData
.
switchId
=
""
_this
.
getActivities
(
0
,
1
,
4
,
strAddress
,
strCategory
,
strSearch
);
// step5 new add jscat 20201008 载入园区列表 - local page
var
strCity
=
app
.
globalData
.
defaultCity
var
activityType
=
_this
.
__data__
.
activityType
let
promise_community
=
new
Promise
(
function
(
resolve
,
reject
)
{
_this
.
getCommunities
(
strCity
,
activityType
,
resolve
,
reject
);
})
}
// step6 初始载入四个推荐的活动 - local page
promise_community
.
then
(
function
(
value
){
console
.
log
(
"===enter promise_community then_passed_"
+
value
)
_this
.
onGetActivities
()
},
function
(
value
){
console
.
log
(
"===enter promise_community then_failed_"
+
value
)
}
)
// step
6
event 订阅, 主要接受activity-info.js里 emit 发送的消息 local page
// step
7
event 订阅, 主要接受activity-info.js里 emit 发送的消息 local page
event
.
on
(
'LikeChanged'
,
this
,
function
(
data
)
{
var
activity_id
=
data
[
'activity_id'
]
var
num_like
=
data
[
'num_like'
]
...
...
@@ -226,7 +229,7 @@ Page({
})
})
// step
7
窗口初始化
// step
8
窗口初始化
var
device
=
wx
.
getSystemInfoSync
()
//self.device = app.globalData.myDevice
// jscat miniprogram default width is 750rpx
...
...
@@ -266,6 +269,28 @@ Page({
county
:
defaultCounty
})
if
(
app
.
globalData
.
citySwitched
==
1
)
{
var
strCity
=
app
.
globalData
.
defaultCity
var
activityType
=
_this
.
__data__
.
activityType
let
promise_community
=
new
Promise
(
function
(
resolve
,
reject
)
{
_this
.
getCommunities
(
strCity
,
activityType
,
resolve
,
reject
);
})
// step6 初始载入四个推荐的活动 - local page
promise_community
.
then
(
function
(
value
){
console
.
log
(
"===enter promise_community then_passed_"
+
value
)
_this
.
onGetActivities
()
},
function
(
value
){
console
.
log
(
"===enter promise_community then_failed_"
+
value
)
}
)
app
.
globalData
.
citySwitched
=
0
}
},
/**
...
...
@@ -299,9 +324,10 @@ Page({
var
_this
=
this
;
var
curIndex
=
_this
.
__data__
.
curIndex
var
curCommunity
=
_this
.
__data__
.
curCommunity
var
strAddress
=
_this
.
__data__
.
communities
[
curCommunity
]
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strSearch
=
_this
.
__data__
.
strSearch
var
strAddress
=
app
.
globalData
.
defaultCity
var
strEntity
=
_this
.
__data__
.
communities
[
curCommunity
]
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strSearch
=
_this
.
__data__
.
strSearch
var
isHideLoadMore
=
_this
.
__data__
.
isHideLoadMore
;
var
pageIndex
=
_this
.
__data__
.
pageIndex
;
...
...
@@ -312,7 +338,7 @@ Page({
console
.
log
(
'加载更多'
)
setTimeout
(()
=>
{
_this
.
getActivities
(
1
,
pageIndex
,
4
,
strAddress
,
strCategory
,
strSearch
);
_this
.
getActivities
(
1
,
pageIndex
,
4
,
strAddress
,
str
Entity
,
str
Category
,
strSearch
);
},
1000
)
}
else
{
...
...
@@ -338,13 +364,16 @@ Page({
1. 搜索框, tag=strSearch + title=strSearch
2. tab, tag=strSearch
3. 新增的search tab, '搜索'tab的时候,需要转换为搜索的关键词(_this.__data__.strSearch)
4. jscat 20201008 新增按照entity搜索(fair/community)
*/
getActivities
:
function
(
scrollType
,
pageNum
,
pageCount
,
strAddress
,
strCategory
,
strSearch
)
{
getActivities
:
function
(
scrollType
,
pageNum
,
pageCount
,
strAddress
,
str
Entity
,
str
Category
,
strSearch
)
{
var
_this
=
this
;
var
activityType
=
_this
.
__data__
.
activityType
// 如果是"推荐"和"搜索",需要单独处理
// '搜索'tab的时候, 需要转换为搜索的关键词(_this.__data__.strSearch)
var
query_url
=
'&title='
+
strSearch
+
'&orderType='
+
strCategory
+
'&city='
+
strAddress
+
'&activityType='
+
activityType
+
'&entityName='
+
strEntity
var
strUrl
=
config
.
activity_query_url
+
"?pageCount="
+
pageCount
+
"&pageNum="
+
pageNum
+
query_url
...
...
@@ -448,16 +477,17 @@ Page({
var
_this
=
this
;
var
curIndex
=
_this
.
__data__
.
curIndex
var
curCommunity
=
_this
.
__data__
.
curCommunity
var
strAddress
=
_this
.
__data__
.
communities
[
curCommunity
]
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strSearch
=
""
var
strAddress
=
app
.
globalData
.
defaultCity
var
strEntity
=
_this
.
__data__
.
communities
[
curCommunity
]
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strSearch
=
""
this
.
setData
({
strSearch
:
strSearch
,
inputShowed
:
false
,
});
_this
.
getActivities
(
0
,
1
,
4
,
strAddress
,
strCategory
,
strSearch
);
_this
.
getActivities
(
0
,
1
,
4
,
strAddress
,
str
Entity
,
str
Category
,
strSearch
);
},
// * 删除输入字符串
...
...
@@ -470,13 +500,15 @@ Page({
// 开始搜索
startSearch
:
function
(
e
)
{
var
_this
=
this
;
var
strSearch
=
e
.
detail
.
value
var
curIndex
=
_this
.
__data__
.
curIndex
var
strSearch
=
e
.
detail
.
value
var
curIndex
=
_this
.
__data__
.
curIndex
var
curCommunity
=
_this
.
__data__
.
curCommunity
var
strAddress
=
_this
.
__data__
.
communities
[
curCommunity
]
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strAddress
=
app
.
globalData
.
defaultCity
var
strEntity
=
_this
.
__data__
.
communities
[
curCommunity
]
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
console
.
log
(
"===input search text_"
+
strSearch
)
_this
.
getActivities
(
0
,
1
,
4
,
strAddress
,
strCategory
,
strSearch
);
_this
.
getActivities
(
0
,
1
,
4
,
strAddress
,
str
Entity
,
str
Category
,
strSearch
);
_this
.
setData
({
strSearch
:
strSearch
,
...
...
@@ -605,13 +637,17 @@ Page({
// used by switchcity.js
onUpdateData
:
function
(){
var
_this
=
this
;
var
curIndex
=
_this
.
__data__
.
curIndex
var
curCommunity
=
_this
.
__data__
.
curCommunity
var
curIndex
=
_this
.
__data__
.
curIndex
var
curCommunity
=
_this
.
__data__
.
curCommunity
var
strAddress
=
_this
.
__data__
.
communities
[
curCommunity
]
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strAddress
=
app
.
globalData
.
defaultCity
var
strEntity
=
_this
.
__data__
.
communities
[
curCommunity
]
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strSearch
=
_this
.
__data__
.
strSearch
_this
.
getActivities
(
0
,
1
,
4
,
strAddress
,
strCategory
,
strSearch
);
console
.
log
(
"===input search text_"
+
strSearch
)
_this
.
getActivities
(
0
,
1
,
4
,
strAddress
,
strEntity
,
strCategory
,
strSearch
);
},
...
...
@@ -624,18 +660,89 @@ Page({
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
=
""
var
strAddress
=
app
.
globalData
.
defaultCity
var
strEntity
=
_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
);
console
.
log
(
"===input search text_"
+
strSearch
)
_this
.
getActivities
(
0
,
1
,
4
,
strAddress
,
strEntity
,
strCategory
,
strSearch
);
},
// 获取Communities数据 limit 10 by cityName && activityType
getCommunities
:
function
(
cityName
,
activityType
,
resolve
,
reject
)
{
var
_this
=
this
;
var
query_url
=
'?activityType='
+
activityType
+
'&cityName='
+
cityName
var
strUrl
=
config
.
activity_stat_query_url
+
query_url
config
.
debug
==
1
?
console
.
log
(
"===strUrl is:
\"
"
+
strUrl
+
"
\"
"
)
:
""
wx
.
request
({
url
:
strUrl
,
method
:
'GET'
,
header
:
{
'Cookie'
:
wx
.
getStorageSync
(
'cookieKey'
),
},
success
:
function
(
res
)
{
if
(
res
.
data
.
resultCode
==
200
)
{
//表示HTTP请求成功
console
.
log
(
res
.
data
);
var
list
=
[]
var
communities
=
[]
for
(
var
i
=
0
;
i
<
res
.
data
.
data
.
length
;
i
++
)
{
var
result
=
{}
result
[
"activity_type"
]
=
res
.
data
.
data
[
i
].
activityType
result
[
"city_name"
]
=
res
.
data
.
data
[
i
].
cityName
result
[
"community_name"
]
=
res
.
data
.
data
[
i
].
communityName
result
[
"num_activity"
]
=
res
.
data
.
data
[
i
].
numActivity
result
[
"num_like"
]
=
res
.
data
.
data
[
i
].
numLike
communities
.
push
(
res
.
data
.
data
[
i
].
communityName
)
list
.
push
(
result
)
}
_this
.
setData
({
communities
:
communities
,
communityInfos
:
list
,
curCommunity
:
0
,
})
resolve
(
"===getCommunities success"
)
}
},
fail
:
function
(
err
)
{
console
.
log
(
"fail to getCommunities"
,
err
.
errMsg
)
reject
(
new
Error
(
'failed to getCommunities'
));
},
})
},
// getActivities入口函数
onGetActivities
:
function
(){
var
_this
=
this
;
// 如果强制更新, 则不考虑_this.data.activities length是否为0
if
(
_this
.
__data__
.
communities
.
length
>
0
)
{
var
switchId
=
app
.
globalData
.
switchId
var
curIndex
=
switchId
!=
""
?
switchId
:
_this
.
__data__
.
curIndex
var
curCommunity
=
_this
.
__data__
.
curCommunity
var
strAddress
=
app
.
globalData
.
defaultCity
var
strEntity
=
_this
.
__data__
.
communities
[
curCommunity
]
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strSearch
=
_this
.
__data__
.
strSearch
this
.
setData
({
curIndex
});
app
.
globalData
.
switchId
=
""
_this
.
getActivities
(
0
,
1
,
4
,
strAddress
,
strEntity
,
strCategory
,
strSearch
);
}
},
})
...
...
增值产品-小程序及app/nyx-dev/pages/fair/fair.js
查看文件 @
3b48ed94
// pa
ges/activity/activity.js
// pa
ges/activity/activity.js
...
...
@@ -51,24 +51,34 @@ Page({
//搜索模块
inputShowed
:
false
,
//初始文本框不显示内容
strSearch
:
""
,
//搜索的字串
strSearch
:
""
,
//搜索的title字串
strAddress
:
"思南公馆"
,
//搜索的address字串
inputVal
:
""
,
//输入字符串,主要用于页面显示
//二维码信息
qRCodeMsg
:
""
,
//园区
communities
:
[
'思南公馆'
,
'永平里'
,
],
curCommunity
:
0
,
},
switchCategory
(
e
)
{
var
_this
=
this
;
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
strSearch
=
_this
.
__data__
.
strSearch
this
.
setData
({
curIndex
:
curIndex
,
})
_this
.
getActivities
(
0
,
1
,
4
,
str
City
,
strCategory
,
strSearch
);
_this
.
getActivities
(
0
,
1
,
4
,
str
Address
,
strCategory
,
strSearch
);
},
// 搜索点击事件
entrySearch
(
e
)
{
...
...
@@ -180,13 +190,13 @@ Page({
}
)
// step5 初始载入四个推荐的活动 - local page
if
(
_this
.
__data__
.
activities
.
length
==
0
)
{
var
switchId
=
app
.
globalData
.
switchId
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
strSearch
=
_this
.
__data__
.
strSearch
this
.
setData
({
...
...
@@ -194,7 +204,7 @@ Page({
});
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({
console
.
log
(
'页面上拉触底'
)
var
_this
=
this
;
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
strSearch
=
_this
.
__data__
.
strSearch
var
isHideLoadMore
=
_this
.
__data__
.
isHideLoadMore
;
...
...
@@ -301,7 +312,7 @@ Page({
console
.
log
(
'加载更多'
)
setTimeout
(()
=>
{
_this
.
getActivities
(
1
,
pageIndex
,
4
,
str
City
,
strCategory
,
strSearch
);
_this
.
getActivities
(
1
,
pageIndex
,
4
,
str
Address
,
strCategory
,
strSearch
);
},
1000
)
}
else
{
...
...
@@ -328,12 +339,12 @@ Page({
2. tab, tag=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
;
// 如果是"推荐"和"搜索",需要单独处理
// '搜索'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
+
"&pageNum="
+
pageNum
+
query_url
...
...
@@ -436,7 +447,8 @@ Page({
hideInput
:
function
()
{
var
_this
=
this
;
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
strSearch
=
""
...
...
@@ -445,7 +457,7 @@ Page({
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({
var
_this
=
this
;
var
strSearch
=
e
.
detail
.
value
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
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
({
strSearch
:
strSearch
,
...
...
@@ -593,14 +606,37 @@ Page({
onUpdateData
:
function
(){
var
_this
=
this
;
var
strCity
=
app
.
globalData
.
defaultCity
var
curIndex
=
_this
.
__data__
.
curIndex
var
curCommunity
=
_this
.
__data__
.
curCommunity
var
strAddress
=
_this
.
__data__
.
communities
[
curCommunity
]
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strSearch
=
_this
.
__data__
.
strSearch
_this
.
getActivities
(
0
,
1
,
4
,
str
City
,
strCategory
,
strSearch
);
_this
.
getActivities
(
0
,
1
,
4
,
str
Address
,
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添加同步操作
...
...
增值产品-小程序及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 @@
<!-- refer https://www.jb51.net/article/158292.htm -->
<!-- refer https://github.com/cinoliu/-selectCity -->
<view class="weui-search-bar">
<
navigator url="../switchcity/switchcity?city={{city}}&type=index">
<text>{{c
ity
}}</text>
<image src='../../icon/down.png' style='width:
32rpx;height: 32
rpx;' class='selecrtImg'></image>
</
navigato
r>
<
picker mode="selector" range="{{communities}}" value="{{curCommunity}}" bindchange="onCommunityPicker" class='address_member'>
<text>{{c
ommunities[curCommunity]
}}</text>
<image src='../../icon/down.png' style='width:
40rpx;height: 40
rpx;' class='selecrtImg'></image>
</
picke
r>
<view class="weui-search-bar__form">
<view class="weui-search-bar__box">
<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">
<icon type="clear" size="16"></icon>
</view>
</view>
<label class="weui-search-bar__label" hidden="{{inputShowed}}" bindtap="showInput">
<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>
</view>
<view class="weui-search-bar__cancel-btn" hidden="{{!inputShowed}}" bindtap="hideInput">取消
...
...
@@ -48,26 +48,19 @@
<!-- jscat20200816 添加活动日历 for convinience -->
<block>
<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>
<text style="font-size:28rpx;">本周活动</text>
</navigator>
</view>
</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>
</block>
<!-- todo 0828 我的活动暂时也不实现 -->
<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>
</navigator>
<text>
我的预订
</text>
<text>
{{communities[curCommunity]}}介绍
</text>
</view>
</view>
...
...
@@ -102,7 +95,7 @@
<view class="note-column">
<navigator url='{{item.url}}&num_like={{item.num_like}}' >
<!-- 商家信息 -->
{{item.title}}
<text>{{item.title}}</text>
<!-- 商品价格 -->
<span>
<view class="price-row">
...
...
增值产品-小程序及app/nyx-dev/pages/fair/fair.wxss
查看文件 @
3b48ed94
/*
/*
...
...
@@ -335,6 +335,16 @@
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{
width: 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({
//直接更新app.globalData
appInstance
.
globalData
.
defaultCity
=
city
appInstance
.
globalData
.
defaultCounty
=
''
appInstance
.
globalData
.
citySwitched
=
1
// 同步更新storage记录
// start 记录最近访问
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论