Commit e7af3121 Harvey

no message

1 个父辈 304aaffd
...@@ -7,11 +7,11 @@ const router = createRouter({ ...@@ -7,11 +7,11 @@ const router = createRouter({
}); });
//全局路由前置守卫 //全局路由前置守卫
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
next(); next();
}); });
// 全局路由后置守卫 // 全局路由后置守卫
router.afterEach((to, from) => { router.afterEach((to, from) => {
//console.log(to) //console.log(to)
//console.log(from) //console.log(from)
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
"aliasPath": "/center", "aliasPath": "/center",
"name": "center", "name": "center",
"style": { "style": {
"navigationBarTitleText": "一定牛彩店", "navigationBarTitleText": "用户中心",
"navigationStyle": "default" "navigationStyle": "default"
} }
}, },
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
"aliasPath": "/tv/info", "aliasPath": "/tv/info",
"name": "tv_info", "name": "tv_info",
"style": { "style": {
"navigationStyle": "default" "navigationStyle": "default"
} }
},{ },{
"path": "pages/auth/login", "path": "pages/auth/login",
......
<template> <template>
<view>个人中心</view> <view class="header-content">
</template> <image class="header-logo-img" src="../../static/img/ccdg.png"></image>
<view class="header-info">
<script> <view class="header-tip">彩店名称</view>
console.log(uni.$u) <view class="header-name">江西省鹰潭市</view>
</script> </view>
</view>
<style>
</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> </style>
...@@ -18,21 +18,30 @@ ...@@ -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' 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
if (img) { // this.text = img.text
this.title = img.text // this.src = img.src
this.text = img.text
this.src = img.src
uni.setNavigationBarTitle({ // uni.setNavigationBarTitle({
title: this.title // 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) $h5.head_tv(this.src)
//#endif //#endif
}, },
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
</view> </view>
<view class="content"> <view class="content">
<view v-for="(item,index) in list" class="msg-info" :key="index"> <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 class="tip">{{item.text}}</view>
</view> </view>
<!-- <view class='left'> <!-- <view class='left'>
...@@ -57,15 +57,19 @@ ...@@ -57,15 +57,19 @@
console.log(e.target.dataset.v) console.log(e.target.dataset.v)
}, },
imgClick(index) { imgClick(index) {
uni.setStorage({ const img=this.list[index]
key: 'tv_list_selected_img',
data: this.list[index] window.location.href = `/tv/info?text=${img.text}&src=${img.src}&zq=zq`
})
// uni.setStorage({
uni.navigateTo({ // key: 'tv_list_selected_img',
url: '/tv/info?zq=zq', // data: this.list[index]
}); // })
// uni.navigateTo({
// url: '/tv/info?zq=zq',
// });
} }
} }
} }
...@@ -79,15 +83,15 @@ ...@@ -79,15 +83,15 @@
} }
.top-nav button { .top-nav button {
margin-top: 8px; margin-top: 8px;
width: 20vw; width: 20vw;
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
color: #666666; color: #666666;
background-color: rgb(241, 241, 241); background-color: rgb(241, 241, 241);
font-size: 14px; font-size: 14px;
font-weight: normal; font-weight: normal;
} }
.content { .content {
display: flex; display: flex;
...@@ -98,31 +102,31 @@ ...@@ -98,31 +102,31 @@
} }
.content .msg-info { .content .msg-info {
position: relative !important; position: relative !important;
margin-top: 5px; margin-top: 5px;
width: 49vw; width: 49vw;
} }
.content image { .content image {
width: 100%; width: 100%;
} }
.content .tip { .content .tip {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
background: #f6fbfe; background: #f6fbfe;
opacity: 0.8; opacity: 0.8;
width: 100%; width: 100%;
line-height: 50px; line-height: 50px;
height: 50px; height: 50px;
z-index: 9; z-index: 9;
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
font-size: 16px; font-size: 16px;
} }
</style> </style>
此文件类型无法预览
...@@ -5,10 +5,13 @@ export function go_android_login() { ...@@ -5,10 +5,13 @@ export function go_android_login() {
} }
export function head_tv(url) { 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").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() { export function getHeaders() {
var req = new XMLHttpRequest(); var req = new XMLHttpRequest();
req.open('GET', document.location.href, false); req.open('GET', document.location.href, false);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!