go
This commit is contained in:
60
miniprogramPre/app.js
Normal file
60
miniprogramPre/app.js
Normal file
@@ -0,0 +1,60 @@
|
||||
var fakeWindow = {};var fakeDocument = {};(function(window, document) {})(fakeWindow, fakeDocument);var appConfig = fakeWindow.appOptions || {};
|
||||
|
||||
const LIFE_CYCLE_METHODS = ['onLaunch', 'onShow', 'onHide', 'onError', 'onPageNotFound', 'onUnhandledRejection', 'onThemeChange']
|
||||
const extraConfig = {}
|
||||
for (const key in appConfig) {
|
||||
if (LIFE_CYCLE_METHODS.indexOf(key) === -1) extraConfig[key] = appConfig[key]
|
||||
}
|
||||
|
||||
App({
|
||||
onLaunch(options) {
|
||||
if (appConfig.onLaunch) appConfig.onLaunch.call(this, options)
|
||||
},
|
||||
onShow(options) {
|
||||
if (appConfig.onShow) appConfig.onShow.call(this, options)
|
||||
},
|
||||
onHide() {
|
||||
if (appConfig.onHide) appConfig.onHide.call(this)
|
||||
},
|
||||
onError(err) {
|
||||
// 支持 window 的 error 事件
|
||||
const pages = getCurrentPages() || []
|
||||
const currentPage = pages[pages.length - 1]
|
||||
if (currentPage && currentPage.window) {
|
||||
currentPage.window.$$trigger('error', {
|
||||
event: err,
|
||||
})
|
||||
}
|
||||
|
||||
if (appConfig.onError) appConfig.onError.call(this, err)
|
||||
},
|
||||
onPageNotFound(options) {
|
||||
if (appConfig.onPageNotFound) appConfig.onPageNotFound.call(this, options)
|
||||
},
|
||||
onUnhandledRejection(options) {
|
||||
const pages = getCurrentPages() || []
|
||||
const currentPage = pages[pages.length - 1]
|
||||
if (currentPage && currentPage.window) {
|
||||
const event = new currentPage.window.Event({
|
||||
timeStamp: currentPage.window.performance.now(),
|
||||
touches: [],
|
||||
changedTouches: [],
|
||||
name: 'unhandledrejection',
|
||||
target: currentPage.window,
|
||||
eventPhase: currentPage.window.Event.AT_TARGET,
|
||||
$$extra: {
|
||||
promise: options.promise,
|
||||
reason: options.reason,
|
||||
}
|
||||
})
|
||||
currentPage.window.$$trigger('unhandledrejection', {event})
|
||||
}
|
||||
|
||||
if (appConfig.onUnhandledRejection) appConfig.onUnhandledRejection.call(this, options)
|
||||
},
|
||||
onThemeChange(options) {
|
||||
if (appConfig.onThemeChange) appConfig.onThemeChange.call(this, options)
|
||||
},
|
||||
|
||||
...extraConfig,
|
||||
})
|
||||
23
miniprogramPre/app.json
Normal file
23
miniprogramPre/app.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"pages": [
|
||||
"pages/index/index",
|
||||
"pages/chapters/index",
|
||||
"pages/read/index",
|
||||
"pages/my/index",
|
||||
"pages/referral/index",
|
||||
"pages/settings/index",
|
||||
"pages/purchases/index",
|
||||
"pages/about/index",
|
||||
"pages/match/index",
|
||||
"pages/search/index"
|
||||
],
|
||||
"window": {
|
||||
"navigationBarTitleText": "Soul创业派对",
|
||||
"navigationBarBackgroundColor": "#000000",
|
||||
"navigationBarTextStyle": "white",
|
||||
"backgroundColor": "#000000"
|
||||
},
|
||||
"subpackages": [],
|
||||
"preloadRule": {},
|
||||
"sitemapLocation": "sitemap.json"
|
||||
}
|
||||
452
miniprogramPre/app.wxss
Normal file
452
miniprogramPre/app.wxss
Normal file
@@ -0,0 +1,452 @@
|
||||
.h5-body {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.h5-p {
|
||||
display: block;
|
||||
-webkit-margin-before: 1em;
|
||||
-webkit-margin-after: 1em;
|
||||
-webkit-margin-start: 0;
|
||||
-webkit-margin-end: 0;
|
||||
}
|
||||
|
||||
.h5-address, .h5-article, .h5-aside, .h5-div, .h5-footer, .h5-header, .h5-hgroup, .h5-main, .h5-nav, .h5-section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.h5-blockquote {
|
||||
display: block;
|
||||
-webkit-margin-before: 1em;
|
||||
-webkit-margin-after: 1em;
|
||||
-webkit-margin-start: 40px;
|
||||
-webkit-margin-end: 40px;
|
||||
}
|
||||
|
||||
.h5-figcaption {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.h5-figure {
|
||||
display: block;
|
||||
-webkit-margin-before: 1em;
|
||||
-webkit-margin-after: 1em;
|
||||
-webkit-margin-start: 40px;
|
||||
-webkit-margin-end: 40px;
|
||||
}
|
||||
|
||||
.h5-q {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.h5-center {
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.h5-hr {
|
||||
display: block;
|
||||
-webkit-margin-before: 0.5em;
|
||||
-webkit-margin-after: 0.5em;
|
||||
-webkit-margin-start: auto;
|
||||
-webkit-margin-end: auto;
|
||||
border-style: inset;
|
||||
border-width: 1px;
|
||||
}
|
||||
|
||||
.h5-video {
|
||||
object-fit: contain;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
/* heading elements */
|
||||
|
||||
.h5-h1 {
|
||||
display: block;
|
||||
font-size: 2em;
|
||||
-webkit-margin-before: 0.67em;
|
||||
-webkit-margin-after: 0.67em;
|
||||
-webkit-margin-start: 0;
|
||||
-webkit-margin-end: 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.h5-h2 {
|
||||
display: block;
|
||||
font-size: 1.5em;
|
||||
-webkit-margin-before: 0.83em;
|
||||
-webkit-margin-after: 0.83em;
|
||||
-webkit-margin-start: 0;
|
||||
-webkit-margin-end: 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.h5-h3 {
|
||||
display: block;
|
||||
font-size: 1.17em;
|
||||
-webkit-margin-before: 1em;
|
||||
-webkit-margin-after: 1em;
|
||||
-webkit-margin-start: 0;
|
||||
-webkit-margin-end: 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.h5-h4 {
|
||||
display: block;
|
||||
-webkit-margin-before: 1.33em;
|
||||
-webkit-margin-after: 1.33em;
|
||||
-webkit-margin-start: 0;
|
||||
-webkit-margin-end: 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.h5-h5 {
|
||||
display: block;
|
||||
font-size: .83em;
|
||||
-webkit-margin-before: 1.67em;
|
||||
-webkit-margin-after: 1.67em;
|
||||
-webkit-margin-start: 0;
|
||||
-webkit-margin-end: 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.h5-h6 {
|
||||
display: block;
|
||||
font-size: .67em;
|
||||
-webkit-margin-before: 2.33em;
|
||||
-webkit-margin-after: 2.33em;
|
||||
-webkit-margin-start: 0;
|
||||
-webkit-margin-end: 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* tables */
|
||||
|
||||
.h5-table {
|
||||
display: table;
|
||||
border-collapse: separate;
|
||||
border-spacing: 2px;
|
||||
border-color: gray;
|
||||
}
|
||||
|
||||
.h5-thead {
|
||||
display: table-header-group;
|
||||
vertical-align: middle;
|
||||
border-color: inherit;
|
||||
}
|
||||
|
||||
.h5-tbody {
|
||||
display: table-row-group;
|
||||
vertical-align: middle;
|
||||
border-color: inherit;
|
||||
}
|
||||
|
||||
.h5-tfoot {
|
||||
display: table-footer-group;
|
||||
vertical-align: middle;
|
||||
border-color: inherit;
|
||||
}
|
||||
|
||||
/* for tables without table section elements (can happen with XHTML or dynamically created tables) */
|
||||
.h5-table > .h5-tr {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.h5-col {
|
||||
display: table-column;
|
||||
}
|
||||
|
||||
.h5-colgroup {
|
||||
display: table-column-group;
|
||||
}
|
||||
|
||||
.h5-tr {
|
||||
display: table-row;
|
||||
vertical-align: inherit;
|
||||
border-color: inherit;
|
||||
}
|
||||
|
||||
.h5-td, .h5-th {
|
||||
display: table-cell;
|
||||
vertical-align: inherit;
|
||||
}
|
||||
|
||||
.h5-th {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.h5-caption {
|
||||
display: table-caption;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* lists */
|
||||
|
||||
.h5-ul, .h5-menu, .h5-dir {
|
||||
display: block;
|
||||
list-style-type: disc;
|
||||
-webkit-margin-before: 1em;
|
||||
-webkit-margin-after: 1em;
|
||||
-webkit-margin-start: 0;
|
||||
-webkit-margin-end: 0;
|
||||
-webkit-padding-start: 40px;
|
||||
}
|
||||
|
||||
.h5-ol {
|
||||
display: block;
|
||||
list-style-type: decimal;
|
||||
-webkit-margin-before: 1em;
|
||||
-webkit-margin-after: 1em;
|
||||
-webkit-margin-start: 0;
|
||||
-webkit-margin-end: 0;
|
||||
-webkit-padding-start: 40px;
|
||||
}
|
||||
|
||||
.h5-li {
|
||||
display: list-item;
|
||||
text-align: -webkit-match-parent;
|
||||
}
|
||||
|
||||
.h5-dd {
|
||||
display: block;
|
||||
-webkit-margin-start: 40px;
|
||||
}
|
||||
|
||||
.h5-dl {
|
||||
display: block;
|
||||
-webkit-margin-before: 1em;
|
||||
-webkit-margin-after: 1em;
|
||||
-webkit-margin-start: 0;
|
||||
-webkit-margin-end: 0;
|
||||
}
|
||||
|
||||
.h5-dt {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* form elements */
|
||||
|
||||
.h5-form {
|
||||
display: block;
|
||||
margin-top: 0em;
|
||||
}
|
||||
|
||||
.h5-label {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.h5-legend {
|
||||
display: block;
|
||||
-webkit-padding-start: 2px;
|
||||
-webkit-padding-end: 2px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.h5-fieldset {
|
||||
display: block;
|
||||
-webkit-margin-start: 2px;
|
||||
-webkit-margin-end: 2px;
|
||||
-webkit-padding-before: 0.35em;
|
||||
-webkit-padding-start: 0.75em;
|
||||
-webkit-padding-end: 0.75em;
|
||||
-webkit-padding-after: 0.625em;
|
||||
border: 2px groove ThreeDFace;
|
||||
min-width: min-content;
|
||||
}
|
||||
|
||||
/* Form controls don't go vertical. */
|
||||
.h5-input, .h5-textarea, keygen, .h5-select, .h5-button, .h5-progress {
|
||||
-webkit-writing-mode: horizontal-tb !important;
|
||||
}
|
||||
|
||||
.h5-input, .h5-textarea, keygen, .h5-select, .h5-button {
|
||||
margin: 0em;
|
||||
font: -webkit-small-control;
|
||||
color: initial;
|
||||
letter-spacing: normal;
|
||||
word-spacing: normal;
|
||||
line-height: normal;
|
||||
text-transform: none;
|
||||
text-indent: 0;
|
||||
text-shadow: none;
|
||||
display: inline-block;
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
.h5-datalist {
|
||||
display: none;
|
||||
}
|
||||
|
||||
keygen, .h5-select {
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.h5-area, .h5-param {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.h5-select {
|
||||
box-sizing: border-box;
|
||||
letter-spacing: normal;
|
||||
word-spacing: normal;
|
||||
line-height: normal;
|
||||
border: 1px solid #4c4c4c;
|
||||
/* We want to be as close to background:transparent as possible without actually being transparent */
|
||||
background-color: rgba(255, 255, 255, 0.01);
|
||||
font: 11px Helvetica;
|
||||
padding: 0 0.4em 0 0.4em;
|
||||
border: 1px solid;
|
||||
color: text;
|
||||
background-color: -apple-system-control-background;
|
||||
color: black;
|
||||
background-color: white;
|
||||
align-items: center;
|
||||
white-space: pre;
|
||||
-webkit-rtl-ordering: logical;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.h5-optgroup {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.h5-option {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.h5-output {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
/* inline elements */
|
||||
|
||||
.h5-u, .h5-ins {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.h5-strong, .h5-b {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.h5-i, .h5-cite, .h5-em, var, .h5-address, .h5-dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.h5-tt, .h5-code, .h5-kbd, .h5-samp {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.h5-pre {
|
||||
display: block;
|
||||
font-family: monospace;
|
||||
white-space: pre;
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.h5-mark {
|
||||
background-color: yellow;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.h5-big {
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
.h5-small {
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.h5-s, .h5-strike, .h5-del {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.h5-sub {
|
||||
vertical-align: sub;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.h5-sup {
|
||||
vertical-align: super;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
/* other elements */
|
||||
|
||||
.h5-iframe {
|
||||
border: 2px inset;
|
||||
}
|
||||
|
||||
.h5-details {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.h5-summary {
|
||||
display: block;
|
||||
}
|
||||
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.h5-bdi, .h5-output {
|
||||
unicode-bidi: isolate;
|
||||
}
|
||||
|
||||
.h5-bdo {
|
||||
unicode-bidi: bidi-override;
|
||||
}
|
||||
|
||||
.h5-img {
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 兼容标签样式
|
||||
*/
|
||||
.h5-img {
|
||||
display: inline-block;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.h5-br {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.h5-a, .h5-abbr, .h5-b, .h5-code, .h5-i, .h5-label, .h5-small, .h5-span, .h5-strong, .h5-time {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
/* 去除 button 组件默认样式 */
|
||||
button {
|
||||
position: relative;
|
||||
display: block;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
box-sizing: border-box;
|
||||
font-size: inherit;
|
||||
text-align: inherit;
|
||||
text-decoration: inherit;
|
||||
line-height: inherit;
|
||||
border-radius: inherit;
|
||||
-webkit-tap-highlight-color: inherit;
|
||||
overflow: hidden;
|
||||
color: inherit;
|
||||
background-color: inherit;
|
||||
}
|
||||
|
||||
button:after {
|
||||
content: "";
|
||||
width: auto;
|
||||
height: auto;
|
||||
position: static;
|
||||
top: 0;
|
||||
left: 0;
|
||||
border: none;
|
||||
-webkit-transform: none;
|
||||
transform: none;
|
||||
-webkit-transform-origin: 0 0;
|
||||
transform-origin: 0 0;
|
||||
box-sizing: border-box;
|
||||
border-radius: 0;
|
||||
}
|
||||
44
miniprogramPre/custom-tab-bar/index.js
Normal file
44
miniprogramPre/custom-tab-bar/index.js
Normal file
@@ -0,0 +1,44 @@
|
||||
const app = getApp()
|
||||
|
||||
Component({
|
||||
data: {
|
||||
selected: 0,
|
||||
list: [
|
||||
{ pagePath: '/pages/index/index', text: '首页', icon: '🏠' },
|
||||
{ pagePath: '/pages/chapters/index', text: '目录', icon: '📋' },
|
||||
{ pagePath: '/pages/match/index', text: '找伙伴', icon: '👥', hidden: true, isCenter: true },
|
||||
{ pagePath: '/pages/my/index', text: '我的', icon: '👤' }
|
||||
]
|
||||
},
|
||||
|
||||
methods: {
|
||||
syncMatchEnabled() {
|
||||
const matchEnabled = app.globalData.matchEnabled === true
|
||||
const list = this.data.list.map((item) => {
|
||||
if (item.text === '找伙伴') {
|
||||
return { ...item, hidden: !matchEnabled }
|
||||
}
|
||||
return item
|
||||
})
|
||||
this.setData({ list })
|
||||
},
|
||||
|
||||
switchTab(e) {
|
||||
const path = e.currentTarget.dataset.path
|
||||
const index = e.currentTarget.dataset.index
|
||||
this.setData({ selected: index })
|
||||
wx.switchTab({ url: path })
|
||||
}
|
||||
},
|
||||
|
||||
attached() {
|
||||
this.syncMatchEnabled()
|
||||
app.loadFeatureConfig().then(() => this.syncMatchEnabled())
|
||||
},
|
||||
|
||||
pageLifetimes: {
|
||||
show() {
|
||||
app.loadFeatureConfig().then(() => this.syncMatchEnabled())
|
||||
}
|
||||
}
|
||||
})
|
||||
4
miniprogramPre/custom-tab-bar/index.json
Normal file
4
miniprogramPre/custom-tab-bar/index.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
14
miniprogramPre/custom-tab-bar/index.wxml
Normal file
14
miniprogramPre/custom-tab-bar/index.wxml
Normal file
@@ -0,0 +1,14 @@
|
||||
<view class="tab-bar">
|
||||
<view
|
||||
wx:for="{{list}}"
|
||||
wx:key="pagePath"
|
||||
wx:if="{{!item.hidden}}"
|
||||
class="tab-item {{selected === index ? 'active' : ''}} {{item.isCenter ? 'center' : ''}}"
|
||||
data-path="{{item.pagePath}}"
|
||||
data-index="{{index}}"
|
||||
bindtap="switchTab"
|
||||
>
|
||||
<view class="tab-icon">{{item.icon}}</view>
|
||||
<text class="tab-text">{{item.text}}</text>
|
||||
</view>
|
||||
</view>
|
||||
8
miniprogramPre/custom-tab-bar/index.wxss
Normal file
8
miniprogramPre/custom-tab-bar/index.wxss
Normal file
@@ -0,0 +1,8 @@
|
||||
.tab-bar { position: fixed; bottom: 0; left: 0; right: 0; height: 120rpx; background: #1c1c1e; border-top: 2rpx solid rgba(255,255,255,0.05); display: flex; align-items: flex-end; justify-content: space-around; padding-bottom: env(safe-area-inset-bottom); padding-top: 16rpx; }
|
||||
.tab-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8rpx 0; }
|
||||
.tab-icon { font-size: 44rpx; line-height: 1; margin-bottom: 4rpx; opacity: 0.7; }
|
||||
.tab-item.active .tab-icon { opacity: 1; }
|
||||
.tab-text { font-size: 20rpx; color: #8e8e93; }
|
||||
.tab-item.active .tab-text { color: #00CED1; font-weight: 500; }
|
||||
.tab-item.center .tab-icon { width: 88rpx; height: 88rpx; line-height: 88rpx; text-align: center; font-size: 48rpx; margin-top: -40rpx; margin-bottom: 0; border-radius: 50%; background: linear-gradient(135deg, #00CED1 0%, #20B2AA 100%); box-shadow: 0 8rpx 24rpx rgba(0,206,209,0.3); }
|
||||
.tab-item.center.active .tab-icon { opacity: 1; box-shadow: 0 8rpx 28rpx rgba(0,206,209,0.4); }
|
||||
66
miniprogramPre/pages/about/index.js
Normal file
66
miniprogramPre/pages/about/index.js
Normal file
@@ -0,0 +1,66 @@
|
||||
// pages/about/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
3
miniprogramPre/pages/about/index.json
Normal file
3
miniprogramPre/pages/about/index.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
2
miniprogramPre/pages/about/index.wxml
Normal file
2
miniprogramPre/pages/about/index.wxml
Normal file
@@ -0,0 +1,2 @@
|
||||
<!--pages/about/index.wxml-->
|
||||
<text>pages/about/index.wxml</text>
|
||||
1
miniprogramPre/pages/about/index.wxss
Normal file
1
miniprogramPre/pages/about/index.wxss
Normal file
@@ -0,0 +1 @@
|
||||
/* pages/about/index.wxss */
|
||||
66
miniprogramPre/pages/chapters/index.js
Normal file
66
miniprogramPre/pages/chapters/index.js
Normal file
@@ -0,0 +1,66 @@
|
||||
// pages/chapters/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
3
miniprogramPre/pages/chapters/index.json
Normal file
3
miniprogramPre/pages/chapters/index.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
2
miniprogramPre/pages/chapters/index.wxml
Normal file
2
miniprogramPre/pages/chapters/index.wxml
Normal file
@@ -0,0 +1,2 @@
|
||||
<!--pages/chapters/index.wxml-->
|
||||
<text>pages/chapters/index.wxml</text>
|
||||
1
miniprogramPre/pages/chapters/index.wxss
Normal file
1
miniprogramPre/pages/chapters/index.wxss
Normal file
@@ -0,0 +1 @@
|
||||
/* pages/chapters/index.wxss */
|
||||
17
miniprogramPre/pages/index/index.js
Normal file
17
miniprogramPre/pages/index/index.js
Normal file
@@ -0,0 +1,17 @@
|
||||
const mp = require('miniprogram-render')
|
||||
const getBaseConfig = require('../base.js')
|
||||
const config = require('../../config')
|
||||
|
||||
function init(window, document) {require('../../common/index.js')(window, document)}
|
||||
|
||||
const baseConfig = getBaseConfig(mp, config, init)
|
||||
|
||||
Component({
|
||||
...baseConfig.base,
|
||||
methods: {
|
||||
...baseConfig.methods,
|
||||
|
||||
|
||||
|
||||
},
|
||||
})
|
||||
7
miniprogramPre/pages/index/index.json
Normal file
7
miniprogramPre/pages/index/index.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"navigationBarTitleText": "Soul创业实验",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"element": "miniprogram-element"
|
||||
}
|
||||
}
|
||||
1
miniprogramPre/pages/index/index.wxml
Normal file
1
miniprogramPre/pages/index/index.wxml
Normal file
@@ -0,0 +1 @@
|
||||
<page-meta root-font-size="{{rootFontSize}}" page-style="{{pageStyle}}"></page-meta><element wx:if="{{pageId}}" class="{{bodyClass}}" style="{{bodyStyle}}" data-private-node-id="e-body" data-private-page-id="{{pageId}}" ></element>
|
||||
0
miniprogramPre/pages/index/index.wxss
Normal file
0
miniprogramPre/pages/index/index.wxss
Normal file
66
miniprogramPre/pages/match/index.js
Normal file
66
miniprogramPre/pages/match/index.js
Normal file
@@ -0,0 +1,66 @@
|
||||
// pages/match/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
3
miniprogramPre/pages/match/index.json
Normal file
3
miniprogramPre/pages/match/index.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
2
miniprogramPre/pages/match/index.wxml
Normal file
2
miniprogramPre/pages/match/index.wxml
Normal file
@@ -0,0 +1,2 @@
|
||||
<!--pages/match/index.wxml-->
|
||||
<text>pages/match/index.wxml</text>
|
||||
1
miniprogramPre/pages/match/index.wxss
Normal file
1
miniprogramPre/pages/match/index.wxss
Normal file
@@ -0,0 +1 @@
|
||||
/* pages/match/index.wxss */
|
||||
66
miniprogramPre/pages/my/index.js
Normal file
66
miniprogramPre/pages/my/index.js
Normal file
@@ -0,0 +1,66 @@
|
||||
// pages/my/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
3
miniprogramPre/pages/my/index.json
Normal file
3
miniprogramPre/pages/my/index.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
2
miniprogramPre/pages/my/index.wxml
Normal file
2
miniprogramPre/pages/my/index.wxml
Normal file
@@ -0,0 +1,2 @@
|
||||
<!--pages/my/index.wxml-->
|
||||
<text>pages/my/index.wxml</text>
|
||||
1
miniprogramPre/pages/my/index.wxss
Normal file
1
miniprogramPre/pages/my/index.wxss
Normal file
@@ -0,0 +1 @@
|
||||
/* pages/my/index.wxss */
|
||||
66
miniprogramPre/pages/purchases/index.js
Normal file
66
miniprogramPre/pages/purchases/index.js
Normal file
@@ -0,0 +1,66 @@
|
||||
// pages/purchases/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
3
miniprogramPre/pages/purchases/index.json
Normal file
3
miniprogramPre/pages/purchases/index.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
2
miniprogramPre/pages/purchases/index.wxml
Normal file
2
miniprogramPre/pages/purchases/index.wxml
Normal file
@@ -0,0 +1,2 @@
|
||||
<!--pages/purchases/index.wxml-->
|
||||
<text>pages/purchases/index.wxml</text>
|
||||
1
miniprogramPre/pages/purchases/index.wxss
Normal file
1
miniprogramPre/pages/purchases/index.wxss
Normal file
@@ -0,0 +1 @@
|
||||
/* pages/purchases/index.wxss */
|
||||
66
miniprogramPre/pages/read/index.js
Normal file
66
miniprogramPre/pages/read/index.js
Normal file
@@ -0,0 +1,66 @@
|
||||
// pages/read/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
3
miniprogramPre/pages/read/index.json
Normal file
3
miniprogramPre/pages/read/index.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
2
miniprogramPre/pages/read/index.wxml
Normal file
2
miniprogramPre/pages/read/index.wxml
Normal file
@@ -0,0 +1,2 @@
|
||||
<!--pages/read/index.wxml-->
|
||||
<text>pages/read/index.wxml</text>
|
||||
1
miniprogramPre/pages/read/index.wxss
Normal file
1
miniprogramPre/pages/read/index.wxss
Normal file
@@ -0,0 +1 @@
|
||||
/* pages/read/index.wxss */
|
||||
66
miniprogramPre/pages/referral/index.js
Normal file
66
miniprogramPre/pages/referral/index.js
Normal file
@@ -0,0 +1,66 @@
|
||||
// pages/referral/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
3
miniprogramPre/pages/referral/index.json
Normal file
3
miniprogramPre/pages/referral/index.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
2
miniprogramPre/pages/referral/index.wxml
Normal file
2
miniprogramPre/pages/referral/index.wxml
Normal file
@@ -0,0 +1,2 @@
|
||||
<!--pages/referral/index.wxml-->
|
||||
<text>pages/referral/index.wxml</text>
|
||||
1
miniprogramPre/pages/referral/index.wxss
Normal file
1
miniprogramPre/pages/referral/index.wxss
Normal file
@@ -0,0 +1 @@
|
||||
/* pages/referral/index.wxss */
|
||||
66
miniprogramPre/pages/search/index.js
Normal file
66
miniprogramPre/pages/search/index.js
Normal file
@@ -0,0 +1,66 @@
|
||||
// pages/search/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
3
miniprogramPre/pages/search/index.json
Normal file
3
miniprogramPre/pages/search/index.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
2
miniprogramPre/pages/search/index.wxml
Normal file
2
miniprogramPre/pages/search/index.wxml
Normal file
@@ -0,0 +1,2 @@
|
||||
<!--pages/search/index.wxml-->
|
||||
<text>pages/search/index.wxml</text>
|
||||
1
miniprogramPre/pages/search/index.wxss
Normal file
1
miniprogramPre/pages/search/index.wxss
Normal file
@@ -0,0 +1 @@
|
||||
/* pages/search/index.wxss */
|
||||
66
miniprogramPre/pages/settings/index.js
Normal file
66
miniprogramPre/pages/settings/index.js
Normal file
@@ -0,0 +1,66 @@
|
||||
// pages/settings/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
3
miniprogramPre/pages/settings/index.json
Normal file
3
miniprogramPre/pages/settings/index.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
2
miniprogramPre/pages/settings/index.wxml
Normal file
2
miniprogramPre/pages/settings/index.wxml
Normal file
@@ -0,0 +1,2 @@
|
||||
<!--pages/settings/index.wxml-->
|
||||
<text>pages/settings/index.wxml</text>
|
||||
1
miniprogramPre/pages/settings/index.wxss
Normal file
1
miniprogramPre/pages/settings/index.wxss
Normal file
@@ -0,0 +1 @@
|
||||
/* pages/settings/index.wxss */
|
||||
44
miniprogramPre/project.config.json
Normal file
44
miniprogramPre/project.config.json
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"description": "Soul创业派对 - 小程序",
|
||||
"packOptions": {
|
||||
"ignore": [],
|
||||
"include": []
|
||||
},
|
||||
"setting": {
|
||||
"bundle": false,
|
||||
"userConfirmedBundleSwitch": false,
|
||||
"urlCheck": false,
|
||||
"scopeDataCheck": false,
|
||||
"es6": true,
|
||||
"enhance": true,
|
||||
"postcss": true,
|
||||
"minified": true,
|
||||
"compileWorklet": false,
|
||||
"uglifyFileName": false,
|
||||
"uploadWithSourceMap": true,
|
||||
"packNpmManually": false,
|
||||
"packNpmRelationList": [],
|
||||
"minifyWXSS": true,
|
||||
"minifyWXML": true,
|
||||
"localPlugins": false,
|
||||
"disableUseStrict": false,
|
||||
"useCompilerPlugins": false,
|
||||
"condition": false,
|
||||
"swc": false,
|
||||
"disableSWC": true,
|
||||
"babelSetting": {
|
||||
"ignore": [],
|
||||
"disablePlugins": [],
|
||||
"outputPath": ""
|
||||
}
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "3.5.7",
|
||||
"appid": "wxb8bbb2b10dec74aa",
|
||||
"projectname": "soul-miniprogram",
|
||||
"condition": {},
|
||||
"miniprogramRoot": "./",
|
||||
"srcMiniprogramRoot": "./",
|
||||
"simulatorPluginLibVersion": {},
|
||||
"editorSetting": {}
|
||||
}
|
||||
22
miniprogramPre/project.private.config.json
Normal file
22
miniprogramPre/project.private.config.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"libVersion": "3.14.1",
|
||||
"projectname": "miniprogramPre",
|
||||
"condition": {},
|
||||
"setting": {
|
||||
"urlCheck": false,
|
||||
"coverView": false,
|
||||
"lazyloadPlaceholderEnable": false,
|
||||
"skylineRenderEnable": false,
|
||||
"preloadBackgroundData": false,
|
||||
"autoAudits": false,
|
||||
"useApiHook": true,
|
||||
"showShadowRootInWxmlPanel": false,
|
||||
"useStaticServer": false,
|
||||
"useLanDebug": false,
|
||||
"showES6CompileOption": false,
|
||||
"compileHotReLoad": true,
|
||||
"checkInvalidKey": true,
|
||||
"ignoreDevUnusedFiles": true,
|
||||
"bigPackageSizeSupport": false
|
||||
}
|
||||
}
|
||||
4
miniprogramPre/sitemap.json
Normal file
4
miniprogramPre/sitemap.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
|
||||
"rules": [{ "action": "allow", "page": "*" }]
|
||||
}
|
||||
144
miniprogramPre/upload.js
Normal file
144
miniprogramPre/upload.js
Normal file
@@ -0,0 +1,144 @@
|
||||
/**
|
||||
* 小程序自动上传脚本
|
||||
* 使用前请先安装: npm install miniprogram-ci --save-dev
|
||||
*/
|
||||
|
||||
const ci = require('miniprogram-ci')
|
||||
const path = require('path')
|
||||
|
||||
// 配置信息
|
||||
const config = {
|
||||
// 小程序AppID
|
||||
appid: 'wxb8bbb2b10dec74aa',
|
||||
|
||||
// 项目路径
|
||||
projectPath: path.resolve(__dirname),
|
||||
|
||||
// 私钥路径(需要从微信公众平台下载)
|
||||
// 下载地址:微信公众平台 -> 开发管理 -> 开发设置 -> 小程序代码上传密钥
|
||||
privateKeyPath: path.resolve(__dirname, './private.key'),
|
||||
|
||||
// 版本号(请根据实际情况修改)
|
||||
version: '1.0.1',
|
||||
|
||||
// 版本描述
|
||||
desc: 'Soul创业派对 - 功能更新(匹配功能配置化)',
|
||||
|
||||
// 编译设置
|
||||
setting: {
|
||||
es6: true,
|
||||
es7: true,
|
||||
minifyJS: true,
|
||||
minifyWXML: true,
|
||||
minifyWXSS: true,
|
||||
minify: true,
|
||||
codeProtect: false,
|
||||
autoPrefixWXSS: true
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传小程序代码
|
||||
*/
|
||||
async function upload() {
|
||||
console.log('🚀 开始上传小程序...')
|
||||
console.log('📦 项目路径:', config.projectPath)
|
||||
console.log('🆔 AppID:', config.appid)
|
||||
console.log('📌 版本号:', config.version)
|
||||
|
||||
try {
|
||||
// 创建项目实例
|
||||
const project = new ci.Project({
|
||||
appid: config.appid,
|
||||
type: 'miniProgram',
|
||||
projectPath: config.projectPath,
|
||||
privateKeyPath: config.privateKeyPath,
|
||||
ignores: ['node_modules/**/*']
|
||||
})
|
||||
|
||||
console.log('✅ 项目实例创建成功')
|
||||
|
||||
// 上传代码
|
||||
console.log('⏳ 正在上传代码...')
|
||||
const uploadResult = await ci.upload({
|
||||
project,
|
||||
version: config.version,
|
||||
desc: config.desc,
|
||||
setting: config.setting,
|
||||
onProgressUpdate: (info) => {
|
||||
console.log('📊 上传进度:', info)
|
||||
}
|
||||
})
|
||||
|
||||
console.log('🎉 上传成功!')
|
||||
console.log('📝 上传结果:', uploadResult)
|
||||
console.log('')
|
||||
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━')
|
||||
console.log('✅ 代码已上传到微信公众平台')
|
||||
console.log('📱 请前往微信公众平台提交审核:')
|
||||
console.log(' https://mp.weixin.qq.com/')
|
||||
console.log(' 登录 → 版本管理 → 开发版本 → 提交审核')
|
||||
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━')
|
||||
|
||||
} catch (error) {
|
||||
console.error('❌ 上传失败:', error.message)
|
||||
|
||||
if (error.message.includes('private.key')) {
|
||||
console.log('')
|
||||
console.log('⚠️ 缺少密钥文件 private.key')
|
||||
console.log('📥 请按以下步骤获取:')
|
||||
console.log(' 1. 访问 https://mp.weixin.qq.com/')
|
||||
console.log(' 2. 登录小程序后台')
|
||||
console.log(' 3. 开发管理 → 开发设置 → 小程序代码上传密钥')
|
||||
console.log(' 4. 点击"生成",下载密钥文件')
|
||||
console.log(' 5. 将 private.*.key 重命名为 private.key')
|
||||
console.log(' 6. 放到 miniprogram 目录下')
|
||||
}
|
||||
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 预览小程序
|
||||
*/
|
||||
async function preview() {
|
||||
console.log('👀 生成预览二维码...')
|
||||
|
||||
try {
|
||||
const project = new ci.Project({
|
||||
appid: config.appid,
|
||||
type: 'miniProgram',
|
||||
projectPath: config.projectPath,
|
||||
privateKeyPath: config.privateKeyPath,
|
||||
ignores: ['node_modules/**/*']
|
||||
})
|
||||
|
||||
const previewResult = await ci.preview({
|
||||
project,
|
||||
desc: config.desc,
|
||||
setting: config.setting,
|
||||
qrcodeFormat: 'terminal',
|
||||
qrcodeOutputDest: path.resolve(__dirname, './preview.jpg'),
|
||||
onProgressUpdate: (info) => {
|
||||
console.log('📊 生成进度:', info)
|
||||
}
|
||||
})
|
||||
|
||||
console.log('✅ 二维码已生成:', './miniprogram/preview.jpg')
|
||||
console.log('📱 使用微信扫码即可预览')
|
||||
|
||||
} catch (error) {
|
||||
console.error('❌ 生成预览失败:', error.message)
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
// 命令行参数
|
||||
const command = process.argv[2]
|
||||
|
||||
if (command === 'preview') {
|
||||
preview()
|
||||
} else {
|
||||
upload()
|
||||
}
|
||||
Reference in New Issue
Block a user