#7 feat: 样式调整;

Merged
Fox merged 3 commits from fox into master 2 weeks ago
  1. +21
    -0
      api/model/serve.js
  2. +1
    -1
      common.scss
  3. +6
    -0
      pages.json
  4. +42
    -83
      pages/index/case.vue
  5. +20
    -66
      pages/index/center.vue
  6. +64
    -146
      pages/index/index.vue
  7. +32
    -35
      pages/index/serve.vue
  8. +1
    -1
      pages_order/case/index.vue
  9. +1
    -1
      pages_order/case/poster.vue
  10. +41
    -0
      pages_order/center/serve.vue
  11. +80
    -0
      pages_order/serve/category.vue
  12. +5
    -5
      pages_order/serve/index.vue
  13. +88
    -0
      pages_order/serve/search.vue
  14. +1
    -1
      pages_order/thesis/index.vue
  15. +1
    -1
      pages_order/thesis/indexTwo.vue
  16. +5
    -9
      pages_order/thesis/poster.vue
  17. +3
    -3
      pages_order/thesis/search.vue

+ 21
- 0
api/model/serve.js View File

@ -15,6 +15,27 @@ const api = {
url: '/config/querySummaryByParamCode',
method: 'GET',
},
/**
* 系统配置-获取服务模块分类列表
*/
queryCategoryServiceModuleList: {
url: '/config/queryCategoryServiceModuleList',
method: 'GET',
},
/**
* 首页-获取服务模块文章列表
*/
queryServiceArticleList: {
url: '/index/queryServiceArticleList',
method: 'GET',
},
/**
* 首页-获取服务模块文章详情
*/
queryServiceArticleById: {
url: '/index/queryServiceArticleById',
method: 'GET',
},
}
export default api

+ 1
- 1
common.scss View File

@ -42,7 +42,7 @@
.page__view {
width: 100vw;
min-height: 100vh;
background-color: $uni-bg-color;
background-color: #FAFBFC;
position: relative;
font-family: PingFang SC;
font-weight: 400;


+ 6
- 0
pages.json View File

@ -44,8 +44,14 @@
"path": "case/index"
}, {
"path": "case/poster"
}, {
"path": "serve/category"
}, {
"path": "serve/search"
}, {
"path": "serve/index"
}, {
"path": "center/serve"
}
]
}],


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

@ -1,57 +1,46 @@
<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="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="swiper">
<uv-swiper :list="bannerList" keyName="image" indicator indicatorMode="dot" indicatorActiveColor="#4883F9" indicatorInactiveColor="#FFFFFF" :height="swiperHeight"></uv-swiper>
</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="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;
}
height: 264rpx;
.header {
margin-left: 44rpx;
.title {
position: relative;
letter-spacing: 6rpx;
font-size: 46rpx;
font-weight: 700;
color: #FFFFFF;
}
.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,32 +1,22 @@
<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" />
@ -59,7 +49,7 @@
},
jumpToDetail(paramCode) {
uni.navigateTo({
url: `/pages_order/serve/index?paramCode=${paramCode}`
url: `/pages_order/center/serve?paramCode=${paramCode}`
})
},
},
@ -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%;
}
}


+ 64
- 146
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
//
async fetchBanner() {
try {
this.bannerList = (await this.$fetch('queryBannerList', { type: '0' }))?.records // type0- 1- 2- 3-
} catch (err) {
this.list = this.transformData(records)
}
},
async fetchCategory(api) {
try {
let parents = (await this.$fetch(api, { pageNo: 1, pageSize: 1000 }))?.records?.filter(item => item.hasChild == '1')
} catch (err) {
let results = await Promise.allSettled(parents.map(parent => { return this.$fetch(api, { pid: parent.id, pageNo: 1, pageSize: 1000 }) }))
}
},
async fetchCategoryThesisTwoList() {
try {
let records = (await this.$fetch('queryCategoryThesisTwoList', { pageNo: 1, pageSize: 1000 }))?.records
results.forEach((result, index) => {
parents[index].children = result?.value?.records || []
})
this.list2 = this.transformData(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;
height: 264rpx;
.title {
position: relative;
letter-spacing: 6rpx;
font-size: 46rpx;
font-weight: 700;
color: #FFFFFF;
}
.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%;
}
}


+ 32
- 35
pages/index/serve.vue View File

@ -1,39 +1,22 @@
<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('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">
<view class="list-item"
v-for="item in firstCategoryList"
:key="item.id"
@click="jumpToSecondCategory(item.id, item.title)"
>
<image class="list-item-bg" :src="item.image" mode="scaleToFill"></image>
</view>
</view>
<tabber select="serve" />
@ -50,10 +33,12 @@
data() {
return {
bannerList: [],
firstCategoryList: [],
}
},
onLoad() {
this.fetchBanner()
this.getData()
},
methods: {
//
@ -64,9 +49,16 @@
}
},
jumpToDetail(paramCode) {
async getData() {
try {
this.firstCategoryList = (await this.$fetch('queryCategoryServiceModuleList', { pageNo: 1, pageSize: 1000 }))?.records?.filter(item => item.hasChild == '1')
} catch (err) {
}
},
jumpToSecondCategory(pid, title) {
uni.navigateTo({
url: `/pages_order/serve/index?paramCode=${paramCode}`
url: `/pages_order/serve/category?pid=${pid}&title=${title}`
})
},
},
@ -74,10 +66,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>


+ 41
- 0
pages_order/center/serve.vue View File

@ -0,0 +1,41 @@
<template>
<view class="page__view">
<!-- 导航栏 -->
<navbar :title="details.paramDesc" leftClick @leftClick="$utils.navigateBack" />
<image class="img" :src="details.details" mode="widthFix"></image>
</view>
</template>
<script>
export default {
data() {
return {
details: {},
}
},
onLoad({ paramCode }) {
this.getData(paramCode)
},
methods: {
async getData(paramCode) {
try {
this.details = await this.$fetch('querySummaryByParamCode', { paramCode })
} catch (err) {
console.log('err', err)
}
},
},
}
</script>
<style scoped lang="scss">
.img {
width: 100vw;
height: auto;
}
</style>

+ 80
- 0
pages_order/serve/category.vue View File

@ -0,0 +1,80 @@
<template>
<view class="page__view">
<!-- 导航栏 -->
<navbar :title="title" leftClick @leftClick="$utils.navigateBack" />
<view class="list">
<view class="list-item"
v-for="item in secondCategoryList"
:key="item.id"
@click="jumpToList(item.id, item.title)"
>
<image class="list-item-bg" :src="item.image" mode="scaleToFill"></image>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
pid: null,
title: null,
bannerList: [],
secondCategoryList: [],
}
},
onLoad(arg) {
const { pid, title } = arg
this.pid = pid
this.title = title
this.getData()
},
methods: {
async getData() {
try {
this.secondCategoryList = (await this.$fetch('queryCategoryServiceModuleList', { pid: this.pid, pageNo: 1, pageSize: 1000 }))?.records
} catch (err) {
}
},
jumpToList(categoryId, title) {
uni.navigateTo({
url: `/pages_order/serve/search?categoryId=${categoryId}&title=${title}`
})
},
},
}
</script>
<style scoped lang="scss">
.list {
margin: 49rpx 18rpx 17rpx 18rpx;
&-item {
position: relative;
font-size: 0;
border-radius: 25rpx;
overflow: hidden;
box-shadow: 0rpx 3rpx 6rpx 0rpx rgba(0,0,0,0.16);
& + & {
margin-top: 32rpx;
}
&-bg {
$w: calc(100vw - 18rpx*2);
width: $w;
height: calc(#{$w} * 179 / 714);
}
}
}
</style>

+ 5
- 5
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.title" leftClick @leftClick="$utils.navigateBack" />
<image class="img" :src="details.details" mode="widthFix"></image>
@ -16,13 +16,13 @@
details: {},
}
},
onLoad({ paramCode }) {
this.getData(paramCode)
onLoad({ articleId }) {
this.getData(articleId)
},
methods: {
async getData(paramCode) {
async getData(articleId) {
try {
this.details = await this.$fetch('querySummaryByParamCode', { paramCode })
this.details = await this.$fetch('queryServiceArticleById', { articleId })
} catch (err) {
console.log('err', err)
}


+ 88
- 0
pages_order/serve/search.vue View File

@ -0,0 +1,88 @@
<template>
<view class="page__view">
<!-- 导航栏 -->
<navbar :title="title" leftClick @leftClick="$utils.navigateBack" />
<view class="list">
<view class="list-item"
v-for="item in list"
:key="item.id"
@click="jumpToDetail(item.id, item.title)"
>
<image class="list-item-bg" :src="item.image" mode="scaleToFill"></image>
</view>
</view>
</view>
</template>
<script>
import mixinsList from '@/mixins/list.js'
export default {
mixins: [mixinsList],
data() {
return {
title: '搜索',
keyword: '',
queryParams: {
pageNo: 1,
pageSize: 10,
categoryId: '',
title: '',
},
mixinsListApi: 'queryServiceArticleList',
}
},
onLoad(arg) {
const { categoryId, title } = arg
this.title = title
this.queryParams.categoryId = categoryId
this.getData()
},
methods: {
search() {
this.queryParams.pageNo = 1
this.queryParams.pageSize = 10
this.queryParams.title = this.keyword
this.getData()
},
jumpToDetail(articleId) {
uni.navigateTo({
url: `/pages_order/serve/index?articleId=${articleId}`
})
},
},
}
</script>
<style scoped lang="scss">
.list {
margin: 49rpx 18rpx 17rpx 18rpx;
&-item {
position: relative;
font-size: 0;
border-radius: 25rpx;
overflow: hidden;
box-shadow: 0rpx 3rpx 6rpx 0rpx rgba(0,0,0,0.16);
& + & {
margin-top: 32rpx;
}
&-bg {
$w: calc(100vw - 18rpx*2);
width: $w;
height: calc(#{$w} * 179 / 714);
}
}
}
</style>

+ 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