Browse Source

feat: 分享记录;

pull/1/head
Fox-33 1 month ago
parent
commit
1c942e33b9
21 changed files with 355 additions and 218 deletions
  1. +16
    -0
      common.scss
  2. +3
    -3
      components/base/tabbar.vue
  3. +31
    -16
      pages/index/index.vue
  4. +244
    -169
      pages/index/record.vue
  5. +15
    -10
      pages_order/record/articleSharing.vue
  6. +15
    -9
      pages_order/record/groupSharing.vue
  7. +16
    -10
      pages_order/record/personalSharing.vue
  8. +15
    -1
      pages_order/record/videoSharing.vue
  9. BIN
      static/image/home/bg.png
  10. BIN
      static/image/record/audit.png
  11. BIN
      static/image/record/delete.png
  12. BIN
      static/image/record/fail.png
  13. BIN
      static/image/record/filter.png
  14. BIN
      static/image/record/pass.png
  15. BIN
      static/image/record/slider.png
  16. BIN
      static/image/record/temp.png
  17. BIN
      static/image/tabbar/home.png
  18. BIN
      static/image/tabbar/order-a.png
  19. BIN
      static/image/tabbar/order.png
  20. BIN
      static/image/tabbar/record-a.png
  21. BIN
      static/image/tabbar/record.png

+ 16
- 0
common.scss View File

@ -47,4 +47,20 @@
.flex-column {
flex-direction: column;
}
.card {
background-color: #FFFFFF;
border-radius: 12rpx;
padding: 18rpx 20rpx;
}
.btn-simple {
width: auto;
height: auto !important;
border: none !important;
box-shadow: none;
padding: 0 !important;
margin: 0;
line-height: 1 !important;
}

+ 3
- 3
components/base/tabbar.vue View File

@ -36,11 +36,11 @@
key: 'home',
},
{
"selectedIconPath": "/static/image/tabbar/order-a.png",
"iconPath": "/static/image/tabbar/order.png",
"selectedIconPath": "/static/image/tabbar/record-a.png",
"iconPath": "/static/image/tabbar/record.png",
"pagePath": "/pages/index/record",
"title": "分享记录",
key: 'order',
key: 'record',
},
{
"selectedIconPath": "/static/image/tabbar/center-a.png",


+ 31
- 16
pages/index/index.vue View File

@ -1,22 +1,26 @@
<template>
<view class="page">
<navbar title="首页" bgColor="#001137" color="#FFFFFF" />
<view class="btns">
<button
v-for="item in list"
:key="item.title"
class="btn"
plain
@click="$utils.navigateTo(item.path)"
>
{{ item.title }}
</button>
<image src="../../static/image/home/bg.png" class="bg" mode="scaleToFill"></image>
<view class="content">
<navbar title="首页" bgColor="#001137" color="#FFFFFF" />
<view class="btns">
<button
v-for="item in list"
:key="item.title"
class="btn"
plain
@click="$utils.navigateTo(item.path)"
>
{{ item.title }}
</button>
</view>
</view>
<tabber select="home"/>
</view>
</template>
@ -60,9 +64,8 @@
}
position: relative;
height: 100vh;
background-color: $uni-bg-color-highlight;
overflow: hidden;
.btns {
display: grid;
@ -83,5 +86,17 @@
padding: 55rpx 0;
}
}
.bg {
width: 100vw;
height: 100vh;
}
.content {
position: absolute;
width: 100vw;
height: 100vh;
top: 0;
}
</style>

+ 244
- 169
pages/index/record.vue View File

@ -1,88 +1,106 @@
<template>
<view class="page">
<navbar
title="订单中心"
/>
<navbar title="分享记录" />
<uv-tabs :list="tabs"
:activeStyle="{color : '#FD5100', fontWeight : 600}"
lineColor="#FD5100"
lineHeight="8rpx"
lineWidth="50rpx"
@click="clickTabs"></uv-tabs>
<view v-if="orderList.length > 0" class="list">
<view class="item"
v-for="(item, index) in orderList.records"
@click="toOrderDetail(item.id)"
:key="index">
<view class="top">
<view class="service">
<text>{{item.projectId_dictText}}</text>
<text>{{item.type_dictText}}</text>
</view>
<view class="status">
<text> {{item.state_dictText}}</text>
</view>
</view>
<view class="content">
<view class="left">
<image mode="aspectFill" :src="item.image"></image>
</view>
<view class="right">
<view class="text-hidden-1">
客户姓名{{item.name}}
<view class="content">
<view class="card" style="padding-left: 0;">
<uv-tabs :list="tabs"
:inactiveStyle="{
color: '#999999',
fontSize: '30rpx',
fontWeight: 500,
whiteSpace: 'nowrap',
}"
:activeStyle="{
color: '#1B1B1B',
fontSize: '38rpx',
fontWeight: 900,
whiteSpace: 'nowrap',
}"
lineHeight="13rpx"
lineWidth="77rpx"
:lineColor="`url('../../static/image/record/slider.png') 100% 100%`"
:scrollable="false"
@click="clickTabs"
>
<template v-slot:right>
<view>
<uv-popup
ref="popup"
:overlayOpacity="0"
:customStyle="{
backgroundColor: 'transparent',
position: 'fixed',
top: '300rpx',
right: '20rpx'
}"
>
<view class="card popup-options">
<view
class="popup-option"
:class="{ 'is-active': item.value === queryParams.auditStatus }"
v-for="item in auditStatusOptions"
:key="item.value"
@click="onSelectAuditStatus(item.value)"
>
<text>{{ item.label }}</text>
</view>
</view>
</uv-popup>
<button class="btn-simple" plain @click="openPicker" >
<image src="../../static/image/record/filter.png" style="width: 30rpx; height: 30rpx;"></image>
</button>
</view>
<view class="text-hidden-1">
产品规格{{item.unit}}
</template>
</uv-tabs>
</view>
<view v-if="recordList.records.length > 0" class="card list">
<view class="list-item"
v-for="item in recordList.records"
@click="toSharingDetail(item.id)"
:key="item.id"
>
<image class="left" :src="item.imageUrl"></image>
<view class="right">
<view class="title">{{ item.title }}</view>
<view class="desc">{{ item.description }}</view>
<view class="bottom">
<text class="desc">{{ item.createTime }}</text>
<button plain class="btn-simple btn-delete flex" @click="onDelete(item.id)">
<image src="../../static/image/record/delete.png" style="width: 24rpx; height: 24rpx;"></image>
<text style="margin-left: 10rpx;">删除</text>
</button>
</view>
<view class="text-hidden-1">
租赁地址{{item.address}}
<view class="mark">
<image
:src="auditStatusImgMapping[item.auditStatus]"
style="width: 100rpx; height: 100rpx;"
></image>
</view>
<!-- <view class="text-hidden-1">
总计时间{{item.useTime}}分钟
</view> -->
</view>
</view>
<view class="bottom">
<view class="price">
总价格<text class="num">{{item.money}}</text>
</view>
<view class="b1">
查看物流
</view>
<!-- <view @click.stop="toPayOrder(item)" class="b2" v-if="item.state == 0">
立即付款
</view>
<view class="b1" @click.stop="moreOrder(item.projectId,toPlaceorder)" v-if="item.state == 3">
再来一单
</view>
<view class="b2" @click.stop="toEvaluate(item.id,item.projectId,item.technicianId)" v-if="item.state == 3">
立即评价
</view>
<view class="b2" @click.stop="moreOrder(item.projectId,toPlaceorder)" v-if="item.state == 4">
再来一单
</view> -->
</view>
</view>
</view>
<tabber select="order"/>
<tabber select="record"/>
</view>
</template>
<script>
import tabber from '@/components/base/tabbar.vue'
import { mapGetters } from 'vuex'
const URL_MAPPING = { // state -> url
'-1': '/pages_order/record/personalSharing',
'1': '/pages_order/record/videoSharing',
'2': '/pages_order/record/groupSharing',
'3': '/pages_order/record/articleSharing',
}
export default {
components : {
tabber,
@ -93,41 +111,81 @@
data() {
return {
tabs: [{
name: '全部'
name: '个人分享'
},
{
name: '租赁押金'
name: '视频分享'
},
{
name: '水洗租赁'
name: '群分享'
},
{
name: '破损换货'
name: '文章分享'
},
],
auditStatusOptions: [
{
name: '退货退款'
}
label: '审核中',
value: 0,
},
{
label: '已通过',
value: 1,
},
{
label: '未通过',
value: 2,
},
],
queryParams: {
pageNo: 1,
pageSize: 10
pageSize: 10,
auditStatus: null,
},
// orderList: [
// {
// money : 99.99,
// address : '广广C32802',
// name : '**',
// phone : '150*****091',
// unit : '120*40*75',
// image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
// state_dictText : '',
// }
// ], //
orderList : {
records : [],
total : 0,
recordList: {
records: [
{
id: '001',
imageUrl: '../../static/image/record/temp.png',
times: 10,
qrCode: null,
title: '裂变星轻松获客',
description: '如此好用的赚钱项目,赶快加入吧!',
auditStatus: 0,
createTime: '2025年2月1日',
},
{
id: '002',
imageUrl: '../../static/image/record/temp.png',
times: 10,
qrCode: null,
title: '裂变星轻松获客',
description: '如此好用的赚钱项目,赶快加入吧!',
auditStatus: 1,
createTime: '2025年2月1日',
},
{
id: '002',
imageUrl: '../../static/image/record/temp.png',
times: 10,
qrCode: null,
title: '裂变星轻松获客',
description: '如此好用的赚钱项目,赶快加入吧!',
auditStatus: 2,
createTime: '2025年2月1日',
},
]
},
// recordList : { //
// records : [],
// total : 0,
// },
state : -1,
auditStatusImgMapping: {
0: '../../static/image/record/audit.png', //
1: '../../static/image/record/pass.png', //
2: '../../static/image/record/fail.png', //
}
}
},
onShow() {
@ -135,13 +193,15 @@
},
//
onReachBottom() {
if(this.queryParams.pageSize < this.orderList.total){
if(this.queryParams.pageSize < this.recordList.total){
this.queryParams.pageSize += 10
this.orderPage()
}
},
methods: {
orderPage(){
// todo
return
let queryParams = {
...this.queryParams,
}
@ -150,7 +210,7 @@
}
this.$api('orderPage', queryParams, res => {
if(res.code == 200){
this.orderList = res.result
this.recordList = res.result
}
})
},
@ -164,14 +224,22 @@
this.queryParams.pageSize = 10
this.orderPage()
},
//
toOrderDetail(id) {
openPicker() {
this.$refs.popup.open();
},
onSelectAuditStatus(val) {
const selected = this.queryParams.auditStatus
this.queryParams.auditStatus = selected === val ? null : val
},
//
toSharingDetail(id) {
uni.navigateTo({
url: '/pages_order/record/orderDetail?id=' + id
url: `${URL_MAPPING[this.state]}?id=${id}`
})
},
getOrderList(){
onDelete(id) {
// todo
},
}
}
@ -180,83 +248,90 @@
<style scoped lang="scss">
.page{
}
.content {
padding: 20rpx;
}
.list {
.item {
width: calc(100% - 40rpx);
background-color: #fff;
margin: 20rpx;
box-sizing: border-box;
border-radius: 16rpx;
padding: 30rpx;
.top {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 30rpx;
.service {}
.status {
font-size: 26rpx;
font-weight: 600;
}
margin-top: 20rpx;
padding: 40rpx 59rpx 40rpx 43rpx;
&-item {
font-size: 0;
display: flex;
& + & {
margin-top: 40rpx;
}
.content {
display: flex;
margin: 10rpx 0;
.left {
width: 150rpx;
height: 150rpx;
border-radius: 10rpx;
image {
width: 150rpx;
height: 150rpx;
border-radius: 10rpx;
}
}
.right {
width: calc(100% - 160rpx);
color: #777;
font-size: 24rpx;
padding-left: 20rpx;
line-height: 40rpx;
background-color: #F8F8F8;
}
.left {
width: 220rpx;
height: 148rpx;
background-color: yellow;
}
.bottom {
display: flex;
justify-content: space-between;
font-size: 25rpx;
.price {
font-weight: 900;
text {
color: #ff780099;
font-size: 30rpx;
}
}
.b1 {
border: 1px solid #777;
color: #777;
box-sizing: border-box;
}
.b2 {
background: linear-gradient(178deg, #4FD3BC, #60C285);
color: #fff;
}
view {
margin: 12rpx;
border-radius: 28rpx;
padding: 8rpx 28rpx;
margin-bottom: 0;
}
.right {
flex: 1;
width: calc(100% - 220rpx);
padding-left: 20rpx;
box-sizing: border-box;
position: relative;
}
}
.title {
color: #1B1B1B;
font-size: 28rpx;
}
.desc {
color: #999999;
font-size: 24rpx;
white-space: nowrap;
text-overflow: ellipsis;
text-align: left;
}
.title + .desc {
margin-top: 18rpx;
}
.bottom {
position: absolute;
bottom: 0;
width: calc(100% - 20rpx);
}
.btn-delete {
float: right;
color: #05D9A2;
font-size: 20rpx;
}
.mark {
position: absolute;
top: 10rpx;
right: 5rpx;
}
}
.popup {
&-options {
box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
padding: 16rpx 40rpx;
}
&-option {
color: #999999;
font-size: 28rpx;
&.is-active {
color: #1B1B1B;
font-weight: 700;
}
& + & {
margin-top: 16rpx;
}
}
}


+ 15
- 10
pages_order/record/articleSharing.vue View File

@ -105,7 +105,10 @@
</uv-form>
</view>
<button class="button-submit" @click="onSubmit">
<button v-if="auditStatus === 1" class="button-submit" @click="onPublish">
发布
</button>
<button v-else-if="auditStatus !== 0" class="button-submit" @click="onSubmit">
提交审核
</button>
</view>
@ -126,6 +129,8 @@
},
data() {
return {
id: null,
auditStatus: null,
form: {
id: null,
imageUrl: null,
@ -142,6 +147,12 @@
descLengthLimit: 1000,
}
},
onLoad(option) {
const { id } = option
this.id = id
// todo: init data by id
},
methods: {
onEditorReady() {
uni.createSelectorQuery().select('#editor').context((res) => {
@ -200,6 +211,9 @@
}
},
onPublish() {
// todo
},
}
}
@ -228,13 +242,4 @@
}
}
.btn-simple {
width: auto;
height: auto;
border: none;
box-shadow: none;
padding: 0;
margin: 0;
}
</style>

+ 15
- 9
pages_order/record/groupSharing.vue View File

@ -91,7 +91,10 @@
</uv-form>
</view>
<button class="button-submit" @click="onSubmit">
<button v-if="auditStatus === 1" class="button-submit" @click="onPublish">
发布
</button>
<button v-else-if="auditStatus !== 0" class="button-submit" @click="onSubmit">
提交审核
</button>
</view>
@ -112,6 +115,8 @@
},
data() {
return {
id: null,
auditStatus: null,
form: {
id: null,
groupName: null,
@ -125,6 +130,12 @@
},
}
},
onLoad(option) {
const { id } = option
this.id = id
// todo: init data by id
},
methods: {
onSubmit() {
// todo
@ -133,6 +144,9 @@
this.$api('submitPersonalSharing', params)
},
onPublish() {
// todo
},
}
}
@ -141,14 +155,6 @@
<style scoped lang="scss">
@import '../styles/pageForm.scss';
.btn-simple {
width: auto;
height: auto;
border: none;
box-shadow: none;
padding: 0;
}
.button-submit {
margin: 0;
position: fixed;


+ 16
- 10
pages_order/record/personalSharing.vue View File

@ -86,8 +86,11 @@
</view>
</uv-form>
</view>
<button class="button-submit" @click="onSubmit">
<button v-if="auditStatus === 1" class="button-submit" @click="onPublish">
发布
</button>
<button v-else-if="auditStatus !== 0" class="button-submit" @click="onSubmit">
提交审核
</button>
</view>
@ -106,6 +109,8 @@
},
data() {
return {
id: null,
auditStatus: null,
form: {
id: null,
imageUrl: null,
@ -118,6 +123,12 @@
},
}
},
onLoad(option) {
const { id } = option
this.id = id
// todo: init data by id
},
methods: {
onSubmit() {
// todo
@ -126,6 +137,9 @@
this.$api('submitPersonalSharing', params)
},
onPublish() {
// todo
},
}
}
@ -134,14 +148,6 @@
<style scoped lang="scss">
@import '../styles/pageForm.scss';
.btn-simple {
width: auto;
height: auto;
border: none;
box-shadow: none;
padding: 0;
}
.button-submit {
margin: 0;
position: fixed;


+ 15
- 1
pages_order/record/videoSharing.vue View File

@ -105,7 +105,10 @@
</uv-form>
</view>
<button class="button-submit" @click="onSubmit">
<button v-if="auditStatus === 1" class="button-submit" @click="onPublish">
发布
</button>
<button v-else-if="auditStatus !== 0" class="button-submit" @click="onSubmit">
提交审核
</button>
</view>
@ -126,6 +129,8 @@
},
data() {
return {
id: null,
auditStatus: null,
form: {
title: null,
coverImageUrl: null,
@ -140,6 +145,12 @@
},
}
},
onLoad(option) {
const { id } = option
this.id = id
// todo: init data by id
},
methods: {
onSubmit() {
// todo
@ -148,6 +159,9 @@
this.$api('submitPersonalSharing', params)
},
onPublish() {
// todo
},
}
}


BIN
static/image/home/bg.png View File

Before After
Width: 743  |  Height: 1614  |  Size: 189 KiB

BIN
static/image/record/audit.png View File

Before After
Width: 100  |  Height: 100  |  Size: 5.3 KiB

BIN
static/image/record/delete.png View File

Before After
Width: 24  |  Height: 24  |  Size: 473 B

BIN
static/image/record/fail.png View File

Before After
Width: 100  |  Height: 100  |  Size: 4.5 KiB

BIN
static/image/record/filter.png View File

Before After
Width: 30  |  Height: 30  |  Size: 699 B

BIN
static/image/record/pass.png View File

Before After
Width: 100  |  Height: 100  |  Size: 5.7 KiB

BIN
static/image/record/slider.png View File

Before After
Width: 77  |  Height: 13  |  Size: 578 B

BIN
static/image/record/temp.png View File

Before After
Width: 220  |  Height: 148  |  Size: 46 KiB

BIN
static/image/tabbar/home.png View File

Before After
Width: 34  |  Height: 35  |  Size: 929 B Width: 34  |  Height: 35  |  Size: 671 B

BIN
static/image/tabbar/order-a.png View File

Before After
Width: 40  |  Height: 40  |  Size: 691 B

BIN
static/image/tabbar/order.png View File

Before After
Width: 40  |  Height: 40  |  Size: 736 B

BIN
static/image/tabbar/record-a.png View File

Before After
Width: 34  |  Height: 34  |  Size: 860 B

BIN
static/image/tabbar/record.png View File

Before After
Width: 34  |  Height: 34  |  Size: 1.6 KiB

Loading…
Cancel
Save