Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加微信小程序版 #227

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
Binary file added liferestartWX/.DS_Store
Binary file not shown.
18 changes: 18 additions & 0 deletions liferestartWX/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# lifeRestartWX - 人生重开模拟器微信小程序版
人生重开模拟器[微信小程序版](https://github.com/uiiang/lifeRestartWX)

## 简介
- 根据[人生重开模拟器](https://github.com/VickScarlet/lifeRestart)开发的微信小程序版

- 数据和核心逻辑代码均采用VickScarlet版

## 开发笔记

- age, events, telents数据修改为微信本地读取js

## 快速体验

- 微信小程序搜索 奇奇怪怪的软件

- 微信扫描二维码
<img src="/assets/images/app_qcode.jpg" width="40%">
19 changes: 19 additions & 0 deletions liferestartWX/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// app.js
App({
onLaunch() {
// 展示本地存储能力
const logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)

// 登录
wx.login({
success: res => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId
}
})
},
globalData: {
userInfo: null
}
})
19 changes: 19 additions & 0 deletions liferestartWX/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"pages":[
"pages/index",
"pages/talents",
"pages/summary",
"pages/trajectory",
"pages/property",
"pages/ranking"
],
"window":{
"backgroundColor": "#000",
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#F6F6F6",
"navigationBarTitleText": "人生重开模拟器",
"navigationBarTextStyle": "black"
},
"style": "v2",
"sitemapLocation": "sitemap.json"
}
14 changes: 14 additions & 0 deletions liferestartWX/app.wxss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* 全局样式表
* 使用@import语句可以导入外联样式表,@import后跟需要导入的外联样式表的相对路径,用;表示语句结束
* 如果需要增加额外的WXSS样式表, 直接import即可, 但需注意引用顺序
*/



@import 'assets/styles/weui.wxss';
@import 'assets/styles/example.wxss';
page {
height: 100%;
background-color: #222831;
}
Binary file added liferestartWX/assets/.DS_Store
Binary file not shown.
Binary file added liferestartWX/assets/images/app_qcode.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added liferestartWX/assets/media/guide/001.mp3
Binary file not shown.
Binary file added liferestartWX/assets/media/guide/002.mp3
Binary file not shown.
Binary file added liferestartWX/assets/media/guide/003.mp3
Binary file not shown.
Binary file added liferestartWX/assets/media/guide/004.mp3
Binary file not shown.
Binary file added liferestartWX/assets/media/guide/005.mp3
Binary file not shown.
Binary file added liferestartWX/assets/media/guide/006.mp3
Binary file not shown.
Binary file added liferestartWX/assets/media/guide/007.mp3
Binary file not shown.
Binary file not shown.
Binary file not shown.
97 changes: 97 additions & 0 deletions liferestartWX/assets/styles/example.wxss
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
page {
width: 100%;
height: 100%;
position: relative;
color: rgba(0, 0, 0, .85);
background-color: #f8f8f8;
font-size: 16px;
font-family: PingFang SC, Helvetica Neue, Hiragino Sans GB, Helvetica, Microsoft YaHei, Arial;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: transparent;
}

.page__hd {
padding: 40px;
}

.page__bd {
padding-bottom: 40px;
}

.page__bd_spacing {
padding-left: 10px;
padding-right: 10px;
}

.page__ft {
padding-bottom: 10px;
text-align: center;
}

.page__title {
text-align: left;
font-size: 20px;
font-weight: 400;
}

.page__desc {
margin-top: 5px;
color: rgba(0, 0, 0, .45);
text-align: left;
font-size: 14px;
}

.placeholder {
background-color: #ebebef;
color: #bbb;
text-align: center;
height: 30px;
line-height: 30px;
width: 100%;
box-sizing: border-box;
}

.sub-title {
padding: 30rpx 30rpx 18rpx;
font-size: 28rpx;
color: rgba(0, 0, 0, .65);
width: 100%;
box-sizing: border-box;
}

.button-sp-area {
margin: 20px auto 0;
width: 80%;
text-align: center;
}

.btn-area {
margin: 1.17647059em 15px 0.3em;
}

.btn-area button {
margin-bottom: 10px;
}

.btn-area button:last-child {
margin-bottom: 0;
}

.text-left {
text-align: left;
}

.text-center {
text-align: center;
}

.text-right {
text-align: right;
}

.btn-group {
position: relative;
z-index: 1010;
margin-bottom: 50px;
}
Loading