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"
} }
}, },
......
<template> <template>
<view>个人中心</view> <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> </template>
<script> <script>
console.log(uni.$u)
</script> </script>
<style> <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
// this.text = img.text
// this.src = img.src
if (img) { // uni.setNavigationBarTitle({
this.title = img.text // title: this.title
this.text = img.text // })
this.src = img.src // }
//#ifdef H5
if (e) {
this.title = e.text
this.text = e.text
this.src = e.src
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: this.title title: this.title
}) })
} }
//#ifdef H5
$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'>
...@@ -58,14 +58,18 @@ ...@@ -58,14 +58,18 @@
}, },
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({
// key: 'tv_list_selected_img',
// data: this.list[index]
// })
uni.navigateTo({ // uni.navigateTo({
url: '/tv/info?zq=zq', // url: '/tv/info?zq=zq',
}); // });
} }
} }
} }
......
此文件类型无法预览
...@@ -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!