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 @@
da05706a-06d4-45a0-bbe2-e761b046d807

View File

@@ -0,0 +1,90 @@
// pages/newPeople/newPeople.js
const app = getApp();
const regeneratorRuntime = app.loadAsync()
const model = app.loadModel("index")
const util = app.loadUtils("util")
const http = app.loadHttp()
Page({
/**
* 页面的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "新人专享", //头部标题
isBack: true,//显示返回
personData: [],//优惠券列表
},
async newPersonOwn() {
let res = await http.http.request2({ url: `${http.api.newPersonOwn}`, method: 'POST' })
let rel = res.data.data
rel.map((v,i)=>{
rel[i].start_time = util.formatTime(v.start_time, 'Y-M-D')
rel[i].end_time = util.formatTime(v.end_time, 'Y-M-D')
})
this.setData({
personData: res.data.data
})
},
async goUrl(e){
let url = e.currentTarget.dataset.url
wx.navigateTo({
url: url
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.newPersonOwn()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
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,54 @@
<!-- 头部导航 -->
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
<!-- pages/newPeople/newPeople.wxml -->
<view class="newPeople">
<view class="newPeo-img">
<image mode="widthFix" src="http://cdn.yishaxiyi.com/b3ef1bd9e60071960ef8f712a69caeec.png" />
</view>
<view class="newPeo">
<view class="newPeo-cen">
<view wx:for="{{personData}}" wx:key class="coupon_list_row dis-flex mt20">
<view class="coupon_row_l ">
<image src="/static/img/xrj.png" />
<view class="row_l1 flex-con3">
<view>
<view class="row_l1_p1">
¥
<span>{{item.coupon_price}}</span>
</view>
<view class="row_l1_p2">满{{item.use_min_price}}元使用</view>
</view>
</view>
</view>
<view class="flex1 coupon_row_r">
<image src="/static/img/xrjr.png" />
<view class="row_l1 dis-flex pl30">
<view class="flex-con2 flex1">
<view>
<view class="row_r1_p1 text-left clamp1">
{{item.coupon_title}}
</view>
<view class="row_r1_p2 text-left clamp1">
{{item.start_time}}至{{item.end_time}}
</view>
</view>
</view>
<view class="flex-con2 mr30">
<button wx:if="{{item.status==1}}" type="default" class="use-coupon" data-url="/pages/laundry/laundry" bind:tap="goUrl">
去使用
</button>
<button wx:if="{{item.status==2}}" type="default" class="use-coupon">
已使用
</button>
<button wx:if="{{item.status==3}}" type="default" class="use-coupon">
已过期
</button>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- toasta提示 -->
<i-toast id="toast" />

View File

@@ -0,0 +1,118 @@
/* pages/newPeople/newPeople.wxss */
page{
height: 100%;
background-color: #d23728 !important;
}
.newPeo-img{
width: 100%;
display: flex;
}
.newPeo-img image{
flex: 1;
}
.newPeo{
padding:0 38rpx;
margin-bottom: 50rpx;
}
.newPeo-cen{
background-color: #ce0f17;
padding: 20rpx 26rpx 40rpx;
border-radius: 48rpx;
}
/* 优惠券样式 */
.coupon_list_row{
height: 150rpx;
}
.coupon_row_l,
.coupon_row_r{
position: relative;
}
.coupon_row_l{
height: 150rpx;
width: 148rpx;
}
.coupon_row_l image{
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
height: 150rpx;
width: 148rpx;
vertical-align: middle;
margin: 0;
}
.coupon_row_r image{
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
height: 100%;
width: 100%;
margin: 0;
}
.row_l1{
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
height: 100%;
width: 100%;
}
.row_l1_p1{
font-family: PingFang-SC-Bold;
font-size: 25rpx;
color: #f92929;
}
.row_l1_p1 span{
font-size: 40rpx;
font-weight: 600;
}
.row_l1_p2{
font-family: PingFang-SC-Medium;
font-size: 18rpx;
color: #333333;
}
.row_r1_p1{
font-family: PingFang-SC-Medium;
font-size: 28rpx;
color: #333333;
}
.row_r1_p2{
font-family: PingFang-SC-Medium;
font-size: 22rpx;
color: #999999;
}
.receive{
padding: 22rpx 187rpx;
background-color: #f6b900;
border-radius: 45rpx;
font-family: PingFang-SC-Bold;
font-size: 32rpx;
color: #ffffff;
}
.use-coupon{
width: 110rpx;
height: 51rpx;
line-height: 51rpx;
text-align: center;
background-color: #fdc43b !important;
border-radius: 51rpx;
font-family: PingFang-SC-Bold;
font-size: 24rpx;
font-weight: 400;
color: #fefefe !important;
border: 0;
padding: 0;
}
.use-coupon::after{
width: 0;
height: 0;
border: 0;
display: none;
}