From 0d1323fb39db5e8d3b124e61303bde1b1352b887 Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期四, 29 二月 2024 21:48:02 +0800 Subject: [PATCH] feat(daima代码合并): 和宁 --- pages/testLogin/index.wxml | 8 pages/teacherCertification/index.wxml | 68 + pages/usercenter/index.wxss | 12 pages/personalCenter/components/user-center-card/index.json | 7 pages/personalCenter/components/user-center-card/index.wxss | 60 static/images/personal/notification.png | 0 pages/personalCenter/certificate/index.wxss | 0 pages/personalCenter/myOrder/index.js | 65 + pages/personalCenter/feedBackSubmit/index.js | 66 + pages/personalCenter/sampleBooks/index.js | 66 + pages/bookExhibitionDetails/index.wxss | 86 + static/images/home/shumuxiazai@2x.png | 0 static/images/bookExhibitionDetails/Parting.png | 0 pages/personalCenter/certificate/index.json | 4 pages/personalCenter/feedBack/index.wxss | 1 pages/personalCenter/publishBooks/index.wxml | 2 pages/bookExhibitionList/img/banner.png | 0 pages/personalCenter/certificate/index.js | 65 + pages/personalCenter/components/user-center-card/index.js | 35 static/images/home/service-click@2x.png | 0 static/images/personal/notification1.png | 0 static/images/home/learn@2x.png | 0 static/images/home/zuoxia-p@2x.png | 0 pages/personalCenter/publishBooks/index.json | 4 static/images/home/learn-click@2x.png | 0 pages/bookExhibitionDetails/index.json | 3 static/images/home/shuzijiaocai@2x.png | 0 project.config.json | 2 pages/personalCenter/myOrder/index.wxml | 2 pages/personalCenter/feedBackSubmit/index.wxml | 2 static/images/personal/feedback.png | 0 static/images/home/zhuantitaolun@2x.png | 0 static/images/home/shuziyuedu@2x.png | 0 pages/testLogin/index.js | 132 ++ pages/personalCenter/sampleBooks/index.wxss | 1 assets/js/middleGround/api/store.js | 3 static/images/personal/contact.png | 0 pages/personalCenter/sampleBooks/index.json | 4 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 | 66 + pages/bookExhibitionDetails/index.wxml | 32 static/images/home/Home-click@2x.png | 0 pages/testLogin/index.json | 6 static/images/home/zhuantitaolun1@2x.png | 0 static/images/home/shuziyuedu1@2x.png | 0 static/images/home/my@2x.png | 0 pages/personalCenter/publishBooks/index.wxss | 1 pages/bookExhibitionList/index.wxss | 102 + static/images/home/zhutichuban@2x.png | 0 pages/personalCenter/feedBack/index.wxml | 2 pages/personalCenter/downloads/index.json | 4 app.json | 47 static/images/home/yangshushenqing@2x.png | 0 pages/personalCenter/myCollection/index.js | 65 + assets/request/index.js | 6 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/bookExhibitionDetails/shuzha.png | 0 pages/testLogin/index.wxss | 4 static/images/home/home-cart.png | 0 pages/personalCenter/myMassage/index.json | 10 static/images/personal/my-bg.png | 0 pages/personalCenter/myCollection/index.json | 4 static/images/home/cart-click@2x.png | 0 pages/personalCenter/activateProduct/index.json | 4 pages/personalCenter/feedBack/index.js | 66 + pages/personalCenter/sampleBooks/index.wxml | 2 static/images/home/tushufuwu@2x.png | 0 pages/bookExhibitionDetails/index.js | 136 ++ pages/personalCenter/activateProduct/index.wxss | 1 services/home/home.js | 24 pages/personalCenter/activateProduct/index.js | 66 + pages/personalCenter/index.wxml | 70 + pages/personalCenter/myCollection/index.wxss | 0 static/images/personal/about.png | 0 pages/personalCenter/myMassage/index.wxss | 60 pages/personalCenter/publishBooks/index.js | 66 + static/images/home/service@2x.png | 0 pages/personalCenter/index.js | 209 +++ pages/home/home.wxss | 295 ++++ pages/personalCenter/myMassage/massageDetail/index.wxss | 28 pages/home/home.json | 5 custom-tab-bar/index.wxml | 29 static/images/personal/wodeshoucang.png | 0 pages/bookExhibitionList/index.wxml | 47 pages/bookExhibitionList/index.json | 12 custom-tab-bar/data.js | 18 pages/personalCenter/downloads/index.wxss | 1 static/images/home/xueshuzhuzuo@2x.png | 0 pages/teacherCertification/index.json | 6 pages/personalCenter/myMassage/massageDetail/index.json | 4 static/images/home/jingxuankecheng@2x.png | 0 pages/personalCenter/feedBackSubmit/index.wxss | 1 pages/home/home.js | 310 ++++ pages/teacherCertification/index.wxss | 36 static/images/home/zhuantitaolun.png | 0 static/images/personal/upload.png | 0 pages/bookExhibitionList/index.js | 308 +++++ pages/personalCenter/feedBack/index.json | 4 pages/personalCenter/activateProduct/index.wxml | 2 pages/personalCenter/components/user-center-card/index.wxml | 33 static/images/personal/download.png | 0 static/images/personal/order.png | 0 static/images/personal/certificate.png | 0 pages/personalCenter/myCollection/index.wxml | 1 app.js | 2 assets/js/userAction.js | 18 pages/personalCenter/index.wxss | 138 ++ assets/js/config.js | 2 pages/teacherCertification/index.js | 65 + static/images/home/home-bg@2x.png | 0 pages/home/home.wxml | 184 ++ pages/personalCenter/myMassage/massageDetail/index.wxml | 8 custom-tab-bar/index.json | 3 pages/personalCenter/feedBackSubmit/index.json | 4 pages/personalCenter/myMassage/index.wxml | 35 pages/personalCenter/myOrder/index.json | 4 custom-tab-bar/index.wxss | 3 static/images/home/jiaoshirenzheng@2x.png | 0 static/images/personal/setting.png | 0 pages/personalCenter/index.json | 9 static/images/personal/yangshushenqing.png | 0 pages/personalCenter/downloads/index.wxml | 2 static/images/home/shuzijiaocai1@2x.png | 0 /dev/null | 0 static/images/home/paihangbang@2x.png | 0 static/images/home/Home@2x.png | 0 static/images/personal/jihuo.png | 0 pages/personalCenter/myMassage/index.js | 156 ++ pages/personalCenter/myMassage/massageDetail/index.js | 79 + pages/personalCenter/myOrder/index.wxss | 0 136 files changed, 3,493 insertions(+), 128 deletions(-) diff --git a/app.js b/app.js index 8b530a9..1f62230 100644 --- a/app.js +++ b/app.js @@ -4,7 +4,7 @@ App({ MG: MG, config: config, - onLaunch: function () {}, + onLaunch: function () { }, onShow: function () { updateManager(); }, diff --git a/app.json b/app.json index abba3f6..ea01e60 100644 --- a/app.json +++ b/app.json @@ -3,6 +3,9 @@ "pages/home/home", "pages/bookServices/assort/index", "pages/bookServices/detail/index", + "pages/bookServices/list/index", + "pages/bookExhibitionList/index", + "pages/bookExhibitionDetails/index", "pages/usercenter/index", "pages/usercenter/person-info/index", "pages/usercenter/address/list/index", @@ -30,7 +33,21 @@ "pages/order/fill-tracking-no/index", "pages/order/delivery-detail/index", "pages/order/invoice/index", - "pages/usercenter/name-edit/index" + "pages/usercenter/name-edit/index", + "pages/teacherCertification/index", + "pages/personalCenter/index", + "pages/personalCenter/myOrder/index", + "pages/personalCenter/myCollection/index", + "pages/personalCenter/myMassage/index", + "pages/personalCenter/myMassage/massageDetail/index", + "pages/personalCenter/feedBack/index", + "pages/personalCenter/feedBackSubmit/index", + "pages/personalCenter/certificate/index", + "pages/personalCenter/publishBooks/index", + "pages/personalCenter/sampleBooks/index", + "pages/personalCenter/downloads/index", + "pages/personalCenter/activateProduct/index", + "pages/testLogin/index" ], "tabBar": { "custom": true, @@ -41,27 +58,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/assort/index", - "text": "鍥句功鏈嶅姟" + "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"], + "requiredPrivateInfos": [ + "chooseAddress" + ], "usingComponents": {}, "window": { "backgroundTextStyle": "light", @@ -75,4 +104,4 @@ "desc": "浣犵殑浣嶇疆淇℃伅灏嗙敤浜庡皬绋嬪簭浣嶇疆鎺ュ彛鐨勬晥鏋滃睍绀�" } } -} +} \ No newline at end of file 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/middleGround/api/store.js b/assets/js/middleGround/api/store.js index a2c791e..85105ec 100644 --- a/assets/js/middleGround/api/store.js +++ b/assets/js/middleGround/api/store.js @@ -301,7 +301,10 @@ ] }) } + let token = wx.getStorageSync(tokenKey) ? wx.getStorageSync(tokenKey) : ''; + + let url = token ? '/store/api/ApiQueryProductByAppUser' : '/store/api/ApiQueryProduct' return request({ url: url, 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 c6a4cb9..e13c724 100644 --- a/custom-tab-bar/data.js +++ b/custom-tab-bar/data.js @@ -1,27 +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/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/usercenter/index', + 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/bookExhibitionDetails/index.js b/pages/bookExhibitionDetails/index.js new file mode 100644 index 0000000..6ab4e9d --- /dev/null +++ b/pages/bookExhibitionDetails/index.js @@ -0,0 +1,136 @@ +// pages/bookExhibitionDetails/index.js +const app = getApp() +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + bookName: null, + bookBeginDate: null, + bookCreator: null, + bookContent: null, + bookImage: null, + bookExhibitionList: [] + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + + const passId = options.id + + this.bookExhibitionGet(passId) + this.getBookExhibitionDetails(passId) + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() { + + }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + + }, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + + }, + + bookExhibitionGet(passId) { + wx.showLoading({ + title: '鍔犺浇涓�...', + }) + console.log(passId, 8988989); + app.MG.store.getProductDetail({ + storeInfo: 'jsek_bookFair', //鍟嗗搧搴� + path: '*', //璺緞 + queryType: '*', + productId: passId, //璇︽儏鐨刬d + fields: { + subtitle: [], + content: [], + isbn: [], + introduction: [], + Creator: [] + } + }).then(res => { + console.log(res.datas.datas.Creator.Name, 'res'); + this.setData({ + bookName: res.datas.name, + bookBeginDate: res.datas.beginDate, + bookCreator: res.datas.datas.Creator.Name, + bookContent: res.datas.content, + bookImage: res.datas.icon + }); + wx.hideLoading() + }) + }, + //涔﹀睍璇︽儏鎺ュ彛 + getBookExhibitionDetails(passId) { + app.MG.store.getProductList({ + path: '*', + storeInfo: 'jsek_bookFair', + mainProductId: passId, + queryType: 'Related', // 鏌ヨ绫诲瀷锛� Related锛氭煡璇㈠叧鑱斿晢鍝侊紱SubProduct: 鏌ヨ瀛愬晢鍝侊紱 + fields: { + author: [], + publicationDate: [], + isbn: [], + content: [], + Creator: [] + } + }).then(res => { + + this.setData({ + bookExhibitionList: res.datas + }) + console.log(this.data.bookExhibitionList, 88888); + }) + }, + onBookDetails(event) { + const item = event.currentTarget.dataset.item; + console.log(item, 'item'); + // wx.navigateTo({ + // url: '/pages/bookExhibitionDetails/index?id?name=' + item.id + item.name // 鍋囪璺宠浆鍒拌鎯呴〉闈紝骞朵紶閫掍簡id鍙傛暟 + // }); + } + +}) \ No newline at end of file diff --git a/pages/bookExhibitionDetails/index.json b/pages/bookExhibitionDetails/index.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/bookExhibitionDetails/index.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/bookExhibitionDetails/index.wxml b/pages/bookExhibitionDetails/index.wxml new file mode 100644 index 0000000..4c9c611 --- /dev/null +++ b/pages/bookExhibitionDetails/index.wxml @@ -0,0 +1,32 @@ +<!--pages/bookExhibitionDetails/index.wxml--> + + +<view class="headBox"> + <text class="titleBox">{{bookName}}</text> + <view class="informationBox"> + <text class="informationNameBox">鍙戝竷浜�:{{bookCreator}}</text> + <text class="informationTimeBox">鍙戝竷鏃ユ湡锛歿{bookBeginDate}}</text> + + </view> +</view> + + + +<image class="partingBox" src="/static/images/bookExhibitionDetails/Parting.png" mode="" /> + +<image class="bannerBox" src="{{bookImage}}" mode="" /> + +<view class="textContent"> + <rich-text nodes="{{bookContent}}"></rich-text> + + <!-- <text>{{bookContent}}</text> --> +</view> +<view class="outsideBooksBox"> + <view class="booksBox" wx:for="{{bookExhibitionList}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}" bind:tap="onBookDetails"> + <view class="outsideBooksImageBox"> + <image class="booksImageBox" src="{{item.icon}}" mode="" /> + </view> + <view class="booksTextBox"> <text>{{item.name}}</text></view> + + </view> +</view> \ No newline at end of file diff --git a/pages/bookExhibitionDetails/index.wxss b/pages/bookExhibitionDetails/index.wxss new file mode 100644 index 0000000..bcd48e4 --- /dev/null +++ b/pages/bookExhibitionDetails/index.wxss @@ -0,0 +1,86 @@ +/* pages/bookExhibitionDetails/index.wxss */ +.headBox { + /* width: 750rpx; */ + text-align: center; + +} + +.titleBox { + font-weight: 800; + font-size: 45rpx; +} + +.informationBox { + margin-top: 30rpx; + display: flex; + justify-content: space-around; + padding: 0 50rpx; + font-size: 25rpx; + color: #545C63; + font-weight: 400; +} + +.partingBox { + width: 750rpx; + height: 40rpx; + margin: 30rpx 0; +} + +.bannerBox { + width: 690rpx; + height: 270rpx; + margin: 0 30rpx; +} + +.textContent { + width: 690rpx; + /* height: 315rpx; */ + padding: 0 30rpx; + font-size: 25rpx; + color: #545C63; + font-weight: 400; + line-height: 50rpx; + margin: 20rpx 2rpx; +} + + +.booksBox { + width: 330rpx; + /* height: 430rpx; */ + /* background-color: #8bc34a; */ + margin: 20rpx; + background: #FFFFFF; + box-shadow: 0rpx 0rpx 18rpx 2rpx rgba(0, 0, 0, 0.08); +} + +.booksImageBox { + width: 240rpx; + height: 300rpx; + margin: 30rpx; + +} + +.outsideBooksImageBox { + background: #F5F5F5; + width: 300rpx; + margin: 0 auto; + margin-top: 15rpx; + +} + +.booksTextBox { + font-size: 25rpx; + font-family: PingFang SC, PingFang SC; + font-weight: bold; + width: 280rpx; + margin: 30rpx 25rpx; + /* overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; */ + +} + +.outsideBooksBox { + display: flex; + flex-wrap: wrap; +} \ No newline at end of file diff --git a/pages/bookExhibitionList/img/banner.png b/pages/bookExhibitionList/img/banner.png new file mode 100644 index 0000000..f31d3af --- /dev/null +++ b/pages/bookExhibitionList/img/banner.png Binary files differ diff --git a/pages/bookExhibitionList/index.js b/pages/bookExhibitionList/index.js new file mode 100644 index 0000000..c4d4a70 --- /dev/null +++ b/pages/bookExhibitionList/index.js @@ -0,0 +1,308 @@ +// pages/bookExhibitionList/index.js +import Toast from 'tdesign-miniprogram/toast/index'; + +const app = getApp() +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + nameSort: null, + total: null, + page: { + start: 0, + size: 16 + }, + keynoteValue: null, + filteredItems: [], + newValue: null, + value: '', + bookExhibitionList: [], + sorter: { + value: 'default', + }, + product: { + value: '*', + + options: [ + { + value: '*', + + label: '鎬诲垎绫�', + }, + { + value: 'jsek_bFHigherEducation', + //閲嶇偣椤圭洰 + price: 'jsek_higherEducation', + label: '楂樼瓑鏁欒偛', + }, + { + value: 'jsek_bFVocationalEducation', + //閲嶇偣椤圭洰 + price: 'jsek_vocationalEducation', + label: '鑱屼笟鏁欒偛', + }, + { + value: 'jsek_bFTeacherEducation', + //閲嶇偣椤圭洰 + price: 'jsek_teacherEducation', + label: '鏁欏笀鏁欒偛', + }, + ], + }, + multipleSelect: { + value: [], + options: [], + }, + }, + + + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + this.bookExhibitionGet() + + this.keyProjectsGet() + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() { + + }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + // console.log(this.data.page.size); + // console.log(this.data.total); + if (this.data.page.size >= this.data.total) { + console.log('宸插姞杞藉畬鎵�鏈夋暟鎹�'); + Toast({ + context: this, + selector: '#t-toast', + message: '娌℃湁鏇村浜�', + direction: 'column', + duration: 1000, + preventScrollThrough: true, + icon: 'poweroff', + }); + } else { + // const currentPage = this.data.page.start + 1; // 鑾峰彇褰撳墠椤垫暟骞跺姞1 + const newSize = this.data.page.size + 10; // 鍘熸潵鐨勫熀纭�涓婂姞10 + this.setData({ + // 'page.start': currentPage, + 'page.size': newSize + }); + this.bookExhibitionGet(); // 璋冪敤鏂规硶鍔犺浇鏇村鏁版嵁 + console.log(1111); + } + }, + + + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + + }, + // 鍥剧墖鏁版嵁鐨勬帴鍙� + bookExhibitionGet(newValue) { + wx.showLoading({ + title: '鍔犺浇涓�...', + }) + + // console.log(this.data.keynoteValue); + let sort = { + Name: this.data.nameSort || 'Desc' + } + app.MG.store.getProductList({ + storeInfo: 'jsek_bookFair', + path: newValue, + queryType: '*', + fields: { + jsek_link: [], + 'bookClassification*': this.data.keynoteValue || [] + }, + paging: this.data.page, + sort: sort, + // coverSize: { + // width: 100 + // }, + }).then(res => { + + this.data.total = res.total + + // list.push(res.datas) + const list = [...res.datas] + + this.setData({ + bookExhibitionList: list + }) + //鍙栨秷 + wx.hideLoading() + // console.log(this.data.bookExhibitionList, '鏁版嵁'); + }) + + }, + //閲嶇偣椤圭洰鎺ュ彛 + keyProjectsGet(newPrice) { + // console.log(newPrice, 'newPrice'); + let parms = { + refCodes: ['bookClassification'] + } + app.MG.store.getProductTypeField(parms).then(res => { + + const checkData = JSON.parse(res[0].config) + + + checkData.option.forEach(item => { + if (newPrice == item.value) { + + this.setData({ + filteredItems: item.child || [] // 濡傛灉瀛樺湪瀛愰」鍒欒祴鍊硷紝鍚﹀垯璧嬪�间负绌烘暟缁� + }); + + // console.log(this.data.filteredItems); + + } + }) + + this.onLoad(); + }) + }, + + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + // console.log(this.data.filteredItems, 88888); + + // 鍗曞垪閫夋嫨鍣ㄩ�夐」 + const singleSelectOptions = this.data.filteredItems.map(item => ({ + label: item.name, + value: item.value, + disabled: false, + })) + + if (this.data.filteredItems = []) { + console.log(11111); + singleSelectOptions.push({ + label: '绂佺敤閫夐」', + value: 'disabled', + disabled: true, + }); + } + + // singleSelectOptions.push({ + // label: '绂佺敤閫夐」', + // value: 'disabled', + // disabled: true, + // }); + + + // 鏇存柊鏁版嵁 + this.setData({ + 'multipleSelect.options': singleSelectOptions, + }); + + }, + + + // 鎬诲垎绫� + // 鎬诲垎绫� + onChange(e) { + + this.data.page.size = 16 //鏇存敼鏄剧ず鐨勫�� + const newValue = e.detail.value; + const selectedOption = this.data.product.options.find(option => option.value === newValue); + const newPrice = selectedOption ? selectedOption.price : null; + this.setData({ + 'product.value': newValue, + 'product.price': newPrice, // 灏嗛�変腑鐨� price 鍊间繚瀛樺湪鏁版嵁涓� + }); + this.bookExhibitionGet(newValue); + this.keyProjectsGet(newPrice); + // 璋冪敤鏇存柊椤甸潰鏁版嵁鐨勫嚱鏁帮紝浼犲叆鏂扮殑 value 鍜� price 鍊� + + if (this.data.keynoteValue) { + //濡傛灉鏈夋暟鎹氨娓呯┖骞跺埛鏂伴〉闈� + this.data.keynoteValue = [] + + this.bookExhibitionGet(newValue) + this.onLoad() + console.log('true'); + } else { + // this.bookExhibitionGet(newValue); + // this.keyProjectsGet(newPrice); + console.log('fals'); + } + + }, + + // 閲嶇偣椤圭洰 + handleMultipleSelect(e) { + this.setData({ + 'multipleSelect.value': e.detail.value, + }); + }, + handleConfirm(event) { + const { value } = event.detail; + // 纭鎿嶄綔鐨勫鐞嗛�昏緫 + + console.log('纭鎿嶄綔锛岄�変腑鐨勫�间负锛�', value); + this.data.keynoteValue = value + this.bookExhibitionGet() + }, + handleReset() { + // 閲嶇疆鎿嶄綔鐨勫鐞嗛�昏緫 + this.data.keynoteValue = [] + console.log('閲嶇疆鎿嶄綔'); + this.bookExhibitionGet() + }, + onSwapRight() { + // console.log('xxxxxx'); + this.data.nameSort = 'Asc' + this.bookExhibitionGet() + }, + onSwapLeft() { + this.data.nameSort = 'Desc' + // console.log('sssssss'); + this.bookExhibitionGet() + }, + onBookExhibitionDetails: function (event) { + const item = event.currentTarget.dataset.item; + console.log(item); + wx.navigateTo({ + url: '/pages/bookExhibitionDetails/index?id=' + item.id // 鍋囪璺宠浆鍒拌鎯呴〉闈紝骞朵紶閫掍簡id鍙傛暟 + }); + } +}) \ No newline at end of file diff --git a/pages/bookExhibitionList/index.json b/pages/bookExhibitionList/index.json new file mode 100644 index 0000000..34eafc6 --- /dev/null +++ b/pages/bookExhibitionList/index.json @@ -0,0 +1,12 @@ +{ + "component": true, + "usingComponents": { + "t-button": "tdesign-miniprogram/button/button", + "t-search": "tdesign-miniprogram/search/search", + "t-dropdown-menu": "tdesign-miniprogram/dropdown-menu/dropdown-menu", + "t-dropdown-item": "tdesign-miniprogram/dropdown-item/dropdown-item", + "t-toast": "tdesign-miniprogram/toast/toast", + "t-icon": "tdesign-miniprogram/icon/icon" + }, + "onReachBottomDistance": 200 +} \ No newline at end of file diff --git a/pages/bookExhibitionList/index.wxml b/pages/bookExhibitionList/index.wxml new file mode 100644 index 0000000..075544a --- /dev/null +++ b/pages/bookExhibitionList/index.wxml @@ -0,0 +1,47 @@ +<!--pages/bookExhibitionList/index.wxml--> + +<!-- 寮瑰嚭妗� 绂佹 --> +<t-toast id="t-toast" /> + + +<view class="example-search"> + <t-search model:value="{{value}}" placeholder="璇疯緭鍏ュ叧閿瘝/涔︾洰/ISBN/浣滆��" /> +</view> + + + + + + + + +<view class="menuBox"> + <t-dropdown-menu class="classification"> + + <t-dropdown-item options="{{product.options}}" value="{{product.value}}" bindchange="onChange" /> + <t-dropdown-item label="閲嶇偣椤圭洰" options="{{multipleSelect.options}}" value="{{multipleSelect.value}}" bindchange="handleMultipleSelect" multiple bind:confirm="handleConfirm" bind:reset="handleReset" /> + + + + </t-dropdown-menu> + <view class="sortBox"> + <text>鎺掑簭</text> + <view class="iconBox"> + <t-icon class="swapRight" name="swap-right" size="48rpx" bind:click="onSwapRight" /> + <t-icon class="swapLeft" name="swap-right" size="48rpx" bind:click="onSwapLeft" /> + </view> + </view> +</view> + +<view class="titleBox"> + <view class="frameBox"></view> <text class="titleTextBox"> 绾夸笂涔﹀睍</text> +</view> +<view class="outside"> + + <view class="contentBox" wx:for="{{bookExhibitionList}}" wx:key="index" wx:for-item="item" wx:for-index="index" bindtap="onBookExhibitionDetails" data-item="{{item}}"> + <image wx:if="{{item.icon}}" src="{{item.icon}}" mode="" /> + <image wx:else="" src="./img/banner.png" mode="" /> + <view class="textBox"> <text>{{item.name}}</text></view> + </view> + +</view> \ No newline at end of file diff --git a/pages/bookExhibitionList/index.wxss b/pages/bookExhibitionList/index.wxss new file mode 100644 index 0000000..f313307 --- /dev/null +++ b/pages/bookExhibitionList/index.wxss @@ -0,0 +1,102 @@ +/* pages/bookExhibitionList/index.wxss */ + + + +.outside { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + margin: 15px; +} + +.contentBox { + width: 330rpx; + height: 130rpx; + /* border: 1px #000 solid; */ + margin: 10px 0; + +} + +image { + width: 100%; + height: 85%; +} + + +.textBox { + + width: 320rpx; + font-size: 20rpx; + /* display: flex; + justify-content: center; */ + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; + text-align: center; + +} + + +.example-search { + width: 300px; + background-color: #fff; + /* padding: 16rpx 32rpx; */ +} + +.iconBox { + transform: rotate(90deg); + /* margin: 10px; + margin-right: 20px; */ + margin-left: 30rpx; +} + +.swapRight { + /* margin-right: 10px; */ + +} + +.swapLeft { + transform: rotate(180deg); +} + +.sortBox { + display: flex; + border-bottom: 1px #ededed solid; + align-items: center; + height: 86rpx; + width: 195rpx; +} + + + +.titleBox { + display: flex; + margin: 10px; + margin-left: 0; +} + +.frameBox { + width: 13rpx; + height: 54rpx; + background: #FF6C00; + border-radius: 0rpx 9rpx 9rpx 0rpx; + +} + +.titleTextBox { + font-size: 20px; + font-weight: bolder; + margin-left: 10px; + font-family: JDLangZhengTi, JDLangZhengTi; +} + +.classification { + width: 550rpx; +} + +.menuBox { + display: flex; + +} \ No newline at end of file diff --git a/pages/home/home.js b/pages/home/home.js index d55db36..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,30 +16,39 @@ 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(); this.getBannerList() + }, - 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() { @@ -42,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 = [] @@ -64,20 +163,8 @@ }) console.log('杞挱鍥�', this.data.bannerList); }, - //鎼滅储 - navToSearchPage() { - wx.navigateTo({ url: '/pages/goods/search/index' }); - }, - //杞挱鍥捐烦杞� - navToActivityDetail({ detail }) { - const data = this.data.bannerList[detail.index] - console.log('璺宠浆', data.link); - // const { index: promotionID = 0 } = detail || {}; - // wx.navigateTo({ - // url: `/pages/promotion-detail/index?promotion_id=${promotionID}`, - // }); - }, - //鑾峰彇鐩綍 + + loadHomePage() { wx.stopPullDownRefresh(); this.setData({ @@ -115,7 +202,7 @@ }, paging: { start: 0, - size: 3 + size: 4 }, fields: { liveTime: [], @@ -125,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 }, @@ -150,9 +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 new file mode 100644 index 0000000..c914b6c --- /dev/null +++ b/pages/personalCenter/activateProduct/index.js @@ -0,0 +1,66 @@ +// pages/personalCenter/activateProduct/index.js +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + console.log(options); + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() { + + }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + + }, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/personalCenter/activateProduct/index.json b/pages/personalCenter/activateProduct/index.json new file mode 100644 index 0000000..3aebf06 --- /dev/null +++ b/pages/personalCenter/activateProduct/index.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "婵�娲诲晢鍝�", + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/personalCenter/activateProduct/index.wxml b/pages/personalCenter/activateProduct/index.wxml new file mode 100644 index 0000000..880b74d --- /dev/null +++ b/pages/personalCenter/activateProduct/index.wxml @@ -0,0 +1,2 @@ +<!--pages/personalCenter/activateProduct/index.wxml--> +<text>pages/personalCenter/activateProduct/index.wxml</text> diff --git a/pages/personalCenter/activateProduct/index.wxss b/pages/personalCenter/activateProduct/index.wxss new file mode 100644 index 0000000..d2baa87 --- /dev/null +++ b/pages/personalCenter/activateProduct/index.wxss @@ -0,0 +1 @@ +/* pages/personalCenter/activateProduct/index.wxss */ \ No newline at end of file diff --git a/pages/personalCenter/certificate/index.js b/pages/personalCenter/certificate/index.js new file mode 100644 index 0000000..358d636 --- /dev/null +++ b/pages/personalCenter/certificate/index.js @@ -0,0 +1,65 @@ +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + console.log(options); + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() { + + }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + + }, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/personalCenter/certificate/index.json b/pages/personalCenter/certificate/index.json new file mode 100644 index 0000000..53977b2 --- /dev/null +++ b/pages/personalCenter/certificate/index.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "鎴戠殑璇佷功", + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/personalCenter/certificate/index.wxml b/pages/personalCenter/certificate/index.wxml new file mode 100644 index 0000000..715d10c --- /dev/null +++ b/pages/personalCenter/certificate/index.wxml @@ -0,0 +1,2 @@ +<!--pages/personalCenter/certificate/index.wxml--> +<text>pages/personalCenter/certificate/index.wxml</text> \ No newline at end of file diff --git a/pages/personalCenter/certificate/index.wxss b/pages/personalCenter/certificate/index.wxss new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/pages/personalCenter/certificate/index.wxss 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.wxml b/pages/personalCenter/components/user-center-card/index.wxml new file mode 100644 index 0000000..d6af2e3 --- /dev/null +++ b/pages/personalCenter/components/user-center-card/index.wxml @@ -0,0 +1,33 @@ +<view class="user-center-card"> + <!-- 鏈櫥褰曠殑鎯呭喌 --> + <block wx:if="{{currAuthStep === AuthStepType.ONE}}"> + <view class="user-center-card__header" bind:tap="gotoUserEditPage"> + <t-avatar image="{{userInfo.avatarUrl || defaultAvatarUrl}}" class="user-center-card__header__avatar" /> + <view class="user-center-card__header__name">{{'璇风櫥褰�'}}</view> + <view class="setting"> + <image src="/static/images/personal/setting.png" mode="heightFix" class="img" /> + <text>璁剧疆</text> + </view> + </view> + </block> + <!-- 宸茬櫥褰曚絾鏈巿鏉冪敤鎴蜂俊鎭儏鍐� --> + <block wx:if="{{currAuthStep === AuthStepType.TWO}}"> + <view class="user-center-card__header"> + <t-avatar image="{{userInfo.avatarUrl || defaultAvatarUrl}}" class="user-center-card__header__avatar" /> + <view class="user-center-card__header__name">{{userInfo.nickName || '寰俊鐢ㄦ埛'}}</view> + <!-- 闇�瑕佹巿鏉冪敤鎴蜂俊鎭紝閫氳繃slot娣诲姞寮圭獥 --> + <view class="user-center-card__header__transparent" wx:if="{{isNeedGetUserInfo}}"> + <slot name="getUserInfo" /> + </view> + <!-- 涓嶉渶瑕佹巿鏉冪敤鎴蜂俊鎭紝浠嶇劧瑙﹀彂gotoUserEditPage浜嬩欢 --> + <view class="user-center-card__header__transparent" bind:tap="gotoUserEditPage" wx:else></view> + </view> + </block> + <!-- 宸茬櫥褰曚笖宸茬粡鎺堟潈鐢ㄦ埛淇℃伅鐨勬儏鍐� --> + <block wx:if="{{currAuthStep === AuthStepType.THREE}}"> + <view class="user-center-card__header" bind:tap="gotoUserEditPage"> + <t-avatar t-class="avatar" mode="aspectFill" class="user-center-card__header__avatar" image="{{userInfo.avatarUrl || defaultAvatarUrl}}" /> + <view class="user-center-card__header__name">{{userInfo.nickName || '寰俊鐢ㄦ埛'}}</view> + </view> + </block> +</view> \ 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 new file mode 100644 index 0000000..cee02f2 --- /dev/null +++ b/pages/personalCenter/components/user-center-card/index.wxss @@ -0,0 +1,60 @@ +.user-center-card { + /* 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; +} + +.user-center-card__header { + margin-top: 160rpx; + margin-bottom: 30rpx; + margin-left: 20rpx; + height: 96rpx; + line-height: 48rpx; + display: flex; + justify-content: flex-start; + align-items: center; + color: #333; + position: relative; +} + +.user-center-card__header__avatar { + width: 96rpx; + height: 96rpx; + border-radius: 48rpx; + overflow: hidden; +} + +.user-center-card__header__name { + font-size: 36rpx; + line-height: 48rpx; + color: #333; + font-weight: bold; + margin-left: 24rpx; + margin-right: 16rpx; +} + +.user-center-card__header__transparent { + position: absolute; + left: 0; + top: 0; + background-color: transparent; + height: 100%; + width: 100%; +} + +.user-center-card__icon { + line-height: 96rpx; +} + +.setting { + margin-left: auto; + display: flex; + align-items: center; +} + +.setting .img { + height: 34rpx; + width: 34rpx; + margin-right: 10rpx; +} \ No newline at end of file diff --git a/pages/personalCenter/downloads/index.js b/pages/personalCenter/downloads/index.js new file mode 100644 index 0000000..cf38005 --- /dev/null +++ b/pages/personalCenter/downloads/index.js @@ -0,0 +1,66 @@ +// pages/personalCenter/downloads/index.js +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + console.log(options); + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() { + + }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + + }, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/personalCenter/downloads/index.json b/pages/personalCenter/downloads/index.json new file mode 100644 index 0000000..294e7d0 --- /dev/null +++ b/pages/personalCenter/downloads/index.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "鎴戠殑涓嬭浇", + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/personalCenter/downloads/index.wxml b/pages/personalCenter/downloads/index.wxml new file mode 100644 index 0000000..b64266a --- /dev/null +++ b/pages/personalCenter/downloads/index.wxml @@ -0,0 +1,2 @@ +<!--pages/personalCenter/downloads/index.wxml--> +<text>pages/personalCenter/downloads/index.wxml</text> diff --git a/pages/personalCenter/downloads/index.wxss b/pages/personalCenter/downloads/index.wxss new file mode 100644 index 0000000..f73c53a --- /dev/null +++ b/pages/personalCenter/downloads/index.wxss @@ -0,0 +1 @@ +/* pages/personalCenter/downloads/index.wxss */ \ No newline at end of file diff --git a/pages/personalCenter/feedBack/index.js b/pages/personalCenter/feedBack/index.js new file mode 100644 index 0000000..f904417 --- /dev/null +++ b/pages/personalCenter/feedBack/index.js @@ -0,0 +1,66 @@ +// pages/personalCenter/feedBack/index.js +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + console.log(options); + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() { + + }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + + }, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/personalCenter/feedBack/index.json b/pages/personalCenter/feedBack/index.json new file mode 100644 index 0000000..8f9ad0c --- /dev/null +++ b/pages/personalCenter/feedBack/index.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "寤鸿涓庡弽棣�", + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/personalCenter/feedBack/index.wxml b/pages/personalCenter/feedBack/index.wxml new file mode 100644 index 0000000..134e541 --- /dev/null +++ b/pages/personalCenter/feedBack/index.wxml @@ -0,0 +1,2 @@ +<!--pages/personalCenter/feedBack/index.wxml--> +<text>pages/personalCenter/feedBack/index.wxml</text> diff --git a/pages/personalCenter/feedBack/index.wxss b/pages/personalCenter/feedBack/index.wxss new file mode 100644 index 0000000..62d1b32 --- /dev/null +++ b/pages/personalCenter/feedBack/index.wxss @@ -0,0 +1 @@ +/* pages/personalCenter/feedBack/index.wxss */ \ No newline at end of file diff --git a/pages/personalCenter/feedBackSubmit/index.js b/pages/personalCenter/feedBackSubmit/index.js new file mode 100644 index 0000000..fe4eb7e --- /dev/null +++ b/pages/personalCenter/feedBackSubmit/index.js @@ -0,0 +1,66 @@ +// pages/personalCenter/feedBackSubmit/index.js +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + console.log(options); + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() { + + }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + + }, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/personalCenter/feedBackSubmit/index.json b/pages/personalCenter/feedBackSubmit/index.json new file mode 100644 index 0000000..431022f --- /dev/null +++ b/pages/personalCenter/feedBackSubmit/index.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "鎰忚鍙嶉", + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/personalCenter/feedBackSubmit/index.wxml b/pages/personalCenter/feedBackSubmit/index.wxml new file mode 100644 index 0000000..675b7b0 --- /dev/null +++ b/pages/personalCenter/feedBackSubmit/index.wxml @@ -0,0 +1,2 @@ +<!--pages/personalCenter/feedBackSubmit/index.wxml--> +<text>pages/personalCenter/feedBackSubmit/index.wxml</text> diff --git a/pages/personalCenter/feedBackSubmit/index.wxss b/pages/personalCenter/feedBackSubmit/index.wxss new file mode 100644 index 0000000..5445ab2 --- /dev/null +++ b/pages/personalCenter/feedBackSubmit/index.wxss @@ -0,0 +1 @@ +/* pages/personalCenter/feedBackSubmit/index.wxss */ \ No newline at end of file diff --git a/pages/personalCenter/index.js b/pages/personalCenter/index.js new file mode 100644 index 0000000..9256f51 --- /dev/null +++ b/pages/personalCenter/index.js @@ -0,0 +1,209 @@ +const app = getApp() +const menuData = [ + { + title: '鎴戠殑璁㈠崟', + icon: '/static/images/personal/order.png', + url: '/pages/personalCenter/myOrder/index', + type: 'order', + }, + { + title: '婵�娲诲晢鍝�', + icon: '/static/images/personal/jihuo.png', + url: '/pages/personalCenter/activateProduct/index', + type: 'activateProduct', + }, + { + title: '鎴戠殑璇佷功', + icon: '/static/images/personal/certificate.png', + url: '/pages/personalCenter/certificate/index', + type: 'certificate', + }, + { + title: '鎴戠殑鏀惰棌', + icon: '/static/images/personal/wodeshoucang.png', + url: '/pages/personalCenter/myCollection/index', + type: 'collection', + }, + { + title: '鎴戠殑涓嬭浇', + icon: '/static/images/personal/download.png', + url: '/pages/personalCenter/downloads/index', + type: 'download', + }, + { + title: '鏍蜂功鐢宠', + icon: '/static/images/personal/yangshushenqing.png', + url: '/pages/personalCenter/sampleBooks/index', + type: 'sampleBook', + }, + { + title: '鍑轰功鐢宠', + icon: '/static/images/personal/chushu.png', + url: '/pages/personalCenter/publishBooks/index', + type: 'publishBooks', + }, + { + title: '鎴戠殑涓婁紶', + icon: '/static/images/personal/upload.png', + url: '', + type: 'upload', + } +]; +const moreMenu = [ + { + title: '鎴戠殑娑堟伅', + icon: '/static/images/personal/notification.png', + url: '/pages/personalCenter/myMassage/index', + type: 'message', + }, + { + title: '寤鸿涓庡弽棣�', + icon: '/static/images/personal/feedback.png', + url: '/pages/personalCenter/feedback/index', + type: 'feedback', + } +]; +const moreMenu1 = [ + { + title: '鍏充簬鎴戜滑', + icon: '/static/images/personal/about.png', + url: '', + type: 'aboutUs', + }, + { + title: '鑱旂郴鎴戜滑', + icon: '/static/images/personal/contact.png', + url: '', + type: 'contact', + } +]; +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + isWhite: false, + show: false, + userInfo: { + avatarUrl: + 'https://we-retail-static-1300977798.cos.ap-guangzhou.myqcloud.com/retail-ui/components-exp/avatar/avatar-1.jpg', + nickName: 'TDesign', + phoneNumber: '13438358888', + }, + currAuthStep: 1, + teacherState: { + state: '', + reasonTxt: '', + }, + integral: 0, + menuData, + moreMenu, + moreMenu1 + }, + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + console.log(options); + }, + + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + if (wx.getStorageSync(app.config.userInfoKey)) { + this.setData({ + show: true, + userInfo: JSON.parse(wx.getStorageSync(app.config.userInfoKey)) + }) + + if (typeof this.getTabBar === 'function' && this.getTabBar()) { + this.getTabBar().setData({ + selected: 4 //杩欎釜鏁板瓧鏄綋鍓嶉〉闈㈠湪tabBar涓璴ist鏁扮粍鐨勭储寮� + }) + } + this.getTeacherInfo() + } else { + wx.navigateTo({ + url: "/pages/testLogin/index", + }); + } + }, + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() { + this.setData({ + show: false + }) + }, + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + this.init(); + }, + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + }, + //鏁欏笀淇℃伅 + getTeacherInfo() { + const data = { + start: 0, + size: 10, + topicIdOrRefCode: 'teacherRoleApproval', + appRefCode: app.config.appRefCode, + sort: { + type: 'Desc', + field: 'CreateDate' + } + } + app.MG.ugc.getTopicMessageList(data).then((res) => { + console.log(this.data.userInfo, "userInfo") + const resData = res.datas.find((i) => i.appUserCreator.userId == this.data.userInfo.userId) + if (resData) { + this.setData({ + teacherState: { + state: resData.state, + reasonTxt: resData.feedBack != null ? JSON.parse(resData.feedBack).reason : '' + } + }) + } + }) + }, + + //鐐瑰嚮鐩綍 + toPages(item) { + console.log(item) + let info = item.target.dataset.info + if (info.url) { + wx.navigateTo({ + url: info.url + }) + } else { + wx.showToast({ + title: "寤鸿涓�", + icon: 'none', + duration: 2000 + }) + } + }, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + 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 new file mode 100644 index 0000000..9081e9f --- /dev/null +++ b/pages/personalCenter/index.json @@ -0,0 +1,9 @@ +{ + "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 new file mode 100644 index 0000000..4e3b370 --- /dev/null +++ b/pages/personalCenter/index.wxml @@ -0,0 +1,70 @@ +<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 new file mode 100644 index 0000000..07525f0 --- /dev/null +++ b/pages/personalCenter/index.wxss @@ -0,0 +1,138 @@ +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 new file mode 100644 index 0000000..358d636 --- /dev/null +++ b/pages/personalCenter/myCollection/index.js @@ -0,0 +1,65 @@ +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + console.log(options); + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() { + + }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + + }, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/personalCenter/myCollection/index.json b/pages/personalCenter/myCollection/index.json new file mode 100644 index 0000000..c1b3d78 --- /dev/null +++ b/pages/personalCenter/myCollection/index.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "鎴戠殑鏀惰棌", + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/personalCenter/myCollection/index.wxml b/pages/personalCenter/myCollection/index.wxml new file mode 100644 index 0000000..85d5124 --- /dev/null +++ b/pages/personalCenter/myCollection/index.wxml @@ -0,0 +1 @@ +<text>鎴戠殑鏀惰棌</text> \ No newline at end of file diff --git a/pages/personalCenter/myCollection/index.wxss b/pages/personalCenter/myCollection/index.wxss new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/pages/personalCenter/myCollection/index.wxss diff --git a/pages/personalCenter/myMassage/index.js b/pages/personalCenter/myMassage/index.js new file mode 100644 index 0000000..19ad1e3 --- /dev/null +++ b/pages/personalCenter/myMassage/index.js @@ -0,0 +1,156 @@ +import moment from 'moment' +const app = getApp(); +Page({ + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + list: [], + //鍒嗛〉 + page: 1, + limit: 10, + pageTotalCount: 0, + bottomLoading: false, + isMoreData: false, + // 杩斿洖椤堕儴 + isBackTop: false, + setScrollValue: 0, + skeletonLoding: true, + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + this.getDataList(false); + console.log(options); + }, + + getDataList(isReachBottom) { + app.MG.app.getAppMessageList({ + appRefCode: app.config.appRefCode, + start: this.data.page * this.data.limit - this.data.limit, + size: this.data.limit, + sort: { + type: "Desc", + field: "CreateDate" + } + }) + .then(res => { + try { + if (res.datas.length > 0) { + res.datas.forEach((item) => { + item.createDate = moment(item.createDate).format("YYYY-MM-DD HH:mm"); + }); + let dataList = res.datas; + + //瑙﹀簳鍔犺浇鏂版暟鎹苟淇濈暀鑰佹暟鎹� + if (isReachBottom) { + dataList = [...this.data.list, ...dataList] //灏嗘柊鏁版嵁鍔犲叆鑰佹暟鎹腑 + } + this.setData({ + list: dataList, + pageTotalCount: res.total, + bottomLoading: false, + isMoreData: dataList.length > 0 ? false : true, + skeletonLoding: false, + }) + } else { + this.setData({ + skeletonLoding: false, + }) + } + } catch (error) { + console.log(error) + } + }) + }, + + toList(itemData) { + let info = itemData.currentTarget.dataset.info; + wx.navigateTo({ + url: "/pages/personalCenter/myMassage/massageDetail/index?id=" + info.id, + }); + }, + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + + }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + if (this._freshing) return + this.setData({ + page: 1, + limit: 10, + pageTotalCount: 0, + bottomLoading: false, + isMoreData: false + }) + this._freshing = true; + this.setData({ + triggered: false, + }) + this.getDataList(false); + this._freshing = false + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + this.setData({ + bottomLoading: true, + isMoreData: false + }) + let bool = false; + if (this.data.pageTotalCount > this.data.list.length) { + bool = true; + this.setData({ + page: this.data.page + 1, + }) + } else { + setTimeout(() => { + this.setData({ + bottomLoading: false, + isMoreData: true + }) + }, 100) + return false; + } + this.getDataList(bool); + + }, + + // 鐩戝惉婊氬姩璺濈 + onPageScroll(e) { + if (e && e.scrollTop >= 1000) { + this.setData({ + isBackTop: true + }) + } else { + this.setData({ + isBackTop: false + }) + } + }, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/personalCenter/myMassage/index.json b/pages/personalCenter/myMassage/index.json new file mode 100644 index 0000000..b42d2b0 --- /dev/null +++ b/pages/personalCenter/myMassage/index.json @@ -0,0 +1,10 @@ +{ + "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/myMassage/index.wxml b/pages/personalCenter/myMassage/index.wxml new file mode 100644 index 0000000..5a96715 --- /dev/null +++ b/pages/personalCenter/myMassage/index.wxml @@ -0,0 +1,35 @@ +<view class="container" wx:if="{{!skeletonLoding}}"> + <scroll-view class="scroll content" bind:scroll="onPageScroll" model:scroll-top="{{setScrollValue}}" scroll-y refresher-enabled="{{true}}" lower-threshold="{{200}}" refresher-threshold="{{80}}" refresher-default-style="none" refresher-triggered="{{triggered}}" bindrefresherpulling="{{refresh.onPulling}}" bindrefresherrefresh="onPullDownRefresh" bindscrolltolower="onReachBottom"> + <view slot="refresher" class="refresh-container"> + <view class="loading"> + <t-loading theme="circular" size="40rpx" text="姝e湪鍒锋柊..." class="wrapper" /> + </view> + </view> + <view class="pageInfo" wx:if="{{list.length > 0}}"> + <view class="content-item" wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="index"> + <view class="icon"> + <t-image src="/static/images/personal/notification1.png" mode="heightFix" class="img" /> + </view> + <view class="item-con" data-info="{{item}}" bindtap="toList"> + <view class="titleBox"> + <view class="item-title">{{item.name}}</view> + <view class="createDate">{{item.createDate}}</view> + </view> + <view class="description"> + {{item.description}} + </view> + </view> + </view> + </view> + <view wx:if="{{list.length == 0}}" class="empyt"> + <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" /> + </view> + <view class="bottom-loading" wx:if="{{bottomLoading}}"> + <t-loading theme="circular" size="40rpx" text="鍔犺浇涓�..." class="wrapper" /> + </view> + <view class="bottom-loading" style="color: #ccc;font-size: 28rpx;" wx:if="{{isMoreData}}"> + <text>娌℃湁鏇村浜�</text> + </view> + </scroll-view> + <t-back-top theme="round" wx:if="{{isBackTop}}" text="椤堕儴" bind:to-top="onToTop"></t-back-top> +</view> \ No newline at end of file diff --git a/pages/personalCenter/myMassage/index.wxss b/pages/personalCenter/myMassage/index.wxss new file mode 100644 index 0000000..2848b48 --- /dev/null +++ b/pages/personalCenter/myMassage/index.wxss @@ -0,0 +1,60 @@ +.pageInfo { + padding: 40rpx 20rpx; +} + +.content-item { + padding: 20rpx 0; + border-bottom: 1px solid #EDEDED; + display: flex; +} + +.content-item .icon { + width: 58rpx; + height: 58rpx; +} + +.content-item .icon .img { + width: 100%; + height: 100%; +} + +.item-con { + flex: 1; + margin-left: 30rpx; +} + +.titleBox { + display: flex; + justify-content: space-between +} + +.titleBox .item-title { + font-weight: bold; +} + +.createDate { + font-size: 24rpx; + color: #949494; +} + +.description { + font-size: 24rpx; + height: 88rpx; + line-height: 40rpx; + display: -webkit-box; + margin-top: 20rpx; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; + text-overflow: ellipsis; +} + +.refresh-container { + margin: 0 auto; +} + +.bottom-loading, +.loading { + padding: 20rpx; + text-align: center; +} \ No newline at end of file diff --git a/pages/personalCenter/myMassage/massageDetail/index.js b/pages/personalCenter/myMassage/massageDetail/index.js new file mode 100644 index 0000000..e8ed824 --- /dev/null +++ b/pages/personalCenter/myMassage/massageDetail/index.js @@ -0,0 +1,79 @@ +const app = getApp(); +import moment from 'moment' +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + dataInfo: {} + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + this.getDataInfo(options.id) + }, + getDataInfo(id) { + app.MG.app.getMessage({ + messageId: id + }) + .then(res => { + res.createDate = moment(res.createDate).format("YYYY-MM-DD HH:mm"); + this.setData({ + dataInfo: res, + }) + + }) + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() { + + }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + + }, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/personalCenter/myMassage/massageDetail/index.json b/pages/personalCenter/myMassage/massageDetail/index.json new file mode 100644 index 0000000..211820b --- /dev/null +++ b/pages/personalCenter/myMassage/massageDetail/index.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "鎴戠殑娑堟伅", + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/personalCenter/myMassage/massageDetail/index.wxml b/pages/personalCenter/myMassage/massageDetail/index.wxml new file mode 100644 index 0000000..80216eb --- /dev/null +++ b/pages/personalCenter/myMassage/massageDetail/index.wxml @@ -0,0 +1,8 @@ +<view class="container"> + <view> + <view class="name">{{dataInfo.name}}</view> + <view class="createDate">{{dataInfo.createDate}}</view> + <view class="description">{{dataInfo.description}}</view> + <rich-text space="emsp" nodes="{{dataInfo.content}}" class="content" /> + </view> +</view> \ No newline at end of file diff --git a/pages/personalCenter/myMassage/massageDetail/index.wxss b/pages/personalCenter/myMassage/massageDetail/index.wxss new file mode 100644 index 0000000..67696db --- /dev/null +++ b/pages/personalCenter/myMassage/massageDetail/index.wxss @@ -0,0 +1,28 @@ +.container { + padding: 20rpx; +} + +.name { + text-align: center; + font-size: 32rpx; + font-weight: bold; +} + +.createDate { + margin-top: 20rpx; + color: #999; + text-align: center; + font-size: 28rpx; +} + +.description { + padding: 30rpx 0; + color: #999; + font-size: 28rpx; + line-height: 40rpx; +} + +.content { + font-size: 28rpx; + line-height: 40rpx; +} \ No newline at end of file diff --git a/pages/personalCenter/myOrder/index.js b/pages/personalCenter/myOrder/index.js new file mode 100644 index 0000000..358d636 --- /dev/null +++ b/pages/personalCenter/myOrder/index.js @@ -0,0 +1,65 @@ +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + console.log(options); + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() { + + }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + + }, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/personalCenter/myOrder/index.json b/pages/personalCenter/myOrder/index.json new file mode 100644 index 0000000..aa73fde --- /dev/null +++ b/pages/personalCenter/myOrder/index.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "鎴戠殑璁㈠崟", + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/personalCenter/myOrder/index.wxml b/pages/personalCenter/myOrder/index.wxml new file mode 100644 index 0000000..2413eb4 --- /dev/null +++ b/pages/personalCenter/myOrder/index.wxml @@ -0,0 +1,2 @@ +<!--pages/personalCenter/myOrder/index.wxml--> +<text>pages/personalCenter/myOrder/index.wxml</text> diff --git a/pages/personalCenter/myOrder/index.wxss b/pages/personalCenter/myOrder/index.wxss new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/pages/personalCenter/myOrder/index.wxss diff --git a/pages/personalCenter/publishBooks/index.js b/pages/personalCenter/publishBooks/index.js new file mode 100644 index 0000000..6057736 --- /dev/null +++ b/pages/personalCenter/publishBooks/index.js @@ -0,0 +1,66 @@ +// pages/personalCenter/publishBooks/index.js +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + console.log(options); + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() { + + }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + + }, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/personalCenter/publishBooks/index.json b/pages/personalCenter/publishBooks/index.json new file mode 100644 index 0000000..da878a8 --- /dev/null +++ b/pages/personalCenter/publishBooks/index.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "鍑轰功鐢宠", + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/personalCenter/publishBooks/index.wxml b/pages/personalCenter/publishBooks/index.wxml new file mode 100644 index 0000000..0fb8c8b --- /dev/null +++ b/pages/personalCenter/publishBooks/index.wxml @@ -0,0 +1,2 @@ +<!--pages/personalCenter/publishBooks/index.wxml--> +<text>pages/personalCenter/publishBooks/index.wxml</text> diff --git a/pages/personalCenter/publishBooks/index.wxss b/pages/personalCenter/publishBooks/index.wxss new file mode 100644 index 0000000..a9a43b0 --- /dev/null +++ b/pages/personalCenter/publishBooks/index.wxss @@ -0,0 +1 @@ +/* pages/personalCenter/publishBooks/index.wxss */ \ No newline at end of file diff --git a/pages/personalCenter/sampleBooks/index.js b/pages/personalCenter/sampleBooks/index.js new file mode 100644 index 0000000..1cd80ed --- /dev/null +++ b/pages/personalCenter/sampleBooks/index.js @@ -0,0 +1,66 @@ +// pages/personalCenter/sampleBooks/index.js +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + console.log(options); + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() { + + }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + + }, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/personalCenter/sampleBooks/index.json b/pages/personalCenter/sampleBooks/index.json new file mode 100644 index 0000000..95911bb --- /dev/null +++ b/pages/personalCenter/sampleBooks/index.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "鏍蜂功鐢宠", + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/personalCenter/sampleBooks/index.wxml b/pages/personalCenter/sampleBooks/index.wxml new file mode 100644 index 0000000..d4eb5c9 --- /dev/null +++ b/pages/personalCenter/sampleBooks/index.wxml @@ -0,0 +1,2 @@ +<!--pages/personalCenter/sampleBooks/index.wxml--> +<text>pages/personalCenter/sampleBooks/index.wxml</text> diff --git a/pages/personalCenter/sampleBooks/index.wxss b/pages/personalCenter/sampleBooks/index.wxss new file mode 100644 index 0000000..73a1729 --- /dev/null +++ b/pages/personalCenter/sampleBooks/index.wxss @@ -0,0 +1 @@ +/* pages/personalCenter/sampleBooks/index.wxss */ \ No newline at end of file diff --git a/pages/teacherCertification/index.js b/pages/teacherCertification/index.js new file mode 100644 index 0000000..358d636 --- /dev/null +++ b/pages/teacherCertification/index.js @@ -0,0 +1,65 @@ +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + console.log(options); + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() { + + }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + + }, + + /** + * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/teacherCertification/index.json b/pages/teacherCertification/index.json new file mode 100644 index 0000000..8aecc2b --- /dev/null +++ b/pages/teacherCertification/index.json @@ -0,0 +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 new file mode 100644 index 0000000..5feb603 --- /dev/null +++ b/pages/teacherCertification/index.wxml @@ -0,0 +1,68 @@ +<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 new file mode 100644 index 0000000..aa4e93c --- /dev/null +++ b/pages/teacherCertification/index.wxss @@ -0,0 +1,36 @@ +.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 new file mode 100644 index 0000000..d516931 --- /dev/null +++ b/pages/testLogin/index.js @@ -0,0 +1,132 @@ +// pages/testLogin/index.js +const app = getApp(); + +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + textName: "18892081234", + textPassword: "xA123456", + loading: false, + userInfo: { + name: "", + icon: "" + } + }, + + // 鐧诲綍 + onLogin() { + this.setData({ + loading: true + }) + const data = { + loginName: this.data.textName, + password: this.data.textPassword, + appRefCode: app.config.appRefCode, + platform: "Mobile", + }; + app.MG.identity.loginByPassword(data).then(res => { + if (res && res.status == "Ok") { + this.setData({ + loginInfo: JSON.stringify(res) + }) + wx.setStorageSync(app.config.tokenKey, res.token); + this.getUserInfo() + } else { + wx.showToast({ + title: res.message || "鎵嬫満鍙锋垨瀵嗙爜閿欒", + icon: "error", + duration: 2000 + }) + } + }); + }, + + // 鑾峰彇鐢ㄦ埛淇℃伅 + // 鑾峰彇鐧诲綍鐢ㄦ埛韬唤 + getUserInfo() { + app.MG.identity.getCurrentAppUser().then(res => { + // 鐢ㄦ埛淇℃伅浼樺厛绾э細鏁欏笀璁よ瘉 > 寰俊 > 瀛︾敓锛堟敞鍐屾椂榛樿锛� + if (res) { + console.log(res, "user"); + let defaultUser = {}; + let secretData = res.secretList.find(i => i.type == 'LoginNameAndPassword') + let WeChatInfo = res.infoList.find((item) => item.type === "WeChat"); + if (WeChatInfo) { + defaultUser = { + nickName: WeChatInfo.name, + avatarUrl: WeChatInfo.icon, + userId: res.userId + } + } + if (secretData) { + defaultUser = { + nickName: secretData.credential, + avatarUrl: "../../static/images/index/tab.png", + userId: res.userId + } + } + + this.setData({ + userInfo: defaultUser, + loading: false + }) + wx.setStorageSync(app.config.userInfoKey, JSON.stringify(this.data.userInfo)); + } + wx.switchTab({ + url: '/pages/home/home' + }) + }); + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad(options) { + console.log(options); + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() { + + }, + + /** + * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 + */ + onPullDownRefresh() { + + }, + + /** + * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� + */ + onReachBottom() { + + } +}) \ No newline at end of file diff --git a/pages/testLogin/index.json b/pages/testLogin/index.json new file mode 100644 index 0000000..fd16c3b --- /dev/null +++ b/pages/testLogin/index.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + "t-input": "tdesign-miniprogram/input/input", + "t-button": "tdesign-miniprogram/button/button" + } +} \ No newline at end of file diff --git a/pages/testLogin/index.wxml b/pages/testLogin/index.wxml new file mode 100644 index 0000000..b538be0 --- /dev/null +++ b/pages/testLogin/index.wxml @@ -0,0 +1,8 @@ +<!--pages/testLogin/index.wxml--> +<view> + <t-input label="鐢ㄦ埛璐﹀彿" placeholder="璇疯緭鍏ョ敤鎴峰悕" model:value="{{textName}}" suffixIcon="{{ { name: 'user-avatar', ariaLabel: '閫氳褰�' } }}"></t-input> + <t-input label="鐢ㄦ埛瀵嗙爜" placeholder="璇疯緭鍏ュ瘑鐮�" type="password" model:value="{{textPassword}}" clearable /> +</view> +<view class="button-example"> + <t-button theme="primary" loading="{{loading}}" bindtap="onLogin" size="large" block>绔嬪嵆鐧诲綍</t-button> +</view> \ No newline at end of file diff --git a/pages/testLogin/index.wxss b/pages/testLogin/index.wxss new file mode 100644 index 0000000..7eb603b --- /dev/null +++ b/pages/testLogin/index.wxss @@ -0,0 +1,4 @@ +/* pages/testLogin/index.wxss */ +.button-example { + margin: 60rpx 32rpx; +} \ No newline at end of file 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/project.config.json b/project.config.json index 941a45c..d702033 100644 --- a/project.config.json +++ b/project.config.json @@ -48,7 +48,7 @@ }, "compileType": "miniprogram", "libVersion": "2.23.1", - "appid": "wx1432ecb6d1b86ade", + "appid": "wx5461028c83fea0b3", "projectname": "tdesign-miniprogram-starter-retail", "simulatorType": "wechat", "simulatorPluginLibVersion": {}, diff --git a/services/home/home.js b/services/home/home.js index 8733ecf..598c2dd 100644 --- a/services/home/home.js +++ b/services/home/home.js @@ -8,61 +8,61 @@ { text: '鍥句功鏈嶅姟', key: 0, - icon: '/static/images/home/1.png', - url: '/pages/bookServices/assort/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/bookExhibitionDetails/Parting.png b/static/images/bookExhibitionDetails/Parting.png new file mode 100644 index 0000000..6c2d614 --- /dev/null +++ b/static/images/bookExhibitionDetails/Parting.png Binary files differ diff --git a/static/images/bookExhibitionDetails/shuzha.png b/static/images/bookExhibitionDetails/shuzha.png new file mode 100644 index 0000000..0ca7d7b --- /dev/null +++ b/static/images/bookExhibitionDetails/shuzha.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/notification1.png b/static/images/personal/notification1.png new file mode 100644 index 0000000..8132730 --- /dev/null +++ b/static/images/personal/notification1.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 -- Gitblit v1.9.1