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
4f510b4b
Commit
4f510b4b
authored
Dec 14, 2020
by
jscat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nyx weapp: 更新
parent
e155a72b
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
118 行增加
和
21 行删除
+118
-21
app/nyx-dev/app.js
+22
-3
app/nyx-dev/app.json
+1
-1
app/nyx-dev/config.js
+1
-0
app/nyx-dev/icon/live/editTitle.png
+0
-0
app/nyx-dev/icon/live/saveTitle.png
+0
-0
app/nyx-dev/pages/live/live-info/live-info.js
+44
-2
app/nyx-dev/pages/live/live-info/live-info.wxml
+17
-5
app/nyx-dev/pages/live/live-info/live-info.wxss
+1
-1
app/nyx-dev/pages/live/live.wxml
+3
-3
app/nyx-dev/pages/share/share.js
+25
-2
app/nyx-dev/pages/share/share.wxml
+2
-2
app/nyx-dev/pages/share/share.wxss
+2
-2
没有找到文件。
app/nyx-dev/app.js
查看文件 @
4f510b4b
...
@@ -103,16 +103,17 @@ App({
...
@@ -103,16 +103,17 @@ App({
if
(
config
.
env
==
0
)
if
(
config
.
env
==
0
)
{
{
strUrl
=
config
.
socket_url
+
"?sid="
+
sid
+
"&uid="
+
uid
+
"&msg="
+
strMsg
strUrl
=
config
.
socket_url
+
"?sid="
+
sid
+
"&uid="
+
uid
+
"&msg="
+
strMsg
+
"&city="
+
_this
.
globalData
.
defaultCity
}
}
else
else
{
{
strUrl
=
config
.
socket_url
+
"/wss?sid="
+
sid
+
"&uid="
+
uid
+
"&msg="
+
strMsg
strUrl
=
config
.
socket_url
+
"/wss?sid="
+
sid
+
"&uid="
+
uid
+
"&msg="
+
strMsg
+
"&city="
+
_this
.
globalData
.
defaultCity
}
}
config
.
debug
==
1
?
console
.
log
(
"===initSocket_strUrl_"
+
strUrl
)
:
""
config
.
debug
==
1
?
console
.
log
(
"===initSocket_strUrl_"
+
strUrl
)
:
""
_this
.
globalData
.
socketTask
=
wx
.
connectSocket
({
_this
.
globalData
.
socketTask
=
wx
.
connectSocket
({
//此处 url 可以用来测试
//此处 url 可以用来测试
url
:
strUrl
,
url
:
strUrl
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
console
.
log
(
'===initSocket 创建成功'
,
res
)
console
.
log
(
'===initSocket 创建成功'
,
res
)
},
},
...
@@ -885,7 +886,25 @@ App({
...
@@ -885,7 +886,25 @@ App({
}
}
},
},
})
})
}
},
updateWatcherByRedis
:
function
(
sid
,
city
,
count
)
{
var
_this
=
this
;
console
.
log
(
"===this is updateWatcherByRedis"
);
//token信息
var
strUrl
=
config
.
redis_update_watcher_url
+
"?sid"
+
sid
+
"&city"
+
city
+
"&count"
+
count
wx
.
request
({
url
:
strUrl
,
method
:
'GET'
,
header
:
{
'content-type'
:
'application/json'
},
success
:
res
=>
{
console
.
log
(
"===this is updateWatcherByRedis success"
);
}
})
},
...
...
app/nyx-dev/app.json
查看文件 @
4f510b4b
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
},
},
{
{
"pagePath"
:
"pages/live/live-post/live-post"
,
"pagePath"
:
"pages/live/live-post/live-post"
,
"text"
:
"
添加
"
,
"text"
:
"
开播
"
,
"iconPath"
:
"./icon/add.png"
,
"iconPath"
:
"./icon/add.png"
,
"selectedIconPath"
:
"./icon/add.png"
"selectedIconPath"
:
"./icon/add.png"
},
},
...
...
app/nyx-dev/config.js
查看文件 @
4f510b4b
...
@@ -82,6 +82,7 @@ var config={
...
@@ -82,6 +82,7 @@ var config={
image_url
:
host_key
+
"/images/"
,
image_url
:
host_key
+
"/images/"
,
redis_update_like_url
:
host_key
+
"/api/nyx/redis/update/like"
,
redis_update_like_url
:
host_key
+
"/api/nyx/redis/update/like"
,
redis_query_like_url
:
host_key
+
"/api/nyx/redis/search/like"
,
redis_query_like_url
:
host_key
+
"/api/nyx/redis/search/like"
,
redis_update_watcher_url
:
host_key
+
"/api/nyx/redis/update/watcher"
,
live_query_url
:
host_key
+
"/api/nyx/live/query"
,
live_query_url
:
host_key
+
"/api/nyx/live/query"
,
live_add_url
:
host_key
+
"/api/nyx/live/add"
,
live_add_url
:
host_key
+
"/api/nyx/live/add"
,
}
}
...
...
app/nyx-dev/icon/live/editTitle.png
0 → 100644
查看文件 @
4f510b4b
3.47 KB
app/nyx-dev/icon/live/saveTitle.png
0 → 100644
查看文件 @
4f510b4b
9.39 KB
app/nyx-dev/pages/live/live-info/live-info.js
查看文件 @
4f510b4b
...
@@ -71,6 +71,8 @@ Page({
...
@@ -71,6 +71,8 @@ Page({
selected
:
'@'
,
selected
:
'@'
,
likeUrl
:
"../../../icon/activity/like_selected.png"
,
// like图标的url
likeUrl
:
"../../../icon/activity/like_selected.png"
,
// like图标的url
redUrl
:
"../../../icon/live/red.png"
,
// 在线图标的url
redUrl
:
"../../../icon/live/red.png"
,
// 在线图标的url
editUrl
:
"../../../icon/live/editTitle.png"
,
// 编辑图标的url
saveUrl
:
"../../../icon/live/saveTitle.png"
,
// 编辑图标的url
//directly to redis
//directly to redis
rankData_raw_like
:
{
rankData_raw_like
:
{
'@叁年间'
:
100
,
'@叁年间'
:
100
,
...
@@ -100,6 +102,10 @@ Page({
...
@@ -100,6 +102,10 @@ Page({
title
:
""
,
title
:
""
,
num_watcher
:
""
,
num_watcher
:
""
,
inputShowed
:
false
,
onlineCount
:
0
,
//当前sid的在线人数
editMode
:
0
,
//标题是否处于编辑状态
},
},
/**
/**
...
@@ -645,12 +651,19 @@ Page({
...
@@ -645,12 +651,19 @@ Page({
var
nickName
=
""
var
nickName
=
""
var
avater
=
""
var
avater
=
""
var
type
=
'txt'
var
type
=
'txt'
var
count
=
0
console
.
log
(
"====chatUserInfo, "
,
_this
.
data
.
chatUserInfo
)
console
.
log
(
"====chatUserInfo, "
,
_this
.
data
.
chatUserInfo
)
if
(
json
[
"cmd"
]
==
"onOpen"
||
json
[
"cmd"
]
==
"onScore"
)
{
if
(
json
[
"cmd"
]
==
"onOpen"
||
json
[
"cmd"
]
==
"onScore"
)
{
text
=
" "
+
_this
.
data
.
chatUserInfo
.
nickName
+
" "
+
json
[
"msg"
]
text
=
" "
+
_this
.
data
.
chatUserInfo
.
nickName
+
" "
+
json
[
"msg"
]
count
=
json
[
"count"
]
nickName
=
"系统"
nickName
=
"系统"
avater
=
"../../../icon/mall.png"
avater
=
"../../../icon/mall.png"
_this
.
processOpen
(
text
,
nickName
,
avater
)
_this
.
processOpen
(
text
,
count
,
nickName
,
avater
)
}
else
if
(
json
[
"cmd"
]
==
"onClose"
)
{
count
=
json
[
"count"
]
_this
.
processClose
(
count
)
}
}
else
if
(
json
[
"cmd"
]
==
"onData"
)
{
else
if
(
json
[
"cmd"
]
==
"onData"
)
{
...
@@ -801,7 +814,7 @@ Page({
...
@@ -801,7 +814,7 @@ Page({
},
},
//处理open的代码
//处理open的代码
processOpen
:
function
(
text
,
nickName
,
avater
)
processOpen
:
function
(
text
,
count
,
nickName
,
avater
)
{
{
var
_this
=
this
;
var
_this
=
this
;
//表情处理
//表情处理
...
@@ -838,11 +851,24 @@ Page({
...
@@ -838,11 +851,24 @@ Page({
messageList
:
newMessageArr
,
messageList
:
newMessageArr
,
isEmotion
:
false
,
isEmotion
:
false
,
isMedia
:
false
,
isMedia
:
false
,
onlineCount
:
count
,
})
})
_this
.
scrollBottom
();
_this
.
scrollBottom
();
},
},
//处理close的代码
processClose
:
function
(
count
)
{
var
_this
=
this
;
//更新数据(模拟请求历史数据)
_this
.
setData
({
onlineCount
:
count
,
})
},
//处理info data, main func
//处理info data, main func
/*
/*
type: 'txt'|'img'
type: 'txt'|'img'
...
@@ -992,7 +1018,23 @@ Page({
...
@@ -992,7 +1018,23 @@ Page({
_this
.
getRedisLike
(
strUrl
)
_this
.
getRedisLike
(
strUrl
)
},
},
//edit Title
editTitle
:
function
()
{
var
_this
=
this
;
var
editMode
=
"1"
_this
.
setData
({
editMode
})
},
//save Title
saveTitle
:
function
()
{
var
_this
=
this
;
var
editMode
=
"0"
_this
.
setData
({
editMode
})
}
})
})
...
...
app/nyx-dev/pages/live/live-info/live-info.wxml
查看文件 @
4f510b4b
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
<!-- start key view -->
<!-- start key view -->
<view class="page__hd" style="position:fixed; top:0;width: 100%;">
<view class="page__hd" style="position:fixed; top:0;width: 100%;">
<view class="tab-title">
<view class="tab-title">
<view class="{{selected=='@'?'border-tottom':'default'}}" id="@" bindtap="selected">
热度商家
榜</view>
<view class="{{selected=='@'?'border-tottom':'default'}}" id="@" bindtap="selected">
周贡
榜</view>
<view class="{{selected=='#'?'border-tottom':'default'}}" id="#" bindtap="selected">
活跃聊天室
</view>
<view class="{{selected=='#'?'border-tottom':'default'}}" id="#" bindtap="selected">
粉丝榜
</view>
</view>
</view>
<!-- start_of_tab-content -->
<!-- start_of_tab-content -->
<scroll-view scroll-y="true" scroll-top="0">
<scroll-view scroll-y="true" scroll-top="0">
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<view class="rank">
<view class="rank">
<view class="rank-left">{{item.name}}</view>
<view class="rank-left">{{item.name}}</view>
<view class="rank-right">
<view class="rank-right">
<view class="rank-row"><image src="{{likeUrl}}"></image> {{item.like}}
在线
</view>
<view class="rank-row"><image src="{{likeUrl}}"></image> {{item.like}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -30,9 +30,21 @@
...
@@ -30,9 +30,21 @@
<view style="height:{{chatHeight}}rpx;position:fixed; bottom:0; width:100%">
<view style="height:{{chatHeight}}rpx;position:fixed; bottom:0; width:100%">
<view class="weui-cell weui-cell_access">
<view class="weui-cell weui-cell_access">
<view class="live">
<view class="live">
<view class="live-left">{{title}}</view>
<view class="live-left">
<block wx:if="{{editMode=='0'}}" >
<view class="live-row" bindtap="editTitle">
{{title}}<image src="{{editUrl}}"></image>
</view>
</block>
<block wx:else>
<view class="live-row">
<input type="text" value="{{title}}" focus="true" style="background-color: #FFFFCC"/>
<image src="{{saveUrl}}" bindtap="saveTitle"></image>
</view>
</block>
</view>
<view class="live-right">
<view class="live-right">
<view class="live-row"><image src="{{redUrl}}"></image> {{
num_watcher
}}在线</view>
<view class="live-row"><image src="{{redUrl}}"></image> {{
onlineCount
}}在线</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
...
app/nyx-dev/pages/live/live-info/live-info.wxss
查看文件 @
4f510b4b
...
@@ -350,7 +350,7 @@ align-items: center;
...
@@ -350,7 +350,7 @@ align-items: center;
.live{width: 100%; display: flex; margin-top: 0rpx; align-items: center;margin-bottom: 12rpx;}
.live{width: 100%; display: flex; margin-top: 0rpx; align-items: center;margin-bottom: 12rpx;}
.live-left{width: 65%; }
.live-left{width: 65%; }
.live-right{width: 35%; display: flex;}
.live-right{width: 35%; display: flex;}
.live
-right
image{
.live image{
width: 40rpx;
width: 40rpx;
height: 40rpx;
height: 40rpx;
font-size: 0;
font-size: 0;
...
...
app/nyx-dev/pages/live/live.wxml
查看文件 @
4f510b4b
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
<view class="items">
<view class="items">
<navigator url="/pages/activity/activity-list/activity-list?city={{city}}">
<navigator url="/pages/activity/activity-list/activity-list?city={{city}}">
<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;">
排名: 1st
</text>
</navigator>
</navigator>
</view>
</view>
</block>
</block>
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
<view class="items">
<view class="items">
<navigator url="/pages/my/my-collects/my-collects">
<navigator url="/pages/my/my-collects/my-collects">
<image src="../../icon/my/fav.png" style="margin-top:10rpx; margin-bottom:-10rpx"></image>
<image src="../../icon/my/fav.png" style="margin-top:10rpx; margin-bottom:-10rpx"></image>
<text style="font-size:28rpx;">
我的收藏
</text>
<text style="font-size:28rpx;">
关注: 12.5k, +2300
</text>
</navigator>
</navigator>
</view>
</view>
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
<view class="items">
<view class="items">
<navigator url="/pages/my/my-orders/my-orders">
<navigator url="/pages/my/my-orders/my-orders">
<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>
<text style="font-size:28rpx;">
我的预订
</text>
<text style="font-size:28rpx;">
留言: 1302
</text>
</navigator>
</navigator>
</view>
</view>
...
...
app/nyx-dev/pages/share/share.js
查看文件 @
4f510b4b
...
@@ -96,6 +96,9 @@ Page({
...
@@ -96,6 +96,9 @@ Page({
bottom_val
:
0
,
bottom_val
:
0
,
pxToRpxScale
:
0
,
pxToRpxScale
:
0
,
tabBarHeight
:
0
,
tabBarHeight
:
0
,
//默认, input没有获取焦点事件,也没有键盘弹出
inputShowed
:
false
,
onlineCount
:
0
,
//当前sid的在线人数
},
},
...
@@ -454,6 +457,7 @@ Page({
...
@@ -454,6 +457,7 @@ Page({
isMedia
:
false
,
isMedia
:
false
,
isShowAdd
:
true
,
isShowAdd
:
true
,
showSend
:
false
,
showSend
:
false
,
inputShowed
:
true
,
})
})
self
.
scrollBottom
();
self
.
scrollBottom
();
},
},
...
@@ -627,14 +631,21 @@ Page({
...
@@ -627,14 +631,21 @@ Page({
var
nickName
=
""
var
nickName
=
""
var
avater
=
""
var
avater
=
""
var
type
=
'txt'
var
type
=
'txt'
var
count
=
0
console
.
log
(
"====chatUserInfo, "
,
_this
.
data
.
chatUserInfo
)
console
.
log
(
"====chatUserInfo, "
,
_this
.
data
.
chatUserInfo
)
if
(
json
[
"cmd"
]
==
"onOpen"
||
json
[
"cmd"
]
==
"onScore"
)
{
if
(
json
[
"cmd"
]
==
"onOpen"
||
json
[
"cmd"
]
==
"onScore"
)
{
text
=
" "
+
_this
.
data
.
chatUserInfo
.
nickName
+
" "
+
json
[
"msg"
]
text
=
" "
+
_this
.
data
.
chatUserInfo
.
nickName
+
" "
+
json
[
"msg"
]
count
=
json
[
"count"
]
nickName
=
"系统"
nickName
=
"系统"
avater
=
"../../icon/mall.png"
avater
=
"../../icon/mall.png"
_this
.
processOpen
(
text
,
nickName
,
avater
)
_this
.
processOpen
(
text
,
count
,
nickName
,
avater
)
}
}
else
if
(
json
[
"cmd"
]
==
"onClose"
)
{
count
=
json
[
"count"
]
_this
.
processClose
(
count
)
}
else
if
(
json
[
"cmd"
]
==
"onData"
)
{
else
if
(
json
[
"cmd"
]
==
"onData"
)
{
text
=
json
[
"msg"
]
text
=
json
[
"msg"
]
type
=
json
[
"type"
]
type
=
json
[
"type"
]
...
@@ -783,7 +794,7 @@ Page({
...
@@ -783,7 +794,7 @@ Page({
},
},
//处理open的代码
//处理open的代码
processOpen
:
function
(
text
,
nickName
,
avater
)
processOpen
:
function
(
text
,
count
,
nickName
,
avater
)
{
{
var
_this
=
this
;
var
_this
=
this
;
//表情处理
//表情处理
...
@@ -818,10 +829,22 @@ Page({
...
@@ -818,10 +829,22 @@ Page({
messageList
:
newMessageArr
,
messageList
:
newMessageArr
,
isEmotion
:
false
,
isEmotion
:
false
,
isMedia
:
false
,
isMedia
:
false
,
onlineCount
:
count
,
})
})
_this
.
scrollBottom
();
_this
.
scrollBottom
();
},
},
//处理close的代码
processClose
:
function
(
count
)
{
var
_this
=
this
;
//更新数据(模拟请求历史数据)
_this
.
setData
({
onlineCount
:
count
,
})
},
//处理info data, main func
//处理info data, main func
/*
/*
...
...
app/nyx-dev/pages/share/share.wxml
查看文件 @
4f510b4b
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
<view class="live">
<view class="live">
<view class="live-left">公屏发言</view>
<view class="live-left">公屏发言</view>
<view class="live-right">
<view class="live-right">
<view class="live-row"><image src="{{redUrl}}"></image>
100
在线</view>
<view class="live-row"><image src="{{redUrl}}"></image>
{{onlineCount}}
在线</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
<!-- 消息输入 -->
<!-- 消息输入 -->
<view class="message-input" style="position:absolute; bottom:{{bottom_val}}rpx">
<view class="message-input" style="position:absolute; bottom:{{bottom_val}}rpx">
<input class="{{isShowAdd?'':'showSend'}}" placeholder="请输入内容" type="text" value="{{messageInputVal}}" cursor-spacing="20" bindinput='messageInput' confirm-type="send" bindconfirm="messageSend" bindfocus="inputFocus" bindblur="inputBlur" adjust-position="{{false}}" />
<input class="{{isShowAdd?'':'showSend'}}" placeholder="请输入内容" type="text" value="{{messageInputVal}}" cursor-spacing="20" bindinput='messageInput' confirm-type="send" bindconfirm="messageSend" bindfocus="inputFocus" bindblur="inputBlur" adjust-position="{{false}}"
focus="{{inputShowed}}"
/>
<button bindtap="messageSend" wx:if="{{!isShowAdd}}">发送</button>
<button bindtap="messageSend" wx:if="{{!isShowAdd}}">发送</button>
<image mode="widthFix" class="input-img {{isShowAdd?'':'showAdd'}}" src='../../icon/chat/face1.png' id="face" bindtap="openEmotion"></image>
<image mode="widthFix" class="input-img {{isShowAdd?'':'showAdd'}}" src='../../icon/chat/face1.png' id="face" bindtap="openEmotion"></image>
<image mode="widthFix" class="input-img" wx:if="{{isShowAdd}}" src='../../icon/chat/add1.png' id="add" bindtap="openMedia"></image>
<image mode="widthFix" class="input-img" wx:if="{{isShowAdd}}" src='../../icon/chat/add1.png' id="add" bindtap="openMedia"></image>
...
...
app/nyx-dev/pages/share/share.wxss
查看文件 @
4f510b4b
...
@@ -329,10 +329,10 @@
...
@@ -329,10 +329,10 @@
.hidden{display:none;}
.hidden{display:none;}
/* rank-info */
/* rank-info */
.rank{width: 100%; display: flex; margin-top: 0rpx; align-items: center;
margin-bottom: 12rpx;
}
.rank{width: 100%; display: flex; margin-top: 0rpx; align-items: center;}
/* .rank-left{width: 50%; text-align: center;}
/* .rank-left{width: 50%; text-align: center;}
.rank-right{width: 50%; display: flex; justify-content: center;} */
.rank-right{width: 50%; display: flex; justify-content: center;} */
.rank-left{width: 50%; padding-left:100rpx;}
.rank-left{width: 50%; padding-left:100rpx;
margin-bottom: 12rpx;
}
.rank-right{width: 50%; display: flex; padding-left:100rpx;}
.rank-right{width: 50%; display: flex; padding-left:100rpx;}
.rank-right image{
.rank-right image{
width: 40rpx;
width: 40rpx;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论