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,66 @@
// pages/about/about.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,3 @@
<view class="about">
<text>我的页面</text>
</view>

View File

@@ -0,0 +1 @@
/* pages/about/about.wxss */

View File

@@ -0,0 +1,46 @@
let { home } = getApp().globalData
Page({
data: {
text: "父组件给子组件的数据",
isVip: false,
id: 0,
keyWord: "",
news: [
{ id: 1, title: '新闻1' },
{ id: 2, title: '新闻2' },
{ id: 3, title: '新闻3' },
{ id: 4, title: '新闻4' },
]
},
testChange(e) {
console.log(e.detail);
},
onLoad() {
this.getHome()
},
async getHome() {
let res = await home.index();
console.log(res);
},
enterInfo(e) {
// console.log("=====: ",e.currentTarget.dataset.id);
// wx.navigateTo({
// url: `/pages/info/info?id=${e.currentTarget.dataset.id}`,
// })
// this.data.id = e.currentTarget.dataset.id
this.setData({
id: e.currentTarget.dataset.id
})
console.log(" this.data.id: ", this.data.id);
},
bindKeyWord(e) {
this.setData({
keyWord: e.detail.value
})
}
})

View File

@@ -0,0 +1,4 @@
{
"usingComponents": {
}
}

View File

@@ -0,0 +1,26 @@
<view class="container">
首页
<van-button type="danger">危险按钮</van-button>
<view slot="right">右侧</view>
<view slot="left">左侧</view>
<header title="{{ text }}" bind:change="testChange"></header>
<view wx:if="{{isVip}}">vip</view>
<!-- <view wx:elif="{{isVip}}">vip</view> -->
<view wx:else>no vip</view>
<view class="list">
<view class="item" wx:for="{{ news }}" wx:for-item="v" wx:for-index="i" wx:key="i" bind:tap="enterInfo" data-id="{{ v.id }}">
{{ v.title }}
</view>
<text>{{ id }} {{ keyWord }}</text>
<input class="weui-input" maxlength="10" bindinput="bindKeyWord" placeholder="请输入关键字"/>
</view>
</view>

View File

@@ -0,0 +1,5 @@
/**index.wxss**/
.scrollview {
height: 100vh;
}

View File

@@ -0,0 +1,69 @@
// pages/info/info.js
Page({
/**
* 页面的初始数据
*/
data: {
id: 0
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log(options.id);
this.setData({
id: options.id
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,3 @@
<view class="info">
详情 {{ id }}
</view>

View File

@@ -0,0 +1 @@
/* pages/info/info.wxss */