解决了已知问题

This commit is contained in:
Ling53666
2025-05-11 15:12:01 +08:00
parent 36cc2fe7ba
commit bb84973913
41 changed files with 2980 additions and 801 deletions

View File

@ -1,6 +1,7 @@
// pages/jiedan/jiedan.js
import {url} from '../../request'
Page({
data: {
list:[],
show:false,
picture:[{
image:'/image/20250407154233.jpg'
@ -12,99 +13,18 @@ Page({
image:'/image/20250407154310.png'
}
],
message:[
{
person:'1000人正在进行',
level:'简单',
title:'推广豆包',
money:'40'
},
{
person:'1000人正在进行',
level:'简单',
title:'推广豆包',
money:'40'
},
{
person:'1000人正在进行',
level:'简单',
title:'推广豆包',
money:'40'
},
{
person:'1000人正在进行',
level:'简单',
title:'推广豆包',
money:'40'
},
{
person:'1000人正在进行',
level:'简单',
title:'推广豆包',
money:'40'
},
{
person:'1000人正在进行',
level:'简单',
title:'推广豆包',
money:'40'
},
{
person:'1000人正在进行',
level:'简单',
title:'推广豆包',
money:'40'
},
{
person:'1000人正在进行',
level:'简单',
title:'推广豆包',
money:'40'
},
],
lie:[
{
name:'全部分类'
},
{
name:'派发'
},
{
name:'推广'
},
{
name:'注册'
},
],
selectedIndex: 0,
},
change(){
this.setData({
show:!this.data.show
xiangqing(e){
const item = e.currentTarget.dataset.item;
const id = item.id
console.log(item);
wx.navigateTo({
url: `/pages/xiangqing/xiangqing?id=${id}`,
})
},
bindKeyInput: function (e) {
this.setData({
inputValue: e.detail.value
})
console.log(this.data.inputValue);
},
onSelect(e) {
console.log('jashdjkasdjahs');
const index = e.currentTarget.dataset.index;
console.log(index);
const name = this.data.lie[index].name;
this.setData({
selectedIndex: index,
show:!this.data.show
});
console.log('你点击了:', name);
// 你也可以触发其他逻辑,比如发送请求等
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
@ -120,7 +40,26 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
const that =this
wx.request({
url: url + '/project/query/card',
method: 'POST',
data: {
},
header: {
'content-type': 'application/json'
},
success(res) {
console.log('查询成功', res);
that.setData({
list:res.data.data
})
},
fail(err) {
console.error('请求失败', err);
}
});
},
/**

View File

@ -1,86 +1,43 @@
<!--pages/jiedan/jiedan.wxml-->
<view class="box">
<!-- 轮播图 -->
<view class="swiper">
<swiper autoplay="true">
<swiper-item wx:for="{{picture}}" wx:key="image">
<image class="imagesize" src="{{item.image}}" mode="aspectFill"/>
</swiper-item>
</swiper>
<view class="text-overlay">
<text>校园接单 实现财富自由</text>
</view>
</view>
<!-- 下半部分 -->
<view class="xiabox">
<!-- 搜索框部分 -->
<view class="sousuo tongyong">
<view class="hhhh">
<view class="inputkuang tongyong">
<view class="souimage tongyong">
<image class="sousuosize" src="/image/sousuo.png" mode="aspectFill"/>
</view>
<view class="inputk tongyong" >
<input bindinput="bindKeyInput" placeholder="请输入内容"/>
</view>
</view>
</view>
<!-- 筛选 -->
<view class="sidebox tongyong" bind:tap="change">
<view class="saixuan tongyong">
<image class="imageshai" src="/image/shaiixuan.png" mode="aspectFill"/>
<text>筛选</text>
</view>
</view>
</view>
<!-- 推广部分 -->
<view class="messagebox">
<view class="kuang" wx:for="{{message}}">
<view class="touxianmg tongyong">
<image class="touxiangimage" src="https://pic4.zhimg.com/v2-f10ac7fc477596faf538ca274852c68f_b.jpg" mode="aspectFill"/>
</view>
<view class="messagesize">
<text class="text" style="font-size: 15px;color: #FC7E09;">{{item.title}}</text>
<text class="text" style="font-size: 12px;color: rgb(161, 154, 154);">容易度:{{item.level}}</text>
<text class="text" style="font-size: 12px;color: rgb(161, 154, 154);" >{{item.person}}</text>
</view>
<view class="moneybox">
<view style="width: 100%;height: 50%;" class="tongyong">
<text style="color: #FC7E09;font-size: 14px;">佣金:{{item.money}}积分</text>
</view>
<view style="width: 100%;height: 50%;" class="weizhi">
<view class="jiedan tongyong">
<text>接单</text>
</view>
</view>
</view>
<view>
</view>
</view>
</view>
</view>
</view>
<!-- 侧边栏 -->
<view class="cebianlan" wx:if="{{show}}">
<view class="zuo" bind:tap="change">
</view>
<view class="you">
<view class="wenzi">
<view class="chengsehezi">
<view class="chengse">
</view>
<view class="wenzicheng">
<text style="margin-left: 20rpx;font-size: 18px;font-weight: bolder;">任务分类</text>
</view>
<view class="flex-col page">
<swiper class="swiper" autoplay circular indicator-dots>
<swiper-item wx:for="{{picture}}" wx:key="index">
<image class="imagesize" src="{{item.image}}" mode="aspectFill" />
</swiper-item>
</swiper>
<view class="mt-16 flex-col list">
<view
class="flex-row justify-between mt-12 list-item"
wx:for="{{list}}"
wx:for-item="item"
wx:for-index="index"
wx:key="index"
data-item="{{item}}"
bind:tap="xiangqing"
>
<image
class="self-start image_2"
src="{{item.projectImage}}"
mode="aspectFill"
/>
<view class="flex-col self-center group_2 view">
<text class="self-start font text_5 text_6">{{item.projectName}}</text>
<view class="flex-col justify-start items-center self-start text-wrapper_6">
<text class="font_3 text_7">结算T+{{item.projectSettlementCycle}}</text>
</view>
<view class="flex-row equal-division">
<view class="flex-col items-start equal-division-item">
<text class="font_4">最高价</text>
<text class="font_5 mt-5">¥{{item.projectPrice}}</text>
</view>
<view class="xuazhongbox">
<view class="he {{index === selectedIndex ? 'active' : ''}}" wx:for="{{lie}}" wx:key="index" data-index="{{index}}" bind:tap="onSelect" >
<text style="font-size: 13px;">{{item.name}}</text>
</view>
<view class="flex-col items-start equal-division-item">
<text class="font_4">正在推广</text>
<text class="font_5 mt-5">{{item.currentPromotionCount}}</text>
</view>
</view>
</view>
<view class="flex-col justify-start items-center self-start text-wrapper_5 view_2">
<text class="font_2">参与推广</text>
</view>
</view>
</view>
</view>

View File

@ -1,197 +1,169 @@
/* pages/jiedan/jiedan.wxss */
.box{
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
.mt-5 {
margin-top: 9.62rpx;
}
.text-overlay {
width: 100%;
position: absolute;
top: 80%;
left: 70%;
transform: translate(-50%, -50%);
color: white;
font-size: 25px;
font-weight: bold;
text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.6);
z-index: 10;
font-style: italic;
}
.sousuo{
width: 100%;
height: 7vh;
}
.zuo{
width: 40%;
height: 100%;
background-color: rgba(36, 34, 34, 0.2);
}
.wenzi{
width: 100%;
height: 40%;
}
.you{
width: 60%;
height: 100%;
.page {
padding-bottom: 144.23rpx;
background-color: #ffffff;
}
.chengsehezi{
width: 100%;
height: 10%;
display: flex;
align-items: center;
overflow-y: auto;
overflow-x: hidden;
}
.chengse{
width: 4%;
height: 80%;
background-color: #FC7E09;
margin-left: 10rpx;
.image {
width: 100vw;
height: 48.7179vw;
}
.wenzicheng{
width: 96%;
height: 100%;
display: flex;
align-items: center;
.group {
padding: 0 15.38rpx;
}
.xuazhongbox{
width: 100%;
display: flex;
flex: 1;
flex-wrap: wrap;
gap: 20rpx;
.text-wrapper {
padding: 7.69rpx 0;
background-color: #ff8d1a;
border-radius: 19.23rpx;
width: 112.12rpx;
height: 46.15rpx;
}
.he{
display: flex;
justify-content: center;
align-items: center;
padding: 5px;
margin: 20rpx;
.font {
font-size: 26.92rpx;
font-family: SourceHanSansCN;
line-height: 25.17rpx;
color: #000000;
}
.he.active {
background-color: #f37b1d; /* 高亮背景色 */
.text {
color: #ffffff;
line-height: 25.02rpx;
}
.cebianlan{
width: 100%;
height: 100%;
display: flex;
position: fixed;
top: 0;
left: 0;
z-index: 9999;
}
.shuzhi{
display: flex;
align-items: center;
}
.tongyong{
display: flex;
justify-content: center;
align-items: center;
}
.souimage{
width: 20%;
height: 100%;
}
.sousuosize{
width: 20px;
height: 20px;
}
.sidebox{
width: 20%;
height: 100%;
}
.saixuan{
width: 100%;
height: 100%;
}
.hhhh{
width: 80%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.inputk{
width: 80%;
height: 100%;
}
.xiabox{
width: 100%;
background-color: #EFEFEF;
}
.swiper {
width: 100%;
height: 30vh;
position: relative;
overflow: hidden;
}
.inputkuang{
width: 80%;
height: 70%;
border-radius: 50px;
.text-wrapper_2 {
padding: 7.69rpx 0;
background-color: #ffffff;
border-radius: 19.23rpx;
width: 185.54rpx;
height: 48.08rpx;
border-left: solid 1.92rpx #e5e5e5;
border-right: solid 1.92rpx #e5e5e5;
border-top: solid 1.92rpx #e5e5e5;
border-bottom: solid 1.92rpx #e5e5e5;
}
.imageshai{
width: 30px;
height: 30px;
.text_2 {
line-height: 27.52rpx;
}
.text-wrapper_3 {
padding: 7.69rpx 0;
background-color: #ffffff;
border-radius: 19.23rpx;
width: 125.63rpx;
height: 48.08rpx;
border-left: solid 1.92rpx #e5e5e5;
border-right: solid 1.92rpx #e5e5e5;
border-top: solid 1.92rpx #e5e5e5;
border-bottom: solid 1.92rpx #e5e5e5;
}
.text_3 {
line-height: 24.96rpx;
}
.text-wrapper_4 {
margin-right: 23.08rpx;
padding: 7.69rpx 0;
background-color: #ffffff;
border-radius: 19.23rpx;
width: 173.94rpx;
height: 48.08rpx;
border-left: solid 1.92rpx #e5e5e5;
border-right: solid 1.92rpx #e5e5e5;
border-top: solid 1.92rpx #e5e5e5;
border-bottom: solid 1.92rpx #e5e5e5;
}
.text_4 {
line-height: 24.77rpx;
}
.list {
padding: 0 23.08rpx;
}
.list-item {
padding: 26.92rpx 30.77rpx 19.23rpx 50rpx;
background-color: #ffffff;
border-radius: 19.23rpx;
box-shadow: 0rpx 3.85rpx 7.69rpx #00000040;
}
.list-item:first-child {
margin-top: 0;
}
.image_2 {
width: 111.54rpx;
height: 111.54rpx;
}
.group_2 {
margin-left: 38.46rpx;
width: 281.6rpx;
}
.view {
margin-left: 0;
}
.text_5 {
margin-left: 15.38rpx;
}
.text_6 {
line-height: 24.9rpx;
}
.text-wrapper_6 {
margin-left: 15.38rpx;
margin-top: 15.38rpx;
padding: 3.85rpx 0;
background-color: #fc7e0961;
width: 75.38rpx;
}
.font_3 {
font-size: 15.38rpx;
font-family: SourceHanSansCN;
line-height: 14.33rpx;
color: #e33c64;
}
.text_7 {
line-height: 14.25rpx;
}
.equal-division {
align-self: stretch;
margin-top: 7.69rpx;
}
.equal-division-item {
padding: 11.54rpx;
width: 140.81rpx;
}
.font_4 {
font-size: 15.38rpx;
font-family: SourceHanSansCN;
line-height: 14.33rpx;
color: #00000080;
}
.font_5 {
font-size: 15.38rpx;
font-family: SourceHanSansCN;
line-height: 11.67rpx;
color: #e33c64;
}
.text-wrapper_5 {
margin-left: 53.85rpx;
margin-top: 21.15rpx;
padding: 15.38rpx 0;
background-color: #a5d63fcc;
border-radius: 19.23rpx;
width: 127.58rpx;
height: 51.92rpx;
}
.view_2 {
margin-left: 0;
margin-top: 19.23rpx;
}
.font_2 {
font-size: 21.15rpx;
font-family: SourceHanSansCN;
line-height: 19.79rpx;
color: #ffffff;
}
.swiper{
width: 100%;
height:400rpx;
}
.imagesize{
width: 100%;
height: 100%;
}
swiper,swiper-item {
width: 100%;
height: 100%;
}
.messagebox{
width: 100%;
height: 100%;
display: flex;
align-items: center;
flex-direction: column;
}
.kuang{
width: 90%;
height: 140px;
border-radius: 20px;
margin-top: 20rpx;
background-color: #ffffff;
display: flex;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.touxianmg{
width: 30%;
height: 100%;
}
.touxiangimage{
width: 100px;
height: 100px;
border-radius: 50px;
}
.messagesize{
width: 40%;
height: 100%;
display: flex;
flex-direction: column;
}
.text{
margin-top: 20rpx;
}
.moneybox{
width: 30%;
display: flex;
flex-direction: column;
}
.jiedan{
width: 50px;
height: 30px;
background-color: #EFEFEF;
margin-right: 20rpx;
}
.weizhi{
display: flex;
justify-content: flex-end;
width: 100%;
height: 100%;
}