From b10f56cafd2767ef89988877528ba8bff32f8f41 Mon Sep 17 00:00:00 2001 From: yiming <m13691596795@163.com> Date: 星期五, 01 三月 2024 09:53:25 +0800 Subject: [PATCH] feat(洒大山): 说的是 --- pages/bookServices/detail/components/brief/index.json | 6 pages/teacherCertification/index.wxml | 70 + pages/usercenter/index.wxss | 12 pages/bookServices/list/index.wxss | 115 ++ style/theme.wxss | 3 pages/personalCenter/components/user-center-card/index.json | 7 pages/bookServices/detail/components/brief/index.js | 12 pages/personalCenter/components/user-center-card/index.wxss | 2 static/images/personal/notification.png | 0 pages/bookServices/list/index.js | 397 +++++++ pages/personalCenter/myOrder/index.js | 3 pages/bookServices/detail/index.js | 246 ++++ pages/personalCenter/feedBackSubmit/index.js | 2 static/images/bookService/detail/book-brief.png | 0 static/images/bookService/detail/collect.png | 0 pages/personalCenter/sampleBooks/index.js | 2 static/images/home/shumuxiazai@2x.png | 0 pages/bookServices/detail/index.wxml | 162 +++ pages/personalCenter/certificate/index.json | 1 pages/personalCenter/certificate/index.js | 3 pages/personalCenter/components/user-center-card/index.js | 35 pages/bookServices/list/index.json | 10 static/images/bookService/detail/dangdang.png | 0 static/images/bookService/detail/tmall.png | 0 static/images/home/service-click@2x.png | 0 static/images/home/learn@2x.png | 0 static/images/home/zuoxia-p@2x.png | 0 pages/personalCenter/publishBooks/index.json | 1 static/images/home/learn-click@2x.png | 0 static/images/home/shuzijiaocai@2x.png | 0 static/images/personal/feedback.png | 0 app.wxss | 2 static/images/bookService/detail/collecting.png | 0 static/images/home/zhuantitaolun@2x.png | 0 static/images/bookService/assort/book-img.png | 0 static/images/home/shuziyuedu@2x.png | 0 pages/testLogin/index.js | 2 static/images/personal/contact.png | 0 pages/personalCenter/sampleBooks/index.json | 1 static/images/home/cart@2x.png | 0 static/images/personal/chushu.png | 0 pages/personalCenter/certificate/index.wxml | 2 static/images/home/shuzikecheng@2x.png | 0 static/images/home/xianshangshuzhan@2x.png | 0 pages/personalCenter/downloads/index.js | 2 static/images/home/Home-click@2x.png | 0 static/images/bookService/detail/electon-price.png | 0 static/images/home/zhuantitaolun1@2x.png | 0 static/images/home/shuziyuedu1@2x.png | 0 static/images/home/my@2x.png | 0 pages/bookServices/detail/index.wxss | 218 ++++ static/images/home/zhutichuban@2x.png | 0 pages/personalCenter/downloads/index.json | 1 app.json | 29 static/images/home/yangshushenqing@2x.png | 0 pages/bookServices/detail/components/brief/index.wxss | 23 pages/cart/components/cart-bar/index.json | 1 pages/personalCenter/myCollection/index.js | 3 pages/bookServices/detail/index.json | 10 assets/request/index.js | 6 static/images/bookService/detail/jd.png | 0 static/images/home/my-click@2x.png | 0 static/images/home/click-icon@2x.png | 0 assets/js/middleGround/api/identity.js | 16 static/images/home/home-cart.png | 0 pages/personalCenter/myMassage/index.json | 9 static/images/personal/my-bg.png | 0 pages/personalCenter/myCollection/index.json | 1 static/images/home/cart-click@2x.png | 0 pages/personalCenter/activateProduct/index.json | 1 pages/personalCenter/feedBack/index.js | 2 static/images/home/tushufuwu@2x.png | 0 static/images/bookService/detail/ebook.png | 0 services/home/home.js | 26 pages/personalCenter/activateProduct/index.js | 2 pages/personalCenter/index.wxml | 72 + static/images/personal/about.png | 0 pages/bookServices/assort/index.wxml | 76 + pages/personalCenter/publishBooks/index.js | 2 static/images/home/service@2x.png | 0 pages/personalCenter/index.js | 9 pages/home/home.wxss | 295 +++++ pages/home/home.json | 5 static/images/bookService/detail/author.png | 0 custom-tab-bar/index.wxml | 29 static/images/personal/wodeshoucang.png | 0 static/images/bookService/detail/suggest.png | 0 custom-tab-bar/data.js | 17 pages/bookServices/detail/components/brief/index.wxml | 26 static/images/home/xueshuzhuzuo@2x.png | 0 pages/teacherCertification/index.json | 3 static/images/home/jingxuankecheng@2x.png | 0 pages/home/home.js | 292 +++++ pages/teacherCertification/index.wxss | 37 static/images/home/zhuantitaolun.png | 0 static/images/personal/upload.png | 0 pages/bookServices/list/index.wxml | 74 + pages/personalCenter/feedBack/index.json | 1 pages/bookServices/assort/index.js | 178 +++ static/images/personal/download.png | 0 static/images/personal/order.png | 0 static/images/personal/certificate.png | 0 pages/personalCenter/myCollection/index.wxml | 3 app.js | 6 assets/js/userAction.js | 18 pages/personalCenter/index.wxss | 139 ++ static/images/bookService/detail/paper-price.png | 0 assets/js/config.js | 2 pages/teacherCertification/index.js | 3 pages/bookServices/assort/index.wxss | 129 ++ static/images/home/home-bg@2x.png | 0 pages/home/home.wxml | 184 +++ custom-tab-bar/index.json | 3 pages/personalCenter/feedBackSubmit/index.json | 1 pages/personalCenter/myOrder/index.json | 1 custom-tab-bar/index.wxss | 3 static/images/home/jiaoshirenzheng@2x.png | 0 static/images/personal/setting.png | 0 pages/personalCenter/index.json | 8 static/images/personal/yangshushenqing.png | 0 static/images/bookService/detail/paper-book.png | 0 static/images/home/shuzijiaocai1@2x.png | 0 /dev/null | 0 pages/bookServices/assort/index.json | 17 static/images/home/paihangbang@2x.png | 0 static/images/bookService/detail/label.png | 0 static/images/home/Home@2x.png | 0 static/images/personal/jihuo.png | 0 pages/personalCenter/myMassage/index.js | 1 129 files changed, 2,935 insertions(+), 145 deletions(-) diff --git a/app.js b/app.js index 09258b6..1f62230 100644 --- a/app.js +++ b/app.js @@ -1,7 +1,9 @@ import updateManager from './common/updateManager'; -import MG from './assets/js/middleGround/WebMiddleGroundApi' +import MG from './assets/js/middleGround/WebMiddleGroundApi'; +import config from './assets/js/config'; App({ - MG:MG, + MG: MG, + config: config, onLaunch: function () { }, onShow: function () { updateManager(); diff --git a/app.json b/app.json index 430bd80..1c8cfeb 100644 --- a/app.json +++ b/app.json @@ -3,7 +3,9 @@ "pages/cart/index", "pages/home/home", "pages/aboutUs/index", - "pages/bookServices/index", + "pages/bookServices/assort/index", + "pages/bookServices/detail/index", + "pages/bookServices/list/index", "pages/bookExhibitionList/index", "pages/bookExhibitionDetails/index", "pages/bibliographyList/index", @@ -58,30 +60,39 @@ "list": [ { "pagePath": "pages/home/home", - "text": "棣栭〉" + "text": "棣栭〉", + "iconPath": "/static/images/home/Home@2x.png", + "selectedIconPatn": "/static/images/home/Home-click@2x.png" }, { - "pagePath": "pages/bookServices/index", - "text": "鍥句功鏈嶅姟" + "pagePath": "pages/bookServices/assort/index", + "text": "鍥句功鏈嶅姟", + "iconPath": "/static/images/home/service@2x.png", + "selectedIconPatn": "/static/images/home/service-click@2x.png" }, { "pagePath": "pages/goods/category/index", - "text": "瀛︿範" + "text": "瀛︿範", + "iconPath": "/static/images/home/learn@2x.png", + "selectedIconPatn": "/static/images/home/learn-click@2x.png" }, { "pagePath": "pages/cart/index", - "text": "璐墿杞�" + "text": "璐墿杞�", + "iconPath": "/static/images/home/cart@2x.png", + "selectedIconPatn": "/static/images/home/cart-click@2x.png" }, { - "pagePath": "pages/usercenter/index", - "text": "鎴戠殑" + "pagePath": "pages/personalCenter/index", + "text": "鎴戠殑", + "iconPath": "/static/images/home/my@2x.png", + "selectedIconPatn": "/static/images/home/my-click@2x.png" } ] }, "requiredPrivateInfos": [ "chooseAddress" ], - "lazyCodeLoading": "requiredComponents", "usingComponents": {}, "window": { "backgroundTextStyle": "light", diff --git a/app.wxss b/app.wxss index 9ff2554..66a6b86 100644 --- a/app.wxss +++ b/app.wxss @@ -1,3 +1,3 @@ @import 'style/iconfont.wxss'; -@import 'style/theme.wxss'; \ No newline at end of file +@import 'style/theme.wxss'; diff --git a/assets/js/config.js b/assets/js/config.js index e118a6b..c521369 100644 --- a/assets/js/config.js +++ b/assets/js/config.js @@ -16,7 +16,7 @@ export const reg_tel = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/; // 鐢佃瘽鍙锋鍒� -export const reg_telphone =/^0\d{2}-\d{8}$|^0\d{3}-\d{7}$/; //搴ф満鍙锋鍒� +export const reg_telphone = /^0\d{2}-\d{8}$|^0\d{3}-\d{7}$/; //搴ф満鍙锋鍒� export const fontUrl = "http://192.168.3.132:5173"; // export const fontUrl = "http://182.92.203.7:3007/jsek/website"; // export const fontUrl = "http://jsysf.bnuic.com/website"; diff --git a/assets/js/middleGround/api/identity.js b/assets/js/middleGround/api/identity.js index e878091..7b4117c 100644 --- a/assets/js/middleGround/api/identity.js +++ b/assets/js/middleGround/api/identity.js @@ -123,6 +123,15 @@ }); }, + //妫�鏌ュ井淇″皬绋嬪簭鏄惁娉ㄥ唽 + checkWeChatAppAccount(data) { + return request({ + url: "/identity/api/CheckWeChatAppAccount", + method: "post", + data, + }); + }, + // 閫氳繃鎵嬫満鍙烽噸缃瘑鐮� changePasswordByMobilePhone(data) { @@ -159,6 +168,13 @@ data, }); }, + loginByWeChatAppCode(data) { + return request({ + url: "/identity/api/LoginByWeChatAppCode", + method: "post", + data, + }); + }, // 鑾峰彇閭楠岃瘉鐮� getEmailCode(data) { diff --git a/assets/js/userAction.js b/assets/js/userAction.js index 8ecf23a..65472a7 100644 --- a/assets/js/userAction.js +++ b/assets/js/userAction.js @@ -1,6 +1,5 @@ -import config from "@/assets/js/config.js"; - -import jobApi from "./middleGround/api/job"; // newJobWithNewView // newSession, +import config from "./config.js"; +import jobApi from "./middleGround/api/job";// newJobWithNewView // newSession, export function setSessionGuid(type, id) { var cityCode = null; @@ -34,7 +33,7 @@ }; jobApi.newSession(params).then(res => { - storage.set("sessionGuid", res, 30); + wx.setStorageSync("sessionGuid", res); setNewView(type, id); }); } @@ -112,13 +111,12 @@ } export function setNewView(type, id) { - if (!sessionStorage.getItem("sessionGuid")) { + if (!wx.getStorageSync("sessionGuid")) { setSessionGuid(type, id); } - - const sessionGuid = sessionStorage.getItem("sessionGuid"); - const fromPath = sessionStorage.getItem("fromPath"); - const toPath = sessionStorage.getItem("toPath"); + const sessionGuid = wx.getStorageSync("sessionGuid"); + const fromPath = wx.getStorageSync("fromPath"); + const toPath = wx.getStorageSync("toPath"); if (sessionGuid) { let params = { sessionGuid: sessionGuid, @@ -130,6 +128,6 @@ if (id) { params[type] = id; } - jobApi.newJobWithNewView(params).then(res => {}); + jobApi.newJobWithNewView(params).then(res => { }); } } \ No newline at end of file diff --git a/assets/request/index.js b/assets/request/index.js index d881bc1..f782c3a 100644 --- a/assets/request/index.js +++ b/assets/request/index.js @@ -1,6 +1,6 @@ import config from "../js/config" - - +let clearStorage = false; +let timer = null; const request = (params) => { let fullUrl = `${config.requestCtx}${params.url}` let token = wx.getStorageSync(config.tokenKey) ? wx.getStorageSync(config.tokenKey) : '' @@ -38,7 +38,7 @@ } currentUrl = JSON.stringify(currentUrl) wx.reLaunch({ - url: urlargs ? '/pages/index/index?backUrl=' + encodeURIComponent(currentUrl) : '/pages/index/index' + url: urlargs ? '/pages/home/home?backUrl=' + encodeURIComponent(currentUrl) : '/pages/home/home' }) } } else { diff --git a/custom-tab-bar/data.js b/custom-tab-bar/data.js index 34da94e..e13c724 100644 --- a/custom-tab-bar/data.js +++ b/custom-tab-bar/data.js @@ -1,28 +1,33 @@ export default [ { - icon: 'home', text: '棣栭〉', url: 'pages/home/home', + icon: '/static/images/home/Home@2x.png', + activeIcon: '/static/images/home/Home-click@2x.png' }, { - icon: 'sort', text: '鍥句功鏈嶅姟', - url: 'pages/bookServices/index' + url: 'pages/bookServices/assort/index', + icon: '/static/images/home/service@2x.png', + activeIcon: '/static/images/home/service-click@2x.png' }, { - icon: 'sort', text: '瀛︿範', url: 'pages/goods/category/index', + icon: '/static/images/home/learn@2x.png', + activeIcon: '/static/images/home/learn-click@2x.png' }, { - icon: 'cart', text: '璐墿杞�', url: 'pages/cart/index', + icon: '/static/images/home/cart@2x.png', + activeIcon: '/static/images/home/cart-click@2x.png' }, { - icon: 'person', text: '涓汉涓績', url: 'pages/personalCenter/index', + icon: '/static/images/home/my@2x.png', + activeIcon: '/static/images/home/my-click@2x.png' }, ]; diff --git a/custom-tab-bar/index.json b/custom-tab-bar/index.json index c8ba0bd..eab5fb3 100644 --- a/custom-tab-bar/index.json +++ b/custom-tab-bar/index.json @@ -3,6 +3,7 @@ "usingComponents": { "t-tab-bar": "tdesign-miniprogram/tab-bar/tab-bar", "t-tab-bar-item": "tdesign-miniprogram/tab-bar-item/tab-bar-item", - "t-icon": "tdesign-miniprogram/icon/icon" + "t-icon": "tdesign-miniprogram/icon/icon", + "t-image": "tdesign-miniprogram/image/image" } } \ No newline at end of file diff --git a/custom-tab-bar/index.wxml b/custom-tab-bar/index.wxml index 384fd2f..01c11e0 100644 --- a/custom-tab-bar/index.wxml +++ b/custom-tab-bar/index.wxml @@ -1,18 +1,11 @@ -<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="index" - > - <view class="custom-tab-bar-wrapper"> - <t-icon prefix="wr" name="{{item.icon}}" size="48rpx" /> - <view class="text">{{ item.text }}</view> - </view> - </t-tab-bar-item> -</t-tab-bar> - +<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="index"> + <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" /> + <view class="text">{{ item.text }}</view> + </view> + </t-tab-bar-item> +</t-tab-bar> \ No newline at end of file diff --git a/custom-tab-bar/index.wxss b/custom-tab-bar/index.wxss index 3b855f5..ebc4be3 100644 --- a/custom-tab-bar/index.wxss +++ b/custom-tab-bar/index.wxss @@ -6,4 +6,5 @@ .custom-tab-bar-wrapper .text { font-size: 20rpx; -} + margin-top: 10rpx; +} \ No newline at end of file diff --git a/pages/bookServices/assort/index.js b/pages/bookServices/assort/index.js new file mode 100644 index 0000000..024fe3d --- /dev/null +++ b/pages/bookServices/assort/index.js @@ -0,0 +1,178 @@ +// pages/bookServices/assort/index.js +const app = getApp(); +Page({ + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + assortList: [], + assortCheck: { + name: '', + code: '', + }, + startList: [], + startCheck: '', + bookList: [], + listLoding: false, + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + // this.getAssortList() + console.log(options); + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() {}, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + this.getAssortList(); + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() {}, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() {}, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() {}, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() {}, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() {}, + + // 鑾峰彇渚ц竟鏍忓垪琛� + getAssortList() { + const query = { + path: '*', + filterList: [ + { + value: 'Normal', + field: 'state', + }, + ], + queryType: '\\', + searchList: [], + size: '30', + start: '0', + storeRefCode: app.config.goodsStore, + sort: { type: 'Asc', field: 'LinkOrder' }, + }; + app.MG.store.getStoreChannelList(query).then((res) => { + const list = res.datas.filter((item) => item.refCode != 'jsek_homepageBookService'); + this.setData({ + assortList: list, + }); + this.setData({ + assortCheck: { + name: res.datas[0].name, + code: res.datas[0].refCode, + }, + }); + this.getStairList(res.datas[0].refCode); + }); + }, + // 渚ц竟鏍忓垏鎹� + changeAssort(data) { + this.setData({ + assortCheck: { + name: data.detail.label, + code: data.detail.value, + }, + }); + this.getStairList(data.detail.value); + }, + // 鑾峰彇涓�绾у垎绫� + getStairList(path) { + this.setData({ + listLoding: true, + }); + const query = { + path, + filterList: [], + queryType: '\\', + searchList: [], + size: '30', + start: '0', + storeRefCode: app.config.goodsStore, + sort: { type: 'Asc', field: 'LinkOrder' }, + }; + app.MG.store.getStoreChannelList(query).then(async (res) => { + // 涓�绾у垎绫婚�変腑 + this.setData({ + startCheck: res.datas[0].refCode, + }); + // 鑾峰彇浜岀骇鍒嗙被 + for (let index = 0; index < res.datas.length; index++) { + const item = res.datas[index]; + item.children = await this.getSecondList(item); + } + // 涓�绾у垎绫昏祴鍊� + this.setData({ + startList: res.datas, + }); + }); + this.setData({ + listLoding: false, + }); + }, + + // 鑾峰彇涓�绾у垎绫讳笅浜岀骇鍒嗙被 + async getSecondList(tab) { + const path = `${this.data.assortCheck.code}\\${tab.refCode}`; + let datas; + const query = { + path, + filterList: [], + queryType: '\\', + searchList: [], + size: '30', + start: '0', + storeRefCode: app.config.goodsStore, + sort: { type: 'Asc', field: 'LinkOrder' }, + }; + await app.MG.store.getStoreChannelList(query).then((res) => { + datas = res.datas; + }); + return datas; + }, + tabClick(tabData) { + const data = tabData.currentTarget.dataset.tabdata; + this.setData({ + startCheck: data.refCode, + }); + }, + // 璺宠浆鍒楄〃椤� + goPageList(item) { + const secondCode = `${item.currentTarget.dataset.staircode.pathLinks[0].linkPath}\\${item.currentTarget.dataset.staircode.id}`; + wx.navigateTo({ + url: `/pages/bookServices/list/index?assorName=${this.data.assortCheck.name}&assortCode=${this.data.assortCheck.code}&stairCode=${this.data.startCheck}&secondCode=${secondCode}`, + }); + }, + navToSearchPage(e) { + console.log(e.detail.value); + wx.navigateTo({ + url: `/pages/bookServices/list/index?assorName=${this.data.assortCheck.name}&assortCode=${this.data.assortCheck.code}&stairCode=${this.data.startCheck}&searchValue=${e.detail.value}`, + }); + }, +}); diff --git a/pages/bookServices/assort/index.json b/pages/bookServices/assort/index.json new file mode 100644 index 0000000..56ee96c --- /dev/null +++ b/pages/bookServices/assort/index.json @@ -0,0 +1,17 @@ +{ + "navigationBarTitleText": "鍥句功鏈嶅姟", + "onReachBottomDistance": 10, + "backgroundTextStyle": "light", + "enablePullDownRefresh": true, + "usingComponents": { + "t-search": "tdesign-miniprogram/search/search", + "t-icon": "tdesign-miniprogram/icon/icon", + "t-side-bar": "tdesign-miniprogram/side-bar/side-bar", + "t-side-bar-item": "tdesign-miniprogram/side-bar-item/side-bar-item", + "t-radio": "tdesign-miniprogram/radio/radio", + "t-radio-group": "tdesign-miniprogram/radio-group/radio-group", + "t-button": "tdesign-miniprogram/button/button", + "t-loading": "tdesign-miniprogram/loading/loading", + "t-image": "/components/webp-image/index" + } +} diff --git a/pages/bookServices/assort/index.wxml b/pages/bookServices/assort/index.wxml new file mode 100644 index 0000000..bd6d2dd --- /dev/null +++ b/pages/bookServices/assort/index.wxml @@ -0,0 +1,76 @@ +<!--鍥句功鏈嶅姟鍒嗙被--> +<view class="page-header"> + <!-- 鎼滅储妗� --> + <view class="search"> + <t-search + t-class-input="t-search__input" + t-class-input-container="t-search__input-container" + placeholder="璇疯緭鍏ュ叧閿瘝/涔﹀悕/ISBN/浣滆��" + leftIcon="" + bind:submit="navToSearchPage" + > + <t-icon slot="left-icon" prefix="wr" name="search" size="40rpx" color="#bbb" /> + </t-search> + </view> +</view> + +<view class="page-container"> + <view class="side-bar-wrapper"> + <view class="tab-left"> + <t-side-bar value="{{assortCheck.code}}" bind:change="changeAssort"> + <t-side-bar-item + wx:for="{{assortList}}" + wx:key="id" + value="{{item.refCode}}" + label="{{item.name}}" + badge-props="{{item.badgeProps}}" + /> + </t-side-bar> + </view> + <view class="side-bar-content"> + <!-- 涓�绾у垎绫� --> + <view class="tab-top"> + <scroll-view scroll-x="{{true}}" class="myScroll"> + <view + wx:for="{{startList}}" + wx:key="id" + class="row {{startCheck == item.refCode ? 'tab-active' : ''}}" + bind:tap="tabClick" + data-tabData="{{item}}" + wx:if="{{item.children.length}}" + >{{item.name}}</view + > + </scroll-view> + </view> + <!-- 鍐呭 --> + <scroll-view scroll-y="{{true}}" class="class-list" scroll-into-view="{{startCheck}}"> + <view wx:if="{{listLoading}}"> + <t-loading theme="spinner" size="400rpx" loading="{{listLoading}}"></t-loading> + </view> + <view + wx:for="{{startList}}" + wx:for-item="item" + wx:key="item.refCode" + id="{{item.refCode}}" + class="class-box" + wx:if="{{item.children.length && !listLoading}}" + > + <view class="class-name">{{item.name}}</view> + <view class="class-content"> + <view + wx:for="{{item.children}}" + wx:for-item="citem" + wx:key="id" + class="book-box" + bind:tap="goPageList" + data-stairCode="{{citem}}" + > + <t-image src="/static/images/bookService/assort/book-img.png" mode="heightFix" width="58" height="72" /> + <view class="classify">{{citem.name}}</view> + </view> + </view> + </view> + </scroll-view> + </view> + </view> +</view> diff --git a/pages/bookServices/assort/index.wxss b/pages/bookServices/assort/index.wxss new file mode 100644 index 0000000..3c71ffe --- /dev/null +++ b/pages/bookServices/assort/index.wxss @@ -0,0 +1,129 @@ +page { + box-sizing: border-box; + padding-bottom: calc(env(safe-area-inset-bottom) + 96rpx); +} + +.page-header { + position: relative; +} + +.search { + position: absolute; + top: 20rpx; + left: 0; + width: 100%; + z-index: 99; +} + +.page-header .t-search__input-container { + border-radius: 15rpx !important; + margin: 0 24rpx; + height: 64rpx !important; +} + +.page-container { + padding: 120rpx 0 20rpx 0; + width: 100%; +} + +.side-bar-wrapper { + background-color: #f2f3f8; + display: flex; +} + +.side-bar-content { + width: 70%; + padding: 0 20rpx; +} + +.tab-left { + --td-side-bar-font-size: 14px; + /* 閫変腑鏂囧瓧棰滆壊 */ + --td-side-bar-active-color: #ff6c00; + /* 鏁翠綋鑳屾櫙 */ + --td-side-bar-bg-color: #fff; + /* 閫変腑鑳屾櫙 */ + --td-bg-color-container: #f2f3f8; + /* 鏈�変腑鏂囧瓧棰滆壊 */ + --td-side-bar-color: '#333' +} + +.tab-top { + overflow-x: scroll; +} + +.tab-active { + background-color: #ff6c00 !important; + color: #fff; +} + +.myScroll { + /* 鐩掑瓙鐨勬牱寮� */ + width: 100%; + height: 98rpx; + white-space: nowrap; +} + +.myScroll .row { + font-size: 14px; + padding: 10rpx 14rpx; + margin: 20rpx 0; + border-radius: 10rpx; + /* 瀹氫箟姣忎釜瀛愪欢 */ + height: 40rpx; + background: #fff; + margin-right: 20rpx; + display: inline-block; +} + +.myScroll .row:last-child { + /* 閫夋嫨鏈�鍚庝竴涓瓙浠� 娓呴浂杈硅窛 */ + margin-right: 0; +} + +.class-list { + /* overflow-y: auto; */ + height: 72.5vh; + width: 262px; +} + +.class-box { + background-color: #fff; + margin-bottom: 10rpx; + padding: 10rpx 12rpx; + border-radius: 12rpx; + /* height: 60rpx; */ +} + +.class-name { + font-size: 32rpx; + font-weight: 700; +} + +.class-content { + display: flex; + flex-wrap: wrap; + padding: 5rpx 20rpx 30rpx 30rpx; +} + +.book-box { + width: 140rpx; + margin-right: 10rpx; +} + +.book-box:nth-child(3n) { + margin-right: 0; +} + +.book-box image { + width: 58px; + height: 70px; +} + +.classify { + max-width: 90%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + font-size: 14px; +} \ No newline at end of file diff --git a/pages/bookServices/detail/components/brief/index.js b/pages/bookServices/detail/components/brief/index.js new file mode 100644 index 0000000..4eeb653 --- /dev/null +++ b/pages/bookServices/detail/components/brief/index.js @@ -0,0 +1,12 @@ +Component({ + properties: { + content: { + type: String, + value: '', + }, + authorIntroduction: { + type: String, + value: '', + }, + }, +}); diff --git a/pages/bookServices/detail/components/brief/index.json b/pages/bookServices/detail/components/brief/index.json new file mode 100644 index 0000000..7d15281 --- /dev/null +++ b/pages/bookServices/detail/components/brief/index.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + "t-image": "tdesign-miniprogram/image/image" + }, + "component": true +} diff --git a/pages/bookServices/detail/components/brief/index.wxml b/pages/bookServices/detail/components/brief/index.wxml new file mode 100644 index 0000000..77b7c89 --- /dev/null +++ b/pages/bookServices/detail/components/brief/index.wxml @@ -0,0 +1,26 @@ +<view class="message"> + <view class="basic"> + <view class="basic-title"> + <view> + <t-image src="/static/images/bookService/detail/label.png"></t-image> + </view> + <view class="title-name">鍩烘湰淇℃伅</view> + </view> + <rich-text + nodes="{{content}}" + style="font-size: 28rpx; color: #333; line-height: 48rpx; text-align: justify" + ></rich-text> + </view> + <view class="basic"> + <view class="basic-title"> + <view> + <t-image src="/static/images/bookService/detail/author.png"></t-image> + </view> + <view class="title-name">浣滆�呯畝浠�</view> + </view> + </view> + <rich-text + nodes="{{authorIntroduction}}" + style="font-size: 28rpx; color: #333; line-height: 48rpx; text-align: justify" + /> +</view> diff --git a/pages/bookServices/detail/components/brief/index.wxss b/pages/bookServices/detail/components/brief/index.wxss new file mode 100644 index 0000000..57980bf --- /dev/null +++ b/pages/bookServices/detail/components/brief/index.wxss @@ -0,0 +1,23 @@ +/* pages/bookServices/detail/components/brief/index.wxss */ +.message { + padding: 0 40rpx 40rpx 40rpx; +} + +.message image { + width: 42rpx; + height: 48rpx; +} + +.basic-title { + margin-top: 40rpx; + display: flex; + align-items: center; + margin-bottom: 24rpx; +} + +.title-name { + margin-left: 18rpx; + font-size: 32rpx; + color: #333; + font-weight: bold; +} \ No newline at end of file diff --git a/pages/bookServices/detail/index.js b/pages/bookServices/detail/index.js new file mode 100644 index 0000000..324478a --- /dev/null +++ b/pages/bookServices/detail/index.js @@ -0,0 +1,246 @@ +// pages/bookServices/detail/index.js +import Message from 'tdesign-miniprogram/message/index'; +const app = getApp(); +Page({ + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + barHeight: '', + navBarHeight: '', + options: { + id: '', + name: '', + }, + bookDetail: {}, + link: { + jd: '', + tamll: '', + dang: '', + micro: '', + }, + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + const systInfo = wx.getSystemInfoSync(); + const menu = wx.getMenuButtonBoundingClientRect(); // 鑳跺泭淇℃伅 + const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 瀵艰埅鏍忛珮搴� + this.setData({ + barHeight: systInfo.statusBarHeight, + navBarHeight: navBarHeight, + }); + this.setData({ + options: { + id: options.id, + name: options.name, + }, + }); + this.getBookInfo(options.id); + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() {}, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() {}, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() {}, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() {}, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() {}, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() {}, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() {}, + // 鏍煎紡鍖栨棩鏈� + formatDate(dateString) { + if (!dateString) { + return 'Invalid date'; + } + const match = dateString.match(/^(\d{4})\/(\d{1,2})\/(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/); + if (!match) { + throw new Error('Invalid date format'); + } + + const [, year, month, day, hours, minutes, seconds] = match; + const date = new Date( + parseInt(year, 10), + parseInt(month, 10) - 1, + parseInt(day, 10), + parseInt(hours, 10), + parseInt(minutes, 10), + parseInt(seconds, 10), + ); + + if (isNaN(date.getTime())) { + throw new Error('Invalid date'); + } + + // 鐢变簬灏忕▼搴忕幆澧冨彲鑳戒笉鏀寔 Intl.DateTimeFormat锛屾垜浠娇鐢ㄧ畝鍖栫殑鏍煎紡鍖栨柟娉� + const formatted = `${year}骞�${this.formatMonth(month)}`; + return formatted; + }, + // 绠�鍖栫殑鏈堜唤鏍煎紡鍖栧嚱鏁帮紝杩斿洖鏈堜唤鐨勪腑鏂囪〃杈� + formatMonth(month) { + const months = ['1鏈�', '2鏈�', '3鏈�', '4鏈�', '5鏈�', '6鏈�', '7鏈�', '8鏈�', '9鏈�', '10鏈�', '11鏈�', '12鏈�']; + return months[parseInt(month, 10) - 1]; + }, + // 閲戦鏄剧ず.00鏍煎紡 + numFormat(value) { + if (!value) return '0.00'; + value = Number(value).toFixed(2); + var intPart = Math.trunc(value); // 鑾峰彇鏁存暟閮ㄥ垎 + var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,'); // 灏嗘暣鏁伴儴鍒嗛�笁涓�鏂� + var floatPart = '.00'; // 棰勫畾涔夊皬鏁伴儴鍒� + var value2Array = value.split('.'); + // =2琛ㄧず鏁版嵁鏈夊皬鏁颁綅 + if (value2Array.length === 2) { + floatPart = value2Array[1].toString(); // 鎷垮埌灏忔暟閮ㄥ垎 + if (floatPart.length === 1) { + return `${intPartFormat}.${floatPart}0`; + } + return `${intPartFormat}.${floatPart}`; + } + return intPartFormat + floatPart; + }, + // 杩斿洖 + goBack() { + wx.navigateBack(); + }, + // 鑾峰彇鍥句功璇︽儏 + getBookInfo(id) { + const query = { + path: '*', + queryType: '*', + productId: id, + favoriteTypes: 'FavoriteBookCity', + itemFields: { + 'SysType=': 'CmsFolder', + }, + coverSize: { + height: 300, + }, + fields: { + seriesName: [], + author: [], + isbn: [], + publicationDate: [], + bookClassification: [], + paperPrice: [], + JDLink: [], + tmallLink: [], + dangdangLink: [], + weidianLink: [], + content: [], + authorIntroduction: [], + // isApplyPaperBook: [], + // isApplyEBook: [], + isApplyBook: [], + isSell: [], + pdf: [], + protectedEpub: [], + probationPage: [], //pdf璇曡椤垫暟 + freeEpubPage: [], //epub璇曡鐧惧垎姣� + }, + }; + app.MG.store.getProductDetail(query).then((res) => { + this.setData({ + bookDetail: res.datas, + }); + console.log('璇︽儏', res.datas); + // 鑾峰彇鍥句功鍒嗙被 + const iconType = JSON.parse(res.datas.bookClassification)[0][0]; + const classType = JSON.parse(res.datas.bookClassification)[0][1]; + this.setData({ + 'bookDetail.publicationDate': this.formatDate(this.data.bookDetail.publicationDate), + 'bookDetail.class': this.getBookClass(iconType, classType), + 'bookDetail.price': this.numFormat(this.data.bookDetail.price), + 'bookDetail.oldPrice': this.numFormat(this.data.bookDetail.oldPrice), + 'bookDetail.paperPrice': this.numFormat(this.data.bookDetail.paperPrice), + }); + }); + }, + // 鑾峰彇鍥句功鍒嗙被 + getBookClass(iconType, classType) { + let name = ''; + const query = { + refCodes: ['bookClassification'], + }; + app.MG.store.getProductTypeField(query).then((res) => { + JSON.parse(res[0].config).option.forEach((item) => { + if (item.value == iconType) { + item.child.forEach((item) => { + if (item.value == classType) { + name = item.name; + } + }); + } + }); + }); + return name; + }, + // 鏀惰棌 + setCollect() { + if (this.data.bookDetail.isFavourite) { + app.MG.store + .delProductLink({ + productIds: [this.data.bookDetail.id], + linkType: 'FavoriteBookCity', + }) + .then(() => { + this.data.bookDetail.isFavourite = false; + Message.success({ + context: this, + offset: ['20rpx', '32rpx'], + duration: 2000, + content: '鍙栨秷鏀惰棌', + }); + }); + } else { + const params = { + productIds: [this.data.bookDetail.id], + linkType: 'FavoriteBookCity', + }; + app.MG.store.addProductLink(params).then((res) => { + console.log(res); + this.data.bookDetail.isFavourite = true; + Message.success({ + context: this, + offset: ['20rpx', '32rpx'], + duration: 2000, + content: '鏀惰棌鎴愬姛', + }); + }); + } + }, + // 璺宠浆缃戝簵 + goShop(e) { + const { link } = e.currentTarget.dataset; + wx.navigateTo({ + url: link, + }); + }, +}); diff --git a/pages/bookServices/detail/index.json b/pages/bookServices/detail/index.json new file mode 100644 index 0000000..09e62ae --- /dev/null +++ b/pages/bookServices/detail/index.json @@ -0,0 +1,10 @@ +{ + "usingComponents": { + "t-icon": "tdesign-miniprogram/icon/icon", + "t-image": "tdesign-miniprogram/image/image", + "t-tabs": "tdesign-miniprogram/tabs/tabs", + "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel", + "book-brief": "/pages/bookServices/detail/components/brief/index" + }, + "navigationStyle": "custom" +} diff --git a/pages/bookServices/detail/index.wxml b/pages/bookServices/detail/index.wxml new file mode 100644 index 0000000..9788ffb --- /dev/null +++ b/pages/bookServices/detail/index.wxml @@ -0,0 +1,162 @@ +<!--pages/bookServices/detail/index.wxml--> +<!--瀵艰埅鍖哄煙 --> +<view style="width: 100%; height: {{barHeight}}px; "></view> +<view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;"> + <view> + <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" /> + </view> + <view class="navbar-title">{{options.name}}</view> +</view> +<scroll-view scroll-y="{{true}}" class="book"> + <!-- 鍥句功璇︽儏 --> + <view class="book-box"> + <view class="book-detail"> + <view class="detail-left"> + <view class="book-img"> + <t-image + src="{{bookDetail.icon}}" + mode="aspectFill" + width="120" + height="170" + aria-label="{{bookDetail.name}}" + /> + </view> + <view class="book-use"> + <view class="collect" bind:tap="setCollect"> + <view> + <t-image + src="/static/images/bookService/detail/collect.png" + wx:if="{{!bookDetail.isFavourite}}" + ></t-image> + <t-image + src="/static/images/bookService/detail/collecting.png" + wx:if="{{bookDetail.isFavourite}}" + ></t-image> + </view> + <view>鏀惰棌</view> + </view> + <view class="suggest"> + <view> + <t-image src="/static/images/bookService/detail/suggest.png"></t-image> + </view> + <view>鎴戣寤鸿</view> + </view> + </view> + </view> + <view class="detail-right"> + <view class="book-name">{{bookDetail.name}}</view> + <view class="book-message"> + <view class="message-li"> + <view class="li-title">涓涗功鍚嶏細</view> + <view class="li-content">{{bookDetail.seriesName}}</view> + </view> + <view class="message-li"> + <view class="li-title">浣滆�咃細</view> + <view class="li-content">{{bookDetail.author}}</view> + </view> + <view class="message-li"> + <view class="li-title">ISBN锛�</view> + <view class="li-content">{{bookDetail.isbn}}</view> + </view> + <view class="message-li"> + <view class="li-title">鍑虹増鏃堕棿锛�</view> + <view class="li-content">{{bookDetail.publicationDate}}</view> + </view> + <view class="message-li"> + <view class="li-title">鍥句功鍒嗙被锛�</view> + <view class="li-content">{{bookDetail.class}}</view> + </view> + </view> + </view> + </view> + <!-- 閿�鍞俊鎭� --> + <view class="book-sale"> + <view class="book-price"> + <!-- 鐢靛瓙涔﹀敭浠� --> + <view class="electron-price"> + <view> + <t-image src="/static/images/bookService/detail/electon-price.png"></t-image> + </view> + <view class="price"> + <view>楼{{bookDetail.price}}</view> + <view class="price-old">楼{{bookDetail.oldPrice}} <view class="line"></view> </view> + </view> + <view> </view> + </view> + <!-- 绾歌川涔﹀敭浠� --> + <view class="paper-price"> + <view> + <t-image src="/static/images/bookService/detail/paper-price.png"></t-image> + </view> + <view class="price">楼{{bookDetail.paperPrice}}</view> + </view> + </view> + <!-- 缃戝簵 --> + <view class="book-web"> + <t-image + src="/static/images/bookService/detail/jd.png" + wx:if="{{bookDetail.JDLink}}" + bind:tap="goShop" + data-link="{{bookDetail.tmallLink}}" + data-type="jd" + ></t-image> + <t-image + src="/static/images/bookService/detail/tmall.png" + width="32" + height="22" + bind:tap="goShop" + data-link="{{bookDetail.tmallLink}}" + wx:if="{{bookDetail.tmallLink}}" + ></t-image> + <t-image + src="/static/images/bookService/detail/dangdang.png" + bind:tap="goShop" + data-link="{{bookDetail.dangdangLink}}" + wx:if="{{bookDetail.dangdangLink}}" + ></t-image> + <t-image + src="/static/images/bookService/detail/jd.png" + bind:tap="goShop" + data-link="{{bookDetail.weidianLink}}" + wx:if="{{bookDetail.weidianLink}}" + ></t-image> + </view> + </view> + </view> + <view class="book-resource"> + <t-tabs + defaultValue="{{0}}" + bind:change="onTabsChange" + bind:click="onTabsClick" + t-class="custom-tabs" + t-class-content="custom-panel" + > + <t-tab-panel label="鍥句功绠�浠�" value="0" style="{{tabPanelstyle}}"> + <book-brief + content="{{bookDetail.content}}" + authorIntroduction="{{bookDetail.authorIntroduction}}" + ></book-brief> + </t-tab-panel> + <t-tab-panel label="鐢靛瓙涔�" value="1" style="{{tabPanelstyle}}">閫夐」浜屽唴瀹�</t-tab-panel> + <t-tab-panel label="浜戝涔�" value="2" style="{{tabPanelstyle}}">閫夐」涓夊唴瀹�</t-tab-panel> + <t-tab-panel label="浜戞祴璇�" value="3" style="{{tabPanelstyle}}">閫夐」鍥涘唴瀹�</t-tab-panel> + </t-tabs> + </view> + <!-- 璐拱鎸夐挳 --> + <view class="box-bottom"> + <view class="bottom-btn"> + <view> + <t-image src="/static/images/bookService/detail/ebook.png"></t-image> + </view> + <view>鐢靛瓙鏍蜂功鐢宠</view> + </view> + <view class="bottom-btn"> + <view> + <t-image src="/static/images/bookService/detail/paper-book.png"></t-image> + </view> + <view>绾歌川鏍蜂功鐢宠</view> + </view> + <view class="shopCar">鍔犲叆璐墿杞�</view> + <view class="buy">绔嬪嵆璐拱</view> + </view> +</scroll-view> diff --git a/pages/bookServices/detail/index.wxss b/pages/bookServices/detail/index.wxss new file mode 100644 index 0000000..30834df --- /dev/null +++ b/pages/bookServices/detail/index.wxss @@ -0,0 +1,218 @@ +/* pages/bookServices/detail/index.wxss */ + + +.nacigationBar { + background-color: #fff; + display: flex; + align-items: center; +} + +.navbar-title { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + color: #0F1214; + font-size: 40rpx; + font-weight: bold; +} + +.book { + position: relative; + height: 81vh; + background-color: #F2F3F8; +} + +.book-detail { + padding: 32rpx; + display: flex; + border-radius: 0 0 20rpx 20rpx; +} + +.detail-left { + margin-right: 36rpx; +} + +.detail-right .book-name { + font-weight: bold; + font-size: 36rpx; + color: #000000; +} + +.book-message { + margin-top: 10rpx; +} + +.message-li { + font-size: 28rpx; + color: #333333; + display: flex; + height: 40rpx; + margin-bottom: 20rpx; +} + +.li-title { + width: 140rpx; +} + +.book-use { + margin-top: 16rpx; + display: flex; + justify-content: space-evenly; + font-size: 24rpx; + color: #949494; +} + +.collect, +.suggest { + display: flex; + flex-direction: column; + align-items: center; +} + +.book-use image { + width: 38rpx; + height: 38rpx; + margin-bottom: 8rpx; +} + +.book-box { + background: linear-gradient(to right, #FFB400, #FF6C00); + border-radius: 0 0 20rpx 20rpx; +} + +.book-detail { + background-color: #fff; +} + +/* 閿�鍞俊鎭� */ +.book-sale { + padding: 0 30rpx; + display: flex; + align-items: center; + width: 100%; + height: 150rpx; + border-radius: 0 0 20rpx 20rpx; +} + +.book-price { + height: 100%; + display: flex; +} + +.book-price image { + width: 58rpx; + height: 70rpx; +} + +.paper-price, +.electron-price { + display: flex; + align-items: center; +} + +.paper-price { + margin-left: 30rpx; +} + +.price { + margin-left: 12rpx; + font-size: 34rpx; + color: #fff; +} + +.price-old { + margin-left: 10rpx; + position: relative; + font-size: 28rpx; + opacity: 0.6; +} + +.line { + position: absolute; + top: 50%; + left: -5rpx; + width: 80%; + height: 3rpx; + background-color: #fff; +} + +.book-web { + margin-left: 30rpx; +} + +.book-web image { + margin-left: 20rpx; + width: 45rpx; + height: 45rpx; +} + +.book-web image:first-child { + margin-left: 0; +} + +/* 鍥句功璧勬簮 */ +.book-resource { + margin-top: 20rpx; +} + +.custom-tabs { + --td-tab-item-active-color: #FF6C00 +} + + +/* 搴曢儴 */ +.box-bottom { + position: fixed; + left: 0; + bottom: 40rpx; + width: 100%; + height: 110rpx; + +} + +.box-bottom { + display: flex; + border: 1px solid #DDD; +} + +.box-bottom image { + width: 36rpx; + height: 44rpx; +} + +.bottom-btn { + background-color: #fff; + width: 25%; + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + font-size: 24rpx; + color: #010101; + box-sizing: border-box; +} + +.bottom-btn image { + margin-bottom: 6rpx; +} + +.bottom-btn:nth-child(1) { + border-right: 1px solid #DDD; +} + +.shopCar, +.buy { + width: 25%; + display: flex; + align-items: center; + justify-content: center; + color: #fff; +} + +.shopCar { + background-color: #F1AC37; +} + +.buy { + background-color: #F14B3B; +} \ No newline at end of file diff --git a/pages/bookServices/index.js b/pages/bookServices/index.js deleted file mode 100644 index 0551214..0000000 --- a/pages/bookServices/index.js +++ /dev/null @@ -1,69 +0,0 @@ -// pages/bookServices/index.js -Page({ - - /** - * 椤甸潰鐨勫垵濮嬫暟鎹� - */ - data: { - - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 - */ - onLoad(options) { - - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 - */ - onReady() { - - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず - */ - onShow() { - - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 - */ - onHide() { - - }, - - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 - */ - onUnload() { - - }, - - /** - * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 - */ - onPullDownRefresh() { - - }, - - /** - * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� - */ - onReachBottom() { - - }, - - /** - * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� - */ - onShareAppMessage() { - - }, - - - -}) \ No newline at end of file diff --git a/pages/bookServices/index.json b/pages/bookServices/index.json deleted file mode 100644 index da897b1..0000000 --- a/pages/bookServices/index.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "usingComponents": { - "t-button": "tdesign-miniprogram/button/button" - } -} \ No newline at end of file diff --git a/pages/bookServices/index.wxml b/pages/bookServices/index.wxml deleted file mode 100644 index 199529f..0000000 --- a/pages/bookServices/index.wxml +++ /dev/null @@ -1 +0,0 @@ -<text>鍥句功鏈嶅姟</text> diff --git a/pages/bookServices/index.wxss b/pages/bookServices/index.wxss deleted file mode 100644 index c2cb44d..0000000 --- a/pages/bookServices/index.wxss +++ /dev/null @@ -1 +0,0 @@ -/* pages/bookServices/index.wxss */ \ No newline at end of file diff --git a/pages/bookServices/list/index.js b/pages/bookServices/list/index.js new file mode 100644 index 0000000..7388ef4 --- /dev/null +++ b/pages/bookServices/list/index.js @@ -0,0 +1,397 @@ +const app = getApp(); +Page({ + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + barHeight: '', + navBarHeight: '', + searchValue: '', + path: '', + pathList: [], + page: 1, + assortCheck: { + name: '', + code: '', + }, + bookList: [], + stairList: { + value: '', + options: [ + { + value: '', + label: '涓�绾�', + }, + ], + }, + secondList: { + value: [], + options: [], + }, + majorProjectList: { + value: [], + options: [], + }, + newTextBook: { + value: [], + options: [], + }, + stairCode: '', // 涓�绾у垎绫婚�変腑椤� + secondCode: '', // 浜岀骇鍒嗙被閫変腑椤� + sort: '', // 鎺掑簭 + }, + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + const systInfo = wx.getSystemInfoSync(); + const menu = wx.getMenuButtonBoundingClientRect(); // 鑳跺泭淇℃伅 + const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 瀵艰埅鏍忛珮搴� + this.setData({ + barHeight: systInfo.statusBarHeight, + navBarHeight: navBarHeight, + }); + // 鎼滅储璧嬪�� + if (options.searchValue) { + this.setData({ + searchValue: options.searchValue, + }); + } + // 楂樼骇鍒嗙被璧嬪�� + this.setData({ + assortCheck: { + name: options.assorName, + code: options.assortCode, + }, + }); + if (this.data.assortCheck.code) { + this.setData({}); + } + // 鑾峰彇涓�绾у垎绫� + this.getStairList(options.assortCode); + // 涓�绾у垎绫诲拰path璧嬪�� + if (options.stairCode) { + this.setData({ + 'stairList.value': options.stairCode, + stairCode: options.stairCode, + secondCode: options.secondCode, + 'secondList.value': options.secondCode, + path: `${options.assortCode}\\${options.stairCode}`, + }); + } + // 鑾峰彇浜岀骇鍒嗙被 + this.getSecondList(`${options.assortCode}\\${options.stairCode}`); + this.getBookList(`${options.assortCode}\\${options.stairCode}`); + // 鑾峰彇閲嶇偣椤圭洰 + this.getProjectList('bookClassification'); + this.getProjectList('newFormsTextbooks'); + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() {}, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() {}, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() {}, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() {}, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() {}, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() {}, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() {}, + goBack() { + wx.navigateBack(); + }, + // 鑾峰彇涓�绾у垪琛� + getStairList(path) { + const query = { + path, + filterList: [], + queryType: '\\', + searchList: [], + size: '30', + start: '0', + storeRefCode: app.config.goodsStore, + sort: { type: 'Asc', field: 'LinkOrder' }, + }; + app.MG.store.getStoreChannelList(query).then(async (res) => { + const options = [ + { + value: '', + label: '涓�绾�', + }, + ]; + for (let index = 0; index < res.datas.length; index++) { + const item = res.datas[index]; + options.push({ + value: item.refCode, + label: item.name, + }); + } + this.setData({ + 'stairList.options': options, + 'stairList.value': this.data.stairCode, + }); + }); + }, + // 鑾峰彇涓�绾у垎绫讳笅浜岀骇鍒嗙被 + getSecondList(path) { + const options = []; + const query = { + path, + filterList: [], + queryType: '\\', + searchList: [], + size: '30', + start: '0', + storeRefCode: app.config.goodsStore, + sort: { type: 'Asc', field: 'LinkOrder' }, + }; + app.MG.store.getStoreChannelList(query).then((res) => { + for (let index = 0; index < res.datas.length; index++) { + const item = res.datas[index]; + options.push({ + value: `${item.pathLinks[0].linkPath}\\${item.id}`, + label: item.name, + }); + } + this.setData({ + 'secondList.options': options, + 'secondList.value': this.data.secondCode, + }); + }); + }, + // 鑾峰彇閲嶇偣椤圭洰 + getProjectList(type) { + const options = []; + const arr = []; + let array = []; + const query = { + refCodes: [type], + }; + app.MG.store.getProductTypeField(query).then((res) => { + array = JSON.parse(res[0].config).option; + for (let index = 0; index < array.length; index++) { + const element = array[index]; + if (element.child) { + for (let index = 0; index < element.child.length; index++) { + const item = element.child[index]; + arr.push(item); + } + } + } + if (type == 'bookClassification') { + for (let index = 0; index < arr.length; index++) { + const element = arr[index]; + options.push({ + value: element.value, + label: element.name, + }); + } + this.setData({ + 'majorProjectList.options': options, + }); + } else if (type == 'newFormsTextbooks') { + for (let index = 0; index < arr.length; index++) { + const element = arr[index]; + options.push({ + value: element.value, + label: element.name, + }); + } + this.setData({ + 'newTextBook.options': options, + }); + console.log('閲嶇偣椤圭洰', this.data.newTextBook); + } + }); + }, + // 鑾峰彇鍥句功鍒楄〃 + getBookList(path) { + let sort; + let pathObj = {}; + if (this.data.pathList.length) { + pathObj = { + subAccess: this.data.pathList, + }; + } else { + pathObj = { + path, + queryType: '*', + }; + } + if (this.data.sort) { + sort = { + Name: this.data.sort, + BaseType: '', + }; + } else { + sort = { + type: 'Desc', + field: 'ViewCount', + }; + } + // 鎼滅储 + let searchObj = {}; + if (this.data.searchValue) { + searchObj = { + 'Name*': this.data.searchValue, + '||author*': this.data.searchValue, + '||isbn*': this.data.searchValue, + '||seriesName*': this.data.searchValue, + }; + } + const query = { + ...pathObj, + filterList: [ + { + value: 'Normal', + field: 'state', + }, + ], + sort, + coverSize: { + height: 145, + }, + paging: { + start: (this.data.page - 1) * 16, + size: 16, + }, + fields: { + author: [], + publicationDate: [], + ...searchObj, + 'bookClassification*': this.data.majorProjectList.value, + 'newFormsTextbooks*': this.data.newTextBook.value, + }, + }; + app.MG.store.getProductList(query).then((res) => { + this.setData({ + bookList: res.datas, + }); + }); + }, + // 涓�绾у垎绫诲垏鎹� + onChangeStair(e) { + const path = e.detail.value.length + ? `${this.data.assortCheck.code}\\${e.detail.value}` + : this.data.assortCheck.code; + this.setData({ + stairCode: e.detail.value, + secondCode: '', + path: path, + 'stairList.value': e.detail.value, + }); + this.getBookList(path); + this.getSecondList(path); + }, + // 浜岀骇鍒嗙被鍒囨崲 + onChangeSecond(e) { + console.log(e); + const pathList = []; + for (let index = 0; index < e.detail.value.length; index++) { + const element = e.detail.value[index]; + pathList.push({ + Path: element, + Type: '*', + StoreRefCode: app.config.goodsStore, + }); + } + this.setData({ + pathList: pathList, + 'secondList.value': e.detail.value, + }); + this.getBookList(this.data.path); + }, + // 閲嶇偣椤圭洰鏀瑰彉 + changeMajorProject(e) { + this.setData({ + 'majorProjectList.value': e.detail.value, + }); + this.getBookList(this.data.path); + }, + // 閲嶇偣椤圭洰閲嶇疆 + resetMajorProject() { + this.setData({ + 'majorProjectList.value': [], + }); + this.getBookList(this.data.path); + }, + changeNewText(e) { + this.setData({ + 'newTextBook.value': e.detail.value, + }); + this.getBookList(this.data.path); + }, + resetNewText() { + this.setData({ + 'newTextBook.value': [], + }); + this.getBookList(this.data.path); + }, + // 鎺掑簭鎸夐挳 + sortClick() { + if (!this.data.sort.length) { + this.setData({ + sort: 'Desc', + }); + } else if (this.data.sort == 'Desc') { + this.setData({ + sort: 'Asc', + }); + } else if (this.data.sort == 'Asc') { + this.setData({ + sort: '', + }); + } + let path; + if (this.data.secondCode) { + path = this.data.secondCode; + } else if (this.data.stairCode) { + path = `${this.data.assortCheck.code}\\${this.data.stairCode}`; + } else { + path = this.data.assortCheck.code; + } + this.setData({ + path: path, + }); + this.getBookList(path); + }, + // 鎼滅储鍥句功 + searchBook(e) { + console.log(e.detail.value); + this.setData({ + searchValue: e.detail.value, + }); + this.getBookList(this.data.path); + }, + // 璺宠浆鍥句功璇︽儏 + goDetail(e) { + const { book } = e.currentTarget.dataset; + wx.navigateTo({ + url: `/pages/bookServices/detail/index?id=${book.id}&name=${book.name}`, + }); + }, +}); diff --git a/pages/bookServices/list/index.json b/pages/bookServices/list/index.json new file mode 100644 index 0000000..c1b8601 --- /dev/null +++ b/pages/bookServices/list/index.json @@ -0,0 +1,10 @@ +{ + "usingComponents": { + "t-dropdown-menu": "tdesign-miniprogram/dropdown-menu/dropdown-menu", + "t-dropdown-item": "tdesign-miniprogram/dropdown-item/dropdown-item", + "t-icon": "tdesign-miniprogram/icon/icon", + "t-image": "tdesign-miniprogram/image/image", + "t-search": "tdesign-miniprogram/search/search" + }, + "navigationStyle": "custom" +} diff --git a/pages/bookServices/list/index.wxml b/pages/bookServices/list/index.wxml new file mode 100644 index 0000000..20900a8 --- /dev/null +++ b/pages/bookServices/list/index.wxml @@ -0,0 +1,74 @@ +<!-- 鍥句功鏈嶅姟-鍒楄〃 --> +<view style="width: 100%; height: {{barHeight}}px;"></view> + +<view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;"> + <view> + <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" /> + </view> + <t-search + model:value="{{searchValue}}" + shape="round" + placeholder="璇疯緭鍏ュ叧閿瘝/涔﹀悕/ISBN/浣滆��" + class="navBar-search" + style="width: 464rpx" + bind:submit="searchBook" + /> +</view> + +<view class="bookServices-list"> + <view class="list-header"> + <scroll-view scroll-x="{{true}}" class="header-scroll"> + <t-dropdown-menu> + <t-dropdown-item options="{{stairList.options}}" value="{{stairList.value}}" bindchange="onChangeStair" /> + <t-dropdown-item + label="浜岀骇" + options="{{secondList.options}}" + optionsColumns="2" + multiple + defaultValue="{{secondList.value}}" + bind:confirm="onChangeSecond" + /> + <t-dropdown-item + label="閲嶇偣椤圭洰" + options="{{majorProjectList.options}}" + optionsColumns="2" + multiple + defaultValue="{{majorProjectList.value}}" + bind:confirm="changeMajorProject" + bind:reset="resetMajorProject" + /> + <t-dropdown-item + label="鏂板舰鎬佹暀鏉�" + options="{{newTextBook.options}}" + optionsColumns="2" + multiple + defaultValue="{{newTextBook.value}}" + bind:confirm="changeNewText" + bind:reset="resetNewText" + /> + </t-dropdown-menu> + </scroll-view> + <view class="header-sort" bind:tap="sortClick"> + <view class="sort-name">鎺掑簭</view> + <view class="sort-icon"> + <t-icon name="swap-left" size="24rpx" class="icon-right" color="{{sort == 'Asc' ? '#ff6c00' : ''}}" /> + <t-icon name="swap-left" size="24rpx" class="icon-left" color="{{sort == 'Desc' ? '#ff6c00' : ''}}" /> + </view> + </view> + </view> + <scroll-view scroll-y="{{true}}" class="list-container"> + <view class="assort-title"> + <view class="title-box"></view> + <view class="title-name">{{assortCheck.name}}</view> + </view> + <view class="book-list"> + <view class="book-box" wx:for="{{bookList}}" wx:key="id" bind:tap="goDetail" data-book="{{item}}"> + <view class="book-img"> + <t-image src="{{item.icon}}" width="105" height="145" aria-label="{item.name{}}" /> + </view> + <view class="book-name book-color">{{ item.name}}</view> + <view class="book-author book-color">{{item.author}}</view> + </view> + </view> + </scroll-view> +</view> diff --git a/pages/bookServices/list/index.wxss b/pages/bookServices/list/index.wxss new file mode 100644 index 0000000..4e86439 --- /dev/null +++ b/pages/bookServices/list/index.wxss @@ -0,0 +1,115 @@ +/* pages/bookServices/list/index.wxss */ +page { + background-color: #f7f7f7; +} + +.nacigationBar { + display: flex; + align-items: center; + --td-search-font-size: 28rpx; + margin-bottom: 30rpx; +} + +.list-header { + display: flex; +} + +.header-sort { + background-color: #fff; + line-height: 96rpx; + width: 150rpx; + font-size: 28rpx; + color: #999; + display: flex; +} + +.header-scroll { + width: 80vw; +} + +.sort-icon { + transform: rotate(90deg); + position: relative; +} + +.sort-icon .icon-left { + transform: rotate(180deg); +} + +.list-container { + height: 80vh; + margin-top: 20rpx; + background-color: #fff; +} + +.assort-title { + padding: 20rpx 0; + display: flex; + align-items: center; +} + +.assort-title .title-box { + width: 8rpx; + height: 60rpx; + background-color: #ff6c00; +} + +.assort-title .title-name { + font-size: 32rpx; + margin-left: 32rpx; + font-weight: 700; +} + +.book-list { + padding: 32rpx; + display: flex; + flex-wrap: wrap; +} + +.book-box { + box-sizing: border-box; + width: 48%; + background-color: #f7f7f7; + display: flex; + flex-direction: column; + align-items: center; + margin-bottom: 40rpx; + padding: 50rpx 20rpx 32rpx 20rpx; + box-shadow: 0px 3px 6px 1px rgba(0, 0, 0, 0.16); +} + +.book-box:nth-child(2n) { + margin-left: 18rpx; +} + +.book-color { + color: #333; +} + +.book-img image { + object-fit: contain; + box-shadow: 0px 3px 6px 1px rgba(0, 0, 0, 0.16); +} + +.book-name { + margin-top: 24rpx; + width: 100%; + font-size: 28rpx; + font-weight: 700; + word-break: break-all; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; + text-align: center; +} + +.book-author { + margin-top: 16rpx; + width: 100%; + font-size: 24rpx; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + text-align: center; +} \ No newline at end of file diff --git a/pages/cart/components/cart-bar/index.json b/pages/cart/components/cart-bar/index.json index c6c4351..fa2d209 100644 --- a/pages/cart/components/cart-bar/index.json +++ b/pages/cart/components/cart-bar/index.json @@ -1,7 +1,6 @@ { "component": true, "usingComponents": { - "price": "/components/price/index", "t-icon": "tdesign-miniprogram/icon/icon" } } \ No newline at end of file diff --git a/pages/home/home.js b/pages/home/home.js index 004dc03..250f062 100644 --- a/pages/home/home.js +++ b/pages/home/home.js @@ -1,7 +1,12 @@ import { fetchHome } from '../../services/home/home'; +import moment from 'moment' +import { setSessionGuid } from "../../assets/js/userAction" const app = getApp() Page({ data: { + isWhite: false, + backUrl: null, + userInfo: {}, tabList: [], //鐩綍 pageLoading: false, current: 1,//杞挱鍥惧弬鏁� @@ -11,20 +16,16 @@ navigation: { type: 'dots' },//杞挱鍥惧弬鏁� bannerList: [], //杞挱鍥惧垪琛� specialSubjectList: [],//涓撻璁ㄨ + activeItem: 0,//绮鹃�夎绋嬮粯璁ら�変腑 + courseTypeList: [],//绮鹃�夎绋嬪垎绫� courseList: [], + bookTypeList: [],//鍥句功绫诲瀷 + activeItem1: 0, booksList: [], - textbookList: [] + readBookList: [], //鏁板瓧闃呰 + textbookList: [], //鏁板瓧鏁欐潗 + rankingList: []//鎺掕姒� }, - - goodListPagination: { - index: 0, - num: 20, - }, - - privateData: { - tabIndex: 0, - }, - onShow() { this.getTabBar().init(); this.loadHomePage(); @@ -32,10 +33,22 @@ }, - onLoad() { + onLoad(options) { + if (options.backUrl) { + let backUrl = JSON.parse(decodeURIComponent(options.backUrl)); + if (backUrl.options) { + for (let key in backUrl.options) { + const value = backUrl.options[key] + backUrl.backUrl += `${key}=${value}&` + } + } + this.setData({ + backUrl: backUrl.backUrl + }) + } + this.getTestLoginInfo() this.init(); }, - onReachBottom() { }, onPullDownRefresh() { @@ -43,7 +56,92 @@ }, init() { this.getSubjectList(); - this.getCourseList(); + this.getCourseTypeListList(); + this.getBookTypeList(); + this.getReadBookList(); + this.getTextbookListList(); + this.getRankingList() + }, + // 鑾峰彇娴嬭瘯鐧诲綍鏃剁殑token + getTestLoginInfo() { + const token = wx.getStorageSync(app.config.tokenKey) + if (!token) { + wx.login({ + success: (res) => { + wx.getUserInfo({ + success: (infoRes) => { + app.MG.identity.checkWeChatAppAccount({ + code: res.code, + appCode: app.config.appRefCode, + encryptedData: infoRes.encryptedData, + iv: infoRes.iv + }).then(loginRes => { + if (!loginRes) { + // wx.navigateTo({ + // url: "/pages/index/bindInfo/index?code=" + res.code, + // }); + } else { + wx.login({ + success: (res) => { + app.MG.identity.loginByWeChatAppCode({ + code: res.code, + appRefCode: app.config.appRefCode, + platform: "weChatApp", + encryptedData: infoRes.encryptedData, + iv: infoRes.iv + }).then(res => { + if (res && res.status == "Ok") { + wx.setStorageSync(app.config.tokenKey, res.token); + setSessionGuid() + this.getCurrentUserInfo() + } + }) + }, + }) + } + }) + } + }) + + }, + }) + } + }, + + getCurrentUserInfo() { + app.MG.identity.getCurrentAppUser().then(res => { + console.log(res, "userInfo"); + // 鐢ㄦ埛淇℃伅浼樺厛绾э細鏁欏笀璁よ瘉 > 寰俊 > 瀛︾敓锛堟敞鍐屾椂榛樿锛� + if (res) { + let defaultUser = {}; + let WeChatInfo = res.infoList.find((item) => item.type === "WeChat"); + let phoneNumber = res.secretList.find(i => i.type == 'MobilePhone') + if (WeChatInfo) { + defaultUser = { + nickName: WeChatInfo.name, + avatarUrl: WeChatInfo.icon, + weChatId: WeChatInfo.id + } + } + if (phoneNumber) { + defaultUser.phoneNumber = phoneNumber.credential + } + this.setData({ + userInfo: defaultUser, + }) + wx.setStorageSync(app.config.userInfoKey, JSON.stringify(this.data.userInfo)); + } + if (this.data.backUrl) { + wx.navigateTo({ + url: this.data.backUrl, + }) + } else { + wx.switchTab({ + url: '/pages/home/home' + }) + } + + }); }, getBannerList() { const list = [] @@ -104,7 +202,7 @@ }, paging: { start: 0, - size: 3 + size: 4 }, fields: { liveTime: [], @@ -114,16 +212,46 @@ } } app.MG.store.getProductList(obj).then((res) => { + res.datas.forEach((item) => { + item.liveTime = item.liveTime ? moment(item.liveTime).format("MM-DD HH:mm:ss") : ''; + item.startTime = item.startTime ? moment(item.startTime).format("MM-DD HH:mm:ss") : ''; + item.price = item.price ? item.price.toFixed(2) : item.price; + }); this.setData({ specialSubjectList: res.datas }) + }) + }, + + //绮鹃�夎绋嬪垎绫� + getCourseTypeListList() { + const data = { + path: 'jsek_homepageDigitalCourses', + filterList: [], + queryType: '\\', + searchList: [], + size: '20', + start: '0', + storeRefCode: app.config.digitalCourses, + sort: { type: 'Asc', field: 'LinkOrder' } + } + app.MG.store.getStoreChannelList(data).then((res) => { + if (res.datas && res.datas.length > 0) { + let dataList = []; + dataList.push(...res.datas) + this.setData({ + courseTypeList: dataList, + activeItem: 0 + }) + this.getCourseList(res.datas[0]) + } }) }, //绮鹃�夎绋嬪垪琛� getCourseList(item) { const obj = { storeInfo: "app.config.goodsStore", - path: 'jsek_homepageDigitalTextbooks', + path: item.pathList + '\\' + item.id, coverSize: { width: 260 }, @@ -139,10 +267,142 @@ } } app.MG.store.getProductList(obj).then((res) => { + res.datas.forEach((item) => { + item.price = item.price ? item.price.toFixed(2) : item.price; + }); this.setData({ courseList: res.datas }) }) }, + tabChangeHandle(item) { + let info = this.data.courseTypeList[item.detail.value] + this.getCourseList(info) + }, + //鍥句功鏈嶅姟鍒嗙被 + getBookTypeList() { + const data = { + path: 'jsek_homepageBookService', + filterList: [], + queryType: '\\', + searchList: [], + size: '20', + start: '0', + storeRefCode: app.config.goodsStore, + sort: { type: 'Asc', field: 'LinkOrder' } + } + app.MG.store.getStoreChannelList(data).then((res) => { + if (res.datas && res.datas.length > 0) { + let dataList = []; + dataList.push(...res.datas) + this.setData({ + bookTypeList: dataList, + activeItem1: 0 + }) + this.getBooksList(dataList[0]) + } + }) + }, + //鍥句功鏈嶅姟鍒楄〃 + getBooksList(item) { + const obj = { + storeInfo: app.config.goodsStore, + path: item.pathList + '\\' + item.id, + queryType: '*', + coverSize: { + width: 150 + }, + paging: { + start: 0, + size: 6 + }, + fields: { + author: [] + } + } + app.MG.store.getProductList(obj).then((res) => { + this.setData({ + booksList: res.datas, + }) + }) + }, + //鍥句功鏈嶅姟 + tabBookClick(item) { + let info = this.data.bookTypeList[item.detail.value] + this.getBooksList(info) + }, + //鏁板瓧闃呰 + getReadBookList() { + const obj = { + storeInfo: app.config.digitalTextbooks, + path: 'jsek_homepageDigitalTextbooks', + coverSize: { + width: 150 + }, + paging: { + start: 0, + size: 3 + }, + fields: { + author: [] + } + } + app.MG.store.getProductList(obj).then((res) => { + this.setData({ + readBookList: res.datas + }) + }) + }, + //鏁板瓧鏁欐潗 + getTextbookListList() { + const obj = { + storeInfo: app.config.digitalTextbooks, + path: 'jsek_homepageDigitalTextbooks', + coverSize: { + width: 150 + }, + paging: { + start: 0, + size: 6 + }, + fields: { + author: [], + } + } + app.MG.store.getProductList(obj).then((res) => { + this.setData({ + textbookList: res.datas + }) + }) + }, + //鑾峰彇鎺掕姒� + getRankingList() { + const obj = { + storeInfo: app.config.digitalTextbooks, + path: 'jsek_homepageDigitalTextbooks', + coverSize: { + width: 150 + }, + paging: { + start: 0, + size: 6 + }, + fields: { + author: [], + } + } + app.MG.store.getProductList(obj).then((res) => { + this.setData({ + rankingList: res.datas + }) + }) + }, + + onPageScroll(e) { + this.setData({ + isWhite: e.scrollTop > 50 ? true : false + }) + + } }); diff --git a/pages/home/home.json b/pages/home/home.json index 24ccee4..3193cbf 100644 --- a/pages/home/home.json +++ b/pages/home/home.json @@ -1,5 +1,5 @@ { - "navigationBarTitleText": "棣栭〉", + "navigationStyle": "custom", "onReachBottomDistance": 10, "backgroundTextStyle": "light", "enablePullDownRefresh": true, @@ -16,6 +16,7 @@ "goods-list": "/components/goods-list/index", "load-more": "/components/load-more/index", "t-grid": "tdesign-miniprogram/grid/grid", - "t-grid-item": "tdesign-miniprogram/grid-item/grid-item" + "t-grid-item": "tdesign-miniprogram/grid-item/grid-item", + "t-empty": "tdesign-miniprogram/empty/empty" } } \ No newline at end of file diff --git a/pages/home/home.wxml b/pages/home/home.wxml index 63c8cd3..547af8b 100644 --- a/pages/home/home.wxml +++ b/pages/home/home.wxml @@ -1,7 +1,13 @@ <view style="text-align: center; color: #b9b9b9" wx:if="{{pageLoading}}"> <t-loading theme="circular" size="40rpx" text="鍔犺浇涓�..." inherit-color /> </view> +<view class="background {{ isWhite ? 'white':''}}"> + <text class="text">浜笀E璇�</text> +</view> <view class="home-page-header"> + <view class="bg"> + <image src="/static/images/home/home-bg@2x.png" mode="heightFix" class="image" /> + </view> <view class="search"> <t-search t-class-input="t-search__input" t-class-input-container="t-search__input-container" placeholder="璇疯緭鍏ュ叧閿瘝/涔﹀悕/ISBN/浣滆��" leftIcon=""> <t-icon slot="left-icon" prefix="wr" name="search" size="40rpx" color="#bbb" bind:tap="navToSearchPage" /> @@ -22,22 +28,180 @@ <view class="icon"> <t-image src="/static/images/home/zhuantitaolun.png" mode="heightFix" class="iconImage" /> </view> - <view bindtap="onMoreGuide"> + <view bindtap="onMoreGuide" class="flex"> <text class="more">鏇村</text> + <t-icon name="chevron-right" size="32rpx" color="#ff6d00" /> </view> </view> - <view> - <view wx:for="{{specialSubjectList}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toList" data-info="{{item}}"> - <view class="specialSubject-img"> - <t-image src="{{item.icon}}" mode="aspectFill" width="50" height="50" /> - </view> - <view class="body-info"> - <view>{{item.name}}</view> + <view class="listBox"> + <view wx:for="{{specialSubjectList}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toList" data-info="{{item}}" class="listItemBox"> + <view class="listItem"> + <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.startTime}}">寮�鎾椂闂达細<text class="grey">寰呭畾</text></view> + <view class="flex jc-sb"> + <text class="author">{{item.lecturer}}</text> + <text class="price" wx:if="{{item.price == 0}}">鍏嶈垂</text> + <text class="price" wx:if="{{item.price !== 0}}">锟{item.price}}</text> + </view> + </view> </view> </view> </view> - - + <view class="tabCardPublic"> + <view class="icon"> + <t-image src="/static/images/home/jingxuankecheng@2x.png" mode="heightFix" class="iconImage" /> + </view> + <view bindtap="onMoreGuide" class="flex"> + <text class="more">鏇村</text> + <t-icon name="chevron-right" size="32rpx" color="#ff6d00" /> + </view> + </view> + <view class="home-page-tabs"> + <t-tabs t-class="t-tabs" t-class-active="tabs-external__active" t-class-item="tabs-external__item" defaultValue="{{activeItem}}" space-evenly="{{false}}" bind:change="tabChangeHandle"> + <t-tab-panel wx:for="{{courseTypeList}}" wx:for-index="index" wx:key="index" label="{{item.name}}" value="{{index}}" /> + </t-tabs> + </view> + <view class="listBox1"> + <view wx:if="{{courseList.length>0}}"> + <view wx:for="{{courseList}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toList" data-info="{{item}}" class="listItemBox"> + <view class="listItem flex"> + <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="flex jc-sb"> + <text class="author">{{item.courseLeader}}</text> + <text>{{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" /> + </view> + </view> + </view> + </view> + </view> + <view class="empyt" wx:else> + <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" font-size="80" /> + </view> + </view> + <view class="tabCardPublic"> + <view class="icon"> + <t-image src="/static/images/home/tushufuwu@2x.png" mode="heightFix" class="iconImage" /> + </view> + <view bindtap="onMoreGuide" class="flex"> + <text class="more">鏇村</text> + <t-icon name="chevron-right" size="32rpx" color="#ff6d00" /> + </view> + </view> + <view class="home-page-tabs"> + <t-tabs t-class="t-tabs" t-class-active="tabs-external__active" t-class-item="tabs-external__item" defaultValue="{{activeItem1}}" space-evenly="{{false}}" bind:change="tabBookClick"> + <t-tab-panel wx:for="{{bookTypeList}}" wx:for-index="index" wx:key="index" label="{{item.name}}" value="{{index}}" /> + </t-tabs> + </view> + <view class="listBox2"> + <view wx:if="{{booksList.length > 0}}" class="flex"> + <view wx:for="{{booksList}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toList" data-info="{{item}}" class="booksListItemBox"> + <view class="listItem"> + <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="author">{{item.author}}</view> + </view> + </view> + </view> + </view> + <view class="empyt" wx:else> + <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" font-size="80" /> + </view> + </view> + <view class="tabCardPublic"> + <view class="icon"> + <t-image src="/static/images/home/shuziyuedu1@2x.png" mode="heightFix" class="iconImage" /> + </view> + <view bindtap="onMoreGuide" class="flex"> + <text class="more">鏇村</text> + <t-icon name="chevron-right" size="32rpx" color="#ff6d00" /> + </view> + </view> + <view class="listBox2 flex"> + <view wx:for="{{readBookList}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toList" data-info="{{item}}" class="booksListItemBox"> + <view class="listItem"> + <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="author">{{item.author}}</view> + </view> + </view> + </view> + </view> + <view class="tabCardPublic"> + <view class="icon"> + <t-image src="/static/images/home/shuzijiaocai1@2x.png" mode="heightFix" class="iconImage" /> + </view> + <view bindtap="onMoreGuide" class="flex"> + <text class="more">鏇村</text> + <t-icon name="chevron-right" size="32rpx" color="#ff6d00" /> + </view> + </view> + <view class="listBox3"> + <view wx:if="{{textbookList.length > 0}}" class="listBox3"> + <view wx:for="{{textbookList}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toList" data-info="{{item}}" class="textbooksItemBox"> + <view class="listItem flex"> + <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="introduction">{{item.description}}</view> + <view class="author">{{item.author}}</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" /> + </view> + </view> + </view> + </view> + </view> + <view class="empyt" wx:else> + <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" font-size="80" /> + </view> + </view> + <view class="tabCardPublic"> + <view class="icon"> + <t-image src="/static/images/home/paihangbang@2x.png" mode="heightFix" class="iconImage" /> + </view> + <view bindtap="onMoreGuide" class="flex"> + <text class="more">鏇村</text> + <t-icon name="chevron-right" size="32rpx" color="#ff6d00" /> + </view> + </view> + <view class="listBox2 rankingList flex"> + <view wx:for="{{rankingList}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toList" data-info="{{item}}" class="booksListItemBox"> + <view class="listItem"> + <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="author">{{item.author}}</view> + </view> + </view> + </view> + </view> </view> <load-more list-is-empty="{{!goodsList.length}}" status="{{goodsListLoadStatus}}" bind:retry="onReTry" /> <t-toast id="t-toast" /> diff --git a/pages/home/home.wxss b/pages/home/home.wxss index bf3e88f..fa02cf0 100644 --- a/pages/home/home.wxss +++ b/pages/home/home.wxss @@ -3,22 +3,55 @@ padding-bottom: calc(env(safe-area-inset-bottom) + 96rpx); } -.home-page-header { - position: relative; -} - -.home-page-header .search { - position: absolute; - top: 20rpx; - left: 0; +.background { width: 100%; - z-index: 99; + position: fixed; + top: 0; + left: 0; + height: 80rpx; + z-index: 3; + text-align: center; + padding-top: 110rpx; + color: #fff; + font-size: 36rpx; } -.home-page-header .t-search__input-container { - border-radius: 15rpx !important; - margin: 0 24rpx; - height: 64rpx !important; +.white { + background: #fff; + color: #333; +} + +.background .text { + height: 100%; +} + +.home-page-header, +.home-page-menu, +.home-page-container { + position: relative; + padding: 0 24rpx; +} + +.home-page-header { + padding-top: 230rpx; +} + +.home-page-header .bg { + height: 680rpx; + position: absolute; + top: 0; + left: 0; + z-index: -1; +} + +.home-page-header .bg .image { + height: 100%; +} + +.home-page-header .search .t-search__input-container { + height: 96rpx; + background: #fff !important; + font-size: 28rpx !important; } .home-page-header .t-search__input { @@ -26,16 +59,25 @@ color: rgb(116, 116, 116) !important; } -.home-page-header .swiper-wrap .t-swiper-host { - border-radius: 0; +.home-page-header .swiper-wrap { + margin-top: 30rpx; + margin-bottom: 10rpx; } -.home-page-header .t-image__swiper { - width: 100%; - height: 300rpx; +.home-page-menu .t-grid--card { + margin: 0; +} + +.flex { + display: flex; +} + +.jc-sb { + justify-content: space-between } .home-page-container { + margin-top: 20rpx; display: block; padding: 0 24rpx; } @@ -45,13 +87,14 @@ display: flex; justify-content: space-between; align-items: center; - padding: 20rpx 5rpx; + margin: 20rpx 5rpx; box-sizing: border-box; + border-bottom: 2rpx solid #fadfbc; } .tabCardPublic .icon { - width: 246rpx; - height: 72rpx; + width: 156rpx; + height: 48rpx; } .tabCardPublic .icon .t-image { @@ -61,5 +104,213 @@ .tabCardPublic .more { font-size: 24rpx; - color: #999; + color: #ff6d00; +} + +.listBox { + padding: 20rpx 0; + display: flex; + flex-flow: row wrap; + justify-content: space-between; +} + +.listBox .listItemBox { + width: 49%; + margin-bottom: 30rpx; +} + +.listItemBox .listItem { + background: #fff; + box-sizing: border-box; + border-radius: 5px; + overflow: hidden; + box-shadow: 0px 0px 20rpx 2px #f1f1f1; +} + +.listBox .specialSubject-img { + width: 100%; + height: 120rpx; +} + +.specialSubject-img image { + width: 100%; + height: 100%; + object-fit: contain; +} + +.body-info { + padding: 20rpx; + font-size: 28rpx; +} + +.body-info .name { + font-size: 32rpx; + height: 88rpx; + color: #333333; + font-weight: bold; + line-height: 44rpx; + display: -webkit-box; + margin-bottom: 10rpx; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; + text-overflow: ellipsis; +} + +.body-info .time { + font-size: 26rpx; + margin-bottom: 10rpx; +} + +.body-info .author { + font-size: 26rpx; + display: flex; + justify-content: space-between; +} + +.body-info .price { + font-size: 26rpx; + color: #ff6d00; +} + +.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; */ +} + +.t-tabs .t-tabs__track { + display: none; +} + +.t-tabs .t-tabs--top .t-tabs__scroll { + border-bottom: none !important; +} + +.t-tabs .t-tabs-scroll { + border: none !important; +} + +.listBox1, +.listBox2 { + padding: 50rpx 0; +} + +.listBox1 .listItemBox { + height: 220rpx; + margin-bottom: 30rpx; +} + +.listBox1 .specialSubject-img { + width: 400rpx; + height: 218rpx; +} + +.listBox1 .addCartImg, +.listBox3 .addCartImg { + width: 30rpx; + height: 30rpx; +} + +.listBox1 .priceBox { + margin-top: 14rpx; +} + +.listBox2 { + flex-flow: row wrap; +} + +.listBox2 .flex { + flex-flow: row wrap; +} + +.listBox2 .booksListItemBox { + width: calc(100%/3 - 30rpx); + margin-bottom: 30rpx; + margin-right: 45rpx; +} + +.listBox2 :nth-child(3), +.listBox2 :nth-child(6) { + margin-right: 0; +} + +.listBox2 .specialSubject-img { + height: 300rpx; + width: 100%; + box-shadow: 0px 0px 20rpx 2px #f1f1f1; +} + +.listBox2 .body-info { + padding: 20rpx 0; +} + +.listBox2 .author { + height: 30rpx; + color: #333333; + font-weight: bold; + line-height: 30rpx; + display: -webkit-box; + margin-bottom: 10rpx; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; + overflow: hidden; + text-overflow: ellipsis; +} + +.listBox2 .empyt { + padding: 20rpx; + box-sizing: border-box; +} + +.listBox3 .textbooksItemBox { + margin-bottom: 30rpx; +} + +.listBox3 .textbooksItemBox .specialSubject-img { + width: 190rpx; + height: 260rpx; + box-shadow: 0px 0px 20rpx 2px #f1f1f1; +} + +.listBox3 .body-info { + width: calc(100% - 190rpx); +} + +.listBox3 .name { + font-size: 32rpx; + height: 44rpx; + color: #333333; + font-weight: bold; + line-height: 44rpx; + display: -webkit-box; + margin-bottom: 10rpx; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; + overflow: hidden; + text-overflow: ellipsis; +} + +.listBox3 .introduction { + color: #B4B6BD; + line-height: 36rpx; + display: -webkit-box; + margin-bottom: 10rpx; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; + text-overflow: ellipsis; +} + +.listBox3 .author { + line-height: 40rpx; + margin-bottom: 30rpx; +} + +.readList { + overflow: auto; } \ No newline at end of file diff --git a/pages/personalCenter/activateProduct/index.js b/pages/personalCenter/activateProduct/index.js index 7db447e..c914b6c 100644 --- a/pages/personalCenter/activateProduct/index.js +++ b/pages/personalCenter/activateProduct/index.js @@ -12,7 +12,7 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 */ onLoad(options) { - + console.log(options); }, /** diff --git a/pages/personalCenter/activateProduct/index.json b/pages/personalCenter/activateProduct/index.json index 8835af0..3aebf06 100644 --- a/pages/personalCenter/activateProduct/index.json +++ b/pages/personalCenter/activateProduct/index.json @@ -1,3 +1,4 @@ { + "navigationBarTitleText": "婵�娲诲晢鍝�", "usingComponents": {} } \ No newline at end of file diff --git a/pages/personalCenter/certificate/index.js b/pages/personalCenter/certificate/index.js index 9f7a333..358d636 100644 --- a/pages/personalCenter/certificate/index.js +++ b/pages/personalCenter/certificate/index.js @@ -1,4 +1,3 @@ -// pages/personalCenter/certificate/index.js Page({ /** @@ -12,7 +11,7 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 */ onLoad(options) { - + console.log(options); }, /** diff --git a/pages/personalCenter/certificate/index.json b/pages/personalCenter/certificate/index.json index 8835af0..53977b2 100644 --- a/pages/personalCenter/certificate/index.json +++ b/pages/personalCenter/certificate/index.json @@ -1,3 +1,4 @@ { + "navigationBarTitleText": "鎴戠殑璇佷功", "usingComponents": {} } \ No newline at end of file diff --git a/pages/personalCenter/certificate/index.wxml b/pages/personalCenter/certificate/index.wxml index a960ce8..715d10c 100644 --- a/pages/personalCenter/certificate/index.wxml +++ b/pages/personalCenter/certificate/index.wxml @@ -1,2 +1,2 @@ <!--pages/personalCenter/certificate/index.wxml--> -<text>pages/personalCenter/certificate/index.wxml</text> +<text>pages/personalCenter/certificate/index.wxml</text> \ No newline at end of file diff --git a/pages/personalCenter/components/user-center-card/index.js b/pages/personalCenter/components/user-center-card/index.js new file mode 100644 index 0000000..47593c4 --- /dev/null +++ b/pages/personalCenter/components/user-center-card/index.js @@ -0,0 +1,35 @@ +const AuthStepType = { + ONE: 1, + TWO: 2, + THREE: 3, +}; + +Component({ + options: { + multipleSlots: true, + }, + properties: { + currAuthStep: { + type: Number, + value: AuthStepType.ONE, + }, + userInfo: { + type: Object, + value: {}, + }, + isNeedGetUserInfo: { + type: Boolean, + value: false, + }, + }, + data: { + defaultAvatarUrl: + 'https://cdn-we-retail.ym.tencent.com/miniapp/usercenter/icon-user-center-avatar@2x.png', + AuthStepType, + }, + methods: { + gotoUserEditPage() { + this.triggerEvent('gotoUserEditPage'); + }, + }, +}); diff --git a/pages/personalCenter/components/user-center-card/index.json b/pages/personalCenter/components/user-center-card/index.json new file mode 100644 index 0000000..e169f6f --- /dev/null +++ b/pages/personalCenter/components/user-center-card/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "t-icon": "tdesign-miniprogram/icon/icon", + "t-avatar": "tdesign-miniprogram/avatar/avatar" + } +} \ No newline at end of file diff --git a/pages/personalCenter/components/user-center-card/index.wxss b/pages/personalCenter/components/user-center-card/index.wxss index 4bb493f..cee02f2 100644 --- a/pages/personalCenter/components/user-center-card/index.wxss +++ b/pages/personalCenter/components/user-center-card/index.wxss @@ -1,5 +1,5 @@ .user-center-card { - background-image: url('https://cdn-we-retail.ym.tencent.com/miniapp/template/user-center-bg-v1.png'); + /* background-image: url('https://cdn-we-retail.ym.tencent.com/miniapp/template/user-center-bg-v1.png'); */ background-size: cover; background-repeat: no-repeat; padding: 0 24rpx; diff --git a/pages/personalCenter/downloads/index.js b/pages/personalCenter/downloads/index.js index 2e5078a..cf38005 100644 --- a/pages/personalCenter/downloads/index.js +++ b/pages/personalCenter/downloads/index.js @@ -12,7 +12,7 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 */ onLoad(options) { - + console.log(options); }, /** diff --git a/pages/personalCenter/downloads/index.json b/pages/personalCenter/downloads/index.json index 8835af0..294e7d0 100644 --- a/pages/personalCenter/downloads/index.json +++ b/pages/personalCenter/downloads/index.json @@ -1,3 +1,4 @@ { + "navigationBarTitleText": "鎴戠殑涓嬭浇", "usingComponents": {} } \ No newline at end of file diff --git a/pages/personalCenter/feedBack/index.js b/pages/personalCenter/feedBack/index.js index 9e4b25b..f904417 100644 --- a/pages/personalCenter/feedBack/index.js +++ b/pages/personalCenter/feedBack/index.js @@ -12,7 +12,7 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 */ onLoad(options) { - + console.log(options); }, /** diff --git a/pages/personalCenter/feedBack/index.json b/pages/personalCenter/feedBack/index.json index 8835af0..8f9ad0c 100644 --- a/pages/personalCenter/feedBack/index.json +++ b/pages/personalCenter/feedBack/index.json @@ -1,3 +1,4 @@ { + "navigationBarTitleText": "寤鸿涓庡弽棣�", "usingComponents": {} } \ No newline at end of file diff --git a/pages/personalCenter/feedBackSubmit/index.js b/pages/personalCenter/feedBackSubmit/index.js index 545c533..fe4eb7e 100644 --- a/pages/personalCenter/feedBackSubmit/index.js +++ b/pages/personalCenter/feedBackSubmit/index.js @@ -12,7 +12,7 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 */ onLoad(options) { - + console.log(options); }, /** diff --git a/pages/personalCenter/feedBackSubmit/index.json b/pages/personalCenter/feedBackSubmit/index.json index 8835af0..431022f 100644 --- a/pages/personalCenter/feedBackSubmit/index.json +++ b/pages/personalCenter/feedBackSubmit/index.json @@ -1,3 +1,4 @@ { + "navigationBarTitleText": "鎰忚鍙嶉", "usingComponents": {} } \ No newline at end of file diff --git a/pages/personalCenter/index.js b/pages/personalCenter/index.js index 1405558..9256f51 100644 --- a/pages/personalCenter/index.js +++ b/pages/personalCenter/index.js @@ -83,6 +83,7 @@ * 椤甸潰鐨勫垵濮嬫暟鎹� */ data: { + isWhite: false, show: false, userInfo: { avatarUrl: @@ -104,6 +105,7 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 */ onLoad(options) { + console.log(options); }, @@ -196,5 +198,12 @@ */ onShareAppMessage() { + }, + + onPageScroll(e) { + this.setData({ + isWhite: e.scrollTop > 50 ? true : false + }) + } }) \ No newline at end of file diff --git a/pages/personalCenter/index.json b/pages/personalCenter/index.json index 8835af0..9081e9f 100644 --- a/pages/personalCenter/index.json +++ b/pages/personalCenter/index.json @@ -1,3 +1,9 @@ { - "usingComponents": {} + "navigationBarTitleText": "涓汉涓績", + "navigationStyle": "custom", + "usingComponents": { + "t-user-center-card": "./components/user-center-card/index", + "t-image": "/components/webp-image/index" + }, + "enablePullDownRefresh": true } \ No newline at end of file diff --git a/pages/personalCenter/index.wxml b/pages/personalCenter/index.wxml index d93ae03..4e3b370 100644 --- a/pages/personalCenter/index.wxml +++ b/pages/personalCenter/index.wxml @@ -1,2 +1,70 @@ -<!--pages/personalCenter/index.wxml--> -<text>pages/personalCenter/index.wxml</text> +<view class="background {{ isWhite ? 'white':''}}"> + <text class="text">涓汉涓績</text> +</view> +<view class="home-page"> + <view class="bg"> + <image src="/static/images/personal/my-bg.png" mode="heightFix" class="image" /> + </view> + <image class="background" src="/static/images/personal/my-bg.png" mode="heightFix" /> + <t-user-center-card userInfo="{{userInfo}}" isPhoneHide="{{true}}" name-class="custom-name-class" phone-class="custom-phone-class" avatar-class="customer-avatar-class" currAuthStep="{{currAuthStep}}" bind:gotoUserEditPage="gotoUserEditPage" /> + <view class="content-wrapper"> + <view class="topBox"> + <view class="teacherBox"> + <view> + <view class="wait" wx:if="{{teacherState.state == 'WaitAudit'}}">绛夊緟瀹℃牳</view> + <view class="yes" wx:if="{{teacherState.state == 'Normal'}}">宸茶璇�</view> + <view class="no" wx:if="{{teacherState.state == 'Reject'}}">宸查┏鍥�</view> + <view class="wait" wx:if="{{teacherState.state == ''}}">寰呰璇�</view> + <view class="title"><text>鏁欏笀璁よ瘉</text> + <text class="change-info" wx:if="{{teacherState.state == ''}}">璁よ瘉</text> + <text class="change-info" wx:if="{{teacherState.state == 'Normal' || teacherState.state == 'Reject'}}">淇敼</text> + </view> + </view> + <view> + <view>{{integral}}</view> + <view class="title">绉垎</view> + </view> + </view> + </view> + <view class="domainBox"> + <view class="title"> + <text>甯哥敤鍔熻兘</text> + </view> + <view class="domainList"> + <view wx:for="{{menuData}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toPages" data-info="{{item}}" class="listItem"> + <view class="icon"> + <t-image src="{{item.icon}}" mode="heightFix" class="img" /> + </view> + <view class="label"> + <text>{{item.title}}</text> + </view> + </view> + </view> + </view> + <view class="domainBox"> + <view class="title"> + <text>鏇村鍔熻兘</text> + </view> + <view class="domainList1"> + <view wx:for="{{moreMenu}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toPages" data-info="{{item}}" class="listItem"> + <view class="icon"> + <t-image src="{{item.icon}}" mode="heightFix" class="img" /> + </view> + <view class="label"> + <text>{{item.title}}</text> + </view> + </view> + </view> + <view class="domainList2"> + <view wx:for="{{moreMenu1}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toPages" data-info="{{item}}" class="listItem"> + <view class="icon"> + <t-image src="{{item.icon}}" mode="heightFix" class="img" /> + </view> + <view class="label"> + <text>{{item.title}}</text> + </view> + </view> + </view> + </view> + </view> +</view> \ No newline at end of file diff --git a/pages/personalCenter/index.wxss b/pages/personalCenter/index.wxss index 0387fff..07525f0 100644 --- a/pages/personalCenter/index.wxss +++ b/pages/personalCenter/index.wxss @@ -1 +1,138 @@ -/* pages/personalCenter/index.wxss */ \ No newline at end of file +page { + background-color: #f0f2f5; + box-sizing: border-box; + padding-bottom: calc(env(safe-area-inset-bottom) + 96rpx); +} + +.background { + width: 100%; + position: fixed; + top: 0; + left: 0; + height: 80rpx; + z-index: 3; + text-align: center; + padding-top: 110rpx; + font-size: 36rpx; +} + +.white { + background: #fff; + color: #333; +} + +.home-page .bg { + height: 780rpx; + width: 100%; + position: absolute; + top: 0; + left: 0; + z-index: -1; +} + +.home-page .bg .image { + height: 100%; +} + +.content-wrapper { + position: relative; + padding: 30rpx; +} + +.topBox { + width: 100%; + background-color: #fff; + border-radius: 20rpx; + box-shadow: 0px 0px 20rpx 2px #f1f1f1; +} + +.teacherBox { + display: flex; + padding: 40rpx 20rpx; + justify-content: space-around; + text-align: center; + font-size: 28rpx; +} + +.teacherBox .title { + margin-top: 20rpx; + line-height: 40rpx; +} + +.teacherBox .change-info { + color: #ff6d00; + margin-left: 20rpx; +} + +.wait { + color: #ff6d00; +} + +.no { + color: #EE1818 +} + +.yes { + color: #1FBC1F +} + +.domainBox { + width: 100%; + margin: 20rpx auto; + background-color: #fff; + border-radius: 20rpx; + box-shadow: 0px 0px 20rpx 2px #f1f1f1; +} + +.domainBox .title { + font-weight: bold; + padding: 30rpx; +} + +.domainList { + width: 100%; + display: flex; + flex-wrap: wrap; + justify-content: center; + padding-bottom: 30rpx; +} + +.domainList1 { + /* width: 100%; */ + display: flex; + /* flex-wrap: wrap; */ + border-bottom: 2rpx solid #f1f1f1; + margin: 0 30rpx; +} + +.domainList2 { + display: flex; + margin: 0 30rpx; +} + +.listItem { + width: 160rpx; + min-width: 160rpx; + flex-shrink: 0; + padding: 30rpx 0; +} + +.listItem .icon { + width: 46rpx; + height: 46rpx; + margin: 0 auto; +} + +.listItem .icon .t-image { + width: 100%; + height: 100%; + object-fit: contain; +} + +.listItem .label { + width: 100%; + font-size: 28rpx; + line-height: 40rpx; + text-align: center; + margin-top: 20rpx; +} \ No newline at end of file diff --git a/pages/personalCenter/myCollection/index.js b/pages/personalCenter/myCollection/index.js index 93fc08e..358d636 100644 --- a/pages/personalCenter/myCollection/index.js +++ b/pages/personalCenter/myCollection/index.js @@ -1,4 +1,3 @@ -// pages/personalCenter/myCollection/index.js Page({ /** @@ -12,7 +11,7 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 */ onLoad(options) { - + console.log(options); }, /** diff --git a/pages/personalCenter/myCollection/index.json b/pages/personalCenter/myCollection/index.json index 8835af0..c1b3d78 100644 --- a/pages/personalCenter/myCollection/index.json +++ b/pages/personalCenter/myCollection/index.json @@ -1,3 +1,4 @@ { + "navigationBarTitleText": "鎴戠殑鏀惰棌", "usingComponents": {} } \ No newline at end of file diff --git a/pages/personalCenter/myCollection/index.wxml b/pages/personalCenter/myCollection/index.wxml index c7503c3..85d5124 100644 --- a/pages/personalCenter/myCollection/index.wxml +++ b/pages/personalCenter/myCollection/index.wxml @@ -1,2 +1 @@ -<!--pages/personalCenter/myCollection/index.wxml--> -<text>pages/personalCenter/myCollection/index.wxml</text> +<text>鎴戠殑鏀惰棌</text> \ No newline at end of file diff --git a/pages/personalCenter/myMassage/index.js b/pages/personalCenter/myMassage/index.js index b6c2b58..19ad1e3 100644 --- a/pages/personalCenter/myMassage/index.js +++ b/pages/personalCenter/myMassage/index.js @@ -24,6 +24,7 @@ */ onLoad(options) { this.getDataList(false); + console.log(options); }, getDataList(isReachBottom) { diff --git a/pages/personalCenter/myMassage/index.json b/pages/personalCenter/myMassage/index.json index 8835af0..b42d2b0 100644 --- a/pages/personalCenter/myMassage/index.json +++ b/pages/personalCenter/myMassage/index.json @@ -1,3 +1,10 @@ { - "usingComponents": {} + "navigationBarTitleText": "鎴戠殑娑堟伅", + "usingComponents": { + "t-back-top": "tdesign-miniprogram/back-top/back-top", + "t-image": "tdesign-miniprogram/image/image", + "t-pull-down-refresh": "tdesign-miniprogram/pull-down-refresh/pull-down-refresh", + "t-loading": "tdesign-miniprogram/loading/loading", + "t-empty": "tdesign-miniprogram/empty/empty" + } } \ No newline at end of file diff --git a/pages/personalCenter/myOrder/index.js b/pages/personalCenter/myOrder/index.js index b7ca12c..358d636 100644 --- a/pages/personalCenter/myOrder/index.js +++ b/pages/personalCenter/myOrder/index.js @@ -1,4 +1,3 @@ -// pages/personalCenter/myOrder/index.js Page({ /** @@ -12,7 +11,7 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 */ onLoad(options) { - + console.log(options); }, /** diff --git a/pages/personalCenter/myOrder/index.json b/pages/personalCenter/myOrder/index.json index 8835af0..aa73fde 100644 --- a/pages/personalCenter/myOrder/index.json +++ b/pages/personalCenter/myOrder/index.json @@ -1,3 +1,4 @@ { + "navigationBarTitleText": "鎴戠殑璁㈠崟", "usingComponents": {} } \ No newline at end of file diff --git a/pages/personalCenter/publishBooks/index.js b/pages/personalCenter/publishBooks/index.js index 8036f4a..6057736 100644 --- a/pages/personalCenter/publishBooks/index.js +++ b/pages/personalCenter/publishBooks/index.js @@ -12,7 +12,7 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 */ onLoad(options) { - + console.log(options); }, /** diff --git a/pages/personalCenter/publishBooks/index.json b/pages/personalCenter/publishBooks/index.json index 8835af0..da878a8 100644 --- a/pages/personalCenter/publishBooks/index.json +++ b/pages/personalCenter/publishBooks/index.json @@ -1,3 +1,4 @@ { + "navigationBarTitleText": "鍑轰功鐢宠", "usingComponents": {} } \ No newline at end of file diff --git a/pages/personalCenter/sampleBooks/index.js b/pages/personalCenter/sampleBooks/index.js index ff7d82d..1cd80ed 100644 --- a/pages/personalCenter/sampleBooks/index.js +++ b/pages/personalCenter/sampleBooks/index.js @@ -12,7 +12,7 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 */ onLoad(options) { - + console.log(options); }, /** diff --git a/pages/personalCenter/sampleBooks/index.json b/pages/personalCenter/sampleBooks/index.json index 8835af0..95911bb 100644 --- a/pages/personalCenter/sampleBooks/index.json +++ b/pages/personalCenter/sampleBooks/index.json @@ -1,3 +1,4 @@ { + "navigationBarTitleText": "鏍蜂功鐢宠", "usingComponents": {} } \ No newline at end of file diff --git a/pages/teacherCertification/index.js b/pages/teacherCertification/index.js index 09555f3..358d636 100644 --- a/pages/teacherCertification/index.js +++ b/pages/teacherCertification/index.js @@ -1,4 +1,3 @@ -// pages/teacherCertification/index.js Page({ /** @@ -12,7 +11,7 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 */ onLoad(options) { - + console.log(options); }, /** diff --git a/pages/teacherCertification/index.json b/pages/teacherCertification/index.json index 8835af0..8aecc2b 100644 --- a/pages/teacherCertification/index.json +++ b/pages/teacherCertification/index.json @@ -1,3 +1,6 @@ { + "navigationBarTitleText": "鏁欏笀璁よ瘉", + "enablePullDownRefresh": true, + "backgroundTextStyle": "light", "usingComponents": {} } \ No newline at end of file diff --git a/pages/teacherCertification/index.wxml b/pages/teacherCertification/index.wxml index ffa6ee5..5feb603 100644 --- a/pages/teacherCertification/index.wxml +++ b/pages/teacherCertification/index.wxml @@ -1,2 +1,68 @@ -<!--pages/teacherCertification/index.wxml--> -<text>pages/teacherCertification/index.wxml</text> +<view class="container"> + <view class="tips"> 浠呴檺瀛︽牎鏈绋嬩换璇炬暀甯堢敵璇凤紱璇蜂笂浼犳湁鏁堝湪鑱屾暀甯堝伐浣滆瘉灏嗘湁鍔╀簬瀹℃牳銆� </view> + <view class="page-body"> + <form catchsubmit="formSubmit" catchreset="formReset" class="formBox"> + <view class="from-item"> + <view class="label"> 褰撳墠鐘舵�侊細 </view> + <view class="item-content"> + <input class="weui-input" name="input" placeholder="" /> + </view> + </view> + <view class="from-item"> + <view class="label"> 瀛︽牎锛� </view> + <view class="item-content"> + <input class="weui-input" name="input" placeholder="璇疯緭鍏ュ鏍�" /> + </view> + </view> + <view class="from-item"> + <view class="label"> 鐪熷疄濮撳悕锛� </view> + <view class="item-content"> + <input class="weui-input" name="input" placeholder="璇疯緭鍏ョ湡瀹炲鍚�" /> + </view> + </view> + <view class="from-item"> + <view class="label"> 鑱岀О锛� </view> + <view class="item-content"> + <!-- <input class="weui-input" name="input" placeholder="璇烽�夋嫨鑱岀О" /> --> + </view> + </view> + <view class="from-item"> + <view class="label"> 浠绘暀璇剧▼锛� </view> + <view class="item-content"> + <input class="weui-input" name="input" placeholder="璇疯緭鍏ヤ换鏁欒绋�" /> + </view> + </view> + <view class="from-item"> + <view class="label"> 鎵嬫満鍙凤細 </view> + <view class="item-content"> + <input class="weui-input" name="input" placeholder="璇疯緭鍏ユ墜鏈哄彿" /> + </view> + </view> + <view class="from-item"> + <view class="label"> 搴ф満锛� </view> + <view class="item-content"> + <input class="weui-input" name="input" placeholder="璇疯緭鍏ュ骇鏈�" /> + </view> + </view> + <view class="from-item"> + <view class="label"> 閭锛� </view> + <view class="item-content"> + <input class="weui-input" name="input" placeholder="璇疯緭鍏ラ偖绠�" /> + </view> + </view> + <view class="from-item"> + <view class="label"> 璇︾粏鍦板潃锛� </view> + <view class="item-content"> + <input class="weui-input" name="input" placeholder="璇疯緭鍏ヨ缁嗗湴鍧�" /> + </view> + </view> + <view class="from-item"> + <view class="label"> 鍦ㄨ亴鏁欏笀宸ヤ綔璇侊細 </view> + <view class="item-content"> </view> + </view> + <view class="btn-area"> + <button class="submit" formType="submit">鎻愪氦</button> + </view> + </form> + </view> +</view> diff --git a/pages/teacherCertification/index.wxss b/pages/teacherCertification/index.wxss index a28030d..aa4e93c 100644 --- a/pages/teacherCertification/index.wxss +++ b/pages/teacherCertification/index.wxss @@ -1 +1,36 @@ -/* pages/teacherCertification/index.wxss */ \ No newline at end of file +.tips { + line-height: 24px; + font-size: 28rpx; + padding: 5px; + background: rgba(255, 108, 0, 0.1); + color: #ff6c00; + text-align: center; + margin: 0 auto 20px auto; +} + +.page-body { + padding: 20rpx; + font-size: 28rpx; +} + +.from-item { + margin-bottom: 20rpx; + display: flex; +} + +.from-item .label { + width: 240rpx; + height: 68rpx; + line-height: 68rpx; +} + +.from-item .item-content { + width: 56%; + border: 2rpx solid #D9D9D9; + padding: 10rpx; +} + +.submit { + background: #ff6c00; + color: #fff; +} \ No newline at end of file diff --git a/pages/testLogin/index.js b/pages/testLogin/index.js index e402ac9..d516931 100644 --- a/pages/testLogin/index.js +++ b/pages/testLogin/index.js @@ -85,7 +85,7 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 */ onLoad(options) { - + console.log(options); }, /** diff --git a/pages/usercenter/index.wxss b/pages/usercenter/index.wxss index 483e6f2..6a8e0f4 100644 --- a/pages/usercenter/index.wxss +++ b/pages/usercenter/index.wxss @@ -25,9 +25,11 @@ overflow: hidden; margin-bottom: 20rpx; } + .icon-color { color: #aaa; } + .cell-class { height: 100rpx; display: flex; @@ -60,6 +62,7 @@ -ms-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } + .order-content-t { margin-top: 10rpx; font-size: 24rpx; @@ -73,6 +76,7 @@ margin-bottom: env(safe-area-inset-bottom); border-radius: 16rpx 16rpx 0 0; } + .popup-content .popup-title { background: #fff; text-align: center; @@ -101,6 +105,7 @@ transform-origin: left top; border-bottom: 2rpx solid #e5e5e5; } + .popup-content .popup-phone, .popup-content .popup-close { background: #fff; @@ -114,12 +119,15 @@ font-weight: 400; color: #333; } + .popup-content .popup-phone.online { margin-bottom: 20rpx; } + .popup-content .popup-phone.online::after { content: none; } + .popup-content .popup-close { color: #333; border: 0; @@ -138,9 +146,11 @@ font-size: 24rpx; line-height: 32rpx; } + .cell-box .order-group__left { margin-right: 0; } + .cell-box .t-cell-padding { padding: 24rpx 18rpx 24rpx 32rpx; -} +} \ No newline at end of file diff --git a/services/home/home.js b/services/home/home.js index 5bb98db..598c2dd 100644 --- a/services/home/home.js +++ b/services/home/home.js @@ -8,63 +8,63 @@ { text: '鍥句功鏈嶅姟', key: 0, - icon: '/static/images/home/1.png', - url: '/pages/bookServices/index', + icon: '/static/images/home/zhutichuban@2x.png', + url: '/pages/bookServices/assort/index.wxml', }, { text: '鏁板瓧闃呰', key: 1, - icon: '', + icon: '/static/images/home/shuziyuedu@2x.png', url: '', }, { text: '鏁板瓧璇剧▼', key: 2, - icon: "", + icon: '/static/images/home/shuzikecheng@2x.png', url: '', }, { text: '鏁板瓧鏁欐潗', key: 3, - icon: "", + icon: '/static/images/home/shuzijiaocai@2x.png', url: '', }, { text: '涓撻璁ㄨ', key: 4, - icon: "", + icon: '/static/images/home/zhuantitaolun@2x.png', url: '', }, { text: '绾夸笂涔﹀睍', key: 5, - icon: "", + icon: '/static/images/home/xianshangshuzhan@2x.png', url: '', }, { text: '涔︾洰涓嬭浇', key: 6, - icon: "", + icon: '/static/images/home/shumuxiazai@2x.png', url: '', }, { text: '鏁欏笀璁よ瘉', key: 7, - icon: "", - url: '', + icon: '/static/images/home/jiaoshirenzheng@2x.png', + url: '/pages/teacherCertification/index', }, { text: '鏍蜂功鐢宠', key: 8, - icon: "", + icon: '/static/images/home/yangshushenqing@2x.png', url: '', }, { text: '鎴戣鍑轰功', key: 9, - icon: "", + icon: '/static/images/home/xueshuzhuzuo@2x.png', url: '', - } + }, ], }; }); diff --git a/static/images/bookService/assort/book-img.png b/static/images/bookService/assort/book-img.png new file mode 100644 index 0000000..6343c4c --- /dev/null +++ b/static/images/bookService/assort/book-img.png Binary files differ diff --git a/static/images/bookService/detail/author.png b/static/images/bookService/detail/author.png new file mode 100644 index 0000000..0dd153d --- /dev/null +++ b/static/images/bookService/detail/author.png Binary files differ diff --git a/static/images/bookService/detail/book-brief.png b/static/images/bookService/detail/book-brief.png new file mode 100644 index 0000000..34295ff --- /dev/null +++ b/static/images/bookService/detail/book-brief.png Binary files differ diff --git a/static/images/bookService/detail/collect.png b/static/images/bookService/detail/collect.png new file mode 100644 index 0000000..fdac645 --- /dev/null +++ b/static/images/bookService/detail/collect.png Binary files differ diff --git a/static/images/bookService/detail/collecting.png b/static/images/bookService/detail/collecting.png new file mode 100644 index 0000000..a187188 --- /dev/null +++ b/static/images/bookService/detail/collecting.png Binary files differ diff --git a/static/images/bookService/detail/dangdang.png b/static/images/bookService/detail/dangdang.png new file mode 100644 index 0000000..4aa62c2 --- /dev/null +++ b/static/images/bookService/detail/dangdang.png Binary files differ diff --git a/static/images/bookService/detail/ebook.png b/static/images/bookService/detail/ebook.png new file mode 100644 index 0000000..bafee65 --- /dev/null +++ b/static/images/bookService/detail/ebook.png Binary files differ diff --git a/static/images/bookService/detail/electon-price.png b/static/images/bookService/detail/electon-price.png new file mode 100644 index 0000000..e6c5467 --- /dev/null +++ b/static/images/bookService/detail/electon-price.png Binary files differ diff --git a/static/images/bookService/detail/jd.png b/static/images/bookService/detail/jd.png new file mode 100644 index 0000000..a58147c --- /dev/null +++ b/static/images/bookService/detail/jd.png Binary files differ diff --git a/static/images/bookService/detail/label.png b/static/images/bookService/detail/label.png new file mode 100644 index 0000000..8e2272e --- /dev/null +++ b/static/images/bookService/detail/label.png Binary files differ diff --git a/static/images/bookService/detail/paper-book.png b/static/images/bookService/detail/paper-book.png new file mode 100644 index 0000000..59a6219 --- /dev/null +++ b/static/images/bookService/detail/paper-book.png Binary files differ diff --git a/static/images/bookService/detail/paper-price.png b/static/images/bookService/detail/paper-price.png new file mode 100644 index 0000000..9989488 --- /dev/null +++ b/static/images/bookService/detail/paper-price.png Binary files differ diff --git a/static/images/bookService/detail/suggest.png b/static/images/bookService/detail/suggest.png new file mode 100644 index 0000000..0ece03a --- /dev/null +++ b/static/images/bookService/detail/suggest.png Binary files differ diff --git a/static/images/bookService/detail/tmall.png b/static/images/bookService/detail/tmall.png new file mode 100644 index 0000000..b660d14 --- /dev/null +++ b/static/images/bookService/detail/tmall.png Binary files differ diff --git a/static/images/home/1.png b/static/images/home/1.png deleted file mode 100644 index 58d15dd..0000000 --- a/static/images/home/1.png +++ /dev/null Binary files differ diff --git a/static/images/home/Home-click@2x.png b/static/images/home/Home-click@2x.png new file mode 100644 index 0000000..5e192fd --- /dev/null +++ b/static/images/home/Home-click@2x.png Binary files differ diff --git a/static/images/home/Home@2x.png b/static/images/home/Home@2x.png new file mode 100644 index 0000000..b51b113 --- /dev/null +++ b/static/images/home/Home@2x.png Binary files differ diff --git a/static/images/home/cart-click@2x.png b/static/images/home/cart-click@2x.png new file mode 100644 index 0000000..11c3c13 --- /dev/null +++ b/static/images/home/cart-click@2x.png Binary files differ diff --git a/static/images/home/cart@2x.png b/static/images/home/cart@2x.png new file mode 100644 index 0000000..ff7a375 --- /dev/null +++ b/static/images/home/cart@2x.png Binary files differ diff --git a/static/images/home/click-icon@2x.png b/static/images/home/click-icon@2x.png new file mode 100644 index 0000000..762ccfe --- /dev/null +++ b/static/images/home/click-icon@2x.png Binary files differ diff --git a/static/images/home/home-bg@2x.png b/static/images/home/home-bg@2x.png new file mode 100644 index 0000000..67d356b --- /dev/null +++ b/static/images/home/home-bg@2x.png Binary files differ diff --git a/static/images/home/home-cart.png b/static/images/home/home-cart.png new file mode 100644 index 0000000..727403e --- /dev/null +++ b/static/images/home/home-cart.png Binary files differ diff --git a/static/images/home/jiaoshirenzheng@2x.png b/static/images/home/jiaoshirenzheng@2x.png new file mode 100644 index 0000000..48b106d --- /dev/null +++ b/static/images/home/jiaoshirenzheng@2x.png Binary files differ diff --git a/static/images/home/jingxuankecheng.png b/static/images/home/jingxuankecheng.png deleted file mode 100644 index 0d3c329..0000000 --- a/static/images/home/jingxuankecheng.png +++ /dev/null Binary files differ diff --git a/static/images/home/jingxuankecheng@2x.png b/static/images/home/jingxuankecheng@2x.png new file mode 100644 index 0000000..238d67a --- /dev/null +++ b/static/images/home/jingxuankecheng@2x.png Binary files differ diff --git a/static/images/home/learn-click@2x.png b/static/images/home/learn-click@2x.png new file mode 100644 index 0000000..c64aa44 --- /dev/null +++ b/static/images/home/learn-click@2x.png Binary files differ diff --git a/static/images/home/learn@2x.png b/static/images/home/learn@2x.png new file mode 100644 index 0000000..e75981e --- /dev/null +++ b/static/images/home/learn@2x.png Binary files differ diff --git a/static/images/home/my-click@2x.png b/static/images/home/my-click@2x.png new file mode 100644 index 0000000..f76b3c1 --- /dev/null +++ b/static/images/home/my-click@2x.png Binary files differ diff --git a/static/images/home/my@2x.png b/static/images/home/my@2x.png new file mode 100644 index 0000000..3a37051 --- /dev/null +++ b/static/images/home/my@2x.png Binary files differ diff --git a/static/images/home/paihangbang@2x.png b/static/images/home/paihangbang@2x.png new file mode 100644 index 0000000..4872c0c --- /dev/null +++ b/static/images/home/paihangbang@2x.png Binary files differ diff --git a/static/images/home/service-click@2x.png b/static/images/home/service-click@2x.png new file mode 100644 index 0000000..984a9c5 --- /dev/null +++ b/static/images/home/service-click@2x.png Binary files differ diff --git a/static/images/home/service@2x.png b/static/images/home/service@2x.png new file mode 100644 index 0000000..90a25e0 --- /dev/null +++ b/static/images/home/service@2x.png Binary files differ diff --git a/static/images/home/shumuxiazai@2x.png b/static/images/home/shumuxiazai@2x.png new file mode 100644 index 0000000..2c15a9e --- /dev/null +++ b/static/images/home/shumuxiazai@2x.png Binary files differ diff --git a/static/images/home/shuzijiaocai.png b/static/images/home/shuzijiaocai.png deleted file mode 100644 index f687cff..0000000 --- a/static/images/home/shuzijiaocai.png +++ /dev/null Binary files differ diff --git a/static/images/home/shuzijiaocai1@2x.png b/static/images/home/shuzijiaocai1@2x.png new file mode 100644 index 0000000..fa84bde --- /dev/null +++ b/static/images/home/shuzijiaocai1@2x.png Binary files differ diff --git a/static/images/home/shuzijiaocai@2x.png b/static/images/home/shuzijiaocai@2x.png new file mode 100644 index 0000000..6213c58 --- /dev/null +++ b/static/images/home/shuzijiaocai@2x.png Binary files differ diff --git a/static/images/home/shuzikecheng@2x.png b/static/images/home/shuzikecheng@2x.png new file mode 100644 index 0000000..738fb89 --- /dev/null +++ b/static/images/home/shuzikecheng@2x.png Binary files differ diff --git a/static/images/home/shuziyuedu1@2x.png b/static/images/home/shuziyuedu1@2x.png new file mode 100644 index 0000000..aa23ed0 --- /dev/null +++ b/static/images/home/shuziyuedu1@2x.png Binary files differ diff --git a/static/images/home/shuziyuedu@2x.png b/static/images/home/shuziyuedu@2x.png new file mode 100644 index 0000000..0364497 --- /dev/null +++ b/static/images/home/shuziyuedu@2x.png Binary files differ diff --git a/static/images/home/tushufuwu.png b/static/images/home/tushufuwu.png deleted file mode 100644 index 895c92f..0000000 --- a/static/images/home/tushufuwu.png +++ /dev/null Binary files differ diff --git a/static/images/home/tushufuwu@2x.png b/static/images/home/tushufuwu@2x.png new file mode 100644 index 0000000..b849a14 --- /dev/null +++ b/static/images/home/tushufuwu@2x.png Binary files differ diff --git a/static/images/home/xianshangshuzhan@2x.png b/static/images/home/xianshangshuzhan@2x.png new file mode 100644 index 0000000..cab5b15 --- /dev/null +++ b/static/images/home/xianshangshuzhan@2x.png Binary files differ diff --git a/static/images/home/xueshuzhuzuo@2x.png b/static/images/home/xueshuzhuzuo@2x.png new file mode 100644 index 0000000..a07c519 --- /dev/null +++ b/static/images/home/xueshuzhuzuo@2x.png Binary files differ diff --git a/static/images/home/yangshushenqing@2x.png b/static/images/home/yangshushenqing@2x.png new file mode 100644 index 0000000..5c94815 --- /dev/null +++ b/static/images/home/yangshushenqing@2x.png Binary files differ diff --git a/static/images/home/zhuantitaolun.png b/static/images/home/zhuantitaolun.png index 03da36c..c8f758f 100644 --- a/static/images/home/zhuantitaolun.png +++ b/static/images/home/zhuantitaolun.png Binary files differ diff --git a/static/images/home/zhuantitaolun1@2x.png b/static/images/home/zhuantitaolun1@2x.png new file mode 100644 index 0000000..868835a --- /dev/null +++ b/static/images/home/zhuantitaolun1@2x.png Binary files differ diff --git a/static/images/home/zhuantitaolun@2x.png b/static/images/home/zhuantitaolun@2x.png new file mode 100644 index 0000000..b04b5b7 --- /dev/null +++ b/static/images/home/zhuantitaolun@2x.png Binary files differ diff --git a/static/images/home/zhutichuban@2x.png b/static/images/home/zhutichuban@2x.png new file mode 100644 index 0000000..b8f01d5 --- /dev/null +++ b/static/images/home/zhutichuban@2x.png Binary files differ diff --git a/static/images/home/zuoxia-p@2x.png b/static/images/home/zuoxia-p@2x.png new file mode 100644 index 0000000..33fe156 --- /dev/null +++ b/static/images/home/zuoxia-p@2x.png Binary files differ diff --git a/static/images/personal/about.png b/static/images/personal/about.png new file mode 100644 index 0000000..da79664 --- /dev/null +++ b/static/images/personal/about.png Binary files differ diff --git a/static/images/personal/certificate.png b/static/images/personal/certificate.png new file mode 100644 index 0000000..62ea253 --- /dev/null +++ b/static/images/personal/certificate.png Binary files differ diff --git a/static/images/personal/chushu.png b/static/images/personal/chushu.png new file mode 100644 index 0000000..bbc4a66 --- /dev/null +++ b/static/images/personal/chushu.png Binary files differ diff --git a/static/images/personal/contact.png b/static/images/personal/contact.png new file mode 100644 index 0000000..bbcdf2e --- /dev/null +++ b/static/images/personal/contact.png Binary files differ diff --git a/static/images/personal/download.png b/static/images/personal/download.png new file mode 100644 index 0000000..3e1d52b --- /dev/null +++ b/static/images/personal/download.png Binary files differ diff --git a/static/images/personal/feedback.png b/static/images/personal/feedback.png new file mode 100644 index 0000000..dc59853 --- /dev/null +++ b/static/images/personal/feedback.png Binary files differ diff --git a/static/images/personal/jihuo.png b/static/images/personal/jihuo.png new file mode 100644 index 0000000..9fe88a0 --- /dev/null +++ b/static/images/personal/jihuo.png Binary files differ diff --git a/static/images/personal/my-bg.png b/static/images/personal/my-bg.png new file mode 100644 index 0000000..bd863e4 --- /dev/null +++ b/static/images/personal/my-bg.png Binary files differ diff --git a/static/images/personal/notification.png b/static/images/personal/notification.png new file mode 100644 index 0000000..4f5b3aa --- /dev/null +++ b/static/images/personal/notification.png Binary files differ diff --git a/static/images/personal/order.png b/static/images/personal/order.png new file mode 100644 index 0000000..e6a2315 --- /dev/null +++ b/static/images/personal/order.png Binary files differ diff --git a/static/images/personal/setting.png b/static/images/personal/setting.png new file mode 100644 index 0000000..b0ae238 --- /dev/null +++ b/static/images/personal/setting.png Binary files differ diff --git a/static/images/personal/upload.png b/static/images/personal/upload.png new file mode 100644 index 0000000..442dc5b --- /dev/null +++ b/static/images/personal/upload.png Binary files differ diff --git a/static/images/personal/wodeshoucang.png b/static/images/personal/wodeshoucang.png new file mode 100644 index 0000000..51d12ab --- /dev/null +++ b/static/images/personal/wodeshoucang.png Binary files differ diff --git a/static/images/personal/yangshushenqing.png b/static/images/personal/yangshushenqing.png new file mode 100644 index 0000000..ce1370f --- /dev/null +++ b/static/images/personal/yangshushenqing.png Binary files differ diff --git a/style/theme.wxss b/style/theme.wxss index bb1249e..8b563f4 100644 --- a/style/theme.wxss +++ b/style/theme.wxss @@ -1,4 +1,5 @@ /* 涓婚瀹氬埗 */ + .t-input { --td-input-placeholder-text-color: #bbbbbb; --td-input-text-color: #333333; @@ -44,4 +45,4 @@ .dialog__button-cancel { color: #aeb3b7 !important; -} +} \ No newline at end of file -- Gitblit v1.9.1