@ -0,0 +1,14 @@
|
|||||||
|
# Windows
|
||||||
|
[Dd]esktop.ini
|
||||||
|
Thumbs.db
|
||||||
|
$RECYCLE.BIN/
|
||||||
|
|
||||||
|
# macOS
|
||||||
|
.DS_Store
|
||||||
|
.fseventsd
|
||||||
|
.Spotlight-V100
|
||||||
|
.TemporaryItems
|
||||||
|
.Trashes
|
||||||
|
|
||||||
|
# Node.js
|
||||||
|
node_modules/
|
@ -0,0 +1,57 @@
|
|||||||
|
//app.js
|
||||||
|
var moviesInfo = require('data/movieInfo.js');
|
||||||
|
var talksInfo = require('data/talkInfo.js');
|
||||||
|
App({
|
||||||
|
globalData: {
|
||||||
|
moviearray:[],
|
||||||
|
talkarray:[],
|
||||||
|
moviehistoryarray:[],
|
||||||
|
talkhistoryarray:[],
|
||||||
|
},
|
||||||
|
MovieRefresh:function(options){
|
||||||
|
var postlist=moviesInfo.postList
|
||||||
|
var array=new Array()
|
||||||
|
console.log(postlist)
|
||||||
|
var postsCollected = wx.getStorageSync("posts_collected");
|
||||||
|
for(var i=0;i<postlist.length;i++){
|
||||||
|
if(postsCollected[i]==true)
|
||||||
|
array.push(postlist[i]);
|
||||||
|
}
|
||||||
|
this.globalData.moviearray=array
|
||||||
|
console.log(this.globalData.moviearray)
|
||||||
|
},
|
||||||
|
TalkRefresh:function(options){
|
||||||
|
var postlist=talksInfo.postList
|
||||||
|
var array=new Array()
|
||||||
|
console.log(postlist)
|
||||||
|
var postsCollected = wx.getStorageSync("posts_collected2");
|
||||||
|
for(var i=0;i<postlist.length;i++){
|
||||||
|
if(postsCollected[i]==true)
|
||||||
|
array.push(postlist[i]);
|
||||||
|
}
|
||||||
|
this.globalData.talkarray=array
|
||||||
|
console.log(this.globalData.talkarray)
|
||||||
|
},
|
||||||
|
MovieHistoryRefresh:function(options){
|
||||||
|
var postlist=moviesInfo.postList
|
||||||
|
var array=new Array()
|
||||||
|
console.log(postlist)
|
||||||
|
var postsCollected = wx.getStorageSync("historys_list");
|
||||||
|
for(var i=0;i<postsCollected.length;i++){
|
||||||
|
array.push(postlist[postsCollected[i]]);
|
||||||
|
}
|
||||||
|
this.globalData.moviehistoryarray=array
|
||||||
|
console.log(this.globalData.moviehistoryarray)
|
||||||
|
},
|
||||||
|
TalkHistoryRefresh:function(options){
|
||||||
|
var postlist=talksInfo.postList
|
||||||
|
var array=new Array()
|
||||||
|
console.log(postlist)
|
||||||
|
var postsCollected = wx.getStorageSync("historys_list2");
|
||||||
|
for(var i=0;i<postsCollected.length;i++){
|
||||||
|
array.push(postlist[postsCollected[i]]);
|
||||||
|
}
|
||||||
|
this.globalData.talkhistoryarray=array
|
||||||
|
console.log(this.globalData.talkhistoryarray)
|
||||||
|
},
|
||||||
|
})
|
@ -0,0 +1,54 @@
|
|||||||
|
{
|
||||||
|
"pages": [
|
||||||
|
"pages/popular/popular",
|
||||||
|
"pages/talking/talking",
|
||||||
|
"pages/moviemore/moviemore",
|
||||||
|
"pages/talkingmore/talkingmore",
|
||||||
|
"pages/favorite/favorite",
|
||||||
|
"pages/my/my",
|
||||||
|
"pages/ii/ii",
|
||||||
|
"pages/history/history",
|
||||||
|
"pages/photo/photo",
|
||||||
|
"pages/skin/skin"
|
||||||
|
|
||||||
|
],
|
||||||
|
"window": {
|
||||||
|
"navigationBarBackgroundColor": "#47a86c",
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"navigationBarTitleText": "中国古代数学",
|
||||||
|
"backgroundColor": "#fff",
|
||||||
|
"backgroundTextStyle": "dark",
|
||||||
|
"enablePullDownRefresh": true
|
||||||
|
},
|
||||||
|
"tabBar": {
|
||||||
|
"backgroundColor": "#ffffff",
|
||||||
|
"color": "#999999",
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"pagePath": "pages/popular/popular",
|
||||||
|
"text": "首页",
|
||||||
|
"iconPath": "pages/images/ciwei.png",
|
||||||
|
"selectedIconPath": "pages/images/ciwei_hl.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pages/ii/ii",
|
||||||
|
"text": "视频",
|
||||||
|
"iconPath": "pages/images/popular_icon.png",
|
||||||
|
"selectedIconPath": "pages/images/popular_active_icon.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pages/talking/talking",
|
||||||
|
"text": "科普",
|
||||||
|
"iconPath": "pages/images/ciwei.png",
|
||||||
|
"selectedIconPath": "pages/images/ciwei_hl.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pages/my/my",
|
||||||
|
"text": "我的",
|
||||||
|
"iconPath": "pages/images/ciwei.png",
|
||||||
|
"selectedIconPath": "pages/images/ciwei_hl.png"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"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,12 @@
|
|||||||
|
var skinList=[
|
||||||
|
{title: '绚丽',
|
||||||
|
imgUrl: '/static/img/color.jpg'
|
||||||
|
},
|
||||||
|
{title: '冰雪',
|
||||||
|
imgUrl: '/static/img/ice.jpg'
|
||||||
|
},
|
||||||
|
]
|
||||||
|
module.exports = {
|
||||||
|
postList: skinList,
|
||||||
|
// a_key: a
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
// pages/favorite/favorite.js
|
||||||
|
var app = getApp()
|
||||||
|
Page({
|
||||||
|
data: {
|
||||||
|
moviearray:[],
|
||||||
|
talkarray:[],
|
||||||
|
show: 'movie_favorite',
|
||||||
|
},
|
||||||
|
onLoad: function (options) {
|
||||||
|
app.MovieRefresh()
|
||||||
|
app.TalkRefresh()
|
||||||
|
// console.log(app.globalData.moviearray)
|
||||||
|
this.setData({
|
||||||
|
moviearray: app.globalData.moviearray,
|
||||||
|
talkarray: app.globalData.talkarray
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onPullDownRefresh: function () {
|
||||||
|
this.onLoad()
|
||||||
|
},
|
||||||
|
jumpBtnMovie:function(options){
|
||||||
|
var postId = options.currentTarget.dataset.postid;
|
||||||
|
wx.navigateTo({
|
||||||
|
url: '/pages/moviemore/moviemore?id='+postId,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
jumpBtnTalk: function (options) {
|
||||||
|
var postId = options.currentTarget.dataset.postid;
|
||||||
|
wx.navigateTo({
|
||||||
|
url: '/pages/talkingmore/talkingmore?id=' + postId
|
||||||
|
})
|
||||||
|
},
|
||||||
|
changeViewType: function(e) {
|
||||||
|
var data = e.currentTarget.dataset
|
||||||
|
this.setData({
|
||||||
|
show: data.type,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"navigationBarTitleText": "我的收藏"
|
||||||
|
}
|
@ -0,0 +1,43 @@
|
|||||||
|
<view class="tab-header">
|
||||||
|
<view class="tab-header-item {{show == 'movie_favorite' ? 'tab-header-active' : ''}}" data-type="movie_favorite" bindtap="changeViewType">数学达人</view>
|
||||||
|
<view class="tab-header-item {{show == 'talk_favorite' ? 'tab-header-active' : ''}}" data-type="talk_favorite" bindtap="changeViewType">文章</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="tab-content-item" hidden="{{show == 'movie_favorite' ? false : true}}">
|
||||||
|
<view class="movie-list">
|
||||||
|
<block class="movie-list-ul" wx:for="{{moviearray}}" wx:for-item="item" wx:key="*this">
|
||||||
|
<view class="movie-list-li" bindtap="jumpBtnMovie" data-postId='{{item.postId}}'>
|
||||||
|
<view class="item-top"><image src='{{item.img}}'></image></view>
|
||||||
|
<view class="item-bottom">
|
||||||
|
<view>{{item.title}}</view>
|
||||||
|
<text>{{item.score}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="tab-content-item" hidden="{{show == 'talk_favorite' ? false : true}}">
|
||||||
|
<view>
|
||||||
|
<block wx:for="{{talkarray}}" wx:for-item="item" wx:key="*this">
|
||||||
|
<view catchtap='jumpBtnTalk' data-postId='{{item.postId}}'>
|
||||||
|
<view class='middle'>
|
||||||
|
<view class='author-date'>
|
||||||
|
<image class='author' src='{{item.avatar}}'></image>
|
||||||
|
<text class='date'>{{item.author}}</text>
|
||||||
|
<text class='date'>{{item.date}}</text>
|
||||||
|
</view>
|
||||||
|
<text class='title'>{{item.title}}</text>
|
||||||
|
<image class='post-image' src='{{item.imgSrc}}'></image>
|
||||||
|
<text class='content'>{{item.content}} </text>
|
||||||
|
<view class='like'>
|
||||||
|
<image class='like-image' src='/static/img/chat.png'></image>
|
||||||
|
<text class='like-font'>{{item.collection}}</text>
|
||||||
|
<image class='like-image' src='/static/img/view.png'></image>
|
||||||
|
<text class='like-font'>{{item.reading}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</view>
|
@ -0,0 +1,32 @@
|
|||||||
|
@import '/pages/popular/popular.wxss';
|
||||||
|
@import '/pages/talking/talking.wxss';
|
||||||
|
.tab-header {
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
display: table;
|
||||||
|
width: 750rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
/* margin-bottom: 80prx; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-header-item {
|
||||||
|
display: table-cell;
|
||||||
|
height: 80rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-header-item:active {
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-header-active {
|
||||||
|
border-bottom: 4rpx solid #47a86c;
|
||||||
|
}
|
||||||
|
.movie-list,.middle{
|
||||||
|
margin-top: 80rpx;
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
// pages/favorite/favorite.js
|
||||||
|
var app = getApp()
|
||||||
|
Page({
|
||||||
|
data: {
|
||||||
|
moviearray:[],
|
||||||
|
talkarray:[],
|
||||||
|
show: 'movie_favorite',
|
||||||
|
},
|
||||||
|
onLoad: function (options) {
|
||||||
|
app.MovieHistoryRefresh()
|
||||||
|
app.TalkHistoryRefresh()
|
||||||
|
// console.log(app.globalData.moviearray)
|
||||||
|
this.setData({
|
||||||
|
moviearray: app.globalData.moviehistoryarray,
|
||||||
|
talkarray: app.globalData.talkhistoryarray
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onPullDownRefresh: function () {
|
||||||
|
this.onLoad()
|
||||||
|
},
|
||||||
|
jumpBtnMovie:function(options){
|
||||||
|
var postId = options.currentTarget.dataset.postid;
|
||||||
|
wx.navigateTo({
|
||||||
|
url: '/pages/moviemore/moviemore?id='+postId,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
jumpBtnTalk: function (options) {
|
||||||
|
var postId = options.currentTarget.dataset.postid;
|
||||||
|
wx.navigateTo({
|
||||||
|
url: '/pages/talkingmore/talkingmore?id=' + postId
|
||||||
|
})
|
||||||
|
},
|
||||||
|
changeViewType: function(e) {
|
||||||
|
var data = e.currentTarget.dataset
|
||||||
|
this.setData({
|
||||||
|
show: data.type,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"navigationBarTitleText": "历史记录"
|
||||||
|
}
|
@ -0,0 +1,43 @@
|
|||||||
|
<view class="tab-header">
|
||||||
|
<view class="tab-header-item {{show == 'movie_favorite' ? 'tab-header-active' : ''}}" data-type="movie_favorite" bindtap="changeViewType">数学达人</view>
|
||||||
|
<view class="tab-header-item {{show == 'talk_favorite' ? 'tab-header-active' : ''}}" data-type="talk_favorite" bindtap="changeViewType">文章</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="tab-content-item" hidden="{{show == 'movie_favorite' ? false : true}}">
|
||||||
|
<view class="movie-list">
|
||||||
|
<block class="movie-list-ul" wx:for="{{moviearray}}" wx:for-item="item" wx:key="*this">
|
||||||
|
<view class="movie-list-li" bindtap="jumpBtnMovie" data-postId='{{item.postId}}'>
|
||||||
|
<view class="item-top"><image src='{{item.img}}'></image></view>
|
||||||
|
<view class="item-bottom">
|
||||||
|
<view>{{item.title}}</view>
|
||||||
|
<text>{{item.score}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="tab-content-item" hidden="{{show == 'talk_favorite' ? false : true}}">
|
||||||
|
<view>
|
||||||
|
<block wx:for="{{talkarray}}" wx:for-item="item" wx:key="*this">
|
||||||
|
<view catchtap='jumpBtnTalk' data-postId='{{item.postId}}'>
|
||||||
|
<view class='middle'>
|
||||||
|
<view class='author-date'>
|
||||||
|
<image class='author' src='{{item.avatar}}'></image>
|
||||||
|
<text class='date'>{{item.author}}</text>
|
||||||
|
<text class='date'>{{item.date}}</text>
|
||||||
|
</view>
|
||||||
|
<text class='title'>{{item.title}}</text>
|
||||||
|
<image class='post-image' src='{{item.imgSrc}}'></image>
|
||||||
|
<text class='content'>{{item.content}} </text>
|
||||||
|
<view class='like'>
|
||||||
|
<image class='like-image' src='/static/img/chat.png'></image>
|
||||||
|
<text class='like-font'>{{item.collection}}</text>
|
||||||
|
<image class='like-image' src='/static/img/view.png'></image>
|
||||||
|
<text class='like-font'>{{item.reading}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</view>
|
@ -0,0 +1,32 @@
|
|||||||
|
@import '/pages/popular/popular.wxss';
|
||||||
|
@import '/pages/talking/talking.wxss';
|
||||||
|
.tab-header {
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
display: table;
|
||||||
|
width: 750rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
/* margin-bottom: 80prx; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-header-item {
|
||||||
|
display: table-cell;
|
||||||
|
height: 80rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-header-item:active {
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-header-active {
|
||||||
|
border-bottom: 4rpx solid #47a86c;
|
||||||
|
}
|
||||||
|
.movie-list,.middle{
|
||||||
|
margin-top: 80rpx;
|
||||||
|
}
|
@ -0,0 +1,67 @@
|
|||||||
|
Page({
|
||||||
|
data: {
|
||||||
|
list: [{
|
||||||
|
id: '1001',
|
||||||
|
title: '中国古代数学科普',
|
||||||
|
videoUrl: '/static/img/123.mp4'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '1002',
|
||||||
|
title: '中国古代数学科普',
|
||||||
|
videoUrl: '/static/img/123.mp4'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '1003',
|
||||||
|
title: '当中国古代数学科普',
|
||||||
|
videoUrl: '/static/img/123.mp4'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '1004',
|
||||||
|
title: '当中国古代数学科普',
|
||||||
|
videoUrl: '/static/img/123.mp4'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
// 创建视频上下文
|
||||||
|
videoCtx: wx.createVideoContext('myVideo'),
|
||||||
|
|
||||||
|
playVideo: function(e) {
|
||||||
|
// 停止之前正在播放的视频
|
||||||
|
this.videoCtx.stop();
|
||||||
|
// 更新视频地址
|
||||||
|
this.setData({
|
||||||
|
src: e.currentTarget.dataset.url
|
||||||
|
});
|
||||||
|
// 播放新的视频
|
||||||
|
this.videoCtx.play();
|
||||||
|
},
|
||||||
|
|
||||||
|
getDanmu: function(e) {
|
||||||
|
this.setData({
|
||||||
|
danmuTxt: e.detail.value
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送弹幕
|
||||||
|
*/
|
||||||
|
sendDanmu: function(e) {
|
||||||
|
let text = this.data.danmuTxt;
|
||||||
|
this.videoCtx.sendDanmu({
|
||||||
|
text: text,
|
||||||
|
color: this.getRandomColor() // 使用 this.getRandomColor() 调用函数
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 定义 getRandomColor 函数
|
||||||
|
getRandomColor: function() {
|
||||||
|
let rgb = [];
|
||||||
|
for (let i = 0; i < 3; i++) {
|
||||||
|
let color = Math.floor(Math.random() * 256).toString(16);
|
||||||
|
color = color.length == 1 ? '0' + color : color;
|
||||||
|
rgb.push(color);
|
||||||
|
}
|
||||||
|
return '#' + rgb.join('');
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
/* pages/ii/ii.wxss */
|
||||||
|
video{
|
||||||
|
width:100%; /*视频组件宽度为100%*/
|
||||||
|
}
|
||||||
|
.danmuArea {
|
||||||
|
display: flex; /*flex模型布局*/
|
||||||
|
flex-direction:row; /*水平方向排列*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/*2-2文本输入框样式*/
|
||||||
|
input {
|
||||||
|
border:1rpx solid #08cfdd; /*1rpx宽的实线棕色边框*/
|
||||||
|
flex-grow:1; /*扩张多余空间宽度*/
|
||||||
|
height:90rpx; /*高度*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/*2-3按钮样式*/
|
||||||
|
button {
|
||||||
|
color:rgb(233, 240, 239); /*字体颜色*/
|
||||||
|
background-color:#4f9986; /*背景颜色*/
|
||||||
|
}
|
||||||
|
.videoList {
|
||||||
|
width:100%; /*宽度*/
|
||||||
|
min-height:400rpx; /*最小高度*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/*3-2单行列表区域样式*/
|
||||||
|
.videoBar {
|
||||||
|
width:95%; /*宽度*/
|
||||||
|
display: flex; /*flex模型布局*/
|
||||||
|
flex-direction:row; /*水平方向布局*/
|
||||||
|
border-bottom:1rpx solid #4f9986; /*1rpx宽的实线棕色边框*/
|
||||||
|
margin:10rpx; /*外边距*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/*3-3播放图标样式*/
|
||||||
|
image {
|
||||||
|
width:70rpx; /*宽度*/
|
||||||
|
height:70rpx; /*高度*/
|
||||||
|
margin: 20rpx; /*外边距*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/*3-4文本标题样式*/
|
||||||
|
text {
|
||||||
|
font-size:30rpx; /*字体大小*/
|
||||||
|
color: #4f9986; /*字体颜色为棕色*/
|
||||||
|
margin: 20rpx; /*外边距*/
|
||||||
|
flex-grow:1; /*扩张多余空间宽度*/
|
||||||
|
}
|
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.6 KiB |
@ -0,0 +1,82 @@
|
|||||||
|
// pages/moviemore/moviemore.js
|
||||||
|
var moviesInfo = require('../../data/movieInfo.js');
|
||||||
|
var app = getApp()
|
||||||
|
Page({
|
||||||
|
data: {
|
||||||
|
collected: false,
|
||||||
|
history:[]
|
||||||
|
},
|
||||||
|
onLoad: function (options) {
|
||||||
|
var postId = options.id;
|
||||||
|
this.data.currentPostId = postId;
|
||||||
|
var movieInfo = moviesInfo.postList[postId];
|
||||||
|
// console.log(postId)
|
||||||
|
this.setData({
|
||||||
|
movieInfo: movieInfo
|
||||||
|
})
|
||||||
|
// 收藏
|
||||||
|
var postsCollected = wx.getStorageSync("posts_collected");
|
||||||
|
console.log(postsCollected)
|
||||||
|
if (postsCollected) {
|
||||||
|
var postCollected = postsCollected[postId]
|
||||||
|
this.setData({
|
||||||
|
collected: postCollected
|
||||||
|
})
|
||||||
|
|
||||||
|
} else {
|
||||||
|
var postsCollected = {};
|
||||||
|
postsCollected[postId] = false;
|
||||||
|
wx.setStorageSync("posts_collected", postsCollected)
|
||||||
|
}
|
||||||
|
// 历史
|
||||||
|
var historyslist = wx.getStorageSync("historys_list");
|
||||||
|
if(!historyslist){
|
||||||
|
var history=this.data.history;
|
||||||
|
wx.setStorageSync('historys_list', history);
|
||||||
|
}
|
||||||
|
for(var i=0;i<historyslist.length;i++){
|
||||||
|
if(historyslist[i]==postId)
|
||||||
|
historyslist.splice(i,1);
|
||||||
|
}
|
||||||
|
historyslist.unshift(postId);
|
||||||
|
console.log("history:"+historyslist);
|
||||||
|
wx.setStorageSync('historys_list', historyslist);
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
onColletionTap: function (event) {
|
||||||
|
this.getPostsCollectedAsy();
|
||||||
|
},
|
||||||
|
|
||||||
|
getPostsCollectedAsy: function () {
|
||||||
|
var that = this;
|
||||||
|
wx.getStorage({
|
||||||
|
key: 'posts_collected',
|
||||||
|
success: function (res) {
|
||||||
|
var postsCollected = res.data;
|
||||||
|
var postCollected = postsCollected[that.data.currentPostId];
|
||||||
|
|
||||||
|
postCollected = !postCollected;
|
||||||
|
postsCollected[that.data.currentPostId] = postCollected;
|
||||||
|
|
||||||
|
that.showToast(postsCollected, postCollected)
|
||||||
|
},
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
showToast: function (postsCollected, postCollected) {
|
||||||
|
wx.setStorageSync('posts_collected', postsCollected);
|
||||||
|
|
||||||
|
this.setData({
|
||||||
|
collected: postCollected
|
||||||
|
})
|
||||||
|
|
||||||
|
wx.showToast({
|
||||||
|
title: postCollected ? '收藏成功' : '取消成功',
|
||||||
|
duration: 800,
|
||||||
|
icon: "success"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
})
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
<!--pages/moviemore/moviemore.wxml-->
|
||||||
|
<view class="top">
|
||||||
|
<view class="top-background" style="background-image: url({{movieInfo.img}})"></view>
|
||||||
|
<image src="{{movieInfo.img}}" class="top-background-cover"></image>
|
||||||
|
<view class="top-content">
|
||||||
|
<view class="top-title">{{movieInfo.title}}</view>
|
||||||
|
<view class="top-txt">作者:{{movieInfo.director}}</view>
|
||||||
|
<view class="top-txt">出版社:{{movieInfo.actor}}</view>
|
||||||
|
<view class="top-txt">内容评分:
|
||||||
|
<block wx:if="{{movieInfo.score == 0}}">
|
||||||
|
暂无评分
|
||||||
|
</block>
|
||||||
|
<block wx:else>{{movieInfo.score}}分</block>
|
||||||
|
</view>
|
||||||
|
<view class="top-txt">发行时间:{{movieInfo.year}}年</view>
|
||||||
|
</view>
|
||||||
|
<view class="top-favorite {{collected ? 'top-favorite-active' : ''}}" bindtap="onColletionTap">收藏</view>
|
||||||
|
</view>
|
||||||
|
<view class="middle">
|
||||||
|
<view class="middle-item">
|
||||||
|
<view class="middle-item-num">{{movieInfo.saw_count}}</view>
|
||||||
|
<view class="middle-item-title">看过</view>
|
||||||
|
</view>
|
||||||
|
<view class="middle-item">
|
||||||
|
<view class="middle-item-num">{{movieInfo.want_count}}</view>
|
||||||
|
<view class="middle-item-title">已收藏</view>
|
||||||
|
</view>
|
||||||
|
<view class="middle-item">
|
||||||
|
<view class="middle-item-num">{{movieInfo.ratings_count}}</view>
|
||||||
|
<view class="middle-item-title">浏览量</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bottom">
|
||||||
|
<view class="bottom-title">简介</view>
|
||||||
|
<view class="bottom-content">{{movieInfo.content}}</view>
|
||||||
|
</view>
|
@ -0,0 +1,140 @@
|
|||||||
|
/* pages/moviemore/moviemore.wxss */
|
||||||
|
.top {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 600rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-content: center;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top:before {
|
||||||
|
content: '';
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
z-index: -1;
|
||||||
|
width: 100%;
|
||||||
|
height: 600rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-background {
|
||||||
|
position: absolute;
|
||||||
|
z-index: -2;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 600rpx;
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
|
filter: blur(30rpx);
|
||||||
|
transform: scale(1.2);
|
||||||
|
}
|
||||||
|
.top-background-cover {
|
||||||
|
z-index: 9999;
|
||||||
|
width: 300rpx;
|
||||||
|
height: 420rpx;
|
||||||
|
margin-top: 80rpx;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
box-shadow: 0 30rpx 150rpx rgba(255, 255, 255, .3)
|
||||||
|
}
|
||||||
|
.top-favorite {
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 99;
|
||||||
|
bottom: 30rpx;
|
||||||
|
left: 120rpx;
|
||||||
|
width: 160rpx;
|
||||||
|
padding: 10rpx 30rpx;
|
||||||
|
padding-left: 60rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
line-height: 1;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
border: 1px solid #fff;
|
||||||
|
background-position: 20rpx center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAC7klEQVRoQ9WagXHUMBBF91dAUgFQAVABXAWQCoAKCBUQKiBXAVwFIRWQVEBSAVwFHBUs849VJtzZ1kpac7ZmPHMzZ0n/SdZfeWXICEVVj0Tkk4i8EZGNiHwVkfcA+Du0ILQ1a0xVv4vI0522rwAsovsLB1BVjvrnHqFvAXyJhBgD4IeIPOoReQPg2WQBMqOfdC8AXEVBhM6Aqn4TkRcZcaFrIQxAVSmcAJ4SNguRAJ7RT3ArAFzszSUEQFVpmbTOkvIYwM+SCl33RgHQGl8XigmZhWYAVaVl0jprynFrdI4AqBn9BPsRwFkNearTBGB7nl8NArg34lqo3iNVAZjwJyLySkROGwBY9ZybPQDXNe0MApi7PLDgxGedFx2Hu80xCmfixi7+ZsReD7nVHYCqvjRxDEgUuLubHENwSZsEo+1uAQFcsjLscWAQmprgHBxBFgRocZFcJ2P/vyIAXWSsZ3psgA0BuFi4UOdY1gSgjb2bo3oRWaZFTLuir8+p3NLetzZqTjQniL/igc39OMCFPAeINS0/bT/+icQWeQkx1UX920aeMWBb9rYSE4bYE98JYGuCUXlKM9EpvhdgYhC94gcBJgIxKD4LcGCIrHgXwD2I0qxDS1B0iXcDGIS2KCqtC8D1tui6qTLvU6p5935X3sgLUJI2bBWe6rvSj14Apj4+RClztuNKuXgBDvHW5srceQEYlZ87Ry7qtmsAuVT9/l6oq3dV/a8OZBo2AI5zo5GdgcbcZ67/3P/Z3KkH4BAO5HYiD8AhHCgB8GyZ7+y9xQPQ4kDcErDUviAtAQzmXj0ANQ5E4Ry5NHoUwasUJOtEHoDSxNdSRM52U+aWOCBQyUlO1ok8AF4LXZnwwXMvczWuKxdIblPnAaCghwPriHn9UwB3L9o5b7TdLd2NIEMBkqn1vlP/bTceAB5iXHSIonA+Kk2n7na+zEerK7F2AoBfutS7kI0WITha7IRJpfPojzbsMwUu9NQHB2dQPLX9AbQjJU2PHjqcAAAAAElFTkSuQmCC);
|
||||||
|
background-size: 32rpx;
|
||||||
|
color: #fff;
|
||||||
|
transition: left .3s, color .3s, background-image .3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-favorite-active {
|
||||||
|
left: 100rpx;
|
||||||
|
width: 190rpx;
|
||||||
|
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAADk0lEQVRoQ9Wa0VLaQBSGzwmNU00YZUbjZfFO6IX0CYpPUPsEtU9QfIKmT1B8guoT1D6B+ATFiwJ3wqWpM9ABsVNrTuckwakI2U2yKWkuyWbP/+1m/z17AkIKF/WLa9e3Kx8BYJ8ABghwYujjAyx0B6rDoeoOub+RU/4KAJWHfVPDtNq7quMpBxg52/sA2qfZQt23ptU5UgmhHuCydAGIxTkim6bVepFZgPDR92UTurv5jU5DFYTSGRg5pVMArIaLU7sWlAEMv29XkbRTmZFVOQvKAORGf4JHx6bV3peBFbVRAjBynlcAiK1T+srp7tZyodOVfmBOQ0UApSMAfBNNjJpZSAxw098u3t1qF9HE+60NfVxIujsnBhg5cUY/sFSCD/nNlh0HfvJMIoAg5+nHFcB5kqmPt5LMQiwAFv7z99OdO8I9AKzFBQjmoZ5DOlne6JzF6ScUgN0lh3erLmhVIigCUJEAKwiwFieY6Bk/c6UmADQRcaCB24An0Atzq3uA66vyKyCoEFEVAFngVDYpCp/6/SYRdTUNm4DQNNZbXzgiBu8x76BZEywakaahj3cxiYuIIqR/n45x6JT7ab3TaQN4a2bolAYIuJp2sFT6J+rxK1QHwHepBEi9UzqcLGI+YOykHk9tgHNDH1c9Gw2c6H+C8MUXulzxCPZDvxSSfQiinrF0U5mkHw92Yt55CdxGVhc1Af1A0Kqm9Y13a+96lEpkFWKW+JkA/GPWIOaJnwuQJYgw8aEAWYAQiRcCLBJCRrwUwAQiatUhyZ4lK14awIcoUxJRUZ81rZbUaVGqUZy6T1TB0+1l60ZSAFHKhkmF32cGkkVgOYDLso0I71WJk+mHJEsuUgCLObXJVe6kAIZOifOjlzIjp6oNAZ3lrbagVD8jF5ol4F87EGvg42LeahVEAyKcgSS1T1Fw0X2Z2qkQYBEOFMWJxAALcKD7mUE6MDfa9bCZEgIkcSBOCfztPm7Vgw5Nqx1aexUCxHEgTzhh3Vwae6M3+rVSA6RaVBAZJ5IAiFr4okNDv7GnS+Z+4WCZSzjSX3JknEgIIG+hdJzTyRZ99/JdDW1ZEFFSJwa4LHUB8dm8hcTTjKDV/j5oi+yR77O7AaEdukES9czN9ryv/l4YIcD1VWmPXPw8LYqFA5Kd9Kt7YNO8Vh4V1lCj18Z6+ySRC/HDAQR/y+Ig5wBuXfWfNoK/KbDjeDFQI1sknrX9Ae1as5bu7R6bAAAAAElFTkSuQmCC);
|
||||||
|
color: #f4ea2a;
|
||||||
|
border: 1px solid #f4ea2a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-favorite-active::before {
|
||||||
|
content: '已'
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-content {
|
||||||
|
z-index: 2;
|
||||||
|
width: 320rpx;
|
||||||
|
margin-top: 80rpx;
|
||||||
|
margin-left: 40rpx;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-title {
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
font-size: 42rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-txt {
|
||||||
|
margin-bottom: 18rpx;
|
||||||
|
color: #eee;
|
||||||
|
}
|
||||||
|
/* 华丽的分割线 */
|
||||||
|
.middle {
|
||||||
|
display: flex;
|
||||||
|
height: 150rpx;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
border-bottom: 1px solid #f4f4f4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.middle-item {
|
||||||
|
width: 33.33%;
|
||||||
|
text-align: center;
|
||||||
|
border-left: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.middle-item:first-child {
|
||||||
|
border-left: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.middle-item-num {
|
||||||
|
font-size: 40rpx;
|
||||||
|
font-weight: 100;
|
||||||
|
color: #444;
|
||||||
|
}
|
||||||
|
|
||||||
|
.middle-item-title {
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
/* 华丽的分割线 */
|
||||||
|
.bottom {
|
||||||
|
padding: 0 40rpx 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom-title {
|
||||||
|
padding-left: 20rpx;
|
||||||
|
margin-top: 40rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #444;
|
||||||
|
border-left: 10rpx solid #47a86c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom-content {
|
||||||
|
text-align: justify;
|
||||||
|
line-height: 1.5;
|
||||||
|
color: #666;
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
const app = getApp()
|
||||||
|
Page({
|
||||||
|
data:{
|
||||||
|
userInfo: {},
|
||||||
|
hasUserInfo: false,
|
||||||
|
canIUse: wx.canIUse('button.open-type.getUserInfo'),
|
||||||
|
gridList: [
|
||||||
|
{enName:'favorite', zhName:'收藏'},
|
||||||
|
{enName:'history', zhName:'浏览记录'},
|
||||||
|
{enName:'photo', zhName:'相册'},
|
||||||
|
|
||||||
|
],
|
||||||
|
skin: ''
|
||||||
|
},
|
||||||
|
onLoad: function () {
|
||||||
|
if (app.globalData.userInfo) {
|
||||||
|
this.setData({
|
||||||
|
userInfo: app.globalData.userInfo,
|
||||||
|
hasUserInfo: true
|
||||||
|
})
|
||||||
|
} else if (this.data.canIUse){
|
||||||
|
// 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
|
||||||
|
// 所以此处加入 callback 以防止这种情况
|
||||||
|
app.userInfoReadyCallback = res => {
|
||||||
|
this.setData({
|
||||||
|
userInfo: res.userInfo,
|
||||||
|
hasUserInfo: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 在没有 open-type=getUserInfo 版本的兼容处理
|
||||||
|
wx.getUserInfo({
|
||||||
|
success: res => {
|
||||||
|
app.globalData.userInfo = res.userInfo
|
||||||
|
this.setData({
|
||||||
|
userInfo: res.userInfo,
|
||||||
|
hasUserInfo: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
getUserInfo: function(e) {
|
||||||
|
console.log(e)
|
||||||
|
app.globalData.userInfo = e.detail.userInfo
|
||||||
|
this.setData({
|
||||||
|
userInfo: e.detail.userInfo,
|
||||||
|
hasUserInfo: true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onShow:function(){
|
||||||
|
var that = this
|
||||||
|
wx.getStorage({
|
||||||
|
key: 'skin',
|
||||||
|
success: function(res){
|
||||||
|
if (res.data == "") {
|
||||||
|
that.setData({
|
||||||
|
skin: config.skinList[0].imgUrl
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
that.setData({
|
||||||
|
skin: res.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onPullDownRefresh: function() {
|
||||||
|
this.onLoad(function(){
|
||||||
|
wx.stopPullDownRefresh()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
viewGridDetail: function(e) {
|
||||||
|
var data = e.currentTarget.dataset
|
||||||
|
wx.navigateTo({
|
||||||
|
url: "../" + data.url + '/' + data.url
|
||||||
|
})
|
||||||
|
},
|
||||||
|
viewSkin: function() {
|
||||||
|
wx.navigateTo({
|
||||||
|
url: "/pages/skin/skin"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"navigationBarTitleText": "我的"
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
<view class="my">
|
||||||
|
<view class="userinfo" style="background-image: url({{skin}})">
|
||||||
|
<view class="user-skin" bindtap="viewSkin"></view>
|
||||||
|
<button class="userbutton" wx:if="{{!hasUserInfo && canIUse}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo"> 获取头像昵称 </button>
|
||||||
|
<block wx:else>
|
||||||
|
<image bindtap="bindViewTap" class="userinfo-avatar" src="{{userInfo.avatarUrl}}" mode="cover"></image>
|
||||||
|
<text class="userinfo-nickname">{{userInfo.nickName}}</text>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
<view class="grids">
|
||||||
|
<block wx:for="{{gridList}}" wx:for-item="gridItem" wx:for-index="gridIndex" wx:key="grid">
|
||||||
|
<view class="grid" bindtap="viewGridDetail" data-url="{{gridItem.enName}}">
|
||||||
|
<view class="grid-icon grid-icon-{{gridItem.enName}}"></view>
|
||||||
|
<view class="grid-title">{{gridItem.zhName}}</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</view>
|
@ -0,0 +1,119 @@
|
|||||||
|
.userinfo {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 200px;
|
||||||
|
background-size: 120%;
|
||||||
|
}
|
||||||
|
.userinfo-avatar {
|
||||||
|
width: 128rpx;
|
||||||
|
height: 128rpx;
|
||||||
|
margin: 20rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.userinfo-nickname {
|
||||||
|
color: #aaa;
|
||||||
|
}
|
||||||
|
.user-skin {
|
||||||
|
position: absolute;
|
||||||
|
top: 20rpx;
|
||||||
|
right: 20rpx;
|
||||||
|
width: 60rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
border: 4rpx solid #fff;
|
||||||
|
border-radius: 60rpx;
|
||||||
|
background-color: rgba(0, 0, 0, .3);
|
||||||
|
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACHElEQVRoQ+2YfVXDMBTF71MADgAFMAdMAThgUwA42BwMB5sCQAE4YCgAHODgce5Idto0adJ26ygn+bMnee/+3lfTCga+ZOD6kQEOncGcgZyBjhHoVEKqegHgyGj4EpHPFD2qegrgpOk5n+1GAKp6DOAKwATApWNwLSKjRIA3AIQvricASxF5TrFh9yQDqOotgBkAQoTWWERe6wSoKsFfavasAdzH7CQDmKg/eiLu0/ANYBQqJVM6jH5dEKzdmYjMY9mozYCpcUYrxaH1RQg6fyg6T8ygq5dlNRUR2vSuIEBL8a4T29Rs2raLJcXS9EJ4AXYkvq1g37nggKgAmJpn2bhTYpeC2tjihJq6B30AbNjrNh56OMPptCj6KQGoKoUT4C8vTjn2xWZtAUzpfDScOIcA5WAgxKapiwBLADeHUNTC51xE+FL9BTAvGEZ/SOuML0wLwBcVrwDnAyF4582AZeT2wBAgtuJLPWBKKSUTNLCvTMVsl8RXABIgVrzyRm6TXapwbK7qvmFSEe8FqIFYicgk4TrcCYDXaFV1J6JXfBDAA7ERb57H7vOdAYwfCxEUXwtQgLizM7dPAOOLs37R6jodCmMfJdQkhcmflNZoBqgPb/Sb2j2eM9CkXhP25gxEg5SbODdxOQJ5CkWbptmGPIWi8foPU4hfbfv6a8dfiMEfub7oNm7iaIp63pABeg54xV3OQM5AxwgMvoR+AMyi8zFvBJhOAAAAAElFTkSuQmCC);
|
||||||
|
background-position: center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: 40rpx;
|
||||||
|
}
|
||||||
|
.grids {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grids::before, .grid::before, .grids::after, .grid::after {
|
||||||
|
content: '';
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 99;
|
||||||
|
background-color: #ccc;
|
||||||
|
}
|
||||||
|
.grids::before, .grid::before {
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 1px;
|
||||||
|
transform: scaleY(0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.grids::before {
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid::before {
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grids::after, .grid::after {
|
||||||
|
top: 0;
|
||||||
|
height: 100%;
|
||||||
|
width: 1px;
|
||||||
|
transform: scaleX(0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.grids::after {
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid::after {
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid {
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
width: 250rpx;
|
||||||
|
height: 250rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid:active {
|
||||||
|
background-color: #fafafa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid-icon {
|
||||||
|
width: 80rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
background-position: center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid-icon-favorite {
|
||||||
|
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIcAAACACAYAAAAh4nqyAAAMMUlEQVR4Xu2d3XnbOBaGv0PlYmctP5upYJQKRqkgTgVjy3sfp4JQFcSpQEwFce5XiqeCOBWMXMHIF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ceIE2BcJ/fzIns38x/7vxDAUJ9JCH4njZQRUFexVfsjv9QBEX6NW0kYYdQ4HkjDMOhSqaYtMRpG7LdC4W+Dkc57dC2tNdKEnY/r67o6+wA0z0RdlQudMw+tl09aCfJHJ64Y1aFOXNOhwLkhSRlK8hVyVdyI8mCLClu+NaA4C152FbZVmsY29oucidJIWSJMvZZJSP33SUHqhZGkiWysGvm2wDUzO7g0jV5XtetHDkwY6nLwkmyPJ3oi23YQIIGIKv/JarMQ/cAOCSkUZbyUflCal/vpZJkFU5+qjqvfRbOXrLicWxbzdvlWP/MPrXqnZFRJNE7NdebLgQcSXQhaXE/jiQWK1fX1BxJdCFpcT+OJBYrV9fUHEl0IWlxP44kFitX19QcSXQhaXE/jiQWK1fX1BxJdCFpcT+OJBYrV9fUHEl0IWlxP44kFitX19S0kYSVaxjUe2rXfOiajesnFwSiOvRwkdT5vBxW4m3f7FbIoN5/k4uUrtNSEfDHra7ovptBvYd4PG6NRDdoEoRHJt/MUCrSFR08vpP5TiQ+J4k/aXVEF+pEFxKHx44oIkir8Vz+rkG6HtT7TYyvvfgqMz1evMaDGyD6IdPetTEQAeK3gzZkJJvfzoGs8fH4ZGpuKqfMdFybPBCgcPaKZUhykmS97iIPAV2fpSOw2NVykvDVZHKSuMspXWQnQIEI0D3VavvzciELkkTerncjTn8oUFY3VCkIrO5mFyThZmfyWxPBuypFMjeoEQisu0ruCUli/+QQ2S5GmFBlxJycEBoR2FRr/xlJOFGY6UEvEB2yaZTPdVUuAokJ+WtJMpc3+gAUtgHwfblzcKPngoBkQn4iSRZkmadpUrgPBDpqnOUyZ9epBAKEP2AHb9Kk10qRRGJo18RiBP4PU7nn6i4fPwAAAAAASUVORK5CYII=);
|
||||||
|
}
|
||||||
|
.grid-title {
|
||||||
|
width: 100%;
|
||||||
|
color: #666;
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
Page({
|
||||||
|
data:{
|
||||||
|
pictures: [],
|
||||||
|
nullTip: {
|
||||||
|
tipText: '亲,没有上传照片哦',
|
||||||
|
actionText: '上传',
|
||||||
|
fn: 'uploadImg'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad:function(options){
|
||||||
|
var that = this
|
||||||
|
wx.getStorage({
|
||||||
|
key: 'gallery',
|
||||||
|
success: function(res){
|
||||||
|
that.setData({
|
||||||
|
pictures: res.data,
|
||||||
|
})
|
||||||
|
console.log(res.data)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
uploadImg: function() {
|
||||||
|
var that = this
|
||||||
|
wx.chooseImage({
|
||||||
|
count: 1,
|
||||||
|
success: function(res) {
|
||||||
|
var tempFilePath = res.tempFilePaths[0]
|
||||||
|
wx.saveFile({
|
||||||
|
tempFilePath: tempFilePath,
|
||||||
|
success: function(res) {
|
||||||
|
var savedFilePath = res.savedFilePath
|
||||||
|
console.log(savedFilePath)
|
||||||
|
that.setData({
|
||||||
|
pictures: that.data.pictures.concat(savedFilePath)
|
||||||
|
})
|
||||||
|
wx.setStorage({
|
||||||
|
key: 'gallery',
|
||||||
|
data: that.data.pictures
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
previewImage: function(e) {
|
||||||
|
var data = e.currentTarget.dataset
|
||||||
|
var index = data.index
|
||||||
|
var that = this
|
||||||
|
wx.previewImage({
|
||||||
|
current: that.data.pictures[index], // 当前显示图片的链接,不填则默认为 urls 的第一张
|
||||||
|
urls: that.data.pictures
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"navigationBarTitleText": "相册",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
<block wx:if="{{pictures.length == 0}}">
|
||||||
|
<view class="null-tip">{{nullTip.tipText}}</view>
|
||||||
|
<block wx:if="{{nullTip.routeUrl == undefined}}">
|
||||||
|
<view bindtap="{{nullTip.fn}}" class="null-action">{{nullTip.actionText}}</view>
|
||||||
|
</block>
|
||||||
|
<block wx:else>
|
||||||
|
<navigator url="{{nullTip.routeUrl}}" class="null-action">{{nullTip.actionText}}</navigator>
|
||||||
|
</block>
|
||||||
|
</block>
|
||||||
|
<block wx:else>
|
||||||
|
<view class="photo">
|
||||||
|
<block wx:for="{{pictures}}" wx:for-item="picturesItem" wx:for-index="picturesIndex" wx:key="pictures">
|
||||||
|
<view class="photo-item">
|
||||||
|
<image class="photo-item-cover" src="{{picturesItem}}" mode="aspectFill" data-index="{{picturesIndex}}" bindtap="previewImage"></image>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
<view bindtap="uploadImg" class="null-action">上传</view>
|
||||||
|
</block>
|
@ -0,0 +1,75 @@
|
|||||||
|
.photo {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin-bottom: 60rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.photo::before, .photo::after, .photo-item::before, .photo-item::after {
|
||||||
|
content: '';
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
background-color: #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.photo::before, .photo::after {
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.photo::before, .photo::after {
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.photo::before, .photo-item::before {
|
||||||
|
width: 100%;
|
||||||
|
height: 1px;
|
||||||
|
transform: scaleY(0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.photo::after, .photo-item::after {
|
||||||
|
width: 1px;
|
||||||
|
height: 100%;
|
||||||
|
transform: scaleX(0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.photo-item {
|
||||||
|
width: 250rpx;
|
||||||
|
height: 250rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.photo-item-cover {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.null-tip {
|
||||||
|
height: 400rpx;
|
||||||
|
margin: 120rpx 0;
|
||||||
|
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJ8AAACACAYAAAAVm7uuAAALUUlEQVR4Xu2dXXITORDHR04x5m3hBBtOsHACkhMsOcEmL2j8BJxg4QQLT7Z4CTkB4QQbTkD2BIQTbPIGoSJtdUpmja3vkTxjz99VKaiyPlrdP+uj1ZKYEEJV+EADa9aAlHKfAb41ax3V3WoA8AGEzjQA+DpTPSoGfGCgMw244PtYVdVZZ5Kh4m3SwG5VVX8sN8gF3yvO+ctt0gDa0o0GptPp3mg0+hvwdaP/QdcK+AZt/m4bD/i61f+gawd8gzZ/t40HfN3qf9C1A75Bm7/bxgO+bvU/6NoB36DN323ji8EnhKBdkMeBzfvIOd8zpY2JrCHP+GQyWdl9iSmjqio40QON1jYZ4FvVIOBrS1VgfsAH+AJRyZ8M8AG+/FQFlgj4AF8gKvmTFYPv7du3D29ubu6FiLyzs3P59OnTc1NaEjCkDEpz9+7d86Ojo8vl9DFlVFV1MZlMLkLrRLp0DRSDL10k5ByKBgDfUCzdw3YCvh4aZSgiAb6hWLqH7QR8PTTKUEQCfEOxdA/bCfh6aJShiAT4hmLpHrYT8PXQKEMRCfANxdI9bGc0fEop2nrC9lMPjblpIjHGaPv14bLcuKtl0yy5RfICvi0y5qY1BfBtmsW2SF7At0XG3LSmuOD7ggXHppmzn/Iqpe4xxn6LWXDggE0/bblxUkW7WnC0cONs3FuBAV9vTbP9ggG+7bdxb1sI+Hprmu0XDPBtv41720LA11vTbL9ggG/7bdzbFgK+npmGDttLKR8zxnaVUhTxsUv/N4h5rpS6ZIzRrVwXUsqPm3bYHfD1AD4yAmOMHkOhf02ghUpJtz6cSSnfbAKIgC/UrJnTHR8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Xext6DfJVTgiFEH8opV62eN1yLQ8EAr6C8IUCqEW4fZy5rusPKS6X6XS6OxqNCLqQx6OvpJT0UOBz27MIJFPOk3EmNQO+wvBR8dqRTI8th97gcPtcPV0SxBi7uLm5+bJ4QTeVR4EEUkr6l/72Inq5j3VdP5kD7jugHhoZk6JGwJeitYQ82g1Dj8AYr0NLKDIli3G3xREccVtHqSdSAV+KCVvkIYUzxugWeNs7aC1KN2el8Cyl1HPX8wYBK/TsrhjAl93UYQVqY9NKNHQoDit4IZWG7nXoYkbDQNMD6wuVUsqDXG90AL5ok+bNoA1AjwHSfX+hz9W7hPiilDpVShF0FOga9QmIDczmigF8UaYpm1gbg16spD/fS+FzYa4odIsxRouT0xwOYt8BJYrUzrFTA/jK8tSqdILg69evi/ut9KjOj94sdDhNEUIvkGgItv4I2rpiAF+KZQaUx+eKoVfMOeevUlQC+FK0NrA8nicbgk/JLasN8A0MpNTm+lwxNO8cj8cHMbszgC/VGgPMp2/gp2cerK6Yuq73QwEEfAOEqE2Tc7piAF8bSww0LwUxkFvHsUsT5AsEfAMFqG2zA3yB3qgYwNfWCgPOHxIsQXvKTdO8MakJ8A0YnlxN9/kCbWFZgC+XBQZejs8VU1XVaV3XR4srYcA3cGhyNl8DSDGLJlcMRU8/XAx2AHw5tY+y5lHby1e2GV87B3wAJrsGDMcGjFe0Ab7sqkeBpIG5K0bHFRofvwZ8YKUzDQC+zlSPigEfGOhMA4CvM9Wj4mj49HmBYveLwCTD0YBSigIU6PDUTx+6TJNZnsAcjnbQ0k40APg6UTsqJQ0APnDQmQYAX2eqR8Vz+LCwAAtr1wBd3fYfLhCVn1HrvD4AAAAASUVORK5CYII=);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
background-size: 140rpx 112rpx;
|
||||||
|
line-height: 800rpx;
|
||||||
|
text-align: center;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.null-action {
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 200rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
border: 1px solid #47a86c;
|
||||||
|
color: #47a86c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.null-action:active {
|
||||||
|
background-color: #47a86c;
|
||||||
|
color: #fff;
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
// pages/xwdt/xwdt.js
|
||||||
|
var moviesInfo = require('../../data/movieInfo.js');
|
||||||
|
Page({
|
||||||
|
data: {
|
||||||
|
},
|
||||||
|
onLoad: function (options) {
|
||||||
|
this.setData({
|
||||||
|
posts_key: moviesInfo.postList
|
||||||
|
})
|
||||||
|
},
|
||||||
|
jumpBtn:function(options){
|
||||||
|
// console.log(options)
|
||||||
|
var postId = options.currentTarget.dataset.postid;
|
||||||
|
wx.navigateTo({
|
||||||
|
url: '/pages/moviemore/moviemore?id='+postId,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onSwiperTap: function (event) {
|
||||||
|
var postId = event.target.dataset.postid;
|
||||||
|
wx.navigateTo({
|
||||||
|
url: "/pages/moviemore/moviemore?id=" + postId
|
||||||
|
})
|
||||||
|
},
|
||||||
|
})
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"navigationBarTitleText": "中国古代数学"
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
<view >
|
||||||
|
<swiper id="gun" catchtap='onSwiperTap' vertical='{{false}}' indicator-dots='true' indicator-active-color='#fff' autoplay='true' interval='5000' circular>
|
||||||
|
<swiper-item>
|
||||||
|
<image class='roll_img' src='/static/img/111111.jpg' data-postId='0'></image>
|
||||||
|
</swiper-item>
|
||||||
|
<swiper-item>
|
||||||
|
<image class='roll_img' src="/static/img/22222.jpg" data-postId='1'></image>
|
||||||
|
</swiper-item>
|
||||||
|
<swiper-item>
|
||||||
|
<image class='roll_img' src="/static/img/33333.jpg" data-postId='2'></image>
|
||||||
|
</swiper-item>
|
||||||
|
</swiper>
|
||||||
|
</view>
|
||||||
|
<view class="movie-list">
|
||||||
|
<block class="movie-list-ul" wx:for="{{posts_key}}" wx:for-item="item" wx:key="*this">
|
||||||
|
<view class="movie-list-li" bindtap="jumpBtn" data-postId='{{item.postId}}'>
|
||||||
|
<view class="item-top">
|
||||||
|
<image src='{{item.img}}'></image>
|
||||||
|
</view>
|
||||||
|
<view class="item-bottom">
|
||||||
|
<view>{{item.title}}</view>
|
||||||
|
<text>{{item.score}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
@ -0,0 +1,44 @@
|
|||||||
|
#gun{
|
||||||
|
height: 400rpx;
|
||||||
|
}
|
||||||
|
.roll_img{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.movie-list{
|
||||||
|
box-sizing: border-box;
|
||||||
|
width: 750rpx;
|
||||||
|
padding: 10rpx 15rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
box-shadow: 0 0 40rpx #f4f4f4 inset;
|
||||||
|
}
|
||||||
|
.movie-list-li {
|
||||||
|
width: 350rpx;
|
||||||
|
height: 540rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid #e4e4e4;
|
||||||
|
box-shadow: 0 20rpx 40rpx #eee;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.item-top image{
|
||||||
|
width: 350rpx;
|
||||||
|
}
|
||||||
|
.item-bottom{
|
||||||
|
width: 300rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
.item-bottom text{
|
||||||
|
color: #e09015;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,39 @@
|
|||||||
|
var config = require('../../data/skinList.js');
|
||||||
|
Page({
|
||||||
|
data:{
|
||||||
|
skinList: config.postList,
|
||||||
|
nowSkin: ''
|
||||||
|
},
|
||||||
|
onLoad:function(options){
|
||||||
|
var that = this
|
||||||
|
wx.getStorage({
|
||||||
|
key: 'skin',
|
||||||
|
success: function(res){
|
||||||
|
if (res.data == "") {
|
||||||
|
that.setData({
|
||||||
|
nowSkin: config.skinList[0].imgUrl
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
that.setData({
|
||||||
|
nowSkin: res.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
chooseSkin: function(e) {
|
||||||
|
var url = e.currentTarget.dataset.url
|
||||||
|
wx.setStorage({
|
||||||
|
key: 'skin',
|
||||||
|
data: url,
|
||||||
|
success: function(res){
|
||||||
|
wx.navigateBack({
|
||||||
|
delta: 1,
|
||||||
|
success: function(res){
|
||||||
|
console.log('success')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"navigationBarTitleText": "背景卡"
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
<view class="skin-list">
|
||||||
|
<block wx:for="{{skinList}}" wx:for-item="skinItem" wx:for-index="skinIndex" wx:key="skin">
|
||||||
|
<view class="skin-item {{nowSkin == skinItem.imgUrl ? 'skin-item-active' : ''}}" data-url="{{skinItem.imgUrl}}" bindtap="chooseSkin">
|
||||||
|
<image src="{{skinItem.imgUrl}}" class="skin-img"></image>
|
||||||
|
<view class="skin-title">{{skinItem.title}}</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
@ -0,0 +1,60 @@
|
|||||||
|
.skin-list {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.skin-item, .skin-img {
|
||||||
|
width: 710rpx;
|
||||||
|
height: 360rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.skin-item {
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: relative;
|
||||||
|
margin: 20rpx auto;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
box-shadow: 0 20rpx 20rpx rgba(0, 0, 0, .2);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.skin-item-active {
|
||||||
|
border: 6rpx solid #47a86c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.skin-item-active::before {
|
||||||
|
content: '';
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
top: -80rpx;
|
||||||
|
right: -80rpx;
|
||||||
|
z-index: 4;
|
||||||
|
width: 160rpx;
|
||||||
|
height: 160rpx;
|
||||||
|
transform: rotate(45deg);
|
||||||
|
background-color: #47a86c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.skin-item-active::after {
|
||||||
|
content: '在用';
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
top: 5px;
|
||||||
|
right: 3px;
|
||||||
|
z-index: 4;
|
||||||
|
text-align: center;
|
||||||
|
transform: rotate(45deg);
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.skin-title {
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 80rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
padding: 0 40rpx;
|
||||||
|
background-color: rgba(0, 0, 0, .6);
|
||||||
|
border-radius: 0 0 20rpx 20rpx;
|
||||||
|
color: #fff;
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
var talksInfo = require('../../data/talkInfo.js');
|
||||||
|
Page({
|
||||||
|
|
||||||
|
|
||||||
|
onLoad: function (options) {
|
||||||
|
|
||||||
|
// this.data.posts_key = postsData.postList
|
||||||
|
this.setData({
|
||||||
|
posts_key: talksInfo.postList
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
jumpBtn: function (options) {
|
||||||
|
var postId = options.currentTarget.dataset.postid;
|
||||||
|
|
||||||
|
wx.navigateTo({
|
||||||
|
url: '/pages/talkingmore/talkingmore?id=' + postId
|
||||||
|
})
|
||||||
|
},
|
||||||
|
})
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"navigationBarTitleText": "热门资讯"
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
<view>
|
||||||
|
<block wx:for="{{posts_key}}" wx:for-item="item" wx:key="*this">
|
||||||
|
<view catchtap='jumpBtn' data-postId='{{item.postId}}'>
|
||||||
|
<view class='middle'>
|
||||||
|
<view class='author-date'>
|
||||||
|
<image class='author' src='{{item.avatar}}'></image>
|
||||||
|
<text class='date'>{{item.author}}</text>
|
||||||
|
<text class='date'>{{item.date}}</text>
|
||||||
|
</view>
|
||||||
|
<text class='title'>{{item.title}}</text>
|
||||||
|
<image class='post-image' src='{{item.imgSrc}}'></image>
|
||||||
|
<text class='content'>{{item.content}} </text>
|
||||||
|
<view class='like'>
|
||||||
|
<image class='like-image' src='/static/img/chat.png'></image>
|
||||||
|
<text class='like-font'>{{item.collection}}</text>
|
||||||
|
<image class='like-image' src='/static/img/view.png'></image>
|
||||||
|
<text class='like-font'>{{item.reading}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
@ -0,0 +1,68 @@
|
|||||||
|
.middle {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
margin-bottom: 40rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-bottom: 1px solid #ededed;
|
||||||
|
border-top: 1px solid #ededed;
|
||||||
|
padding-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.author-date {
|
||||||
|
margin: 10rpx 0 20rpx 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.author {
|
||||||
|
width: 60rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
vertical-align: middle; /*垂直居中*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.date {
|
||||||
|
margin-left: 20rpx;
|
||||||
|
vertical-align: middle;
|
||||||
|
font-size: 26rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 34rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #333;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-image {
|
||||||
|
width: 100%;
|
||||||
|
height: 340rpx;
|
||||||
|
margin-bottom: 15rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
color: #666;
|
||||||
|
font-size: 28rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
letter-spacing: 2rpx; /*文本间距*/
|
||||||
|
line-height: 40rpx; /*文本行高*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.like{
|
||||||
|
font-size: 26rpx;
|
||||||
|
flex-direction: row;
|
||||||
|
line-height: 16rpx;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.like-image{
|
||||||
|
height: 16px;
|
||||||
|
width: 16px;
|
||||||
|
margin-right: 8px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.like-font{
|
||||||
|
vertical-align: middle;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
@ -0,0 +1,75 @@
|
|||||||
|
// pages/talkingmore/talkingmore.js
|
||||||
|
var talksInfo = require('../../data/talkInfo.js');
|
||||||
|
Page({
|
||||||
|
data: {
|
||||||
|
collected: false,
|
||||||
|
history:[]
|
||||||
|
},
|
||||||
|
|
||||||
|
onLoad: function (options) {
|
||||||
|
var postId = options.id;
|
||||||
|
this.data.currentPostId = postId;
|
||||||
|
var talkInfo= talksInfo.postList[postId];
|
||||||
|
this.setData({
|
||||||
|
talkInfo: talkInfo
|
||||||
|
})
|
||||||
|
var postsCollected = wx.getStorageSync("posts_collected2");
|
||||||
|
if (postsCollected) {
|
||||||
|
var postCollected = postsCollected[postId]
|
||||||
|
this.setData({
|
||||||
|
collected: postCollected
|
||||||
|
})
|
||||||
|
|
||||||
|
} else {
|
||||||
|
var postsCollected = {};
|
||||||
|
postsCollected[postId] = false;
|
||||||
|
wx.setStorageSync("posts_collected2", postsCollected)
|
||||||
|
}
|
||||||
|
// 历史
|
||||||
|
var historyslist = wx.getStorageSync("historys_list2");
|
||||||
|
if(!historyslist){
|
||||||
|
var history=this.data.history;
|
||||||
|
wx.setStorageSync('historys_list2', history);
|
||||||
|
}
|
||||||
|
for(var i=0;i<historyslist.length;i++){
|
||||||
|
if(historyslist[i]==postId)
|
||||||
|
historyslist.splice(i,1);
|
||||||
|
}
|
||||||
|
historyslist.unshift(postId);
|
||||||
|
console.log("history:"+historyslist);
|
||||||
|
wx.setStorageSync('historys_list2', historyslist);
|
||||||
|
},
|
||||||
|
onColletionTap: function (event) {
|
||||||
|
this.getPostsCollectedAsy();
|
||||||
|
},
|
||||||
|
|
||||||
|
getPostsCollectedAsy: function () {
|
||||||
|
var that = this;
|
||||||
|
wx.getStorage({
|
||||||
|
key: 'posts_collected2',
|
||||||
|
success: function (res) {
|
||||||
|
var postsCollected = res.data;
|
||||||
|
var postCollected = postsCollected[that.data.currentPostId];
|
||||||
|
|
||||||
|
postCollected = !postCollected;
|
||||||
|
postsCollected[that.data.currentPostId] = postCollected;
|
||||||
|
|
||||||
|
that.showToast(postsCollected, postCollected)
|
||||||
|
},
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
showToast: function (postsCollected, postCollected) {
|
||||||
|
wx.setStorageSync('posts_collected2', postsCollected);
|
||||||
|
|
||||||
|
this.setData({
|
||||||
|
collected: postCollected
|
||||||
|
})
|
||||||
|
|
||||||
|
wx.showToast({
|
||||||
|
title: postCollected ? '收藏成功' : '取消成功',
|
||||||
|
duration: 800,
|
||||||
|
icon: "success"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
})
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
<!--pages/talkingmore/talkingmore.wxml-->
|
||||||
|
<view class='all'>
|
||||||
|
<image class='top' src='{{talkInfo.imgSrc}}'></image>
|
||||||
|
<view class='author-date'>
|
||||||
|
<image class='avatar' src='{{talkInfo.avatar}}'></image>
|
||||||
|
<text class='author'>{{talkInfo.author}}</text>
|
||||||
|
<text class='const-text'>发表于</text>
|
||||||
|
<text class='date'>{{talkInfo.date}}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<text class='title'>{{talkInfo.title}}</text>
|
||||||
|
<view class='tool'>
|
||||||
|
<view class='circle-img'>
|
||||||
|
<image wx:if="{{collected}}" catchtap='onColletionTap' src='../images/collection.png'></image>
|
||||||
|
<image wx:else catchtap='onColletionTap' src='../images/collection-anti.png'></image>
|
||||||
|
|
||||||
|
<image catchtap='onShareTap' class='share-img' src='../images/share.png'></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<text class='detail'>{{talkInfo.detail}}</text>
|
||||||
|
</view>
|
@ -0,0 +1,81 @@
|
|||||||
|
.all {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.author-date {
|
||||||
|
flex-direction: row;
|
||||||
|
margin-left: 30rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.avatar {
|
||||||
|
height: 64rpx;
|
||||||
|
width: 64rpx;
|
||||||
|
vertical-align: middle; /*垂直居中*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.author {
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: 300; /*字重即加粗*/
|
||||||
|
margin-left: 20rpx;
|
||||||
|
vertical-align: middle;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.const-text {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.date {
|
||||||
|
font-size: 24rpx;
|
||||||
|
margin-left: 30rpx;
|
||||||
|
vertical-align: middle;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
margin-left: 40rpx;
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-weight: 700;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
letter-spacing: 2px;
|
||||||
|
color: #4b556c;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*------------线 加 分享收藏等------------ */
|
||||||
|
|
||||||
|
.tool {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.circle-img {
|
||||||
|
float: right; /*居右*/
|
||||||
|
margin-right: 40rpx;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.circle-img image{
|
||||||
|
width:90rpx;
|
||||||
|
height: 90rpx
|
||||||
|
}
|
||||||
|
|
||||||
|
.share-img{
|
||||||
|
margin-left: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail{
|
||||||
|
color:#666;
|
||||||
|
margin-left:40rpx;
|
||||||
|
margin-top:20rpx;
|
||||||
|
margin-right:30rpx;
|
||||||
|
line-height: 44rpx;
|
||||||
|
letter-spacing: 2rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"description": "项目配置文件",
|
||||||
|
"packOptions": {
|
||||||
|
"ignore": [],
|
||||||
|
"include": []
|
||||||
|
},
|
||||||
|
"setting": {
|
||||||
|
"urlCheck": true,
|
||||||
|
"es6": true,
|
||||||
|
"enhance": false,
|
||||||
|
"postcss": true,
|
||||||
|
"preloadBackgroundData": false,
|
||||||
|
"minified": true,
|
||||||
|
"newFeature": true,
|
||||||
|
"coverView": true,
|
||||||
|
"nodeModules": false,
|
||||||
|
"autoAudits": false,
|
||||||
|
"showShadowRootInWxmlPanel": true,
|
||||||
|
"scopeDataCheck": false,
|
||||||
|
"uglifyFileName": false,
|
||||||
|
"checkInvalidKey": true,
|
||||||
|
"checkSiteMap": true,
|
||||||
|
"uploadWithSourceMap": true,
|
||||||
|
"compileHotReLoad": false,
|
||||||
|
"useMultiFrameRuntime": false,
|
||||||
|
"useApiHook": true,
|
||||||
|
"babelSetting": {
|
||||||
|
"ignore": [],
|
||||||
|
"disablePlugins": [],
|
||||||
|
"outputPath": ""
|
||||||
|
},
|
||||||
|
"useIsolateContext": true,
|
||||||
|
"useCompilerModule": true,
|
||||||
|
"userConfirmedUseCompilerModuleSwitch": false,
|
||||||
|
"packNpmManually": false,
|
||||||
|
"packNpmRelationList": []
|
||||||
|
},
|
||||||
|
"compileType": "miniprogram",
|
||||||
|
"libVersion": "2.7.7",
|
||||||
|
"appid": "touristappid",
|
||||||
|
"projectname": "%E7%AC%AC2%E7%AB%A0%E6%BC%94%E7%A4%BA%E6%A1%88%E4%BE%8B",
|
||||||
|
"simulatorType": "wechat",
|
||||||
|
"simulatorPluginLibVersion": {},
|
||||||
|
"condition": {},
|
||||||
|
"editorSetting": {
|
||||||
|
"tabIndent": "insertSpaces",
|
||||||
|
"tabSize": 2
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
|
||||||
|
"rules": [{
|
||||||
|
"action": "allow",
|
||||||
|
"page": "*"
|
||||||
|
}]
|
||||||
|
}
|
After Width: | Height: | Size: 83 KiB |
After Width: | Height: | Size: 810 KiB |
After Width: | Height: | Size: 455 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 90 KiB |
After Width: | Height: | Size: 294 KiB |
After Width: | Height: | Size: 173 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 258 KiB |
After Width: | Height: | Size: 256 KiB |
After Width: | Height: | Size: 367 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 791 KiB |
After Width: | Height: | Size: 207 KiB |
After Width: | Height: | Size: 538 B |
After Width: | Height: | Size: 227 KiB |
After Width: | Height: | Size: 414 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 431 B |