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
e5e97393
Commit
e5e97393
authored
Aug 25, 2020
by
jscat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nyx weapp: 页面更新+功能更新
1. 添加activity-list 活动列表页面, 展示本周的活动 2. 从tabbar里去除主题(包括七夕这种)
parent
64b59f0d
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
527 行增加
和
47 行删除
+527
-47
增值产品-小程序及app/nyx-master/config.js
+2
-1
增值产品-小程序及app/nyx-master/pages/activity/activity-info/activity-info.js
+2
-2
增值产品-小程序及app/nyx-master/pages/activity/activity-info/activity-info.wxml
+5
-4
增值产品-小程序及app/nyx-master/pages/activity/activity-list/activity-list.js
+275
-0
增值产品-小程序及app/nyx-master/pages/activity/activity-list/activity-list.json
+3
-0
增值产品-小程序及app/nyx-master/pages/activity/activity-list/activity-list.wxml
+61
-0
增值产品-小程序及app/nyx-master/pages/activity/activity-list/activity-list.wxss
+131
-0
增值产品-小程序及app/nyx-master/pages/activity/activity.js
+29
-34
增值产品-小程序及app/nyx-master/pages/activity/activity.wxml
+13
-1
增值产品-小程序及app/nyx-master/pages/my/my.wxml
+6
-5
没有找到文件。
增值产品-小程序及app/nyx-master/config.js
查看文件 @
e5e97393
//con
fig.js API全局域名配置
//con
fig.js API全局域名配置
...
@@ -51,6 +51,7 @@ var config={
...
@@ -51,6 +51,7 @@ var config={
match_query_by_id_url
:
host_key
+
"/api/nyx/match/query/id"
,
match_query_by_id_url
:
host_key
+
"/api/nyx/match/query/id"
,
match_query_then_update_url
:
host_key
+
"/api/nyx/match/queryThenUpdate/id"
,
match_query_then_update_url
:
host_key
+
"/api/nyx/match/queryThenUpdate/id"
,
bonus_query_url
:
host_key
+
"/api/nyx/match/bonus/query/id"
,
bonus_query_url
:
host_key
+
"/api/nyx/match/bonus/query/id"
,
tab_query_url
:
host_key
+
"/api/nyx/tab/query"
,
socket_url
:
socket_url
,
socket_url
:
socket_url
,
oss_token_url
:
host_key
+
"/api/nyx/oss/getToken"
,
oss_token_url
:
host_key
+
"/api/nyx/oss/getToken"
,
oss_callback_url
:
login_url
+
"/api/nyx/oss/callback"
,
oss_callback_url
:
login_url
+
"/api/nyx/oss/callback"
,
...
...
增值产品-小程序及app/nyx-master/pages/activity/activity-info/activity-info.js
查看文件 @
e5e97393
// pa
ges/activity/activity-info/activity-info.js
// pa
ges/activity/activity-info/activity-info.js
...
@@ -54,7 +54,7 @@ Page({
...
@@ -54,7 +54,7 @@ Page({
activityInfo
[
'title'
]
=
options
.
title
;
activityInfo
[
'title'
]
=
options
.
title
;
activityInfo
[
'title_abbr'
]
=
options
.
title_abbr
;
activityInfo
[
'title_abbr'
]
=
options
.
title_abbr
;
activityInfo
[
'content'
]
=
options
.
content
;
activityInfo
[
'content'
]
=
options
.
content
;
activityInfo
[
'
like'
]
=
options
.
like
;
activityInfo
[
'
num_like'
]
=
options
.
num_
like
;
activityInfo
[
'address_name'
]
=
options
.
address_name
;
activityInfo
[
'address_name'
]
=
options
.
address_name
;
activityInfo
[
'product_desc'
]
=
options
.
product_desc
;
activityInfo
[
'product_desc'
]
=
options
.
product_desc
;
activityInfo
[
'unit_price'
]
=
options
.
unit_price
;
activityInfo
[
'unit_price'
]
=
options
.
unit_price
;
...
...
增值产品-小程序及app/nyx-master/pages/activity/activity-info/activity-info.wxml
查看文件 @
e5e97393
<wxs
module="tutil" src="./../../../utils/date.wxs"></wxs>
<wxs
module="tutil" src="./../../../utils/date.wxs"></wxs>
...
@@ -19,15 +19,15 @@
...
@@ -19,15 +19,15 @@
<block wx:if="{{memberId==''}}">
<block wx:if="{{memberId==''}}">
<view class="clone-right" bindtap="onSubmitLike" data-id='{{index}}'>
<view class="clone-right" bindtap="onSubmitLike" data-id='{{index}}'>
<view class="note-column" style="font-size: 24rpx;font-weight:normal;color: #000;">
<view class="note-column" style="font-size: 24rpx;font-weight:normal;color: #000;
align-items:center
">
<image src="../../../icon/activity/like.png"></image>
<image src="../../../icon/activity/like.png"></image>
<span>1234</span>
{{activityInfo.num_like}}
</view>
</view>
</view>
</view>
</block>
</block>
<block wx:else>
<block wx:else>
<view class="clone-right" bindtap="onClickClone" data-id='{{index}}'>
<view class="clone-right" bindtap="onClickClone" data-id='{{index}}'>
<view class="note-column" style="font-size: 24rpx;font-weight:normal;color: #000;">
<view class="note-column" style="font-size: 24rpx;font-weight:normal;color: #000;
align-items:center
">
<image src="../../../icon/activity/clone.png"></image>
<image src="../../../icon/activity/clone.png"></image>
克隆
克隆
</view>
</view>
...
@@ -84,6 +84,7 @@
...
@@ -84,6 +84,7 @@
</view>
</view>
<view class="weui-tabbar__label">分享</view>
<view class="weui-tabbar__label">分享</view>
</view>
</view>
<!-- todo toBuy 因为现在还没跟商家谈妥 -->
<!-- <view class="weui-tabbar__item">
<!-- <view class="weui-tabbar__item">
<view style="position: relative;display:inline-block;">
<view style="position: relative;display:inline-block;">
<button class="button-red" bindtap="toBuy">立即购买</button>
<button class="button-red" bindtap="toBuy">立即购买</button>
...
...
增值产品-小程序及app/nyx-master/pages/activity/activity-list/activity-list.js
0 → 100644
查看文件 @
e5e97393
// pages/member/activity-post/activity-edit/activity-edit.js
// pages/member/activity-post/activity-edit/activity-edit.js
var
config
=
wx
.
getStorageSync
(
"config"
);
var
app
=
getApp
();
var
log
=
require
(
'./../../../utils/log.js'
)
var
util
=
require
(
'./../../../utils/util.js'
)
Page
({
data
:
{
header_infoData
:
{},
product_listData
:
[],
//分页加载部分
stride
:
0
,
isHideLoadMore
:
false
,
},
onLoad
:
function
()
{
var
_this
=
this
;
wx
.
getSystemInfo
({
success
:
function
(
res
)
{
var
a
=
res
.
windowHeight
;
_this
.
setData
({
scrollTop
:
a
-
200
})
}
})
var
header_infoData
=
{
date
:
'日期'
,
info
:
[
{
member_name
:
"商家"
,
title
:
"活动"
,
unit_price
:
"价格"
}
]
}
var
product_listData
=
[
// {
// date: '日期',
// info: [
// { member_name: "商家", title : "活动", unit_price: "价格" }
// ]
// },
]
wx
.
setNavigationBarTitle
({
title
:
'活动列表'
,
})
//初始载入四个推荐的竞答活动
if
(
_this
.
__data__
.
product_listData
.
length
==
0
)
{
var
curDate
=
getCurDate
()
var
endDate
=
getWeekEndDate
()
var
stride
=
20
// 每20条记录做为一个page
this
.
setData
({
stride
:
stride
,
curDate
:
curDate
,
endDate
:
endDate
,
header_infoData
:
header_infoData
,
product_listData
:
product_listData
,
});
var
city
=
"上海"
_this
.
getActivitiesByPeriod
(
0
,
1
,
stride
,
city
,
curDate
,
endDate
);
}
},
onReady
:
function
(
e
)
{
},
// Date Flow
// 输入该组图片的标签
bindKeyInput
(
e
)
{
var
_this
=
this
;
_this
.
setData
({
inputValue
:
e
.
detail
.
value
})
//全局赋值
app
.
globalData
.
postData
.
photoTag
=
e
.
detail
.
value
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
console
.
log
(
'页面上拉触底'
)
var
_this
=
this
;
// var curIndex = _this.__data__.curIndex
// var strSearch = _this.__data__.category[curIndex].name
var
isHideLoadMore
=
_this
.
__data__
.
isHideLoadMore
;
var
pageIndex
=
_this
.
__data__
.
pageIndex
;
//控制逻辑, 在onClick之后或者onGetComment事件之后再允许下拉更新操作
//判断是否已经全部加载完毕
//没有则加载更多
if
(
!
isHideLoadMore
)
{
console
.
log
(
'加载更多'
)
// setTimeout(() => {
// _this.getActivities(1, pageIndex, 4, strSearch);
// }, 1000)
var
bisHideLoadMoreType
=
true
;
_this
.
setData
({
isHideLoadMore
:
bisHideLoadMoreType
,
})
}
else
{
console
.
log
(
'没有更多'
)
}
},
/**
* 用户自定义函数
*
*/
// 获取Activities数据
// scrollType: 是否是翻页
/*
搜索逻辑:
1. 按照address_name和beginDate, endDate联合查询
*/
getActivitiesByPeriod
:
function
(
scrollType
,
pageNum
,
pageCount
,
city
,
beginDate
,
endDate
)
{
var
_this
=
this
;
var
query_url
=
'&city='
+
city
+
'&beginDate='
+
beginDate
+
'&endDate='
+
endDate
var
strUrl
=
config
.
activity_period_query_url
+
"?pageCount="
+
pageCount
+
"&pageNum="
+
pageNum
+
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
bisHideLoadMoreType
=
false
;
if
(
res
.
data
.
data
.
length
<
pageCount
)
{
bisHideLoadMoreType
=
true
;
}
// 2020-08-24
var
curDate
=
_this
.
__data__
.
curDate
var
endDate
=
_this
.
__data__
.
endDate
var
list
=
[]
var
result
=
{}
for
(
var
i
=
0
;
i
<
res
.
data
.
data
.
length
;
i
++
)
{
var
activity_id
=
res
.
data
.
data
[
i
].
activityId
var
title
=
res
.
data
.
data
[
i
].
title
var
member_name
=
res
.
data
.
data
[
i
].
memberName
var
unit_price
=
res
.
data
.
data
[
i
].
unitPrice
var
start_datetime
=
res
.
data
.
data
[
i
].
startDatetime
var
end_datetime
=
res
.
data
.
data
[
i
].
endDatetime
_this
.
getYearAndMonthAndDay
(
start_datetime
,
end_datetime
,
curDate
,
endDate
,
activity_id
,
title
,
member_name
,
unit_price
,
result
)
}
//进行setLabel
console
.
log
(
"===="
,
result
);
var
list
=
[];
for
(
var
key
in
result
)
{
var
dict
=
{}
dict
[
'date'
]
=
key
dict
[
'info'
]
=
result
[
key
]
list
.
push
(
dict
)
}
//进行翻页设置(加载更多)
if
(
scrollType
==
1
)
{
var
productList
=
_this
.
__data__
.
product_listData
;
list
=
productList
.
concat
(
list
)
}
else
{
list
.
unshift
(
_this
.
__data__
.
header_infoData
)
}
_this
.
setData
({
product_listData
:
list
,
pageIndex
:
pageNum
+
1
,
isHideLoadMore
:
bisHideLoadMoreType
,
})
}
}
})
},
// 获取Activities数据
getYearAndMonthAndDay
:
function
(
start
,
end
,
curDate
,
endDate
,
id
,
title
,
member_name
,
unit_price
,
result
){
var
i
=
0
;
var
startTime
=
new
Date
(
start
.
split
(
'-'
).
join
(
'/'
));
var
endTime
=
new
Date
(
end
.
split
(
'-'
).
join
(
'/'
));
while
((
endTime
.
getTime
()
-
startTime
.
getTime
())
>=
0
){
// console.log("===enter while")
var
year
=
startTime
.
getFullYear
();
var
month
=
(
startTime
.
getMonth
()
+
1
).
toString
().
length
==
1
?
'0'
+
(
startTime
.
getMonth
()
+
1
).
toString
():(
startTime
.
getMonth
()
+
1
).
toString
();
var
day
=
startTime
.
getDate
().
toString
().
length
==
1
?
'0'
+
startTime
.
getDate
():
startTime
.
getDate
();
var
strKey
=
year
+
"-"
+
month
+
"-"
+
day
//关键点
if
(
strKey
>=
curDate
&&
strKey
<=
endDate
&&
result
.
hasOwnProperty
(
strKey
))
{
var
dic
=
{}
dic
[
'title'
]
=
title
dic
[
'activity_id'
]
=
id
dic
[
'member_name'
]
=
member_name
dic
[
'unit_price'
]
=
unit_price
result
[
strKey
].
push
(
dic
);
}
else
if
(
strKey
>=
curDate
&&
strKey
<=
endDate
)
{
var
dic
=
{}
dic
[
'title'
]
=
title
dic
[
'activity_id'
]
=
id
dic
[
'member_name'
]
=
member_name
dic
[
'unit_price'
]
=
unit_price
result
[
strKey
]
=
[
dic
];
}
startTime
.
setDate
(
startTime
.
getDate
()
+
1
);
i
+=
1
;
}
}
})
//格式化日期:yyyy-MM-dd
function
formatDate
(
date
)
{
var
myyear
=
date
.
getFullYear
();
var
mymonth
=
date
.
getMonth
()
+
1
;
var
myweekday
=
date
.
getDate
();
if
(
mymonth
<
10
){
mymonth
=
"0"
+
mymonth
;
}
if
(
myweekday
<
10
){
myweekday
=
"0"
+
myweekday
;
}
return
(
myyear
+
"-"
+
mymonth
+
"-"
+
myweekday
);
}
//获得本周的结束日期
function
getCurDate
()
{
var
curDate
=
new
Date
();
return
formatDate
(
curDate
);
}
//获得本周的结束日期
function
getWeekEndDate
()
{
var
now
=
new
Date
();
//当前日期
var
nowDayOfWeek
=
now
.
getDay
();
//今天本周的第几天
var
nowDay
=
now
.
getDate
();
//当前日
var
nowMonth
=
now
.
getMonth
();
//当前月
var
nowYear
=
now
.
getYear
();
//当前年
nowYear
+=
(
nowYear
<
2000
)
?
1900
:
0
;
//
var
weekEndDate
=
new
Date
(
nowYear
,
nowMonth
,
nowDay
+
(
7
-
nowDayOfWeek
));
return
formatDate
(
weekEndDate
);
}
增值产品-小程序及app/nyx-master/pages/activity/activity-list/activity-list.json
0 → 100644
查看文件 @
e5e97393
{}
{}
\ No newline at end of file
增值产品-小程序及app/nyx-master/pages/activity/activity-list/activity-list.wxml
0 → 100644
查看文件 @
e5e97393
<!-- /page/post/edit/edit 添加分类的标签,以及自定义标签 -->
<!-- /page/post/edit/edit 添加分类的标签,以及自定义标签 -->
<wxs module="tutil" src="./../../../utils/date.wxs"></wxs>
<view class="page" style="height:100%;width:100%">
<view class="weui-search-bar">
<text>上海</text>
<image src='../../../icon/down.png' style='width: 32rpx;height: 32rpx;' class='selecrtImg'></image>
<view class="list-activity-number">
<label>
本周活动: {{product_listData.length}}场
</label>
</view>
</view>
<!-- 添加表格: 序号, 类别描述, 价格, 个数 -->
<view class='table'>
<block wx:for="{{product_listData}}" wx:for-item="item">
<block wx:for="{{item.info}}" wx:for-item="info" wx:key="{{index}}">
<view class='table_main'>
<!-- 日期 -->
<view class='td' style='width:120rpx;background-color:white;'>
<view class="cell_label">{{tutil.formatDate_md_week(index > 0 ? "" : item.date)}}</view>
</view>
<!-- member_name -->
<view class='td' style="width:250rpx">
<view class='table_Text_last_class'>
<text style="width:250rpx">{{info.member_name}}</text>
</view>
</view>
<view class='td' style="width:250rpx">
<view class='table_Text_last_class'>
<text style="width:250rpx">{{info.title}}</text>
</view>
</view>
<view class='td' style="width:20%;">
<view class='table_Text_last_class'>
{{tutil.formatNumberPrice(info.unit_price)}}
</view>
</view>
</view>
</block>
</block>
</view>
<!-- 加载更多 -->
<view class="weui-loadmore" hidden="{{isHideLoadMore}}">
<view class="weui-loading"></view>
<view class="weui-loadmore__tips">正在加载</view>
</view>
<view class="weui-loadmore" hidden="{{!isHideLoadMore}}">
<view class="weui-loadmore__tips">没有更多啦 {{'>'}}_{{'<'}} </view>
</view>
</view>
\ No newline at end of file
增值产品-小程序及app/nyx-master/pages/activity/activity-list/activity-list.wxss
0 → 100644
查看文件 @
e5e97393
page{
page{
height: 100%;
background-color:#f5f8fa;
}
.post{
position: absolute;
bottom: 0;
right:0px;
}
/* 表格 */
.table{
display: inline-flex;
flex-direction: column;
border: 1rpx solid rgba(218, 217, 217, 1);
border-bottom: 0;
width: 100%;
}
.scrollClass {
display: flex;
width: 100%;
white-space: nowrap;
margin-top: 23px;
height: 100%;
background-color: white;
}
.table_header {
display: inline-flex;
}
.th {
display: flex;
flex-direction: column;
width: 200rpx;
height: 90rpx;
background: rgba(241, 252, 255, 1);
border-right: 1rpx solid rgba(218, 217, 217, 1);
border-bottom: 1rpx solid rgba(218, 217, 217, 1);
justify-content: center;
align-items: center;
overflow-x: auto;
}
.cell_label{
font-size: 30rpx;
color: rgba(74, 74, 74, 1);
margin-left: 10rpx;
}
.cell_date_label{
font-size: 20rpx;
color: rgba(74, 74, 74, 1);
}
.table_main {
display: inline-flex;
flex-direction: row;
}
.right-item{
display: flex;
flex-direction: row;
}
.td {
display: flex;
flex-direction: column;
/* height: 60rpx; */
background: white;
justify-content: center;
/* align-items: center; */
border: 1rpx solid rgba(218, 217, 217, 1);
border-top: 0;
border-left:0;
}
.table_Text_class {
display: flex;
justify-content: center;
align-items: center;
height: 60rpx;
font-size: 30rpx;
color: rgba(55, 134, 244, 1);
width: 100%;
word-break: normal;
border-bottom: 1rpx solid rgba(218, 217, 217, 1);
}
.table_Text_last_class{
display: flex;
/* 左右 */
/* justify-content: center; */
/* 上下 */
align-items: center;
height: 100rpx;
font-size: 30rpx;
color: rgba(55, 134, 244, 1);
width: 100%;
margin-left: 10rpx;
/* word-break: normal; */
}
.list-activity-number{
position: relative;
display: flex;
flex-direction: row;
flex: 1;
justify-content: center;
font-size: 32rpx;
}
.table_Text_last_class text{
/* overflow : hidden;
white-space: nowrap;
text-overflow: ellipsis; */
/* 多行溢出省略 */
display: -webkit-box;
word-break: break-all;
-webkit-box-orient: vertical;
-webkit-line-clamp:2;
overflow: hidden;
text-overflow:ellipsis;
}
.bottom_placeholder {
position: relative;
width: 100%;
height: 160rpx;
line-height: 10rpx;
}
\ No newline at end of file
增值产品-小程序及app/nyx-master/pages/activity/activity.js
查看文件 @
e5e97393
// pa
ges/activity/activity.js
// pa
ges/activity/activity.js
...
@@ -10,8 +10,9 @@ Page({
...
@@ -10,8 +10,9 @@ Page({
*/
*/
data
:
{
data
:
{
category
:
[
// 导航栏内容数据
category
:
[
// 导航栏内容数据
// { name: '竞答', id: 'jingda' },
{
name
:
'点赞'
,
order
:
'like'
},
{
name
:
'活动'
,
id
:
'huodong'
},
{
name
:
'价格'
,
order
:
'price'
},
{
name
:
'最新'
,
order
:
'nearest'
},
],
],
curIndex
:
0
,
// 给选中的tab加粗
curIndex
:
0
,
// 给选中的tab加粗
activities
:
[],
activities
:
[],
...
@@ -50,11 +51,12 @@ Page({
...
@@ -50,11 +51,12 @@ Page({
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
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
name
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strSearch
=
_this
.
__data__
.
strSearch
this
.
setData
({
this
.
setData
({
curIndex
:
curIndex
,
curIndex
:
curIndex
,
})
})
_this
.
getActivities
(
0
,
1
,
4
,
strCategory
);
_this
.
getActivities
(
0
,
1
,
4
,
strCategory
,
strSearch
);
},
},
// 搜索点击事件
// 搜索点击事件
entrySearch
(
e
)
{
entrySearch
(
e
)
{
...
@@ -113,7 +115,7 @@ Page({
...
@@ -113,7 +115,7 @@ Page({
})
})
}
}
// todo temp 暂时设置所有用户为
商家
(可以查看个人->商家管理)
// todo temp 暂时设置所有用户为
个人
(可以查看个人->商家管理)
wx
.
setStorageSync
(
'memberId'
,
""
)
wx
.
setStorageSync
(
'memberId'
,
""
)
var
device
=
wx
.
getSystemInfoSync
()
var
device
=
wx
.
getSystemInfoSync
()
...
@@ -139,14 +141,14 @@ Page({
...
@@ -139,14 +141,14 @@ Page({
{
{
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
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
name
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strSearch
=
_this
.
__data__
.
strSearch
this
.
setData
({
this
.
setData
({
curIndex
:
curIndex
,
curIndex
:
curIndex
,
});
});
app
.
globalData
.
switchId
=
""
app
.
globalData
.
switchId
=
""
_this
.
getActivities
(
0
,
1
,
4
,
strCategory
);
_this
.
getActivities
(
0
,
1
,
4
,
strCategory
,
strSearch
);
}
}
},
},
...
@@ -193,7 +195,8 @@ Page({
...
@@ -193,7 +195,8 @@ Page({
console
.
log
(
'页面上拉触底'
)
console
.
log
(
'页面上拉触底'
)
var
_this
=
this
;
var
_this
=
this
;
var
curIndex
=
_this
.
__data__
.
curIndex
var
curIndex
=
_this
.
__data__
.
curIndex
var
strSearch
=
_this
.
__data__
.
category
[
curIndex
].
name
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
var
strSearch
=
_this
.
__data__
.
strSearch
var
isHideLoadMore
=
_this
.
__data__
.
isHideLoadMore
;
var
isHideLoadMore
=
_this
.
__data__
.
isHideLoadMore
;
var
pageIndex
=
_this
.
__data__
.
pageIndex
;
var
pageIndex
=
_this
.
__data__
.
pageIndex
;
...
@@ -231,12 +234,11 @@ Page({
...
@@ -231,12 +234,11 @@ 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
,
strSearch
)
{
getActivities
:
function
(
scrollType
,
pageNum
,
pageCount
,
str
Category
,
str
Search
)
{
var
_this
=
this
;
var
_this
=
this
;
// 如果是"推荐"和"搜索",需要单独处理
// 如果是"推荐"和"搜索",需要单独处理
// '搜索'tab的时候,需要转换为搜索的关键词(_this.__data__.strSearch)
// '搜索'tab的时候,需要转换为搜索的关键词(_this.__data__.strSearch)
strSearch
=
strSearch
==
"搜索"
?
_this
.
__data__
.
strSearch
:
strSearch
var
query_url
=
'&title='
+
strSearch
+
'&orderType='
+
strCategory
var
query_url
=
'&tag='
+
strSearch
+
'&title='
+
strSearch
var
strUrl
=
config
.
activity_query_url
+
"?pageCount="
+
pageCount
var
strUrl
=
config
.
activity_query_url
+
"?pageCount="
+
pageCount
+
"&pageNum="
+
pageNum
+
query_url
+
"&pageNum="
+
pageNum
+
query_url
...
@@ -285,7 +287,7 @@ Page({
...
@@ -285,7 +287,7 @@ Page({
+
"¬e_image="
+
res
.
data
.
data
[
i
].
noteImage
//传递原始string数据, List不正确
+
"¬e_image="
+
res
.
data
.
data
[
i
].
noteImage
//传递原始string数据, List不正确
+
"&title="
+
result
[
"title"
]
+
"&title="
+
result
[
"title"
]
+
"&content="
+
result
[
"content"
]
+
"&content="
+
result
[
"content"
]
+
"&like="
+
result
[
"num_like"
]
+
"&
num_
like="
+
result
[
"num_like"
]
+
"&quiz="
+
result
[
"quiz"
]
+
"&quiz="
+
result
[
"quiz"
]
+
"&point="
+
result
[
"point"
]
+
"&point="
+
result
[
"point"
]
+
"&member_id="
+
result
[
"member_id"
]
+
"&member_id="
+
result
[
"member_id"
]
...
@@ -299,7 +301,7 @@ Page({
...
@@ -299,7 +301,7 @@ Page({
+
"&title_abbr="
+
result
[
"title_abbr"
]
+
"&title_abbr="
+
result
[
"title_abbr"
]
+
"&content="
+
result
[
"content"
]
+
"&content="
+
result
[
"content"
]
+
"&address_name="
+
result
[
"address_name"
]
+
"&address_name="
+
result
[
"address_name"
]
+
"&like="
+
result
[
"num_like"
]
+
"&
num_
like="
+
result
[
"num_like"
]
+
"&unit_price="
+
result
[
"unit_price"
]
+
"&unit_price="
+
result
[
"unit_price"
]
+
"&product_desc="
+
result
[
"product_desc"
]
+
"&product_desc="
+
result
[
"product_desc"
]
+
"&member_id="
+
result
[
"member_id"
]
+
"&member_id="
+
result
[
"member_id"
]
...
@@ -334,21 +336,22 @@ Page({
...
@@ -334,21 +336,22 @@ Page({
inputShowed
:
true
//设置文本框可以输入内容
inputShowed
:
true
//设置文本框可以输入内容
});
});
},
},
// 取消搜索
// 取消搜索
hideInput
:
function
()
{
hideInput
:
function
()
{
var
_this
=
this
;
var
_this
=
this
;
var
c
at
=
_this
.
__data__
.
category
;
var
c
urIndex
=
_this
.
__data__
.
curIndex
if
(
cat
[
cat
.
length
-
1
].
name
==
"搜索"
)
{
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
cat
.
pop
()
var
strSearch
=
""
}
this
.
setData
({
this
.
setData
({
strSearch
:
strSearch
,
inputShowed
:
false
,
inputShowed
:
false
,
category
:
cat
,
curIndex
:
1
,
});
});
var
strCategory
=
_this
.
__data__
.
category
[
1
].
name
_this
.
getActivities
(
0
,
1
,
4
,
strCategory
);
_this
.
getActivities
(
0
,
1
,
4
,
strCategory
,
strSearch
);
},
},
// * 删除输入字符串
// * 删除输入字符串
clearInput
:
function
(){
clearInput
:
function
(){
this
.
setData
({
this
.
setData
({
...
@@ -360,21 +363,13 @@ Page({
...
@@ -360,21 +363,13 @@ Page({
startSearch
:
function
(
e
)
{
startSearch
:
function
(
e
)
{
var
_this
=
this
;
var
_this
=
this
;
var
strSearch
=
e
.
detail
.
value
var
strSearch
=
e
.
detail
.
value
var
cat
=
_this
.
__data__
.
category
var
curIndex
=
_this
.
__data__
.
curIndex
var
strCategory
=
_this
.
__data__
.
category
[
curIndex
].
order
console
.
log
(
"===input search text_"
+
strSearch
)
console
.
log
(
"===input search text_"
+
strSearch
)
_this
.
getActivities
(
0
,
1
,
4
,
strSearch
);
_this
.
getActivities
(
0
,
1
,
4
,
strCategory
,
strSearch
);
if
(
cat
[
cat
.
length
-
1
].
name
!=
"搜索"
)
{
cat
.
push
({
name
:
"搜索"
,
id
:
"search"
,
})
}
_this
.
setData
({
_this
.
setData
({
strSearch
:
strSearch
,
strSearch
:
strSearch
,
category
:
cat
,
curIndex
:
cat
.
length
-
1
,
inputVal
:
strSearch
,
inputVal
:
strSearch
,
})
})
},
},
...
...
增值产品-小程序及app/nyx-master/pages/activity/activity.wxml
查看文件 @
e5e97393
<wxs
module="tutil" src="./../../utils/date.wxs"></wxs>
<wxs
module="tutil" src="./../../utils/date.wxs"></wxs>
...
@@ -49,12 +49,23 @@
...
@@ -49,12 +49,23 @@
<text>我的活动</text>
<text>我的活动</text>
</view>
</view>
<!-- jscat20200816 添加活动日历 for convinience -->
<!-- jscat20200816 添加活动日历 for convinience -->
<block wx:if="{{memberId!=''}}">
<view class="items">
<view class="items">
<navigator url="/pages/activity/activity-list/activity-list">
<navigator url="/pages/activity/activity-list/activity-list">
<image src="../../icon/member/schedule.png"></image>
<image src="../../icon/member/schedule.png"></image>
</navigator>
</navigator>
<text>本周活动</text>
<text>本周活动</text>
</view>
</view>
</block>
<block wx:else>
<view class="items">
<navigator url="/pages/member/schedule/schedule">
<image src="../../icon/member/schedule.png"></image>
</navigator>
<text>活动日历</text>
</view>
</block>
</view>
</view>
</view>
</view>
...
@@ -104,6 +115,7 @@
...
@@ -104,6 +115,7 @@
<!-- 商家名称 -->
<!-- 商家名称 -->
<view class="note-row align">
<view class="note-row align">
<view class="desc-member-left">{{item.member_name}}</view>
<view class="desc-member-left">{{item.member_name}}</view>
<!-- todo 店铺功能尚未实现 -->
<!-- <view class="desc-member-right">进店 ></view> -->
<!-- <view class="desc-member-right">进店 ></view> -->
</view>
</view>
</view>
</view>
...
...
增值产品-小程序及app/nyx-master/pages/my/my.wxml
查看文件 @
e5e97393
<view
class="page">
<view
class="page">
...
@@ -46,14 +46,14 @@
...
@@ -46,14 +46,14 @@
<view class="weui-cell__ft weui-cell__ft_in-access"></view>
<view class="weui-cell__ft weui-cell__ft_in-access"></view>
</navigator>
</navigator>
<!-- 只针对member商家开放 -->
<!-- 只针对member商家开放 -->
<
!-- <block wx:if="{{memberId!=''}}"> --
>
<
block wx:if="{{memberId!=''}}"
>
<
!-- <
navigator class="weui-cell weui-cell_access" hover-class="weui-cell_active" url="/pages/my/my-members/my-members">
<navigator class="weui-cell weui-cell_access" hover-class="weui-cell_active" url="/pages/my/my-members/my-members">
<view class="weui-cell__hd">
<view class="weui-cell__hd">
<image src="/icon/my/tools.png" />
<image src="/icon/my/tools.png" />
</view>
</view>
<view class="weui-cell__bd">商家管理</view>
<view class="weui-cell__bd">商家管理</view>
<view class="weui-cell__ft weui-cell__ft_in-access"></view>
<view class="weui-cell__ft weui-cell__ft_in-access"></view>
</navigator>
-->
</navigator>
<
!-- </block> -->
<
/block>
</view>
</view>
</view>
</view>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论