处理待办事项
This commit is contained in:
@@ -48,14 +48,6 @@ export function fetchFilterParmas(is_origin : number = 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 管理端机器列表
|
|
||||||
export function fetchSysGoodsList(data : {}) {
|
|
||||||
return request({
|
|
||||||
url: '/goods/list',
|
|
||||||
data: data,
|
|
||||||
method: 'POST'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 首页机器列表
|
// 首页机器列表
|
||||||
|
|||||||
@@ -83,3 +83,11 @@ export function fetchRoomOrder(roomId : Number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 待办列表
|
||||||
|
export function fetchTodoList(data : {}) {
|
||||||
|
return request({
|
||||||
|
url: '/index/todoList',
|
||||||
|
data: data,
|
||||||
|
method: 'POST'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
10
pages.json
10
pages.json
@@ -11,7 +11,7 @@
|
|||||||
"text": "首页"
|
"text": "首页"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "pages/todo/index",
|
"pagePath": "pages/todo/todoList",
|
||||||
"iconPath": "static/tabbar/todo.png",
|
"iconPath": "static/tabbar/todo.png",
|
||||||
"selectedIconPath": "static/tabbar/todo-active.png",
|
"selectedIconPath": "static/tabbar/todo-active.png",
|
||||||
"text": "待办"
|
"text": "待办"
|
||||||
@@ -47,6 +47,14 @@
|
|||||||
"navigationBarTitleText": "登陆"
|
"navigationBarTitleText": "登陆"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/todo/todoList",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "待办",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"path": "pages/index/orderAdd",
|
"path": "pages/index/orderAdd",
|
||||||
"style": {
|
"style": {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<view class="page-content" v-if="isLoggedIn">
|
<view class="page-content" v-if="isLoggedIn">
|
||||||
<view style="z-index: 10000;position: sticky;" :style="'top:0px'">
|
<view style="z-index: 10000;position: sticky;" :style="'top:0px'">
|
||||||
<view class="top-bar">
|
<view class="top-bar">
|
||||||
<nut-button type="primary" block @click="navigateTo('/pages/index/goodsOrderAdd')">
|
<nut-button type="primary" block plain @click="navigateTo('/pages/index/goodsOrderAdd')">
|
||||||
新增商品订单
|
新增商品订单
|
||||||
</nut-button>
|
</nut-button>
|
||||||
</view>
|
</view>
|
||||||
@@ -154,6 +154,7 @@
|
|||||||
uni.setStorageSync('username', res.user.user_name)
|
uni.setStorageSync('username', res.user.user_name)
|
||||||
uni.setStorageSync('role', res.user.role.value)
|
uni.setStorageSync('role', res.user.role.value)
|
||||||
isLoggedIn.value = true
|
isLoggedIn.value = true
|
||||||
|
uni.showTabBar()
|
||||||
// 登录操作(模拟成功)
|
// 登录操作(模拟成功)
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '登录成功',
|
title: '登录成功',
|
||||||
@@ -275,6 +276,12 @@
|
|||||||
getRooms()
|
getRooms()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
console.log("onshow---");
|
||||||
|
uni.hideTabBar()
|
||||||
|
checkLogin()
|
||||||
|
getRooms()
|
||||||
|
})
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
console.log("onshow---");
|
console.log("onshow---");
|
||||||
uni.hideTabBar()
|
uni.hideTabBar()
|
||||||
|
|||||||
413
pages/todo/goodsAdd.vue
Normal file
413
pages/todo/goodsAdd.vue
Normal file
@@ -0,0 +1,413 @@
|
|||||||
|
<template>
|
||||||
|
|
||||||
|
<view class="page-content">
|
||||||
|
<view style=" padding: 20rpx;">
|
||||||
|
<nut-form>
|
||||||
|
<nut-form-item label="名称">
|
||||||
|
<nut-input v-model="form.goods_name" class="nut-input-text" placeholder="请输入名称" type="text" />
|
||||||
|
</nut-form-item>
|
||||||
|
|
||||||
|
<nut-form-item label="串号">
|
||||||
|
<nut-input v-model="form.goods_no" class="nut-input-text" placeholder="请输入串号" type="text">
|
||||||
|
<template #right>
|
||||||
|
<nut-icon @click="onScan" name="scan2" size="30" custom-color="#000000" />
|
||||||
|
</template>
|
||||||
|
</nut-input>
|
||||||
|
</nut-form-item>
|
||||||
|
|
||||||
|
<nut-form-item label="售价">
|
||||||
|
<nut-input v-model="form.goods_price" class="nut-input-text" placeholder="请输入售价" type="nubmer" />
|
||||||
|
</nut-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
<nut-form-item label="说明">
|
||||||
|
<nut-textarea v-model="form.content" autosize placeholder="请输入说明" type="text" />
|
||||||
|
</nut-form-item>
|
||||||
|
|
||||||
|
<nut-form-item label="介绍">
|
||||||
|
<nut-textarea v-model="form.details_content" autosize placeholder="请输入介绍" type="text" />
|
||||||
|
</nut-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <nut-form-item label="上架人">
|
||||||
|
<nut-input v-model="form.add_person" class="nut-input-text" placeholder="请输入上架人" type="text" />
|
||||||
|
</nut-form-item> -->
|
||||||
|
<!-- <nut-form-item label="排序">
|
||||||
|
<nut-input v-model="form.goods_sort" class="nut-input-text" placeholder="请输入排序" type="number" />
|
||||||
|
</nut-form-item> -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<nut-form-item label="状态">
|
||||||
|
<nut-radio-group direction="horizontal" v-model="form.status">
|
||||||
|
<nut-radio label="10">下架</nut-radio>
|
||||||
|
<nut-radio label="20">上架</nut-radio>
|
||||||
|
</nut-radio-group>
|
||||||
|
</nut-form-item>
|
||||||
|
|
||||||
|
<nut-form-item>
|
||||||
|
<template v-slot:label>成色</template>
|
||||||
|
<template v-slot:default>
|
||||||
|
<view style="color: black;" @click="show_degree_popup = true">
|
||||||
|
<text>{{form.degree_name}}</text>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</nut-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
<nut-form-item>
|
||||||
|
<template v-slot:label>机型</template>
|
||||||
|
<template v-slot:default>
|
||||||
|
<view style="color: black;" @click="show_product_cascader = true">
|
||||||
|
<text>{{form.type_name}},{{form.brand_name}},{{form.product_name}}</text>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</nut-form-item>
|
||||||
|
|
||||||
|
<nut-form-item>
|
||||||
|
<template v-slot:label>商品图片</template>
|
||||||
|
<template v-slot:default>
|
||||||
|
<shmily-drag-image v-model="form.images" :number=9 :add-image="addGoodsImg"
|
||||||
|
keyName="file_path"></shmily-drag-image></template>
|
||||||
|
</nut-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <nut-form-item>
|
||||||
|
<template v-slot:label>商品视频</template>
|
||||||
|
<template v-slot:default>
|
||||||
|
<nut-uploader :url="uploadVideoUrl" name="iFile" v-model:file-list="uploadVideoList"
|
||||||
|
:source-type="['album','camera']" :media-type="['video']" maximum="1" :multiple="false"
|
||||||
|
@success="onUploadSuccess" @fail="onUploadFail" @delete="onDeleteFile" :timeout="1000*60">
|
||||||
|
</nut-uploader>
|
||||||
|
</template>
|
||||||
|
</nut-form-item> -->
|
||||||
|
|
||||||
|
|
||||||
|
<view style="align-items: center;text-align: center; padding: 20rpx 60rpx;">
|
||||||
|
<nut-button type="primary" block @click="onSubmit">
|
||||||
|
新增商品
|
||||||
|
</nut-button>
|
||||||
|
</view>
|
||||||
|
</nut-form>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<nut-popup v-model:visible="show_degree_popup" position="bottom" safe-area-inset-bottom>
|
||||||
|
<nut-picker v-model="popup_degree_val" :columns="filter_params.degree_list"
|
||||||
|
:field-names="{text:'degree_name',value:'degree_id'}" title="选择成色" @confirm="onConfirmDegree"
|
||||||
|
@cancel="show_degree_popup = false">
|
||||||
|
</nut-picker>
|
||||||
|
</nut-popup>
|
||||||
|
|
||||||
|
<nut-cascader title="机型选择" v-model:visible="show_product_cascader" v-model="cascader_product_val"
|
||||||
|
@change="onProductChange" @pathChange="onProcutPathChange" text-key="label" value-key="value"
|
||||||
|
:title-ellipsis="false" children-key="children" :options="filter_params.drop_down_options"></nut-cascader>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {
|
||||||
|
onMounted,
|
||||||
|
reactive,
|
||||||
|
ref,
|
||||||
|
toValue
|
||||||
|
} from 'vue';
|
||||||
|
import {
|
||||||
|
fetchFilterParmas,
|
||||||
|
fetchGoodsAdd,
|
||||||
|
} from '@/api/goods';
|
||||||
|
import {
|
||||||
|
getUploadImageUrl,
|
||||||
|
} from '@/api/request';
|
||||||
|
|
||||||
|
|
||||||
|
// import {
|
||||||
|
// fetchControlAddGoods,
|
||||||
|
// } from '@/api/control';
|
||||||
|
|
||||||
|
|
||||||
|
// const uploadVideoUrl = ref('')
|
||||||
|
// uploadVideoUrl.value = getUploadVideoUrl()
|
||||||
|
// const uploadVideoOk = ref('https://qnxsd.19year.cn/wechat_2025-08-12_130250_716.png')
|
||||||
|
// const uploadVideoList = ref([])
|
||||||
|
// const videoUrl = ref('')
|
||||||
|
|
||||||
|
// const onUploadSuccess = (res) => {
|
||||||
|
// uploadVideoList.value[0].url = uploadVideoOk
|
||||||
|
// let respStr = res.data.data
|
||||||
|
// let resp = JSON.parse(respStr)
|
||||||
|
// if (resp.code === 1) {
|
||||||
|
// form.video_url = resp.data.url
|
||||||
|
// uni.showToast({
|
||||||
|
// title: '上传成功',
|
||||||
|
// icon: 'success'
|
||||||
|
// })
|
||||||
|
// } else {
|
||||||
|
// uni.showToast({
|
||||||
|
// title: '上传失败',
|
||||||
|
// icon: 'none'
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// const onDeleteFile = (files, fileList, index) => {
|
||||||
|
// uploadVideoList.value = []
|
||||||
|
// form.video_url = ""
|
||||||
|
// console.log('uploadVideoList3', uploadVideoList)
|
||||||
|
// console.log('form3', form)
|
||||||
|
// }
|
||||||
|
// const onUploadFail = (err) => {
|
||||||
|
// console.error('上传失败:', err)
|
||||||
|
// uni.showToast({
|
||||||
|
// title: '上传失败',
|
||||||
|
// icon: 'none'
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 扫码
|
||||||
|
const onScan = () => {
|
||||||
|
uni.scanCode({
|
||||||
|
onlyFromCamera: true,
|
||||||
|
success: (res) => {
|
||||||
|
console.log(res);
|
||||||
|
form.goods_no = res.result
|
||||||
|
},
|
||||||
|
fail: () => {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '扫码失败'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const filter_params = reactive({})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// const report_tags = reactive([])
|
||||||
|
|
||||||
|
// const all_report_tag_ids = ref([])
|
||||||
|
|
||||||
|
// 默认展开
|
||||||
|
// const defaultExpandKeys = ref([0])
|
||||||
|
|
||||||
|
// 显示机型选择
|
||||||
|
const show_product_cascader = ref(false)
|
||||||
|
// 显示成色
|
||||||
|
const show_degree_popup = ref(false)
|
||||||
|
|
||||||
|
// const show_disk_popup = ref(false)
|
||||||
|
// 显示验机报告
|
||||||
|
// const show_report_tags_popup = ref(false)
|
||||||
|
|
||||||
|
|
||||||
|
const popup_degree_val = ref([])
|
||||||
|
const cascader_product_val = ref([])
|
||||||
|
|
||||||
|
// const popup_disk_val = ref(["未选择"])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const form = reactive({
|
||||||
|
// goods_id: 0,
|
||||||
|
goods_name: '',
|
||||||
|
goods_no: '',
|
||||||
|
|
||||||
|
|
||||||
|
goods_price: '',
|
||||||
|
goods_stock: '',
|
||||||
|
content: '',
|
||||||
|
details_content: '',
|
||||||
|
status: '10',
|
||||||
|
images: [],
|
||||||
|
add_person: '',
|
||||||
|
|
||||||
|
// disk: '未选择',
|
||||||
|
|
||||||
|
degree_id: 0,
|
||||||
|
degree_name: '未选择',
|
||||||
|
type_id: 0,
|
||||||
|
type_name: '未选择',
|
||||||
|
brand_id: 0,
|
||||||
|
brand_name: '未选择',
|
||||||
|
product_id: 0,
|
||||||
|
product_name: '未选择',
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// video_url: ''
|
||||||
|
|
||||||
|
|
||||||
|
// goods_no: '',
|
||||||
|
|
||||||
|
|
||||||
|
// goods_status: '10',
|
||||||
|
// goods_sort: 0,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const onProductChange = (...args) => {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const onSubmit = () => {
|
||||||
|
console.log('form====>', form);
|
||||||
|
fetchGoodsAdd(form).then(res => {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '新增商品成功'
|
||||||
|
})
|
||||||
|
// setTimeout(() => {
|
||||||
|
// uni.switchTab({
|
||||||
|
// url: '/pages/mine/index'
|
||||||
|
// });
|
||||||
|
// }, 500)
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
// uni.switchTab({
|
||||||
|
// url: '/pages/mine/index'
|
||||||
|
// });
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1 // 返回上一页
|
||||||
|
});
|
||||||
|
}, 500)
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 选择机型
|
||||||
|
const onProcutPathChange = (args) => {
|
||||||
|
console.log(args);
|
||||||
|
form.type_id = 0
|
||||||
|
form.type_name = ''
|
||||||
|
form.brand_id = 0
|
||||||
|
form.brand_name = ''
|
||||||
|
form.product_id = 0
|
||||||
|
form.product_name = ''
|
||||||
|
if (args.length >= 1 && args[0] !== null) {
|
||||||
|
form.type_id = args[0].value
|
||||||
|
form.type_name = args[0].text
|
||||||
|
}
|
||||||
|
if (args.length >= 2 && args[1] !== null) {
|
||||||
|
form.brand_id = args[1].value
|
||||||
|
form.brand_name = args[1].text
|
||||||
|
}
|
||||||
|
if (args.length >= 3 && args[2] !== null) {
|
||||||
|
form.product_id = args[2].value
|
||||||
|
form.product_name = args[2].text
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 选择成色
|
||||||
|
const onConfirmDegree = () => {
|
||||||
|
form.degree_id = popup_degree_val.value[0]
|
||||||
|
filter_params.degree_list.forEach(item => {
|
||||||
|
if (item.degree_id === form.degree_id) {
|
||||||
|
form.degree_name = item.degree_name
|
||||||
|
}
|
||||||
|
})
|
||||||
|
show_degree_popup.value = false
|
||||||
|
}
|
||||||
|
// const onConfirmDisk = () => {
|
||||||
|
// form.disk = popup_disk_val.value[0]
|
||||||
|
// console.log('form.disk', form.disk);
|
||||||
|
// console.log('popup_disk_val.value', popup_disk_val.value);
|
||||||
|
// // filter_params.disk_list.forEach(item => {
|
||||||
|
// // if (item.value === form.disk) {
|
||||||
|
// // form.disk = item.value
|
||||||
|
// // }
|
||||||
|
// // })
|
||||||
|
// show_disk_popup.value = false
|
||||||
|
// }
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
fetchFilterParmas(1).then(res => {
|
||||||
|
Object.assign(filter_params, res)
|
||||||
|
filter_params.degree_list.unshift({
|
||||||
|
degree_id: 0,
|
||||||
|
degree_name: '未选择'
|
||||||
|
})
|
||||||
|
console.log('filter_params', filter_params)
|
||||||
|
// console.log('filter_params.disk_list', filter_params.disk_list)
|
||||||
|
|
||||||
|
|
||||||
|
// filter_params.disk_list.unshift({
|
||||||
|
// // id: 0,
|
||||||
|
// value: '未选择'
|
||||||
|
// })
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
// 上传商品图片
|
||||||
|
const addGoodsImg = () => {
|
||||||
|
uni.chooseImage({
|
||||||
|
count: 9 - (form.image?.length || 0),
|
||||||
|
sourceType: ['album', 'camera'],
|
||||||
|
success: res => {
|
||||||
|
res.tempFiles.forEach(file => {
|
||||||
|
uni.uploadFile({
|
||||||
|
url: getUploadImageUrl(),
|
||||||
|
filePath: file.path,
|
||||||
|
name: 'iFile',
|
||||||
|
formData: {
|
||||||
|
group_id: 1,
|
||||||
|
},
|
||||||
|
success: (res) => {
|
||||||
|
let data = JSON.parse(res.data).data
|
||||||
|
form.images.push({
|
||||||
|
id: parseInt(data.file_id),
|
||||||
|
file_path: data.file_path,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.page-content {
|
||||||
|
min-height: 100vh;
|
||||||
|
background-color: #f2f3f5;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.list {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
background: #ffffff;
|
||||||
|
align-items: center;
|
||||||
|
max-height: 300rpx;
|
||||||
|
overflow-y: scroll;
|
||||||
|
padding: 10px;
|
||||||
|
|
||||||
|
.list-item {
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
padding: 20rpx 10rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
341
pages/todo/goodsDetail.vue
Normal file
341
pages/todo/goodsDetail.vue
Normal file
@@ -0,0 +1,341 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
|
||||||
|
|
||||||
|
<nut-watermark v-if="detail.status?.value === 10" class="mark1" :z-index="1" content="此商品已下架"></nut-watermark>
|
||||||
|
<nut-watermark v-if="detail.status?.value === 30" class="mark1" :z-index="1" content="此商品已锁定"></nut-watermark>
|
||||||
|
<nut-watermark v-if="detail.status?.value === 40" class="mark1" :z-index="1" content="此商品已售出"></nut-watermark>
|
||||||
|
|
||||||
|
|
||||||
|
<swiper class="swiper" circular indicator-dots autoplay>
|
||||||
|
<swiper-item @click="showGoodsImages(idx)" v-for="(item,idx) in detail.image" :key="idx">
|
||||||
|
<image :src="item.file_path" mode="aspectFill"></image>
|
||||||
|
</swiper-item>
|
||||||
|
</swiper>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<view class='goods_info'>
|
||||||
|
<nut-cell-group>
|
||||||
|
<view class="price">
|
||||||
|
<text class="unit">¥</text>
|
||||||
|
<text class="value">{{detail.goods_price}}</text>
|
||||||
|
</view>
|
||||||
|
</nut-cell-group>
|
||||||
|
<nut-cell-group>
|
||||||
|
<view class="name">
|
||||||
|
<view class="top">
|
||||||
|
<view class="tag">
|
||||||
|
<text>{{detail.degree?.degree_name}}</text>
|
||||||
|
</view>
|
||||||
|
<text class="title">{{detail.goods_name}}</text>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<text class="info">{{detail.content}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</nut-cell-group>
|
||||||
|
<view class="service">
|
||||||
|
<view class="info">
|
||||||
|
<text class="title">服务</text>
|
||||||
|
<text class="value">{{serviceTxt}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {
|
||||||
|
reactive,
|
||||||
|
ref
|
||||||
|
} from 'vue';
|
||||||
|
import {
|
||||||
|
navigateTo,
|
||||||
|
switchTab,
|
||||||
|
goToLoginPage
|
||||||
|
} from '@/utils/helper';
|
||||||
|
import {
|
||||||
|
onShareAppMessage,
|
||||||
|
onShareTimeline,
|
||||||
|
onLoad
|
||||||
|
} from '@dcloudio/uni-app'
|
||||||
|
import {
|
||||||
|
fetchGoodsDetail,
|
||||||
|
} from '@/api/goods';
|
||||||
|
|
||||||
|
|
||||||
|
import {
|
||||||
|
fetchGetConfig,
|
||||||
|
} from '@/api/config';
|
||||||
|
|
||||||
|
// 审核模式 默认开启 true
|
||||||
|
// const audit = ref(true);
|
||||||
|
const serviceTxt = ref('')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const id = ref(0)
|
||||||
|
const detail = reactive({})
|
||||||
|
|
||||||
|
|
||||||
|
onLoad(options => {
|
||||||
|
console.log('init');
|
||||||
|
// 获取配置
|
||||||
|
getConfig()
|
||||||
|
|
||||||
|
// 获取商品详情
|
||||||
|
id.value = options.id
|
||||||
|
fetchGoodsDetail(id.value).then(res => {
|
||||||
|
Object.assign(detail, res)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 获取配置
|
||||||
|
const getConfig = () => {
|
||||||
|
fetchGetConfig().then(res => {
|
||||||
|
console.log('getConfig=====>', res)
|
||||||
|
// audit.value = res.appConfig.is_audit == 1
|
||||||
|
serviceTxt.value = res.appConfig.service_txt
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分享给朋友圈
|
||||||
|
onShareTimeline((res) => {
|
||||||
|
return {
|
||||||
|
title: detail.goods_name,
|
||||||
|
path: '/pages/mall/detail?id=' + detail.goods_id,
|
||||||
|
imageUrl: detail.image[0].file_path
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
// 分享
|
||||||
|
onShareAppMessage((res) => {
|
||||||
|
return {
|
||||||
|
title: detail.goods_name,
|
||||||
|
path: '/pages/mall/detail?id=' + detail.goods_id,
|
||||||
|
imageUrl: detail.image[0].file_path
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 显示图片
|
||||||
|
const showGoodsImages = (index) => {
|
||||||
|
uni.previewImage({
|
||||||
|
current: index, // 指定当前显示的图片索引
|
||||||
|
urls: detail.image.map(e => {
|
||||||
|
return e.file_path
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.bottom-action {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
height: 50px;
|
||||||
|
background: #fff;
|
||||||
|
width: calc(100% - 20px);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 5px 10px;
|
||||||
|
|
||||||
|
.bottom-action-icon {
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.bottom-action-icon-item {
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
text {
|
||||||
|
color: rgba(0, 0, 0, .5);
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom-action-btn {
|
||||||
|
-ms-flex-align: center;
|
||||||
|
-ms-flex-pack: end;
|
||||||
|
-webkit-align-items: center;
|
||||||
|
align-items: center;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
gap: 5px;
|
||||||
|
-webkit-justify-content: flex-end;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
min-height: calc(100vh - 50px); //100vh;
|
||||||
|
/* align-items: center; */
|
||||||
|
// justify-content: center;
|
||||||
|
background-color: #f2f3f5;
|
||||||
|
// height: calc(100% - 50px);
|
||||||
|
--nut-cell-group-title-color: #000;
|
||||||
|
--nut-collapse-item-padding: 10px 10px 10px 10px;
|
||||||
|
--nut-collapse-wrapper-content-padding: 10px 10px 10px 10px;
|
||||||
|
--nut-collapse-item-color: #000;
|
||||||
|
padding-bottom: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.report-inner {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 5px;
|
||||||
|
|
||||||
|
.report-item {
|
||||||
|
.report-item-name {
|
||||||
|
color: rgba(0, 0, 0, .9);
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.report-item-content {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
.report-item-content-item {
|
||||||
|
padding-top: 2px;
|
||||||
|
padding-bottom: 2px;
|
||||||
|
width: 50%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.count-item {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
gap: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper {
|
||||||
|
width: 100%;
|
||||||
|
height: 414px;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.goods_info {
|
||||||
|
padding: 5px;
|
||||||
|
color: #000;
|
||||||
|
|
||||||
|
.price {
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 10px;
|
||||||
|
background: #fff;
|
||||||
|
|
||||||
|
.unit {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.value {
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.name {
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 10px;
|
||||||
|
background: #fff;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
gap: 5px;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
.top {
|
||||||
|
display: flex;
|
||||||
|
gap: 5px;
|
||||||
|
|
||||||
|
.tag {
|
||||||
|
background: #000;
|
||||||
|
padding: 1px 2px;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
border-radius: 2px;
|
||||||
|
|
||||||
|
text {
|
||||||
|
font-size: 10px;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
color: rgba(0, 0, 0, .7);
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.service {
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 10px;
|
||||||
|
background: #fff;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.info {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 5px;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.value {
|
||||||
|
color: rgba(0, 0, 0, .7);
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.right_icon {
|
||||||
|
background-color: currentColor;
|
||||||
|
mask: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMxQTFBMUEiIGQ9Ik0zNTMuODMgMTU4LjE3YTQyLjY3IDQyLjY3IDAgMSAxIDYwLjM0LTYwLjM0bDM4NCAzODRhNDIuNjcgNDIuNjcgMCAwIDEgMCA2MC4zNmwtMzg0IDM4NGE0Mi42NyA0Mi42NyAwIDEgMS02MC4zNC02MC4zNkw3MDcuNjcgNTEyeiIvPjwvc3ZnPg==') 0 0/100% 100% no-repeat;
|
||||||
|
width: 12px;
|
||||||
|
height: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.report {
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 1px;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
339
pages/todo/goodsEdit.vue
Normal file
339
pages/todo/goodsEdit.vue
Normal file
@@ -0,0 +1,339 @@
|
|||||||
|
<template>
|
||||||
|
|
||||||
|
<view class="page-content">
|
||||||
|
|
||||||
|
<view v-if="is_show_edit" style=" padding: 20rpx;">
|
||||||
|
|
||||||
|
|
||||||
|
<nut-form>
|
||||||
|
<nut-form-item label="名称">
|
||||||
|
<nut-input v-model="form.goods_name" class="nut-input-text" placeholder="请输入名称" type="text" />
|
||||||
|
</nut-form-item>
|
||||||
|
|
||||||
|
<nut-form-item label="串号">
|
||||||
|
<nut-input v-model="form.goods_no" class="nut-input-text" placeholder="请输入串号" type="text">
|
||||||
|
<template #right>
|
||||||
|
<nut-icon @click="onScan" name="scan2" size="30" custom-color="#000000" />
|
||||||
|
</template>
|
||||||
|
</nut-input>
|
||||||
|
</nut-form-item>
|
||||||
|
|
||||||
|
<nut-form-item label="售价">
|
||||||
|
<nut-input v-model="form.goods_price" class="nut-input-text" placeholder="请输入售价" type="nubmer" />
|
||||||
|
</nut-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
<nut-form-item label="说明">
|
||||||
|
<nut-textarea v-model="form.content" autosize placeholder="请输入说明" type="text" />
|
||||||
|
</nut-form-item>
|
||||||
|
|
||||||
|
<nut-form-item label="介绍">
|
||||||
|
<nut-textarea v-model="form.details_content" autosize placeholder="请输入介绍" type="text" />
|
||||||
|
</nut-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <nut-form-item label="上架人">
|
||||||
|
<nut-input v-model="form.add_person" class="nut-input-text" placeholder="请输入上架人" type="text" />
|
||||||
|
</nut-form-item> -->
|
||||||
|
<!-- <nut-form-item label="排序">
|
||||||
|
<nut-input v-model="form.goods_sort" class="nut-input-text" placeholder="请输入排序" type="number" />
|
||||||
|
</nut-form-item> -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<nut-form-item label="状态">
|
||||||
|
<nut-radio-group direction="horizontal" v-model="form.status">
|
||||||
|
<nut-radio label="10">下架</nut-radio>
|
||||||
|
<nut-radio label="20">上架</nut-radio>
|
||||||
|
</nut-radio-group>
|
||||||
|
</nut-form-item>
|
||||||
|
|
||||||
|
<nut-form-item>
|
||||||
|
<template v-slot:label>成色</template>
|
||||||
|
<template v-slot:default>
|
||||||
|
<view style="color: black;" @click="show_degree_popup = true">
|
||||||
|
<text>{{form.degree_name}}</text>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</nut-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
<nut-form-item>
|
||||||
|
<template v-slot:label>机型</template>
|
||||||
|
<template v-slot:default>
|
||||||
|
<view style="color: black;" @click="show_product_cascader = true">
|
||||||
|
<text>{{form.type_name}},{{form.brand_name}},{{form.product_name}}</text>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</nut-form-item>
|
||||||
|
|
||||||
|
<nut-form-item>
|
||||||
|
<template v-slot:label>商品图片</template>
|
||||||
|
<template v-slot:default>
|
||||||
|
<shmily-drag-image v-model="form.images" :number=9 :add-image="addGoodsImg"
|
||||||
|
keyName="file_path"></shmily-drag-image></template>
|
||||||
|
</nut-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<view style="align-items: center;text-align: center; padding: 20rpx 60rpx;">
|
||||||
|
<nut-button type="primary" block @click="onSubmit">
|
||||||
|
保存修改
|
||||||
|
</nut-button>
|
||||||
|
</view>
|
||||||
|
</nut-form>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<nut-popup v-model:visible="show_degree_popup" position="bottom" safe-area-inset-bottom>
|
||||||
|
<nut-picker v-model="popup_degree_val" :columns="filter_params.degree_list"
|
||||||
|
:field-names="{text:'degree_name',value:'degree_id'}" title="选择成色" @confirm="onConfirmDegree"
|
||||||
|
@cancel="show_degree_popup = false">
|
||||||
|
</nut-picker>
|
||||||
|
</nut-popup>
|
||||||
|
|
||||||
|
<nut-cascader title="机型选择" v-model:visible="show_product_cascader" v-model="cascader_product_val"
|
||||||
|
@change="onProductChange" @pathChange="onProcutPathChange" text-key="label" value-key="value"
|
||||||
|
:title-ellipsis="false" children-key="children" :options="filter_params.drop_down_options"></nut-cascader>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {
|
||||||
|
onMounted,
|
||||||
|
reactive,
|
||||||
|
ref,
|
||||||
|
toValue,
|
||||||
|
computed
|
||||||
|
} from 'vue';
|
||||||
|
import {
|
||||||
|
onLoad
|
||||||
|
} from '@dcloudio/uni-app'
|
||||||
|
|
||||||
|
|
||||||
|
import {
|
||||||
|
fetchFilterParmas,
|
||||||
|
fetchGoodsEdit,
|
||||||
|
fetchGoodsDetail,
|
||||||
|
} from '@/api/goods';
|
||||||
|
import {
|
||||||
|
getUploadImageUrl,
|
||||||
|
} from '@/api/request';
|
||||||
|
|
||||||
|
const id = ref(0)
|
||||||
|
// 是否显示结果页
|
||||||
|
const is_show_edit = ref(false);
|
||||||
|
// 显示机型选择
|
||||||
|
const show_product_cascader = ref(false)
|
||||||
|
// 显示成色
|
||||||
|
const show_degree_popup = ref(false)
|
||||||
|
const popup_degree_val = ref([])
|
||||||
|
const cascader_product_val = ref([])
|
||||||
|
const filter_params = reactive({})
|
||||||
|
const form = reactive({
|
||||||
|
goods_id: 0,
|
||||||
|
goods_name: '',
|
||||||
|
goods_no: '',
|
||||||
|
goods_price: '',
|
||||||
|
goods_stock: '',
|
||||||
|
content: '',
|
||||||
|
details_content: '',
|
||||||
|
status: '10',
|
||||||
|
images: [],
|
||||||
|
add_person: '',
|
||||||
|
degree_id: 0,
|
||||||
|
degree_name: '未选择',
|
||||||
|
type_id: 0,
|
||||||
|
type_name: '未选择',
|
||||||
|
brand_id: 0,
|
||||||
|
brand_name: '未选择',
|
||||||
|
product_id: 0,
|
||||||
|
product_name: '未选择',
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
onMounted(() => {
|
||||||
|
fetchFilterParmas(1).then(res => {
|
||||||
|
Object.assign(filter_params, res)
|
||||||
|
filter_params.degree_list.unshift({
|
||||||
|
degree_id: 0,
|
||||||
|
degree_name: '未选择'
|
||||||
|
})
|
||||||
|
console.log('filter_params', filter_params)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
onLoad(options => {
|
||||||
|
console.log("goods_id===>", options.id);
|
||||||
|
// 获取商品详情
|
||||||
|
id.value = options.id
|
||||||
|
is_show_edit.value = false;
|
||||||
|
fetchGoodsDetail(id.value).then(res => {
|
||||||
|
is_show_edit.value = true;
|
||||||
|
console.log("====>", res);
|
||||||
|
form.goods_id = res.goods_id
|
||||||
|
form.goods_name = res.goods_name
|
||||||
|
form.goods_no = res.goods_no
|
||||||
|
form.goods_price = res.goods_price
|
||||||
|
// form.goods_stock = res.goods_stock
|
||||||
|
form.content = res.content
|
||||||
|
form.details_content = res.details_content
|
||||||
|
form.status = res.status.value.toString()
|
||||||
|
|
||||||
|
form.degree_id = res.degree?.degree_id ?? 0
|
||||||
|
form.degree_name = res.degree?.degree_name ?? '未选择'
|
||||||
|
form.type_id = res.type?.type_id ?? 0
|
||||||
|
form.type_name = res.type?.name ?? '未选择'
|
||||||
|
form.brand_id = res.brand?.brand_id ?? 0
|
||||||
|
form.brand_name = res.brand?.name ?? '未选择'
|
||||||
|
form.product_id = res.product?.product_id ?? 0
|
||||||
|
form.product_name = res.product?.name ?? '未选择'
|
||||||
|
popup_degree_val.value = [res.degree?.degree_id ?? 0]
|
||||||
|
cascader_product_val.value = [res.type?.type_id ?? 0, res.brand?.brand_id ?? 0, res.product
|
||||||
|
?.product_id ?? 0
|
||||||
|
]
|
||||||
|
form.images = []
|
||||||
|
res.image?.forEach(item => {
|
||||||
|
form.images.push({
|
||||||
|
id: item.image_id,
|
||||||
|
file_path: item.file_path,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
const onProductChange = (...args) => {
|
||||||
|
console.log(0, ...args)
|
||||||
|
console.log(cascader_product_val)
|
||||||
|
}
|
||||||
|
|
||||||
|
const onSubmit = () => {
|
||||||
|
console.log('form===>', form);
|
||||||
|
fetchGoodsEdit(form).then(res => {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '编辑商品成功'
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1 // 返回上一页
|
||||||
|
});
|
||||||
|
}, 500)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 扫码
|
||||||
|
const onScan = () => {
|
||||||
|
uni.scanCode({
|
||||||
|
onlyFromCamera: true,
|
||||||
|
success: (res) => {
|
||||||
|
console.log(res);
|
||||||
|
form.goods_no = res.result
|
||||||
|
},
|
||||||
|
fail: () => {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '扫码失败'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const onProcutPathChange = (args) => {
|
||||||
|
console.log(args);
|
||||||
|
form.type_id = 0
|
||||||
|
form.type_name = ''
|
||||||
|
form.brand_id = 0
|
||||||
|
form.brand_name = ''
|
||||||
|
form.product_id = 0
|
||||||
|
form.product_name = ''
|
||||||
|
if (args.length >= 1 && args[0] !== null) {
|
||||||
|
form.type_id = args[0].value
|
||||||
|
form.type_name = args[0].text
|
||||||
|
}
|
||||||
|
if (args.length >= 2 && args[1] !== null) {
|
||||||
|
form.brand_id = args[1].value
|
||||||
|
form.brand_name = args[1].text
|
||||||
|
}
|
||||||
|
if (args.length >= 3 && args[2] !== null) {
|
||||||
|
form.product_id = args[2].value
|
||||||
|
form.product_name = args[2].text
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const onConfirmDegree = () => {
|
||||||
|
form.degree_id = popup_degree_val.value[0]
|
||||||
|
filter_params.degree_list.forEach(item => {
|
||||||
|
if (item.degree_id === form.degree_id) {
|
||||||
|
form.degree_name = item.degree_name
|
||||||
|
}
|
||||||
|
})
|
||||||
|
show_degree_popup.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 上传商品图片
|
||||||
|
const addGoodsImg = () => {
|
||||||
|
uni.chooseImage({
|
||||||
|
count: 9 - (form.image?.length || 0),
|
||||||
|
sourceType: ['album', 'camera'],
|
||||||
|
success: res => {
|
||||||
|
res.tempFiles.forEach(file => {
|
||||||
|
uni.uploadFile({
|
||||||
|
url: getUploadImageUrl(),
|
||||||
|
filePath: file.path,
|
||||||
|
name: 'iFile',
|
||||||
|
formData: {
|
||||||
|
group_id: 1,
|
||||||
|
},
|
||||||
|
success: (res) => {
|
||||||
|
let data = JSON.parse(res.data).data
|
||||||
|
form.images.push({
|
||||||
|
id: parseInt(data.file_id),
|
||||||
|
file_path: data.file_path,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.page-content {
|
||||||
|
min-height: 100vh;
|
||||||
|
background-color: #f2f3f5;
|
||||||
|
--nut-searchbar-input-height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// .list {
|
||||||
|
// display: flex;
|
||||||
|
// justify-content: center;
|
||||||
|
// flex-direction: column;
|
||||||
|
// background: #ffffff;
|
||||||
|
// align-items: center;
|
||||||
|
// max-height: 300rpx;
|
||||||
|
// overflow-y: scroll;
|
||||||
|
// padding: 10px;
|
||||||
|
|
||||||
|
// .list-item {
|
||||||
|
// border-bottom: 1px solid #eee;
|
||||||
|
// padding: 20rpx 10rpx;
|
||||||
|
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
</style>
|
||||||
705
pages/todo/goodsList.vue
Normal file
705
pages/todo/goodsList.vue
Normal file
@@ -0,0 +1,705 @@
|
|||||||
|
<template>
|
||||||
|
<view class="page-content">
|
||||||
|
<z-paging ref="paging" :refresher-enabled="false" :auto-clean-list-when-reload="false"
|
||||||
|
:auto-scroll-to-top-when-reload="false" v-model="dataList" @query="queryList">
|
||||||
|
<view style="z-index: 10000;position: sticky;" :style="'top:0px'">
|
||||||
|
<view class="top-bar">
|
||||||
|
<nut-button type="primary" block plain @click="navigateTo('/pages/config/goodsAdd')">
|
||||||
|
新增订单
|
||||||
|
</nut-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="goods-item" v-for="(item, index) in dataList" :key="index">
|
||||||
|
<view class="goods-item-image">
|
||||||
|
<!-- @click="showGoodsImages(item)" -->
|
||||||
|
<image class="goods-item-image-img" :src="getImg(item)" @click="navigateTo('/pages/config/goodsDetail?id=' + item.goods_id)"
|
||||||
|
mode="scaleToFill">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
<view class="goods-item-content">
|
||||||
|
<!-- @click="navigateTo('/pages/control/goods/edit?id=' + item.goods_id)" -->
|
||||||
|
<view class="goods-item-content-header">
|
||||||
|
<nut-tag custom-color="#1a1a1a">{{ item.degree.degree_name }}</nut-tag>
|
||||||
|
<view>{{item.goods_name}}</view>
|
||||||
|
</view>
|
||||||
|
<!-- @click="navigateTo('/pages/control/goods/edit?id=' + item.goods_id)" -->
|
||||||
|
<view class="goods-item-content-body">
|
||||||
|
<view class="goods-item-content-body-desc">
|
||||||
|
{{item.content}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="goods-item-content-footer">
|
||||||
|
<view style="font-size: 24rpx;color: red;">
|
||||||
|
<text>¥{{item.goods_price}}</text>
|
||||||
|
</view>
|
||||||
|
<view style="font-size: 24rpx;">
|
||||||
|
状态:<text>{{item.status.text}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="goods-item-content-footer-btn">
|
||||||
|
<nut-button size="small" type="primary"
|
||||||
|
v-if="item.status.value == 10 || item.status.value == 20"
|
||||||
|
@click="navigateTo('/pages/config/goodsEdit?id=' + item.goods_id)">
|
||||||
|
编辑商品
|
||||||
|
</nut-button>
|
||||||
|
<nut-button size="small" type="primary" v-if="item.status.value == 40 "
|
||||||
|
@click="navigateTo('/pages/config/goodsEdit?id=' + item.goods_id)">
|
||||||
|
售后(重新上架)
|
||||||
|
</nut-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</z-paging>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {
|
||||||
|
ref,
|
||||||
|
reactive,
|
||||||
|
onMounted,
|
||||||
|
computed
|
||||||
|
} from 'vue'
|
||||||
|
|
||||||
|
import {
|
||||||
|
onLoad,
|
||||||
|
onShow,
|
||||||
|
} from '@dcloudio/uni-app'
|
||||||
|
// import {
|
||||||
|
|
||||||
|
// fetchFilterParmas
|
||||||
|
// } from '@/api/goods';
|
||||||
|
import {
|
||||||
|
fetchFilterParmas,
|
||||||
|
fetchSysGoodsList
|
||||||
|
} from '@/api/goods';
|
||||||
|
|
||||||
|
import {
|
||||||
|
navigateTo,
|
||||||
|
// switchTab,
|
||||||
|
// goToOtherMiniProgram
|
||||||
|
} from '@/utils/helper';
|
||||||
|
|
||||||
|
|
||||||
|
// 显示商品图片
|
||||||
|
const showGoodsImages = (goods) => {
|
||||||
|
console.log(goods);
|
||||||
|
uni.previewImage({
|
||||||
|
// current: index, // 指定当前显示的图片索引
|
||||||
|
urls: goods?.image.map(e => {
|
||||||
|
return e.file_path
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const getImg = (goods) => {
|
||||||
|
const url = goods?.image?.[0]?.file_path
|
||||||
|
return url ? url + '?imageView2/1/w/200/h/200' : ''
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// zp
|
||||||
|
const paging = ref(null);
|
||||||
|
// 商品列表
|
||||||
|
const dataList = ref([]);
|
||||||
|
|
||||||
|
// 价格排序
|
||||||
|
const selectPriceSortRef = ref(null);
|
||||||
|
// 成色选择
|
||||||
|
const selectDegreeRef = ref(null);
|
||||||
|
// 机型选择
|
||||||
|
const selectProductRef = ref(null)
|
||||||
|
|
||||||
|
const state = reactive({
|
||||||
|
type_params: [], // 产品类型
|
||||||
|
drop_down_options: [], // 产品类型下的品牌列表
|
||||||
|
o_drop_down_options: [],
|
||||||
|
// 价格排序
|
||||||
|
price_sort_params: [{
|
||||||
|
text: '默认排序',
|
||||||
|
value: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '价格升序',
|
||||||
|
value: 'ascend'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '价格降序',
|
||||||
|
value: 'descend'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
// 成色所有选项
|
||||||
|
degree_params: [],
|
||||||
|
price_sort: '',
|
||||||
|
price_sort_name: "默认排序",
|
||||||
|
degree_ids: [],
|
||||||
|
degree_name: "成色",
|
||||||
|
product_name: "机型",
|
||||||
|
type_id: 1, // 产品类型id 默认 1 手机
|
||||||
|
type_name: '手机',
|
||||||
|
brand_id: 0, // 品牌id // 默认 0 全部
|
||||||
|
brand_name: '全部',
|
||||||
|
product_ids: [0], // 机型ids 默认 0 全部
|
||||||
|
search_val: '', // 搜索
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 搜索
|
||||||
|
const onSearch = () => {
|
||||||
|
console.log("搜索:", state.search_val);
|
||||||
|
paging.value.reload();
|
||||||
|
|
||||||
|
}
|
||||||
|
// 清空搜索框
|
||||||
|
const onClear = () => {
|
||||||
|
console.log("搜索:", state.search_val);
|
||||||
|
paging.value.reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 机型重置
|
||||||
|
const onResetProduct = () => {
|
||||||
|
console.log("重置产品");
|
||||||
|
state.type_id = 1
|
||||||
|
state.type_name = '手机'
|
||||||
|
state.brand_id = 0
|
||||||
|
state.brand_name = '全部'
|
||||||
|
state.product_ids = [0]
|
||||||
|
state.product_name = '机型'
|
||||||
|
}
|
||||||
|
// 机型确定
|
||||||
|
const onConfirmProduct = () => {
|
||||||
|
console.log("当前产品类型", {
|
||||||
|
"type_id": state.type_id,
|
||||||
|
"type_name": state.type_name,
|
||||||
|
"brand_id": state.brand_id,
|
||||||
|
"brand_name": state.brand_name,
|
||||||
|
"product_ids": state.product_ids,
|
||||||
|
});
|
||||||
|
selectProductRef.value?.toggle(false);
|
||||||
|
// 4. 刷新数据
|
||||||
|
paging.value.reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 选择机型
|
||||||
|
const selectProduct = (product) => {
|
||||||
|
if (product.value === 0) {
|
||||||
|
state.product_ids = [0]
|
||||||
|
} else {
|
||||||
|
state.product_ids = state.product_ids.filter(e => e != 0)
|
||||||
|
// 判断是否存在
|
||||||
|
const index = state.product_ids.indexOf(product.value);
|
||||||
|
if (index > -1) {
|
||||||
|
state.product_ids.splice(index, 1); // 存在则删除
|
||||||
|
if (state.product_ids.length === 0) {
|
||||||
|
state.product_ids = [0]
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
state.product_ids.push(product.value); // 新增
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log(product);
|
||||||
|
}
|
||||||
|
|
||||||
|
const productOptions = computed(() => {
|
||||||
|
return state?.o_drop_down_options[state.type_id]?.children[state.brand_id].children
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
// 选择品牌
|
||||||
|
const selectBrand = (brand) => {
|
||||||
|
console.log(brand);
|
||||||
|
// 选中的品牌id
|
||||||
|
state.brand_id = brand.value;
|
||||||
|
state.brand_name = brand.label
|
||||||
|
// 品牌下的产品ids
|
||||||
|
state.product_ids = [0];
|
||||||
|
state.product_name = brand.label
|
||||||
|
}
|
||||||
|
// 选择type
|
||||||
|
const selectType = (type) => {
|
||||||
|
console.log(type);
|
||||||
|
// 选中产品类型id
|
||||||
|
state.type_id = type.type_id;
|
||||||
|
state.type_name = type.name;
|
||||||
|
// 选中的品牌id
|
||||||
|
state.brand_id = 0;
|
||||||
|
state.brand_name = '全部';
|
||||||
|
// 品牌下的产品ids
|
||||||
|
state.product_ids = [0];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 选择价格排序
|
||||||
|
const selectPriceSort = (item) => {
|
||||||
|
if (state.price_sort !== item.value) {
|
||||||
|
state.price_sort = item.value
|
||||||
|
state.price_sort_name = item.text
|
||||||
|
} else {
|
||||||
|
state.price_sort_name = '默认排序'
|
||||||
|
state.price_sort = ''
|
||||||
|
}
|
||||||
|
selectPriceSortRef.value?.toggle(false);
|
||||||
|
// 4. 刷新数据
|
||||||
|
paging.value.reload();
|
||||||
|
};
|
||||||
|
|
||||||
|
// 选择成色
|
||||||
|
const selectDegree = (item) => {
|
||||||
|
const index = state.degree_ids.indexOf(item.value);
|
||||||
|
if (index > -1) {
|
||||||
|
state.degree_ids.splice(index, 1);
|
||||||
|
} else {
|
||||||
|
state.degree_ids.push(item.value);
|
||||||
|
}
|
||||||
|
if (state.degree_ids.length > 0) {
|
||||||
|
state.degree_name = '已选' + state.degree_ids.length.toString() + '项'
|
||||||
|
} else {
|
||||||
|
state.degree_name = '成色'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 重置选择成色
|
||||||
|
const onResetDegree = () => {
|
||||||
|
state.degree_ids = [];
|
||||||
|
state.degree_name = '成色'
|
||||||
|
selectDegreeRef.value?.toggle(false);
|
||||||
|
// 4. 刷新数据
|
||||||
|
paging.value.reload();
|
||||||
|
}
|
||||||
|
// 确认选择成色
|
||||||
|
const onConfirmDegree = () => {
|
||||||
|
if (state.degree_ids.length > 0) {
|
||||||
|
state.degree_name = '已选' + state.degree_ids.length.toString() + '项'
|
||||||
|
} else {
|
||||||
|
state.degree_name = '成色'
|
||||||
|
}
|
||||||
|
selectDegreeRef.value?.toggle(false);
|
||||||
|
// 4. 刷新数据
|
||||||
|
paging.value.reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 获取列表
|
||||||
|
const queryList = (pageNo, pageSize) => {
|
||||||
|
const params = {
|
||||||
|
pageSize,
|
||||||
|
page: pageNo,
|
||||||
|
price_sort: state.price_sort,
|
||||||
|
degree_ids: state.degree_ids,
|
||||||
|
type_id: state.type_id,
|
||||||
|
brand_id: state.brand_id,
|
||||||
|
product_ids: state.product_ids,
|
||||||
|
search: state.search_val,
|
||||||
|
}
|
||||||
|
console.log(params);
|
||||||
|
fetchSysGoodsList(params).then(res => {
|
||||||
|
console.log('res=>', res.list);
|
||||||
|
paging.value.complete(res.list);
|
||||||
|
|
||||||
|
}).catch(res => {
|
||||||
|
paging.value.complete(false);
|
||||||
|
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const init = () => {
|
||||||
|
console.log('init111');
|
||||||
|
// 加载默认筛选项内容
|
||||||
|
fetchFilterParmas().then(res => {
|
||||||
|
console.log(res);
|
||||||
|
// 处理成色
|
||||||
|
let degree_params = res.degree_list;
|
||||||
|
state.degree_params = degree_params.reduce((it, cit) => {
|
||||||
|
it.push({
|
||||||
|
text: cit.degree_name,
|
||||||
|
value: cit.degree_id
|
||||||
|
});
|
||||||
|
return it;
|
||||||
|
}, state.degree_params) || [];
|
||||||
|
// 产品类型
|
||||||
|
state.type_params = res.type_list
|
||||||
|
// 产品下品牌列表
|
||||||
|
state.drop_down_options = res.drop_down_options
|
||||||
|
state.o_drop_down_options = res.o_drop_down_options
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
onShow(() => {
|
||||||
|
console.log("onshow---");
|
||||||
|
console.log('paging.value', paging.value);
|
||||||
|
if (paging.value) {
|
||||||
|
// paging.value.pageNo = 1;
|
||||||
|
paging.value.refresh();
|
||||||
|
// paging.value.refreshToPage(1)
|
||||||
|
// paging.value.reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
onMounted(() => {
|
||||||
|
init();
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.page-content {
|
||||||
|
min-height: 100vh;
|
||||||
|
background-color: #f2f3f5;
|
||||||
|
--nut-menu-bar-box-shadow: none;
|
||||||
|
--nut-menu-item-content-padding: 20rpx;
|
||||||
|
--nut-menu-item-content-max-height: 900rpx;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// --nut-searchbar-input-padding:5px 0 5px 13px;
|
||||||
|
--nut-searchbar-input-height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.titleClass) .nut-menu__title-text {
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-bar {
|
||||||
|
background: #fff;
|
||||||
|
// padding: 20rpx;
|
||||||
|
align-items: center;
|
||||||
|
text-align: center;
|
||||||
|
padding: 20rpx 60rpx;
|
||||||
|
// display: flex;
|
||||||
|
// justify-content: space-between;
|
||||||
|
// border-top: 1px solid #eee;
|
||||||
|
// position: sticky;
|
||||||
|
// bottom: 0;
|
||||||
|
// z-index: 999;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.goods-item {
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 20rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
// border-radius: 20rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
gap: 20rpx;
|
||||||
|
|
||||||
|
.goods-item-image {
|
||||||
|
width: 180rpx;
|
||||||
|
height: 180rpx;
|
||||||
|
|
||||||
|
.goods-item-image-img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.goods-item-content {
|
||||||
|
// width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
/* 首尾贴边,中间均分 */
|
||||||
|
|
||||||
|
// gap: 15px;
|
||||||
|
.goods-item-content-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 6rpx 0;
|
||||||
|
gap: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.goods-item-content-body {
|
||||||
|
padding: 6rpx 0;
|
||||||
|
|
||||||
|
.goods-item-content-body-desc {
|
||||||
|
color: #7c7c7c;
|
||||||
|
font-size: 26rpx;
|
||||||
|
/* 关键属性 */
|
||||||
|
display: -webkit-box;
|
||||||
|
/* 使用弹性盒子布局 */
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
/* 垂直方向排列 */
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
/* 限制显示两行 */
|
||||||
|
overflow: hidden;
|
||||||
|
/* 超出部分隐藏 */
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
/* 超出时显示省略号 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.goods-item-content-stock {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.goods-item-content-stock-desc {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.goods-item-content-status-desc {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.goods-item-content-footer {
|
||||||
|
padding: 6rpx 0;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
// width: 100%;
|
||||||
|
// flex-direction: row;
|
||||||
|
|
||||||
|
.goods-item-content-footer-btn {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10rpx;
|
||||||
|
|
||||||
|
.share-btn {
|
||||||
|
border-radius: 50rpx;
|
||||||
|
border: 2rpx solid red;
|
||||||
|
font-size: 26rpx;
|
||||||
|
align-items: center;
|
||||||
|
height: 54rpx;
|
||||||
|
color: red;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.filter-types {
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
overflow: auto;
|
||||||
|
gap: 10rpx;
|
||||||
|
padding: 10rpx;
|
||||||
|
// position: fixed;
|
||||||
|
// top: 0;
|
||||||
|
height: 60rpx;
|
||||||
|
// z-index: 9999;
|
||||||
|
background-color: #fff;
|
||||||
|
border-bottom: 2rpx solid gainsboro;
|
||||||
|
border-top: 2rpx solid gainsboro;
|
||||||
|
|
||||||
|
.filter-type-inner {
|
||||||
|
align-items: center;
|
||||||
|
background-color: rgba(0, 0, 0, .05);
|
||||||
|
border-radius: 16rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
font-size: 28rpx;
|
||||||
|
gap: 15rpx;
|
||||||
|
padding: 10rpx 20rpx;
|
||||||
|
|
||||||
|
// image {
|
||||||
|
// height: 22px;
|
||||||
|
// width: 22px;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-type-inner.active {
|
||||||
|
background-color: rgba(250, 44, 25, .1);
|
||||||
|
color: var(--nutui-color-primary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs-container {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.tab-pane-inner {
|
||||||
|
height: 600rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs-inner {
|
||||||
|
overflow-y: scroll;
|
||||||
|
height: 600rpx;
|
||||||
|
width: 160rpx;
|
||||||
|
background-color: #F5F5F5;
|
||||||
|
|
||||||
|
.tab-inner {
|
||||||
|
display: flex;
|
||||||
|
height: 60rpx;
|
||||||
|
padding: 10rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
background: #F5F5F5;
|
||||||
|
|
||||||
|
text {
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-inner-active {
|
||||||
|
// background: #FFF;
|
||||||
|
background-color: rgba(250, 44, 25, .1);
|
||||||
|
color: var(--nutui-color-primary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.degree-inner {
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
// gap: 20rpx;
|
||||||
|
gap: 10rpx;
|
||||||
|
// padding: 11px;
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 60rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.degree-item {
|
||||||
|
align-items: center;
|
||||||
|
background-color: rgba(0, 0, 0, .05);
|
||||||
|
border-radius: 10rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
font-size: 26rpx;
|
||||||
|
gap: 10rpx;
|
||||||
|
justify-content: center;
|
||||||
|
min-height: 80rpx;
|
||||||
|
width: calc(50% - 10rpx);
|
||||||
|
}
|
||||||
|
|
||||||
|
.degree-item.active {
|
||||||
|
background-color: rgba(250, 44, 25, .1);
|
||||||
|
color: var(--nutui-color-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-btns {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
padding: 20rpx 0;
|
||||||
|
|
||||||
|
// border-bottom: 2rpx solid gainsboro;
|
||||||
|
// border-top: 2rpx solid gainsboro;
|
||||||
|
|
||||||
|
.reset {
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.confirm {
|
||||||
|
flex: 2;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.degree-btns {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.reset {
|
||||||
|
flex: 1;
|
||||||
|
/* 重置按钮占 1 份 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.confirm {
|
||||||
|
flex: 2;
|
||||||
|
/* 确认按钮占 2 份 */
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.main-nav-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-button {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
width: 45%;
|
||||||
|
height: 160rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 0 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.phone-button {
|
||||||
|
background: linear-gradient(135deg, #6a5ae0, #8d7bfb);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.parts-button {
|
||||||
|
background: linear-gradient(135deg, #ff6b6b, #ee5253);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-button-bg {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
height: 100%;
|
||||||
|
width: 50%;
|
||||||
|
opacity: 0.2;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-button-icon {
|
||||||
|
width: 90rpx;
|
||||||
|
height: 90rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
// border-radius: 20rpx;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-button-content {
|
||||||
|
z-index: 2;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-button-title {
|
||||||
|
font-size: 34rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 8rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-button-desc {
|
||||||
|
font-size: 24rpx;
|
||||||
|
opacity: 0.85;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<template>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
</style>
|
|
||||||
481
pages/todo/todoList.vue
Normal file
481
pages/todo/todoList.vue
Normal file
@@ -0,0 +1,481 @@
|
|||||||
|
<template>
|
||||||
|
<view class="page-content">
|
||||||
|
<z-paging ref="paging" :refresher-enabled="false" :auto-clean-list-when-reload="false"
|
||||||
|
:auto-scroll-to-top-when-reload="false" v-model="dataList" @query="queryList">
|
||||||
|
<view style="z-index: 10000;position: sticky;" :style="'top:0px'">
|
||||||
|
<view class="top-bar">
|
||||||
|
<nut-button type="primary" block plain @click="navigateTo('/pages/config/goodsAdd')">
|
||||||
|
新增备忘录
|
||||||
|
</nut-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="todo-item" v-for="(item, index) in dataList" :key="index">
|
||||||
|
|
||||||
|
<view class="goods-item-content">
|
||||||
|
<!-- @click="navigateTo('/pages/control/goods/edit?id=' + item.goods_id)" -->
|
||||||
|
<view class="goods-item-content-header">
|
||||||
|
<view style="font-size: 24rpx">记录人:</view>
|
||||||
|
<nut-tag custom-color="#1a1a1a">{{ item.user.staff_name }}</nut-tag>
|
||||||
|
</view>
|
||||||
|
<view class="goods-item-content-body">
|
||||||
|
<view class="goods-item-content-body-desc">
|
||||||
|
{{item.content}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="goods-item-content-footer">
|
||||||
|
<view style="font-size: 24rpx; color: red;" v-if="item.status.value === 0">
|
||||||
|
状态:<text>{{item.status.text}}</text>
|
||||||
|
</view>
|
||||||
|
<view style="font-size: 24rpx; color:chartreuse;" v-else>
|
||||||
|
状态:<text>{{item.status.text}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="goods-item-content-footer-btn">
|
||||||
|
<nut-button size="small" type="success" v-if="item.status.value == 0"
|
||||||
|
@click="onMark(item.goods_id,'1')">
|
||||||
|
标记已办
|
||||||
|
</nut-button>
|
||||||
|
<nut-button size="small" type="danger" v-if="item.status.value == 1"
|
||||||
|
@click="onMark(item.goods_id,'0')">
|
||||||
|
标记未办
|
||||||
|
</nut-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</z-paging>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {
|
||||||
|
ref,
|
||||||
|
reactive,
|
||||||
|
onMounted,
|
||||||
|
computed
|
||||||
|
} from 'vue'
|
||||||
|
|
||||||
|
import {
|
||||||
|
onLoad,
|
||||||
|
onShow,
|
||||||
|
} from '@dcloudio/uni-app'
|
||||||
|
|
||||||
|
import {
|
||||||
|
fetchTodoList
|
||||||
|
} from '@/api/index';
|
||||||
|
|
||||||
|
import {
|
||||||
|
navigateTo,
|
||||||
|
} from '@/utils/helper';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// zp
|
||||||
|
const paging = ref(null);
|
||||||
|
// 列表
|
||||||
|
const dataList = ref([]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 获取列表
|
||||||
|
const queryList = (pageNo, pageSize) => {
|
||||||
|
const params = {
|
||||||
|
pageSize,
|
||||||
|
page: pageNo,
|
||||||
|
|
||||||
|
}
|
||||||
|
console.log(params);
|
||||||
|
fetchTodoList(params).then(res => {
|
||||||
|
console.log('res=>', res.list);
|
||||||
|
paging.value.complete(res.list);
|
||||||
|
|
||||||
|
}).catch(res => {
|
||||||
|
paging.value.complete(false);
|
||||||
|
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const init = () => {
|
||||||
|
console.log('init111');
|
||||||
|
// // 加载默认筛选项内容
|
||||||
|
// fetchFilterParmas().then(res => {
|
||||||
|
// console.log(res);
|
||||||
|
// // 处理成色
|
||||||
|
// let degree_params = res.degree_list;
|
||||||
|
// state.degree_params = degree_params.reduce((it, cit) => {
|
||||||
|
// it.push({
|
||||||
|
// text: cit.degree_name,
|
||||||
|
// value: cit.degree_id
|
||||||
|
// });
|
||||||
|
// return it;
|
||||||
|
// }, state.degree_params) || [];
|
||||||
|
// // 产品类型
|
||||||
|
// state.type_params = res.type_list
|
||||||
|
// // 产品下品牌列表
|
||||||
|
// state.drop_down_options = res.drop_down_options
|
||||||
|
// state.o_drop_down_options = res.o_drop_down_options
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
|
||||||
|
onShow(() => {
|
||||||
|
console.log("onshow---");
|
||||||
|
console.log('paging.value', paging.value);
|
||||||
|
if (paging.value) {
|
||||||
|
paging.value.refresh();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
init();
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.page-content {
|
||||||
|
min-height: 100vh;
|
||||||
|
background-color: #f2f3f5;
|
||||||
|
--nut-menu-bar-box-shadow: none;
|
||||||
|
--nut-menu-item-content-padding: 20rpx;
|
||||||
|
--nut-menu-item-content-max-height: 900rpx;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// --nut-searchbar-input-padding:5px 0 5px 13px;
|
||||||
|
--nut-searchbar-input-height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.titleClass) .nut-menu__title-text {
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-bar {
|
||||||
|
background: #fff;
|
||||||
|
// padding: 20rpx;
|
||||||
|
align-items: center;
|
||||||
|
text-align: center;
|
||||||
|
padding: 20rpx 60rpx;
|
||||||
|
// display: flex;
|
||||||
|
// justify-content: space-between;
|
||||||
|
// border-top: 1px solid #eee;
|
||||||
|
// position: sticky;
|
||||||
|
// bottom: 0;
|
||||||
|
// z-index: 999;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.todo-item {
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 20rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
gap: 20rpx;
|
||||||
|
|
||||||
|
|
||||||
|
.goods-item-content {
|
||||||
|
// width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
/* 首尾贴边,中间均分 */
|
||||||
|
|
||||||
|
// gap: 15px;
|
||||||
|
.goods-item-content-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 6rpx 0;
|
||||||
|
gap: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.goods-item-content-body {
|
||||||
|
padding: 6rpx 0;
|
||||||
|
|
||||||
|
.goods-item-content-body-desc {
|
||||||
|
color: #7c7c7c;
|
||||||
|
font-size: 26rpx;
|
||||||
|
/* 关键属性 */
|
||||||
|
display: -webkit-box;
|
||||||
|
/* 使用弹性盒子布局 */
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
/* 垂直方向排列 */
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
/* 限制显示两行 */
|
||||||
|
overflow: hidden;
|
||||||
|
/* 超出部分隐藏 */
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
/* 超出时显示省略号 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.goods-item-content-stock {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.goods-item-content-stock-desc {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.goods-item-content-status-desc {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.goods-item-content-footer {
|
||||||
|
padding: 6rpx 0;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
// width: 100%;
|
||||||
|
// flex-direction: row;
|
||||||
|
|
||||||
|
.goods-item-content-footer-btn {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10rpx;
|
||||||
|
|
||||||
|
.share-btn {
|
||||||
|
border-radius: 50rpx;
|
||||||
|
border: 2rpx solid red;
|
||||||
|
font-size: 26rpx;
|
||||||
|
align-items: center;
|
||||||
|
height: 54rpx;
|
||||||
|
color: red;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.filter-types {
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
overflow: auto;
|
||||||
|
gap: 10rpx;
|
||||||
|
padding: 10rpx;
|
||||||
|
// position: fixed;
|
||||||
|
// top: 0;
|
||||||
|
height: 60rpx;
|
||||||
|
// z-index: 9999;
|
||||||
|
background-color: #fff;
|
||||||
|
border-bottom: 2rpx solid gainsboro;
|
||||||
|
border-top: 2rpx solid gainsboro;
|
||||||
|
|
||||||
|
.filter-type-inner {
|
||||||
|
align-items: center;
|
||||||
|
background-color: rgba(0, 0, 0, .05);
|
||||||
|
border-radius: 16rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
font-size: 28rpx;
|
||||||
|
gap: 15rpx;
|
||||||
|
padding: 10rpx 20rpx;
|
||||||
|
|
||||||
|
// image {
|
||||||
|
// height: 22px;
|
||||||
|
// width: 22px;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-type-inner.active {
|
||||||
|
background-color: rgba(250, 44, 25, .1);
|
||||||
|
color: var(--nutui-color-primary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs-container {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.tab-pane-inner {
|
||||||
|
height: 600rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs-inner {
|
||||||
|
overflow-y: scroll;
|
||||||
|
height: 600rpx;
|
||||||
|
width: 160rpx;
|
||||||
|
background-color: #F5F5F5;
|
||||||
|
|
||||||
|
.tab-inner {
|
||||||
|
display: flex;
|
||||||
|
height: 60rpx;
|
||||||
|
padding: 10rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
background: #F5F5F5;
|
||||||
|
|
||||||
|
text {
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-inner-active {
|
||||||
|
// background: #FFF;
|
||||||
|
background-color: rgba(250, 44, 25, .1);
|
||||||
|
color: var(--nutui-color-primary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.degree-inner {
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
// gap: 20rpx;
|
||||||
|
gap: 10rpx;
|
||||||
|
// padding: 11px;
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 60rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.degree-item {
|
||||||
|
align-items: center;
|
||||||
|
background-color: rgba(0, 0, 0, .05);
|
||||||
|
border-radius: 10rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
font-size: 26rpx;
|
||||||
|
gap: 10rpx;
|
||||||
|
justify-content: center;
|
||||||
|
min-height: 80rpx;
|
||||||
|
width: calc(50% - 10rpx);
|
||||||
|
}
|
||||||
|
|
||||||
|
.degree-item.active {
|
||||||
|
background-color: rgba(250, 44, 25, .1);
|
||||||
|
color: var(--nutui-color-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-btns {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
padding: 20rpx 0;
|
||||||
|
|
||||||
|
// border-bottom: 2rpx solid gainsboro;
|
||||||
|
// border-top: 2rpx solid gainsboro;
|
||||||
|
|
||||||
|
.reset {
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.confirm {
|
||||||
|
flex: 2;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.degree-btns {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.reset {
|
||||||
|
flex: 1;
|
||||||
|
/* 重置按钮占 1 份 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.confirm {
|
||||||
|
flex: 2;
|
||||||
|
/* 确认按钮占 2 份 */
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.main-nav-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-button {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
width: 45%;
|
||||||
|
height: 160rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 0 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.phone-button {
|
||||||
|
background: linear-gradient(135deg, #6a5ae0, #8d7bfb);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.parts-button {
|
||||||
|
background: linear-gradient(135deg, #ff6b6b, #ee5253);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-button-bg {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
height: 100%;
|
||||||
|
width: 50%;
|
||||||
|
opacity: 0.2;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-button-icon {
|
||||||
|
width: 90rpx;
|
||||||
|
height: 90rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
// border-radius: 20rpx;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-button-content {
|
||||||
|
z-index: 2;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-button-title {
|
||||||
|
font-size: 34rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 8rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-button-desc {
|
||||||
|
font-size: 24rpx;
|
||||||
|
opacity: 0.85;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"goods.js","sources":["api/goods.ts"],"sourcesContent":["import { request } from './request';\r\n\r\n\n\n\n\n// 编辑商品\nexport function fetchGoodsEdit(form:{}) {\n\treturn request({\n\t\turl: '/goods/edit',\n\t\tdata: form,\n\t\tmethod: 'POST'\n\t})\n} \n\n\n// 商品详情\nexport function fetchGoodsDetail(id:number) {\n\treturn request({\n\t\turl: '/goods/detail',\n\t\tdata: {goods_id:id}\n\t})\n}\n\n\n\n\n\n// 新增商品\nexport function fetchGoodsAdd(form:{}) {\n\treturn request({\n\t\turl: '/goods/add',\n\t\tdata: form,\n\t\tmethod: 'POST'\n\t})\n} \n\n\n\n// 筛选\nexport function fetchFilterParmas(is_origin : number = 0) {\n\treturn request({\n\t\turl: '/goods/filterParams',\n\t\tdata: {\n\t\t\tis_origin: is_origin\n\t\t}\n\t})\n}\n\n\n// 管理端机器列表\nexport function fetchSysGoodsList(data : {}) {\n\treturn request({\n\t\turl: '/goods/list',\n\t\tdata: data,\n\t\tmethod: 'POST'\n\t});\n}\n\n\n// 首页机器列表\nexport function fetchGoodsList(data : {}) {\n\treturn request({\n\t\turl: '/goods/lists',\n\t\tdata: data,\n\t\tmethod: 'POST'\n\t});\n}"],"names":["request"],"mappings":";;AAiBO,SAAS,iBAAiB,IAAW;AAC3C,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL,MAAM,EAAC,UAAS,GAAE;AAAA,EAAA,CAClB;AACF;;"}
|
{"version":3,"file":"goods.js","sources":["api/goods.ts"],"sourcesContent":["import { request } from './request';\r\n\r\n\n\n\n\n// 编辑商品\nexport function fetchGoodsEdit(form:{}) {\n\treturn request({\n\t\turl: '/goods/edit',\n\t\tdata: form,\n\t\tmethod: 'POST'\n\t})\n} \n\n\n// 商品详情\nexport function fetchGoodsDetail(id:number) {\n\treturn request({\n\t\turl: '/goods/detail',\n\t\tdata: {goods_id:id}\n\t})\n}\n\n\n\n\n\n// 新增商品\nexport function fetchGoodsAdd(form:{}) {\n\treturn request({\n\t\turl: '/goods/add',\n\t\tdata: form,\n\t\tmethod: 'POST'\n\t})\n} \n\n\n\n// 筛选\nexport function fetchFilterParmas(is_origin : number = 0) {\n\treturn request({\n\t\turl: '/goods/filterParams',\n\t\tdata: {\n\t\t\tis_origin: is_origin\n\t\t}\n\t})\n}\n\n\n\n\n// 首页机器列表\nexport function fetchGoodsList(data : {}) {\n\treturn request({\n\t\turl: '/goods/lists',\n\t\tdata: data,\n\t\tmethod: 'POST'\n\t});\n}"],"names":["request"],"mappings":";;AAiBO,SAAS,iBAAiB,IAAW;AAC3C,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL,MAAM,EAAC,UAAS,GAAE;AAAA,EAAA,CAClB;AACF;;"}
|
||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"index.js","sources":["api/index.ts"],"sourcesContent":["import { request } from \"./request\";\n\n// export function fetchNavList () {\n// \treturn request({\n// \t\turl:'/index/nav_list'\n// \t})\n// }\n\nexport function fetchLogin(data : {}) {\n\treturn request({\n\t\turl: '/index/login',\n\t\tdata: data,\n\t\tmethod: 'POST'\n\t})\n}\n\n\n\n// 获取商品\nexport function fetchGoods () {\n\treturn request({\n\t\turl:'/index/goods',\n\t})\n}\n// 获取套餐\nexport function fetchCombos(data : {}) {\n\treturn request({\n\t\turl: '/index/combos',\n\t\tdata: data,\n\t\tmethod: 'POST'\n\t});\n}\n// 获取房间\nexport function fetchRooms(data : {}) {\n\treturn request({\n\t\turl: '/index/rooms',\n\t\tdata: data,\n\t\tmethod: 'POST'\n\t});\n}\n\n// 预约\nexport function fetchBooking(data : {}) {\n\treturn request({\n\t\turl: '/index/booking',\n\t\tdata: data,\n\t\tmethod: 'POST'\n\t});\n}\n// 取消预约\nexport function fetchUnBooking(data : {}) {\n\treturn request({\n\t\turl: '/index/unbooking',\n\t\tdata: data,\n\t\tmethod: 'POST'\n\t});\n}\n\n// 开台/商品订单\nexport function fetchAddOrder(data : {}) {\n\treturn request({\n\t\turl: '/index/addOrder',\n\t\tdata: data,\n\t\tmethod: 'POST'\n\t});\n}\n\n// 开台/商品订单\nexport function fetchEditOrder(data : {}) {\n\treturn request({\n\t\turl: '/index/editOrder',\n\t\tdata: data,\n\t\tmethod: 'POST'\n\t});\n}\n\n// 房间订单详情\r\nexport function fetchRoomOrder(roomId : Number) {\r\n\treturn request({\r\n\t\turl: '/index/roomOrder',\r\n\t\tdata: { roomId: roomId },\r\n\t})\r\n}\r\n\n\n"],"names":["request"],"mappings":";;AAQO,SAAS,WAAW,MAAW;AACrC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;AAKO,SAAS,aAAc;AAC7B,SAAOA,oBAAQ;AAAA,IACd,KAAI;AAAA,EAAA,CACJ;AACF;AAEO,SAAS,YAAY,MAAW;AACtC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;AAEO,SAAS,WAAW,MAAW;AACrC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;AAGO,SAAS,aAAa,MAAW;AACvC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;AAEO,SAAS,eAAe,MAAW;AACzC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;AAGO,SAAS,cAAc,MAAW;AACxC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;AAGO,SAAS,eAAe,MAAW;AACzC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;AAGO,SAAS,eAAe,QAAiB;AAC/C,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL,MAAM,EAAE,OAAe;AAAA,EAAA,CACvB;AACF;;;;;;;;;;"}
|
{"version":3,"file":"index.js","sources":["api/index.ts"],"sourcesContent":["import { request } from \"./request\";\n\n// export function fetchNavList () {\n// \treturn request({\n// \t\turl:'/index/nav_list'\n// \t})\n// }\n\nexport function fetchLogin(data : {}) {\n\treturn request({\n\t\turl: '/index/login',\n\t\tdata: data,\n\t\tmethod: 'POST'\n\t})\n}\n\n\n\n// 获取商品\nexport function fetchGoods () {\n\treturn request({\n\t\turl:'/index/goods',\n\t})\n}\n// 获取套餐\nexport function fetchCombos(data : {}) {\n\treturn request({\n\t\turl: '/index/combos',\n\t\tdata: data,\n\t\tmethod: 'POST'\n\t});\n}\n// 获取房间\nexport function fetchRooms(data : {}) {\n\treturn request({\n\t\turl: '/index/rooms',\n\t\tdata: data,\n\t\tmethod: 'POST'\n\t});\n}\n\n// 预约\nexport function fetchBooking(data : {}) {\n\treturn request({\n\t\turl: '/index/booking',\n\t\tdata: data,\n\t\tmethod: 'POST'\n\t});\n}\n// 取消预约\nexport function fetchUnBooking(data : {}) {\n\treturn request({\n\t\turl: '/index/unbooking',\n\t\tdata: data,\n\t\tmethod: 'POST'\n\t});\n}\n\n// 开台/商品订单\nexport function fetchAddOrder(data : {}) {\n\treturn request({\n\t\turl: '/index/addOrder',\n\t\tdata: data,\n\t\tmethod: 'POST'\n\t});\n}\n\n// 开台/商品订单\nexport function fetchEditOrder(data : {}) {\n\treturn request({\n\t\turl: '/index/editOrder',\n\t\tdata: data,\n\t\tmethod: 'POST'\n\t});\n}\n\n// 房间订单详情\r\nexport function fetchRoomOrder(roomId : Number) {\r\n\treturn request({\r\n\t\turl: '/index/roomOrder',\r\n\t\tdata: { roomId: roomId },\r\n\t})\r\n}\r\n\n\n// 待办列表\nexport function fetchTodoList(data : {}) {\n\treturn request({\n\t\turl: '/index/todoList',\n\t\tdata: data,\n\t\tmethod: 'POST'\n\t});\n}\n"],"names":["request"],"mappings":";;AAQO,SAAS,WAAW,MAAW;AACrC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;AAKO,SAAS,aAAc;AAC7B,SAAOA,oBAAQ;AAAA,IACd,KAAI;AAAA,EAAA,CACJ;AACF;AAEO,SAAS,YAAY,MAAW;AACtC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;AAEO,SAAS,WAAW,MAAW;AACrC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;AAGO,SAAS,aAAa,MAAW;AACvC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;AAEO,SAAS,eAAe,MAAW;AACzC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;AAGO,SAAS,cAAc,MAAW;AACxC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;AAGO,SAAS,eAAe,MAAW;AACzC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;AAGO,SAAS,eAAe,QAAiB;AAC/C,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL,MAAM,EAAE,OAAe;AAAA,EAAA,CACvB;AACF;AAIO,SAAS,cAAc,MAAW;AACxC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;;;;;;;;;;;"}
|
||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"app.js","sources":["App.vue","main.js"],"sourcesContent":["<script>\n\t// import {ShoppingCartType} from '@/common/constants';\n\texport default {\n\tonLaunch: function () {\n\t\t\t// const shoppingCartType = uni.getStorageSync('SHOPPING_CART_TYPE');\n\t\t\t// if (!shoppingCartType) {\n\t\t\t// \tuni.setStorageSync('SHOPPING_CART_TYPE', ShoppingCartType.PHONE)\n\t\t\t// }\n\n\t\t\t// uni.hideTabBar()\n\t\t\tconsole.log('App Launch')\n\t\t},\n\t\tonShow: function() {\n\t\t\t// uni.hideTabBar()\n\t\t\tconsole.log('App Show')\n\t\t},\n\t\tonHide: function() {\n\t\t\tconsole.log('App Hide')\n\t\t}\n\t}\n</script>\n\n<style lang=\"scss\">\n\t@import \"@/uni_modules/nutui-uni/styles/index.scss\";\n</style>\n","import App from './App'\n\n// #ifndef VUE3\nimport Vue from 'vue'\nimport './uni.promisify.adaptor'\nVue.config.productionTip = false\nApp.mpType = 'app'\nconst app = new Vue({\n ...App\n})\napp.$mount()\n// #endif\n\n// #ifdef VUE3\nimport { createSSRApp } from 'vue'\nexport function createApp() {\n const app = createSSRApp(App)\n return {\n app\n }\n}\n// #endif"],"names":["uni","createSSRApp","App"],"mappings":";;;;;;;;;;;;;;;;;AAEC,MAAK,YAAU;AAAA,EACf,UAAU,WAAY;AAOpBA,kBAAAA,MAAY,MAAA,OAAA,iBAAA,YAAY;AAAA,EACxB;AAAA,EACD,QAAQ,WAAW;AAElBA,kBAAAA,MAAY,MAAA,OAAA,iBAAA,UAAU;AAAA,EACtB;AAAA,EACD,QAAQ,WAAW;AAClBA,kBAAAA,MAAY,MAAA,OAAA,iBAAA,UAAU;AAAA,EACvB;AACD;ACJM,SAAS,YAAY;AAC1B,QAAM,MAAMC,cAAY,aAACC,SAAG;AAC5B,SAAO;AAAA,IACL;AAAA,EACD;AACH;;;"}
|
{"version":3,"file":"app.js","sources":["App.vue","main.js"],"sourcesContent":["<script>\r\n\t// import {ShoppingCartType} from '@/common/constants';\r\n\texport default {\r\n\t\tonLaunch: function() {\r\n\t\t\t// const shoppingCartType = uni.getStorageSync('SHOPPING_CART_TYPE');\r\n\t\t\t// if (!shoppingCartType) {\r\n\t\t\t// \tuni.setStorageSync('SHOPPING_CART_TYPE', ShoppingCartType.PHONE)\r\n\t\t\t// }\r\n\r\n\t\t\t// uni.hideTabBar()\r\n\t\t\tconsole.log('App Launch')\r\n\t\t},\r\n\t\tonShow: function() {\r\n\t\t\t// uni.hideTabBar()\r\n\t\t\tconsole.log('App Show')\r\n\t\t},\r\n\t\tonHide: function() {\r\n\t\t\tconsole.log('App Hide')\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style lang=\"scss\">\r\n\t@import \"@/uni_modules/nutui-uni/styles/index.scss\";\r\n</style>","import App from './App'\n\n// #ifndef VUE3\nimport Vue from 'vue'\nimport './uni.promisify.adaptor'\nVue.config.productionTip = false\nApp.mpType = 'app'\nconst app = new Vue({\n ...App\n})\napp.$mount()\n// #endif\n\n// #ifdef VUE3\nimport { createSSRApp } from 'vue'\nexport function createApp() {\n const app = createSSRApp(App)\n return {\n app\n }\n}\n// #endif"],"names":["uni","createSSRApp","App"],"mappings":";;;;;;;;;;;;;;;;;;AAEC,MAAK,YAAU;AAAA,EACd,UAAU,WAAW;AAOpBA,kBAAAA,MAAA,MAAA,OAAA,iBAAY,YAAY;AAAA,EACxB;AAAA,EACD,QAAQ,WAAW;AAElBA,kBAAAA,MAAY,MAAA,OAAA,iBAAA,UAAU;AAAA,EACtB;AAAA,EACD,QAAQ,WAAW;AAClBA,kBAAAA,MAAY,MAAA,OAAA,iBAAA,UAAU;AAAA,EACvB;AACD;ACJM,SAAS,YAAY;AAC1B,QAAM,MAAMC,cAAY,aAACC,SAAG;AAC5B,SAAO;AAAA,IACL;AAAA,EACD;AACH;;;"}
|
||||||
File diff suppressed because one or more lines are too long
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/todo/index.js.map
vendored
Normal file
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/todo/index.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/todo/todoList.js.map
vendored
Normal file
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/todo/todoList.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
8
unpackage/dist/dev/mp-weixin/api/index.js
vendored
8
unpackage/dist/dev/mp-weixin/api/index.js
vendored
@@ -60,6 +60,13 @@ function fetchRoomOrder(roomId) {
|
|||||||
data: { roomId }
|
data: { roomId }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
function fetchTodoList(data) {
|
||||||
|
return api_request.request({
|
||||||
|
url: "/index/todoList",
|
||||||
|
data,
|
||||||
|
method: "POST"
|
||||||
|
});
|
||||||
|
}
|
||||||
exports.fetchAddOrder = fetchAddOrder;
|
exports.fetchAddOrder = fetchAddOrder;
|
||||||
exports.fetchBooking = fetchBooking;
|
exports.fetchBooking = fetchBooking;
|
||||||
exports.fetchCombos = fetchCombos;
|
exports.fetchCombos = fetchCombos;
|
||||||
@@ -68,5 +75,6 @@ exports.fetchGoods = fetchGoods;
|
|||||||
exports.fetchLogin = fetchLogin;
|
exports.fetchLogin = fetchLogin;
|
||||||
exports.fetchRoomOrder = fetchRoomOrder;
|
exports.fetchRoomOrder = fetchRoomOrder;
|
||||||
exports.fetchRooms = fetchRooms;
|
exports.fetchRooms = fetchRooms;
|
||||||
|
exports.fetchTodoList = fetchTodoList;
|
||||||
exports.fetchUnBooking = fetchUnBooking;
|
exports.fetchUnBooking = fetchUnBooking;
|
||||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/api/index.js.map
|
//# sourceMappingURL=../../.sourcemap/mp-weixin/api/index.js.map
|
||||||
|
|||||||
1
unpackage/dist/dev/mp-weixin/app.js
vendored
1
unpackage/dist/dev/mp-weixin/app.js
vendored
@@ -4,6 +4,7 @@ const common_vendor = require("./common/vendor.js");
|
|||||||
if (!Math) {
|
if (!Math) {
|
||||||
"./pages/index/index.js";
|
"./pages/index/index.js";
|
||||||
"./pages/login/index.js";
|
"./pages/login/index.js";
|
||||||
|
"./pages/todo/todoList.js";
|
||||||
"./pages/index/orderAdd.js";
|
"./pages/index/orderAdd.js";
|
||||||
"./pages/index/orderEdit.js";
|
"./pages/index/orderEdit.js";
|
||||||
"./pages/index/goodsOrderAdd.js";
|
"./pages/index/goodsOrderAdd.js";
|
||||||
|
|||||||
3
unpackage/dist/dev/mp-weixin/app.json
vendored
3
unpackage/dist/dev/mp-weixin/app.json
vendored
@@ -2,6 +2,7 @@
|
|||||||
"pages": [
|
"pages": [
|
||||||
"pages/index/index",
|
"pages/index/index",
|
||||||
"pages/login/index",
|
"pages/login/index",
|
||||||
|
"pages/todo/todoList",
|
||||||
"pages/index/orderAdd",
|
"pages/index/orderAdd",
|
||||||
"pages/index/orderEdit",
|
"pages/index/orderEdit",
|
||||||
"pages/index/goodsOrderAdd",
|
"pages/index/goodsOrderAdd",
|
||||||
@@ -36,7 +37,7 @@
|
|||||||
"text": "首页"
|
"text": "首页"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "pages/todo/index",
|
"pagePath": "pages/todo/todoList",
|
||||||
"iconPath": "static/tabbar/todo.png",
|
"iconPath": "static/tabbar/todo.png",
|
||||||
"selectedIconPath": "static/tabbar/todo-active.png",
|
"selectedIconPath": "static/tabbar/todo-active.png",
|
||||||
"text": "待办"
|
"text": "待办"
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ const _sfc_main = {
|
|||||||
common_vendor.index.setStorageSync("username", res.user.user_name);
|
common_vendor.index.setStorageSync("username", res.user.user_name);
|
||||||
common_vendor.index.setStorageSync("role", res.user.role.value);
|
common_vendor.index.setStorageSync("role", res.user.role.value);
|
||||||
isLoggedIn.value = true;
|
isLoggedIn.value = true;
|
||||||
|
common_vendor.index.showTabBar();
|
||||||
common_vendor.index.showToast({
|
common_vendor.index.showToast({
|
||||||
title: "登录成功",
|
title: "登录成功",
|
||||||
icon: "success"
|
icon: "success"
|
||||||
@@ -84,19 +85,19 @@ const _sfc_main = {
|
|||||||
};
|
};
|
||||||
const visibleInfoPopup = common_vendor.ref(false);
|
const visibleInfoPopup = common_vendor.ref(false);
|
||||||
const onShowInfoPopup = (room) => {
|
const onShowInfoPopup = (room) => {
|
||||||
common_vendor.index.__f__("log", "at pages/index/index.vue:204", "----", room);
|
common_vendor.index.__f__("log", "at pages/index/index.vue:205", "----", room);
|
||||||
Object.assign(tempRoom, room);
|
Object.assign(tempRoom, room);
|
||||||
visibleInfoPopup.value = true;
|
visibleInfoPopup.value = true;
|
||||||
};
|
};
|
||||||
const onCloseInfoPopup = () => {
|
const onCloseInfoPopup = () => {
|
||||||
Object.assign(tempRoom, {});
|
Object.assign(tempRoom, {});
|
||||||
visibleInfoPopup.value = false;
|
visibleInfoPopup.value = false;
|
||||||
common_vendor.index.__f__("log", "at pages/index/index.vue:211", "关闭");
|
common_vendor.index.__f__("log", "at pages/index/index.vue:212", "关闭");
|
||||||
};
|
};
|
||||||
const visiblePopup = common_vendor.ref(false);
|
const visiblePopup = common_vendor.ref(false);
|
||||||
const tempRoom = common_vendor.reactive({});
|
const tempRoom = common_vendor.reactive({});
|
||||||
const onBooking = (room) => {
|
const onBooking = (room) => {
|
||||||
common_vendor.index.__f__("log", "at pages/index/index.vue:218", "----", room);
|
common_vendor.index.__f__("log", "at pages/index/index.vue:219", "----", room);
|
||||||
Object.assign(tempRoom, room);
|
Object.assign(tempRoom, room);
|
||||||
form.room_id = room.id;
|
form.room_id = room.id;
|
||||||
visiblePopup.value = true;
|
visiblePopup.value = true;
|
||||||
@@ -109,18 +110,18 @@ const _sfc_main = {
|
|||||||
remarks: ""
|
remarks: ""
|
||||||
});
|
});
|
||||||
visiblePopup.value = false;
|
visiblePopup.value = false;
|
||||||
common_vendor.index.__f__("log", "at pages/index/index.vue:231", "关闭");
|
common_vendor.index.__f__("log", "at pages/index/index.vue:232", "关闭");
|
||||||
};
|
};
|
||||||
const getRooms = () => {
|
const getRooms = () => {
|
||||||
common_vendor.index.__f__("log", "at pages/index/index.vue:238", "房间");
|
common_vendor.index.__f__("log", "at pages/index/index.vue:239", "房间");
|
||||||
api_index.fetchRooms().then((res) => {
|
api_index.fetchRooms().then((res) => {
|
||||||
common_vendor.index.__f__("log", "at pages/index/index.vue:240", res);
|
common_vendor.index.__f__("log", "at pages/index/index.vue:241", res);
|
||||||
rooms.value = res;
|
rooms.value = res;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
api_index.fetchBooking(form).then((res) => {
|
api_index.fetchBooking(form).then((res) => {
|
||||||
common_vendor.index.__f__("log", "at pages/index/index.vue:248", res);
|
common_vendor.index.__f__("log", "at pages/index/index.vue:249", res);
|
||||||
common_vendor.index.showToast({
|
common_vendor.index.showToast({
|
||||||
icon: "none",
|
icon: "none",
|
||||||
title: "预约成功"
|
title: "预约成功"
|
||||||
@@ -133,7 +134,7 @@ const _sfc_main = {
|
|||||||
api_index.fetchUnBooking({
|
api_index.fetchUnBooking({
|
||||||
id: room.id
|
id: room.id
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
common_vendor.index.__f__("log", "at pages/index/index.vue:262", res);
|
common_vendor.index.__f__("log", "at pages/index/index.vue:263", res);
|
||||||
common_vendor.index.showToast({
|
common_vendor.index.showToast({
|
||||||
icon: "none",
|
icon: "none",
|
||||||
title: "取消预约成功"
|
title: "取消预约成功"
|
||||||
@@ -142,20 +143,26 @@ const _sfc_main = {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
const init = () => {
|
const init = () => {
|
||||||
common_vendor.index.__f__("log", "at pages/index/index.vue:272", "init");
|
common_vendor.index.__f__("log", "at pages/index/index.vue:273", "init");
|
||||||
common_vendor.index.hideTabBar();
|
common_vendor.index.hideTabBar();
|
||||||
checkLogin();
|
checkLogin();
|
||||||
getRooms();
|
getRooms();
|
||||||
};
|
};
|
||||||
|
common_vendor.onLoad(() => {
|
||||||
|
common_vendor.index.__f__("log", "at pages/index/index.vue:280", "onshow---");
|
||||||
|
common_vendor.index.hideTabBar();
|
||||||
|
checkLogin();
|
||||||
|
getRooms();
|
||||||
|
});
|
||||||
common_vendor.onShow(() => {
|
common_vendor.onShow(() => {
|
||||||
common_vendor.index.__f__("log", "at pages/index/index.vue:279", "onshow---");
|
common_vendor.index.__f__("log", "at pages/index/index.vue:286", "onshow---");
|
||||||
common_vendor.index.hideTabBar();
|
common_vendor.index.hideTabBar();
|
||||||
checkLogin();
|
checkLogin();
|
||||||
getRooms();
|
getRooms();
|
||||||
});
|
});
|
||||||
const checkLogin = () => {
|
const checkLogin = () => {
|
||||||
let token = common_vendor.index.getStorageSync("token");
|
let token = common_vendor.index.getStorageSync("token");
|
||||||
common_vendor.index.__f__("log", "at pages/index/index.vue:288", "token", token);
|
common_vendor.index.__f__("log", "at pages/index/index.vue:295", "token", token);
|
||||||
if (token) {
|
if (token) {
|
||||||
common_vendor.index.showTabBar();
|
common_vendor.index.showTabBar();
|
||||||
isLoggedIn.value = true;
|
isLoggedIn.value = true;
|
||||||
@@ -171,7 +178,8 @@ const _sfc_main = {
|
|||||||
b: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/index/goodsOrderAdd")),
|
b: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/index/goodsOrderAdd")),
|
||||||
c: common_vendor.p({
|
c: common_vendor.p({
|
||||||
type: "primary",
|
type: "primary",
|
||||||
block: true
|
block: true,
|
||||||
|
plain: true
|
||||||
}),
|
}),
|
||||||
d: common_vendor.s("top:0px"),
|
d: common_vendor.s("top:0px"),
|
||||||
e: common_vendor.f(rooms.value, (room, index, i0) => {
|
e: common_vendor.f(rooms.value, (room, index, i0) => {
|
||||||
|
|||||||
109
unpackage/dist/dev/mp-weixin/pages/todo/index.js
vendored
Normal file
109
unpackage/dist/dev/mp-weixin/pages/todo/index.js
vendored
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
"use strict";
|
||||||
|
const common_vendor = require("../../common/vendor.js");
|
||||||
|
const api_index = require("../../api/index.js");
|
||||||
|
const utils_helper = require("../../utils/helper.js");
|
||||||
|
if (!Array) {
|
||||||
|
const _easycom_nut_button2 = common_vendor.resolveComponent("nut-button");
|
||||||
|
const _easycom_nut_tag2 = common_vendor.resolveComponent("nut-tag");
|
||||||
|
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
|
||||||
|
(_easycom_nut_button2 + _easycom_nut_tag2 + _easycom_z_paging2)();
|
||||||
|
}
|
||||||
|
const _easycom_nut_button = () => "../../uni_modules/nutui-uni/components/button/button.js";
|
||||||
|
const _easycom_nut_tag = () => "../../uni_modules/nutui-uni/components/tag/tag.js";
|
||||||
|
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
|
||||||
|
if (!Math) {
|
||||||
|
(_easycom_nut_button + _easycom_nut_tag + _easycom_z_paging)();
|
||||||
|
}
|
||||||
|
const _sfc_main = {
|
||||||
|
__name: "index",
|
||||||
|
setup(__props) {
|
||||||
|
const paging = common_vendor.ref(null);
|
||||||
|
const dataList = common_vendor.ref([]);
|
||||||
|
const queryList = (pageNo, pageSize) => {
|
||||||
|
const params = {
|
||||||
|
pageSize,
|
||||||
|
page: pageNo
|
||||||
|
};
|
||||||
|
common_vendor.index.__f__("log", "at pages/todo/index.vue:91", params);
|
||||||
|
api_index.fetchTodoList(params).then((res) => {
|
||||||
|
common_vendor.index.__f__("log", "at pages/todo/index.vue:93", "res=>", res.list);
|
||||||
|
paging.value.complete(res.list);
|
||||||
|
}).catch((res) => {
|
||||||
|
paging.value.complete(false);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const init = () => {
|
||||||
|
common_vendor.index.__f__("log", "at pages/todo/index.vue:110", "init111");
|
||||||
|
};
|
||||||
|
common_vendor.onShow(() => {
|
||||||
|
common_vendor.index.__f__("log", "at pages/todo/index.vue:132", "onshow---");
|
||||||
|
common_vendor.index.__f__("log", "at pages/todo/index.vue:133", "paging.value", paging.value);
|
||||||
|
if (paging.value) {
|
||||||
|
paging.value.refresh();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
common_vendor.onMounted(() => {
|
||||||
|
init();
|
||||||
|
});
|
||||||
|
return (_ctx, _cache) => {
|
||||||
|
return {
|
||||||
|
a: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/config/goodsAdd")),
|
||||||
|
b: common_vendor.p({
|
||||||
|
type: "primary",
|
||||||
|
block: true,
|
||||||
|
plain: true
|
||||||
|
}),
|
||||||
|
c: common_vendor.s("top:0px"),
|
||||||
|
d: common_vendor.f(dataList.value, (item, index, i0) => {
|
||||||
|
return common_vendor.e({
|
||||||
|
a: common_vendor.t(item.user.staff_name),
|
||||||
|
b: "7167769e-2-" + i0 + ",7167769e-0",
|
||||||
|
c: common_vendor.t(item.content),
|
||||||
|
d: item.status.value === 0
|
||||||
|
}, item.status.value === 0 ? {
|
||||||
|
e: common_vendor.t(item.status.text)
|
||||||
|
} : {
|
||||||
|
f: common_vendor.t(item.status.text)
|
||||||
|
}, {
|
||||||
|
g: item.status.value == 0
|
||||||
|
}, item.status.value == 0 ? {
|
||||||
|
h: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/config/goodsEdit?id=" + item.goods_id), index),
|
||||||
|
i: "7167769e-3-" + i0 + ",7167769e-0",
|
||||||
|
j: common_vendor.p({
|
||||||
|
size: "small",
|
||||||
|
type: "success"
|
||||||
|
})
|
||||||
|
} : {}, {
|
||||||
|
k: item.status.value == 1
|
||||||
|
}, item.status.value == 1 ? {
|
||||||
|
l: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/config/goodsEdit?id=" + item.goods_id), index),
|
||||||
|
m: "7167769e-4-" + i0 + ",7167769e-0",
|
||||||
|
n: common_vendor.p({
|
||||||
|
size: "small",
|
||||||
|
type: "danger"
|
||||||
|
})
|
||||||
|
} : {}, {
|
||||||
|
o: index
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
e: common_vendor.p({
|
||||||
|
["custom-color"]: "#1a1a1a"
|
||||||
|
}),
|
||||||
|
f: common_vendor.sr(paging, "7167769e-0", {
|
||||||
|
"k": "paging"
|
||||||
|
}),
|
||||||
|
g: common_vendor.o(queryList),
|
||||||
|
h: common_vendor.o(($event) => dataList.value = $event),
|
||||||
|
i: common_vendor.p({
|
||||||
|
["refresher-enabled"]: false,
|
||||||
|
["auto-clean-list-when-reload"]: false,
|
||||||
|
["auto-scroll-to-top-when-reload"]: false,
|
||||||
|
modelValue: dataList.value
|
||||||
|
})
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-7167769e"]]);
|
||||||
|
wx.createPage(MiniProgramPage);
|
||||||
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/todo/index.js.map
|
||||||
9
unpackage/dist/dev/mp-weixin/pages/todo/index.json
vendored
Normal file
9
unpackage/dist/dev/mp-weixin/pages/todo/index.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"navigationBarTitleText": "待办",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"usingComponents": {
|
||||||
|
"nut-button": "../../uni_modules/nutui-uni/components/button/button",
|
||||||
|
"nut-tag": "../../uni_modules/nutui-uni/components/tag/tag",
|
||||||
|
"z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging"
|
||||||
|
}
|
||||||
|
}
|
||||||
1
unpackage/dist/dev/mp-weixin/pages/todo/index.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/todo/index.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<view class="page-content data-v-7167769e"><z-paging wx:if="{{i}}" class="r data-v-7167769e" u-s="{{['d']}}" u-r="paging" bindquery="{{g}}" u-i="7167769e-0" bind:__l="__l" bindupdateModelValue="{{h}}" u-p="{{i}}"><view class="data-v-7167769e" style="{{'z-index:10000;position:sticky' + ';' + c}}"><view class="top-bar data-v-7167769e"><nut-button wx:if="{{b}}" class="data-v-7167769e" u-s="{{['d']}}" bindclick="{{a}}" u-i="7167769e-1,7167769e-0" bind:__l="__l" u-p="{{b}}"> 新增备忘录 </nut-button></view></view><view wx:for="{{d}}" wx:for-item="item" wx:key="o" class="todo-item data-v-7167769e"><view class="goods-item-content data-v-7167769e"><view class="goods-item-content-header data-v-7167769e"><view class="data-v-7167769e" style="font-size:24rpx">记录人:</view><nut-tag wx:if="{{e}}" class="data-v-7167769e" u-s="{{['d']}}" u-i="{{item.b}}" bind:__l="__l" u-p="{{e}}">{{item.a}}</nut-tag></view><view class="goods-item-content-body data-v-7167769e"><view class="goods-item-content-body-desc data-v-7167769e">{{item.c}}</view></view><view class="goods-item-content-footer data-v-7167769e"><view wx:if="{{item.d}}" class="data-v-7167769e" style="font-size:24rpx;color:red"> 状态:<text class="data-v-7167769e">{{item.e}}</text></view><view wx:else class="data-v-7167769e" style="font-size:24rpx;color:chartreuse"> 状态:<text class="data-v-7167769e">{{item.f}}</text></view><view class="goods-item-content-footer-btn data-v-7167769e"><nut-button wx:if="{{item.g}}" class="data-v-7167769e" u-s="{{['d']}}" bindclick="{{item.h}}" u-i="{{item.i}}" bind:__l="__l" u-p="{{item.j}}"> 标记已办 </nut-button><nut-button wx:if="{{item.k}}" class="data-v-7167769e" u-s="{{['d']}}" bindclick="{{item.l}}" u-i="{{item.m}}" bind:__l="__l" u-p="{{item.n}}"> 标记未办 </nut-button></view></view></view></view></z-paging></view>
|
||||||
304
unpackage/dist/dev/mp-weixin/pages/todo/index.wxss
vendored
Normal file
304
unpackage/dist/dev/mp-weixin/pages/todo/index.wxss
vendored
Normal file
@@ -0,0 +1,304 @@
|
|||||||
|
/**
|
||||||
|
* 这里是uni-app内置的常用样式变量
|
||||||
|
*
|
||||||
|
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||||
|
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||||
|
*
|
||||||
|
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||||
|
*/
|
||||||
|
/* 颜色变量 */
|
||||||
|
/* 行为相关颜色 */
|
||||||
|
/* 文字基本颜色 */
|
||||||
|
/* 背景颜色 */
|
||||||
|
/* 边框颜色 */
|
||||||
|
/* 尺寸变量 */
|
||||||
|
/* 文字尺寸 */
|
||||||
|
/* 图片尺寸 */
|
||||||
|
/* Border Radius */
|
||||||
|
/* 水平间距 */
|
||||||
|
/* 垂直间距 */
|
||||||
|
/* 透明度 */
|
||||||
|
/* 文章场景相关 */
|
||||||
|
/**
|
||||||
|
* 这里是uni-app内置的常用样式变量
|
||||||
|
*
|
||||||
|
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||||
|
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||||
|
*
|
||||||
|
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||||
|
*/
|
||||||
|
/* 颜色变量 */
|
||||||
|
/* 行为相关颜色 */
|
||||||
|
/* 文字基本颜色 */
|
||||||
|
/* 背景颜色 */
|
||||||
|
/* 边框颜色 */
|
||||||
|
/* 尺寸变量 */
|
||||||
|
/* 文字尺寸 */
|
||||||
|
/* 图片尺寸 */
|
||||||
|
/* Border Radius */
|
||||||
|
/* 水平间距 */
|
||||||
|
/* 垂直间距 */
|
||||||
|
/* 透明度 */
|
||||||
|
/* 文章场景相关 */
|
||||||
|
.page-content.data-v-7167769e {
|
||||||
|
min-height: 100vh;
|
||||||
|
background-color: #f2f3f5;
|
||||||
|
--nut-menu-bar-box-shadow: none;
|
||||||
|
--nut-menu-item-content-padding: 20rpx;
|
||||||
|
--nut-menu-item-content-max-height: 900rpx;
|
||||||
|
--nut-searchbar-input-height: 40px;
|
||||||
|
}
|
||||||
|
.data-v-7167769e .titleClass .nut-menu__title-text {
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
.top-bar.data-v-7167769e {
|
||||||
|
background: #fff;
|
||||||
|
align-items: center;
|
||||||
|
text-align: center;
|
||||||
|
padding: 20rpx 60rpx;
|
||||||
|
}
|
||||||
|
.todo-item.data-v-7167769e {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 20rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
gap: 20rpx;
|
||||||
|
}
|
||||||
|
.todo-item .goods-item-content.data-v-7167769e {
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
/* 首尾贴边,中间均分 */
|
||||||
|
}
|
||||||
|
.todo-item .goods-item-content .goods-item-content-header.data-v-7167769e {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 6rpx 0;
|
||||||
|
gap: 20rpx;
|
||||||
|
}
|
||||||
|
.todo-item .goods-item-content .goods-item-content-body.data-v-7167769e {
|
||||||
|
padding: 6rpx 0;
|
||||||
|
}
|
||||||
|
.todo-item .goods-item-content .goods-item-content-body .goods-item-content-body-desc.data-v-7167769e {
|
||||||
|
color: #7c7c7c;
|
||||||
|
font-size: 26rpx;
|
||||||
|
/* 关键属性 */
|
||||||
|
display: -webkit-box;
|
||||||
|
/* 使用弹性盒子布局 */
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
/* 垂直方向排列 */
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
/* 限制显示两行 */
|
||||||
|
overflow: hidden;
|
||||||
|
/* 超出部分隐藏 */
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
/* 超出时显示省略号 */
|
||||||
|
}
|
||||||
|
.todo-item .goods-item-content .goods-item-content-stock.data-v-7167769e {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.todo-item .goods-item-content .goods-item-content-stock .goods-item-content-stock-desc.data-v-7167769e {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
.todo-item .goods-item-content .goods-item-content-stock .goods-item-content-status-desc.data-v-7167769e {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
.todo-item .goods-item-content .goods-item-content-footer.data-v-7167769e {
|
||||||
|
padding: 6rpx 0;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.todo-item .goods-item-content .goods-item-content-footer .goods-item-content-footer-btn.data-v-7167769e {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10rpx;
|
||||||
|
}
|
||||||
|
.todo-item .goods-item-content .goods-item-content-footer .goods-item-content-footer-btn .share-btn.data-v-7167769e {
|
||||||
|
border-radius: 50rpx;
|
||||||
|
border: 2rpx solid red;
|
||||||
|
font-size: 26rpx;
|
||||||
|
align-items: center;
|
||||||
|
height: 54rpx;
|
||||||
|
color: red;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.filter-types.data-v-7167769e {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
overflow: auto;
|
||||||
|
gap: 10rpx;
|
||||||
|
padding: 10rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-bottom: 2rpx solid gainsboro;
|
||||||
|
border-top: 2rpx solid gainsboro;
|
||||||
|
}
|
||||||
|
.filter-types .filter-type-inner.data-v-7167769e {
|
||||||
|
align-items: center;
|
||||||
|
background-color: rgba(0, 0, 0, 0.05);
|
||||||
|
border-radius: 16rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
font-size: 28rpx;
|
||||||
|
gap: 15rpx;
|
||||||
|
padding: 10rpx 20rpx;
|
||||||
|
}
|
||||||
|
.filter-types .filter-type-inner.active.data-v-7167769e {
|
||||||
|
background-color: rgba(250, 44, 25, 0.1);
|
||||||
|
color: var(--nutui-color-primary);
|
||||||
|
}
|
||||||
|
.tabs-container.data-v-7167769e {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.tabs-container .tab-pane-inner.data-v-7167769e {
|
||||||
|
height: 600rpx;
|
||||||
|
}
|
||||||
|
.tabs-container .tabs-inner.data-v-7167769e {
|
||||||
|
overflow-y: scroll;
|
||||||
|
height: 600rpx;
|
||||||
|
width: 160rpx;
|
||||||
|
background-color: #F5F5F5;
|
||||||
|
}
|
||||||
|
.tabs-container .tabs-inner .tab-inner.data-v-7167769e {
|
||||||
|
display: flex;
|
||||||
|
height: 60rpx;
|
||||||
|
padding: 10rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
background: #F5F5F5;
|
||||||
|
}
|
||||||
|
.tabs-container .tabs-inner .tab-inner text.data-v-7167769e {
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.tabs-container .tabs-inner .tab-inner-active.data-v-7167769e {
|
||||||
|
background-color: rgba(250, 44, 25, 0.1);
|
||||||
|
color: var(--nutui-color-primary);
|
||||||
|
}
|
||||||
|
.degree-inner.data-v-7167769e {
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 10rpx;
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 60rpx;
|
||||||
|
}
|
||||||
|
.degree-item.data-v-7167769e {
|
||||||
|
align-items: center;
|
||||||
|
background-color: rgba(0, 0, 0, 0.05);
|
||||||
|
border-radius: 10rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
font-size: 26rpx;
|
||||||
|
gap: 10rpx;
|
||||||
|
justify-content: center;
|
||||||
|
min-height: 80rpx;
|
||||||
|
width: calc(50% - 10rpx);
|
||||||
|
}
|
||||||
|
.degree-item.active.data-v-7167769e {
|
||||||
|
background-color: rgba(250, 44, 25, 0.1);
|
||||||
|
color: var(--nutui-color-primary);
|
||||||
|
}
|
||||||
|
.product-btns.data-v-7167769e {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
padding: 20rpx 0;
|
||||||
|
}
|
||||||
|
.product-btns .reset.data-v-7167769e {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
.product-btns .confirm.data-v-7167769e {
|
||||||
|
flex: 2;
|
||||||
|
}
|
||||||
|
.degree-btns.data-v-7167769e {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.degree-btns .reset.data-v-7167769e {
|
||||||
|
flex: 1;
|
||||||
|
/* 重置按钮占 1 份 */
|
||||||
|
}
|
||||||
|
.degree-btns .confirm.data-v-7167769e {
|
||||||
|
flex: 2;
|
||||||
|
/* 确认按钮占 2 份 */
|
||||||
|
}
|
||||||
|
.main-nav-container.data-v-7167769e {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
.nav-button.data-v-7167769e {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
width: 45%;
|
||||||
|
height: 160rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 0 10rpx;
|
||||||
|
}
|
||||||
|
.phone-button.data-v-7167769e {
|
||||||
|
background: linear-gradient(135deg, #6a5ae0, #8d7bfb);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.parts-button.data-v-7167769e {
|
||||||
|
background: linear-gradient(135deg, #ff6b6b, #ee5253);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.nav-button-bg.data-v-7167769e {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
height: 100%;
|
||||||
|
width: 50%;
|
||||||
|
opacity: 0.2;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
.nav-button-icon.data-v-7167769e {
|
||||||
|
width: 90rpx;
|
||||||
|
height: 90rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
.nav-button-content.data-v-7167769e {
|
||||||
|
z-index: 2;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.nav-button-title.data-v-7167769e {
|
||||||
|
font-size: 34rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 8rpx;
|
||||||
|
}
|
||||||
|
.nav-button-desc.data-v-7167769e {
|
||||||
|
font-size: 24rpx;
|
||||||
|
opacity: 0.85;
|
||||||
|
}
|
||||||
109
unpackage/dist/dev/mp-weixin/pages/todo/todoList.js
vendored
Normal file
109
unpackage/dist/dev/mp-weixin/pages/todo/todoList.js
vendored
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
"use strict";
|
||||||
|
const common_vendor = require("../../common/vendor.js");
|
||||||
|
const api_index = require("../../api/index.js");
|
||||||
|
const utils_helper = require("../../utils/helper.js");
|
||||||
|
if (!Array) {
|
||||||
|
const _easycom_nut_button2 = common_vendor.resolveComponent("nut-button");
|
||||||
|
const _easycom_nut_tag2 = common_vendor.resolveComponent("nut-tag");
|
||||||
|
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
|
||||||
|
(_easycom_nut_button2 + _easycom_nut_tag2 + _easycom_z_paging2)();
|
||||||
|
}
|
||||||
|
const _easycom_nut_button = () => "../../uni_modules/nutui-uni/components/button/button.js";
|
||||||
|
const _easycom_nut_tag = () => "../../uni_modules/nutui-uni/components/tag/tag.js";
|
||||||
|
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
|
||||||
|
if (!Math) {
|
||||||
|
(_easycom_nut_button + _easycom_nut_tag + _easycom_z_paging)();
|
||||||
|
}
|
||||||
|
const _sfc_main = {
|
||||||
|
__name: "todoList",
|
||||||
|
setup(__props) {
|
||||||
|
const paging = common_vendor.ref(null);
|
||||||
|
const dataList = common_vendor.ref([]);
|
||||||
|
const queryList = (pageNo, pageSize) => {
|
||||||
|
const params = {
|
||||||
|
pageSize,
|
||||||
|
page: pageNo
|
||||||
|
};
|
||||||
|
common_vendor.index.__f__("log", "at pages/todo/todoList.vue:91", params);
|
||||||
|
api_index.fetchTodoList(params).then((res) => {
|
||||||
|
common_vendor.index.__f__("log", "at pages/todo/todoList.vue:93", "res=>", res.list);
|
||||||
|
paging.value.complete(res.list);
|
||||||
|
}).catch((res) => {
|
||||||
|
paging.value.complete(false);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const init = () => {
|
||||||
|
common_vendor.index.__f__("log", "at pages/todo/todoList.vue:106", "init111");
|
||||||
|
};
|
||||||
|
common_vendor.onShow(() => {
|
||||||
|
common_vendor.index.__f__("log", "at pages/todo/todoList.vue:128", "onshow---");
|
||||||
|
common_vendor.index.__f__("log", "at pages/todo/todoList.vue:129", "paging.value", paging.value);
|
||||||
|
if (paging.value) {
|
||||||
|
paging.value.refresh();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
common_vendor.onMounted(() => {
|
||||||
|
init();
|
||||||
|
});
|
||||||
|
return (_ctx, _cache) => {
|
||||||
|
return {
|
||||||
|
a: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/config/goodsAdd")),
|
||||||
|
b: common_vendor.p({
|
||||||
|
type: "primary",
|
||||||
|
block: true,
|
||||||
|
plain: true
|
||||||
|
}),
|
||||||
|
c: common_vendor.s("top:0px"),
|
||||||
|
d: common_vendor.f(dataList.value, (item, index, i0) => {
|
||||||
|
return common_vendor.e({
|
||||||
|
a: common_vendor.t(item.user.staff_name),
|
||||||
|
b: "2f35fb20-2-" + i0 + ",2f35fb20-0",
|
||||||
|
c: common_vendor.t(item.content),
|
||||||
|
d: item.status.value === 0
|
||||||
|
}, item.status.value === 0 ? {
|
||||||
|
e: common_vendor.t(item.status.text)
|
||||||
|
} : {
|
||||||
|
f: common_vendor.t(item.status.text)
|
||||||
|
}, {
|
||||||
|
g: item.status.value == 0
|
||||||
|
}, item.status.value == 0 ? {
|
||||||
|
h: common_vendor.o(($event) => _ctx.onMark(item.goods_id, "1"), index),
|
||||||
|
i: "2f35fb20-3-" + i0 + ",2f35fb20-0",
|
||||||
|
j: common_vendor.p({
|
||||||
|
size: "small",
|
||||||
|
type: "success"
|
||||||
|
})
|
||||||
|
} : {}, {
|
||||||
|
k: item.status.value == 1
|
||||||
|
}, item.status.value == 1 ? {
|
||||||
|
l: common_vendor.o(($event) => _ctx.onMark(item.goods_id, "0"), index),
|
||||||
|
m: "2f35fb20-4-" + i0 + ",2f35fb20-0",
|
||||||
|
n: common_vendor.p({
|
||||||
|
size: "small",
|
||||||
|
type: "danger"
|
||||||
|
})
|
||||||
|
} : {}, {
|
||||||
|
o: index
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
e: common_vendor.p({
|
||||||
|
["custom-color"]: "#1a1a1a"
|
||||||
|
}),
|
||||||
|
f: common_vendor.sr(paging, "2f35fb20-0", {
|
||||||
|
"k": "paging"
|
||||||
|
}),
|
||||||
|
g: common_vendor.o(queryList),
|
||||||
|
h: common_vendor.o(($event) => dataList.value = $event),
|
||||||
|
i: common_vendor.p({
|
||||||
|
["refresher-enabled"]: false,
|
||||||
|
["auto-clean-list-when-reload"]: false,
|
||||||
|
["auto-scroll-to-top-when-reload"]: false,
|
||||||
|
modelValue: dataList.value
|
||||||
|
})
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-2f35fb20"]]);
|
||||||
|
wx.createPage(MiniProgramPage);
|
||||||
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/todo/todoList.js.map
|
||||||
9
unpackage/dist/dev/mp-weixin/pages/todo/todoList.json
vendored
Normal file
9
unpackage/dist/dev/mp-weixin/pages/todo/todoList.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"navigationBarTitleText": "待办",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"usingComponents": {
|
||||||
|
"nut-button": "../../uni_modules/nutui-uni/components/button/button",
|
||||||
|
"nut-tag": "../../uni_modules/nutui-uni/components/tag/tag",
|
||||||
|
"z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging"
|
||||||
|
}
|
||||||
|
}
|
||||||
1
unpackage/dist/dev/mp-weixin/pages/todo/todoList.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/todo/todoList.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<view class="page-content data-v-2f35fb20"><z-paging wx:if="{{i}}" class="r data-v-2f35fb20" u-s="{{['d']}}" u-r="paging" bindquery="{{g}}" u-i="2f35fb20-0" bind:__l="__l" bindupdateModelValue="{{h}}" u-p="{{i}}"><view class="data-v-2f35fb20" style="{{'z-index:10000;position:sticky' + ';' + c}}"><view class="top-bar data-v-2f35fb20"><nut-button wx:if="{{b}}" class="data-v-2f35fb20" u-s="{{['d']}}" bindclick="{{a}}" u-i="2f35fb20-1,2f35fb20-0" bind:__l="__l" u-p="{{b}}"> 新增备忘录 </nut-button></view></view><view wx:for="{{d}}" wx:for-item="item" wx:key="o" class="todo-item data-v-2f35fb20"><view class="goods-item-content data-v-2f35fb20"><view class="goods-item-content-header data-v-2f35fb20"><view class="data-v-2f35fb20" style="font-size:24rpx">记录人:</view><nut-tag wx:if="{{e}}" class="data-v-2f35fb20" u-s="{{['d']}}" u-i="{{item.b}}" bind:__l="__l" u-p="{{e}}">{{item.a}}</nut-tag></view><view class="goods-item-content-body data-v-2f35fb20"><view class="goods-item-content-body-desc data-v-2f35fb20">{{item.c}}</view></view><view class="goods-item-content-footer data-v-2f35fb20"><view wx:if="{{item.d}}" class="data-v-2f35fb20" style="font-size:24rpx;color:red"> 状态:<text class="data-v-2f35fb20">{{item.e}}</text></view><view wx:else class="data-v-2f35fb20" style="font-size:24rpx;color:chartreuse"> 状态:<text class="data-v-2f35fb20">{{item.f}}</text></view><view class="goods-item-content-footer-btn data-v-2f35fb20"><nut-button wx:if="{{item.g}}" class="data-v-2f35fb20" u-s="{{['d']}}" bindclick="{{item.h}}" u-i="{{item.i}}" bind:__l="__l" u-p="{{item.j}}"> 标记已办 </nut-button><nut-button wx:if="{{item.k}}" class="data-v-2f35fb20" u-s="{{['d']}}" bindclick="{{item.l}}" u-i="{{item.m}}" bind:__l="__l" u-p="{{item.n}}"> 标记未办 </nut-button></view></view></view></view></z-paging></view>
|
||||||
304
unpackage/dist/dev/mp-weixin/pages/todo/todoList.wxss
vendored
Normal file
304
unpackage/dist/dev/mp-weixin/pages/todo/todoList.wxss
vendored
Normal file
@@ -0,0 +1,304 @@
|
|||||||
|
/**
|
||||||
|
* 这里是uni-app内置的常用样式变量
|
||||||
|
*
|
||||||
|
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||||
|
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||||
|
*
|
||||||
|
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||||
|
*/
|
||||||
|
/* 颜色变量 */
|
||||||
|
/* 行为相关颜色 */
|
||||||
|
/* 文字基本颜色 */
|
||||||
|
/* 背景颜色 */
|
||||||
|
/* 边框颜色 */
|
||||||
|
/* 尺寸变量 */
|
||||||
|
/* 文字尺寸 */
|
||||||
|
/* 图片尺寸 */
|
||||||
|
/* Border Radius */
|
||||||
|
/* 水平间距 */
|
||||||
|
/* 垂直间距 */
|
||||||
|
/* 透明度 */
|
||||||
|
/* 文章场景相关 */
|
||||||
|
/**
|
||||||
|
* 这里是uni-app内置的常用样式变量
|
||||||
|
*
|
||||||
|
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||||
|
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||||
|
*
|
||||||
|
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||||
|
*/
|
||||||
|
/* 颜色变量 */
|
||||||
|
/* 行为相关颜色 */
|
||||||
|
/* 文字基本颜色 */
|
||||||
|
/* 背景颜色 */
|
||||||
|
/* 边框颜色 */
|
||||||
|
/* 尺寸变量 */
|
||||||
|
/* 文字尺寸 */
|
||||||
|
/* 图片尺寸 */
|
||||||
|
/* Border Radius */
|
||||||
|
/* 水平间距 */
|
||||||
|
/* 垂直间距 */
|
||||||
|
/* 透明度 */
|
||||||
|
/* 文章场景相关 */
|
||||||
|
.page-content.data-v-2f35fb20 {
|
||||||
|
min-height: 100vh;
|
||||||
|
background-color: #f2f3f5;
|
||||||
|
--nut-menu-bar-box-shadow: none;
|
||||||
|
--nut-menu-item-content-padding: 20rpx;
|
||||||
|
--nut-menu-item-content-max-height: 900rpx;
|
||||||
|
--nut-searchbar-input-height: 40px;
|
||||||
|
}
|
||||||
|
.data-v-2f35fb20 .titleClass .nut-menu__title-text {
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
.top-bar.data-v-2f35fb20 {
|
||||||
|
background: #fff;
|
||||||
|
align-items: center;
|
||||||
|
text-align: center;
|
||||||
|
padding: 20rpx 60rpx;
|
||||||
|
}
|
||||||
|
.todo-item.data-v-2f35fb20 {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 20rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
gap: 20rpx;
|
||||||
|
}
|
||||||
|
.todo-item .goods-item-content.data-v-2f35fb20 {
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
/* 首尾贴边,中间均分 */
|
||||||
|
}
|
||||||
|
.todo-item .goods-item-content .goods-item-content-header.data-v-2f35fb20 {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 6rpx 0;
|
||||||
|
gap: 20rpx;
|
||||||
|
}
|
||||||
|
.todo-item .goods-item-content .goods-item-content-body.data-v-2f35fb20 {
|
||||||
|
padding: 6rpx 0;
|
||||||
|
}
|
||||||
|
.todo-item .goods-item-content .goods-item-content-body .goods-item-content-body-desc.data-v-2f35fb20 {
|
||||||
|
color: #7c7c7c;
|
||||||
|
font-size: 26rpx;
|
||||||
|
/* 关键属性 */
|
||||||
|
display: -webkit-box;
|
||||||
|
/* 使用弹性盒子布局 */
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
/* 垂直方向排列 */
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
/* 限制显示两行 */
|
||||||
|
overflow: hidden;
|
||||||
|
/* 超出部分隐藏 */
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
/* 超出时显示省略号 */
|
||||||
|
}
|
||||||
|
.todo-item .goods-item-content .goods-item-content-stock.data-v-2f35fb20 {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.todo-item .goods-item-content .goods-item-content-stock .goods-item-content-stock-desc.data-v-2f35fb20 {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
.todo-item .goods-item-content .goods-item-content-stock .goods-item-content-status-desc.data-v-2f35fb20 {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
.todo-item .goods-item-content .goods-item-content-footer.data-v-2f35fb20 {
|
||||||
|
padding: 6rpx 0;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.todo-item .goods-item-content .goods-item-content-footer .goods-item-content-footer-btn.data-v-2f35fb20 {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10rpx;
|
||||||
|
}
|
||||||
|
.todo-item .goods-item-content .goods-item-content-footer .goods-item-content-footer-btn .share-btn.data-v-2f35fb20 {
|
||||||
|
border-radius: 50rpx;
|
||||||
|
border: 2rpx solid red;
|
||||||
|
font-size: 26rpx;
|
||||||
|
align-items: center;
|
||||||
|
height: 54rpx;
|
||||||
|
color: red;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.filter-types.data-v-2f35fb20 {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
overflow: auto;
|
||||||
|
gap: 10rpx;
|
||||||
|
padding: 10rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-bottom: 2rpx solid gainsboro;
|
||||||
|
border-top: 2rpx solid gainsboro;
|
||||||
|
}
|
||||||
|
.filter-types .filter-type-inner.data-v-2f35fb20 {
|
||||||
|
align-items: center;
|
||||||
|
background-color: rgba(0, 0, 0, 0.05);
|
||||||
|
border-radius: 16rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
font-size: 28rpx;
|
||||||
|
gap: 15rpx;
|
||||||
|
padding: 10rpx 20rpx;
|
||||||
|
}
|
||||||
|
.filter-types .filter-type-inner.active.data-v-2f35fb20 {
|
||||||
|
background-color: rgba(250, 44, 25, 0.1);
|
||||||
|
color: var(--nutui-color-primary);
|
||||||
|
}
|
||||||
|
.tabs-container.data-v-2f35fb20 {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.tabs-container .tab-pane-inner.data-v-2f35fb20 {
|
||||||
|
height: 600rpx;
|
||||||
|
}
|
||||||
|
.tabs-container .tabs-inner.data-v-2f35fb20 {
|
||||||
|
overflow-y: scroll;
|
||||||
|
height: 600rpx;
|
||||||
|
width: 160rpx;
|
||||||
|
background-color: #F5F5F5;
|
||||||
|
}
|
||||||
|
.tabs-container .tabs-inner .tab-inner.data-v-2f35fb20 {
|
||||||
|
display: flex;
|
||||||
|
height: 60rpx;
|
||||||
|
padding: 10rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
background: #F5F5F5;
|
||||||
|
}
|
||||||
|
.tabs-container .tabs-inner .tab-inner text.data-v-2f35fb20 {
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.tabs-container .tabs-inner .tab-inner-active.data-v-2f35fb20 {
|
||||||
|
background-color: rgba(250, 44, 25, 0.1);
|
||||||
|
color: var(--nutui-color-primary);
|
||||||
|
}
|
||||||
|
.degree-inner.data-v-2f35fb20 {
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 10rpx;
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 60rpx;
|
||||||
|
}
|
||||||
|
.degree-item.data-v-2f35fb20 {
|
||||||
|
align-items: center;
|
||||||
|
background-color: rgba(0, 0, 0, 0.05);
|
||||||
|
border-radius: 10rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
font-size: 26rpx;
|
||||||
|
gap: 10rpx;
|
||||||
|
justify-content: center;
|
||||||
|
min-height: 80rpx;
|
||||||
|
width: calc(50% - 10rpx);
|
||||||
|
}
|
||||||
|
.degree-item.active.data-v-2f35fb20 {
|
||||||
|
background-color: rgba(250, 44, 25, 0.1);
|
||||||
|
color: var(--nutui-color-primary);
|
||||||
|
}
|
||||||
|
.product-btns.data-v-2f35fb20 {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
padding: 20rpx 0;
|
||||||
|
}
|
||||||
|
.product-btns .reset.data-v-2f35fb20 {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
.product-btns .confirm.data-v-2f35fb20 {
|
||||||
|
flex: 2;
|
||||||
|
}
|
||||||
|
.degree-btns.data-v-2f35fb20 {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.degree-btns .reset.data-v-2f35fb20 {
|
||||||
|
flex: 1;
|
||||||
|
/* 重置按钮占 1 份 */
|
||||||
|
}
|
||||||
|
.degree-btns .confirm.data-v-2f35fb20 {
|
||||||
|
flex: 2;
|
||||||
|
/* 确认按钮占 2 份 */
|
||||||
|
}
|
||||||
|
.main-nav-container.data-v-2f35fb20 {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
.nav-button.data-v-2f35fb20 {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
width: 45%;
|
||||||
|
height: 160rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 0 10rpx;
|
||||||
|
}
|
||||||
|
.phone-button.data-v-2f35fb20 {
|
||||||
|
background: linear-gradient(135deg, #6a5ae0, #8d7bfb);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.parts-button.data-v-2f35fb20 {
|
||||||
|
background: linear-gradient(135deg, #ff6b6b, #ee5253);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.nav-button-bg.data-v-2f35fb20 {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
height: 100%;
|
||||||
|
width: 50%;
|
||||||
|
opacity: 0.2;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
.nav-button-icon.data-v-2f35fb20 {
|
||||||
|
width: 90rpx;
|
||||||
|
height: 90rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
.nav-button-content.data-v-2f35fb20 {
|
||||||
|
z-index: 2;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.nav-button-title.data-v-2f35fb20 {
|
||||||
|
font-size: 34rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 8rpx;
|
||||||
|
}
|
||||||
|
.nav-button-desc.data-v-2f35fb20 {
|
||||||
|
font-size: 24rpx;
|
||||||
|
opacity: 0.85;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user