Commit e7af3121 Harvey

no message

1 个父辈 304aaffd
......@@ -7,11 +7,11 @@ const router = createRouter({
});
//全局路由前置守卫
router.beforeEach((to, from, next) => {
next();
});
// 全局路由后置守卫
router.afterEach((to, from) => {
//console.log(to)
//console.log(from)
......
......@@ -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",
......
<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>
......@@ -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
},
......
......@@ -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>
此文件类型无法预览
......@@ -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!