chat girldetail 图集制作

This commit is contained in:
2025-09-19 15:19:59 +08:00
parent fb0a9abcce
commit 6ed9f82a6e
41 changed files with 1607 additions and 1508 deletions
+53
View File
@@ -0,0 +1,53 @@
//index.js
//get application instance
const { defaultIcon } = require('../../utils/icon');
const app = getApp()
Page({
data: {
motto: 'Hello World',
userInfo: {},
hasUserInfo: false,
canIUse: wx.canIUse('button.open-type.getUserInfo')
},
// event handler function
bindViewTap: function () {
wx.navigateTo({
url: '../logs/logs'
})
},
onLoad: function () {
if (app.globalData.userInfo) {
this.setData({
userInfo: app.globalData.userInfo,
hasUserInfo: true
})
} else if (this.data.canIUse) {
// do someting
} else {
// There is no compatibility processing for open-type=getUserInfo version
wx.getUserInfo({
success: res => {
app.globalData.userInfo = res.userInfo
this.setData({
userInfo: res.userInfo,
hasUserInfo: true
})
}
})
}
},
getUserInfo: function (e) {
console.log('getUserInfo ----> ', e);
app.globalData.userInfo = e.detail.userInfo || "";
const userInfo = e.detail.userInfo || {
avatarUrl: defaultIcon,
nickName: 'userNickName'
}
this.setData({
userInfo: userInfo,
hasUserInfo: true
})
}
})
+3
View File
@@ -0,0 +1,3 @@
{
"usingComponents": {}
}
+1
View File
@@ -0,0 +1 @@
<web-view src="http://120.25.215.205:39002/"></web-view>
+20
View File
@@ -0,0 +1,20 @@
.userinfo {
display: flex;
flex-direction: column;
align-items: center;
}
.userinfo-avatar {
width: 128rpx;
height: 128rpx;
margin: 20rpx;
border-radius: 50%;
}
.userinfo-nickname {
color: #aaa;
}
.usermotto {
margin-top: 200px;
}
+15
View File
@@ -0,0 +1,15 @@
//logs.js
const util = require('../../utils/util.js')
Page({
data: {
logs: []
},
onLoad: function () {
this.setData({
logs: (wx.getStorageSync('logs') || []).map(log => {
return util.formatTime(new Date(log))
})
})
}
})
+4
View File
@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "Logs",
"usingComponents": {}
}
+5
View File
@@ -0,0 +1,5 @@
<view class="container log-list">
<block wx:for="{{logs}}" wx:for-item="log" wx:key="*this">
<text class="log-item">{{index + 1}}. {{log}}</text>
</block>
</view>
+9
View File
@@ -0,0 +1,9 @@
.log-list {
display: flex;
flex-direction: column;
padding: 40rpx;
}
.log-item {
margin: 10rpx;
}