Browse Source

页面样式功能修改

master
xuhuajiao 1 year ago
parent
commit
e96de97b5f
  1. 31
      library-activity/README.md
  2. 52
      library-activity/src/assets/css/style.scss
  3. BIN
      library-activity/src/assets/images/active-img.png
  4. BIN
      library-activity/src/assets/images/empty.png
  5. 62
      library-activity/src/components/aitoast/aitoast.vue
  6. 477
      library-activity/src/components/verify/slide-verify.vue
  7. 6
      library-activity/src/router/index.js
  8. 59
      library-activity/src/views/activeDetail/activeDetail.vue
  9. 22
      library-activity/src/views/bookList/bookList.vue
  10. 359
      library-activity/src/views/cart/cart copy.vue
  11. 112
      library-activity/src/views/cart/cart.vue
  12. 4
      library-activity/src/views/feedback/feedback.vue
  13. 13
      library-activity/src/views/index.vue
  14. 21
      library-activity/src/views/logisticsInfo/logisticsInfo.vue
  15. 15
      library-activity/src/views/mine/mine.vue
  16. 6
      library-activity/src/views/myAddress/addAddress.vue
  17. 8
      library-activity/src/views/myAddress/myAddress.vue
  18. 78
      library-activity/src/views/myLending/myLending.vue
  19. 16
      library-activity/src/views/orderDetail/orderDetail.vue
  20. 12
      selfServiceMachine/README.md
  21. 2
      selfServiceMachine/public/index.html
  22. BIN
      selfServiceMachine/public/logo.png
  23. BIN
      selfServiceMachine/src/assets/logo.png
  24. 30
      selfServiceMachine/src/assets/styles/index.scss
  25. 127
      selfServiceMachine/src/views/bookRecommend.vue
  26. 222
      selfServiceMachine/src/views/module/bookDetails.vue
  27. 134
      selfServiceMachine/src/views/module/bookList.vue
  28. 51
      selfServiceMachine/src/views/module/headerTop.vue
  29. 97
      selfServiceMachine/src/views/module/homeListItem.vue

31
library-activity/README.md

@ -5,16 +5,26 @@
## 目录结构介绍 ##
```bash
|-- dist // 项目打包后生产目录
|-- public // 静态文件目录,可直接在index.html 中引入
|-- src // 源码目录
| |-- components // 公共组件
| |-- leftnav.vue // 左边菜单栏
| |-- navcon.vue // 头部菜单栏
| |-- Pagination.vue // 公共分页组件
| |-- tabBar.vue // 底部菜单栏
| |-- views // 主要路由页面
| |-- Login.vue // 登录
| |-- aboutUs.vue // 关于我们
| |-- activeDetail.vue // 活动详情
| |-- bookList.vue // 开始选书列表
| |-- cart.vue // 书车
| |-- result.vue // 下单成功页
| |-- feedback.vue // 反馈与建议
| |-- logisticsInfo.vue // 物流详情
| |-- mine.vue // 我的
| |-- myAddress.vue // 我的地址
| |-- addAddress.vue // 添加地址
| |-- myLending.vue // 我的借阅
| |-- order.vue // 我的订单
| |-- orderDetail.vue // 订单详情
| |-- index.vue // 主页面
| |-- App.vue // 页面入口文件
| |-- main.js // 程序入口文件,加载各种公共组件
@ -26,16 +36,19 @@
|-- vite.config.js // vite 配置文件
|-- package.json // 项目及工具的依赖配置文件
|-- README.md // 说明
```
## 安装依赖包 ##
```bash
# 安装依赖包
npm install
## 部署开发环境 ##
# 部署开发环境
npm run dev
## 打包 ##
# 打包
npm run build
## 打包后部署生产环境服务器 ##
# 打包后部署生产环境服务器
npm run serve
```

52
library-activity/src/assets/css/style.scss

@ -42,11 +42,13 @@
height: .5rem;
background: url('@assets/images/back.png') no-repeat transparent;
background-size: .5rem .5rem;
z-index: 9999;
}
P{
flex: 1;
text-align: center;
font-size: .4rem;
font-size: .32rem;
margin-left: -.5rem;
}
.setting-header{
font-size: .32rem;
@ -149,6 +151,7 @@
font-style: normal;
text-decoration: line-through;
color: #FF3871;
}
}
.item-delt{
@ -172,7 +175,7 @@
width: .5rem;
height: .5rem;
margin: .5rem 0 0 .32rem;
background: url('@assets/images/back.png') no-repeat transparent;
background: url('@assets/images/arrow-w.png') no-repeat transparent;
background-size: .5rem .5rem;
}
}
@ -213,7 +216,7 @@
align-items: center;
margin-top: .3rem;
padding-top: .3rem;
border-top: 1px solid #C6C6E2;
border-top: 1px solid #f2f2f2;
span{
display: block;
padding: 0 .24rem;
@ -250,7 +253,7 @@
}
.order-main {
padding: 2rem 0.32rem 0 0.32rem;
padding: 2rem 0.16rem 0 0.16rem;
.van-tabs__wrap{
position: fixed;
top: 1rem;
@ -266,7 +269,7 @@
// margin-left: -0.18rem;
}
.van-tab--grow {
padding: 0 0.18rem;
padding: 0 0.14rem;
z-index: 222;
}
.van-tabs__nav {
@ -285,22 +288,9 @@
background-size: 0.48rem 0.2rem;
}
.van-tabs__content--animated{
overflow: auto;
// overflow: auto;
}
}
.order-main{
.order-item {
.product-cont {
.author-date{
p{
background-color: #F4F6FC !important;
color: #717275 !important;
}
}
}
}
}
.order-status {
font-size: 0.28rem;
color: #666;
@ -348,7 +338,7 @@
.bookItem-dialog-detail{
padding: .26rem;
margin-bottom: .2rem;
border-bottom: 1px solid #C6C6E2;
// border-bottom: 1px solid #f2f2f2;
.product-cont{
position: relative;
padding-top: .3rem;
@ -380,8 +370,11 @@
font-size: .24rem;
color: #757676;
line-height: .36rem;
.txt-title{
width: 1.42rem;
}
.intro-txt{
width: 3.4rem;
// width: 3.4rem;
color: #191A1A;
opacity: 1;
}
@ -398,10 +391,25 @@
padding: .1rem 0 0 .1rem;
font-size: .24rem;
color: #FF3871;
text-decoration: line-through;
i{
font-size: .18rem;
}
em{
text-decoration: line-through;
}
}
}
}
.van-dialog{
width: 6.86rem !important;
}
.empty-data{
padding-top: 0.875rem;
img{
display: block;
width: 3.35rem;
margin: 0 auto;
}
}

BIN
library-activity/src/assets/images/active-img.png

After

Width: 750  |  Height: 1624  |  Size: 576 KiB

BIN
library-activity/src/assets/images/empty.png

After

Width: 335  |  Height: 236  |  Size: 11 KiB

62
library-activity/src/components/aitoast/aitoast.vue

@ -1,62 +0,0 @@
<template>
<div class="tishi-di" v-if="data.ifs">
<div class="tishi">
{{toastmassage}}
</div>
</div>
</template>
<script>
import { reactive,computed,onMounted,watch } from 'vue';
export default {
props: {
toastmassage: {
type: String,
default: ''
},
iftshow: {
type: Number,
default: 0
}
},
setup(props){
const data = reactive({
timer:null,
ifs:false
})
watch(() => props.iftshow, (oldVlaue, newValue) => {
data.ifs = true;
})
watch(() => data.ifs, (oldVlaue, newValue) => {
let that = data;
clearTimeout(that.timer);
that.timer = null;
that.timer=setTimeout(function(){
that.ifs = false;
},1500)
})
return {
data
}
}
}
</script>
<style>
.tishi-di{
width: 100%;
position: fixed;
bottom: 16%;
left: 0;
display: flex;
justify-content: center;
align-items: center;
}
.tishi{
padding: 0.18rem 0.40rem;
background-color: rgb(226,226,226,0.9);
font-size: 0.28rem;
color: #222222;
border-radius: 0.04rem;
}
</style>

477
library-activity/src/components/verify/slide-verify.vue

@ -1,477 +0,0 @@
<template>
<div class="slide-verify" :style="{width: w + 'px'}" id="slideVerify" onselectstart="return false;">
<!-- 图片加载遮蔽罩 -->
<div :class="{'slider-verify-loading': loadBlock}"></div>
<canvas :width="w" :height="h" ref="canvas" ></canvas>
<div v-if="show" @click="refresh" class="slide-verify-refresh-icon"></div>
<canvas :width="w" :height="h" ref="block" class="slide-verify-block"></canvas>
<!-- container -->
<div class="slide-verify-slider" :class="{'container-active': containerActive, 'container-success': containerSuccess, 'container-fail': containerFail}">
<div class="slide-verify-slider-mask" :style="{width: sliderMaskWidth}">
<!-- slider -->
<div @mousedown="sliderDown"
@touchstart="touchStartEvent"
@touchmove="touchMoveEvent"
@touchend="touchEndEvent"
class="slide-verify-slider-mask-item"
:style="{left: sliderLeft}">
<div class="slide-verify-slider-mask-item-icon"></div>
</div>
</div>
<span class="slide-verify-slider-text">{{sliderText}}</span>
</div>
</div>
</template>
<script>
const PI = Math.PI;
function sum(x, y) {
return x + y
}
function square(x) {
return x * x
}
export default {
name: 'SlideVerify',
props: {
// block length
l: {
type: Number,
default: 42,
},
// block radius
r: {
type: Number,
default: 10,
},
// canvas width
w: {
type: Number,
default: 310,
},
// canvas height
h: {
type: Number,
default: 155,
},
sliderText: {
type: String,
default: '向右滑动滑块填充拼图',
},
accuracy: {
type: Number,
default: 5, // -1
},
show: {
type: Boolean,
default: true,
},
imgs: {
type: Array,
default: () => [],
},
},
data() {
return {
containerActive: false, // container active class
containerSuccess: false, // container success class
containerFail: false, // container fail class
canvasCtx: null,
blockCtx: null,
block: null,
block_x: undefined, // container random position
block_y: undefined,
L: this.l + this.r * 2 + 3, // block real lenght
img: undefined,
originX: undefined,
originY: undefined,
isMouseDown: false,
trail: [],
sliderLeft: 0, // block right offset
sliderMaskWidth: 0, // mask width,
success: false, // Bug Fixes
loadBlock: true, // Features
timestamp: null,
}
},
mounted() {
this.init()
},
methods: {
init() {
this.initDom()
this.initImg()
this.bindEvents()
},
initDom() {
this.block = this.$refs.block;
this.canvasCtx = this.$refs.canvas.getContext('2d')
this.blockCtx = this.block.getContext('2d')
},
initImg() {
const img = this.createImg(() => {
//
this.loadBlock = false;
this.drawBlock()
this.canvasCtx.drawImage(img, 0, 0, this.w, this.h)
this.blockCtx.drawImage(img, 0, 0, this.w, this.h)
let {
block_x: x,
block_y: y,
r,
L
} = this
let _y = y - r * 2 - 1
let ImageData = this.blockCtx.getImageData(x, _y, L, L);
this.block.width = L;
this.blockCtx.putImageData(ImageData, 0, _y)
});
this.img = img;
},
drawBlock() {
this.block_x = this.getRandomNumberByRange(this.L + 10, this.w - (this.L + 10))
this.block_y = this.getRandomNumberByRange(10 + this.r * 2, this.h - (this.L + 10))
this.draw(this.canvasCtx, this.block_x, this.block_y, 'fill')
this.draw(this.blockCtx, this.block_x, this.block_y, 'clip')
},
draw(ctx, x, y, operation) {
let {
l,
r
} = this;
ctx.beginPath()
ctx.moveTo(x, y)
ctx.arc(x + l / 2, y - r + 2, r, 0.72 * PI, 2.26 * PI)
ctx.lineTo(x + l, y)
ctx.arc(x + l + r - 2, y + l / 2, r, 1.21 * PI, 2.78 * PI)
ctx.lineTo(x + l, y + l)
ctx.lineTo(x, y + l)
ctx.arc(x + r - 2, y + l / 2, r + 0.4, 2.76 * PI, 1.24 * PI, true)
ctx.lineTo(x, y)
ctx.lineWidth = 2
ctx.fillStyle = 'rgba(255, 255, 255, 0.7)'
ctx.strokeStyle = 'rgba(255, 255, 255, 0.7)'
ctx.stroke()
ctx[operation]()
// Bug Fixes ie
ctx.globalCompositeOperation = "destination-over"
},
createImg(onload) {
const img = document.createElement('img');
img.crossOrigin = "Anonymous";
img.onload = onload;
img.onerror = () => {
img.src = this.getRandomImg()
}
img.src = this.getRandomImg()
return img;
},
// img src
getRandomImg() {
// return require('../assets/img.jpg')
const len = this.imgs.length;
return len > 0 ?
this.imgs[this.getRandomNumberByRange(0, len)] :
'https://picsum.photos/300/150/?image=' + this.getRandomNumberByRange(0, 1084);
},
getRandomNumberByRange(start, end) {
return Math.round(Math.random() * (end - start) + start)
},
refresh() {
this.reset()
this.$emit('refresh')
},
sliderDown(event) {
if (this.success) return;
this.originX = event.clientX;
this.originY = event.clientY;
this.isMouseDown = true;
this.timestamp = + new Date();
},
touchStartEvent(e) {
if (this.success) return;
this.originX = e.changedTouches[0].pageX;
this.originY = e.changedTouches[0].pageY;
this.isMouseDown = true;
this.timestamp = + new Date();
},
bindEvents() {
document.addEventListener('mousemove', (e) => {
if (!this.isMouseDown) return false;
const moveX = e.clientX - this.originX;
const moveY = e.clientY - this.originY;
if (moveX < 0 || moveX + 38 >= this.w) return false;
this.sliderLeft = moveX + 'px';
let blockLeft = (this.w - 40 - 20) / (this.w - 40) * moveX;
this.block.style.left = blockLeft + 'px';
this.containerActive = true; // add active
this.sliderMaskWidth = moveX + 'px';
this.trail.push(moveY);
});
document.addEventListener('mouseup', (e) => {
if (!this.isMouseDown) return false
this.isMouseDown = false
if (e.clientX === this.originX) return false;
this.containerActive = false; // remove active
this.timestamp = + new Date() - this.timestamp;
const {
spliced,
TuringTest
} = this.verify();
if (spliced) {
if(this.accuracy === -1) {
this.containerSuccess = true;
this.success = true;
this.$emit('success', this.timestamp);
return;
}
if (TuringTest) {
// succ
this.containerSuccess = true;
this.success = true;
this.$emit('success', this.timestamp)
} else {
this.containerFail = true;
this.$emit('again')
}
} else {
this.containerFail = true;
this.$emit('fail')
setTimeout(() => {
this.reset()
}, 1000)
}
})
},
touchMoveEvent(e) {
if (!this.isMouseDown) return false;
const moveX = e.changedTouches[0].pageX - this.originX;
const moveY = e.changedTouches[0].pageY - this.originY;
if (moveX < 0 || moveX + 38 >= this.w) return false;
this.sliderLeft = moveX + 'px';
let blockLeft = (this.w - 40 - 20) / (this.w - 40) * moveX;
this.block.style.left = blockLeft + 'px';
this.containerActive = true;
this.sliderMaskWidth = moveX + 'px';
this.trail.push(moveY);
},
touchEndEvent(e) {
if (!this.isMouseDown) return false
this.isMouseDown = false
if (e.changedTouches[0].pageX === this.originX) return false;
this.containerActive = false;
this.timestamp = + new Date() - this.timestamp;
const {
spliced,
TuringTest
} = this.verify();
if (spliced) {
if(this.accuracy === -1) {
this.containerSuccess = true;
this.success = true;
this.$emit('success', this.timestamp);
return;
}
if (TuringTest) {
// succ
this.containerSuccess = true;
this.success = true;
this.$emit('success', this.timestamp)
} else {
this.containerFail = true;
this.$emit('again')
}
} else {
this.containerFail = true;
this.$emit('fail')
setTimeout(() => {
this.reset()
}, 1000)
}
},
verify() {
const arr = this.trail // drag y move distance
const average = arr.reduce(sum) / arr.length // average
const deviations = arr.map(x => x - average) // deviation array
const stddev = Math.sqrt(deviations.map(square).reduce(sum) / arr.length) // standard deviation
const left = parseInt(this.block.style.left)
const accuracy = this.accuracy <= 1 ? 1 : this.accuracy > 10 ? 10 : this.accuracy;
return {
spliced: Math.abs(left - this.block_x) <= accuracy,
TuringTest: average !== stddev, // equal => not person operate
}
},
reset() {
this.success = false;
this.containerActive = false;
this.containerSuccess = false;
this.containerFail = false;
this.sliderLeft = 0;
this.block.style.left = 0;
this.sliderMaskWidth = 0;
// canvas
let {
w,
h
} = this;
this.canvasCtx.clearRect(0, 0, w, h)
this.blockCtx.clearRect(0, 0, w, h)
this.block.width = w
// generate img
this.img.src = this.getRandomImg();
this.$emit('fulfilled')
},
}
}
</script>
<style scoped>
.slide-verify {
position: relative;
}
/* 图片加载样式 */
.slider-verify-loading{
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.9);
z-index: 999;
animation: loading 1.5s infinite;
}
@keyframes loading {
0%{
opacity: .7;
}
100% {
opacity: 9;
}
}
.slide-verify-block {
position: absolute;
left: 0;
top: 0
}
.slide-verify-refresh-icon {
position: absolute;
right: 0;
top: 0;
width: 34px;
height: 34px;
cursor: pointer;
background: url("../../assets/images/login/icon_light.png") 0 -437px;
background-size: 34px 471px
}
.slide-verify-slider {
position: relative;
text-align: center;
width: 100%;
height: 40px;
line-height: 40px;
margin-top: 15px;
background: #f7f9fa;
color: #45494c;
border: 1px solid #e4e7eb
}
.slide-verify-slider-mask {
position: absolute;
left: 0;
top: 0;
height: 40px;
border: 0 solid #1991FA;
background: #D1E9FE
}
.slide-verify-slider-mask-item {
position: absolute;
top: 0;
left: 0;
width: 40px;
height: 40px;
background: #fff;
box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
cursor: pointer;
transition: background .2s linear
}
.slide-verify-slider-mask-item:hover {
background: #1991FA
}
.slide-verify-slider-mask-item:hover .slide-verify-slider-mask-item-icon {
background-position: 0 -13px
}
.slide-verify-slider-mask-item-icon {
position: absolute;
top: 15px;
left: 13px;
width: 14px;
height: 12px;
background: url("../../assets/images/login/icon_light.png") 0 -26px;
background-size: 34px 471px
}
.container-active .slide-verify-slider-mask-item {
height: 38px;
top: -1px;
border: 1px solid #1991FA;
}
.container-active .slide-verify-slider-mask {
height: 38px;
border-width: 1px;
}
.container-success .slide-verify-slider-mask-item {
height: 38px;
top: -1px;
border: 1px solid #52CCBA;
background-color: #52CCBA !important;
}
.container-success .slide-verify-slider-mask {
height: 38px;
border: 1px solid #52CCBA;
background-color: #D2F4EF;
}
.container-success .slide-verify-slider-mask-item-icon {
background-position: 0 0 !important;
}
.container-fail .slide-verify-slider-mask-item {
height: 38px;
top: -1px;
border: 1px solid #f57a7a;
background-color: #f57a7a !important;
}
.container-fail .slide-verify-slider-mask {
height: 38px;
border: 1px solid #f57a7a;
background-color: #fce1e1;
}
.container-fail .slide-verify-slider-mask-item-icon {
top: 14px;
background-position: 0 -82px !important;
}
.container-active .slide-verify-slider-text,
.container-success .slide-verify-slider-text,
.container-fail .slide-verify-slider-text {
display: none;
}
</style>

6
library-activity/src/router/index.js

@ -9,6 +9,12 @@ const router = createRouter({
component: () =>
import('@/views/index.vue'),
},
{
path: '/ActiveDetail',
name: 'ActiveDetail',
component: () =>
import('@/views/activeDetail/activeDetail.vue'),
},
{
path: '/BookList',
name: 'BookList',

59
library-activity/src/views/activeDetail/activeDetail.vue

@ -0,0 +1,59 @@
<template>
<div class="main">
<div class="active-detail">
<img src="@assets/images/active-img.png" alt="" />
<span @click="toBookList">开始选书</span>
</div>
</div>
</template>
<script>
import { reactive, onMounted, getCurrentInstance,toRefs } from 'vue'
export default {
name:'ActiveDetail',
setup() {
const { proxy } = getCurrentInstance()
const data = reactive({
})
onMounted(async () => {
})
let toBookList = () => {
proxy.$router.push({ path: '/BookList' })
}
return {
...toRefs(data),
toBookList
}
}
}
</script>
<style lang="scss" scoped>
.active-detail{
img{
display: block;
width: 100%;
}
span{
position: fixed;
bottom: .45rem;
left: 50%;
transform: translateX(-50%);
display: block;
width: 3.07rem;
height: .8rem;
line-height: .8rem;
font-size: .3rem;
font-weight: bold;
text-align: center;
background: linear-gradient(135deg, #48FCD4 0%, #01FFB9 99%);
box-shadow: 0px 0px .16rem 0px #636EBA;
border-radius: .4rem;
}
// width: 100%;
// height: 100vh;
// background: url('@assets/images/active-img.png') no-repeat;
// background-size: cover;
}
</style>

22
library-activity/src/views/bookList/bookList.vue

@ -2,7 +2,8 @@
<div class="main">
<div class="top-header">
<span class="back" @click="toBack"></span>
<p>活动书籍</p>
<p>开始选书</p>
<img @click="toCart" style="width: .48rem;" src="@assets/images/cart.png" alt="" />
</div>
<div class="bookList-main">
<input type="text" v-model="query" placeholder="搜索" class="search-input" />
@ -80,7 +81,7 @@
<p>2023年07月</p>
</div>
<div class="bookItem-txt">
<span>简介</span>
<span class="txt-title">简介</span>
<p class="intro-txt">精心提炼20种GPT提问方法及指令从入门到进阶再到精通100个案例带你玩</p>
</div>
</div>
@ -90,7 +91,7 @@
<p class="dealer">京东商城</p>
<div class="order-pay">
<p>实付款<span><i></i>0</span></p>
<span class="yj-price"><i></i>129.0</span>
<span class="yj-price"><i></i><em>129.0</em></span>
</div>
</div>
</div>
@ -119,7 +120,7 @@ export default {
})
onMounted(() => {})
let toBack = () => {
proxy.$router.go(-1);
proxy.$router.push({ path: '/' })
}
let onLoad = () => {
//
@ -141,11 +142,15 @@ export default {
data.showDetial = false
Toast('当前书籍已成功加入书车')
}
let toCart = () => {
proxy.$router.push({ path: '/Cart' })
}
return {
...toRefs(data),
toBack,
addCart,
onLoad
onLoad,
toCart
}
},
}
@ -153,7 +158,7 @@ export default {
<style scoped lang="scss">
.bookList-main{
padding: 1.2rem .32rem 0 .32rem;
padding: 1.2rem .16rem 0 .16rem;
height: calc(100% - 1.2rem);
background-color: #fff;
.search-input{
@ -213,9 +218,6 @@ export default {
p{
height: .36rem;
line-height: .36rem;
color: #757676 !important;
background-color: #fff !important;
border: 1px solid #C6C6E2;
border-radius: 0.04rem;
}
}
@ -242,7 +244,7 @@ export default {
margin-top: .24rem;
padding: .2rem .24rem;
background-color: #F9F9FD;
border: 1px solid #C6C6E2;
border: 1px solid #f2f2f2;
border-radius: 0.08rem;
:deep(.van-progress){
width: 2.88rem;

359
library-activity/src/views/cart/cart copy.vue

@ -1,359 +0,0 @@
<template>
<div class="main">
<div class="cart-main">
<div class="cart-top">
<div class="cart-num">图书数量<span>(5)</span></div>
<span @click="cartDelt">管理</span>
</div>
<div class="cart-list">
<div class="cart-item">
<div class="list-top">
<van-checkbox v-model="checked"></van-checkbox>
<div class="top-info">
<p class="active-name">你选书我买单<i></i></p>
<p class="dealer">京东商城</p>
</div>
</div>
<div class="product-list">
<div class="product-item">
<van-checkbox v-model="checked"></van-checkbox>
<div class="product-cont">
<div class="product-img"><img src="" alt="" /></div>
<div class="product-txt">
<div class="product-info">
<h4 class="overflow-txt-only">秒懂AI提问让人工智能开发大脑 </h4>
<div class="author-date">
<p class="author overflow-txt-only">秋叶 刘进新 姜梅 定秋枫</p>
<p class="date overflow-txt-only ">2023年07月</p>
</div>
<div class="intro overflow-txt">精心提炼20种GPT提问方法及指令从入门到进阶再到精通100个案例带你玩</div>
</div>
<div class="product-bottom">
<p class="product-price">实付款 <span><i class="rmb"></i>29.0</span><i>129.0</i></p>
<span class="product-num">x1</span>
</div>
</div>
</div>
</div>
<div class="product-item">
<van-checkbox v-model="checked"></van-checkbox>
<div class="product-cont">
<div class="product-img"><img src="" alt="" /></div>
<div class="product-txt">
<div class="product-info">
<h4 class="overflow-txt-only">秒懂AI提问让人工智能开发大脑 </h4>
<div class="author-date">
<p class="author overflow-txt-only">秋叶 刘进新 姜梅 定秋枫</p>
<p class="date overflow-txt-only ">2023年07月</p>
</div>
<div class="intro overflow-txt">精心提炼20种GPT提问方法及指令从入门到进阶再到精通100个案例带你玩</div>
</div>
<div class="product-bottom">
<p class="product-price">实付款 <span><i class="rmb"></i>29.0</span><i>129.0</i></p>
<span class="product-num">x1</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="cart-item">
<div class="list-top">
<van-checkbox v-model="checked"></van-checkbox>
<div class="top-info">
<p class="active-name">你选书我买单<i></i></p>
<p class="dealer">京东商城</p>
</div>
</div>
<div class="product-list">
<div class="product-item">
<van-checkbox v-model="checked"></van-checkbox>
<div class="product-cont">
<div class="product-img"><img src="" alt="" /></div>
<div class="product-txt">
<div class="product-info">
<h4 class="overflow-txt-only">秒懂AI提问让人工智能开发大脑 </h4>
<div class="author-date">
<p class="author overflow-txt-only">秋叶 刘进新 姜梅 定秋枫</p>
<p class="date overflow-txt-only ">2023年07月</p>
</div>
<div class="intro overflow-txt">精心提炼20种GPT提问方法及指令从入门到进阶再到精通100个案例带你玩</div>
</div>
<div class="product-bottom">
<p class="product-price">实付款 <span><i class="rmb"></i>29.0</span><i>129.0</i></p>
<span class="product-num">x1</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="cart-pay">
<van-checkbox v-model="checked">全选</van-checkbox>
<div v-if="!isDeltHandle" class="payment-right">
<div class="total-num">合计:<span><i class="rmb"></i>0</span></div>
<p class="pay-btn" @click="goPay">下单</p>
</div>
<div v-else class="payment-right">
<p class="delt-btn" @click="confirmDelt">删除</p>
</div>
</div>
<TabBar :tabCur.sync="tabCur" />
</div>
</template>
<script>
import { Toast } from 'vant'
import { reactive, computed, onMounted, getCurrentInstance, toRefs } from 'vue'
import TabBar from '@/components/tabBar/index.vue'
export default {
name: 'Cart',
components: { TabBar },
setup() {
const { proxy } = getCurrentInstance()
let data = reactive({
tabCur: 1,
checked: false,
isDeltHandle: false
})
onMounted(() => {})
let goPay = () => {
proxy.$router.push({ path: '/CartResult' })
}
let cartDelt = () =>{
data.isDeltHandle = !data.isDeltHandle
}
return {
...toRefs(data),
goPay,
cartDelt
}
},
}
</script>
<style scoped lang="scss">
.cart-main{
padding: 0.25rem .125rem 2.375rem .125rem;
color: #191A1A;
.cart-top{
position: fixed;
top: 0;
right: 0;
left: 0;
display: flex;
justify-content: space-between;
align-items: center;
font-size: .3rem;
padding: .25rem;
background-color: #F4F4FC;
z-index: 999;
.cart-num{
font-size: .3rem;
opacity: 0.6;
span{
font-size: 0.25rem;
}
}
}
}
.cart-list{
padding-top: .875rem;
}
.cart-item{
padding: .25rem;
margin-bottom: .1875rem;
box-shadow: 0px .0375rem 0.75rem 1px rgba(0,0,0,0.08);
border-radius: 0.1rem;
background-color: #fff;
.list-top{
display: flex;
justify-content: flex-start;
align-items: center;
.top-info{
display: flex;
flex: 1;
justify-content: space-between;
align-items: center;
}
.active-name{
position: relative;
padding: 0 0.375rem;
font-size: .3rem;
font-weight: bold;
background: url('@assets/images/gift.png') no-repeat left center;
background-size: 0.275rem 0.275rem;
&::after{
position: absolute;
right: 0;
top: 50%;
content: "";
width: .2rem;
height: .2rem;
background: url('@assets/images/arrow.png') no-repeat center center;
background-size:.2rem .2rem;
transform: translateY(-50%)
}
}
.dealer{
padding-left: .4rem;
font-size: .3rem;
background: url('@assets/images/dealer.png') no-repeat left center;
background-size: .3rem .3rem;
}
}
}
.product-list{
.product-item{
display: flex;
justify-content: flex-start;
margin-top: .25rem;
.product-cont{
flex: 1;
display: flex;
justify-content: flex-start;
.product-img{
width: 1.25rem;
height: 1.75rem;
margin: .125rem 0.2rem 0 0;
background-color: #f1f1f1;
border-radius: 0.05rem;
overflow: hidden;
}
.product-txt{
flex: 1;
.product-info{
h4{
font-size: .3rem;
}
.author-date{
display: flex;
justify-content: flex-start;
margin: .075rem 0;
p{
font-size: .25rem;
padding: 0 .05rem;
margin-right: 0.1rem;
background-color: #F4F6FC;
color: #717275;
}
}
.intro{
font-size: .25rem;
opacity: 0.6;
}
}
.product-bottom{
display: flex;
justify-content: space-between;
align-items: center;
color: #757676;
.product-price{
span{
display: inline-block;
font-size: .35rem;
font-weight: bold;
color: #000;
margin-right: 0.175rem;
.rmb{
font-style: normal;
font-size: .25rem;
text-decoration: none;
color: #000;
}
}
i{
font-style: normal;
text-decoration: line-through;
color: #FF3871;
}
}
}
}
}
}
}
.cart-pay{
position: fixed;
left: 0;
right: 0;
bottom: 1.225rem;
padding: 0 .4rem;
height: 1rem;
// background-color: #fcfcfc;
background: linear-gradient(#fff, #f1f1f1);
display: flex;
justify-content: space-between;
align-items: center;
.payment-right{
display: flex;
justify-content: space-between;
align-items: center;
font-size: .3rem;
.total-num{
font-size: 0.3rem;
span{
font-size: .35rem;
font-weight: bold;
color: #FF3871;
.rmb{
font-style: normal;
font-size: .25rem;
text-decoration: none;
}
}
}
.pay-btn{
width: 1.875rem;
height: 0.75rem;
margin-left: 0.5rem;
line-height: 0.75rem;
text-align: center;
color: #fff;
background: url('@assets/images/btn3.png') no-repeat center center;
background-size: 100% 100%;
}
.delt-btn{
width: 1.875rem;
height: 0.75rem;
line-height: 0.75rem;
font-size: .3rem;
color: #000;
text-align: center;
border: 2px solid #000;
opacity: 0.6;
border-radius: .625rem;
}
}
}
.van-checkbox{
margin-right: .15rem;
}
:deep(.van-checkbox__icon){
height: .325rem;
}
:deep(.van-checkbox__icon .van-icon){
width: .325rem;
height: .325rem;
border-color: rgba(0,0,0,.3);
}
:deep(.van-checkbox__icon--checked .van-icon){
border: none;
background: url('@assets/images/selected.png') no-repeat transparent;
background-size: .325rem .325rem;
}
:deep(.van-icon-success:before){
display: none;
}
:deep(.van-checkbox__label){
font-size: .3rem;
}
</style>

112
library-activity/src/views/cart/cart.vue

@ -2,21 +2,21 @@
<div class="main">
<div class="cart-main">
<div class="cart-top">
<div class="cart-num">图书数量<span>({{list.length + list2.length}})</span></div>
<div class="cart-num">图书数量<span>({{list.length}})</span></div>
<span @click="cartDelt">{{ !isDeltHandle ? '管理' : '完成' }}</span>
</div>
<div class="cart-list">
<div class="cart-item" v-if="list.length !== 0">
<div class="list-top">
<van-checkbox v-model="activeSelect" @change="(list,activeSelect)"></van-checkbox>
<van-checkbox v-model="activeSelect" @change="handleselectedAll"></van-checkbox>
<div class="top-info">
<p class="active-name">你选书我买单<i></i></p>
<p class="dealer">京东商城</p>
</div>
</div>
<div class="product-list">
<div v-for="item in list" :key="item.id" class="product-item" >
<van-checkbox v-model="item.selected" ></van-checkbox>
<div v-for="(item,index) in list" :key="item.id" class="product-item" >
<van-checkbox v-model="item.checked" @change="handleSingle(index)"></van-checkbox>
<div class="product-cont" @click="showDetial=true">
<div class="product-img"><img src="" alt="" /></div>
<div class="product-txt">
@ -29,7 +29,7 @@
<div class="intro overflow-txt">精心提炼20种GPT提问方法及指令从入门到进阶再到精通100个案例带你玩</div>
</div>
<div class="product-bottom">
<p class="product-price">实付款 <span><i class="rmb"></i>29.0</span><i>129.0</i></p>
<p class="product-price">实付款 <span><i class="rmb"></i>29.0</span><i><em></em>129.0</i></p>
<span v-if="!isDeltHandle" class="product-num">x1</span>
<span v-else class="item-delt" @click.stop="deltCurrentItem('active1',item.id)"></span>
</div>
@ -39,43 +39,14 @@
</div>
</div>
<div class="cart-item" v-if="list2.length !== 0">
<div class="list-top">
<van-checkbox v-model="activeSelect2" @change="(list2,activeSelect2)"> </van-checkbox>
<div class="top-info">
<p class="active-name">你选书我买单<i></i></p>
<p class="dealer">京东商城</p>
</div>
</div>
<div class="product-list">
<div v-for="item in list2" :key="item.id" class="product-item">
<van-checkbox v-model="item.selected"></van-checkbox>
<div class="product-cont" @click="showDetial=true">
<div class="product-img"><img src="" alt="" /></div>
<div class="product-txt">
<div class="product-info">
<h4 class="overflow-txt-only">{{ item.id }}秒懂AI提问让人工智能开发大脑 </h4>
<div class="author-date">
<p class="author overflow-txt-only">秋叶 刘进新 姜梅 定秋枫</p>
<p class="date overflow-txt-only ">2023年07月</p>
</div>
<div class="intro overflow-txt">精心提炼20种GPT提问方法及指令从入门到进阶再到精通100个案例带你玩</div>
</div>
<div class="product-bottom">
<p class="product-price">实付款 <span><i class="rmb"></i>29.0</span><i>129.0</i></p>
<span v-if="!isDeltHandle" class="product-num">x1</span>
<span v-else class="item-delt" @click.stop="deltCurrentItem('active2',item.id)"></span>
</div>
</div>
</div>
</div>
</div>
<div class="empty-data" v-if="list.length === 0">
<img src="@assets/images/empty.png" alt="" />
</div>
</div>
</div>
<div class="cart-pay">
<van-checkbox v-model="allSelected">全选</van-checkbox>
<div class="cart-pay" v-if="list.length !== 0">
<van-checkbox v-model="activeSelect">全选</van-checkbox>
<div v-if="!isDeltHandle" class="payment-right">
<div class="total-num">合计:<span><i class="rmb"></i>0</span></div>
<p class="pay-btn" @click="goPay">下单</p>
@ -84,6 +55,7 @@
<p class="delt-btn" @click="confirmDelt">删除</p>
</div>
</div>
<TabBar :tabCur.sync="tabCur" />
<van-dialog v-model:show="showDetial" :show-confirm-button="false">
@ -117,7 +89,7 @@
<p>2023年07月</p>
</div>
<div class="bookItem-txt">
<span>简介</span>
<span class="txt-title">简介</span>
<p class="intro-txt">精心提炼20种GPT提问方法及指令从入门到进阶再到精通100个案例带你玩</p>
</div>
</div>
@ -127,7 +99,7 @@
<p class="dealer">京东商城</p>
<div class="order-pay">
<p>实付款<span><i></i>0</span></p>
<span class="yj-price"><i></i>129.0</span>
<span class="yj-price"><i></i><em>129.0</em></span>
</div>
</div>
</div>
@ -150,27 +122,20 @@ export default {
let data = reactive({
tabCur: 1,
activeSelect: false,
activeSelect2: false,
allSelected: false,
isDeltHandle: false,
showDetial: false,
list:[],
list2:[]
checkedCount: []
})
onMounted(() => {
for (let i = 0; i < 2; i++) {
const json = {}
json.selected = false
json.checked = false
json.id = data.list.length + 1
data.list.push(json);
}
for (let i = 0; i < 1; i++) {
// data.list2.push(data.list2.length + 1);
const json = {}
json.selected = false
json.id = data.list2.length + 1
data.list2.push(json);
}
})
let goPay = () => {
proxy.$router.push({ path: '/CartResult' })
@ -185,20 +150,47 @@ export default {
targetList.splice(index, 1)
}
}
let selectAll = (list , selectAll) => {
console.log(selectAll)
for (let item of list) {
item.selected = selectAll
//
let handleSingle = (index) => {
const selectedProductsCount = data.list.filter(item => item.checked).length;
if (selectedProductsCount === 1 && !data.list.find(p => p.checked).checked) {
data.activeSelect = false;
} else {
data.activeSelect = selectedProductsCount === data.list.length;
}
}
//
let handleselectedAll = () =>{
data.list.forEach(item => {
item.checked = data.activeSelect;
})
}
let confirmDelt = () => {
if(data.activeSelect){
data.list = []
}else{
const index = data.list.findIndex(p => p.checked);
if (index !== -1) {
data.list.splice(index, 1);
}else{
Toast('请选择你需要删除的书籍')
}
}
}
return {
...toRefs(data),
goPay,
cartDelt,
deltCurrentItem,
selectAll
handleselectedAll,
handleSingle,
confirmDelt
}
},
}
}
</script>
@ -215,8 +207,10 @@ export default {
justify-content: space-between;
align-items: center;
font-size: .32rem;
padding: .18rem .32rem;
background-color: #F4F4FC;
height: 1rem;
padding: 0 .32rem;
background-color: #fff;
box-shadow: 0 0.06rem 0.1rem 1px #EFECEC;
z-index: 999;
.cart-num{
font-size: .32rem;
@ -228,7 +222,7 @@ export default {
}
}
.cart-list{
padding-top: 1rem;
padding-top: 1.2rem;
}
.cart-item{
padding: .24rem;

4
library-activity/src/views/feedback/feedback.vue

@ -44,7 +44,7 @@ export default {
<style scoped lang="scss">
.feedBack-main{
height: calc(100vh - 1rem);
padding: 1rem 0.32rem 0 0.32rem;
padding: 1rem 0.16rem 0 0.16rem;
background-color: #fff;
.feedBack-cont{
margin-top: 1.14rem;
@ -70,7 +70,7 @@ export default {
.fb-input{
margin-top: .24rem;
padding: .3rem .32rem;
border-top: 1px solid #C6C6E2;
border-top: 1px solid #f2f2f2;
textarea{
width: calc(100% - .48rem);
height: 2.4rem;

13
library-activity/src/views/index.vue

@ -3,7 +3,7 @@
<!-- <div class="index-header">当前活动</div> -->
<div class="active-main">
<div class="active-list">
<div class="active-item">
<div class="active-item" @click="toActiveDetail">
<div class="active-img">
<img src="@assets/images/bookimg.png" alt="" />
<span>限选3册</span>
@ -19,7 +19,7 @@
</div>
<div class="active-bottom">
<p class="active-slogn">新书 · 选书· 下单· 借阅</p>
<span class="active-btn" @click="toBookList"></span>
<span class="active-btn" @click.stop="toBookList"></span>
</div>
</div>
<div class="active-item">
@ -71,7 +71,6 @@
<script>
import { reactive, computed, onMounted, getCurrentInstance } from 'vue'
import WucTab from '@/components/wuc-tab/wuc-tab.vue'
import TabBar from '@/components/tabBar/index.vue'
import { useStore, mapGetters } from 'vuex'
import { useRoute } from 'vue-router'
@ -79,7 +78,7 @@ import { isWeiXin } from '@/utils/tool.js'
import { Toast } from 'vant'
export default {
components: { WucTab, TabBar },
components: { TabBar },
setup() {
const store = useStore()
const { proxy } = getCurrentInstance()
@ -116,6 +115,9 @@ export default {
})
let toBookList = () => {
proxy.$router.push({ path: '/BookList' })
}
let toActiveDetail = () => {
proxy.$router.push({ path: '/ActiveDetail' })
}
let Encrypt = (o) => {
if (typeof o === 'string') {
@ -305,6 +307,7 @@ export default {
return {
data,
toBookList,
toActiveDetail,
Encrypt,
ToTryLogin,
isLogin,
@ -329,7 +332,7 @@ export default {
padding-bottom: 1.2rem;
}
.active-list {
padding: 0 .32rem;
padding: 0 .16rem;
font-size: 0.24rem;
color: #191a1a;
.active-item {

21
library-activity/src/views/logisticsInfo/logisticsInfo.vue

@ -102,28 +102,29 @@ export default {
}
}
.logistics-main{
position: relative;
margin-top: -3rem;
.logistics-tab{
position: absolute;
right: 0;
top: -3.5rem;
display: flex;
justify-content: center;
margin: 0 .32rem .2rem .32rem;
padding: .16rem 0;
padding: 0 .2rem;
background: #fff;
box-shadow: 0px 0.03rem 0.6rem 1px rgba(0, 0, 0, 0.08);
border-radius: 0.32rem;
border-radius: 0.08rem;
span{
display: block;
padding: 0 .36rem;
margin: 0 .24rem;
padding: 0 .2rem;
height: .6rem;
line-height: .6rem;
font-size: .32rem;
color: #7A7A7F;
background-color: #F4F4F9;
border-radius: .5rem;
font-size: .28rem;
color: #666;
&.active{
color: #fff;
background-color: #FE6902;
font-weight: bold;
color: #000;
}
}
}

15
library-activity/src/views/mine/mine.vue

@ -205,7 +205,7 @@ export default {
background: url('@assets/images/minebg.png') no-repeat left top;
background-size: 100% 100%;
.user-main {
margin: 1.9rem .32rem 0 .32rem;
margin: 1.9rem .16rem 0 .16rem;
padding-bottom: .3rem;
background-color: #fff;
border-radius: 0.1rem;
@ -217,7 +217,7 @@ export default {
.user-img{
width: 1.3rem;
height: 1.3rem;
margin: -0.34rem 0 0 .75rem;
margin: -0.34rem 0 0 .35rem;
border-radius: 50%;
overflow: hidden;
background-color: #fff;
@ -280,7 +280,7 @@ export default {
}
.mine-content{
margin: 1.2rem 0 1.1rem 0;
padding: 0 .32rem;
padding: 0 .16rem;
}
.mine-item{
margin-bottom: .2rem;
@ -291,7 +291,7 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
font-size: .36rem;
font-size: .34rem;
margin-bottom: .36rem;
span{
font-size: .24rem;
@ -361,11 +361,12 @@ export default {
flex: 1;
margin-left: .16rem;
.log-num{
font-size: .32rem;
font-size: .28rem;
line-height: .5rem;
}
.logo-cont{
font-size: .24rem;
opacity: .6;
}
}
}
@ -401,7 +402,7 @@ export default {
}
.dialog-card{
width: 6.12rem;
width: 6.86rem;
background: url('@assets/images/card-img1.png') no-repeat #fff left top;
background-size: 100% 2.45rem;
border-radius: .16rem;
@ -413,7 +414,7 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
margin: 0 .3rem .2rem .24rem;
margin: 0 .24rem .2rem .24rem;
padding: .18rem .24rem;
background: rgba(241,241,249,0.4);
border: 0.02rem solid #C6C6E2;

6
library-activity/src/views/myAddress/addAddress.vue

@ -66,7 +66,7 @@
</van-field>
</div>
</van-cell-group>
<div style="position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%);">
<div style="position: fixed; bottom: .4rem; left: 50%; transform: translateX(-50%);">
<van-button round block type="primary" native-type="submit">
提交
</van-button>
@ -116,7 +116,7 @@ export default {
<style scoped lang="scss">
.address-form {
height: calc(100vh - 1rem);
padding: 1.3rem 0.32rem 0 0.32rem;
padding: 1.3rem 0.16rem 0 0.16rem;
background-color: #fff;
.form01{
padding: 0 .3rem;
@ -174,7 +174,7 @@ export default {
}
:deep(.van-button--block){
width: 4.4rem;
width: 6.48rem;
height: .98rem;
font-size: .36rem;
background: #5A86F4;

8
library-activity/src/views/myAddress/myAddress.vue

@ -63,7 +63,7 @@ export default {
<style scoped lang="scss">
.address-main{
height: calc(100vh - 1rem);
padding: 1.3rem 0.32rem 0 0.32rem;
padding: 1.3rem 0.16rem 0 0.16rem;
background-color: #fff;
}
.address-item{
@ -116,7 +116,7 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
border-top: 1px solid #C6C6E2;
border-top: 1px solid #f2f2f2;
padding: .2rem .24rem;
span{
display: block;
@ -155,9 +155,9 @@ export default {
}
.address-bottom{
position: fixed;
bottom: 1.2rem;
bottom: .4rem;
left: 50%;
width: 4.48rem;
width: 6.48rem;
height: .98rem;
line-height: .98rem;
transform: translateX(-50%);

78
library-activity/src/views/myLending/myLending.vue

@ -222,7 +222,7 @@
</div>
</div>
</div>
<div class="mylending-info2">
<div class="mylending-info">
<p class="lending-date">借阅开始时间2023-11-18 10:15:30</p>
<p class="lending-date">最后归还时间2023-11-18 10:15:30</p>
<p class="actual-date">实际归还时间2023-11-18 10:15:30</p>
@ -320,7 +320,7 @@
</div>
</div>
</div>
<div class="mylending-info2">
<div class="mylending-info">
<p class="lending-date">借阅开始时间2023-11-18 10:15:30</p>
<p class="lending-date">最后归还时间2023-11-18 10:15:30</p>
<p class="actual-date">实际归还时间2023-11-18 10:15:30</p>
@ -376,41 +376,41 @@ export default {
</script>
<style scoped lang="scss">
.mylending-info{
position: relative;
padding: .2rem 0 0 0;
font-size: .24rem;
line-height: .4rem;
color: #757676;
p{
padding: .04rem 0;
}
p.actual-date{
color: #FF3871;
}
.myLending-status{
position: absolute;
right: 0;
top: .36rem;
width: 1.22rem;
height: 1.07rem;
&.yq-status{
background: url('@assets/images/mylending-img1.png') no-repeat;
background-size: 100% 100%;
}
&.zs-status{
background: url('@assets/images/mylending-img2.png') no-repeat;
background-size: 100% 100%;
}
&.lq-status{
background: url('@assets/images/mylending-img3.png') no-repeat;
background-size: 100% 100%;
}
}
}
// .mylending-info{
// position: relative;
// padding: .2rem 0 0 0;
// font-size: .24rem;
// line-height: .4rem;
// color: #757676;
// p{
// padding: .04rem 0;
// }
// p.actual-date{
// color: #FF3871;
// }
// .myLending-status{
// position: absolute;
// right: 0;
// top: .36rem;
// width: 1.22rem;
// height: 1.07rem;
// &.yq-status{
// background: url('@assets/images/mylending-img1.png') no-repeat;
// background-size: 100% 100%;
// }
// &.zs-status{
// background: url('@assets/images/mylending-img2.png') no-repeat;
// background-size: 100% 100%;
// }
// &.lq-status{
// background: url('@assets/images/mylending-img3.png') no-repeat;
// background-size: 100% 100%;
// }
// }
// }
.mylending-info2{
.mylending-info{
position: relative;
margin-top: .32rem;
padding: .25rem;
@ -426,18 +426,18 @@ export default {
position: absolute;
right: .3rem;
top: .36rem;
width: 1.07rem;
width: 1.22rem;
height: 1.07rem;
&.yq-status{
background: url('@assets/images/mylending-img6.png') no-repeat;
background: url('@assets/images/mylending-img1.png') no-repeat;
background-size: 100% 100%;
}
&.zs-status{
background: url('@assets/images/mylending-img5.png') no-repeat;
background: url('@assets/images/mylending-img2.png') no-repeat;
background-size: 100% 100%;
}
&.lq-status{
background: url('@assets/images/mylending-img4.png') no-repeat;
background: url('@assets/images/mylending-img3.png') no-repeat;
background-size: 100% 100%;
}
}

16
library-activity/src/views/orderDetail/orderDetail.vue

@ -74,6 +74,10 @@
<span>收货时间</span>
<p>2023-11-18 13:56:30</p>
</div>
<div class="info-item" v-if="orderType === '4'">
<span>取消时间</span>
<p>2023-11-18 13:56:30</p>
</div>
</div>
</div>
</div>
@ -111,19 +115,19 @@ export default {
orderInfo: computed(function(){
switch(data.orderType){
case '0' :
return '已提交图书馆,耐心等待审核'
return '您的订单已提交,耐心等待审核'
break;
case '1' :
return '审核通过,马上安排发货'
return '您的订单已审核,马上安排发货'
break;
case '2' :
return '快递马上就到,请及时查收'
break;
case '3' :
return '订单已完成'
return '您的订单已完成'
break;
case '4' :
return '订单已取消'
return '您的订单已取消'
break;
}
})
@ -173,14 +177,14 @@ export default {
<style scoped lang="scss">
.order-detail{
margin-top: -2.06rem;
padding: 0 .32rem;
padding: 0 .16rem;
.detail-base{
padding: 0 0 .4rem 1.1rem ;
font-size: .28rem;
font-weight: bold;
color: #fff;
background: url('@assets/images/order-detail-img1.png') no-repeat left .1rem;
background-size: .78rem .78rem;
background-size: .79rem .79rem;
p{
font-size: .4rem;
}

12
selfServiceMachine/README.md

@ -19,16 +19,8 @@ npm run build
│ ├── assets # 主题 字体等静态资源
│ ├── router # 路由
│ ├── views # views 所有页面
│ │ ├── module
│ │ │ ├── bookDetails.vue # 书籍详情
│ │ │ ├── bookList.vue # 书籍list
│ │ │ ├── homeListItem.vue # 首页-书籍list
│ │ ├── authorRecommend.vue # 作者推荐
│ │ ├── bookRackList.vue # 本架书架
│ │ ├── digitalResource.vue # 数字资源
│ │ ├── hotBook.vue # 热门图书
│ │ ├── index.vue # 首页
│ │ ├── newBook.vue # 新书推荐
│ │ ├── bookRecommend.vue # 图书推荐
│ │ ├── onlineBookSelection.vue # 线上选书
│ ├── App.vue # 入口页面
│ ├── main.js # 入口文件 加载组件 初始化等 注意:Vue.prototype.libcode使用
├── .env.xxx # 环境变量配置

2
selfServiceMachine/public/index.html

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<link rel="icon" href="<%= BASE_URL %>logo.png">
<script>
window.onload = function() {
document.addEventListener('touchstart', function(event) {

BIN
selfServiceMachine/public/logo.png

After

Width: 40  |  Height: 40  |  Size: 1.1 KiB

BIN
selfServiceMachine/src/assets/logo.png

Before

Width: 200  |  Height: 200  |  Size: 6.7 KiB

After

Width: 40  |  Height: 40  |  Size: 1.1 KiB

30
selfServiceMachine/src/assets/styles/index.scss

@ -189,8 +189,19 @@
top: -22px;
width: 46px;
height: 50px;
background: url('~@/assets/images/img7.png') no-repeat;
background-size: 46px 50px;
&.num-one{
background: url('~@/assets/images/img7.png') no-repeat;
background-size: 46px 50px;
}
&.num-two{
background: url('~@/assets/images/img8.png') no-repeat;
background-size: 46px 50px;
}
&.num-three{
background: url('~@/assets/images/img9.png') no-repeat;
background-size: 46px 50px;
}
}
}
.book-click-num{
@ -266,6 +277,7 @@
font-size: 24px;
}
}
.el-button{
height: 56px;
font-size: 24px;
@ -314,6 +326,10 @@
color: #737475;
border-radius: 8px;
margin-right: 12px;
&.active{
background-color: #5A86F4;
color: #fff;
}
}
}
}
@ -400,7 +416,7 @@
margin-top: 14px;
padding: 4px 4px 4px 24px;
border-radius: 8px;
border: 2px solid #C6C6E2;
border: 2px solid #f2f2f2;
background: rgba(241,241,249,0.4);
.eval-num{
padding-left: 28px;
@ -511,6 +527,8 @@
}
}
.el-select-dropdown__item{
font-size: 24px !important;
height: 40px;
line-height: 40px;
}

127
selfServiceMachine/src/views/bookRecommend.vue

@ -28,10 +28,12 @@
<div class="ranking">
<h4 class="filter-header">排行榜</h4>
<el-carousel
ref="carousel"
:interval="4000"
type="card"
indicator-position="none"
height="200px"
@change="carouselChange"
>
<el-carousel-item>
<div class="ranking-img"></div>
@ -53,7 +55,7 @@
<p class="book-intro title-item">
图书简介图书简介图书简介图书简介图书简介图书简介图书
</p>
<div class="ranking-status"></div>
<div :class="carClass"></div>
</div>
<div class="book-click-num">
<span class="click-num">100</span>
@ -102,16 +104,13 @@
<div class="hot-keyword">
<p>热门检索</p>
<div class="keyword-item">
<span>人工智能</span>
<span>遥遥领先</span>
<span>ChatAPT</span>
<span>5G</span>
<span :class="{ 'active': keyWordIndex === index }" v-for="(item,index) in keywordData" :key="index" @click="selectKeyWord(index)">{{ item }}</span >
</div>
</div>
</div>
<div class="recommend-list">
<div class="recommend-list" @scroll="listenScroll">
<div class="result">检索结果<span>121</span></div>
<div class="recommend-item" v-for="item in 10">
<div class="recommend-item" v-for="item in count">
<div class="book-detail">
<div class="book-img">
<img src="" alt="" />
@ -145,11 +144,13 @@
<div class="to-book-more" @click="detailShow=true">查看详情</div>
</div>
</div>
<div v-if="!hasNextPage">人家是有底线的</div>
<div v-else>加载中...</div>
</div>
</div>
</div>
</div>
<!-- 图书详情dialog -->
<el-dialog class="detail-dialog" append-to-body :close-on-click-modal="false" :modal-append-to-body="false" :visible.sync="detailShow">
<div class="dialog-book">
<div class="book-detail">
@ -258,17 +259,119 @@ export default {
}
],
publishDate:[2023,2022,2021,2020,2019,2018],
keywordData:['人工智能','遥遥领先','ChatAPT','5G'],
selectedIndex: null,
selectedDateIndex: null
selectedDateIndex: null,
keyWordIndex: null,
carIndex: 0,
count: 10,
scrolly: '', //
pageIndex: 1,
hasNextPage: false,
totalPages: 0
}
},
created() {},
computed: {
carClass() {
if (this.carIndex === 0) {
return 'ranking-status num-one';
} else if (this.carIndex === 1) {
return 'ranking-status num-two';
} else if (this.carIndex === 2) {
return 'ranking-status num-three';
} else {
return 'ranking-status';
}
}
},
mounted(){
this.$refs.carousel.$el.addEventListener('current-change', this.carouselChange)
},
methods: {
GetBookBasePages(ClassId,Order,pageIndex) {
// const that = proxy;
// that.ClassId = ClassId;
// that.Order = Order;
// that.pageIndex = pageIndex;
// that.$http.get(proxy.$API.GETBOOKBASEPAGES, {
// params: {
// ClassId: ClassId, //
// MarkRec: '',
// Where: '',
// Order: Order,
// pageIndex: pageIndex,
// pageSize: 20
// }
// })
// .then(res => {
// if (res.type == 200) {
// let resData = res.data;
// that.hasNextPage = res.hasNextPage;
// that.totalPages = res.pages;
// if (that.pageIndex <= 1) {
// that.bookList = resData;
// // if (resData.length < 20) {
// // that.hasNextPage = true
// // }
// } else {
// that.bookList = that.bookList.concat(resData)
// }
// } else {
// Toast(res.content);
// }
// })
// .catch(res => {
// console.log(res);
// });
},
//
listenScroll (e) {
let ele = e.srcElement ? e.srcElement : e.target;
if (ele.scrollTop + ele.offsetHeight > ele.scrollHeight - 100) { //div
this.addMoreData();
}
//-breadcrumb2
if (this.scrolly != ele.scrollTop) {
this.isScroll = false;
}
this.scrolly = ele.scrollTop;
if (ele.scrollTop == 0) {
this.isScroll = true;
}
},
//
addMoreData () {
if (this.hasNextPage) {
this.pageIndex++;
if(this.pageIndex > this.totalPages){
return false;
}
this.GetBookBasePages()
}
},
selectPublic(index){
this.selectedIndex = index
if (this.selectedIndex === index) {
this.selectedIndex = null;
} else {
this.selectedIndex = index;
}
},
selectDate(index){
this.selectedDateIndex = index
if (this.selectedDateIndex === index) {
this.selectedDateIndex = null;
} else {
this.selectedDateIndex = index;
}
},
selectKeyWord(index){
if (this.keyWordIndex === index) {
this.keyWordIndex = null;
} else {
this.keyWordIndex = index;
}
},
carouselChange(val) {
this.carIndex = val
}
}
}

222
selfServiceMachine/src/views/module/bookDetails.vue

@ -1,222 +0,0 @@
<template>
<div>
<el-dialog title="图书详情" :visible.sync="dialogVisible" width="80%">
<!-- :before-close="handleClose" -->
<div class="dialog-setting">
<div v-if="bookData" class="book-details-box">
<div class="book-details">
<div class="book-cover">
<img :src="bookData.srcUrl ? bookData.srcUrl : ''" :onerror="defaultImg" />
</div>
<div class="book-desc">
<h3>{{ bookData.bookName }}</h3>
<p class="book-from">作者{{ bookData.bookAuthor }}</p>
<p v-if="bookData.Publish" class="book-from">出版社{{ bookData.Publish }}</p>
<p class="book-brief"> 简介{{ bookData.gist ? bookData.gist : '暂无简介' }}</p>
</div>
</div>
<div class="book-local">
<!-- <span v-if="bookData.bookPlace">所在位置{{ bookData.bookPlace }}</span> -->
<!-- 待定热门图书/新书推荐跳转到 场馆导航操作 -->
<!-- <span v-else>所在位置</span> -->
<div class="local-title">
所在位置
</div>
<ul class="local-list">
<li v-if="!bookData.places[0]?.shelfName" class="local-none">
<!-- <svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-weizhi" />
</svg> -->
<span>当前图书暂未查到位置信息</span>
</li>
<!-- -->
<li v-for="(item,index) in bookData.places" v-else :key="index" class="local-list-info" @click="toBookNav(index)">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-weizhi" />
</svg>
<span>{{ item.shelfName }}</span>
</li>
</ul>
</div>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'BookDetails',
data() {
return {
dialogVisible: false,
bookData: null,
defaultImg: 'this.src="' + require('@/assets/images/default-img.png') + '"'
}
},
created() {
},
methods: {
toBookNav(index) {
const linkSrc = process.env.VUE_APP_BASE_API
window.location.href = linkSrc + '/anchoring/goNavigation.do?libcode=' + this.libcode + '&barcode=' + this.bookData.places[index].barcode
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-dialog {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
border-radius: 24px;
margin-top: 0 !important;
.el-dialog__body {
padding: 0 40px 40px 40px;
}
}
::v-deep .el-dialog__header {
text-align: center;
padding-top: 0;
padding-bottom: 4px;
.el-dialog__title {
display: inline-block;
font-family: "ZhenyanGB";
font-size: 40px;
width: 494px;
height: 76px;
line-height: 76px;
background: url("~@/assets/images/list/list-title.png") no-repeat 0 0;
}
}
::v-deep .el-dialog__headerbtn {
background-color: #3f92f6;
width: 40px;
height: 40px;
border-radius: 50%;
.el-dialog__close {
color: #fff;
font-size: 30px;
}
}
.book-details-box {
.book-details {
display: flex;
justify-content: space-between;
padding: 30px 0;
.book-cover {
display: flex;
align-items: center;
width: 318px;
height: 382px;
margin-right: 40px;
overflow: hidden;
img {
display: block;
width: 100%;
max-height: calc(100%);
object-fit: contain;
}
}
.book-desc {
flex: 1;
color: #333;
overflow: hidden;
h3 {
font-size: 40px;
font-weight: normal;
}
.book-from {
width: 100%;
font-size: 30px;
}
h3,
.book-from {
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
margin-bottom: 20px;
}
.book-brief {
font-size: 24px;
margin-bottom: 20px;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 4;
line-clamp: 4;
-webkit-box-orient: vertical;
}
}
}
.book-local {
height: 343px;
color: #333;
display: flex;
// border-radius: 52px;
// line-height: 64px;
// text-align: center;
// font-size: 30px;
// overflow: hidden;
// white-space: nowrap;
// text-overflow: ellipsis;
.local-title {
width: 83px;
height: 100%;
background: url("~@/assets/images/local-bg.png") no-repeat;
writing-mode: vertical-rl;
text-align: center;
line-height: 83px;
font-size: 30px;
color: #fff;
}
.local-list {
flex: 1;
border: 1px solid #3f92f6;
border-left: none;
background: #d0e0f9;
overflow: hidden;
overflow-y: auto;
position: relative;
font-size: 26px;
.local-list-info {
height: 56px;
line-height: 56px;
background-color: #fff;
// margin-right: 8px;
margin-bottom: 15px;
padding-left: 13px;
span {
margin-left: 19px;
}
}
.local-none {
width: 100%;
text-align: center;
position: absolute;
// left: 50%;
top: 50%;
transform: translateY(-50%);
}
}
}
}
/**滚动条的宽度*/
::-webkit-scrollbar {
width: 8px;
height: 4px;
}
//
::-webkit-scrollbar-thumb {
background-color: #3f92f6;
border-radius: 4px;
}
</style>

134
selfServiceMachine/src/views/module/bookList.vue

@ -1,134 +0,0 @@
<template>
<div v-loading.fullscreen.lock="bookLoading" class="hotbook-box" @scroll="lazyLoading">
<div v-if="bookList.length > 0" class="most-book" @click="handleDetails(0)">
<div class="most-book-img">
<img :src="bookData[0].cover ? bookData[0].cover : ''" :onerror="defaultImg" />
</div>
<div class="most-book-txt book-rack">
<div class="txt">
<h3>书名{{ bookData[0].nbName || bookData[0].hbName }}</h3>
<p>作者{{ bookData[0].nbAuthor || bookData[0].hbAuthor }}</p>
<p>出版社{{ bookData[0].nbAuthor || bookData[0].hbAuthor }}</p>
<p>出版时间{{ bookData[0].nbPublisherdate || bookData[0].hbPublisherdate }}</p>
</div>
</div>
</div>
<ul class="hotbook-list">
<li v-for="(item,index) in bookList" :key="index" @click="handleDetails(index+1)">
<div class="other-list-img">
<img :src="item.cover ? item.cover : ''" :onerror="defaultImg" />
</div>
<p class="book-name">{{ item.nbName || item.hbName }}</p>
</li>
</ul>
<BookDetails ref="detailDom" />
</div>
</template>
<script>
import BookDetails from './bookDetails.vue'
import { bookListCrud } from '../mixins/booklist.js'
export default {
name: 'BookList',
components: { BookDetails },
mixins: [bookListCrud],
data() {
return {
}
},
created() {
this.getBookData()
},
mounted() {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
@import "~@/assets/styles/index.scss";
.hotbook-box{
overflow: hidden;
overflow-y: auto;
height: calc(100vh - 210px);
}
.book-rack{
margin: 160px 40px 28px 40px;
padding: 38px 40px 40px 400px;
height: 272px;
}
.most-book{
position: relative;
.most-book-img{
position: absolute;
left: 90px;
bottom: 20px;
width: 318px;
height: 382px;
display: flex;
align-items: center;
overflow: hidden;
img{
display: block;
width: 100%;
vertical-align: middle;
object-fit: contain;
}
}
.txt{
// margin-left: 452px;
color: #333;
h3{
font-size: 40px;
font-weight: normal;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
p{
font-size: 30px;
margin-top: 8px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
}
.hotbook-list{
margin: 0 40px;
display: flex;
flex-wrap: wrap;
// justify-content: space-between;
li{
margin-bottom: 20px;
margin-left: 20px;
width: 300px;
overflow: hidden;
.other-list-img{
display: flex;
align-items: center;
width: 100%;
height: 360px;
overflow: hidden;
}
img{
display: block;
width: 100%;
max-height: calc(100%);
vertical-align: middle;
object-fit: contain;
}
.book-name{
width: 100%;
text-align: center;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
}
& li:nth-child(3n+1){
margin-left: 0;
}
}
</style>

51
selfServiceMachine/src/views/module/headerTop.vue

@ -1,51 +0,0 @@
<template>
<div class="header-time">
<div class="header-text header-date">{{ nowDate }}</div>
<span class="icon iconfont">&#xe634;</span>
</div>
</template>
<script>
import { getCurrentTime } from '@/utils/index'
export default {
name: 'HeaderTop',
data() {
return {
nowDate: ''
}
},
created() {
this.timer = setInterval(() => {
this.nowDate = getCurrentTime()
}, 1000)
},
mounted() {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.header-time{
display: flex;
justify-content: space-between;
position: absolute;
top: 0;
left: 0;
background-color: #3F92F6;
width: 100%;
height: 60px;
line-height: 60px;
font-size: 30px;
color: #fff;
padding: 0 40px;
span{
width: 35px;
height: 45px;
font-size: 30px;
z-index: 1;
}
}
</style>

97
selfServiceMachine/src/views/module/homeListItem.vue

@ -1,97 +0,0 @@
<template>
<div>
<div :class="[isNewBook ? 'list-small' : (isOtherBook ? 'list-middle' : 'list-big') ]">
<div v-for="(item,index) in listData" :key="item.ranking" class="list-item" @click="handleDetails(index)">
<div class="book-img">
<img :src="item.cover" :onerror="defaultImg" />
</div>
<div class="book-info">
<h4 :class="['book-title', {'title-item': !isOtherBook}]">{{ item.nbName }}</h4>
<p class="book-author">{{ item.nbAuthor }}</p>
<div v-if="!isNewBook" class="book-num">
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-remen" />
</svg>
<p>{{ item.num }}</p>
</div>
</div>
</div>
</div>
<BookDetails ref="detailDom" />
</div>
</template>
<script>
import { getBookDetailsByISBN } from '@/api/bookshelf'
import BookDetails from './bookDetails.vue'
export default {
name: 'BookListItem',
components: { BookDetails },
props: {
listData: {
type: Array,
default: function() {
return []
}
},
isOtherBook: {
type: Boolean,
default: function() {
return false
}
},
isNewBook: {
type: Boolean,
default: function() {
return false
}
}
},
data() {
return {
defaultImg: 'this.src="' + require('@/assets/images/default-img.png') + '"'
}
},
watch: {
listData: function(newValue, oldValue) {
},
isOtherBook: function(newValue, oldValue) {
},
isNewBook: function(newValue, oldValue) {
}
},
created() {
},
mounted() {
},
methods: {
handleDetails(index) {
const params = {
isbn: this.listData[index].isbn.replace(/\-/g, '')
}
getBookDetailsByISBN(params).then(res => {
this.$refs.detailDom.dialogVisible = true
if (res) {
this.$refs.detailDom.bookData = res
} else {
this.$refs.detailDom.bookData = {
srcUrl: this.listData[index].cover,
bookName: this.listData[index].nbName,
bookAuthor: this.listData[index].nbAuthor ? this.listData[index].nbAuthor : '暂无信息',
gist: '暂无简介',
Publish: '暂无信息',
places: [
{ shelfName: '' }
]
}
}
})
}
}
}
</script>
<style lang="scss">
@import "~@/assets/styles/index.scss";
</style>
Loading…
Cancel
Save