Browse Source

feat: 样式调整;

pull/7/head
Fox-33 2 weeks ago
parent
commit
096592c28d
11 changed files with 170 additions and 348 deletions
  1. +42
    -83
      pages/index/case.vue
  2. +20
    -66
      pages/index/center.vue
  3. +67
    -149
      pages/index/index.vue
  4. +28
    -33
      pages/index/serve.vue
  5. +1
    -1
      pages_order/case/index.vue
  6. +1
    -1
      pages_order/case/poster.vue
  7. +1
    -1
      pages_order/serve/index.vue
  8. +1
    -1
      pages_order/thesis/index.vue
  9. +1
    -1
      pages_order/thesis/indexTwo.vue
  10. +5
    -9
      pages_order/thesis/poster.vue
  11. +3
    -3
      pages_order/thesis/search.vue

+ 42
- 83
pages/index/case.vue View File

@ -1,57 +1,46 @@
<template>
<view class="page__view">
<view class="bg"></view>
<view class="main">
<view class="header">
<view class="title">
{{ configList.config_name }}
</view>
<view class="desc">
<view class="desc-line"></view>
{{ configList.config_name_en }}
</view>
</view>
<view class="bg">
<image class="img" :src="configList.config_image_page_header" mode="scaleToFill"></image>
</view>
<!-- 搜索栏 -->
<view class="search">
<uv-search v-model="keyword" placeholder="输入关键词搜索" bgColor="#FBFBFB" @custom="search" @search="search">
<template #prefix>
<image class="search-icon" src="@/static/image/icon-search.png" mode="widthFix"></image>
</template>
</uv-search>
</view>
<!-- 搜索栏 -->
<view class="search">
<uv-search v-model="keyword" placeholder="输入关键词搜索" bgColor="#FBFBFB" @custom="search" @search="search">
<template #prefix>
<image class="search-icon" src="@/static/image/icon-search.png" mode="widthFix"></image>
</template>
</uv-search>
</view>
<!-- 轮播图 -->
<view class="swiper">
<uv-swiper :list="bannerList" keyName="image" indicator indicatorMode="dot" indicatorActiveColor="#4883F9" indicatorInactiveColor="#FFFFFF" :height="swiperHeight"></uv-swiper>
</view>
<!-- 轮播图 -->
<view class="swiper">
<uv-swiper :list="bannerList" keyName="image" indicator indicatorMode="dot" indicatorActiveColor="#4883F9" indicatorInactiveColor="#FFFFFF" :height="swiperHeight"></uv-swiper>
</view>
<view class="flex filter">
<view class="filter-item">
<suspendDropdown v-model="queryParams.categoryServiceId" label="服务分类筛选" :options="serviceOptions" @change="onFilterChange"></suspendDropdown>
</view>
<view class="filter-item">
<suspendDropdown v-model="queryParams.categoryMajorId" label="专业筛选" :options="majorOptions" @change="onFilterChange"></suspendDropdown>
</view>
<view class="filter-item">
<suspendDropdown v-model="queryParams.categoryPeriodId" label="阶段筛选" :options="periodOptions" @change="onFilterChange"></suspendDropdown>
</view>
<view class="flex filter">
<view class="filter-item">
<suspendDropdown v-model="queryParams.categoryServiceId" label="服务分类筛选" :options="serviceOptions" @change="onFilterChange"></suspendDropdown>
</view>
<view class="filter-item">
<suspendDropdown v-model="queryParams.categoryMajorId" label="专业筛选" :options="majorOptions" @change="onFilterChange"></suspendDropdown>
</view>
<view class="filter-item">
<suspendDropdown v-model="queryParams.categoryPeriodId" label="阶段筛选" :options="periodOptions" @change="onFilterChange"></suspendDropdown>
</view>
</view>
<view class="list">
<template v-if="total">
<view class="list-item" v-for="item in list" :key="item.id" @click="jumpToDetail(item.id)">
<image class="img" :src="item.image" mode="aspectFill"></image>
</view>
</template>
<template v-else>
<view class="flex empty">
<image class="empty-icon" src="@/static/image/icon-empty.png" mode="widthFix"></image>
</view>
<view class="list">
<template v-if="total">
<view class="list-item" v-for="item in list" :key="item.id" @click="jumpToDetail(item.id)">
<image class="img" :src="item.image" mode="aspectFill"></image>
</view>
</template>
</view>
<template v-else>
<view class="flex empty">
<image class="empty-icon" src="@/static/image/icon-empty.png" mode="widthFix"></image>
</view>
</template>
</view>
<tabber select="case" />
@ -146,47 +135,17 @@
</script>
<style scoped lang="scss">
.bg {
width: 100%;
// height: 438rpx;
height: 488rpx;
background-image: linear-gradient(#4883F9, #4883F9, #4883F9, #FCFDFF);
.page__view {
padding-bottom: 182rpx;
}
.main {
position: absolute;
top: 0;
left: 0;
.bg {
width: 100%;
// padding: 192rpx 0 182rpx 0;
padding: 100rpx 0 182rpx 0;
}
.header {
margin-left: 44rpx;
.title {
position: relative;
letter-spacing: 6rpx;
font-size: 46rpx;
font-weight: 700;
color: #FFFFFF;
}
height: 264rpx;
.desc {
position: relative;
font-size: 30rpx;
// font-weight: 700;
color: #FFFFFF;
margin: 4rpx 0 22rpx 0;
display: inline-block;
&-line {
margin-bottom: 6rpx;
width: 100%;
height: 11rpx;
background: linear-gradient(to right, #ffffff, #4883f9);
}
.img {
width: 100%;
height: 100%;
}
}


+ 20
- 66
pages/index/center.vue View File

@ -1,34 +1,24 @@
<template>
<view class="page__view">
<view class="bg"></view>
<view class="main">
<view class="bg">
<image class="img" :src="configList.config_image_page_header" mode="scaleToFill"></image>
</view>
<view class="header">
<view class="title">
<view class="title-text">{{ configList.config_name }}</view>
<view class="title-line"></view>
</view>
<view class="desc">{{ configList.config_desc }}</view>
</view>
<!-- 轮播图 -->
<view class="section swiper">
<uv-swiper :list="bannerList" keyName="image" indicator indicatorMode="dot" indicatorActiveColor="#4883F9" indicatorInactiveColor="#FFFFFF" height="424rpx"></uv-swiper>
</view>
<!-- 轮播图 -->
<view class="section swiper">
<uv-swiper :list="bannerList" keyName="image" indicator indicatorMode="dot" indicatorActiveColor="#4883F9" indicatorInactiveColor="#FFFFFF" height="424rpx"></uv-swiper>
</view>
<view class="list">
<view class="list-item" @click="jumpToDetail('other_service')">
<image class="list-item-bg" :src="configList.config_image_service" mode="scaleToFill"></image>
<!-- <view class="list-item-fg">
<view class="title">其他服务</view>
<view class="desc">Other services</view>
</view> -->
</view>
<view class="list">
<view class="list-item" @click="jumpToDetail('other_service')">
<image class="list-item-bg" :src="configList.config_image_service" mode="scaleToFill"></image>
<!-- <view class="list-item-fg">
<view class="title">其他服务</view>
<view class="desc">Other services</view>
</view> -->
</view>
</view>
<tabber select="center" />
</view>
</template>
@ -67,50 +57,14 @@
</script>
<style scoped lang="scss">
.bg {
width: 100%;
height: 438rpx;
background-image: linear-gradient(#4883F9, #4883F9, #4883F9, #FCFDFF);
}
.main {
position: absolute;
top: 0;
left: 0;
.bg {
width: 100%;
padding: 156rpx 0 182rpx 0;
}
.header {
.title {
margin-left: 25rpx;
position: relative;
padding: 51rpx 0 6rpx 42rpx;
&-line {
width: 151rpx;
height: 11rpx;
background: linear-gradient(76deg,#ffffff 2%, #4883f9 88%);
border-radius: 6rpx;
}
&-text {
position: absolute;
top: 0;
left: 0;
font-size: 46rpx;
font-weight: 700;
color: #FFFFFF;
}
}
height: 264rpx;
.desc {
font-size: 30rpx;
font-weight: 700;
color: #FFFFFF;
margin: 14rpx 28rpx 32rpx 28rpx;
.img {
width: 100%;
height: 100%;
}
}


+ 67
- 149
pages/index/index.vue View File

@ -1,66 +1,54 @@
<template>
<view class="page__view">
<view class="bg"></view>
<view class="bg">
<image class="img" :src="configList.config_image_page_header" mode="scaleToFill"></image>
</view>
<view class="main">
<!-- 搜索栏 -->
<view class="section search">
<uv-search v-model="keyword" placeholder="输入关键词搜索" bgColor="#FBFBFB" @custom="search" @search="search">
<template #prefix>
<image class="search-icon" src="@/static/image/icon-search.png" mode="widthFix"></image>
</template>
</uv-search>
</view>
<view class="header">
<view class="title">
{{ configList.config_name }}
</view>
<view class="desc">
<view class="desc-line"></view>
{{ configList.config_name_en }}
</view>
</view>
<!-- 轮播图 -->
<view class="section swiper">
<uv-swiper :list="bannerList" keyName="image" indicator indicatorMode="dot" indicatorActiveColor="#4883F9" indicatorInactiveColor="#FFFFFF" :height="swiperHeight"></uv-swiper>
</view>
<!-- 搜索栏 -->
<view class="section search">
<uv-search v-model="keyword" placeholder="输入关键词搜索" bgColor="#FBFBFB" @custom="search" @search="search">
<template #prefix>
<image class="search-icon" src="@/static/image/icon-search.png" mode="widthFix"></image>
</template>
</uv-search>
</view>
<!-- 轮播图 -->
<view class="section swiper">
<uv-swiper :list="bannerList" keyName="image" indicator indicatorMode="dot" indicatorActiveColor="#4883F9" indicatorInactiveColor="#FFFFFF" :height="swiperHeight"></uv-swiper>
</view>
<view class="section card" v-for="group in list" :key="group.id">
<view class="card-header">
<view class="card-header-title">{{ group.title }}</view>
<view class="card-header-tag">JGYT</view>
</view>
<view class="section card" v-for="group in list" :key="group.id">
<view class="card-header">
<view class="card-header-title">{{ group.title }}</view>
<!-- <view class="card-header-tag">JGYT</view> -->
</view>
<view class="card-content">
<view class="card-item card-row" v-for="item in group.children" :key="item.id">
<view class="flex info">
<image class="info-icon" :src="item.image" mode="widthFix"></image>
<view class="info-label">{{ item.title }}</view>
</view>
<button class="btn" @click="jumpToCategory(group.id, item.id, item.title, 'queryThesisList')">查看</button>
<view class="card-content">
<view class="card-item card-row" v-for="item in group.children" :key="item.id">
<view class="flex info">
<image class="info-icon" :src="item.image" mode="widthFix"></image>
<view class="info-label">{{ item.title }}</view>
</view>
<button class="btn" @click="jumpToCategory(group.id, item.id, item.title, 'queryThesisList')">查看</button>
</view>
</view>
<view class="section card" v-for="group in list2" :key="group.id">
<view class="card-header">
<view class="card-header-title">{{ group.title }}</view>
<view class="card-header-tag">JGYT</view>
</view>
</view>
<view class="section card" v-for="group in list2" :key="group.id">
<view class="card-header">
<view class="card-header-title">{{ group.title }}</view>
<!-- <view class="card-header-tag">JGYT</view> -->
</view>
<view class="card-content">
<view class="card-box">
<view class="card-item info" v-for="item in group.children" :key="item.id" @click="jumpToCategory(group.id, item.id, item.title, 'queryThesisTwoList')">
<image class="info-icon" :src="item.image" mode="widthFix"></image>
<view class="info-label">{{ item.title }}</view>
</view>
<view class="card-content">
<view class="card-box">
<view class="card-item info" v-for="item in group.children" :key="item.id" @click="jumpToCategory(group.id, item.id, item.title, 'queryThesisTwoList')">
<image class="info-icon" :src="item.image" mode="widthFix"></image>
<view class="info-label">{{ item.title }}</view>
</view>
</view>
</view>
</view>
@ -94,65 +82,33 @@
this.getData()
},
methods: {
transformData(records) {
let groups = []
records.forEach(record => {
if (record.hasChild == 1) {
const { id, title, createTime } = record
const index = groups.findIndex(group => group.id === id)
if (index === -1) {
groups.push({ id, title, createTime, children: [] })
} else {
groups[index].title = title
groups[index].createTime = createTime
}
} else {
const { pid, id, title, image, createTime } = record
const index = groups.findIndex(group => group.id === pid)
const item = { id, title, image, createTime }
if (index === -1) {
groups.push({ id: pid, children: [item] })
} else {
groups[index].children.push(item)
}
}
})
groups.forEach(group => {
let { children } = group
children.sort((a, b) => new Date(a.createTime).getTime() - new Date(b.createTime).getTime())
group.children = children
})
groups.sort((a, b) => new Date(a.createTime).getTime() - new Date(b.createTime).getTime())
return groups
},
async fetchCategoryThesisList() {
try {
let records = (await this.$fetch('queryCategoryThesisList', { pageNo: 1, pageSize: 1000 }))?.records
this.list = this.transformData(records)
} catch (err) {
//
async fetchBanner() {
try {
this.bannerList = (await this.$fetch('queryBannerList', { type: '0' }))?.records // type0- 1- 2- 3-
} catch (err) {
}
},
async fetchCategoryThesisTwoList() {
}
},
async fetchCategory(api) {
try {
let records = (await this.$fetch('queryCategoryThesisTwoList', { pageNo: 1, pageSize: 1000 }))?.records
this.list2 = this.transformData(records)
} catch (err) {
let parents = (await this.$fetch(api, { pageNo: 1, pageSize: 1000 }))?.records?.filter(item => item.hasChild == '1')
let results = await Promise.allSettled(parents.map(parent => { return this.$fetch(api, { pid: parent.id, pageNo: 1, pageSize: 1000 }) }))
results.forEach((result, index) => {
parents[index].children = result?.value?.records || []
})
return parents
} catch (err) {
return []
}
},
getData() {
this.fetchCategoryThesisList()
this.fetchCategoryThesisTwoList()
async getData() {
this.list = await this.fetchCategory('queryCategoryThesisList')
this.list2 = await this.fetchCategory('queryCategoryThesisTwoList')
},
search() {
uni.navigateTo({
@ -160,14 +116,6 @@
})
this.keyword = ''
},
//
async fetchBanner() {
try {
this.bannerList = (await this.$fetch('queryBannerList', { type: '0' }))?.records // type0- 1- 2- 3-
} catch (err) {
}
},
jumpToCategory(categoryOne, categoryTwo, title, api) {
uni.navigateTo({
url: `/pages_order/thesis/search?categoryOne=${categoryOne}&categoryTwo=${categoryTwo}&title=${title}&api=${api}`
@ -178,47 +126,17 @@
</script>
<style scoped lang="scss">
.bg {
width: 100%;
// height: 438rpx;
height: 488rpx;
background-image: linear-gradient(#4883F9, #4883F9, #4883F9, #FCFDFF);
.page__view {
padding-bottom: 182rpx;
}
.main {
position: absolute;
top: 0;
left: 0;
.bg {
width: 100%;
// padding: 192rpx 0 182rpx 0;
padding: 100rpx 0 182rpx 0;
}
.header {
margin-left: 44rpx;
.title {
position: relative;
letter-spacing: 6rpx;
font-size: 46rpx;
font-weight: 700;
color: #FFFFFF;
}
height: 264rpx;
.desc {
position: relative;
font-size: 30rpx;
// font-weight: 700;
color: #FFFFFF;
margin: 4rpx 0 22rpx 0;
display: inline-block;
&-line {
margin-bottom: 6rpx;
width: 100%;
height: 11rpx;
background: linear-gradient(to right, #ffffff, #4883f9);
}
.img {
width: 100%;
height: 100%;
}
}


+ 28
- 33
pages/index/serve.vue View File

@ -1,41 +1,31 @@
<template>
<view class="page__view">
<view class="bg"></view>
<view class="bg">
<image class="img" :src="configList.config_image_page_header" mode="scaleToFill"></image>
</view>
<view class="main">
<!-- 轮播图 -->
<view class="section swiper">
<uv-swiper :list="bannerList" keyName="image" indicator indicatorMode="dot" indicatorActiveColor="#4883F9" indicatorInactiveColor="#FFFFFF" height="424rpx"></uv-swiper>
</view>
<view class="header">
<view class="title">
<view class="title-text">{{ configList.config_name }}</view>
<view class="title-line"></view>
</view>
<view class="desc">{{ configList.config_desc }}</view>
<view class="list">
<view class="list-item" @click="jumpToDetail('academic_advising')">
<image class="list-item-bg" :src="configList.config_image_advising" mode="scaleToFill"></image>
<!-- <view class="list-item-fg">
<view class="title">学术辅导</view>
<view class="desc">Academic Advising</view>
</view> -->
</view>
<!-- 轮播图 -->
<view class="section swiper">
<uv-swiper :list="bannerList" keyName="image" indicator indicatorMode="dot" indicatorActiveColor="#4883F9" indicatorInactiveColor="#FFFFFF" height="424rpx"></uv-swiper>
</view>
<view class="list">
<view class="list-item" @click="jumpToDetail('academic_advising')">
<image class="list-item-bg" :src="configList.config_image_advising" mode="scaleToFill"></image>
<!-- <view class="list-item-fg">
<view class="title">学术辅导</view>
<view class="desc">Academic Advising</view>
</view> -->
</view>
<view class="list-item" @click="jumpToDetail('thesis_submission')">
<image class="list-item-bg" :src="configList.config_image_submission" mode="scaleToFill"></image>
<!-- <view class="list-item-fg">
<view class="title">论文投递</view>
<view class="desc">Paper submission</view>
</view> -->
</view>
<view class="list-item" @click="jumpToDetail('thesis_submission')">
<image class="list-item-bg" :src="configList.config_image_submission" mode="scaleToFill"></image>
<!-- <view class="list-item-fg">
<view class="title">论文投递</view>
<view class="desc">Paper submission</view>
</view> -->
</view>
</view>
<tabber select="serve" />
</view>
</template>
@ -74,10 +64,15 @@
</script>
<style scoped lang="scss">
.bg {
width: 100%;
height: 438rpx;
background-image: linear-gradient(#4883F9, #4883F9, #4883F9, #FCFDFF);
height: 264rpx;
.img {
width: 100%;
height: 100%;
}
}
.main {


+ 1
- 1
pages_order/case/index.vue View File

@ -2,7 +2,7 @@
<view :class="['page__view', hasPoster ? 'with-bottom' : '']">
<!-- 导航栏 -->
<navbar :title="details.title" leftClick @leftClick="$utils.navigateBack" bgColor="#4883F9" color="#FFFFFF" />
<navbar :title="details.title" leftClick @leftClick="$utils.navigateBack" />
<view class="cover-image" :style="{ height: coverImageHeight }">
<image class="img" :src="details.paperImage" mode="scaleToFill" ></image>


+ 1
- 1
pages_order/case/poster.vue View File

@ -2,7 +2,7 @@
<view class="page__view">
<!-- 导航栏 -->
<navbar leftClick @leftClick="$utils.navigateBack" bgColor="#4883F9" color="#FFFFFF" />
<navbar leftClick @leftClick="$utils.navigateBack" />
<view style="width: 750rpx; height: 1184rpx; overflow: hidden;">
<canvas id="myCanvas" canvas-id="firstCanvas1" type="2d" style="width: 100%; height: 100%;"></canvas>


+ 1
- 1
pages_order/serve/index.vue View File

@ -2,7 +2,7 @@
<view class="page__view">
<!-- 导航栏 -->
<navbar :title="details.paramDesc" leftClick @leftClick="$utils.navigateBack" bgColor="#4883F9" color="#FFFFFF" />
<navbar :title="details.paramDesc" leftClick @leftClick="$utils.navigateBack" />
<image class="img" :src="details.details" mode="widthFix"></image>


+ 1
- 1
pages_order/thesis/index.vue View File

@ -2,7 +2,7 @@
<view :class="['page__view', hasPoster ? 'with-bottom' : '']">
<!-- 导航栏 -->
<navbar :title="details.title" leftClick @leftClick="$utils.navigateBack" bgColor="#4883F9" color="#FFFFFF" />
<navbar :title="details.title" leftClick @leftClick="$utils.navigateBack" />
<view class="cover-image" :style="{ height: coverImageHeight }">
<image class="img" :src="details.image" mode="scaleToFill" ></image>


+ 1
- 1
pages_order/thesis/indexTwo.vue View File

@ -2,7 +2,7 @@
<view :class="['page__view', hasPoster ? 'with-bottom' : '']">
<!-- 导航栏 -->
<navbar :title="details.title" leftClick @leftClick="$utils.navigateBack" bgColor="#4883F9" color="#FFFFFF" />
<navbar :title="details.title" leftClick @leftClick="$utils.navigateBack" />
<view class="cover-image" :style="{ height: coverImageHeight }">
<image class="img" :src="details.image" mode="scaleToFill" ></image>


+ 5
- 9
pages_order/thesis/poster.vue View File

@ -2,10 +2,9 @@
<view class="page__view">
<!-- 导航栏 -->
<navbar leftClick @leftClick="$utils.navigateBack" bgColor="#4883F9" color="#FFFFFF" />
<navbar leftClick @leftClick="$utils.navigateBack" />
<!-- height: 1184rpx; -->
<view style="width: 750rpx; height: 890rpx; overflow: hidden;">
<view style="width: 750rpx; height: 1184rpx; overflow: hidden;">
<canvas id="myCanvas" canvas-id="firstCanvas1" type="2d" style="width: 100%; height: 100%;"></canvas>
</view>
@ -89,18 +88,15 @@
paperImage.src = this.posterData.paperImage
paperImage.onload = () => {
const w = 750 * Ratio / dpr
// const h = 1184 * Ratio / dpr
const h = 890 * Ratio / dpr
const h = 1184 * Ratio / dpr
ctx.drawImage(paperImage, 0, 0, w, h)
//
const coderImage = canvas.createImage()
coderImage.src = this.wxCodeImage
coderImage.onload = () => {
// const x = 539 * Ratio / dpr
const x = 560 * Ratio / dpr
// const y = 987 * Ratio / dpr
const y = 693 * Ratio / dpr
const x = 539 * Ratio / dpr
const y = 987 * Ratio / dpr
const size = 162 * Ratio / dpr
ctx.drawImage(coderImage, x, y, size, size)


+ 3
- 3
pages_order/thesis/search.vue View File

@ -2,7 +2,7 @@
<view class="page__view">
<!-- 导航栏 -->
<navbar :title="title" leftClick @leftClick="$utils.navigateBack" bgColor="#4883F9" color="#FFFFFF" />
<navbar :title="title" leftClick @leftClick="$utils.navigateBack" />
<view class="top">
@ -108,7 +108,6 @@
.top {
padding: 49rpx 0 17rpx 0;
box-sizing: border-box;
background: $uni-color;
}
.search {
@ -232,8 +231,9 @@
box-sizing: border-box;
.img {
$w: 225rpx;
width: 225rpx;
height: 325rpx;
height: calc(#{$w} * 1184 / 750);
}
}
}


Loading…
Cancel
Save