Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jcy2004x
ShopXO
提交
840f1bc0
ShopXO
项目概览
jcy2004x
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
840f1bc0
编写于
4月 19, 2020
作者:
D
devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
小程序直播
上级
e7cb8fe1
变更
24
显示空白变更内容
内联
并排
Showing
24 changed file
with
851 addition
and
8 deletion
+851
-8
application/service/ResourcesService.php
application/service/ResourcesService.php
+43
-0
application/tags.php
application/tags.php
+9
-0
extend/base/Wechat.php
extend/base/Wechat.php
+1
-1
public/static/admin/default/css/article.css
public/static/admin/default/css/article.css
+1
-1
public/static/common/css/common.css
public/static/common/css/common.css
+6
-0
public/static/common/js/common.js
public/static/common/js/common.js
+3
-3
sourcecode/weixin/app.js
sourcecode/weixin/app.js
+2
-1
sourcecode/weixin/app.json
sourcecode/weixin/app.json
+10
-2
sourcecode/weixin/images/plugins/weixinliveplayer/player-icon.png
...de/weixin/images/plugins/weixinliveplayer/player-icon.png
+0
-0
sourcecode/weixin/images/plugins/weixinliveplayer/share-icon.png
...ode/weixin/images/plugins/weixinliveplayer/share-icon.png
+0
-0
sourcecode/weixin/images/plugins/weixinliveplayer/status-icon.png
...de/weixin/images/plugins/weixinliveplayer/status-icon.png
+0
-0
sourcecode/weixin/images/plugins/weixinliveplayer/time-icon.png
...code/weixin/images/plugins/weixinliveplayer/time-icon.png
+0
-0
sourcecode/weixin/pages/plugins/weixinliveplayer/detail/detail.js
...de/weixin/pages/plugins/weixinliveplayer/detail/detail.js
+160
-0
sourcecode/weixin/pages/plugins/weixinliveplayer/detail/detail.json
.../weixin/pages/plugins/weixinliveplayer/detail/detail.json
+4
-0
sourcecode/weixin/pages/plugins/weixinliveplayer/detail/detail.wxml
.../weixin/pages/plugins/weixinliveplayer/detail/detail.wxml
+43
-0
sourcecode/weixin/pages/plugins/weixinliveplayer/detail/detail.wxss
.../weixin/pages/plugins/weixinliveplayer/detail/detail.wxss
+82
-0
sourcecode/weixin/pages/plugins/weixinliveplayer/index/index.js
...code/weixin/pages/plugins/weixinliveplayer/index/index.js
+98
-0
sourcecode/weixin/pages/plugins/weixinliveplayer/index/index.json
...de/weixin/pages/plugins/weixinliveplayer/index/index.json
+7
-0
sourcecode/weixin/pages/plugins/weixinliveplayer/index/index.wxml
...de/weixin/pages/plugins/weixinliveplayer/index/index.wxml
+36
-0
sourcecode/weixin/pages/plugins/weixinliveplayer/index/index.wxss
...de/weixin/pages/plugins/weixinliveplayer/index/index.wxss
+73
-0
sourcecode/weixin/pages/plugins/weixinliveplayer/search/search.js
...de/weixin/pages/plugins/weixinliveplayer/search/search.js
+163
-0
sourcecode/weixin/pages/plugins/weixinliveplayer/search/search.json
.../weixin/pages/plugins/weixinliveplayer/search/search.json
+4
-0
sourcecode/weixin/pages/plugins/weixinliveplayer/search/search.wxml
.../weixin/pages/plugins/weixinliveplayer/search/search.wxml
+34
-0
sourcecode/weixin/pages/plugins/weixinliveplayer/search/search.wxss
.../weixin/pages/plugins/weixinliveplayer/search/search.wxss
+72
-0
未找到文件。
application/service/ResourcesService.php
浏览文件 @
840f1bc0
...
...
@@ -107,6 +107,49 @@ class ResourcesService
return
''
;
}
/**
* 相对路径文件新增
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-04-16
* @desc description
* @param [string] $value [相对路径文件 /static 开头]
* @param [string] $path_type [文件存储路径]
*/
public
static
function
AttachmentPathAdd
(
$value
,
$path_type
)
{
// 文件是否存在
$file
=
ROOT
.
'public'
.
$value
;
if
(
!
file_exists
(
$file
))
{
return
DataReturn
(
'文件不存在'
,
-
1
);
}
// 配置信息
$config
=
config
(
'ueditor.'
);
// 文件信息
$info
=
pathinfo
(
$file
);
$title
=
empty
(
$info
[
'basename'
])
?
substr
(
strrchr
(
$file
,
'/'
),
1
)
:
$info
[
'basename'
];
$ext
=
strtolower
(
strrchr
(
$file
,
'.'
));
$type
=
in_array
(
$ext
,
$config
[
'imageAllowFiles'
])
?
'image'
:
(
in_array
(
$ext
,
$config
[
'videoAllowFiles'
])
?
'video'
:
'file'
);
// 添加文件
$data
=
[
"url"
=>
$value
,
"path"
=>
$file
,
"title"
=>
$title
,
"original"
=>
$title
,
"ext"
=>
$ext
,
"size"
=>
filesize
(
$file
),
'type'
=>
$type
,
"hash"
=>
hash_file
(
'sha256'
,
$file
,
false
),
'path_type'
=>
$path_type
,
];
return
self
::
AttachmentAdd
(
$data
);
}
/**
* 附件添加
* @author Devil
...
...
application/tags.php
浏览文件 @
840f1bc0
...
...
@@ -57,11 +57,19 @@ return array (
array
(
0
=>
'app\\plugins\\orderexportprint\\Hook'
,
),
'plugins_view_admin_order_top_operation'
=>
array
(
0
=>
'app\\plugins\\orderexportprint\\Hook'
,
),
'plugins_view_admin_order_list_operate'
=>
array
(
0
=>
'app\\plugins\\orderexportprint\\Hook'
,
1
=>
'app\\plugins\\orderpricerevision\\Hook'
,
),
'plugins_view_admin_order_list_operation'
=>
array
(
0
=>
'app\\plugins\\orderexportprint\\Hook'
,
),
'plugins_view_user_login_info_top'
=>
array
(
0
=>
'app\\plugins\\weixinwebauthorization\\Hook'
,
...
...
@@ -146,6 +154,7 @@ return array (
0
=>
'app\\plugins\\coupon\\Hook'
,
1
=>
'app\\plugins\\membershiplevelvip\\Hook'
,
2
=>
'app\\plugins\\speedplaceorder\\Hook'
,
3
=>
'app\\plugins\\weixinliveplayer\\Hook'
,
),
'plugins_view_buy_goods_bottom'
=>
array
(
...
...
extend/base/Wechat.php
浏览文件 @
840f1bc0
...
...
@@ -186,7 +186,7 @@ class Wechat
* @version 1.0.0
* @datetime 2018-01-02T19:53:42+0800
*/
p
rivate
function
GetMiniAccessToken
()
p
ublic
function
GetMiniAccessToken
()
{
// 缓存key
$key
=
$this
->
_appid
.
'_access_token'
;
...
...
public/static/admin/default/css/article.css
浏览文件 @
840f1bc0
/**
* 编辑/添加页面
*/
.colorpicker-submit
img
{
width
:
18px
;
height
:
18px
;
}
\ No newline at end of file
.colorpicker-submit
img
{
width
:
16px
;
height
:
16px
;
}
\ No newline at end of file
public/static/common/css/common.css
浏览文件 @
840f1bc0
...
...
@@ -276,6 +276,12 @@ button.colorpicker-submit:active {
-webkit-box-shadow
:
inset
0
3px
5px
rgba
(
0
,
0
,
0
,
0.15
);
box-shadow
:
inset
0
3px
5px
rgba
(
255
,
255
,
255
,
0.15
);
}
button
.colorpicker-submit
img
{
margin-right
:
7px
;
width
:
14px
;
height
:
14px
;
float
:
right
;
}
/**
...
...
public/static/common/js/common.js
浏览文件 @
840f1bc0
...
...
@@ -777,7 +777,7 @@ function ModalLoad(url, title, tag, class_tag)
var
html
=
'
<div class="am-popup popup-iframe
'
+
class_tag
+
'
" id="
'
+
tag
+
'
">
'
;
html
+=
'
<div class="am-popup-inner">
'
;
html
+=
'
<div class="am-popup-hd">
'
;
html
+=
'
<h4 class="am-popup-title">
'
+
(
title
||
'
温馨提示
'
)
+
'
</h4>
'
;
html
+=
'
<h4 class="am-popup-title">
'
+
(
title
||
'
详情
'
)
+
'
</h4>
'
;
html
+=
'
<span data-am-modal-close class="am-close">×</span>
'
;
html
+=
'
</div>
'
;
html
+=
'
<iframe src="
'
+
url
+
'
" width="100%" height="100%"></iframe>
'
;
...
...
@@ -1571,7 +1571,7 @@ function TableContainerInit()
var
first_width
=
$
(
this
).
find
(
'
th
'
).
first
().
data
(
'
width
'
)
||
$
(
this
).
find
(
'
th
'
).
first
().
innerWidth
();
if
(
first_width
>
0
)
{
$
(
this
).
find
(
'
th
'
).
eq
(
1
).
css
(
'
min-width
'
,
(
$
(
this
).
find
(
'
th
'
).
eq
(
1
).
innerWidth
(
)
+
first_width
)
+
'
px
'
);
$
(
this
).
find
(
'
th
'
).
eq
(
1
).
css
(
'
min-width
'
,
(
(
$
(
this
).
find
(
'
th
'
).
eq
(
1
).
data
(
'
width
'
)
||
0
)
+
first_width
)
+
'
px
'
);
$
(
this
).
find
(
'
th
'
).
eq
(
1
).
css
(
'
padding-left
'
,
(
first_width
+
10
)
+
'
px
'
);
}
}
...
...
@@ -1589,7 +1589,7 @@ function TableContainerInit()
var
last_width
=
$
(
this
).
find
(
'
th
'
).
last
().
data
(
'
width
'
)
||
$
(
this
).
find
(
'
th
'
).
last
().
innerWidth
();
if
(
last_width
>
0
)
{
$
(
this
).
find
(
'
th
'
).
eq
(
-
2
).
css
(
'
min-width
'
,
(
$
(
this
).
find
(
'
th
'
).
eq
(
-
2
).
innerWidth
(
)
+
last_width
)
+
'
px
'
);
$
(
this
).
find
(
'
th
'
).
eq
(
-
2
).
css
(
'
min-width
'
,
(
(
$
(
this
).
find
(
'
th
'
).
eq
(
-
2
).
data
(
'
width
'
)
||
0
)
+
last_width
)
+
'
px
'
);
$
(
this
).
find
(
'
th
'
).
eq
(
-
2
).
css
(
'
padding-right
'
,
(
last_width
+
10
)
+
'
px
'
);
}
}
...
...
sourcecode/weixin/app.js
浏览文件 @
840f1bc0
...
...
@@ -75,7 +75,8 @@ App({
application_describe
:
"
{{application_describe}}
"
,
// 价格符号
price_symbol
:
"
{{price_symbol}}
"
price_symbol
:
"
{{price_symbol}}
"
,
price_symbol
:
"
¥
"
,
},
/**
...
...
sourcecode/weixin/app.json
浏览文件 @
840f1bc0
...
...
@@ -63,7 +63,10 @@
"pages/plugins/wallet/user-cash/user-cash"
,
"pages/plugins/wallet/user-cash-detail/user-cash-detail"
,
"pages/plugins/excellentbuyreturntocash/profit/profit"
,
"pages/plugins/excellentbuyreturntocash/profit-detail/profit-detail"
"pages/plugins/excellentbuyreturntocash/profit-detail/profit-detail"
,
"pages/plugins/weixinliveplayer/index/index"
,
"pages/plugins/weixinliveplayer/search/search"
,
"pages/plugins/weixinliveplayer/detail/detail"
],
"permission"
:
{
"scope.userLocation"
:
{
...
...
@@ -111,7 +114,12 @@
"request"
:
10000
,
"downloadFile"
:
10000
},
"plugins"
:
{},
"plugins"
:
{
"live-player-plugin"
:
{
"version"
:
"1.0.5"
,
"provider"
:
"wx2b03c6e691cd7370"
}
},
"debug"
:
true
,
"sitemapLocation"
:
"sitemap.json"
}
\ No newline at end of file
sourcecode/weixin/images/plugins/weixinliveplayer/player-icon.png
0 → 100644
浏览文件 @
840f1bc0
1.7 KB
sourcecode/weixin/images/plugins/weixinliveplayer/share-icon.png
0 → 100644
浏览文件 @
840f1bc0
1.7 KB
sourcecode/weixin/images/plugins/weixinliveplayer/status-icon.png
0 → 100644
浏览文件 @
840f1bc0
1.3 KB
sourcecode/weixin/images/plugins/weixinliveplayer/time-icon.png
0 → 100644
浏览文件 @
840f1bc0
2.8 KB
sourcecode/weixin/pages/plugins/weixinliveplayer/detail/detail.js
0 → 100644
浏览文件 @
840f1bc0
const
app
=
getApp
();
Page
({
data
:
{
params
:
null
,
data_list_loding_status
:
1
,
data_list_loding_msg
:
''
,
data_bottom_line_status
:
false
,
detail
:
null
,
},
onLoad
(
params
)
{
// 启动参数处理
params
=
app
.
launch_params_handle
(
params
);
//params['id'] = 1;
this
.
setData
({
params
:
params
});
this
.
init
();
},
onShow
()
{},
init
()
{
var
self
=
this
;
wx
.
showLoading
({
title
:
"
加载中...
"
});
this
.
setData
({
data_list_loding_status
:
1
});
wx
.
request
({
url
:
app
.
get_request_url
(
"
detail
"
,
"
search
"
,
"
weixinliveplayer
"
),
method
:
"
POST
"
,
data
:
{
id
:
this
.
data
.
params
.
id
},
dataType
:
"
json
"
,
success
:
res
=>
{
wx
.
hideLoading
();
wx
.
stopPullDownRefresh
();
if
(
res
.
data
.
code
==
0
)
{
var
data
=
res
.
data
.
data
;
self
.
setData
({
detail
:
data
.
data
,
data_list_loding_status
:
3
,
data_bottom_line_status
:
true
,
data_list_loding_msg
:
''
,
});
// 标题
wx
.
setNavigationBarTitle
({
title
:
data
.
data
.
name
});
}
else
{
self
.
setData
({
data_list_loding_status
:
2
,
data_bottom_line_status
:
false
,
data_list_loding_msg
:
res
.
data
.
msg
,
});
app
.
showToast
(
res
.
data
.
msg
);
}
},
fail
:
()
=>
{
wx
.
hideLoading
();
wx
.
stopPullDownRefresh
();
self
.
setData
({
data_list_loding_status
:
2
,
data_bottom_line_status
:
false
,
data_list_loding_msg
:
'
服务器请求出错
'
,
});
app
.
showToast
(
"
服务器请求出错
"
);
}
});
},
// 下拉刷新
onPullDownRefresh
()
{
this
.
init
();
},
// 详情图片查看
detail_images_view_event
(
e
)
{
var
value
=
e
.
currentTarget
.
dataset
.
value
||
null
;
if
(
value
!=
null
)
{
wx
.
previewImage
({
current
:
value
,
urls
:
[
value
]
});
}
},
// 进入直播
player_event
(
e
)
{
if
((
this
.
data
.
detail
||
null
)
!=
null
)
{
if
(
this
.
data
.
detail
.
status
==
1
||
this
.
data
.
detail
.
status
==
2
)
{
var
room_id
=
this
.
data
.
detail
.
id
var
params
=
encodeURIComponent
(
JSON
.
stringify
({
type
:
'
detail
'
}));
wx
.
navigateTo
({
url
:
`plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=
${
this
.
data
.
detail
.
id
}
&custom_params=
${
params
}
`
});
}
}
else
{
app
.
showToast
(
'
数据有误
'
);
}
},
// 海报分享
share_event
()
{
var
user
=
app
.
get_user_info
(
this
,
'
poster_event
'
);
if
(
user
!=
false
)
{
// 用户未绑定用户则转到登录页面
if
(
app
.
user_is_need_login
(
user
))
{
wx
.
navigateTo
({
url
:
"
/pages/login/login?event_callback=poster_event
"
});
return
false
;
}
else
{
wx
.
showLoading
({
title
:
'
生成中...
'
});
wx
.
request
({
url
:
app
.
get_request_url
(
'
poster
'
,
'
index
'
,
'
weixinliveplayer
'
),
method
:
'
POST
'
,
data
:
{
"
id
"
:
this
.
data
.
detail
.
id
},
dataType
:
'
json
'
,
success
:
(
res
)
=>
{
wx
.
hideLoading
();
if
(
res
.
data
.
code
==
0
)
{
wx
.
previewImage
({
current
:
res
.
data
.
data
,
urls
:
[
res
.
data
.
data
]
});
}
else
{
app
.
showToast
(
res
.
data
.
msg
);
}
},
fail
:
()
=>
{
wx
.
hideLoading
();
app
.
showToast
(
"
服务器请求出错
"
);
}
});
}
}
},
// 自定义分享
onShareAppMessage
()
{
var
user
=
app
.
get_user_cache_info
()
||
null
;
var
user_id
=
(
user
!=
null
&&
(
user
.
id
||
null
)
!=
null
)
?
user
.
id
:
0
;
if
((
this
.
data
.
detail
||
null
)
==
null
)
{
var
did
=
this
.
data
.
detail
.
id
;
var
name
=
this
.
data
.
detail
.
name
;
}
else
{
var
did
=
0
;
var
name
=
''
;
}
return
{
title
:
app
.
data
.
application_title
+
name
,
desc
:
app
.
data
.
application_describe
,
path
:
'
/pages/plugins/weixinliveplayer/detail/detail?id=
'
+
did
+
'
&referrer=
'
+
user_id
};
},
});
\ No newline at end of file
sourcecode/weixin/pages/plugins/weixinliveplayer/detail/detail.json
0 → 100644
浏览文件 @
840f1bc0
{
"enablePullDownRefresh"
:
true
,
"navigationBarTitleText"
:
"直播详情"
}
\ No newline at end of file
sourcecode/weixin/pages/plugins/weixinliveplayer/detail/detail.wxml
0 → 100644
浏览文件 @
840f1bc0
<view wx:if="{{detail != null}}" class="detail">
<!-- 封面图片 -->
<image wx:if="{{(detail || null) != null && (detail.share_img || null) != null}}" class="banner wh-auto dis-block" src="{{detail.share_img}}" mode="widthFix" bindtap="detail_images_view_event" data-value="{{detail.share_img}}" />
<!-- 标题 -->
<view class="name">{{detail.name}}</view>
<!-- 基础信息 -->
<view class="bg-white base">
<view class="item">
<image class="item-icon" src="/images/plugins/weixinliveplayer/status-icon.png" mode="widthFix" />
<text class="cr-888">直播状态</text>
<view class="fr more status-{{detail.status}}">{{detail.status_name}}</view>
</view>
<view class="item br-t item-time">
<image class="item-icon" src="/images/plugins/weixinliveplayer/time-icon.png" mode="widthFix" />
<text class="cr-888">开播时间</text>
<view class="fr time">
<view class="start-time">{{detail.start_time}}</view>
<view class="end-time">{{detail.end_time}}</view>
</view>
</view>
</view>
<!-- 导航 -->
<view class="nav wh-auto">
<button type="primary" class="share-submit fl" hover-class="none" bindtap="share_event">
<image class="item-icon" src="/images/plugins/weixinliveplayer/share-icon.png" mode="widthFix" />
<text>分享</text>
</button>
<button type="default" class="player-submit fr {{detail.status == 1 || detail.status == 2 ? '' : 'disabled'}}" hover-class="none" bindtap="player_event">
<image class="item-icon" src="/images/plugins/weixinliveplayer/player-icon.png" mode="widthFix" />
<text>{{detail.status_name}}</text>
</button>
</view>
<import src="/pages/common/bottom_line.wxml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</view>
<view wx:else>
<import src="/pages/common/nodata.wxml" />
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
</view>
\ No newline at end of file
sourcecode/weixin/pages/plugins/weixinliveplayer/detail/detail.wxss
0 → 100644
浏览文件 @
840f1bc0
/**
* 内容
*/
.detail {
padding-bottom: 100rpx;
}
.name {
font-size: 32rpx;
line-height: 44rpx;
font-weight: 500;
padding: 15rpx 10rpx;
}
.base {
overflow: hidden;
position: relative;
padding: 15rpx 10rpx 0 10rpx;
}
.base .item {
line-height: 50rpx;
padding: 20rpx 0;
}
.base .item .item-icon {
width: 35rpx;
height: 35rpx;
vertical-align: middle;
margin-right: 10rpx;
}
.base .item .more {
color: #999;
}
.base .item .status-0 {
color: #0e90d2;
}
.base .item .status-1 {
color: #5eb95e;
}
.base .item .status-2 {
color: #F37B1D;
}
.base .item-time {
line-height: 75rpx;
}
.base .item-time .time {
line-height: 38rpx;
}
.base .item-time .start-time {
color: #5eb95e;
}
.base .item-time .end-time {
color: #dd514c;
}
/**
* 导航
*/
.nav {
position: fixed;
left: 0;
bottom: 0;
overflow: hidden;
height: 100rpx;
}
.nav button {
width: 50%;
height: 100% !important;
border-radius: 0;
font-size: 32rpx;
line-height: 100rpx;
}
.nav button image {
width: 40rpx;
height: 40rpx !important;
vertical-align: middle;
margin-right: 10rpx;
}
.nav button.player-submit {
background: #d2364c;
color: #fff;
}
.nav button.disabled {
background: #ffc5cd;
}
\ No newline at end of file
sourcecode/weixin/pages/plugins/weixinliveplayer/index/index.js
0 → 100644
浏览文件 @
840f1bc0
const
app
=
getApp
();
Page
({
data
:
{
load_status
:
0
,
data_list_loding_status
:
1
,
data_bottom_line_status
:
false
,
data_list_loding_msg
:
''
,
data_list
:
[],
data_base
:
null
,
banner_list
:
[],
},
onLoad
(
params
)
{
// 启动参数处理
params
=
app
.
launch_params_handle
(
params
);
this
.
init
();
},
onShow
()
{},
init
()
{
// 获取数据
this
.
get_data_list
();
},
// 获取数据
get_data_list
()
{
var
self
=
this
;
// 加载loding
wx
.
showLoading
({
title
:
"
加载中...
"
});
this
.
setData
({
data_list_loding_status
:
1
,
});
wx
.
request
({
url
:
app
.
get_request_url
(
"
index
"
,
"
index
"
,
"
weixinliveplayer
"
),
method
:
"
POST
"
,
data
:
{},
dataType
:
"
json
"
,
success
:
res
=>
{
wx
.
hideLoading
();
wx
.
stopPullDownRefresh
();
self
.
setData
({
load_status
:
1
});
if
(
res
.
data
.
code
==
0
)
{
var
data
=
res
.
data
.
data
;
var
status
=
((
data
.
data
||
null
)
==
null
||
data
.
data
.
length
==
0
);
this
.
setData
({
data_base
:
data
.
base
||
null
,
banner_list
:
data
.
banner_list
||
[],
data_list
:
data
.
data
,
data_list_loding_status
:
status
?
0
:
3
,
data_bottom_line_status
:
!
status
,
});
// 导航名称
if
((
data
.
base
||
null
)
!=
null
&&
(
data
.
base
.
application_name
||
null
)
!=
null
)
{
wx
.
setNavigationBarTitle
({
title
:
data
.
base
.
application_name
});
}
}
else
{
self
.
setData
({
data_bottom_line_status
:
true
,
data_list_loding_status
:
2
,
data_list_loding_msg
:
res
.
data
.
msg
,
});
app
.
showToast
(
res
.
data
.
msg
);
}
},
fail
:
()
=>
{
wx
.
hideLoading
();
wx
.
stopPullDownRefresh
();
self
.
setData
({
data_bottom_line_status
:
false
,
data_list_loding_status
:
2
,
data_list_loding_msg
:
'
服务器请求出错
'
,
});
}
});
},
// 下拉刷新
onPullDownRefresh
()
{
this
.
init
();
},
// 自定义分享
onShareAppMessage
()
{
var
user
=
app
.
get_user_cache_info
()
||
null
;
var
user_id
=
(
user
!=
null
&&
(
user
.
id
||
null
)
!=
null
)
?
user
.
id
:
0
;
return
{
title
:
app
.
data
.
application_title
,
desc
:
app
.
data
.
application_describe
,
path
:
'
/pages/plugins/weixinliveplayer/index/index?referrer=
'
+
user_id
};
},
});
\ No newline at end of file
sourcecode/weixin/pages/plugins/weixinliveplayer/index/index.json
0 → 100644
浏览文件 @
840f1bc0
{
"enablePullDownRefresh"
:
true
,
"navigationBarTitleText"
:
"直播"
,
"usingComponents"
:
{
"component-banner"
:
"/components/slider/slider"
}
}
\ No newline at end of file
sourcecode/weixin/pages/plugins/weixinliveplayer/index/index.wxml
0 → 100644
浏览文件 @
840f1bc0
<!-- 轮播 -->
<component-banner prop-data="{{banner_list}}"></component-banner>
<!-- 导航 -->
<view wx:if="{{load_status == 1}}" class="nav bg-white spacing-mb">
<view class="title">最新直播</view>
<navigator url="/pages/plugins/weixinliveplayer/search/search" hover-class="none">
<view class="arrow-right more">查看更多</view>
</navigator>
</view>
<!-- 数据列表 -->
<view wx:if="{{data_list.length > 0}}" class="data-list">
<view wx:for="{{data_list}}" wx:key="key" wx:for-item="item" class="item bg-white spacing-mb">
<navigator url="/pages/plugins/weixinliveplayer/detail/detail?id={{item.id}}" hover-class="none">
<image src="{{item.share_img}}" mode="aspectFit" class="fl" />
<view class="fl base">
<view class="single-text name">{{item.name}}</view>
<view class="time">
<view class="fl time-title">开播时间</view>
<view class="start-time">{{item.start_time}}</view>
<view class="end-time">{{item.end_time}}</view>
</view>
<view class="status status-{{item.status}}">{{item.status_name}}</view>
</view>
</navigator>
</view>
</view>
<view wx:else>
<import src="/pages/common/nodata.wxml" />
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
</view>
<!-- 结尾 -->
<import src="/pages/common/bottom_line.wxml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
\ No newline at end of file
sourcecode/weixin/pages/plugins/weixinliveplayer/index/index.wxss
0 → 100644
浏览文件 @
840f1bc0
/*
* 导航
*/
.nav {
padding: 20rpx 10rpx;
position: relative;
border-bottom: 1px solid #eee;
}
.nav .title {
font-size: 32rpx;
}
.nav .more {
position: absolute;
top: 22rpx;
right: 10rpx;
color: #888;
padding-right: 15px;
}
/**
* 数据列表
*/
.data-list .item {
overflow: hidden;
padding: 20rpx 10rpx;
position: relative;
}
.data-list .item image {
width: 160rpx;
height: 160rpx !important;
}
.data-list .item .base {
width: calc(100% - 190rpx);
text-align: left;
padding: 0 10rpx 0 20rpx;
}
.data-list .item .base .name {
font-size: 32rpx;
}
.data-list .item .base .time {
margin-top: 25rpx;
}
.data-list .item .base .time-title {
width: 60rpx;
background: #7ad2ff;
color: #fff;
text-align: center;
padding: 10rpx;
line-height: 30rpx;
border-radius: 6rpx;
margin-right: 10rpx;
}
.data-list .item .base .start-time {
color: #5eb95e;
}
.data-list .item .base .end-time {
color: #dd514c;
}
.data-list .item .base .status {
position: absolute;
right: 10rpx;
bottom: 20rpx;
color: #999;
}
.data-list .item .base .status-0 {
color: #0e90d2;
}
.data-list .item .base .status-1 {
color: #5eb95e;
}
.data-list .item .base .status-2 {
color: #F37B1D;
}
\ No newline at end of file
sourcecode/weixin/pages/plugins/weixinliveplayer/search/search.js
0 → 100644
浏览文件 @
840f1bc0
const
app
=
getApp
();
Page
({
data
:
{
data_list
:
[],
data_page_total
:
0
,
data_page
:
1
,
data_list_loding_status
:
1
,
data_bottom_line_status
:
false
,
params
:
null
,
nav_status_list
:
[
{
name
:
"
全部
"
,
value
:
"
-1
"
},
{
name
:
"
未开始
"
,
value
:
"
0
"
},
{
name
:
"
直播中
"
,
value
:
"
1
"
},
{
name
:
"
暂停中
"
,
value
:
"
2
"
},
{
name
:
"
已结束
"
,
value
:
"
3
"
},
],
nav_status_index
:
0
,
},
onLoad
(
params
)
{
// 启动参数处理
params
=
app
.
launch_params_handle
(
params
);
// 是否指定状态
var
nav_status_index
=
0
;
if
((
params
.
status
||
null
)
!=
null
)
{
for
(
var
i
in
this
.
data
.
nav_status_list
)
{
if
(
this
.
data
.
nav_status_list
[
i
][
'
value
'
]
==
params
.
status
)
{
nav_status_index
=
i
;
break
;
}
}
}
this
.
setData
({
params
:
params
,
nav_status_index
:
nav_status_index
,
});
this
.
init
();
},
onShow
()
{},
init
()
{
// 获取数据
this
.
get_data_list
();
},
// 获取数据
get_data_list
(
is_mandatory
)
{
// 分页是否还有数据
if
((
is_mandatory
||
0
)
==
0
)
{
if
(
this
.
data
.
data_bottom_line_status
==
true
)
{
return
false
;
}
}
// 加载loding
wx
.
showLoading
({
title
:
"
加载中...
"
});
this
.
setData
({
data_list_loding_status
:
1
});
// 参数
var
status
=
((
this
.
data
.
nav_status_list
[
this
.
data
.
nav_status_index
]
||
null
)
==
null
)
?
-
1
:
this
.
data
.
nav_status_list
[
this
.
data
.
nav_status_index
][
'
value
'
];
// 获取数据
wx
.
request
({
url
:
app
.
get_request_url
(
"
index
"
,
"
search
"
,
"
weixinliveplayer
"
),
method
:
"
POST
"
,
data
:
{
page
:
this
.
data
.
data_page
,
status
:
status
,
is_more
:
1
,
},
dataType
:
"
json
"
,
success
:
res
=>
{
wx
.
hideLoading
();
wx
.
stopPullDownRefresh
();
if
(
res
.
data
.
code
==
0
)
{
if
(
res
.
data
.
data
.
data
.
length
>
0
)
{
if
(
this
.
data
.
data_page
<=
1
)
{
var
temp_data_list
=
res
.
data
.
data
.
data
;
}
else
{
var
temp_data_list
=
this
.
data
.
data_list
;
var
temp_data
=
res
.
data
.
data
.
data
;
for
(
var
i
in
temp_data
)
{
temp_data_list
.
push
(
temp_data
[
i
]);
}
}
this
.
setData
({
data_list
:
temp_data_list
,
data_total
:
res
.
data
.
data
.
total
,
data_page_total
:
res
.
data
.
data
.
page_total
,
data_list_loding_status
:
3
,
data_page
:
this
.
data
.
data_page
+
1
,
});
// 是否还有数据
if
(
this
.
data
.
data_page
>
1
&&
this
.
data
.
data_page
>
this
.
data
.
data_page_total
)
{
this
.
setData
({
data_bottom_line_status
:
true
});
}
else
{
this
.
setData
({
data_bottom_line_status
:
false
});
}
}
else
{
this
.
setData
({
data_list_loding_status
:
0
,
data_list
:
[],
data_bottom_line_status
:
false
,
});
}
}
else
{
this
.
setData
({
data_list_loding_status
:
0
,
});
app
.
showToast
(
res
.
data
.
msg
);
}
},
fail
:
()
=>
{
wx
.
hideLoading
();
wx
.
stopPullDownRefresh
();
this
.
setData
({
data_list_loding_status
:
2
,
});
app
.
showToast
(
"
服务器请求出错
"
);
}
});
},
// 下拉刷新
onPullDownRefresh
()
{
this
.
setData
({
data_page
:
1
});
this
.
get_data_list
(
1
);
},
// 滚动加载
scroll_lower
(
e
)
{
this
.
get_data_list
();
},
// 导航事件
nav_event
(
e
)
{
this
.
setData
({
nav_status_index
:
e
.
currentTarget
.
dataset
.
index
||
0
,
data_page
:
1
,
});
this
.
get_data_list
(
1
);
},
// 自定义分享
onShareAppMessage
()
{
var
user
=
app
.
get_user_cache_info
()
||
null
;
var
user_id
=
(
user
!=
null
&&
(
user
.
id
||
null
)
!=
null
)
?
user
.
id
:
0
;
return
{
title
:
app
.
data
.
application_title
,
desc
:
app
.
data
.
application_describe
,
path
:
'
/pages/plugins/weixinliveplayer/search/search?referrer=
'
+
user_id
};
},
});
\ No newline at end of file
sourcecode/weixin/pages/plugins/weixinliveplayer/search/search.json
0 → 100644
浏览文件 @
840f1bc0
{
"enablePullDownRefresh"
:
true
,
"navigationBarTitleText"
:
"直播列表"
}
\ No newline at end of file
sourcecode/weixin/pages/plugins/weixinliveplayer/search/search.wxml
0 → 100644
浏览文件 @
840f1bc0
<!-- 导航 -->
<view class="nav">
<block wx:for="{{nav_status_list}}" wx:key="key">
<view class="item fl tc cr-888 {{nav_status_index == index ? 'active' : ''}}" data-index="{{index}}" bindtap="nav_event">{{item.name}}</view>
</block>
</view>
<!-- 列表 -->
<scroll-view scroll-y="{{true}}" class="scroll-box" bindscrolltolower="scroll_lower" lower-threshold="30">
<view wx:if="{{data_list.length > 0}}" class="data-list">
<view wx:for="{{data_list}}" wx:key="key" wx:for-item="item" class="item bg-white spacing-mb">
<navigator url="/pages/plugins/weixinliveplayer/detail/detail?id={{item.id}}" hover-class="none">
<image src="{{item.share_img}}" mode="aspectFit" class="fl" />
<view class="base fl">
<view class="single-text name">{{item.name}}</view>
<view class="time">
<view class="time-title fl">开播时间</view>
<view class="start-time">{{item.start_time}}</view>
<view class="end-time">{{item.end_time}}</view>
</view>
<view class="status status-{{item.status}}">{{item.status_name}}</view>
</view>
</navigator>
</view>
</view>
<view wx:else>
<import src="/pages/common/nodata.wxml" />
<template is="nodata" data="{{status: data_list_loding_status}}">
</template>
</view>
<import src="/pages/common/bottom_line.wxml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</scroll-view>
\ No newline at end of file
sourcecode/weixin/pages/plugins/weixinliveplayer/search/search.wxss
0 → 100644
浏览文件 @
840f1bc0
/*
* 导航
*/
.nav {
background: #eee;
height: 80rpx;
line-height: 80rpx;
}
.nav .item {
width: 20%;
}
.nav .active {
color: #d2364c;
}
/**
* 数据列表
*/
.scroll-box {
height: calc(100vh - 80rpx);
}
.data-list .item {
overflow: hidden;
padding: 20rpx 10rpx;
position: relative;
}
.data-list .item image {
width: 160rpx;
height: 160rpx !important;
}
.data-list .item .base {
width: calc(100% - 190rpx);
text-align: left;
padding: 0 10rpx 0 20rpx;
}
.data-list .item .base .name {
font-size: 32rpx;
}
.data-list .item .base .time {
margin-top: 25rpx;
}
.data-list .item .base .time-title {
width: 60rpx;
background: #7ad2ff;
color: #fff;
text-align: center;
padding: 10rpx;
line-height: 30rpx;
border-radius: 6rpx;
margin-right: 10rpx;
}
.data-list .item .base .start-time {
color: #5eb95e;
}
.data-list .item .base .end-time {
color: #dd514c;
}
.data-list .item .base .status {
position: absolute;
right: 10rpx;
bottom: 20rpx;
color: #999;
}
.data-list .item .base .status-0 {
color: #0e90d2;
}
.data-list .item .base .status-1 {
color: #5eb95e;
}
.data-list .item .base .status-2 {
color: #F37B1D;
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录