feat: 小程序连接服务器IP + 同步未提交开发
- miniprogram/config.js: BASE_URL 指向 http://192.227.237.8:3001 - 动作标题中文化(nameZh),搜索匹配 name/nameZh/nameEn - 新增计划/收藏/我的 等页面与组件 - 后端 Docker 化(Dockerfile/.dockerignore)与翻译脚本 - .gitignore 补充 .DS_Store
This commit is contained in:
17
miniprogram/components/avatar/index.js
Normal file
17
miniprogram/components/avatar/index.js
Normal file
@@ -0,0 +1,17 @@
|
||||
// 头像组件:纯 emoji 圆形头像(无二进制图片)。
|
||||
// props: avatar(emoji 字符串), size(rpx, 默认 120), bg(背景色, 默认 gold-soft)
|
||||
Component({
|
||||
properties: {
|
||||
avatar: { type: String, value: '💪' },
|
||||
size: { type: Number, value: 120 },
|
||||
bg: { type: String, value: 'rgba(217,179,108,0.12)' }
|
||||
},
|
||||
data: {
|
||||
fontSize: 60
|
||||
},
|
||||
observers: {
|
||||
size: function (size) {
|
||||
this.setData({ fontSize: Math.round(size * 0.5) });
|
||||
}
|
||||
}
|
||||
});
|
||||
4
miniprogram/components/avatar/index.json
Normal file
4
miniprogram/components/avatar/index.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
5
miniprogram/components/avatar/index.wxml
Normal file
5
miniprogram/components/avatar/index.wxml
Normal file
@@ -0,0 +1,5 @@
|
||||
<view
|
||||
class="avatar"
|
||||
style="width: {{size}}rpx; height: {{size}}rpx; background: {{bg}}; font-size: {{fontSize}}rpx;">
|
||||
{{avatar || '💪'}}
|
||||
</view>
|
||||
9
miniprogram/components/avatar/index.wxss
Normal file
9
miniprogram/components/avatar/index.wxss
Normal file
@@ -0,0 +1,9 @@
|
||||
.avatar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 999rpx;
|
||||
border: 1rpx solid var(--gold-line);
|
||||
line-height: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
Reference in New Issue
Block a user