Skip to content

Commit

Permalink
add news template
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaokangLei committed Jan 30, 2023
1 parent 7fd5b6d commit 75f2820
Show file tree
Hide file tree
Showing 26 changed files with 440 additions and 44 deletions.
5 changes: 4 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@
"pages/template/login/login02/login02",
"pages/index/component/stepper/stepper",
"pages/index/component/countdown/countdown",
"pages/template/uitemplate/home/home"
"pages/template/uitemplate/home/home",
"pages/template/news/home/home",
"pages/template/news/news01/news01",
"pages/template/news/news02/news02"
],
"window": {
"backgroundTextStyle": "light",
Expand Down
6 changes: 3 additions & 3 deletions pages/about/home/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ Component({
}, 20)
} else {
that.setData({
templateCount: that.coutNum(16),
usersCount: that.coutNum(1306),
templateCount: that.coutNum(17),
usersCount: that.coutNum(1411),
modelTotal: that.coutNum(46),
visitTotal: that.coutNum(2264),
visitTotal: that.coutNum(2702),
})
}
}
Expand Down
30 changes: 24 additions & 6 deletions pages/index/component/card/card.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
<image src="https://image.meiye.art/FlqKg5bugFQD5Qzm_QhGM7ET4Mtx?imageMogr2/thumbnail/450x/interlace/1" mode="widthFix" style="max-height: 360rpx;"></image>
<view class="cu-tag bg-blue">史诗</view>
<view class="cu-bar bg-shadeBottom">
<text class="text-cut">我已天理为凭,踏入这片荒芜,不再受凡人的枷锁遏制。我已天理为凭,踏入这片荒芜,不再受凡人的枷锁遏制。</text>
<text class="text-cut">从自己的生活里找,先能打动自己,才有可能打动别人。</text>
</view>
</view>
<view class="cu-list menu-avatar">
<view class="cu-item">
<view class="cu-avatar round lg" style="background-image:url(https://image.meiye.art/FlqKg5bugFQD5Qzm_QhGM7ET4Mtx?imageMogr2/thumbnail/450x/interlace/1);"></view>
<view class="content flex-sub">
<view class="text-grey">正义天使 格鲁</view>
<view class="text-grey">创意无限 格鲁</view>
<view class="text-gray text-sm flex justify-between">
十天前
<view class="text-gray text-sm">
Expand Down Expand Up @@ -64,7 +64,7 @@
</view>
</view>
<view class="text-content">
折磨生出苦难,苦难又会加剧折磨,凡间这无穷的循环,将有我来终结!
创意是基于本质而来的解决方案。本质是什么,是不会因为其他外在条件而改变的东西。
</view>
<view class="grid flex-sub padding-lr {{isCard?'col-3 grid-square':'col-1'}}">
<view class="bg-img {{isCard?'':'only-img'}}" style="background-image:url(https://image.meiye.art/FlqKg5bugFQD5Qzm_QhGM7ET4Mtx?imageMogr2/thumbnail/450x/interlace/1);" wx:for="{{isCard?9:1}}" wx:key="item">
Expand Down Expand Up @@ -136,21 +136,39 @@
<view class="cu-card article {{isCard?'no-card':'margin'}} margin-top">
<view class="cu-item shadow">
<view class="title">
<view class="text-cut">无意者 烈火焚身;以正义的烈火拔出黑暗。我有自己的正义,见证至高的烈火吧。</view>
<view class="text-cut">每一个创意都是重新思考。</view>
</view>
<view class="content">
<image src="https://image.meiye.art/FlqKg5bugFQD5Qzm_QhGM7ET4Mtx?imageMogr2/thumbnail/450x/interlace/1" mode="aspectFill"></image>
<view class="desc">
<view class="text-content"> 折磨生出苦难,苦难又会加剧折磨,凡间这无穷的循环,将有我来终结!真正的恩典因不完整而美丽,因情感而真诚,因脆弱而自由!</view>
<view class="text-content"> 创意是基于本质而来的解决方案。本质是什么,是不会因为其他外在条件而改变的东西。</view>
<view>
<view class="cu-tag bg-red light sm round">正义天使</view>
<view class="cu-tag bg-red light sm round">创意无限</view>
<view class="cu-tag bg-green light sm round">史诗</view>
</view>
</view>
</view>
</view>
</view>

<view class="cu-card article {{isCard?'no-card':'margin'}} margin-top">
<view class="cu-item shadow">
<view class="title">
<view class="text-cut">每一个创意都是重新思考。</view>
</view>
<view class="content">
<view class="desc padding-right-xs">
<view class="text-content"> 创意是基于本质而来的解决方案。本质是什么,是不会因为其他外在条件而改变的东西。</view>
<view>
<view class="cu-tag bg-red light sm round">创意无限</view>
<view class="cu-tag bg-green light sm round">史诗</view>
</view>
</view>
<image src="https://image.meiye.art/FlqKg5bugFQD5Qzm_QhGM7ET4Mtx?imageMogr2/thumbnail/450x/interlace/1" mode="aspectFill"></image>
</view>
</view>
</view>

<import src="/pages/template/common/copyright.wxml" />
<view class="margin-top">
<template is="copyright"></template>
Expand Down
2 changes: 1 addition & 1 deletion pages/index/component/swiper/swiper.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</view>
</view>

<swiper class="card-swiper {{DotStyle?'square-dot':'round-dot'}}" indicator-dots="true" circular="true" autoplay="true" interval="5000" duration="500" bindchange="cardSwiper" previousMargin="0.01rpx" indicator-color="#8799a3" indicator-active-color="#0081ff">
<swiper class="card-swiper {{DotStyle?'square-dot':'round-dot'}}" indicator-dots="true" circular="true" bindchange="cardSwiper" previousMargin="0.01rpx" indicator-color="#8799a3" indicator-active-color="#0081ff">
<swiper-item wx:for="{{swiperList}}" wx:key="item" class="{{cardCur==index?'cur':''}}">
<view class="swiper-item">
<image src="{{item.url}}" mode="aspectFill" wx:if="{{item.type=='image'}}"></image>
Expand Down
12 changes: 6 additions & 6 deletions pages/template/home/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ Component({
color: 'blue light',
icon: 'myfill'
},
// {
// title: '新闻资讯',
// name: 'loading',
// color: 'green light',
// icon: 'loading2'
// },
{
title: '新闻资讯',
name: 'news',
color: 'pink light',
icon: 'news'
},
// {
// title: '教育学习',
// name: 'shadow',
Expand Down
6 changes: 0 additions & 6 deletions pages/template/index/index01/index01.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,10 @@ Page({
CustomBar: app.globalData.CustomBar,
cardCur: 0,
swiperList: [{
id: 0,
type: 'image',
url: 'https://image.meiye.art/FlqKg5bugFQD5Qzm_QhGM7ET4Mtx?imageMogr2/thumbnail/450x/interlace/1'
}, {
id: 1,
type: 'image',
url: 'https://image.meiye.art/Fha6tqRTIwHtlLW3xuZBJj8ZXSX3?imageMogr2/thumbnail/450x/interlace/1',
}, {
id: 2,
type: 'image',
url: 'https://image.meiye.art/FhHGe9NyO0uddb6D4203jevC_gzc?imageMogr2/thumbnail/450x/interlace/1',
}],
iconList: [{
Expand Down
5 changes: 2 additions & 3 deletions pages/template/index/index01/index01.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</cu-custom>

<!-- 页面 -->
<view class="cu-timeline margin-sm radius-lg" style="min-height: 90vh;">
<view class="cu-timeline margin-xs radius-lg" style="min-height: 90vh;">

<view class="box-serach">
<view class="cu-bar search bg-white radius-lg">
Expand All @@ -25,8 +25,7 @@
<!-- 滚动图片 -->
<swiper class="screen-swiper margin-lr-sm margin-top-xs {{DotStyle?'square-dot':'round-dot'}}" indicator-dots="true" circular="true" autoplay="true" interval="5000" duration="500">
<swiper-item wx:for="{{swiperList}}" wx:key="item">
<image src="{{item.url}}" class="radius" mode="aspectFill" wx:if="{{item.type=='image'}}"></image>
<video src="{{item.url}}" autoplay loop muted show-play-btn="{{false}}" controls="{{false}}" objectFit="cover" wx:if="{{item.type=='video'}}"></video>
<image src="{{item.url}}" class="radius" mode="aspectFill" style="height: 340rpx;"></image>
</swiper-item>
</swiper>
<!-- 常用功能 -->
Expand Down
3 changes: 0 additions & 3 deletions pages/template/index/index02/index02.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,12 @@ Page({
cardCur: 0,
swiperList: [{
id: 0,
type: 'image',
url: 'https://image.meiye.art/Fha6tqRTIwHtlLW3xuZBJj8ZXSX3?imageMogr2/thumbnail/450x/interlace/1'
}, {
id: 1,
type: 'image',
url: 'https://image.meiye.art/FhHGe9NyO0uddb6D4203jevC_gzc?imageMogr2/thumbnail/450x/interlace/1',
}, {
id: 2,
type: 'image',
url: 'https://image.meiye.art/FlqKg5bugFQD5Qzm_QhGM7ET4Mtx?imageMogr2/thumbnail/450x/interlace/1',
}],
iconList: [{
Expand Down
10 changes: 4 additions & 6 deletions pages/template/index/index02/index02.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@
</cu-custom>

<!-- 页面 -->
<view class="cu-timeline margin-sm radius-lg" style="min-height: 92vh;">
<view class="cu-timeline margin-xs radius-lg" style="min-height: 92vh;">
<!-- 搜索 -->
<view class="box-serach">
<view class="cu-bar search bg-white radius-lg">
<view class="search-form round">
<text class="cuIcon-search"></text>
<input type="text" placeholder="搜索内容" confirm-type="search"></input>
</view>
<view class="flex padding-sm text-xxl text-black"><text class="cuIcon-message"></text></view>

<view class="flex padding-right-sm text-xxl text-black"><text class="cuIcon-message"></text></view>
</view>
</view>
<scroll-view scroll-x class="bg-white nav">
Expand All @@ -24,10 +23,9 @@
</view>
</scroll-view>
<!-- 滚动图片 -->
<swiper class="screen-swiper margin-sm {{DotStyle?'square-dot':'round-dot'}}" indicator-dots="true" circular="true" autoplay="true" interval="5000" duration="500">
<swiper class="screen-swiper margin-sm square-dot" indicator-dots="true" circular="true" autoplay="true" interval="5000" duration="500">
<swiper-item wx:for="{{swiperList}}" wx:key="item">
<image src="{{item.url}}" class="radius" mode="aspectFill" wx:if="{{item.type=='image'}}"></image>
<video src="{{item.url}}" autoplay loop muted show-play-btn="{{false}}" controls="{{false}}" objectFit="cover" wx:if="{{item.type=='video'}}"></video>
<image src="{{item.url}}" class="radius" mode="aspectFill" style="height: 350rpx;"></image>
</swiper-item>
</swiper>
<!-- 常用功能 -->
Expand Down
2 changes: 1 addition & 1 deletion pages/template/music/music01/music01.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<view slot="content">音乐播放01模板</view>
</cu-custom>

<view class="scrollPage margin-sm bg-oc-gray-9 radius-lg">
<view class="scrollPage margin-xs bg-oc-gray-9 radius-lg">

<view class="radius-lg">
<view class="flex padding-sm justify-between">
Expand Down
82 changes: 82 additions & 0 deletions pages/template/news/home/home.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
// pages/template/news/home/home.js
Page({

/**
* 页面的初始数据
*/
data: {
elements: [{
title: '未知',
name: 'news01',
url: 'https://image.meiye.art/Fo_HyTiSjyaC0L-fpf4RXEI7eN3b?imageMogr2/thumbnail/450x/interlace/1'
}, {
title: '未知',
name: 'news02',
url: 'https://image.meiye.art/FkZR2715biXqwL_WvbWhRMaArqoo?imageMogr2/thumbnail/450x/interlace/1'
}, {
title: '未知',
name: 'news03',
url: 'https://image.meiye.art/Fi2yE1PU4DBr_Qgo-ER9bOo3yJNe?imageMogr2/thumbnail/450x/interlace/1'
}, {
title: '未知',
name: 'news04',
url: 'https://image.meiye.art/FjjAKItzS-QGvz2A5Wd5oBGsnNkm?imageMogr2/thumbnail/450x/interlace/1'
}],
},

/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {

},

/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {

},

/**
* 生命周期函数--监听页面显示
*/
onShow() {

},

/**
* 生命周期函数--监听页面隐藏
*/
onHide() {

},

/**
* 生命周期函数--监听页面卸载
*/
onUnload() {

},

/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {

},

/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {

},

/**
* 用户点击右上角分享
*/
onShareAppMessage() {

}
})
3 changes: 3 additions & 0 deletions pages/template/news/home/home.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"usingComponents": {}
}
23 changes: 23 additions & 0 deletions pages/template/news/home/home.wxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!--pages/template/news/home/home.wxml-->
<import src="/pages/template/common/copyright.wxml" />

<cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">新闻资讯UI设计</view>
</cu-custom>

<scroll-view scroll-y class="scrollPage cu-timeline bg-gray">

<view class='nav-list margin-top'>
<navigator open-type="navigate" hover-class='none' url="/pages/template/news/{{item.name}}/{{item.name}}" class="nav-lie" wx:for="{{elements}}" wx:key="item">
<image src='{{item.url}}' mode='widthFix' class='image-bg-ui radius-lg'></image>
<view class="flex justify-center">
<button class="cu-btn bg-blue light sm margin-top-xs">查 看</button>
</view>
</navigator>
</view>

<template is="copyright"></template>

<view class="cu-tabbar-height"></view>

</scroll-view>
1 change: 1 addition & 0 deletions pages/template/news/home/home.wxss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* pages/template/news/home/home.wxss */
Loading

0 comments on commit 75f2820

Please sign in to comment.