@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Eslint config file
|
||||
* Documentation: https://eslint.org/docs/user-guide/configuring/
|
||||
* Install the Eslint extension before using this feature.
|
||||
*/
|
||||
module.exports = {
|
||||
env: {
|
||||
es6: true,
|
||||
browser: true,
|
||||
node: true,
|
||||
},
|
||||
ecmaFeatures: {
|
||||
modules: true,
|
||||
},
|
||||
parserOptions: {
|
||||
ecmaVersion: 2018,
|
||||
sourceType: 'module',
|
||||
},
|
||||
globals: {
|
||||
wx: true,
|
||||
App: true,
|
||||
Page: true,
|
||||
getCurrentPages: true,
|
||||
getApp: true,
|
||||
Component: true,
|
||||
requirePlugin: true,
|
||||
requireMiniProgram: true,
|
||||
},
|
||||
// extends: 'eslint:recommended',
|
||||
rules: {},
|
||||
}
|
@ -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
|
||||
}
|
||||
})
|
@ -0,0 +1,38 @@
|
||||
{
|
||||
"pages":[
|
||||
"pages/index/index",
|
||||
"pages/history/history",
|
||||
"pages/apply/apply"
|
||||
],
|
||||
"entryPagePath": "pages/index/index",
|
||||
"window":{
|
||||
"backgroundTextStyle":"light",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationBarTitleText": "中国古代数学",
|
||||
"navigationBarTextStyle":"black"
|
||||
},
|
||||
"tabBar": {
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/index/index",
|
||||
"text": "首页",
|
||||
"iconPath": "/pages/images/a.png",
|
||||
"selectedIconPath": "/pages/images/a1.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/history/history",
|
||||
"text": "历史",
|
||||
"iconPath": "/pages/images/b.png",
|
||||
"selectedIconPath": "/pages/images/b1.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/apply/apply",
|
||||
"text": "应用",
|
||||
"iconPath": "/pages/images/d.png",
|
||||
"selectedIconPath": "/pages/images/d1.png"
|
||||
}
|
||||
]
|
||||
},
|
||||
"style": "v2",
|
||||
"sitemapLocation": "sitemap.json"
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
/**app.wxss**/
|
||||
.container {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 200rpx 0;
|
||||
box-sizing: border-box;
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
// pages/apply/apply.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"navigationBarTitleText": "应用"
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
/* pages/apply/apply.wxss */
|
||||
page{
|
||||
height:100%;
|
||||
}
|
||||
|
||||
.head{
|
||||
width: 100%;
|
||||
height: 30%;
|
||||
}
|
||||
|
||||
.head image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.new{
|
||||
width: 100%;
|
||||
height: 30%;
|
||||
border: 1rpx solid black;
|
||||
}
|
||||
/* 标题 */
|
||||
.new .title{
|
||||
width: 100%;
|
||||
height: 20%;
|
||||
border: 1rpx solid blanchedalmond;
|
||||
text-align: center;
|
||||
}
|
||||
/* 产品 */
|
||||
scroll-view{
|
||||
width: 100%;
|
||||
height: 80%;
|
||||
border: 1rpx solid black;
|
||||
}
|
||||
|
||||
.pros{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.pros .pro{
|
||||
/* flex-shrink: 0; */
|
||||
width: 30%;
|
||||
height: 100%;
|
||||
border: 1rpx solid black;
|
||||
display: inline-block;
|
||||
}
|
||||
.pros .pro image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.version{
|
||||
width: 100%;
|
||||
border: 1rpx solid black;
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"navigationBarTitleText": "历史",
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
<!--pages/history/history.wxml-->
|
||||
<view class="navs">
|
||||
|
||||
<view class="nav">
|
||||
<view bindtap="navclick"data-index="0"class="{{index==0?'active':''}}">发展历程</view>
|
||||
</view>
|
||||
|
||||
<view class="nav">
|
||||
<view bindtap="navclick"data-index="1"class="{{index==1?'active':''}}">杰出成就</view>
|
||||
</view>
|
||||
<view class="nav">
|
||||
<view bindtap="navclick"data-index="2"class="{{index==2?'active':''}}">著名学者</view>
|
||||
</view>
|
||||
|
||||
<view class="bottom"></view>
|
||||
<view class="container"></view>
|
||||
</view>
|
||||
<view class="{{cname}}" bindtap="clselect"></view>
|
||||
<block wx:for="{{pros}}">
|
||||
<view class="opart">
|
||||
<image src="{{item.url}}"></image>
|
||||
</view>
|
||||
</block>
|
@ -0,0 +1,84 @@
|
||||
/* pages/history/history.wxss */
|
||||
page{
|
||||
height:100%;
|
||||
}
|
||||
/* 头部 */
|
||||
.navs{
|
||||
width: 100%;
|
||||
height: 6%;
|
||||
border: 1rpx solid rgb(121, 121, 121);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
.navs .nav{
|
||||
width: 33%;
|
||||
height: 100%;
|
||||
border: 1rpx solid rgb(121, 121, 121);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
}
|
||||
.navs .nav .active{
|
||||
background-color: #eee;
|
||||
}
|
||||
/*flex*/
|
||||
.opart{
|
||||
height: 30%;
|
||||
width: 100%;
|
||||
border: 1rpx solid rgb(77, 77, 77);
|
||||
}
|
||||
.opart{
|
||||
height: 30%;
|
||||
width: 100%;
|
||||
border: 1rpx solid rgb(121, 121, 121);
|
||||
}
|
||||
.opart image{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.twpart{
|
||||
height: 30%;
|
||||
width: 100%;
|
||||
border: 1rpx solid rgb(121, 121, 121);
|
||||
}
|
||||
.twpart image{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.thpart{
|
||||
height: 30%;
|
||||
width: 100%;
|
||||
border: 1rpx solid rgb(121, 121, 121);
|
||||
}
|
||||
.thpart image{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.fopart{
|
||||
height: 30%;
|
||||
width: 100%;
|
||||
border: 1rpx solid rgb(121, 121, 121);
|
||||
}
|
||||
.fopart image{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.fipart{
|
||||
height: 30%;
|
||||
width: 100%;
|
||||
border: 1rpx solid rgb(121, 121, 121);
|
||||
}
|
||||
.fipart image{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/*底部*/
|
||||
.botton{
|
||||
width: 100%;
|
||||
height:50%;
|
||||
border:1rpx solid red;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 742 KiB |
After Width: | Height: | Size: 281 KiB |
After Width: | Height: | Size: 345 KiB |
After Width: | Height: | Size: 370 KiB |
After Width: | Height: | Size: 298 KiB |
After Width: | Height: | Size: 300 KiB |
After Width: | Height: | Size: 330 KiB |
After Width: | Height: | Size: 278 KiB |
After Width: | Height: | Size: 186 KiB |
After Width: | Height: | Size: 324 KiB |
After Width: | Height: | Size: 261 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 2.1 MiB |
After Width: | Height: | Size: 268 KiB |
After Width: | Height: | Size: 430 KiB |
After Width: | Height: | Size: 258 KiB |
After Width: | Height: | Size: 558 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 81 KiB |
After Width: | Height: | Size: 266 KiB |
After Width: | Height: | Size: 178 KiB |
After Width: | Height: | Size: 147 KiB |
After Width: | Height: | Size: 929 KiB |
After Width: | Height: | Size: 71 KiB |
After Width: | Height: | Size: 255 KiB |
After Width: | Height: | Size: 214 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 1.6 MiB |
After Width: | Height: | Size: 257 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 230 KiB |
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 290 KiB |
After Width: | Height: | Size: 290 KiB |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 8.5 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 8.1 KiB |
After Width: | Height: | Size: 7.9 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 6.7 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 11 KiB |
@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
<!-- 第一部分 头部-->
|
||||
<view class="head">
|
||||
<image src="/pages/images/1.png" mode=""/>
|
||||
</view>
|
||||
<!--第二部分 轮播图-->
|
||||
<view class="banner">
|
||||
<swiper autoplay="ture" indicator-dots="true" interval="1500" circular="ture">
|
||||
<block wx:for="{{simgUrl}}" wx:key="index">
|
||||
<swiper-item>
|
||||
<image src="{{item}}" mode=""/>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
<!-- 第三部分 导航栏-->
|
||||
<view class="grids">
|
||||
<view class="item">
|
||||
<image src="/pages/images/aa.png"/>
|
||||
<text>历史</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<image src="/pages/images/bb.png"/>
|
||||
<text>题目</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<image src="/pages/images/cc.png"/>
|
||||
<text>故事</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<image src="/pages/images/dd.png"/>
|
||||
<text>交流</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<image src="/pages/images/ee.png"/>
|
||||
<text>学习</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<image src="/pages/images/ff.png"/>
|
||||
<text>应用</text>
|
||||
</view>
|
||||
</view>
|
@ -0,0 +1,70 @@
|
||||
/* pages/index/index.wxss */
|
||||
page{
|
||||
height:100%;
|
||||
}
|
||||
|
||||
.head{
|
||||
width: 100%;
|
||||
height: 25%;
|
||||
}
|
||||
|
||||
.head image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
}
|
||||
|
||||
.banner{
|
||||
width: 100%;
|
||||
height: 35%;
|
||||
}
|
||||
|
||||
.banner swiper{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.banner swiper image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.grids{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.grids .item{
|
||||
width: 250rpx;
|
||||
height: 250rpx;
|
||||
border-right:1rpx solid #eee ;
|
||||
border-bottom:1rpx solid #eee;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items:center;
|
||||
}
|
||||
|
||||
.grids .item:nth-child(3){
|
||||
border-right: 0;
|
||||
}
|
||||
|
||||
.grids .item:nth-child(6){
|
||||
border-right: 0;
|
||||
}
|
||||
|
||||
.grids .item:nth-child(9){
|
||||
border-right: 0;
|
||||
}
|
||||
|
||||
.grids .item image{
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
|
||||
.grids .item text{
|
||||
color: rgb(14, 13, 13);
|
||||
font-size: 28rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
{
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "trial",
|
||||
"setting": {
|
||||
"coverView": true,
|
||||
"es6": true,
|
||||
"postcss": true,
|
||||
"minified": true,
|
||||
"enhance": true,
|
||||
"showShadowRootInWxmlPanel": true,
|
||||
"packNpmRelationList": [],
|
||||
"babelSetting": {
|
||||
"ignore": [],
|
||||
"disablePlugins": [],
|
||||
"outputPath": ""
|
||||
},
|
||||
"ignoreUploadUnusedFiles": true
|
||||
},
|
||||
"condition": {},
|
||||
"editorSetting": {
|
||||
"tabIndent": "auto",
|
||||
"tabSize": 2
|
||||
},
|
||||
"packOptions": {
|
||||
"ignore": [],
|
||||
"include": []
|
||||
},
|
||||
"appid": "wx88d20e697c125c57"
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
|
||||
"rules": [{
|
||||
"action": "allow",
|
||||
"page": "*"
|
||||
}]
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
const formatTime = date => {
|
||||
const year = date.getFullYear()
|
||||
const month = date.getMonth() + 1
|
||||
const day = date.getDate()
|
||||
const hour = date.getHours()
|
||||
const minute = date.getMinutes()
|
||||
const second = date.getSeconds()
|
||||
|
||||
return `${[year, month, day].map(formatNumber).join('/')} ${[hour, minute, second].map(formatNumber).join(':')}`
|
||||
}
|
||||
|
||||
const formatNumber = n => {
|
||||
n = n.toString()
|
||||
return n[1] ? n : `0${n}`
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
formatTime
|
||||
}
|