From cc728e9665242f59a3061e5eb96787e1746f5593 Mon Sep 17 00:00:00 2001 From: QYF-GitLab1 <1940665526@qq.com> Date: 星期日, 24 八月 2025 15:57:37 +0800 Subject: [PATCH] 样式修改2 --- src/assets/js/config.js | 1 src/views/personalCenter/userInfo.vue | 16 ++--- src/views/personalCenter/activeCode.vue | 88 +++++++++++++++++------------ src/views/personalCenter/myApply.vue | 6 +- src/assets/images/personalCenter/Account_bg.png | 0 src/views/personalCenter/myBook.vue | 24 +++----- src/views/personalCenter/index.vue | 4 + 7 files changed, 75 insertions(+), 64 deletions(-) diff --git a/src/assets/images/personalCenter/Account_bg.png b/src/assets/images/personalCenter/Account_bg.png new file mode 100644 index 0000000..7cbaf3a --- /dev/null +++ b/src/assets/images/personalCenter/Account_bg.png Binary files differ diff --git a/src/assets/js/config.js b/src/assets/js/config.js index 58c37d6..5bacc79 100644 --- a/src/assets/js/config.js +++ b/src/assets/js/config.js @@ -96,5 +96,6 @@ wxLogin, reg_telphone, taskType, + textBookResourceUrl, } export default config diff --git a/src/views/personalCenter/activeCode.vue b/src/views/personalCenter/activeCode.vue index f78e69e..9ea3775 100644 --- a/src/views/personalCenter/activeCode.vue +++ b/src/views/personalCenter/activeCode.vue @@ -45,13 +45,13 @@ :src="pItem.icon ? getPublicImage(pItem.icon, '', '') : bookCover" alt="" /> - <!-- <div class="type" v-if="pItem.type">{{ pItem.type }}</div> --> </div> <div class="info"> - <div style="margin-bottom: 10px" v-if="pItem.type"> + <div class="bookType" style="margin-bottom: 10px" v-if="pItem.type"> {{ pItem.type }} </div> <span :title="pItem.name">{{ pItem.name }}</span> + <span v-if="pItem.author">{{ pItem.author }}</span> </div> </div> </div> @@ -86,12 +86,10 @@ import moment from 'moment' import { getPublicImage } from '@/assets/js/middleGround/tool.js' import { ElMessage } from 'element-plus' -import { useUserStore } from '@/store' import { useRouter } from 'vue-router' import bookCover from '@/assets/images/personalCenter/book-cover.png' const router = useRouter() -const userStore = useUserStore() -const MG = inject('MG') +const MG: any = inject('MG') const activateCode = ref('') const loading = ref(false) let dataList = ref([]) @@ -143,32 +141,26 @@ type: 'Desc', field: 'CreateDate', }, + fields: { + author: [], + }, }) .then((res) => { let list: any[] = [] res.datas.forEach((item) => { item.createDate = moment(item.createDate).format('YYYY-MM-DD HH:mm:ss') item.typeList = [] - item.saleMethodList.forEach(async (i) => { + item.saleMethodList.forEach(async (i, index) => { + const author = item.productList[index]?.dataList?.find((citem) => { + return citem.data.sequenceNum == '007EB8E7' && citem.data.value + })?.data?.value const obj = { - icon: item.productList[0]?.icon, - id: item.productList[0]?.id, - name: item.productList[0]?.name, - type: - i.type == 'defaultSaleMethod' - ? '鐢靛瓙涔�' - : i.name.includes('-') - ? i.name.split('-')[0] - : i.name, - defaultSaleMethodId: item.productList[0]?.defaultSaleMethodId, - } - - let parentData = await MG.store.getProductBySaleMethod({ saleMethodId: i.id }) - if (parentData.storeLinks[0].storeRefCode == 'digitalCourses') { - obj.type = '鏁板瓧璇剧▼' - } - if (parentData.storeLinks[0].storeRefCode == 'digitalTextbooks') { - obj.type = '鏁板瓧鏁欐潗' + icon: item.productList[index]?.icon, + id: item.productList[index]?.id, + name: item.productList[index]?.name, + author, + type: '鏁板瓧鏁欐潗', + defaultSaleMethodId: item.productList[index]?.defaultSaleMethodId, } item.typeList.push(obj) }) @@ -256,11 +248,11 @@ } .stateBox { - height: 47px; - line-height: 47px; + height: 40px; + line-height: 40px; padding: 0 20px; border: 1px solid #edecec; - background: #f3f3f3; + background: #edf4f2; .flex1 span { color: #019e58; } @@ -271,18 +263,27 @@ } .listItem { - width: 130px; cursor: pointer; box-sizing: border-box; float: left; position: relative; - margin-right: 5%; + margin-right: 3%; + width: 185px; + min-height: 258px; + background: rgba(255, 255, 255, 0.3); + border-radius: 8px 8px 8px 8px; + border: 1px solid #dedede; + padding: 20px 10px; + box-sizing: border-box; + margin-bottom: 20px; .cover { - width: 100%; - height: 180px; - box-shadow: 0px 0px 20px 1px #ccc; + width: 106px; + height: 150px; + border-radius: 0px 0px 0px 0px; + border: 1px solid #019e58; position: relative; + margin: auto; img { width: 100%; @@ -305,20 +306,35 @@ } .info { - height: 90px; - padding: 15px 0; width: 100%; + .bookType { + position: absolute; + top: 0; + right: 0; + width: 60px; + height: 26px; + text-align: center; + font-size: 12px; + line-height: 24px; + font-weight: 400; + color: #fff; + border-radius: 0px 0px 0px 5px; + background: linear-gradient(130deg, #019e58 0%, #144941 100%); + border-radius: 0px 8px 0px 8px; + } span { font-weight: bold; - height: 45px; - line-height: 22px; + line-height: 25px; display: -webkit-box; margin-bottom: 5px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; text-overflow: ellipsis; + padding: 5px 0; + box-sizing: border-box; + text-align: center; } } } diff --git a/src/views/personalCenter/index.vue b/src/views/personalCenter/index.vue index acbc95b..978d06c 100644 --- a/src/views/personalCenter/index.vue +++ b/src/views/personalCenter/index.vue @@ -106,6 +106,10 @@ border-radius: 10px 10px 10px 10px; background: #e1ebe3; height: max-content; + background-image: url('@/assets/images/personalCenter/Account_bg.png'); + background-repeat: no-repeat; + background-position: center; + background-size: 100% 100%; .menu { li { height: 50px; diff --git a/src/views/personalCenter/myApply.vue b/src/views/personalCenter/myApply.vue index 49971ef..6bf18b6 100644 --- a/src/views/personalCenter/myApply.vue +++ b/src/views/personalCenter/myApply.vue @@ -192,9 +192,9 @@ }) } const read = (pItem: any) => { - // let token = tool.getCookie(config.tokenKey) - // const url = config.textReaderUrl + '#/home' + '?bookId=' + pItem.id + '&token=' + token - // debugger + /** 鏆傛棤鏁欐潗闃呰鍣紝璺宠浆鑷宠鎯� */ + // let token = localStorage.getItem(config.tokenKey) + // const url = config.textBookResourceUrl + '#/home' + '?bookId=' + pItem.id + '&token=' + token // window.open(url) router.push({ path: '/bookdetail', diff --git a/src/views/personalCenter/myBook.vue b/src/views/personalCenter/myBook.vue index 0f21fa7..f58b2b3 100644 --- a/src/views/personalCenter/myBook.vue +++ b/src/views/personalCenter/myBook.vue @@ -29,7 +29,7 @@ </div> </div> <div class="myCarTopPage" v-else> - <el-empty description="鎮ㄨ繕鏈喘涔颁换浣曞浘涔�" :image-size="200" /> + <el-empty style="margin: auto" description="鎮ㄨ繕鏈喘涔颁换浣曞浘涔�" :image-size="200" /> </div> </div> <div class="pageCon"> @@ -71,24 +71,16 @@ import { reactive, ref, onMounted, inject, watch } from 'vue' import { useRouter } from 'vue-router' import defaultImg from '@/assets/images/default-book-img.png' -import { useUserStore } from '@/store' import tool from '@/assets/js/toolClass' const MG: any = inject('MG') const config: any = inject('config') const router = useRouter() let collectList = ref([]) -let currentCollect = ref('book') let isLoading = ref(false) -let pages = reactive({ - page: 1, - pageSize: 10, - count: 0, - loading: false, -}) -let linkType = ref('PurchasedProduct') + let paginationData = reactive({ page: 1, - limit: 10, + limit: 6, totalCount: 0, totalPage: 0, }) @@ -213,8 +205,9 @@ } .details div:first-child { font-size: 16px; - color: #2b68cd; + color: #019e58; margin-bottom: 11px; + line-height: 24px; } .details div:nth-child(2) { @@ -260,9 +253,10 @@ cursor: pointer; margin: 10px; box-sizing: border-box; - padding: 10px 30px; - border: 1px solid #ddd; + padding: 15px 30px; + border: 1px solid #b1ccc1; box-sizing: border-box; + border-radius: 5px; } .bookone:hover { -moz-box-shadow: 4px 3px 6px rgba(0, 0, 0, 0.3); @@ -273,7 +267,7 @@ .bookone .imgBox { position: relative; width: 120px; - height: 160px; + height: 150px; background: #fff; box-shadow: 0px 0px 20px 1px #ccc; } diff --git a/src/views/personalCenter/userInfo.vue b/src/views/personalCenter/userInfo.vue index 9d99205..ef1bb0f 100644 --- a/src/views/personalCenter/userInfo.vue +++ b/src/views/personalCenter/userInfo.vue @@ -198,14 +198,14 @@ > <div> <div class="qrcodeBox"> - <!-- <wxlogin + <wxlogin :redirect_uri="wxLogin.redirectURL" style="width: 300px; height: 400px; margin: -40px auto 0; overflow: hidden" :appid="wxLogin.appid" :scope="wxLogin.scope" state="WeChatScanningCodeBind" > - </wxlogin> --> + </wxlogin> </div> <p class="tips">浣跨敤寰俊鎵竴鎵壂鎻忎簩缁寸爜杩涜缁戝畾</p> </div> @@ -272,19 +272,13 @@ <script setup lang="ts"> import { reactive, ref, inject, onMounted, watch } from 'vue' import type { FormInstance, FormRules } from 'element-plus' -// import verify from '@/components/sliderImg/component/verify.vue' -// import '@/components/sliderImg/sliderImg.js' -// import '@/components/sliderImg/sliderImg.css' import { ElMessage } from 'element-plus' -import tool from '@/assets/js/toolClass.js' import { useUserStore } from '@/store' // import wxlogin from 'vue-wxlogin' import teacherCertification from './teacherCertification.vue' import login from '@/layout/components/login.vue' const userStore = useUserStore() -import { useRoute } from 'vue-router' import moment from 'moment' -const route = useRoute() const MG: any = inject('MG') const config: any = inject('config') @@ -570,10 +564,11 @@ } //寰俊璁よ瘉 let wxLogin = reactive({ - appid: 'wx5cfe8b007a3c6f8c', + appid: 'wx2b9d4a6308fd03d6', scope: 'snsapi_login', - redirectURL: encodeURIComponent(config.requestCtx + '/home/#/personalCenter'), + redirectURL: encodeURIComponent(config.requestCtx + '/#/personalCenter'), }) +//鑾峰彇寰俊璁よ瘉鐘舵�� const getWechatAuthenticationState = () => { MG.identity.checkBuildingWeChat({}).then((res: any) => { if (res) { @@ -925,6 +920,7 @@ .change-info { color: #019e58; + font-size: 14px; } .record { -- Gitblit v1.9.1