first commit

This commit is contained in:
编码猿
2024-09-27 01:32:49 +08:00
commit 28ebe05a64
7399 changed files with 1174529 additions and 0 deletions

View File

@@ -0,0 +1 @@
15ddbcec-96bd-4dfa-8856-4250a90405c3

View File

@@ -0,0 +1 @@
3eb5cd3b-3385-4e45-8960-f84679ba630d

View File

@@ -0,0 +1,82 @@
// pages/brandList/brandInfo/brandInfo.js
const app = getApp();
const regeneratorRuntime = app.loadAsync()
const model = app.loadModel("index")
const http = app.loadHttp()
Page({
/**
* 页面的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "品牌合作", //头部标题
isBack: true,//显示返回
newsInfo:'',//新闻详情
},
// 获取详情
async newsDetails(id) {
let res = await http.http.request1({ url: `${http.api.newsDetails}/${id}`, method: "GET" })
res.data.data.content = res.data.data.content.replace(/\<img/gi, '<img class="rech_img" ')
this.setData({
newsInfo:res.data.data
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
if (!!options.id) {
this.newsDetails(options.id)
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,15 @@
<!-- 头部导航 -->
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
<!-- pages/brandList/brandInfo/brandInfo.wxml -->
<view class="brandInfo pd30">
<view class="title">
<view class="title_time mt50">{{newsInfo.create_Time}}</view>
<view class="title_p mt10">{{newsInfo.title}}</view>
<!-- <view class="title_cooperator mt10">中国建设银行</view> -->
</view>
<view class="mb20 mt20 brandInfo-bac">
<rich-text nodes="{{newsInfo.content}}"></rich-text>
</view>
</view>
<!-- toasta提示 -->
<i-toast id="toast" />

View File

@@ -0,0 +1,43 @@
/* pages/brandList/brandInfo/brandInfo.wxss */
page{
height: 100%;
width: 100%;
background-color: #ffffff !important;
}
.brandInfo-bac{
max-width: 100%;
}
.brandInfo-bac rich-text{
max-width: 100%;
}
.brandInfo{
border-top: 2rpx solid #ebebeb;
}
.title_time{
font-family: PingFang-SC-Medium;
font-size: 22rpx;
font-weight: 400;
font-stretch: normal;
line-height: 36rpx;
color: #999999;
}
.title_p{
font-family: PingFang-SC-Medium;
font-size: 50rpx;
font-weight: 500;
font-stretch: normal;
color: #333333;
}
.title_cooperator{
font-family: PingFang-SC-Medium;
font-size: 26rpx;
font-weight: 400;
font-stretch: normal;
color: #999999;
}
.rech_img{
max-width: 100% !important;
display: block;
height: auto;
}

View File

@@ -0,0 +1,94 @@
// pages/brandList/brandList.js
const app = getApp();
const regeneratorRuntime = app.loadAsync()
const model = app.loadModel("index")
const http = app.loadHttp()
Page({
/**
* 页面的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "品牌合作", //头部标题
isBack: true,//显示返回
newsData: [],//品牌合作列表数据
isPage: false,//如果没有数据变为true
},
// 获取品牌合作列表
async getNewsList() {
let data = {
type: 1,
page: this.data.page,
limit: 10
}
let res = await http.http.request1({ url: `${http.api.news}`, method: "GET", data: data })
let rel = res.data.data.list,
newsData = this.data.newsData;
if (rel.length < 10) {
this.setData({
isPage: true
})
}
this.setData({
newsData: [...newsData, ...rel]
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getNewsList()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
if(!this.data.isPage){
this.getNewsList()
}
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,22 @@
<!-- 头部导航 -->
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
<!-- pages/brandList/brandList.wxml -->
<view class="brandList">
<view class="mt20">
<view class="head_con">
<navigator class="know pd30" wx:for="{{newsData}}" wx:key url="/pages/brandList/brandInfo/brandInfo?id={{item.id}}">
<view class="know_row dis-flex">
<view class="know_row_img">
<image src="{{item.images}}" />
</view>
<view class="flex1 dis-flex1 ml20">
<view class="flex1 know_row_text">{{item.title}}</view>
<view class="know_row_time">{{item.create_time}}</view>
</view>
</view>
</navigator>
</view>
</view>
</view>
<!-- toasta提示 -->
<i-toast id="toast" />

View File

@@ -0,0 +1,71 @@
/* pages/brandList/brandList.wxss */
/* 品牌合作start */
.head_con {
margin-top: 20rpx;
}
.know {
display: block;
background: #fff;
}
.know:nth-child(1) {
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
}
.know:last-child {
border-bottom-right-radius: 10rpx;
border-bottom-left-radius: 10rpx;
}
.know_row {
padding: 30rpx 0;
height: 140rpx;
border-bottom: solid 2rpx #ebebeb;
box-sizing: initial;
}
.know:last-child .know_row {
border-bottom: 0;
}
.know_row_img {
width: 255rpx;
height: 140rpx;
background-color: #f5f5f5;
border-radius: 15rpx;
display: inline-block;
}
.know_row_img image{
height: 100%;
width: 100%;
}
.know_row_text {
font-family: PingFang-SC-Medium;
font-size: 28rpx;
font-weight: 400;
font-stretch: normal;
line-height: 36rpx;
color: #333;
display: -webkit-box !important;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
.know_row_time {
text-align: right;
font-family: PingFang-SC-Medium;
font-size: 28rpx;
font-weight: 400;
font-stretch: normal;
line-height: 36rpx;
color: #999;
}
/* 品牌合作end */