Browse Source

menuRoute 定义

master
jiazhipeng 11 months ago
parent
commit
828b463f04
  1. 1
      app.js
  2. 12
      subPackages/feiyiNew/CGCLetter/index.js
  3. 4
      subPackages/feiyiNew/CGCLetter/index.wxml
  4. 36
      subPackages/feiyiNew/CGCTime/index.js
  5. 26
      subPackages/feiyiNew/CGCTime/index.wxml
  6. 64
      subPackages/feiyiNew/CGCTime/index.wxss

1
app.js

@ -175,6 +175,7 @@ App({
},
globalData: {
appLaunchFlag: false, // App onLaunch执行结束
menuRoute: '/pages/index/index',
CategoryIds: {}, //分享出去的页面id
category_id: "", //分享进来的参数
from: "", // 是否是从其他小程序跳转过来的 如果是从其他小程序跳转的话 会记录

12
subPackages/feiyiNew/CGCLetter/index.js

@ -11,6 +11,7 @@ Page({
list:[],
page_no: 0,
haveMore: true,
headImg: '',
},
@ -55,12 +56,23 @@ Page({
}
})
},
// 获取头图
getHeaderImg: function () {
commonApi._post("multimedia/detail", {id: 2360}).then(res=>{
if (res) {
this.setData({headImg: res.data.head_img})
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
this.getList()
this.getHeaderImg()
},
/**

4
subPackages/feiyiNew/CGCLetter/index.wxml

@ -1,8 +1,8 @@
<!--pages/list/theatre/index.wxml-->
<!-- <wxs src="../../../../utils/filter.wxs" module="tool" /> -->
<title title="非遗手札"></title>
<view class="my-header-search">
<image class="heaimg" src="https://static.ticket.sz-trip.com/uploads/20241118/5540525af7880d15a3899f56f9000237.png" mode="widthFix"></image>
<view class="my-header-search" wx:if="{{headImg}}">
<image class="heaimg" src="{{headImg}}" mode="widthFix"></image>
</view>
<view class="content">

36
subPackages/feiyiNew/CGCTime/index.js

@ -11,6 +11,7 @@ Page({
list:[],
page_no: 0,
haveMore: true,
headImg: '',
},
@ -26,34 +27,40 @@ Page({
gotoDetail:function(e){
let item = e.currentTarget.dataset.item;
if(item.outside_url) {
wx.navigateTo({
url: '/pages/pbService/web/index?weburl=' + encodeURIComponent(item.outside_url),
url: '/pages/pbService/appreciate/info/index?info='+encodeURIComponent(JSON.stringify(item)),
})
} else {
wx.navigateTo({
url: '/pages/info/strategyInfo/index?id=' + item.id,
})
}
},
getList:function(){
if (!this.data.haveMore) return
let list = this.data.list
commonApi._post("travels/getList", {
page_no: this.data.page_no,
page_num: 10,
// type_key: 'feiyishouzha',
type_key: 'someArt',
commonApi._post("multimedia/media_list", {
limit: 10,
page: this.data.page_no,
class_id: 139,
// class_id: 140,
type: 1,
}).then(res => {
if (res) {
this.setData({list:list.concat(res.data.rows||[])})
if (res.data.rows.length<10) {
this.setData({list:list.concat(res.data.data||[])})
if (res.data.data.length<10) {
this.data.haveMore = false
}
}
})
},
// 获取头图
getHeaderImg: function () {
commonApi._post("multimedia/detail", {id: 2361}).then(res=>{
if (res) {
this.setData({headImg: res.data.head_img})
}
})
},
/**
@ -61,6 +68,7 @@ Page({
*/
onReady: function () {
this.getList()
this.getHeaderImg()
},
/**

26
subPackages/feiyiNew/CGCTime/index.wxml

@ -1,29 +1,23 @@
<!--pages/list/theatre/index.wxml-->
<!-- <wxs src="../../../../utils/filter.wxs" module="tool" /> -->
<title title="非遗手札"></title>
<view class="my-header-search">
<image class="heaimg" src="https://static.ticket.sz-trip.com/uploads/20241118/5540525af7880d15a3899f56f9000237.png" mode="widthFix"></image>
<title title="非遗拾光"></title>
<view class="my-header-search" wx:if="{{headImg}}">
<image class="heaimg" src="{{headImg}}" mode="widthFix"></image>
</view>
<view class="content">
<view bindtap="gotoDetail" data-item="{{item}}" class="item" wx:for="{{list}}">
<image src="{{item.headimg}}" mode="aspectFill"></image>
<view class="info">
<view class="textOver2 title">{{item.title}}</view>
<view class="textOver subtitle">{{item.subtitle}}</view>
<view class="letter-user">
<view style="display: flex;align-items: center;">
<image style="width: 48rpx;height: 48rpx;margin-right: 8rpx;" src="{{item.avatar}}" mode="aspectFill"></image>
<text>{{item.nickname}}</text>
</view>
<view style="display: flex;align-items: center;color: #848484;">
<text class="iconfont icon-aixin"></text>
<text class="icon-num" style="padding: 0 36rpx 0 8rpx;">{{item.like_number}}</text>
<text class="iconfont icon-eye"></text>
<text class="icon-num" style="padding-left: 8rpx;">{{item.view_number}}</text>
</view>
<text>君到苏州</text>
</view>
<view class="textOver2 title">{{item.title}}</view>
<view class="video-image">
<image src="{{item.head_img}}" mode="asectFill"></image>
<image src="https://static.ticket.sz-trip.com/cgc/images/index/play.png" class="play"></image>
</view>
</view>
<view wx:if="{{list.length==0}}" class="common-empty" style="z-index:-1">
<image mode="widthFix" src="https://static.ticket.sz-trip.com/xcxImages/other/nodata.png"></image>

64
subPackages/feiyiNew/CGCTime/index.wxss

@ -24,44 +24,38 @@ padding: 32rpx;
.item {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 36rpx;
}
.item image {
width: 208rpx;
height: 198rpx;
border-radius: 24rpx 24rpx 24rpx 24rpx;
margin-right: 24rpx;
flex-shrink: 0;
}
.info {
flex: 1;
width: 1rpx;
height: 198rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.info .title {
font-weight: 500;
font-size: 31rpx;
color: #000;
margin-bottom: 9rpx;
font-size: 28rpx;
color: #000000;
padding-bottom: 20rpx;
border-bottom: 1rpx solid rgba(0,0,0,0.05);
}
.info .subtitle {
font-size: 24rpx;
color: #999999;
margin-bottom: 9rpx;
.video-image{
width: 100%;
height: 372rpx;
position: relative;
}
.letter-user{
display: flex;
justify-content: space-between;
.video-image image {
width: 100%;
height: 372rpx;
background: rgba(0,0,0,0.2);
border-radius: 32rpx 32rpx 32rpx 32rpx;
}
.video-image .play{
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
width: 90rpx;
height: 90rpx;
}
.title{
font-weight: 400;
font-size: 24rpx;
color: #000000;
align-items: center;
font-size: 28rpx;
color: #000000;
margin: 24rpx 0 20rpx;
}

Loading…
Cancel
Save