first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,83 @@
<template>
<view class="content">
<image class="logo" src="/static/logo.png"></image>
<view class="text-area">
<text class="title">{{ title }}</text>
</view>
<ul>
<li
v-for="(item, index) in newsList"
:key="index"
@click="EnterInfo(item)"
>
{{ item.title }}
</li>
</ul>
<button type="primary" @click="EnterAbout">我是按钮</button>
<uni-grid :column="3">
<uni-grid-item>
<text class="text">文本</text>
</uni-grid-item>
<uni-grid-item>
<text class="text">文本</text>
</uni-grid-item>
<uni-grid-item>
<text class="text">文本</text>
</uni-grid-item>
</uni-grid>
</view>
</template>
<script>
export default {
data() {
return {
title: "Hello",
newsList: [
{ id: 1, title: "哈哈哈1" },
{ id: 2, title: "哈哈哈2" },
{ id: 3, title: "哈哈哈3" },
{ id: 4, title: "哈哈哈4" },
],
};
},
created() {
//#ifdef APP-PLUS
uni.setScreenBrightness({
value: 0.5,
success: function () {
console.log('success');
}
});
//#endif
this.GetHome();
},
methods: {
async GetHome() {
let res = await this.$api.home.home();
console.log(res)
setTimeout(async ()=>{
let aaaa = await this.$api.home.home();
},2000)
},
EnterInfo(i) {
uni.navigateTo({
url: `/pages/info/info?id=${i.id}&title=${i.title}`,
});
},
EnterAbout() {
uni.switchTab({
url: "/pages/about/about",
});
},
},
};
</script>
<style lang="less" scoped>
@import "@/common/less/views/index.less";
</style>