feat(daima代码合并): 和宁
asdas创建
BREAKING CHANGE: 代码sda
4个文件已删除
19个文件已修改
116个文件已添加
| | |
| | | App({ |
| | | MG: MG, |
| | | config: config, |
| | | onLaunch: function () {}, |
| | | onLaunch: function () { }, |
| | | onShow: function () { |
| | | updateManager(); |
| | | }, |
| | |
| | | "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", |
| | |
| | | "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, |
| | |
| | | "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", |
| | |
| | | "desc": "你的位置信息将用于小程序位置接口的效果展示" |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | 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"; |
| | |
| | | }); |
| | | }, |
| | | |
| | | //检查微信小程序是否注册 |
| | | checkWeChatAppAccount(data) { |
| | | return request({ |
| | | url: "/identity/api/CheckWeChatAppAccount", |
| | | method: "post", |
| | | data, |
| | | }); |
| | | }, |
| | | |
| | | |
| | | // 通过手机号重置密码 |
| | | changePasswordByMobilePhone(data) { |
| | |
| | | data, |
| | | }); |
| | | }, |
| | | loginByWeChatAppCode(data) { |
| | | return request({ |
| | | url: "/identity/api/LoginByWeChatAppCode", |
| | | method: "post", |
| | | data, |
| | | }); |
| | | }, |
| | | |
| | | // 获取邮箱验证码 |
| | | getEmailCode(data) { |
| | |
| | | ] |
| | | }) |
| | | } |
| | | |
| | | let token = wx.getStorageSync(tokenKey) ? wx.getStorageSync(tokenKey) : ''; |
| | | |
| | | |
| | | let url = token ? '/store/api/ApiQueryProductByAppUser' : '/store/api/ApiQueryProduct' |
| | | return request({ |
| | | url: url, |
| | |
| | | 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; |
| | |
| | | }; |
| | | |
| | | jobApi.newSession(params).then(res => { |
| | | storage.set("sessionGuid", res, 30); |
| | | wx.setStorageSync("sessionGuid", res); |
| | | setNewView(type, id); |
| | | }); |
| | | } |
| | |
| | | } |
| | | |
| | | 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, |
| | |
| | | if (id) { |
| | | params[type] = id; |
| | | } |
| | | jobApi.newJobWithNewView(params).then(res => {}); |
| | | jobApi.newJobWithNewView(params).then(res => { }); |
| | | } |
| | | } |
| | |
| | | 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) : '' |
| | |
| | | } |
| | | 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 { |
| | |
| | | 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' |
| | | }, |
| | | ]; |
| | |
| | | "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" |
| | | } |
| | | } |
| | |
| | | <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> |
| | |
| | | |
| | | .custom-tab-bar-wrapper .text { |
| | | font-size: 20rpx; |
| | | } |
| | | margin-top: 10rpx; |
| | | } |
New file |
| | |
| | | // 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, //详情的id |
| | | 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参数 |
| | | // }); |
| | | } |
| | | |
| | | }) |
New file |
| | |
| | | { |
| | | "usingComponents": {} |
| | | } |
New file |
| | |
| | | <!--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> |
New file |
| | |
| | | /* 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; |
| | | } |
New file |
| | |
| | | // 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参数 |
| | | }); |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "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 |
| | | } |
New file |
| | |
| | | <!--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> |
New file |
| | |
| | | /* 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; |
| | | |
| | | } |
| | |
| | | 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,//轮播图参数 |
| | |
| | | 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() { |
| | |
| | | }, |
| | | 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 = [] |
| | |
| | | }) |
| | | 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({ |
| | |
| | | }, |
| | | paging: { |
| | | start: 0, |
| | | size: 3 |
| | | size: 4 |
| | | }, |
| | | fields: { |
| | | liveTime: [], |
| | |
| | | } |
| | | } |
| | | 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 |
| | | }, |
| | |
| | | } |
| | | } |
| | | 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 |
| | | }) |
| | | |
| | | } |
| | | |
| | | }); |
| | |
| | | { |
| | | "navigationBarTitleText": "首页", |
| | | "navigationStyle": "custom", |
| | | "onReachBottomDistance": 10, |
| | | "backgroundTextStyle": "light", |
| | | "enablePullDownRefresh": true, |
| | |
| | | "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" |
| | | } |
| | | } |
| | |
| | | <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" /> |
| | |
| | | <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" /> |
| | |
| | | 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 { |
| | |
| | | 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; |
| | | } |
| | |
| | | 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 { |
| | |
| | | |
| | | .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; |
| | | } |
New file |
| | |
| | | // pages/personalCenter/activateProduct/index.js |
| | | Page({ |
| | | |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | console.log(options); |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面卸载 |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "navigationBarTitleText": "激活商品", |
| | | "usingComponents": {} |
| | | } |
New file |
| | |
| | | <!--pages/personalCenter/activateProduct/index.wxml--> |
| | | <text>pages/personalCenter/activateProduct/index.wxml</text> |
New file |
| | |
| | | /* pages/personalCenter/activateProduct/index.wxss */ |
New file |
| | |
| | | Page({ |
| | | |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | console.log(options); |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面卸载 |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "navigationBarTitleText": "我的证书", |
| | | "usingComponents": {} |
| | | } |
New file |
| | |
| | | <!--pages/personalCenter/certificate/index.wxml--> |
| | | <text>pages/personalCenter/certificate/index.wxml</text> |
New file |
| | |
| | | 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'); |
| | | }, |
| | | }, |
| | | }); |
New file |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": { |
| | | "t-icon": "tdesign-miniprogram/icon/icon", |
| | | "t-avatar": "tdesign-miniprogram/avatar/avatar" |
| | | } |
| | | } |
New file |
| | |
| | | <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> |
New file |
| | |
| | | .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; |
| | | } |
New file |
| | |
| | | // pages/personalCenter/downloads/index.js |
| | | Page({ |
| | | |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | console.log(options); |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面卸载 |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "navigationBarTitleText": "我的下载", |
| | | "usingComponents": {} |
| | | } |
New file |
| | |
| | | <!--pages/personalCenter/downloads/index.wxml--> |
| | | <text>pages/personalCenter/downloads/index.wxml</text> |
New file |
| | |
| | | /* pages/personalCenter/downloads/index.wxss */ |
New file |
| | |
| | | // pages/personalCenter/feedBack/index.js |
| | | Page({ |
| | | |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | console.log(options); |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面卸载 |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "navigationBarTitleText": "建议与反馈", |
| | | "usingComponents": {} |
| | | } |
New file |
| | |
| | | <!--pages/personalCenter/feedBack/index.wxml--> |
| | | <text>pages/personalCenter/feedBack/index.wxml</text> |
New file |
| | |
| | | /* pages/personalCenter/feedBack/index.wxss */ |
New file |
| | |
| | | // pages/personalCenter/feedBackSubmit/index.js |
| | | Page({ |
| | | |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | console.log(options); |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面卸载 |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "navigationBarTitleText": "意见反馈", |
| | | "usingComponents": {} |
| | | } |
New file |
| | |
| | | <!--pages/personalCenter/feedBackSubmit/index.wxml--> |
| | | <text>pages/personalCenter/feedBackSubmit/index.wxml</text> |
New file |
| | |
| | | /* pages/personalCenter/feedBackSubmit/index.wxss */ |
New file |
| | |
| | | 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中list数组的索引 |
| | | }) |
| | | } |
| | | 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 |
| | | }) |
| | | |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "navigationBarTitleText": "个人中心", |
| | | "navigationStyle": "custom", |
| | | "usingComponents": { |
| | | "t-user-center-card": "./components/user-center-card/index", |
| | | "t-image": "/components/webp-image/index" |
| | | }, |
| | | "enablePullDownRefresh": true |
| | | } |
New file |
| | |
| | | <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> |
New file |
| | |
| | | page { |
| | | background-color: #f0f2f5; |
| | | box-sizing: border-box; |
| | | padding-bottom: calc(env(safe-area-inset-bottom) + 96rpx); |
| | | } |
| | | |
| | | .background { |
| | | width: 100%; |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | height: 80rpx; |
| | | z-index: 3; |
| | | text-align: center; |
| | | padding-top: 110rpx; |
| | | font-size: 36rpx; |
| | | } |
| | | |
| | | .white { |
| | | background: #fff; |
| | | color: #333; |
| | | } |
| | | |
| | | .home-page .bg { |
| | | height: 780rpx; |
| | | width: 100%; |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | z-index: -1; |
| | | } |
| | | |
| | | .home-page .bg .image { |
| | | height: 100%; |
| | | } |
| | | |
| | | .content-wrapper { |
| | | position: relative; |
| | | padding: 30rpx; |
| | | } |
| | | |
| | | .topBox { |
| | | width: 100%; |
| | | background-color: #fff; |
| | | border-radius: 20rpx; |
| | | box-shadow: 0px 0px 20rpx 2px #f1f1f1; |
| | | } |
| | | |
| | | .teacherBox { |
| | | display: flex; |
| | | padding: 40rpx 20rpx; |
| | | justify-content: space-around; |
| | | text-align: center; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .teacherBox .title { |
| | | margin-top: 20rpx; |
| | | line-height: 40rpx; |
| | | } |
| | | |
| | | .teacherBox .change-info { |
| | | color: #ff6d00; |
| | | margin-left: 20rpx; |
| | | } |
| | | |
| | | .wait { |
| | | color: #ff6d00; |
| | | } |
| | | |
| | | .no { |
| | | color: #EE1818 |
| | | } |
| | | |
| | | .yes { |
| | | color: #1FBC1F |
| | | } |
| | | |
| | | .domainBox { |
| | | width: 100%; |
| | | margin: 20rpx auto; |
| | | background-color: #fff; |
| | | border-radius: 20rpx; |
| | | box-shadow: 0px 0px 20rpx 2px #f1f1f1; |
| | | } |
| | | |
| | | .domainBox .title { |
| | | font-weight: bold; |
| | | padding: 30rpx; |
| | | } |
| | | |
| | | .domainList { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: center; |
| | | padding-bottom: 30rpx; |
| | | } |
| | | |
| | | .domainList1 { |
| | | /* width: 100%; */ |
| | | display: flex; |
| | | /* flex-wrap: wrap; */ |
| | | border-bottom: 2rpx solid #f1f1f1; |
| | | margin: 0 30rpx; |
| | | } |
| | | |
| | | .domainList2 { |
| | | display: flex; |
| | | margin: 0 30rpx; |
| | | } |
| | | |
| | | .listItem { |
| | | width: 160rpx; |
| | | min-width: 160rpx; |
| | | flex-shrink: 0; |
| | | padding: 30rpx 0; |
| | | } |
| | | |
| | | .listItem .icon { |
| | | width: 46rpx; |
| | | height: 46rpx; |
| | | margin: 0 auto; |
| | | } |
| | | |
| | | .listItem .icon .t-image { |
| | | width: 100%; |
| | | height: 100%; |
| | | object-fit: contain; |
| | | } |
| | | |
| | | .listItem .label { |
| | | width: 100%; |
| | | font-size: 28rpx; |
| | | line-height: 40rpx; |
| | | text-align: center; |
| | | margin-top: 20rpx; |
| | | } |
New file |
| | |
| | | Page({ |
| | | |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | console.log(options); |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面卸载 |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "navigationBarTitleText": "我的收藏", |
| | | "usingComponents": {} |
| | | } |
New file |
| | |
| | | <text>我的收藏</text> |
New file |
| | |
| | | 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() { |
| | | |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "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" |
| | | } |
| | | } |
New file |
| | |
| | | <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="正在刷新..." 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> |
New file |
| | |
| | | .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; |
| | | } |
New file |
| | |
| | | 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() { |
| | | |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "navigationBarTitleText": "我的消息", |
| | | "usingComponents": {} |
| | | } |
New file |
| | |
| | | <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> |
New file |
| | |
| | | .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; |
| | | } |
New file |
| | |
| | | Page({ |
| | | |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | console.log(options); |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面卸载 |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "navigationBarTitleText": "我的订单", |
| | | "usingComponents": {} |
| | | } |
New file |
| | |
| | | <!--pages/personalCenter/myOrder/index.wxml--> |
| | | <text>pages/personalCenter/myOrder/index.wxml</text> |
New file |
| | |
| | | // pages/personalCenter/publishBooks/index.js |
| | | Page({ |
| | | |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | console.log(options); |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面卸载 |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "navigationBarTitleText": "出书申请", |
| | | "usingComponents": {} |
| | | } |
New file |
| | |
| | | <!--pages/personalCenter/publishBooks/index.wxml--> |
| | | <text>pages/personalCenter/publishBooks/index.wxml</text> |
New file |
| | |
| | | /* pages/personalCenter/publishBooks/index.wxss */ |
New file |
| | |
| | | // pages/personalCenter/sampleBooks/index.js |
| | | Page({ |
| | | |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | console.log(options); |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面卸载 |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "navigationBarTitleText": "样书申请", |
| | | "usingComponents": {} |
| | | } |
New file |
| | |
| | | <!--pages/personalCenter/sampleBooks/index.wxml--> |
| | | <text>pages/personalCenter/sampleBooks/index.wxml</text> |
New file |
| | |
| | | /* pages/personalCenter/sampleBooks/index.wxss */ |
New file |
| | |
| | | Page({ |
| | | |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | console.log(options); |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面卸载 |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "navigationBarTitleText": "教师认证", |
| | | "enablePullDownRefresh": true, |
| | | "backgroundTextStyle": "light", |
| | | "usingComponents": {} |
| | | } |
New file |
| | |
| | | <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> |
New file |
| | |
| | | .tips { |
| | | line-height: 24px; |
| | | font-size: 28rpx; |
| | | padding: 5px; |
| | | background: rgba(255, 108, 0, 0.1); |
| | | color: #ff6c00; |
| | | text-align: center; |
| | | margin: 0 auto 20px auto; |
| | | } |
| | | |
| | | .page-body { |
| | | padding: 20rpx; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .from-item { |
| | | margin-bottom: 20rpx; |
| | | display: flex; |
| | | } |
| | | |
| | | .from-item .label { |
| | | width: 240rpx; |
| | | height: 68rpx; |
| | | line-height: 68rpx; |
| | | } |
| | | |
| | | .from-item .item-content { |
| | | width: 56%; |
| | | border: 2rpx solid #D9D9D9; |
| | | padding: 10rpx; |
| | | } |
| | | |
| | | .submit { |
| | | background: #ff6c00; |
| | | color: #fff; |
| | | } |
New file |
| | |
| | | // 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() { |
| | | |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "usingComponents": { |
| | | "t-input": "tdesign-miniprogram/input/input", |
| | | "t-button": "tdesign-miniprogram/button/button" |
| | | } |
| | | } |
New file |
| | |
| | | <!--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> |
New file |
| | |
| | | /* pages/testLogin/index.wxss */ |
| | | .button-example { |
| | | margin: 60rpx 32rpx; |
| | | } |
| | |
| | | overflow: hidden; |
| | | margin-bottom: 20rpx; |
| | | } |
| | | |
| | | .icon-color { |
| | | color: #aaa; |
| | | } |
| | | |
| | | .cell-class { |
| | | height: 100rpx; |
| | | display: flex; |
| | |
| | | -ms-transform: translate(-50%, -50%); |
| | | transform: translate(-50%, -50%); |
| | | } |
| | | |
| | | .order-content-t { |
| | | margin-top: 10rpx; |
| | | font-size: 24rpx; |
| | |
| | | margin-bottom: env(safe-area-inset-bottom); |
| | | border-radius: 16rpx 16rpx 0 0; |
| | | } |
| | | |
| | | .popup-content .popup-title { |
| | | background: #fff; |
| | | text-align: center; |
| | |
| | | transform-origin: left top; |
| | | border-bottom: 2rpx solid #e5e5e5; |
| | | } |
| | | |
| | | .popup-content .popup-phone, |
| | | .popup-content .popup-close { |
| | | background: #fff; |
| | |
| | | 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; |
| | |
| | | font-size: 24rpx; |
| | | line-height: 32rpx; |
| | | } |
| | | |
| | | .cell-box .order-group__left { |
| | | margin-right: 0; |
| | | } |
| | | |
| | | .cell-box .t-cell-padding { |
| | | padding: 24rpx 18rpx 24rpx 32rpx; |
| | | } |
| | | } |
| | |
| | | }, |
| | | "compileType": "miniprogram", |
| | | "libVersion": "2.23.1", |
| | | "appid": "wx1432ecb6d1b86ade", |
| | | "appid": "wx5461028c83fea0b3", |
| | | "projectname": "tdesign-miniprogram-starter-retail", |
| | | "simulatorType": "wechat", |
| | | "simulatorPluginLibVersion": {}, |
| | |
| | | { |
| | | 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: '', |
| | | }, |
| | | ], |