Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
Harvey
/
ydu-lottery-shop-app
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit e7af3121
由
Harvey
编写于
2022-04-16 16:13:07 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
no message
1 个父辈
304aaffd
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
117 行增加
和
66 行删除
src/common/router.js
src/pages.json
src/pages/center/index.vue
src/pages/tv/info.vue
src/pages/tv/list.vue
src/static/favicon.ico
src/static/js/h5-utils.js
src/common/router.js
查看文件 @
e7af312
...
...
@@ -7,11 +7,11 @@ const router = createRouter({
});
//全局路由前置守卫
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
next
();
});
// 全局路由后置守卫
router
.
afterEach
((
to
,
from
)
=>
{
//console.log(to)
//console.log(from)
...
...
src/pages.json
查看文件 @
e7af312
...
...
@@ -13,7 +13,7 @@
"aliasPath"
:
"/center"
,
"name"
:
"center"
,
"style"
:
{
"navigationBarTitleText"
:
"
一定牛彩店
"
,
"navigationBarTitleText"
:
"
用户中心
"
,
"navigationStyle"
:
"default"
}
},
...
...
@@ -32,7 +32,7 @@
"aliasPath"
:
"/tv/info"
,
"name"
:
"tv_info"
,
"style"
:
{
"navigationStyle"
:
"default"
"navigationStyle"
:
"default"
}
},{
"path"
:
"pages/auth/login"
,
...
...
src/pages/center/index.vue
查看文件 @
e7af312
<
template
>
<view>
个人中心
</view>
</
template
>
<
script
>
console
.
log
(
uni
.
$u
)
</
script
>
<
style
>
<
template
>
<view
class=
"header-content"
>
<image
class=
"header-logo-img"
src=
"../../static/img/ccdg.png"
></image>
<view
class=
"header-info"
>
<view
class=
"header-tip"
>
彩店名称
</view>
<view
class=
"header-name"
>
江西省鹰潭市
</view>
</view>
</view>
</
template
>
<
script
>
</
script
>
<
style
>
.header-content
{
background-color
:
#D23338
;
width
:
100vw
;
height
:
77px
;
display
:
flex
;
}
.header-logo-img
{
margin
:
16px
;
width
:
45px
;
height
:
45px
;
border-radius
:
45px
;
background-color
:
#FFFFFF
;
}
.header-info
{
font-size
:
16px
;
color
:
#FFFFFF
;
margin-top
:
20px
;
}
.header-tip
{
}
.header-name
{
font-size
:
12px
;
}
</
style
>
src/pages/tv/info.vue
查看文件 @
e7af312
...
...
@@ -18,21 +18,30 @@
src
:
'https://img2.ydniu.com/app/cd/202204122204/%E5%BF%AB%E4%B9%908%E5%9F%BA%E6%9C%AC%E8%B5%B0%E5%8A%BF%E5%9B%BE.png'
}
},
async
onLoad
()
{
async
onLoad
(
e
)
{
//const img = await uni.getStorageSync('tv_list_selected_img')
const
img
=
await
uni
.
getStorageSync
(
'tv_list_selected_img'
)
if
(
img
)
{
this
.
title
=
img
.
text
this
.
text
=
img
.
text
this
.
src
=
img
.
src
// if (img) {
// this.title = img.text
// this.text = img.text
// this.src = img.src
uni
.
setNavigationBarTitle
({
title
:
this
.
title
})
}
//
uni.setNavigationBarTitle({
//
title: this.title
//
})
//
}
//#ifdef H5
//#ifdef H5
if
(
e
)
{
this
.
title
=
e
.
text
this
.
text
=
e
.
text
this
.
src
=
e
.
src
uni
.
setNavigationBarTitle
({
title
:
this
.
title
})
}
$h5
.
head_tv
(
this
.
src
)
//#endif
},
...
...
src/pages/tv/list.vue
查看文件 @
e7af312
...
...
@@ -5,7 +5,7 @@
</view>
<view
class=
"content"
>
<view
v-for=
"(item,index) in list"
class=
"msg-info"
:key=
"index"
>
<image
:mode=
"mode||item.mode"
:src=
"item.src
"
@
click=
"imgClick(index)"
></image>
<image
:mode=
"mode||item.mode"
lazy-load=
"true"
:src=
"item.src+'/small'
"
@
click=
"imgClick(index)"
></image>
<view
class=
"tip"
>
{{
item
.
text
}}
</view>
</view>
<!--
<view
class=
'left'
>
...
...
@@ -57,15 +57,19 @@
console
.
log
(
e
.
target
.
dataset
.
v
)
},
imgClick
(
index
)
{
uni
.
setStorage
({
key
:
'tv_list_selected_img'
,
data
:
this
.
list
[
index
]
})
uni
.
navigateTo
({
url
:
'/tv/info?zq=zq'
,
});
const
img
=
this
.
list
[
index
]
window
.
location
.
href
=
`/tv/info?text=
${
img
.
text
}
&src=
${
img
.
src
}
&zq=zq`
// uni.setStorage({
// key: 'tv_list_selected_img',
// data: this.list[index]
// })
// uni.navigateTo({
// url: '/tv/info?zq=zq',
// });
}
}
}
...
...
@@ -79,15 +83,15 @@
}
.top-nav
button
{
margin-top
:
8px
;
width
:
20vw
;
height
:
30px
;
line-height
:
30px
;
color
:
#666666
;
background-color
:
rgb
(
241
,
241
,
241
);
font-size
:
14px
;
font-weight
:
normal
;
}
margin-top
:
8px
;
width
:
20vw
;
height
:
30px
;
line-height
:
30px
;
color
:
#666666
;
background-color
:
rgb
(
241
,
241
,
241
);
font-size
:
14px
;
font-weight
:
normal
;
}
.content
{
display
:
flex
;
...
...
@@ -98,31 +102,31 @@
}
.content
.msg-info
{
position
:
relative
!important
;
margin-top
:
5px
;
width
:
49vw
;
}
position
:
relative
!important
;
margin-top
:
5px
;
width
:
49vw
;
}
.content
image
{
width
:
100%
;
}
.content
image
{
width
:
100%
;
}
.content
.tip
{
position
:
absolute
;
bottom
:
0
;
background
:
#f6fbfe
;
opacity
:
0.8
;
.content
.tip
{
position
:
absolute
;
bottom
:
0
;
background
:
#f6fbfe
;
opacity
:
0.8
;
width
:
100%
;
line-height
:
50px
;
height
:
50px
;
width
:
100%
;
line-height
:
50px
;
height
:
50px
;
z-index
:
9
;
text-align
:
center
;
white-space
:
nowrap
;
overflow
:
hidden
;
z-index
:
9
;
text-align
:
center
;
white-space
:
nowrap
;
overflow
:
hidden
;
font-size
:
16px
;
font-size
:
16px
;
}
</
style
>
}
</
style
>
src/static/favicon.ico
0 → 100644
查看文件 @
e7af312
此文件类型无法预览
src/static/js/h5-utils.js
查看文件 @
e7af312
...
...
@@ -5,10 +5,13 @@ export function go_android_login() {
}
export
function
head_tv
(
url
)
{
$
(
"body"
).
css
(
"margin-top"
,
"25px"
)
$
(
".uni-page-head"
).
eq
(
0
).
append
(
`<div onclick="Android.access2Tv('
${
url
}
')" style='font-size:12px;padding:0 5px;margin-right: 8px;height:24px;line-height:24px;margin-top: 3px;background-color: #007AFF;color:#FFFFFF;border-radius:5px;'>TV 投屏</div>`
)
$
(
".uni-page-head-hd"
).
click
(
function
(){
Android
.
webGoBack
(
""
)
});
}
export
function
getHeaders
()
{
var
req
=
new
XMLHttpRequest
();
req
.
open
(
'GET'
,
document
.
location
.
href
,
false
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论