From 1fd211c2528c8ba7fff173c60b31acbc5807c809 Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期一, 25 三月 2024 18:17:37 +0800 Subject: [PATCH] 图标,首页 --- pages/home/home.js | 80 ++++++-- static/images/home/zhuantitaolun2.png | 0 custom-tab-bar/index.wxss | 40 ++++ pages/home/home.json | 1 custom-tab-bar/index.wxml | 18 + static/images/home/tushufuwu2.png | 0 custom-tab-bar/index.js | 45 ++-- static/images/home/jingxuankecheng2.png | 0 packageDomain/pages/teacherCertification/index.js | 115 ++++++----- pages/personalCenter/index.wxml | 1 app.json | 5 /dev/null | 0 packageDomain/pages/teacherCertification/index.wxss | 4 static/images/home/paihangbang2.png | 0 static/images/home/shuziyuedu2.png | 0 assets/js/toolClass.js | 12 pages/personalCenter/index.wxss | 8 static/images/home/shuzijiaocai2.png | 0 pages/home/home.wxml | 70 +++---- pages/home/home.wxss | 100 +++++++--- pages/testLogin/index.json | 1 21 files changed, 321 insertions(+), 179 deletions(-) diff --git a/app.json b/app.json index 8f90f72..457929b 100644 --- a/app.json +++ b/app.json @@ -61,7 +61,7 @@ "tabBar": { "custom": true, "color": "#666666", - "selectedColor": "#FF5F15", + "selectedColor": "#ff6c00", "backgroundColor": "#ffffff", "borderStyle": "black", "list": [ @@ -105,8 +105,7 @@ "backgroundTextStyle": "light", "navigationBarBackgroundColor": "#fff", "navigationBarTitleText": "浜笀E璇�", - "navigationBarTextStyle": "black", - " navigationStyle": "custom" + "navigationBarTextStyle": "black" }, "sitemapLocation": "sitemap.json", "permission": { diff --git a/assets/js/toolClass.js b/assets/js/toolClass.js index ee88bba..3875d6a 100644 --- a/assets/js/toolClass.js +++ b/assets/js/toolClass.js @@ -322,10 +322,14 @@ export function getFileMd5(file) { return new Promise((resolve, reject) => { - let spark = new SparkMD5.ArrayBuffer() - spark.append(file) - const md5 = spark.end(false) - resolve(md5) + const md5_reader = new FileReader() + md5_reader.readAsArrayBuffer(file.tempFilePath) + md5_reader.onload = function (event) { + let spark = new SparkMD5.ArrayBuffer() + spark.append(event.target.result) + var md5 = Spark.end() + resolve(md5) + } }) } diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js index b7ed143..a38dc4a 100644 --- a/custom-tab-bar/index.js +++ b/custom-tab-bar/index.js @@ -1,35 +1,34 @@ import TabMenu from './data'; Component({ data: { - active: 0, + selected: 0, list: TabMenu, }, - observers: { - 'active': function (newValue) { - console.log('active鍙樺寲', newValue); - } - }, + // observers: { + // 'active': function (newValue) { + // console.log('active鍙樺寲', newValue); + // } + // }, methods: { - onChange(event) { - console.log(event); - this.setData({ active: this.data.list[event.detail.value].id }); - const url = this.data.list[event.detail.value].url.startsWith('/') - ? this.data.list[event.detail.value].url - : `/${this.data.list[event.detail.value].url}` + changeTab(item) { + this.setData({ + selected: item.currentTarget.dataset.num + }) wx.switchTab({ - url: url + url: this.data.list[this.data.selected].url.startsWith('/') ? + this.data.list[this.data.selected].url : `/${this.data.list[this.data.selected].url}`, }); }, - init() { - const page = getCurrentPages().pop(); - const route = page ? page.route.split('?')[0] : ''; - const active = this.data.list.findIndex( - (item) => - (item.url.startsWith('/') ? item.url.substr(1) : item.url) === - `${route}`, - ); - this.setData({ active }); - }, + // init() { + // const page = getCurrentPages().pop(); + // const route = page ? page.route.split('?')[0] : ''; + // const active = this.data.list.findIndex( + // (item) => + // (item.url.startsWith('/') ? item.url.substr(1) : item.url) === + // `${route}`, + // ); + // this.setData({ active }); + // }, }, }); diff --git a/custom-tab-bar/index.wxml b/custom-tab-bar/index.wxml index 1c93f72..22debee 100644 --- a/custom-tab-bar/index.wxml +++ b/custom-tab-bar/index.wxml @@ -1,12 +1,18 @@ -<t-tab-bar value="{{active}}" bindchange="onChange" split="{{false}}"> +<!-- <t-tab-bar value="{{active}}" bindchange="onChange" split="{{false}}"> <t-tab-bar-item wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="id"> <view class="custom-tab-bar-wrapper"> - <!-- <t-icon prefix="wr" name="{{item.icon}}" size="48rpx" /> - <view class="text">{{ item.text }}</view> --> - <!-- <t-image wx:if="{{active !== index}}" class="tabImg" src="{{item.icon}}" mode="heightFix" width="22" height="22" /> - <t-image wx:else class="tabImg" src="{{item.activeIcon}}" mode="heightFix" width="22" height="22" /> --> <t-image class="tabImg" src="{{active == item.id ? item.activeIcon : item.icon}}" width="22" height="22"></t-image> <view class="text">{{ item.text }}</view> </view> </t-tab-bar-item> -</t-tab-bar> \ No newline at end of file +</t-tab-bar> --> + +<view class="tabBarBox"> + <view class="tabItem" wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="changeTab" data-num="{{index}}"> + <view class="custom-tab-bar-wrapper"> + <t-image wx:if="{{selected !== index}}" class="tabImg" src="{{item.icon}}" mode="aspectFill" width="22" height="22" /> + <t-image wx:else class="tabImg" src="{{item.activeIcon}}" mode="aspectFill" width="22" height="22" /> + <view class="text {{selected == index ? 'activeText' : ''}}">{{ item.text }}</view> + </view> + </view> +</view> \ No newline at end of file diff --git a/custom-tab-bar/index.wxss b/custom-tab-bar/index.wxss index ebc4be3..3a47b5a 100644 --- a/custom-tab-bar/index.wxss +++ b/custom-tab-bar/index.wxss @@ -7,4 +7,44 @@ .custom-tab-bar-wrapper .text { font-size: 20rpx; margin-top: 10rpx; +} + +.tabBarBox { + display: flex; + padding-bottom: 50rpx; + background-color: #fff; + /* opacity: 1; */ +} + +.tabItem { + flex: 1; + height: var(--td-tab-bar-height, 80rpx); + box-sizing: border-box; + user-select: none; + position: relative; + margin-bottom: 26rpx; + background-color: var(--td-tab-bar-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff))); + padding: 0 24rpx; + border-top: 1px solid #d8d8d8; + padding-top: 20rpx; +} + +.text { + font-size: 20rpx; + text-align: center; + color: #9D9D9D; +} + +.activeText { + color: #ff6d00; +} + +.tabImg { + text-align: center; +} + +.roleIcon { + position: relative; + bottom: 30px; + z-index: 999; } \ No newline at end of file diff --git a/packageDomain/pages/teacherCertification/index.js b/packageDomain/pages/teacherCertification/index.js index 812abdc..c245a0a 100644 --- a/packageDomain/pages/teacherCertification/index.js +++ b/packageDomain/pages/teacherCertification/index.js @@ -1,4 +1,5 @@ const app = getApp(); +import SparkMD5 from 'spark-md5' import tool from "../../../assets/js/toolClass.js"; import { getTopicMsgCmsItemFile } from '../../../assets/js/middleGround/tool.js'; import FormData from '../../../utils/formdata/index.js'; @@ -119,7 +120,7 @@ } else if (studentInfo) { defaultUser = { ...studentInfo, - nickName: wechatInfo.name, + nickName: wechatInfo.name ? wechatInfo.name : studentInfo.nickName, avatarUrl: wechatInfo.icon, userId: res.userId, phoneNumber: phoneInfo?.credential, @@ -352,63 +353,72 @@ sourceType: ['album', 'camera'], // 鍙互鎸囧畾鏉ユ簮鏄浉鍐岃繕鏄浉鏈猴紝榛樿浜岃�呴兘鏈� success: function (res) { // 杩斿洖閫夊畾鐓х墖鐨勬湰鍦版枃浠惰矾寰勫垪琛紝tempFilePath涔熷彲浠ヤ綔涓篿mg鏍囩鐨剆rc灞炴�ф樉绀哄浘鐗� - console.log(res.tempFiles[0]) - tool.getFileMd5(res.tempFiles[0]).then((e) => { - console.log(e, 4) - if (!that.data.imgPics.find((item) => item.md5 == e)) { - let formData = new FormData(); - formData.append('Md5', e); - formData.append('FileName', e); - formData.append('FileType', res.tempFiles[0].fileType); - formData.appendFile("file", res.tempFiles[0].tempFilePath); - const data = formData.getData(); - let _token = wx.getStorageSync(app.config.tokenKey); - let header = {}; - if (_token == null) { - header["Authorization"] = `Basic ${Base64.encode(website.clientId + ":" + website.clientSecret)}`; - } else { - header["Authorization"] = `Bearer ` + _token; - } - new Promise((resolve, reject) => { - wx.request({ - url: app.config.requestCtx + '/file/api/ApiUpload', - method: 'POST', - header: { - 'content-type': data.contentType, - ...header - }, - data: data.buffer, - success(res) { - if (res.statusCode == 200) { - resolve(res.data); if (res.data) { - let arr = []; - let imgObj = { - md5: e, - linkType: 'LinkFile', - linkProtectType: 'Public', - url: - app.config.requestCtx + `/file/GetPreViewImage?md5=` + e - } - arr = [...that.data.imgPics, ...[imgObj]]; + console.log(res.tempFiles[0], 12); + wx.getFileSystemManager().readFile({ + filePath: res.tempFiles[0].tempFilePath, //閫夋嫨鍥剧墖杩斿洖鐨勭浉瀵硅矾寰� + // encoding: 'binary', //缂栫爜鏍煎紡 + success: ress => { + //鎴愬姛鐨勫洖璋� + let spark = new SparkMD5.ArrayBuffer(); + spark.append(ress.data); + let md5 = spark.end(false); + if (!that.data.imgPics.find((item) => item.md5 == md5)) { + let formData = new FormData(); + formData.append('Md5', md5); + formData.append('FileName', md5); + formData.append('FileType', res.tempFiles[0].fileType); + formData.appendFile("file", res.tempFiles[0].tempFilePath); + const data = formData.getData(); + let _token = wx.getStorageSync(app.config.tokenKey); + let header = {}; + if (_token == null) { + header["Authorization"] = `Basic ${Base64.encode(website.clientId + ":" + website.clientSecret)}`; + } else { + header["Authorization"] = `Bearer ` + _token; + } + new Promise((resolve, reject) => { + wx.request({ + url: app.config.requestCtx + '/file/api/ApiUpload', + method: 'POST', + header: { + 'content-type': data.contentType, + ...header + }, + data: data.buffer, + success(res1) { + if (res1.statusCode == 200) { + resolve(res1.data); if (res1.data) { + let arr = []; + let imgObj = { + md5: md5, + linkType: 'LinkFile', + linkProtectType: 'Public', + url: + app.config.requestCtx + `/file/GetPreViewImage?md5=` + md5, + imgUrl: res.tempFiles[0].tempFilePath + } + arr = [...that.data.imgPics, ...[imgObj]]; - that.setData({ - imgPics: arr, - }); + that.setData({ + imgPics: arr, + }); + } + } else { + reject('杩愯鏃堕敊璇�,璇风◢鍚庡啀璇�'); } - } else { - reject('杩愯鏃堕敊璇�,璇风◢鍚庡啀璇�'); } - } + }) }) - }) - } else { - wx.showToast({ - title: "褰撳墠鏂囦欢宸蹭笂浼狅紝璇峰嬁閲嶅鎿嶄綔锛�", - icon: 'none', - duration: 1000, - }) + } else { + wx.showToast({ + title: "褰撳墠鏂囦欢宸蹭笂浼狅紝璇峰嬁閲嶅鎿嶄綔锛�", + icon: 'none', + duration: 1000, + }) + } } }) + } }); }, @@ -520,7 +530,6 @@ }) return } - console.log(that.data.teacherInfo.fullName) if (that.data.teacherInfo.agree) { if (that.data.topicMessageList.length > 0) { let dataRequests = tool.UpdateworksDataBytool( diff --git a/packageDomain/pages/teacherCertification/index.wxss b/packageDomain/pages/teacherCertification/index.wxss index 43206bf..52b7b8b 100644 --- a/packageDomain/pages/teacherCertification/index.wxss +++ b/packageDomain/pages/teacherCertification/index.wxss @@ -67,7 +67,9 @@ padding: 0 !important; } - +.t-input__placeholder { + font-size: 28rpx !important +} .t-cell { padding: 0 !important; diff --git a/pages/home/home.js b/pages/home/home.js index b2ef42e..ac08cdd 100644 --- a/pages/home/home.js +++ b/pages/home/home.js @@ -11,8 +11,6 @@ backUrl: null, userInfo: {}, tabList: [], //鐩綍 - pageLoading: false, - current: 1,//杞挱鍥惧弬鏁� autoplay: true, //杞挱鍥惧弬鏁� duration: '500',//杞挱鍥惧弬鏁� interval: 5000,//杞挱鍥惧弬鏁� @@ -28,10 +26,12 @@ readBookList: [], //鏁板瓧闃呰 textbookList: [], //鏁板瓧鏁欐潗 rankingList: [],//鎺掕姒� - shoppingCartGetId: [] + shoppingCartGetId: [], + baseRefresh: { + value: true + } }, onShow() { - this.getTabBar().init(); this.loadHomePage(); this.getBannerList() @@ -63,6 +63,9 @@ onReachBottom() { }, onPullDownRefresh() { + this.setData({ + isWhite: true + }) this.init(); }, init() { @@ -72,7 +75,15 @@ this.getReadBookList(); this.getTextbookListList(); this.getRankingList(); - this.getShoppingCartList() + + setTimeout(() => { + this.setData({ + baseRefresh: { + value: false, + }, + isWhite: false, + }) + }, 500); }, // 鑾峰彇娴嬭瘯鐧诲綍鏃剁殑token getTestLoginInfo() { @@ -117,6 +128,8 @@ }, }) + } else { + this.getShoppingCartList(); } }, @@ -178,14 +191,9 @@ loadHomePage() { - wx.stopPullDownRefresh(); - this.setData({ - pageLoading: true, - }); fetchHome().then(({ tabList }) => { this.setData({ tabList, - pageLoading: false, }); }); }, @@ -226,7 +234,8 @@ liveTime: [], lecturer: [], startTime: [], - jsek_link: [] + jsek_link: [], + position: [] } } app.MG.store.getProductList(obj).then((res) => { @@ -390,6 +399,9 @@ } } app.MG.store.getProductList(obj).then((res) => { + res.datas.forEach((item) => { + item.price = item.price ? item.price.toFixed(2) : item.price; + }); this.setData({ textbookList: res.datas }) @@ -436,6 +448,40 @@ url: `/packageBookService/pages/bookServices/detail/index?id=${book.id}&name=${book.name}`, }); }, + goSubjectDetail(e) { + const { book } = e.currentTarget.dataset; + wx.showToast({ + title: "寤鸿涓�", + icon: 'none', + duration: 2000 + }) + }, + goCourseDetail(e) { + const { book } = e.currentTarget.dataset; + wx.showToast({ + title: "寤鸿涓�", + icon: 'none', + duration: 2000 + }) + }, + goReadBookDetail(e) { + const { book } = e.currentTarget.dataset; + wx.showToast({ + title: "寤鸿涓�", + icon: 'none', + duration: 2000 + }) + }, + goTextBookDetail(e) { + const { book } = e.currentTarget.dataset; + wx.showToast({ + title: "寤鸿涓�", + icon: 'none', + duration: 2000 + }) + }, + + getShoppingCartList() { let query = { start: 0, @@ -518,22 +564,16 @@ }, - onPageScroll(e) { + // 鐩戝惉婊氬姩鏉� + onScroll(e) { this.setData({ - isWhite: e.scrollTop > 20 ? true : false + isWhite: e.detail.scrollTop > 10 ? true : false }) - }, onRetrievalPage() { console.log(this.data.searchVal); wx.navigateTo({ url: '/pages/retrievalPage/index?searchVal=' + this.data.searchVal - - }) - - }, - - }); diff --git a/pages/home/home.json b/pages/home/home.json index 5bc8b6b..75fdae5 100644 --- a/pages/home/home.json +++ b/pages/home/home.json @@ -6,6 +6,7 @@ "usingComponents": { "t-search": "tdesign-miniprogram/search/search", "t-loading": "tdesign-miniprogram/loading/loading", + "t-pull-down-refresh": "tdesign-miniprogram/pull-down-refresh/pull-down-refresh", "t-swiper": "tdesign-miniprogram/swiper/swiper", "t-swiper-nav": "tdesign-miniprogram/swiper-nav/swiper-nav", "t-image": "tdesign-miniprogram/image/image", diff --git a/pages/home/home.wxml b/pages/home/home.wxml index ec9da0d..ddd3ef8 100644 --- a/pages/home/home.wxml +++ b/pages/home/home.wxml @@ -1,15 +1,8 @@ - - - - - -<view style="text-align: center; color: #b9b9b9" wx:if="{{pageLoading}}"> - <t-loading theme="circular" size="40rpx" text="鍔犺浇涓�..." inherit-color /> -</view> - +<view class="container"> <view class="background {{ isWhite ? 'white':''}}" style="padding-top: {{barHeight}}px"> <text class="text">浜笀E璇�</text> </view> +<t-pull-down-refresh value="{{baseRefresh.value}}" loadingTexts="{{['涓嬫媺鍒锋柊', '鏉炬墜鍒锋柊', '姝e湪鍒锋柊', '鍒锋柊瀹屾垚']}}" bind:refresh="onPullDownRefresh" bind:scroll="onScroll"> <view class="home-page-header"> <view class="bg"> <image src="/static/images/home/home-bg.png" mode="heightFix" class="image" /> @@ -20,7 +13,7 @@ </t-search> </view> <view class="swiper-wrap"> - <t-swiper wx:if="{{bannerList.length > 0}}" list="{{bannerList}}" current="{{current}}" autoplay="{{autoplay}}" duration="{{duration}}" interval="{{interval}}" navigation="{{navigation}}" bind:click="navToActivityDetail" /> + <t-swiper wx:if="{{bannerList.length > 0}}" list="{{bannerList}}" autoplay="{{autoplay}}" duration="{{duration}}" interval="{{interval}}" navigation="{{navigation}}" bind:click="navToActivityDetail" /> </view> </view> <view class="home-page-menu"> @@ -30,9 +23,9 @@ </view> <view class="home-page-container"> <view class="home-page-list"> - <view class="tabCardPublic"> + <view class="tabCardPublic iconOne"> <view class="icon"> - <t-image src="/static/images/home/zhuantitaolun.png" mode="heightFix" class="iconImage" /> + <image src="/static/images/home/zhuantitaolun2.png" mode="aspectFit" class="iconImage" /> </view> <view data-info="{{'zhuantitaolun'}}" bindtap="onMoreGuide" class="flex"> <text class="more">鏇村</text> @@ -41,17 +34,17 @@ </view> <view class="listBox"> <view wx:for="{{specialSubjectList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="listItemBox"> - <view class="listItem"> + <view class="listItem" bindtap="goSubjectDetail" data-book="{{item}}"> <view class="specialSubject-img"> <image src="{{item.icon}}" mode="aspectFill" class="img" /> </view> <view class="body-info"> <view class="name">{{item.name}}</view> - <view class="time" wx:if="{{item.liveTime}}">鐩存挱鏃堕棿锛�<text>{{item.liveTime}}</text></view> - <view class="time" wx:if="{{item.startTime}}">寮�鎾椂闂达細<text>{{ item.startTime }}</text></view> + <view class="time" wx:if="{{item.liveTime}}">鐩存挱鏃堕棿锛歿{item.liveTime}}</view> + <view class="time" wx:if="{{item.startTime}}">寮�鎾椂闂达細{{ item.startTime }}</view> <view class="time" wx:if="{{!item.liveTime && !item.startTime}}">寮�鎾椂闂达細<text class="grey">寰呭畾</text></view> <view class="flex jc-sb"> - <text class="author">{{item.lecturer}}</text> + <text class="author">{{item.lecturer}} {{item.position}}</text> <text class="price" wx:if="{{item.price == 0}}">鍏嶈垂</text> <text class="price" wx:if="{{item.price !== 0}}">锟{item.price}}</text> </view> @@ -59,9 +52,9 @@ </view> </view> </view> - <view class="tabCardPublic"> + <view class="tabCardPublic iconTwo"> <view class="icon"> - <t-image src="/static/images/home/jingxuankecheng@2x.png" mode="heightFix" class="iconImage" /> + <image src="/static/images/home/jingxuankecheng2.png" mode="aspectFit" class="iconImage" /> </view> <view data-info="{{'jingxuankecheng'}}" bindtap="onMoreGuide" class="flex"> <text class="more">鏇村</text> @@ -76,7 +69,7 @@ <view class="listBox1"> <view wx:if="{{courseList.length>0}}"> <view wx:for="{{courseList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="listItemBox"> - <view class="listItem flex"> + <view class="listItem flex" data-book="{{item}}" bindtap="goCourseDetail"> <view class="specialSubject-img"> <image src="{{item.icon}}" mode="aspectFill" class="img" /> </view> @@ -84,12 +77,12 @@ <view class="name">{{item.name}}</view> <view class="flex jc-sb"> <text class="author">{{item.courseLeader}}</text> - <text>{{item.classHours}}璇炬椂</text> + <text class="classHours">{{item.classHours}}璇炬椂</text> </view> <view class="priceBox flex jc-sb"> <text class="price" wx:if="{{item.price == 0}}">鍏嶈垂</text> <text class="price" wx:if="{{item.price !== 0}}">锟{item.price}}</text> - <image src="/static/images/home/home-cart.png" mode="aspectFill" class="addCartImg" bind:tap="addCart" data-info="{{item}}" /> + <image src="/static/images/home/home-cart.png" mode="aspectFit" class="addCartImg" bind:tap="addCart" data-info="{{item}}" /> </view> </view> </view> @@ -99,9 +92,9 @@ <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" font-size="80" /> </view> </view> - <view class="tabCardPublic"> + <view class="tabCardPublic iconTwo"> <view class="icon"> - <t-image src="/static/images/home/tushufuwu@2x.png" mode="heightFix" class="iconImage" /> + <image src="/static/images/home/tushufuwu2.png" mode="aspectFit" class="iconImage" /> </view> <view data-info="{{'tushufuwu'}}" bindtap="onMoreGuide" class="flex"> <text class="more">鏇村</text> @@ -109,7 +102,7 @@ </view> </view> <view class="home-page-tabs"> - <t-tabs t-class="t-tabs" split="{{false}}" defaultValue="{{activeItem1}}" bind:change="tabBookClick"> + <t-tabs t-class="t-tabs" split="{{false}}" position="{{'home'}}" defaultValue="{{activeItem1}}" bind:change="tabBookClick"> <t-tab-panel wx:for="{{bookTypeList}}" wx:for-index="index" wx:key="index" label="{{item.name}}" value="{{index}}" /> </t-tabs> </view> @@ -118,7 +111,7 @@ <view wx:for="{{booksList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="booksListItemBox"> <view class="listItem" bind:tap="goDetail" data-book="{{item}}"> <view class="specialSubject-img"> - <image src="{{item.icon}}" mode="aspectFill" class="img" /> + <image src="{{item.icon}}" mode="aspectFit" class="img" /> </view> <view class="body-info"> <view class="name">{{item.name}}</view> @@ -131,9 +124,9 @@ <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" font-size="80" /> </view> </view> - <view class="tabCardPublic"> + <view class="tabCardPublic iconTwo"> <view class="icon"> - <t-image src="/static/images/home/shuziyuedu1@2x.png" mode="heightFix" class="iconImage" /> + <image src="/static/images/home/shuziyuedu2.png" mode="aspectFit" class="iconImage" /> </view> <view data-info="{{'shuziyuedu'}}" bindtap="onMoreGuide" class="flex"> <text class="more">鏇村</text> @@ -142,9 +135,9 @@ </view> <view class="listBox2 flex"> <view wx:for="{{readBookList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="booksListItemBox"> - <view class="listItem"> + <view class="listItem" bind:tap="goReadBookDetail" data-book="{{item}}"> <view class="specialSubject-img"> - <image src="{{item.icon}}" mode="aspectFill" class="img" /> + <image src="{{item.icon}}" mode="aspectFit" class="img" /> </view> <view class="body-info"> <view class="name">{{item.name}}</view> @@ -153,9 +146,9 @@ </view> </view> </view> - <view class="tabCardPublic"> + <view class="tabCardPublic iconTwo"> <view class="icon"> - <t-image src="/static/images/home/shuzijiaocai1@2x.png" mode="heightFix" class="iconImage" /> + <image src="/static/images/home/shuzijiaocai2.png" mode="aspectFit" class="iconImage" /> </view> <view data-info="{{'shuzijiaocai'}}" bindtap="onMoreGuide" class="flex"> <text class="more">鏇村</text> @@ -165,9 +158,9 @@ <view class="listBox3"> <view wx:if="{{textbookList.length > 0}}"> <view wx:for="{{textbookList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="textbooksItemBox"> - <view class="listItem flex"> + <view class="listItem flex" bind:tap="goTextBookDetail" data-book="{{item}}"> <view class="specialSubject-img"> - <image src="{{item.icon}}" mode="aspectFill" class="img" /> + <image src="{{item.icon}}" mode="aspectFit" class="img" /> </view> <view class="body-info"> <view class="name">{{item.name}}</view> @@ -176,7 +169,7 @@ <view class="priceBox flex jc-sb"> <text class="price" wx:if="{{item.price == 0}}">鍏嶈垂</text> <text class="price" wx:if="{{item.price !== 0}}">锟{item.price}}</text> - <image src="/static/images/home/home-cart.png" mode="aspectFill" class="addCartImg" bind:tap="addCart" data-info="{{item}}" /> + <image src="/static/images/home/home-cart.png" mode="aspectFit" class="addCartImg" bind:tap="addCart" data-info="{{item}}" /> </view> </view> </view> @@ -188,7 +181,7 @@ </view> <view class="tabCardPublic"> <view class="icon"> - <t-image src="/static/images/home/paihangbang@2x.png" mode="heightFix" class="iconImage" /> + <image src="/static/images/home/paihangbang2.png" mode="" class="iconImage" /> </view> </view> <view class="rankingList"> @@ -196,8 +189,8 @@ <view wx:for="{{rankingList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="booksListItemBox"> <view class="listItem" bind:tap="goDetail" data-book="{{item}}"> <view class="specialSubject-img"> - <image src="{{item.icon}}" mode="aspectFill" class="img" wx:if="{{item.icon}}" /> - <image src="/static/images/default-book-img.png" mode="aspectFill" class="img" wx:else /> + <image src="{{item.icon}}" mode="aspectFit" class="img" wx:if="{{item.icon}}" /> + <image src="/static/images/default-book-img.png" mode="aspectFit" class="img" wx:else /> </view> <view class="body-info"> <view class="name">{{item.name}}</view> @@ -208,5 +201,6 @@ </scroll-view> </view> </view> - <t-toast id="t-toast" /> +</view> +</t-pull-down-refresh> </view> \ No newline at end of file diff --git a/pages/home/home.wxss b/pages/home/home.wxss index 67cd4ed..6dcae7a 100644 --- a/pages/home/home.wxss +++ b/pages/home/home.wxss @@ -1,14 +1,3 @@ -page { - box-sizing: border-box; - padding-bottom: calc(env(safe-area-inset-bottom) + 96rpx); -} - -.container { - width: 100vw; - position: relative; - max-height: calc(100vh - env(safe-area-inset-bottom)); -} - .background { width: 100%; position: fixed; @@ -75,6 +64,27 @@ margin: 0; } +.t-grid-item__image { + width: 60rpx !important; + height: 56rpx !important; + position: relative; + +} + +.t-grid-item__image:not(:empty).t-grid-item__image--small .t-image { + width: auto !important; + height: auto !important; + max-width: 100% !important; + max-height: 100% !important; + position: absolute !important; + top: 0 !important; + left: 0 !important; + right: 0 !important; + bottom: 0 !important; + margin: auto !important; +} + + .flex { display: flex; } @@ -87,7 +97,7 @@ margin-top: 20rpx; display: block; padding: 0 24rpx; - padding-bottom: calc(env(safe-area-inset-bottom) + 96rpx); + padding-bottom: 10vh; } .tabCardPublic { @@ -101,13 +111,30 @@ } .tabCardPublic .icon { - width: 156rpx; + width: 192rpx; height: 48rpx; + position: relative; } -.tabCardPublic .icon .t-image { - width: 100%; - height: 100% +.iconOne .icon { + width: 156rpx; +} + +.iconTwo .icon { + width: 164rpx; +} + +.tabCardPublic .icon .iconImage { + width: auto; + height: auto; + max-width: 100%; + max-height: 100%; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + margin: auto; } .tabCardPublic .more { @@ -147,7 +174,7 @@ } .body-info { - padding: 20rpx; + padding: 16rpx; font-size: 28rpx; } @@ -192,14 +219,17 @@ color: #ff6d00; } +.t-tabs .t-tabs__item { + padding: 0 24rpx !important; +} + .t-tabs .t-tabs__item--active { color: #ff6d00; font-size: 30rpx; - /* background-image: url('/static/images/home/click-icon@2x.png'); */ background-repeat: no-repeat; - background-size: cover; - /* 纭繚鑳屾櫙鍥惧儚涓嶄細琚媺浼� */ - /* background-position: right; */ + background-size: 34% 64%; + background-position: right; + background-image: url(http://182.92.203.7:3007/jsek/website/image/click-icon.png); } .t-tabs .t-tabs__track { @@ -214,19 +244,22 @@ border: none !important; } +.t-tabs__item--evenly { + flex: 1 0 auto !important; +} + .listBox1, .listBox2 { padding: 30rpx 0; } .listBox1 .listItemBox { - height: 210rpx; margin-bottom: 30rpx; } .listBox1 .specialSubject-img { - width: 480rpx; - height: 210rpx; + width: 336rpx; + height: 205rpx; flex: 1; } @@ -236,8 +269,8 @@ .listBox1 .addCartImg, .listBox3 .addCartImg { - width: 30rpx; - height: 30rpx; + width: 32rpx; + height: 32rpx; } .listBox1 .priceBox { @@ -285,6 +318,10 @@ text-overflow: ellipsis; } +.classHours { + font-size: 26rpx; +} + .listBox2 .empyt { padding: 20rpx; box-sizing: border-box; @@ -313,7 +350,7 @@ height: 44rpx; color: #333333; font-weight: bold; - line-height: 44rpx; + line-height: 40rpx; display: -webkit-box; margin-bottom: 10rpx; -webkit-box-orient: vertical; @@ -323,10 +360,11 @@ } .listBox3 .introduction { + height: 70rpx; color: #B4B6BD; line-height: 36rpx; display: -webkit-box; - margin-bottom: 10rpx; + margin-bottom: 14rpx; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; @@ -335,7 +373,7 @@ .listBox3 .author { line-height: 40rpx; - margin-bottom: 30rpx; + margin-bottom: 20rpx; } .readList { @@ -384,4 +422,8 @@ text-overflow: ellipsis; /* 瓒呭嚭閮ㄥ垎鏄剧ず鐪佺暐鍙� */ white-space: normal; +} + +.t-loading__circular { + color: #ff6d00 !important; } \ No newline at end of file diff --git a/pages/personalCenter/index.wxml b/pages/personalCenter/index.wxml index 4a4b851..990b8f3 100644 --- a/pages/personalCenter/index.wxml +++ b/pages/personalCenter/index.wxml @@ -20,6 +20,7 @@ <text class="change-info" wx:if="{{teacherState.state == 'Normal' || teacherState.state == 'Reject'}}" bindtap="toCertification">淇敼</text> </view> </view> + <view class="line"></view> <view> <view>{{integral}}</view> <view class="title">绉垎</view> diff --git a/pages/personalCenter/index.wxss b/pages/personalCenter/index.wxss index e3c23ce..3ec75fb 100644 --- a/pages/personalCenter/index.wxss +++ b/pages/personalCenter/index.wxss @@ -1,7 +1,5 @@ page { background-color: #f0f2f5; - box-sizing: border-box; - padding-bottom: calc(env(safe-area-inset-bottom) + 96rpx); } .background { @@ -77,6 +75,12 @@ color: #1FBC1F } +.line { + width: 2rpx; + height: 90rpx; + background: linear-gradient(180deg, #FFFFFF 0%, #CCCFD8 52%, #FFFFFF 100%); +} + .domainBox { width: 100%; margin: 20rpx auto; diff --git a/pages/testLogin/index.json b/pages/testLogin/index.json index fd16c3b..10d1d0c 100644 --- a/pages/testLogin/index.json +++ b/pages/testLogin/index.json @@ -1,4 +1,5 @@ { + "navigationBarTitleText": "鐧诲綍", "usingComponents": { "t-input": "tdesign-miniprogram/input/input", "t-button": "tdesign-miniprogram/button/button" diff --git a/static/images/home/jingxuankecheng@2x.png b/static/images/home/jingxuankecheng2.png similarity index 100% rename from static/images/home/jingxuankecheng@2x.png rename to static/images/home/jingxuankecheng2.png Binary files differ diff --git a/static/images/home/paihangbang@2x.png b/static/images/home/paihangbang2.png similarity index 100% rename from static/images/home/paihangbang@2x.png rename to static/images/home/paihangbang2.png Binary files differ diff --git a/static/images/home/shuzijiaocai1@2x.png b/static/images/home/shuzijiaocai2.png similarity index 100% rename from static/images/home/shuzijiaocai1@2x.png rename to static/images/home/shuzijiaocai2.png Binary files differ diff --git a/static/images/home/shuziyuedu1@2x.png b/static/images/home/shuziyuedu2.png similarity index 100% rename from static/images/home/shuziyuedu1@2x.png rename to static/images/home/shuziyuedu2.png Binary files differ diff --git a/static/images/home/tushufuwu@2x.png b/static/images/home/tushufuwu2.png similarity index 100% rename from static/images/home/tushufuwu@2x.png rename to static/images/home/tushufuwu2.png Binary files differ diff --git a/static/images/home/zhuantitaolun.png b/static/images/home/zhuantitaolun.png deleted file mode 100644 index c8f758f..0000000 --- a/static/images/home/zhuantitaolun.png +++ /dev/null Binary files differ diff --git a/static/images/home/zhuantitaolun1@2x.png b/static/images/home/zhuantitaolun2.png similarity index 100% rename from static/images/home/zhuantitaolun1@2x.png rename to static/images/home/zhuantitaolun2.png Binary files differ -- Gitblit v1.9.1