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
6b3ce4ed
Commit
6b3ce4ed
authored
Aug 25, 2020
by
jscat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nyx weapp: 功能更新+页面更新
1. 添加activity-list页面及功能 2. 将小程序调整为user focus的模式
parent
14dcfc12
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
95 行增加
和
35 行删除
+95
-35
增值产品-小程序及app/nyx-master/app.json
+4
-3
增值产品-小程序及app/nyx-master/config.js
+4
-3
增值产品-小程序及app/nyx-master/pages/activity/activity-info/activity-info.js
+4
-2
增值产品-小程序及app/nyx-master/pages/activity/activity-info/activity-info.wxml
+23
-11
增值产品-小程序及app/nyx-master/pages/activity/activity.js
+3
-3
增值产品-小程序及app/nyx-master/pages/activity/activity.wxml
+6
-6
增值产品-小程序及app/nyx-master/pages/member/schedule/schedule.js
+3
-1
增值产品-小程序及app/nyx-master/pages/my/my.wxml
+11
-3
增值产品-小程序及app/nyx-master/utils/date.wxs
+37
-3
没有找到文件。
增值产品-小程序及app/nyx-master/app.json
查看文件 @
6b3ce4ed
{
{
{
"pages"
:
[
"pages/activity/activity"
,
"pages"
:
[
"pages/activity/activity"
,
"pages/activity/activity-list/activity-list"
,
"pages/my/my-members/my-members"
,
"pages/member/activity-post/activity-submit/activity-submit"
,
"pages/member/activity-post/activity-edit/activity-edit"
,
...
...
增值产品-小程序及app/nyx-master/config.js
查看文件 @
6b3ce4ed
//con
fig.js API全局域名配置
//con
fig.js API全局域名配置
//config.js API全局域名配置
var
prod
=
0
;
//阿里云服务器生产版本
var
local
=
0
;
//本地java测试,需要启动java 后台
var
test
=
1
;
//阿里云服务器测试版本
var
local
=
1
;
//本地java测试,需要启动java 后台
var
test
=
0
;
//阿里云服务器测试版本
var
debug
=
0
;
//是否打印调试信息
var
host_key
=
"https://fun.hisuhong.com"
;
...
...
@@ -45,6 +45,7 @@ var config={
userinfo_query_url
:
host_key
+
"/api/nyx/userinfo/query"
,
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"
,
order_detail_query_url
:
host_key
+
"/api/nyx/order/detail/query"
,
match_query_url
:
host_key
+
"/api/nyx/match/query"
,
match_query_by_id_url
:
host_key
+
"/api/nyx/match/query/id"
,
...
...
增值产品-小程序及app/nyx-master/pages/activity/activity-info/activity-info.js
查看文件 @
6b3ce4ed
// pa
ges/activity/activity-info/activity-info.js
// pa
ges/activity/activity-info/activity-info.js
...
...
@@ -9,7 +9,8 @@ Page({
/* 用于判断是否已经登陆 */
nyxCode
:
""
,
authStatus
:
"0"
,
userInfo
:
{},
userInfo
:
{},
memberId
:
""
,
windowHeight
:
""
,
windowWidth
:
""
,
...
...
@@ -41,6 +42,7 @@ Page({
nyxCode
:
wx
.
getStorageSync
(
'nyxCode'
),
userInfo
:
wx
.
getStorageSync
(
'userInfo'
),
authStatus
:
wx
.
getStorageSync
(
'authStatus'
),
memberId
:
wx
.
getStorageSync
(
'memberId'
),
})
}
...
...
增值产品-小程序及app/nyx-master/pages/activity/activity-info/activity-info.wxml
查看文件 @
6b3ce4ed
<wxs
module="tutil" src="./../../../utils/date.wxs"></wxs>
<wxs
module="tutil" src="./../../../utils/date.wxs"></wxs>
...
...
@@ -16,15 +16,27 @@
<view class="note-price" style="font-weight: bold">
<view class="clone">
<view class="clone-left">¥{{activityInfo.unit_price}}</view>
<view class="clone-right" bindtap="onClickClone" data-id='{{index}}'>
<view class="note-column" style="font-size: 24rpx;font-weight:normal;color: #000;">
<image src="../../../icon/activity/clone.png"></image>
克隆
</view>
</view>
</view>
<block wx:if="{{memberId==''}}">
<view class="clone-right" bindtap="onSubmitLike" data-id='{{index}}'>
<view class="note-column" style="font-size: 24rpx;font-weight:normal;color: #000;">
<image src="../../../icon/activity/like.png"></image>
<span>1234</span>
</view>
</view>
</block>
<block wx:else>
<view class="clone-right" bindtap="onClickClone" data-id='{{index}}'>
<view class="note-column" style="font-size: 24rpx;font-weight:normal;color: #000;">
<image src="../../../icon/activity/clone.png"></image>
克隆
</view>
</view>
</block>
</view>
</view>
<view class="note-content" style="display: flex; flex-direction: column">
<span>主题: {{activityInfo.title}}</span>
<span>类别: {{activityInfo.product_desc}}</span>
...
...
@@ -72,11 +84,11 @@
</view>
<view class="weui-tabbar__label">分享</view>
</view>
<view class="weui-tabbar__item">
<
!-- <
view class="weui-tabbar__item">
<view style="position: relative;display:inline-block;">
<button class="button-red" bindtap="toBuy">立即购买</button>
</view>
</view>
</view>
-->
</view>
</view>
<!-- end bottom-->
...
...
增值产品-小程序及app/nyx-master/pages/activity/activity.js
查看文件 @
6b3ce4ed
// pa
ges/activity/activity.js
// pa
ges/activity/activity.js
...
...
@@ -81,7 +81,7 @@ Page({
var
nyxCode
=
"uid_"
+
util
.
wxuuid
()
wx
.
setStorageSync
(
'nyxCode'
,
nyxCode
);
//todo set mid_456
var
memberId
=
"
mid_456
"
var
memberId
=
""
wx
.
setStorageSync
(
'memberId'
,
memberId
);
app
.
globalData
.
nyxCode
=
nyxCode
;
app
.
regUser
(
nyxCode
);
...
...
@@ -114,7 +114,7 @@ Page({
}
// todo temp 暂时设置所有用户为商家(可以查看个人->商家管理)
wx
.
setStorageSync
(
'memberId'
,
"
mid_456
"
)
wx
.
setStorageSync
(
'memberId'
,
""
)
var
device
=
wx
.
getSystemInfoSync
()
//self.device = app.globalData.myDevice
...
...
增值产品-小程序及app/nyx-master/pages/activity/activity.wxml
查看文件 @
6b3ce4ed
<wxs
module="tutil" src="./../../utils/date.wxs"></wxs>
<wxs
module="tutil" src="./../../utils/date.wxs"></wxs>
...
...
@@ -7,8 +7,8 @@
<!-- refer https://www.jb51.net/article/158292.htm -->
<!-- refer https://github.com/cinoliu/-selectCity -->
<view class="weui-search-bar">
<text>上海</text>
<image src='../../icon/down.png' style='width: 32rpx;height: 32rpx;' class='selecrtImg'></image>
<text>上海</text>
<image src='../../icon/down.png' style='width: 32rpx;height: 32rpx;' class='selecrtImg'></image>
<view class="weui-search-bar__form">
<view class="weui-search-bar__box">
<icon class="weui-icon-search_in-box" type="search" size="16"></icon>
...
...
@@ -50,10 +50,10 @@
</view>
<!-- jscat20200816 添加活动日历 for convinience -->
<view class="items">
<navigator url="/pages/
member/schedule/schedule
">
<navigator url="/pages/
activity/activity-list/activity-list
">
<image src="../../icon/member/schedule.png"></image>
</navigator>
<text>
活动日历
</text>
<text>
本周活动
</text>
</view>
</view>
</view>
...
...
@@ -104,7 +104,7 @@
<!-- 商家名称 -->
<view class="note-row align">
<view class="desc-member-left">{{item.member_name}}</view>
<
view class="desc-member-right">进店 ></view
>
<
!-- <view class="desc-member-right">进店 ></view> --
>
</view>
</view>
</view>
...
...
增值产品-小程序及app/nyx-master/pages/member/schedule/schedule.js
查看文件 @
6b3ce4ed
// pa
ges/schedule/schedule.js
// pa
ges/schedule/schedule.js
...
...
@@ -278,6 +278,8 @@ Page({
i
+=
1
;
}
}
})
//通过Promise方式为wx.request添加同步操作
...
...
增值产品-小程序及app/nyx-master/pages/my/my.wxml
查看文件 @
6b3ce4ed
<view
class="page">
<view
class="page">
...
...
@@ -38,15 +38,22 @@
<view class="weui-cell__bd">我的活动</view>
<view class="weui-cell__ft weui-cell__ft_in-access"></view>
</navigator>
<navigator class="weui-cell weui-cell_access" hover-class="weui-cell_active" url="/pages/my/my-orders/my-orders">
<view class="weui-cell__hd">
<image src="/icon/my/activity.png" />
</view>
<view class="weui-cell__bd">我的收藏</view>
<view class="weui-cell__ft weui-cell__ft_in-access"></view>
</navigator>
<!-- 只针对member商家开放 -->
<!-- <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">
<image src="/icon/my/tools.png" />
</view>
<view class="weui-cell__bd">商家管理</view>
<view class="weui-cell__ft weui-cell__ft_in-access"></view>
</navigator>
</navigator>
-->
<!-- </block> -->
</view>
</view>
\ No newline at end of file
增值产品-小程序及app/nyx-master/utils/date.wxs
查看文件 @
6b3ce4ed
var f
ormatTime = function (date) {
var f
ormatTime = function (date) {
...
...
@@ -21,8 +21,20 @@ var formatDate_md_week = function (date) {
// 输入 2020-02-04 19:33:00
// 返回 02-04 周三
var str = date.toString().substring(5, 10)
var week = getWeekByDate_today_2(date)
return str + " " + week
if(date == "")
{
return ""
}
else if(str == "")
{
return date
}
else
{
var week = getWeekByDate_today_2(date)
return str + " " + week
}
}
var formatDate_ymd = function (date) {
...
...
@@ -155,6 +167,27 @@ var formatNumberLike = function (value) {
return num
}
var formatNumberPrice = function (value) {
// 输入 1132
// 返回 1.1k
var num = value
if(num >= 100000)
{
num = "100k"
}
else if(num >= 10000)
{
num = value / 10000
num = num.toFixed(2) + "w"
}
else if(num >= 1000)
{
num = value / 1000
num = num.toFixed(2) + "k"
}
return num
}
//jscat 2020/03/03 将数字1234转为ABCD
var formatAnswer = function (n) {
answer = ""
...
...
@@ -192,6 +225,7 @@ toFix: toFix,
formatAnswer: formatAnswer,
formatDate_md_week: formatDate_md_week,
formatNumberLike: formatNumberLike,
formatNumberPrice: formatNumberPrice,
formatDate_ymdw_today_interval: formatDate_ymdw_today_interval,
formatDate_hm_interval: formatDate_hm_interval,
formatDate_mdw_interval: formatDate_mdw_interval
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论