Browse Source

上传代码

yh
杨豪 3 years ago
parent
commit
0fe16bf5ab
  1. 18
      App.vue
  2. 73
      api/knowledge.js
  3. 78
      api/serverTeacher.js
  4. 14
      api/user.js
  5. 11
      assets/css/base.less
  6. 22
      assets/css/reset.less
  7. 2
      components/AddressWindow.vue
  8. 54
      components/OrderGoods.vue
  9. 5
      components/ProductWindow.vue
  10. 2
      components/wuc-tab/wuc-tab.vue
  11. 3
      config/index.js
  12. 12
      manifest.json
  13. 76
      pages.json
  14. 31
      pages/Loading/index.vue
  15. 3
      pages/authorization/index.vue
  16. 264
      pages/course/detail.vue
  17. 207
      pages/course/index.vue
  18. 211
      pages/home/index.vue
  19. 3
      pages/knowledge/components/secondMenu.vue
  20. 161
      pages/knowledge/detail.vue
  21. 203
      pages/knowledge/index.vue
  22. 163
      pages/knowledge/unlock.vue
  23. 2
      pages/order/Logistics/index.vue
  24. 266
      pages/order/OrderSubmission/index.vue
  25. 355
      pages/serviceTeacher/addMember.vue
  26. 406
      pages/serviceTeacher/courseDetail.vue
  27. 195
      pages/serviceTeacher/courseManagement.vue
  28. 121
      pages/serviceTeacher/index.vue
  29. 203
      pages/serviceTeacher/memberDabang.vue
  30. 248
      pages/serviceTeacher/memberDetail.vue
  31. 185
      pages/serviceTeacher/memberManagement.vue
  32. 324
      pages/serviceTeacher/setSelfData.vue
  33. 71
      pages/shop/GoodsClass/index.vue
  34. 27
      pages/shop/GoodsCon/index.vue
  35. 42
      pages/shop/ShoppingCart/index.vue
  36. 95
      pages/study/bangdanRecord.vue
  37. 202
      pages/study/dabang.vue
  38. 237
      pages/study/detail.vue
  39. 60
      pages/study/editDabang.vue
  40. 25
      pages/user/PersonalData/index.vue
  41. 174
      pages/user/User/index.vue
  42. 35
      pages/user/feedBack/index.vue
  43. 58
      pages/user/myBangdan/index.vue
  44. 99
      pages/user/myCourses/index.vue
  45. 7
      pagesB/pages/user/address/AddressManagement/index.vue
  46. 155
      pagesB/pages/user/signIn/Integral/index.vue
  47. BIN
      static/addMenber.png
  48. BIN
      static/article1.png
  49. BIN
      static/backhome-icon.png
  50. BIN
      static/dabang-icon.png
  51. BIN
      static/default-headerimg.png
  52. BIN
      static/dizhi.png
  53. BIN
      static/home-banner.png
  54. BIN
      static/img2.png
  55. BIN
      static/jifen1.png
  56. BIN
      static/jifen2.png
  57. BIN
      static/jifen3.png
  58. BIN
      static/jifen4.png
  59. BIN
      static/kecheng-icon.png
  60. BIN
      static/kecheng-icon2.png
  61. BIN
      static/like.png
  62. BIN
      static/lock.png
  63. BIN
      static/message.png
  64. BIN
      static/num1.png
  65. BIN
      static/num2.png
  66. BIN
      static/num3.png
  67. BIN
      static/sort-icon.png
  68. BIN
      static/success.png
  69. BIN
      static/tab1-d.png
  70. BIN
      static/tab2-d.png
  71. BIN
      static/tab3-d.png
  72. BIN
      static/tab4-d.png
  73. BIN
      static/tab5-d.png
  74. BIN
      static/time.png
  75. BIN
      static/user-menu6.png
  76. BIN
      static/vipmanage-icon.png
  77. 54
      utils/index.js
  78. 7
      utils/request.js

18
App.vue

@ -88,4 +88,22 @@ export default {
@import './assets/css/base.less';
@import './assets/css/reset.less';
@import './assets/css/style.less';
/* #ifdef APP-PLUS ||MP-WEIXIN */
checkbox .wx-checkbox-input {
border-radius: 50% !important;
/* color: #ffffff !important; */
}
checkbox .wx-checkbox-input.wx-checkbox-input-checked {
color: #fff;
background: #FDBF68;
border-color: #FDBF68 !important;
}
/* .wx-checkbox-input.wx-checkbox-input-checked {
border: none !important;
} */
/* #endif */
</style>

73
api/knowledge.js

@ -7,6 +7,13 @@ export function getCategory(data) {
return request.get("/CourseCategory", data);
}
/**
* 文章分类
*/
export function getArticleCategorys(data) {
return request.get("/CourseCategory/getArticleCategorys", data);
}
/**
* 通过分类查找文章列表
*/
@ -21,12 +28,64 @@ export function getArticleDetails(data) {
return request.get("/article/details/"+data);
}
/**
* 获取解锁所有文章费用
*/
export function getUnlockAllArticlePrice(data) {
return request.get("/article/getUnlockAllArticlePrice");
}
/**
* 获取解锁文章
*/
export function unlockArticle(data) {
return request.post("/article/unlockArticle",data);
}
/**
* 获取学习榜单列表
*/
export function getStudyList(data) {
return request.post("/StudyList/listStudyList",data);
}
/**
* 获取学习榜单详情
*/
export function getStudyDetail(data) {
return request.get("/StudyList/studyListDetail?id="+data);
}
/**
* 报名榜单
*/
export function enterStudyList(data) {
return request.post("/StudyList/enterStudyList",data);
}
/**
* 获取榜单打榜进度
*/
export function myProgress(data) {
return request.get("/StudyList/myProgress?studyListId="+data);
}
/**
* 发布打榜分享
*/
export function studyListPublish(data) {
return request.post("/StudyList/studyListPublish",data);
}
/**
* 发布打榜点赞
*/
export function studyListVote(data) {
return request.post("/StudyList/studyListVote",data);
}
/**
* 获取打榜日记
*/
export function myStudylist(data) {
return request.get("/StudyList/myStudylist?listId="+data);
}
/**
* 获取课程列表
*/
@ -46,4 +105,18 @@ export function getCourseDetail(data) {
*/
export function enterCourse(data) {
return request.post("/user/enterCourse",data);
}
/**
* 课程扫码签到
*/
export function signCourse(data) {
return request.get("/user/signCourse?courseId="+data);
}
/**
* 意见反馈
*/
export function feedBack(data) {
return request.post("/user/feedback",data);
}

78
api/serverTeacher.js

@ -0,0 +1,78 @@
import request from "@/utils/request";
/**
* 完善资料
*/
export function editSelfData(data) {
return request.post("/user/sellerActive", data);
}
/**
* 获取会员管理列表
*/
export function getSellerMembers(data) {
return request.post("/user/sellerMembers", data);
}
/**
* 获取会员管理列表
*/
export function getMembersList(data) {
return request.post("/user/getSellerMembersByLevel");
}
/**
* 课程添加会员
*/
export function addMembers(data) {
return request.post("/user/addMembers",data);
}
/**
* 获取会员等级列表
*/
export function getMyMemberLevels(data) {
return request.get("/user/getMyMemberLevels");
}
/**
* 获取会员详情
*/
export function getMemberDetail(data) {
return request.post("/user/sellerMembersDetail", data);
}
/**
* 获取课程管理列表
*/
export function sellerCourses(data) {
return request.post("/user/sellerCourses", data);
}
/**
* 获取课程详情
*/
export function getCourseDetail(data) {
return request.get("/user/sellerCoursesDetail?id="+data);
}
/**
* 设置座位
*/
export function setMemberSeat(data) {
return request.post("/user/addMembersCourseSeat",data);
}
/**
* 发送验证码
*/
export function getVerificationCode(data) {
return request.post("/user/getVerificationCode",data);
}
/**
* 获取会员榜单日记
*/
export function myMemberStudylist(data) {
return request.post("/user/myMemberStudylist", data);
}

14
api/user.js

@ -434,3 +434,17 @@ export function setDetection() {
export function getRechargeApi() {
return request.get('recharge/index')
}
/*
* 获取我的课程列表
* */
export function getMyCourseList(q) {
return request.get('/Course/listCoursesByMemberId?type='+q)
}
/*
* 获取我的打榜列表
* */
export function getStudyList(q) {
return request.get('/StudyList/getStudyListByMemberId?type='+q)
}

11
assets/css/base.less

@ -2,18 +2,19 @@
/**
*相关初始化
*/
.font-color-red {
color: #eb3729 !important;
color: #E5270F !important;
}
.bg-color-red {
background-color: #eb3729 !important;
background-color: #E5270F !important;
}
.icon-color {
color: #eb3729;
color: #E5270F;
}
.cart-color {
color: #eb3729 !important;
border: 1px solid #eb3729 !important;
color: #E5270F !important;
border: 1px solid #E5270F !important;
}
/* padding20 */
.padding20 {

22
assets/css/reset.less

@ -34,8 +34,26 @@ input{line-height: normal; box-sizing:border-box;}
transform: scaleY(0.33);
}
}
.line1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width: 100%;}
.line2{word-break:break-all;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.line1{
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
width: 100%;
}
.line2{
word-break:break-all;
display:-webkit-box;
-webkit-line-clamp:2;
-webkit-box-orient:vertical;
overflow:hidden;
}
.line5{
word-break:break-all;
display:-webkit-box;
-webkit-line-clamp:5;
-webkit-box-orient:vertical;
overflow:hidden;
}
.mask{position:fixed;top:0;left:0;right:0;bottom:0;z-index:55;background-color:rgba(0,0,0,0.5);}

2
components/AddressWindow.vue

@ -65,7 +65,7 @@ export default {
this.$emit("input", false);
},
goAddressPages: function() {
this.$yrouter.push({ path: "/pages/user/address/AddAddress/index" });
this.$yrouter.push('/pagesB/pages/user/address/AddressManagement/index')
this.$emit("redirect");
},
tapAddress: function(index) {

54
components/OrderGoods.vue

@ -2,7 +2,7 @@
<view class="orderGoods">
<view class="total">{{ cartInfo.length }}件商品</view>
<view class="goodWrapper">
<view class="item acea-row row-between-wrapper" v-for="cart in cartInfo" :key="cart.id">
<view class="item acea-row-nowrap" v-for="cart in cartInfo" :key="cart.id">
<view class="pictrue">
<image :src="cart.productInfo.image" class="image" />
</view>
@ -12,8 +12,9 @@
<view class="num">x {{ cart.cartNum }}</view>
</view>
<view class="attr line1" v-if="cart.productInfo.attrInfo">{{ cart.productInfo.attrInfo.sku }}</view>
<view class="money font-color-red" v-if="isIntegral">{{ cart.costPrice }}积分</view>
<view class="money font-color-red" v-else>{{ cart.truePrice }}</view>
<view class="money"><text class="sm-word"></text>{{ cart.productInfo.price }}<text class="sm-word">+{{ cart.productInfo.giveIntegral }}积分</text></view>
<!-- <view class="money font-color-red" v-if="isIntegral">{{ cart.costPrice }}积分</view>
<view class="money" v-else><text class="sm-word"></text>{{ cart.truePrice }}</view> -->
<view class="evaluate" v-if="evaluate == 3 && cart.isReply == 0" @click="routerGo(cart)">评价</view>
</view>
</view>
@ -38,10 +39,55 @@ export default {
methods: {
routerGo(cart) {
this.$yrouter.push({
path: '/pages/shop/GoodsEvaluate/index',
path: '/pagesB/pages/shop/GoodsEvaluate/index',
query: { id: cart.unique },
})
},
},
}
</script>
<style lang="less" scoped>
.orderGoods{
border-radius: 10rpx;
margin: 20rpx 0;
.goodWrapper{
.item{
height: auto;
padding: 30rpx 0;
.pictrue{
width: 170rpx;
height: 170rpx;
border-radius: 10rpx;
}
.attr{
color: #999;
font-size: 24rpx;
line-height: 34rpx;
}
.text{
width: auto;
margin-left: 30rpx;
.name{
width: 420rpx;
font-size: 28rpx;
color: #222;
line-height: 40rpx;
}
.money{
font-size: 38rpx;
color: #E5270F;
font-weight: 500;
}
.sm-word{
font-size: 24rpx;
}
.evaluate{
font-size: 26rpx;
line-height: 46rpx;
text-align: center;
}
}
}
}
}
</style>

5
components/ProductWindow.vue

@ -138,3 +138,8 @@ export default {
},
};
</script>
<style scoped lang="less">
.product-window{
padding-bottom: 190rpx;
}
</style>

2
components/wuc-tab/wuc-tab.vue

@ -124,7 +124,7 @@ swiper {
background-color: #0081ff;
}
.text-orange{
color: #f37b1d
color: #EB5744;
}
.text-xl {

3
config/index.js

@ -1,7 +1,8 @@
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
// export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api'
// export const VUE_APP_API_URL = 'http://139.186.134.205:9006/api'
export const VUE_APP_API_URL = 'http://192.168.0.110:8088/api'
export const VUE_APP_API_URL = 'http://192.168.0.114:8088/api'
// export const VUE_APP_API_URL = 'https://www.cyjyyjy.com/api'
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
// export const VUE_APP_API_URL = 'https://thapi.xinxintuan.co/api'
// export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';

12
manifest.json

@ -21,7 +21,8 @@
"OAuth" : {},
"Payment" : {},
"Share" : {},
"Geolocation" : {}
"Geolocation" : {},
"Push" : {}
},
/* */
"distribute" : {
@ -58,25 +59,26 @@
"sdkConfigs" : {
"oauth" : {
"weixin" : {
"appid" : "wx7c84ede33062d1e4",
"appid" : "wx030578b829a4a49a",
"appsecret" : "c47ef66d3311194da44e60387d5c1abd",
"UniversalLinks" : "https://yixiang.co/app/"
}
},
"payment" : {
"weixin" : {
"appid" : "wx7c84ede33062d1e4",
"appid" : "wx030578b829a4a49a",
"UniversalLinks" : "https://yixiang.co/app/"
}
},
"share" : {
"weixin" : {
"appid" : "wx7c84ede33062d1e4",
"appid" : "wx030578b829a4a49a",
"UniversalLinks" : "https://yixiang.co/app/"
}
},
"ad" : {},
"geolocation" : {}
"geolocation" : {},
"push" : {}
},
"splashscreen" : {
"ios" : {

76
pages.json

@ -64,13 +64,14 @@
{
"path": "pages/study/dabang",
"style": {
"navigationBarTitleText": "打榜"
"navigationBarTitleText": "打榜",
"enablePullDownRefresh": true
}
},
{
"path": "pages/study/bangdanRecord",
"style": {
"navigationBarTitleText": "我的打榜记"
"navigationBarTitleText": "我的打榜记"
}
},
{
@ -85,6 +86,12 @@
"navigationBarTitleText": "文章详情"
}
},
{
"path": "pages/knowledge/unlock",
"style": {
"navigationBarTitleText": "解锁文章"
}
},
{
"path": "pages/shop/GoodSearch/index",
"style": {
@ -94,7 +101,7 @@
{
"path": "pages/shop/GoodsClass/index",
"style": {
"navigationBarTitleText": "商品分类"
"navigationBarTitleText": "商"
}
},
{
@ -197,7 +204,55 @@
"style": {
"navigationBarTitleText": "退货列表"
}
}
},
{
"path": "pages/serviceTeacher/index",
"style": {
"navigationBarTitleText": "禪易"
}
},
{
"path": "pages/serviceTeacher/setSelfData",
"style": {
"navigationBarTitleText": "个人资料"
}
},
{
"path": "pages/serviceTeacher/memberManagement",
"style": {
"navigationBarTitleText": "会员管理"
}
},
{
"path": "pages/serviceTeacher/memberDetail",
"style": {
"navigationBarTitleText": "会员详情"
}
},
{
"path": "pages/serviceTeacher/memberDabang",
"style": {
"navigationBarTitleText": "会员打榜日记"
}
},
{
"path": "pages/serviceTeacher/courseManagement",
"style": {
"navigationBarTitleText": "课程管理"
}
},
{
"path": "pages/serviceTeacher/courseDetail",
"style": {
"navigationBarTitleText": "课程详情"
}
},
{
"path": "pages/serviceTeacher/addMember",
"style": {
"navigationBarTitleText": "添加学员"
}
}
// {
// "path": "pages/activity/GoodsGroup/index",
// "style": {
@ -533,38 +588,39 @@
"color": "#666666",
"selectedColor": "#F99C10",
"backgroundColor": "#ffffff",
"borderStyle":"white",
"height": "50px",
"fontSize": "10px",
"fontSize": "12px",
"iconWidth": "24px",
"spacing": "3px",
"list": [
{
"pagePath": "pages/home/index",
"iconPath": "static/tab1.png",
"iconPath": "static/tab1-d.png",
"selectedIconPath": "static/tab1.png",
"text": "禪易"
},
{
"pagePath": "pages/course/index",
"iconPath": "static/tab2.png",
"iconPath": "static/tab2-d.png",
"selectedIconPath": "static/tab2.png",
"text": "学习"
},
{
"pagePath": "pages/knowledge/index",
"iconPath": "static/tab3.png",
"iconPath": "static/tab3-d.png",
"selectedIconPath": "static/tab3.png",
"text": "文章"
},
{
"pagePath": "pages/shop/GoodsClass/index",
"iconPath": "static/tab4.png",
"iconPath": "static/tab4-d.png",
"selectedIconPath": "static/tab4.png",
"text": "商城"
},
{
"pagePath": "pages/user/User/index",
"iconPath": "static/tab5.png",
"iconPath": "static/tab5-d.png",
"selectedIconPath": "static/tab5.png",
"text": "我的"
}

31
pages/Loading/index.vue

@ -7,7 +7,7 @@
</template>
<script>
import { mapState, mapMutations, mapActions } from 'vuex'
import { mapState, mapMutations, mapActions, mapGetters } from 'vuex'
//
// import request from "@//api/request";
import { wxappAuth } from '@/api/user'
@ -17,12 +17,13 @@ import cookie from '@/utils/store/cookie'
import { parseQuery, login, handleQrCode, getCurrentPageUrl, handleUrlParam, getCurrentPageUrlWithArgs } from '@/utils'
export default {
computed: mapGetters(['userInfo']),
name: 'Loading',
data() {
return {}
},
onShow() {
console.log('getUser')
console.log('getUser',this.userInfo)
var url = handleQrCode()
if (!url) {
url = handleUrlParam(getCurrentPageUrlWithArgs())
@ -50,9 +51,15 @@ export default {
}
console.log('进行登录操作')
login().finally(() => {
this.$yrouter.switchTab({
path: '/pages/home/index',
})
if(this.userInfo.isPromoter == 1){
this.$yrouter.reLaunch({
path: '/pages/serviceTeacher/index',
})
} else{
this.$yrouter.switchTab({
path: '/pages/home/index',
})
}
})
},
methods: {
@ -67,9 +74,17 @@ export default {
path: '/pages' + redirect.split('/pages')[1],
})
} else {
this.$yrouter.switchTab({
path: '/pages/home/index',
})
login().finally(() => {
if(this.userInfo.isPromoter == 1){
this.$yrouter.reLaunch({
path: '/pages/serviceTeacher/index',
})
} else{
this.$yrouter.switchTab({
path: '/pages/home/index',
})
}
})
}
},
},

3
pages/authorization/index.vue

@ -6,7 +6,7 @@
<view class="force-login__content y-f">
<open-data class="user-avatar" type="userAvatarUrl"></open-data>
<open-data class="user-name" type="userNickName"></open-data>
<view class="login-notice">为了提供更优质的服务需要获取您的头像昵称</view>
<view class="login-notice">为了提供更优质的服务需要您授权基本信息</view>
<button class="cu-btn author-btn" v-if="canIUseGetUserProfile" @tap="getUserInfoProfile">授权并查看</button>
<button class="cu-btn author-btn" v-else @getuserinfo="getUserInfo" open-type="getUserInfo">授权并查看</button>
<button class="cu-btn close-btn" @tap="back">暂不授权</button>
@ -152,6 +152,7 @@ export default {
flex-direction: column;
justify-content: flex-start;
position: relative;
height: 100vh;
}
.force-login-wrap {

264
pages/course/detail.vue

@ -1,10 +1,10 @@
<template>
<view class="course-detail-index">
<view v-if="$store.getters.token || userInfo.uid" class="content">
<view v-if="$store.getters.token || userInfo.uid">
<view class="swiper-box">
<swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000">
<swiper-item v-for="(item,index) in detail.imageArr" :key="index">
<view class="swiper-item"><image :src="item" mode=""></image></view>
<view class="swiper-item"><image :src="item" mode="aspectFill"></image></view>
</swiper-item>
</swiper>
</view>
@ -12,13 +12,13 @@
<view class="course-title">{{detail.courseName}}</view>
<view class="tips-box">
<view class="tip-item blue">{{detail.categoryName}}</view>
<!-- <view class="tip-item orange">国学院</view> -->
<view class="tip-item orange">{{detail.levelName}}</view>
</view>
</view>
<view class="tab-box acea-row row-around" :class="isFixedTop?'fixed':''">
<view class="tab-item" :class="active == '0' ? 'tab-item-active' : ''" @click="handelScroll('content1','0')">简介</view>
<view class="tab-item" :class="active == '1' ? 'tab-item-active' : ''" @click="handelScroll('content2','1')">课程安排</view>
<view class="tab-item" :class="active == '2' ? 'tab-item-active' : ''" @click="handelScroll('content3','2')">相关推荐</view>
<view class="tab-item" :class="active == 0 ? 'tab-item-active' : ''" @click="handelScroll('content1','0')">简介</view>
<view class="tab-item" :class="active == 1 ? 'tab-item-active' : ''" @click="handelScroll('content2','1')">课程安排</view>
<view class="tab-item" :class="active == 2 ? 'tab-item-active' : ''" @click="handelScroll('content3','2')">相关推荐</view>
</view>
<view class="content-box" bindscroll="scroll">
@ -42,7 +42,7 @@
<view class="left-line"></view>
<span>课程简介</span>
</view>
<text class="desc">{{item.courseIntroduce}}</text>
<text class="desc">{{detail.courseIntroduce}}</text>
</view>
<view class="course-desc-box content" id="content2">
<view class="title-box acea-row row-middle">
@ -53,7 +53,7 @@
<view class="course-card-item acea-row row-middle">
<image src="../../static/course-icon1.png"></image>
<view class="label">课程时间</view>
<view class="info">{{detail.courseStartTime}}</view>
<view class="info">{{courseStartTime}} {{courseEndTime}}</view>
</view>
<view class="course-card-item acea-row row-middle">
<image src="../../static/course-icon2.png"></image>
@ -63,12 +63,12 @@
<view class="course-card-item acea-row row-middle">
<image src="../../static/course-icon3.png"></image>
<view class="label">签到时间</view>
<view class="info">{{detail.enterStartTime}}</view>
<view class="info">{{detail.signStartTime}} {{detail.signEndTime}}</view>
</view>
<view class="course-card-item acea-row row-middle">
<image src="../../static/course-icon4.png"></image>
<view class="label">报名截止</view>
<view class="info">{{detail.signEndTime}}</view>
<view class="info">{{detail.enterEndTime}}</view>
</view>
</view>
</view>
@ -78,12 +78,12 @@
<span>课程安排</span>
</view>
<view class="plan-box acea-row-nowrap" v-for="(item,index) in detail.courseScheduleList" :key="index">
<text class="plan-time">{{item.courseDate.split(' ')[0]}}</text>
<!-- <text class="plan-time">{{index+1}}</text> -->
<text>{{item.courseContent}}</text>
</view>
</view>
<view class="recommend-box content" id="content3">
<view class="title-box acea-row row-middle row-center">
<view class="title-box acea-row row-middle row-center" v-if="detail.similarCourseList.length > 0">
<view class="row-line"></view>
<view class="title">相关推荐</view>
<view class="row-line"></view>
@ -91,14 +91,17 @@
<view class="knowledge-list">
<view class="knowledge-item acea-row" v-for="(item,index) in detail.similarCourseList" :key="index" @click="toDetail(item.id)">
<view class="img-box">
<image src="../../static/img1.png" mode=""></image>
<image :src="item.imageArr[0]" mode="aspectFill"></image>
</view>
<view class="knowledge-info-box">
<view class="title line1">{{item.courseName}}</view>
<view class="time">{{setDate(item.courseStartTime)}}-{{setDate(item.courseEndTime)}}</view>
<view class="time">{{courseStartTime}}~{{courseEndTime}}</view>
<view class="address">{{item.coursePlace}}</view>
<view class="type-box acea-row row-between row-middle">
<view class="price">{{item.courseCharge}}</view>
<view class="price">{{item.levelName}}</view>
<!-- <view class="price" v-if="item.level == 2">{{item.courseCharge}}</view>
<view class="price colG" v-if="item.chargeType == 0">免费</view> -->
<view class="signin-btn red">去报名</view>
</view>
</view>
@ -109,27 +112,44 @@
</view>
<view class="footer-box acea-row row-between-wrapper">
<view class="footer-left">
<view class="price"><span class="fz24"></span>{{detail.courseCharge}}</view>
<view class="price" v-if="detail.signState == 1">座位号{{detail.seat}}</view>
<!-- <view class="price" v-if="detail.level > 2">{{detail.level}}级课程</view>
<view class="price" v-if="detail.level == 2"><span class="fz24"></span>{{detail.courseCharge}} </view>
<view class="price colG" v-if="detail.chargeType == 0">免费</view> -->
</view>
<view class="footer-right">
<view class="btn-box acea-row row-between-wrapper" v-if="detail.haveSeller && !detail.enterState">
<view class="btn-box acea-row row-between-wrapper" v-if="userInfo.phone != '' && teacherId != null && detail.haveSeller == 0 && detail.enterState == 0">
<view class="count-down">
<view>距离截止时间还剩</view>
<uni-countdown color="#EB5744" :day="day" :hour="hour" :minute="minute" :second="second" />
</view>
<view class="signin-btn" @click="signInClick(2)">立即报名</view>
</view>
<view class="btn-box acea-row row-between-wrapper" v-if="userInfo.phone != '' && detail.haveSeller == 1 && detail.enterState == 0">
<view class="count-down">
<view>距离截止时间还剩</view>
<uni-countdown color="#EB5744" :day="day" :hour="hour" :minute="minute" :second="second" />
</view>
<view class="signin-btn" @click="signInClick">立即报名</view>
<view class="signin-btn" @click="signInClick(2)">立即报名</view>
</view>
<view class="signin-btn call-btn default-btn" v-if="detail.enterState == 1 && detail.signState == 2" >已报名</view>
<view class="signin-btn call-btn default-btn" v-if="detail.signState == 1" >已签到</view>
<view class="signin-btn call-btn"
@click="signInClick(1)"
v-if="userInfo.phone != '' && detail.haveSeller == 0 && detail.enterState == 0 && teacherId == null">
联系服务老师
</view>
<view class="signin-btn call-btn" v-if="detail.enterState" >已报名</view>
<view class="signin-btn call-btn" @click="signInClick" v-if="userInfo.phone && !detail.haveSeller">联系服务老师</view>
<!-- #ifdef MP-WEIXIN -->
<button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" v-if="userInfo.phone == '' && detail.haveSeller == 0" class="binding signin-btn call-btn" v-else>
<text>联系服务老师2</text>
<button open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber" v-if="userInfo.phone == '' && detail.haveSeller == 0 && detail.enterState == 0" class="binding signin-btn call-btn" v-else>
<text>绑定手机号</text>
</button>
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<button class="binding" @click="goBindPhone()" v-if="userInfo.phone == '' && detail.haveSeller == 0">
<text>联系服务老师</text>
<text>绑定手机号</text>
</button>
<!-- #endif -->
</view>
@ -163,6 +183,7 @@
<script>
// import WucTab from '@/components/wuc-tab/wuc-tab.vue';
import { mapState, mapGetters, mapMutations, mapActions } from 'vuex'
import { getUserInfo, bindingPhone, wxappBindingPhone } from '@/api/user'
import { getCourseDetail ,enterCourse } from '@/api/knowledge';
import Authorization from '@/pages/authorization/index'
export default {
@ -170,10 +191,12 @@
Authorization,
},
data() {
return {
return {
id: '',
detail:{courseScheduleList:[]},
active: '0',
teacherId:null,
validCode:null,
detail:{courseStartTime:[],courseEndTime:[],similarCourseList:[]},
active: 0,
toView: '',
heightArr:[],
tabInitTop:'',
@ -186,26 +209,43 @@
teacher:{}
}
},
computed: mapGetters(['userInfo']),
onLoad() {
console.log(this.userInfo,'11')
//
uni.createSelectorQuery().select('.tab-box').boundingClientRect((res) => {
if (res && res.top > 0) {
var tabInitTop= res.top;
this.tabInitTop= tabInitTop
this.tabInitTop= res.top;
}
}).exec();
this.courseId = this.$yroute.query.id;
this.getDetail()
if(this.$yroute.query.teacherId){
this.courseId = this.$yroute.query.courseId;
this.validCode = this.$yroute.query.validCode;
this.teacherId = this.$yroute.query.teacherId;
} else{
this.courseId = this.$yroute.query.id;
}
if(this.userInfo.uid){
this.getDetail()
this.$nextTick(()=>{
this.getHeightArr()
})
}
},
computed:{
userInfo(){
return this.$store.getters["userInfo"]
},
courseStartTime(){
return this.detail.courseStartTime.split(' ')[0]
},
courseEndTime(){
return this.detail.courseEndTime.split(' ')[0]
},
},
mounted() {
this.getHeightArr()
},
methods: {
getPhoneNumber: function(e) {
let thit = this
console.log(e)
//
if (e.mp.detail.errMsg == 'getPhoneNumber:ok') {
uni.showLoading({
@ -255,10 +295,16 @@
})
},
getDetail(){
uni.showLoading({
title:'正在加载中...'
})
let nowTime = Date.parse(new Date())/1000;
getCourseDetail({"id":this.courseId,"uid":this.userInfo.uid}).then((res)=>{
getCourseDetail({id:this.courseId}).then((res)=>{
uni.hideLoading()
this.detail = res.data
let endTime = Date.parse(new Date(res.data.signEndTime))/1000
console.log(this.detail,'this.detail')
let t = res.data.signEndTime.replace(/-/g, '/');
let endTime = Date.parse(new Date(t))/1000
this.times = endTime - nowTime;
this.day = Math.floor(this.times / (60 * 60 * 24));
this.hour = Math.floor(this.times / (60 * 60)) - (this.day * 24);
@ -266,38 +312,84 @@
this.second = Math.floor(this.times) - (this.day * 24 * 60 * 60) - (this.hour * 60 * 60) - (this.minute * 60);
})
},
signInClick(){
enterCourse({courseId:this.courseId}).then((res)=>{
signInClick(type){
if(this.userInfo.realName == null){
uni.showModal({
title: '提示!',
content: '请完善个人信息后报名!',
success(res) {
if (res.confirm) {
uni.navigateTo({
url:'/pages/user/PersonalData/index'
})
}
}
});
} else{
if(type == 2){
uni.showModal({
title:'提示!',
content:'是否确定报名?',
success:(res)=>{
if(res.confirm){
this.sign()
}else if (res.cancel) {
console.log('用户点击取消');
}
}
})
} else{
this.sign()
}
}
},
sign(){
enterCourse({
courseId:this.courseId,
sellerId:this.teacherId,
validCode:this.validCode
}).then((res)=>{
if(res.data.state == 0){
this.maskDialog = true
this.teacher = res.data
} else if(res.data.state == 1){
uni.showToast({
title: res.data.msg,
title: '报名成功!',
duration: 2000,
type: "success"
});
this.getDetail()
setTimeout(()=>{
this.getDetail()
},2000)
} else{
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
})
},
call(){
uni.makePhoneCall({
phoneNumber: this.teacher.phone
phoneNumber: this.teacher.phone
});
},
closeDialog(){
this.maskDialog = false
},
handelScroll(id,idx){
uni.createSelectorQuery().select('#'+id).boundingClientRect(function(res){
uni.pageScrollTo({
scrollTop:res.top,
duration: 300
});
}).exec()
this.isFixedTop = true
uni.createSelectorQuery().select('#'+id).boundingClientRect(data=>{//id
uni.createSelectorQuery().select(".course-detail-index").boundingClientRect(res=>{//id
uni.pageScrollTo({
duration: 500,//
scrollTop:data.top - res.top - 50 ,//top
})
}).exec()
}).exec();
this.toView = id;
this.active = idx;
this.toView = id
},
getHeightArr(){
let h=0;
@ -305,24 +397,30 @@
//selectAll
uni.createSelectorQuery().selectAll('.content').boundingClientRect((rect) => {
}).exec((res) => {
// console.log(res)
console.log('res',res)
res[0].forEach((item)=>{
h+=item.height;
h+=item.top;
heightArr.push(h);
})
this.heightArr = heightArr;
})
},
onPageScroll(res) {
let scrollTop = res.scrollTop;
let scrollArr = this.heightArr;
for  (let  i = 0; i < scrollArr.length; i++) {
if  (scrollTop >= 0  && scrollTop < scrollArr[0]) {
this.active = 0;
} else if (scrollTop >= (scrollArr[i - 1]) && scrollTop < scrollArr[i]) {
this.active= i;
}
}
this.scrollTop = res.scrollTop
let scrollTop = res.scrollTop;
let scrollArr = this.heightArr;
let timer = setTimeout(()=>{
if(this.scrollTop===scrollTop){
for  (let  i = 0; i < scrollArr.length; i++) {
if  (scrollTop < scrollArr[0]) {
this.active = 0;
} else if (scrollTop >= (scrollArr[i - 1]) && scrollTop < scrollArr[i]) {
this.active= i;
}
}
clearTimeout(timer)
}
},100)
var isSatisfy = scrollTop >= this.tabInitTop? true : false;
//
if (this.isFixedTop === isSatisfy) {
@ -340,13 +438,19 @@
<style scoped lang="less">
.course-detail-index{
width: 100%;
min-height: 100vh;
padding-bottom: 200rpx;
box-sizing: border-box;
.container {
height: 100%;
}
.mask-box{
width: 100%;
height: 100%;
background: rgba(0,0,0,.6);
position: fixed;
top: 0;
z-index: 99;
.dialog-box{
width: 600rpx;
border-radius: 12rpx;
@ -438,8 +542,8 @@
text-align: center;
line-height: 34rpx;
font-size: 24rpx;
margin-left: 20rpx;
padding: 0 5rpx;
border-radius: 5rpx;
}
.blue{
color: #6E85EB;
@ -447,9 +551,10 @@
background: #EDEFF8;
}
.orange{
color: #EF644E;
border: 1px solid #EF644E;
background: #FFF4F2;
margin-left: 10rpx;
border: 1px solid #F99C10;
color: #F99C10;
background: #FFEDCC;
}
}
}
@ -467,7 +572,7 @@
color: #222;
}
.tab-item-active{
font-size: 40rpx;
font-size: 32rpx;
font-weight: bold;
border-bottom: 4rpx solid #EB5744;
}
@ -508,7 +613,7 @@
image{
width: 100rpx;
height: 100rpx;
border-radius: 25px;
border-radius: 50px;
}
.name{
width: 100%;
@ -551,19 +656,18 @@
}
}
.course-card-item{
font-size: 32rpx;
font-size: 26rpx;
margin-bottom: 12rpx;
image{
width: 30rpx;
height: 30rpx;
}
.label{
color: #999999;
line-height: 34rpx;
margin: 0 32rpx 0 18rpx;
margin: 0 24rpx 0 16rpx;
}
.info{
color: #666666;
line-height: 34px;
}
}
.recommend-box{
@ -587,14 +691,15 @@
.img-box {
width: 204rpx;
height: 200rpx;
margin-right: 30rpx;
margin-right: 20rpx;
image {
width: 100%;
height: 100%;
border-radius: 10rpx;
}
}
.knowledge-info-box {
width: calc(100% - 234rpx);
width: calc(100% - 224rpx);
.title {
font-size: 28rpx;
color: #333;
@ -618,9 +723,9 @@
color: #999;
margin-top: 28rpx;
.price{
font-size: 36rpx;
font-size: 28rpx;
color: #EA533E;
font-weight: 600;
font-weight: 500;
}
.signin-btn{
width: 156rpx;
@ -649,10 +754,16 @@
}
}
}
.colG{
color: #8FB85B !important;
}
.footer-box{
width: 100%;
padding: 24rpx 26rpx 66rpx 44rpx;
padding: 30rpx 26rpx 60rpx 44rpx;
background: #fff;
position: fixed;
bottom: 0;
left: 0;
.price{
font-size: 44rpx;
color: #EA533E;
@ -660,6 +771,7 @@
.fz24{
font-size: 24rpx;
}
.footer-right{
.btn-box{
text-align: center;
@ -697,6 +809,10 @@
color: #fff;
font-size: 30rpx;
}
.default-btn{
background: #f6f6f6;
color: #222;
}
}
}

207
pages/course/index.vue

@ -1,53 +1,68 @@
<template>
<view class="konwledge-index index">
<view class="header header-search acea-row row-center-wrapper">
<view @click="goGoodSearch()" class="search acea-row row-middle">
<!-- <view class="header header-search acea-row row-center-wrapper"> -->
<!-- <view @click="goGoodSearch()" class="search acea-row row-middle">
<text class="iconfont icon-xiazai5"></text>
搜索商品
</view>
</view> -->
<!-- #ifndef H5 -->
<view class="qr" @click="startQr()" v-if="$deviceType !== 'weixin'">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/qr.png`" />
</view>
<!-- <view class="qr" @click="startQr()" v-if="$deviceType !== 'weixin'">
<image src="../../static/saoyisao-icon.png" />
</view> -->
<!-- #endif -->
</view>
<!-- </view> -->
<view class="content-box">
<view class="tab-box">
<wuc-tab :tab-list="tabList" :tabCur.sync="TabCur" @change="tabChange"
<view class="tab-box" :class="isFixedTop ? 'fixed' : ''">
<!-- <wuc-tab :tab-list="tabList" :tabCur.sync="TabCur" @change="tabChange"
tab-class="text-center text-black bg-white" select-class="text-orange text-xl">
</wuc-tab>
<SecondMenu :menuList="secondMenu" :active.sync="active" @secondMenuClick="secondMenuClick">
</wuc-tab> -->
<view class="tabs">
<scroll-view class="scroll-view_H" scroll-x="true" scroll-with-animation :scroll-left='scrollLeft'>
<view class="tab-item scroll-item" :class="index == tabSelect ? 'tab-item-active' : ''"
v-for="(item,index) in tabList" :key="item.id"
@click="tabChange(item,index)">{{item.categoryName}}</view>
</scroll-view>
</view>
<SecondMenu :menuList="secondMenu" :active.sync="active" @secondMenuClick="secondMenuClick" v-if="secondMenu.length > 0">
</SecondMenu>
</view>
<view class="bangdan-box">
<view class="bangdan-box" v-if="studyList.length > 0">
<view class="active-word">学习榜</view>
<view class="bangdan-list">
<scroll-view class="scroll-view_H" scroll-x="true">
<scroll-view class="scroll-view_H" scroll-x="true" v-if="studyList.length > 0">
<view class="bangdan-item"
:class="index%2 !== 0 ? 'bgR' : ''"
v-for="(item,index) in 6" :key="index"
v-for="(item,index) in studyList" :key="index"
@click="toStudyDetail(item.id)">
<view>连续11天打卡站桩</view>
<view class="time">2021.5.28-2021.6.18</view>
<view class="acea-row row-between-wrapper">
<view class="jifen">30积分</view>
<view>
<view>{{item.listName}}</view>
<view class="time">{{item.listStartTime.split(' ')[0]}} {{item.listEndTime.split(' ')[0]}}</view>
</view>
<view class="acea-row row-between-wrapper" style="width: 100%;margin-top: 30rpx;">
<view class="jifen">{{item.integral}}积分</view>
<view class="signin-btn">报名参加</view>
</view>
</view>
</scroll-view>
<!-- <view class="no-content" v-if="studyList.length == 0">暂无内容...</view> -->
</view>
</view>
<view class="knowledge-list">
<view class="active-word">{{categoryTitle}}</view>
<view class="knowledge-item acea-row" v-for="item in courseList" @click="toDetail(item.id)">
<view class="active-word">课程</view>
<view class="no-content" v-if="courseList.length == 0">暂无内容...</view>
<view class="knowledge-item acea-row" v-for="(item,index) in courseList" :key="index" @click="toDetail(item.id)">
<view class="img-box">
<image :src="item.imageArr[0]" mode=""></image>
<image :src="item.imageArr[0]" mode="aspectFill"></image>
</view>
<view class="knowledge-info-box">
<view class="title line1">{{item.courseName}}</view>
<view class="time">{{utils.spl(item.courseStartTime)[0]}}~{{utils.spl(item.courseEndTime)[0]}}</view>
<view class="time">{{utils.spl(item.courseStartTime)[0]}}{{utils.spl(item.courseEndTime)[0]}}</view>
<view class="address">{{item.coursePlace}}</view>
<view class="type-box acea-row row-between row-middle">
<view class="price">{{item.courseCharge}}</view>
<!-- <view class="price">{{item.courseCharge}}</view> -->
<view class="price">{{item.levelName}}</view>
<!-- <view class="price colG" v-if="item.chargeType == 0">免费</view> -->
<view class="signin-btn red">去报名</view>
</view>
</view>
@ -85,7 +100,11 @@
computed: mapGetters(['userInfo']),
data() {
return {
TabCur: null,
windowWidth:'',
isFixedTop: false,
currentTab:null,
tabSelect:0,
scrollLeft:200,
tabList: [],
secondMenu: [],
active: null,
@ -98,23 +117,50 @@
WucTab,
SecondMenu
},
onShow() {
onLoad() {
//
uni.createSelectorQuery().select('.tab-box').boundingClientRect((res) => {
if (res && res.top > 0) {
this.tabInitTop= res.top;
}
}).exec();
getCategory().then((res) => {
this.tabList = res.data
this.$set(this, 'tabList', res.data)
this.$set(this, 'secondMenu', res.data[0].categoryList)
this.$set(this, 'TabCur', res.data[0].id)
this.$set(this, 'currentTab', res.data[0])
this.categoryTitle = res.data[0].categoryName;
if (res.data[0].categoryList.length > 0) {
this.$set(this, 'active', res.data[0].categoryList[0].id)
this.categoryTitle = this.categoryTitle +'·'+res.data[0].categoryList[0].categoryName
} else{
// this.$set(this, 'tabSelect', 0)
// this.scrollLeft = 0
}
}).then(() => {
this.getStudyList()
this.getCourses()
})
},
onShow() {
},
mounted() {
uni.getSystemInfo({
success:function(res){
this.windowWidth = res.windowWidth;
}
})
},
methods: {
onPageScroll(res) {
let scrollTop = res.scrollTop;
var isSatisfy = scrollTop >= this.tabInitTop? true : false;
//
if (this.isFixedTop === isSatisfy) {
return false;
}
this.isFixedTop = isSatisfy
},
toStudyDetail(id) {
this.$yrouter.push({
path: '/pages/study/detail',
@ -132,37 +178,60 @@
})
},
getStudyList() {
uni.showLoading({
title:'正在加载中...'
})
var cid = null;
this.active == null ? cid = this.TabCur : cid = this.active
this.active == null ? cid = this.currentTab.id : cid = this.active
getStudyList({categoryId: cid,listState:0}).then((res) => {
if (res.success) {
this.studyList = res.data
}
uni.hideLoading()
})
},
getCourses() {
var cid = null;
this.active == null ? cid = this.TabCur : cid = this.active
console.log(this.currentTab)
this.active == null ? cid = this.currentTab.id : cid = this.active
getCourses({categoryId: cid,listState:0,uid:this.userInfo.uid}).then((res) => {
if (res.success) {
this.courseList = res.data
}
})
},
tabChange(item) {
tabChange(item,index) {
this.tabSelect = index
this.currentTab = item
this.moveTo(index)
this.categoryTitle = item.categoryName;
if (item.categoryList.length > 0) {
this.$set(this, 'active', item.categoryList[0].id)
this.categoryTitle = item.categoryList[0].categoryName;
}
this.secondMenu = item.categoryList;
this.TabCur = item.id;
this.getStudyList()
this.getCourses()
},
//
moveTo(index) {
const query = uni.createSelectorQuery().in(this)
query.selectAll(`.scroll-item`).boundingClientRect(rect => {
const windowWidth = this.windowWidth //
let width = 0
//
for (let i = 0; i < index; i++) {
width += rect[i].width
}
// 0
if (width > windowWidth / 2) {
this.scrollLeft = width + rect[index].width / 2 - windowWidth / 2
} else {
this.scrollLeft = 0
}
}).exec()
},
secondMenuClick(item) {
this.active = item.id;
this.categoryTitle = item.categoryName;
this.getStudyList()
@ -173,7 +242,16 @@
</script>
<style scoped lang="less">
.header{
.qr {
width: 36rpx;
height: 38rpx;
image{
width: 36rpx;
height: 38rpx;
}
}
}
.header-search {
transition: all linear 0.3s;
background: #fff;
@ -182,24 +260,71 @@
background-color: #fff;
}
}
.colG{
color: #8FB85B !important;
}
.content-box{
width: 100%;
box-sizing: border-box;
.tab-box{
box-shadow: 0px 6px 12px 0px rgba(227,227,227,0.29);
.tabs{
width:auto;
height: 96rpx;
padding-left: 20rpx;
background: #fff;
.scroll-view_H{
white-space: nowrap;
width: 100%;
height: 96rpx;
}
.tab-item{
height: 96rpx;
line-height: 96rpx;
display: inline-block;
margin-right: 40rpx;
font-size: 32rpx;
color: #999999;
}
.tab-item-active{
color: #EA533E;
border-bottom: 2px solid #EA533E;
font-weight: bold;
}
}
}
/deep/.second-menu-box{
padding: 30rpx 32rpx;
}
.fixed{
position: -webkit-sticky;
position: sticky;
top: 0;
z-index: 99;
}
}
.active-word{
font-size: 34rpx;
}
.no-content{
font-size: 28rpx;
color: #666666;
text-align: center;
padding: 30rpx 0;
}
.bangdan-box{
width: 100%;
box-sizing: border-box;
padding-left: 30rpx;
margin-top: 30rpx;
.scroll-view_H{
white-space: nowrap;
width: 100%;
}
.bangdan-list{
padding: 16rpx 0 0;
}
.bangdan-item{
width: 514rpx;
height: 234rpx;
@ -211,6 +336,7 @@
border-radius: 10rpx;
font-size: 34rpx;
margin-right: 20rpx;
display: inline-block;
.time{
font-size: 24rpx;
color: #FFFFFF;
@ -244,10 +370,10 @@
.knowledge-list {
width: 100%;
padding:0 32rpx;
margin-top: 50rpx;
margin-top: 30rpx;
.knowledge-item {
background: #fff;
padding: 32rpx 0;
padding: 16rpx 0;
border-bottom: 1px solid #ECECEC;
.img-box {
width: 204rpx;
@ -256,12 +382,13 @@
image {
width: 100%;
height: 100%;
border-radius: 10rpx;
}
}
.knowledge-info-box {
width: calc(100% - 234rpx);
.title {
font-size: 28rpx;
font-size: 32rpx;
color: #333;
font-size: 500;
line-height: 40rpx;
@ -283,9 +410,8 @@
color: #999;
margin-top: 28rpx;
.price{
font-size: 36rpx;
font-size: 28rpx;
color: #EA533E;
font-weight: 600;
}
.signin-btn{
width: 156rpx;
@ -311,6 +437,9 @@
}
}
}
.knowledge-item:nth-last-child(1){
border: none;
}
}
}
</style>

211
pages/home/index.vue

@ -1,6 +1,6 @@
<template>
<view class="index">
<view class="header header-search acea-row row-center-wrapper">
<view class="header header-search acea-row row-middle">
<view @click="goGoodSearch()" class="search acea-row row-middle">
<text class="iconfont icon-xiazai5"></text>
搜索商品
@ -12,16 +12,16 @@
<!-- #endif -->
</view>
<view class="banner-box">
<image src="../../static/home-banner.png" mode=""></image>
<image src="https://www.cyjyyjy.com:8081/static/home-banner.png" mode=""></image>
</view>
<!-- 每日一签 -->
<view class="today-fortune-content">
<view class="today-fortune-box">
<view class="top-box acea-row row-between-wrapper">
<view class="title">今日·宜忌</view>
<view>2021年06月07日</view>
<view>{{dateStr}}</view>
</view>
<view class="date-box acea-row row-middle">
<view class="date-box acea-row row-middle row-center">
<view class="date-btn prev-btn"><image src="../../static/prev.png"></image></view>
<view class="time-box">{{todayDate}}</view>
<view class="date-btn next-btn"><image src="../../static/next.png"></image></view>
@ -48,7 +48,7 @@
</view>
</view>
</view>
<view class="fortune-menu-box acea-row row-around">
<view class="fortune-menu-box acea-row row-between">
<view class="fortune-menu-item acea-row row-middle ">
<image src="../../static/f-menu1.png" mode=""></image>
<text>周公解梦</text>
@ -71,14 +71,16 @@
</view>
<view class="recommend-list-box acea-row">
<view class="recommend-item" v-for="(item,index) in courseList" :key="index" @click="toCourseDetail(item.id)">
<view class="img-box"><image :src="item.imageArr[0]"></image></view>
<view class="img-box"><image :src="item.imageArr[0]" mode="aspectFill"></image></view>
<view class="course-content">
<view class="course-title line1">{{item.courseName}}</view>
<view class="course-tips-box acea-row">
<view class="course-tip-item blue">{{item.categoryName}}</view>
<!-- <view class="course-tip-item yellow">商学院</view> -->
<view class="course-tip-item yellow">{{item.levelName}}</view>
</view>
<view class="price">{{item.courseCharge}}</view>
<!-- <view class="price" v-if="item.level > 2">{{item.level}}级课程</view>
<view class="price" v-if="item.level == 2">{{item.courseCharge}}</view>
<view class="price colG" v-if="item.chargeType == 0 || item.level == 1">免费</view> -->
<view class="course-address acea-row row-between-wrapper">
<view class="address">{{item.coursePlace}}</view>
<view class="course-time">{{setDate(item.courseStartTime)}}-{{setDate(item.courseEndTime)}}</view>
@ -97,15 +99,15 @@
<scroll-view class="scroll-view_H" scroll-x="true">
<view class="study-item scroll-view-item_H" v-for="(item,index) in studyList" :key="index" @click="toStudyDetail(item.id)">
<view class="day-box acea-row row-middle">
<image src="../../static/date-icon.png" mode="" v-if="index%2 == 0"></image>
<image src="../../static/date-icon2.png" mode="" v-if="index%2 != 0"></image>
<image src="../../static/date-icon.png" v-if="index%2 == 0"></image>
<image src="../../static/date-icon2.png" v-if="index%2 != 0"></image>
<text>{{item.clockTimes}}</text>
</view>
<view class="study-content">
<view class="study-title">{{item.listName}}</view>
<view class="study-time acea-row row-between-wrapper">
<view class="study-time acea-row-nowrap row-between-wrapper">
<view>{{setDate(item.listStartTime)}}开始</view>
<view>280人已参与</view>
<view>{{item.enterNum}}人已参与</view>
</view>
</view>
</view>
@ -119,14 +121,20 @@
<view class="more" @click="toKnowledge">查看全部文章</view>
</view>
<view class="article-list">
<view class="article-item">
<image src="../../static/article1.png" mode=""></image>
<view class="article-item" v-for="(item,index) in articleList" :key="index" @click="toArticleDetail(item.id)">
<image :src="item.imageInput" mode="aspectFill"></image>
<view class="article-content">
<view class="article-title line1">满愿手抄经礼盒中国的传家手礼盒中国的传家手礼盒中国的传家手抄</view>
<view class="article-desc line1">抱朴书院孕育自华夏优秀传统文书院孕育自华夏优秀传统书院孕育自华夏优秀传统化</view>
<view class="author-box acea-row">
<view class="author">商学院·</view>
<view class="time">2021.5.28</view>
<view class="article-title line1">{{item.title}}</view>
<view class="article-desc line1">{{item.synopsis}}</view>
<view class="author-box acea-row row-between">
<view class="acea-row">
<view class="author">{{item.author}}</view>
<view class="time">{{item.addTime}}</view>
</view>
<view class="tips"
:class="item.chargeType == 0 ? 'free-bg' : item.chargeType == 1 ? '' : 'jifen'">
{{item.chargeType == 0 ? '免费' : item.chargeType == 1 ? '收费' : '积分'}}
</view>
</view>
</view>
</view>
@ -155,6 +163,8 @@ import { getHomeData, getShare, getCanvas } from '@/api/public'
import cookie from '@/utils/store/cookie'
import { isWeixin, handleUrlParam } from '@/utils/index'
import { signCourse } from '@/api/knowledge'
import { openShareAll } from '@/libs/wechat'
const HAS_COUPON_WINDOW = 'has_coupon_window'
@ -214,6 +224,7 @@ export default {
chinese: ['〇', '一', '二', '三', '四', '五', '六', '七', '八', '九'],
weeks: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
week:'',
dateStr:'',
todayDate:'',
courseList: [],
studyList: [],
@ -238,12 +249,16 @@ export default {
this.getLocation()
let that = this
this.getDate();
uni.showLoading({
title:'正在加载中...'
})
getCanvas()
.then(res => {})
.catch(error => {
this.homeData = JSON.parse(error.data.json)
})
getHomeData().then(res => {
uni.hideLoading()
that.logoUrl = res.data.logoUrl
res.data.banner.map(item => (item.bgcolor = item.color || ''))
that.$set(that, 'info', res.data.info)
@ -272,9 +287,13 @@ export default {
},
getDate(){
var today = new Date();
var y = today.getFullYear().toString();
console.log('y',y)
var m = (today.getMonth()+1).toString();
var d = today.getDate().toString();
// var d = '22'
var day = today.getDay();
this.dateStr = y + '年' + m + '月' + d + '日' ;
this.week = this.weeks[day]
if (m.length == 2) {
if (m.charAt(0) == "0") {
@ -287,11 +306,16 @@ export default {
this.todayDate += (this.chinese[m.charAt(0)] + "月");
}
//
console.log(d[d.length-1],'ddddddd')
if (d.length == 2) {
if(d[d.length-1] == 0){
this.todayDate += (this.chinese[d.charAt(0)] + "十" + '日');
} else{
this.todayDate += (this.chinese[d.charAt(0)] + "十" + this.chinese[d.charAt(1)]);
}
}
else {
this.todayDate += (this.chinese[d.charAt(0)]);
this.todayDate += (this.chinese[d.charAt(0)]) + '日';
}
},
onShareTimeline: function() {
@ -324,6 +348,14 @@ export default {
},
})
},
toArticleDetail(id){
this.$yrouter.push({
path: '/pages/knowledge/detail',
query: {
id:id,
},
})
},
toKnowledge(){
uni.switchTab({
url: "/pages/knowledge/index"
@ -380,45 +412,66 @@ export default {
}
},
startQr: function() {
uni.showLoading({
title:'正在加载中...'
})
uni.scanCode({
success: res => {
let option = handleUrlParam(res.result)
switch (option.pageType) {
case 'good':
//
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: {
q: res.result,
},
})
break
case 'group':
//
this.$yrouter.push({
path: '/pages/activity/GroupRule/index',
query: {
q: res.result,
},
})
break
case 'dargain':
//
this.$yrouter.push({
path: '/pages/activity/DargainDetails/index',
query: {
q: res.result,
},
})
break
default:
//
this.$yrouter.push({
path: '/pages/Loading/index',
query: {},
})
break
}
// let option = handleUrlParam(res.result)
let id = res.result;
signCourse(id).then((res)=>{
uni.hideLoading()
if(res.success){
uni.showModal({
title:'提示!',
content:'签到成功!您的座位号是' + res.data,
})
} else{
uni.showToast({
title:res.msg,
icon:'none',
duration:5000
})
}
})
// switch (option.pageType) {
// case 'good':
// //
// this.$yrouter.push({
// path: '/pages/shop/GoodsCon/index',
// query: {
// q: res.result,
// },
// })
// break
// case 'group':
// //
// this.$yrouter.push({
// path: '/pages/activity/GroupRule/index',
// query: {
// q: res.result,
// },
// })
// break
// case 'dargain':
// //
// this.$yrouter.push({
// path: '/pages/activity/DargainDetails/index',
// query: {
// q: res.result,
// },
// })
// break
// default:
// //
// this.$yrouter.push({
// path: '/pages/Loading/index',
// query: {},
// })
// break
// }
},
})
},
@ -435,9 +488,23 @@ export default {
.content_box {
background: #F5F6F7;
}
.colG{
color: #8FB85B !important;
}
.index {
background-color: #F5F6F7;
padding-bottom: 68rpx;
.header{
.qr {
width: 36rpx;
height: 38rpx;
image{
width: 36rpx;
height: 38rpx;
}
}
}
}
.swiper-item {
height: 100%;
@ -593,13 +660,15 @@ export default {
.recommend-box{
.recommend-list-box{
width: 100%;
// margin-top: 20rpx;
.recommend-item{
width: 334rpx;
background: #fff;
border-radius: 10rpx;
font-size: 28rpx;
color: #333;
margin: 20rpx 18rpx 20rpx 0;
margin-right: 23rpx;
margin-top: 23rpx;
overflow: hidden;
image{
width: 334rpx;
@ -614,7 +683,7 @@ export default {
line-height: 40rpx;
}
.course-tips-box{
margin-top: 12rpx;
margin: 12rpx 0 24rpx;
font-size: 24rpx;
color: #999;
.course-tip-item{
@ -629,7 +698,7 @@ export default {
font-size: 22rpx;
margin-right: 20rpx;
box-sizing: border-box;
margin-right: 20rpx;
margin-right: 10rpx;
}
.blue{
color: #6E85EB;
@ -731,6 +800,7 @@ export default {
background: #fff;
padding: 20rpx;
box-sizing: border-box;
margin-bottom: 12rpx;
image{
width: 710rpx;
height: 266rpx;
@ -755,11 +825,29 @@ export default {
.author-box{
font-size: 24rpx;
color: #999;
text-indent: 1em;
// text-indent: 1em;
.author{
color: #EA533E;
margin-right: 12rpx;
}
.tips{
width: 100rpx;
font-size: 20rpx;
color: #FFAD3A;
height: 34rpx;
text-align: center;
line-height: 34rpx;
background: #fcd391;
border-radius: 44rpx;
}
.free-bg{
background: #8FB85B;
color: #D7FFA4;
}
.jifen{
background: #AAC8FA;
color: #5693F9;
}
}
}
}
@ -768,6 +856,7 @@ export default {
color: #222;
.title{
font-size: 40rpx;
font-weight: 500;
}
.more{
font-size: 24rpx;

3
pages/knowledge/components/secondMenu.vue

@ -52,8 +52,9 @@
.menu-item{
min-width: 76rpx;
height: 62rpx;
line-height: 62rpx;
box-sizing: border-box;
padding: 6rpx 20rpx;
padding: 0rpx 20rpx;
font-size: 28rpx;
background: #F6F7F8;
border-radius: 14rpx;

161
pages/knowledge/detail.vue

@ -1,17 +1,27 @@
<template>
<view class="article-detail-index">
<view class="article-title">{{detail.title}}</view>
<view class="author-box acea-row row-middle">
<view class="charge-type">免费</view>
<view class="add-time">{{detail.addTime}}</view>
<view>·{{detail.author}}</view>
<view class="lock-box" v-if="detail.isLock">
<image src="../../static/lock.png" mode=""></image>
<view>{{detail.chargeType == 1 ? '该文章需要付费阅读' : '该文章需要积分兑换'}}</view>
<view class="lock-btn" @click="toUnlock">
<text class="tips">{{detail.articleCharge}}</text>
<text>立即解锁</text>
</view>
</view>
<view class="d-line"></view>
<view class="audio-box">
<luchAudio :src="detail.audio" :play.sync="audioPlay"></luchAudio>
</view>
<view class="content-box">
<rich-text :nodes="detail.content"></rich-text>
<view :class="detail.isLock ? 'mask-box' : ''">
<view class="article-title">{{detail.title}}</view>
<view class="author-box acea-row row-middle">
<view :class="detail.chargeType == 0 ? 'charge-type' : 'charge-type charge-type-price'">{{detail.chargeType == 0 ? '免费' : detail.chargeType == 1 ? '收费' : '积分兑换'}}</view>
<view class="add-time">{{detail.addTime}}</view>
<view>·{{detail.author}}</view>
</view>
<view class="d-line"></view>
<view class="audio-box" v-if="detail.audio != ''">
<luchAudio :src="detail.audio" :play.sync="aotuPlay" :author="detail.author" :name="detail.title"></luchAudio>
</view>
<view class="content-box">
<rich-text class="content" :nodes="detail.content"></rich-text>
</view>
</view>
</view>
</template>
@ -23,38 +33,51 @@ export default{
components: { luchAudio },
data(){
return {
id:8,
current: {
poster: 'https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/7fbf26a0-4f4a-11eb-b680-7980c8a877b8.png',
name: '致爱丽丝',
author: '暂无',
src: 'https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-hello-uniapp/2cc220e0-c27a-11ea-9dfb-6da8e309e0d8.mp3',
},
audioAction: {
method: 'pause'
},
id:'',
detail:null,
audioPlay:true
aotuPlay: false,
maskH:0
}
},
created() {
onLoad(){
this.id = this.$yroute.query.id;
getArticleDetails(this.id).then((res)=>{
console.log(res)
if(res.success){
this.detail = res.data
var music = null;
music = uni.createInnerAudioContext(); //
music.src= res.data.audio; //
music.play(); //
}
})
},
onShow(){
this.getDetail();
},
mounted() {
// console.log(this.menuList)
},
onShareAppMessage: function(res) {
return {
title: this.detail.title,
imageUrl:this.detail.imageInput,
path: '/pages/knowledge/detail?id=' + this.detail.id
}
},
methods:{
getDetail(){
getArticleDetails(this.id).then((res)=>{
// console.log(res)
if(res.success){
res.data.content = res.data.content.replace(/\<img/g, "<img style='width: 100%;'")
this.detail = res.data
}
})
},
toUnlock(){
this.$yrouter.push({
path: '/pages/knowledge/unlock',
query: {
name: this.detail.title,
chargeType: this.detail.chargeType,
articleCharge:this.detail.articleCharge,
id: this.id
}
})
},
}
}
</script>
@ -62,16 +85,68 @@ export default{
<style lang="less" scoped>
.article-detail-index{
width: 100%;
min-height: 100%;
box-sizing: border-box;
padding: 32rpx;
background: #fff;
.d-line{
.lock-box{
font-size: 32rpx;
color: #333;
font-weight: bold;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
z-index: 99;
image{
width: 92rpx;
height: 92rpx;
}
.lock-btn{
width: 260rpx;
height: 86rpx;
background: #F99C10;
border-radius: 44rpx;
margin-top: 38rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 28rpx;
color: #fff;
.tips{
font-size: 24rpx;
}
}
}
.mask-box{
width: 100%;
height: 100vh;
overflow: hidden;
filter: blur(2px);
position: absolute;
top: 0;
left: 0;
user-select: none;
}
.mask-box::after{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
content: '';
display: block;
background: rgba(255, 253, 253, 0.2);
}
.d-line{
width: 100%;
height: 1px;
background: #ECECEC;
top: 228rpx;
left: 0;
}
.article-title{
font-size: 40rpx;
@ -88,16 +163,21 @@ export default{
min-width: 60rpx;
height: 34rpx;
line-height: 32rpx;
color: #6E85EB;
text-align: center;
background: #EDEFF8;
border-radius: 4rpx;
border: 1px solid #6E85EB;
border: 1px solid #D7FFA4;
background: #8FB85B;
color: #D7FFA4;
padding: 0 6rpx;
font-size: 22rpx;
margin-right: 20rpx;
box-sizing: border-box;
}
.charge-type-price{
background: #F99C10;
color: #FFEDCC;
border: 1px solid #F99C10;;
}
}
.audio-box{
margin: 30rpx 0 40rpx;
@ -108,6 +188,7 @@ export default{
.content-box{
width: 100%;
overflow: hidden;
margin-top: 40rpx;
}
}
</style>

203
pages/knowledge/index.vue

@ -1,18 +1,19 @@
<template>
<view class="konwledge-index">
<wuc-tab
:tab-list="tabList"
:tabCur.sync="TabCur"
@change="tabChange"
tab-class="text-center text-black bg-white" select-class="text-orange text-xl">
</wuc-tab>
<view class="content-box">
<view class="tabs">
<scroll-view class="scroll-view_H" scroll-x="true" scroll-with-animation :scroll-left='scrollLeft'>
<view class="tab-item scroll-item" :class="index == tabSelect ? 'tab-item-active' : ''"
v-for="(item,index) in tabList" :key="item.id"
@click="tabChange(item,index)">{{item.categoryName}}</view>
</scroll-view>
</view>
<view class="tab-box">
<view class="introduce-box acea-row">
<view class="left-box"></view>
<view class="right-box">
<view class="title-txt">国学介绍</view>
<view class="desc">
<text>抱朴书院孕育自华夏优秀传统文化博学致用抱朴含虚为院训弘扬国粹利益社会为动力</text>
<view class="title-txt">{{currentTab.categoryName}}</view>
<view class="desc line5">
<text>{{currentTab.categoryDetails || '暂无'}}</text>
</view>
</view>
</view>
@ -21,16 +22,22 @@
:active.sync="active"
@secondMenuClick="secondMenuClick">
</SecondMenu>
</view>
<view class="content-box">
<view class="knowledge-list">
<view class="knowledge-item acea-row" v-if="articleList.length > 0" v-for="item in articleList" @click="toDetail(item.id)">
<view class="img-box">
<image :src="item.imageInput" mode=""></image>
<image :src="item.imageInput" mode="aspectFill"></image>
</view>
<view class="knowledge-info-box">
<view class="title line1">{{item.title}}</view>
<view class="intro line2">{{item.synopsis}}</view>
<view class="knowledge-info-box acea-row row-column row-between">
<view class="line1">
<view class="title line1">{{item.title}}</view>
<view class="intro line2">{{item.synopsis}}</view>
</view>
<view class="type-box acea-row">
<view class="tip blue">{{item.chargeType == 0 ? '免费' : item.articleCharge}}</view>
<view class="tip" :class="item.chargeType == 0 ? 'free-bg' : item.chargeType == 1 ? '' : 'jifen'">
{{item.chargeType == 0 ? '免费' : item.chargeType == 1 ? '收费' : '积分'}}
</view>
<view class="time">{{item.addTime}}</view>
</view>
</view>
@ -42,28 +49,42 @@
</template>
<script>
import WucTab from '@/components/wuc-tab/wuc-tab.vue';
import SecondMenu from './components/secondMenu.vue';
import { getCategory,getArticle } from '@/api/knowledge';
import { getArticleCategorys,getArticle } from '@/api/knowledge';
export default {
data() {
return {
windowWidth:'',
tabSelect:0,
scrollLeft:0,
currentTab:null,
showView:true,
isFixedTop:false,
TabCur: null,
tabList: [],
secondMenu:[],
active:null,
articleList:[]
articleList:[],
tabHeight:0,
scrollTop:0
}
},
components: { WucTab,SecondMenu },
onLoad() {
getCategory().then((res)=>{
components: { SecondMenu },
onShow() {
console.log(this.tabSelect,'tabSelect')
},
onLoad(){
getArticleCategorys().then((res)=>{
this.tabList = res.data
this.$set(this, 'currentTab', res.data[0])
this.$set(this, 'tabList', res.data)
this.$set(this, 'secondMenu', res.data[0].categoryList)
this.$set(this, 'TabCur', res.data[0].id)
if(res.data[0].categoryList.length > 0){
this.$set(this, 'active', res.data[0].categoryList[0].id)
} else{
// this.$set(this, 'tabSelect', 0)
// this.scrollLeft = 0
}
}).then(()=>{
this.getArticle()
@ -79,22 +100,46 @@
})
},
getArticle(){
uni.showLoading({
title:'正在加载中...'
})
var cid = null;
this.active == null ? cid = this.TabCur : cid = this.active
this.active == null ? cid = this.currentTab.id : cid = this.active
getArticle({cid:cid}).then((res)=>{
uni.hideLoading()
if(res.success){
this.articleList = res.data
}
})
},
tabChange(item) {
tabChange(item,index) {
this.currentTab = item
this.tabSelect = index
this.moveTo(index)
if(item.categoryList.length > 0){
this.$set(this, 'active', item.categoryList[0].id)
}
this.secondMenu = item.categoryList;
this.TabCur = item.id;
this.secondMenu = item.categoryList
this.getArticle()
},
//
moveTo(index) {
const query = uni.createSelectorQuery().in(this)
query.selectAll(`.scroll-item`).boundingClientRect(rect => {
const windowWidth = this.windowWidth //
let width = 0
//
for (let i = 0; i < index; i++) {
width += rect[i].width
}
// 0
if (width > windowWidth / 2) {
this.scrollLeft = width + rect[index].width / 2 - windowWidth / 2
} else {
this.scrollLeft = 0
}
}).exec()
},
secondMenuClick(item){
this.active = item.id;
this.getArticle()
@ -107,23 +152,63 @@
.konwledge-index{
background: #fff;
min-height: 100%;
padding-top: 110rpx;
.tab-box{
// position: fixed;
// top: 0;
background: #fff;
/deep/.second-menu-box {
padding: 0 24rpx;
}
}
.tabs{
width:100%;
height: 96rpx;
padding-left: 20rpx;
position: fixed;
top: 0;
background: #fff;
z-index: 10;
.scroll-view_H{
white-space: nowrap;
width: 100%;
height: 96rpx;
}
.tab-item{
height: 96rpx;
line-height: 96rpx;
display: inline-block;
margin-right: 40rpx;
font-size: 32rpx;
color: #999999;
}
.tab-item-active{
color: #EA533E;
border-bottom: 2px solid #EA533E;
font-weight: bold;
}
}
.fixed{
position: -webkit-sticky;
position: sticky;
top: 0;
z-index: 99;
}
.content-box{
width: 100%;
box-sizing: border-box;
padding: 0 24rpx;
}
.introduce-box{
width: 100%;
height: 328rpx;
box-shadow: 0px 6rpx 14rpx 8rpx rgba(255,234,231,0.2);
width: calc(100% - 60rpx);
height: auto;
box-shadow: 0px 6rpx 14rpx 8rpx rgba(255,234,231,0.5);
border-radius: 8px;
overflow: hidden;
margin: 30rpx 0;
.left-box{
width: 16rpx;
height: 100%;
background: #FAEFED;
}
margin: 0rpx auto 30rpx;
padding-bottom: 30rpx;
padding-left: 10rpx;
position: relative;
.right-box{
width: calc(100% - 16rpx);
padding: 30rpx 50rpx 0 24rpx;
@ -142,6 +227,18 @@
}
}
}
.introduce-box::after{
content: '';
display: block;
width: 16rpx;
height: 100%;
background: #FAEFED;
position: absolute;
left: -1rpx;
top: 50%;
border-radius: 50px;
transform: translateY(-50%);
}
.knowledge-list{
width: 100%;
@ -162,17 +259,19 @@
image{
width: 100%;
height: 100%;
border-radius: 10rpx;
}
}
.knowledge-info-box{
width: calc(100% - 234rpx);
.title{
font-size: 28rpx;
font-size: 32rpx;
color: #333;
font-size: 500;
line-height: 40rpx;
line-height: 32rpx;
}
.intro{
height: 82rpx;
font-size: 28rpx;
color: #999999;
line-height: 40rpx;
@ -183,26 +282,22 @@
color: #999;
.tip{
width: 60rpx;
font-size: 20rpx;
color: #FFAD3A;
height: 34rpx;
line-height: 32rpx;
text-align: center;
background: #EDEFF8;
border-radius: 4rpx;
border: 1px solid #6E85EB;
padding: 0 6rpx;
font-size: 22rpx;
line-height: 34rpx;
background: #fcd391;
border-radius: 10rpx;
margin-right: 20rpx;
box-sizing: border-box;
}
.blue{
color: #6E85EB;
background: #EDEFF8;
border-color: #6E85EB;
.free-bg{
background: #8FB85B;
color: #D7FFA4;
}
.yellow{
color: #F99C10;
background: #FFEDCC;
border-color: #F99C10;
.jifen{
background: #AAC8FA;
color: #5693F9;
}
}
}
@ -213,9 +308,9 @@
font-size: 32rpx;
}
.text-orange{
color: #EB5744;
color: #E5270F;
font-size: 40rpx !important;
border-color: #EB5744;
border-color: #E5270F;
}
</style>

163
pages/knowledge/unlock.vue

@ -0,0 +1,163 @@
<template>
<view class="unlock-box">
<view class="lock-list acea-row row-between">
<view class="lock-item" :class="active == 0 ? 'lock-item-active' : ''" @click="tabClick(0)" v-if="chargeType == 1">
<view>解锁单篇文章</view>
<view class="price"><text></text>{{articleCharge}}</view>
<view class="sm-word line1">{{articleName}}</view>
<view class="sm-word">永久阅读权</view>
</view>
<view class="lock-item" :class="active == 0 ? 'lock-item-active' : ''" @click="tabClick(0)" v-if="chargeType == 2">
<view>解锁单篇文章</view>
<view class="price">{{articleCharge}}<text>积分</text></view>
<view class="sm-word line1">{{articleName}}</view>
<view class="sm-word">永久阅读权</view>
</view>
<view class="lock-item" :class="active == 1 ? 'lock-item-active' : ''" @click="tabClick(1)">
<view>解锁所有文章</view>
<view class="price"><text></text>{{total}}</view>
<view class="sm-word">海量文章永久畅读</view>
</view>
</view>
<view class="submit-btn" @click="submitClick">确认支付</view>
</view>
</template>
<script>
import { getUnlockAllArticlePrice, unlockArticle } from '@/api/knowledge';
export default{
data(){
return {
id:'',
articleName:'',
active: 0,
total:0,
chargeType:0,
articleCharge:0,
}
},
onLoad(){
this.id = this.$yroute.query.id;
this.articleName = this.$yroute.query.name;
this.chargeType = this.$yroute.query.chargeType;
this.articleCharge = this.$yroute.query.articleCharge;
getUnlockAllArticlePrice().then((res)=>{
if(res.success){
this.total = res.data
}
})
},
methods:{
tabClick(idx){
this.active = idx
},
submitClick(){
let data = {};
let that = this;
if(this.active == 0){
data.articleId = this.id;
data.isLockAll = false
} else{
data.isLockAll = true
}
uni.showModal({
title: '提示',
content: '是否确认支付?',
success: function (res) {
if (res.confirm) {
unlockArticle(data).then((response)=>{
if(response.success){
// console.log(response.data.result.jsConfig)?
// return
let orderInfo = response.data.result.jsConfig;
that.payment(orderInfo)
}
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
},
payment(orderInfo){
//
uni.requestPayment({
provider: 'wxpay',
...orderInfo,
signType: 'MD5',
success: success => {
console.log(success)
uni.showToast({
title: '支付成功',
icon: 'success',
duration: 3000,
})
let time = setTimeout(() => {
clearTimeout(time)
uni.navigateBack({
delta:1
})
}, 3000)
},
fail: error => {
console.log(error)
if (error.errMsg == 'requestPayment:fail cancel') {
uni.showToast({ title: '已取消支付', icon: 'none', duration: 5000 })
} else {
uni.showToast({ title: error || error.msg, icon: 'none', duration: 5000 })
}
},
})
},
}
}
</script>
<style scoped lang="less">
.unlock-box{
width: 100%;
min-height: 100%;
background: #fff;
padding: 30rpx;
.lock-list{
.lock-item{
width: 340rpx;
height: 324rpx;
background: #F4F4F4;
color: #222;
font-size: 32rpx;
padding-top: 60rpx;
padding-left: 40rpx;
.price{
font-size: 60rpx;
color: #EB5744;
line-height: 82rpx;
margin: 10rpx 0;
text{
font-size: 40rpx;
}
}
.sm-word{
font-size: 24rpx;
color: #666666;
}
}
.lock-item-active{
background: #FDFBEB;
border: 3rpx solid #FFC46B;
}
}
.submit-btn{
width: 340rpx;
height: 80rpx;
text-align: center;
line-height: 80rpx;
font-size: 32rpx;
color: #fff;
background: #F99C10;
border-radius: 44rpx;
margin: 72rpx auto;
}
}
</style>

2
pages/order/Logistics/index.vue

@ -83,7 +83,7 @@
<view class="no-express" v-if="loaded && !expressList.length">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/noExpress.png`" />
</view>
<Recommend></Recommend>
<!-- <Recommend></Recommend> -->
</view>
</template>
<script>

266
pages/order/OrderSubmission/index.vue

@ -1,10 +1,10 @@
<template>
<view class="order-submission">
<view class="allAddress" :style="systemStore ? '' : 'padding-top: 0.2*100rpx'">
<view class="nav acea-row">
<!-- <view class="nav acea-row">
<view class="item font-color-red" :class="shipping_type === 0 ? 'on' : 'on2'" @click="addressType(0)" v-if="systemStore"></view>
<view class="item font-color-red" :class="shipping_type === 1 ? 'on' : 'on2'" @click="addressType(1)" v-if="systemStore && !isIntegral"></view>
</view>
</view> -->
<view class="address acea-row row-between-wrapper" v-if="shipping_type === 0" @click="addressTap">
<view class="addressCon" v-if="addressInfo.realName">
<view class="name">
@ -38,38 +38,49 @@
</div>
<div class="iconfont icon-jiantou"></div>
</div>
<view class="line">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/line.jpg`" />
</view>
</view>
<OrderGoods :evaluate="0" :isIntegral="isIntegral" :cartInfo="orderGroupInfo.cartInfo"></OrderGoods>
<view class="wrapper">
<view class="item acea-row row-between-wrapper" @click="couponTap" v-if="deduction === false && !isIntegral">
<view class="tips" v-if="!isEnough">您的积分不足只能用于购买部分产品积分不足的产品将默认原价购买</view>
<view class="wrapper">
<!-- <view class="item acea-row row-between-wrapper" @click="couponTap" v-if="deduction === false && !isIntegral">
<view>优惠券</view>
<view class="discount">
{{ usableCoupon.couponTitle || '请选择' }}
<text class="iconfont icon-jiantou"></text>
</view>
</view>
<view class="item acea-row row-between-wrapper" v-if="!isIntegral && deduction === false && enableIntegral === true">
</view> -->
<!-- <view class="item acea-row row-between-wrapper" v-if="!isIntegral && deduction === false && enableIntegral === true">
<view>积分抵扣</view>
<view class="discount">
<view class="select-btn">
<view class="checkbox-wrapper">
<!-- <input type="checkbox" v-model="useIntegral" @click="changeUseIntegral"/> -->
<checkbox-group @change="changeUseIntegral">
<label class="well-check">
<label class="well-check acea-row row-middle row-right">
<text class="integral">
当前积分
<text class="num font-color-red">{{ userInfo.integral || 0 }}</text>
</text>
<checkbox value="true" :checked="useIntegral ? true : false"></checkbox>
<checkbox value="true" style="transform: scale(0.7);" :checked="useIntegral ? true : false"></checkbox>
</label>
</checkbox-group>
</view>
</view>
</view>
</view>
</view> -->
<view class="item acea-row row-between-wrapper" v-if="!isIntegral && deduction === false && enableIntegral === true">
<view>当前积分</view>
<view class="discount">
<view class="select-btn">
<view class="checkbox-wrapper">
<label class="well-check acea-row row-middle row-right">
<text class="integral">
<text class="num font-color-red" style="margin-right: 0;">{{ userInfo.integral || 0 }}</text>
</text>
</label>
</view>
</view>
</view>
</view>
<view class="item acea-row row-between-wrapper" v-if="shipping_type === 0">
<view>快递费用</view>
<view class="discount">
@ -107,10 +118,10 @@
<view class="name acea-row row-center-wrapper"> <view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view>微信支付 </view>
<view class="tip">微信快捷支付</view>
</view>
<view class="payItem acea-row row-middle" v-if="!isIntegral" :class="active === 'yue' ? 'on' : ''" @click="payItem('yue')">
<!-- <view class="payItem acea-row row-middle" v-if="!isIntegral" :class="active === 'yue' ? 'on' : ''" @click="payItem('yue')">
<view class="name acea-row row-center-wrapper"> <view class="iconfont icon-icon-test" :class="active === 'yue' ? 'bounceIn' : ''"></view>余额支付 </view>
<view class="tip">可用余额{{ userInfo.nowMoney || 0 }}</view>
</view>
</view> -->
<view class="payItem acea-row row-middle" v-if="isIntegral" :class="active === 'integral' ? 'on' : ''" @click="payItem('integral')">
<view class="name acea-row row-center-wrapper"> <view class="iconfont icon-icon-test" :class="active === 'integral' ? 'bounceIn' : ''"></view>积分支付 </view>
<view class="tip">可用积分{{ userInfo.integral || 0 }}</view>
@ -141,8 +152,8 @@
<view class="footer acea-row row-between-wrapper">
<view>
合计:
<text class="font-color-red" v-if="!isIntegral">{{ orderPrice.payPrice }}</text>
<text class="font-color-red" v-if="isIntegral">{{ orderPrice.payIntegral }}积分</text>
<text class="font-color-red total-word" v-if="!isIntegral">{{ orderPrice.payPrice }}+{{orderPrice.usedIntegral}}积分</text>
<!-- <text class="font-color-red total-word" v-if="isIntegral">{{ orderPrice.payIntegral }}积分</text> -->
</view>
<view class="settlement" @click="createOrder">立即结算</view>
</view>
@ -150,104 +161,7 @@
<AddressWindow @checked="changeAddress" @redirect="addressRedirect" v-model="showAddress" :checked="addressInfo.id" ref="mychild"></AddressWindow>
</view>
</template>
<style scoped lang="less">
.order-submission .wrapper .shipping select {
color: #999;
padding-right: 0.15 * 100rpx;
}
.order-submission .wrapper .shipping .iconfont {
font-size: 0.3 * 100rpx;
color: #515151;
}
.order-submission .allAddress {
width: 100%;
background-image: linear-gradient(to bottom, #eb3729 0%, #eb3729 100%);
background-image: -webkit-linear-gradient(to bottom, #eb3729 0%, #eb3729 100%);
background-image: -moz-linear-gradient(to bottom, #eb3729 0%, #eb3729 100%);
padding-top: 1 * 100rpx;
}
.order-submission .allAddress .nav {
margin: 0 auto;
padding: 0 30rpx;
width: 100%;
box-sizing: border-box;
}
.order-submission .allAddress .nav .item {
flex: 1;
position: relative;
}
.order-submission .allAddress .nav .item.on {
position: relative;
}
.order-submission .allAddress .nav .item.on:before {
position: absolute;
bottom: 0;
content: '快递配送';
font-size: 0.28 * 100rpx;
display: block;
height: 0;
left: 0;
right: 0;
border-width: 0.4 * 100rpx;
border-style: solid;
border-color: #fff;
z-index: 9;
text-align: center;
line-height: 0.14 * 100rpx;
}
.order-submission .allAddress .nav .item:nth-of-type(2).on:before {
content: '到店自提';
border-width: 0.4 * 100rpx;
}
.order-submission .allAddress .nav .item.on2 {
position: relative;
}
.order-submission .allAddress .nav .item.on2:before {
position: absolute;
bottom: 0;
content: '到店自提';
font-size: 0.28 * 100rpx;
display: block;
height: 0;
left: 0;
right: 0;
border-width: 0.4 * 100rpx;
border-style: solid;
border-color: #d5e6e6;
text-align: center;
line-height: 0.14 * 100rpx;
}
.order-submission .allAddress .nav .item:nth-of-type(1).on2:before {
content: '快递配送';
border-width: 0.4 * 100rpx;
}
.order-submission .allAddress .address {
width: 6.91 * 100rpx;
height: 1.5 * 100rpx;
margin: 0 auto;
box-sizing: border-box;
}
.order-submission .allAddress .line {
width: 7.1 * 100rpx;
margin: 0 auto;
}
.order-submission .wrapper .item .discount input::placeholder {
color: #ccc;
}
</style>
<script>
import OrderGoods from '@/components/OrderGoods'
import CouponListWindow from '@/components/CouponListWindow'
@ -277,7 +191,8 @@ export default {
enableIntegralNum: 0,
isWeixin: _isWeixin,
pinkId: 0,
active: _isWeixin ? 'weixin' : 'yue',
// active: _isWeixin ? 'weixin' : 'yue',
active: 'weixin',
showCoupon: false,
showAddress: false,
addressInfo: {},
@ -299,6 +214,7 @@ export default {
storeSelfMention: 0,
cartid: '',
isIntegral: false,
isEnough:true,
}
},
computed: mapGetters(['userInfo', 'storeItems']),
@ -398,6 +314,8 @@ export default {
//
this.systemStore = res.data.systemStore || {}
this.storeSelfMention = res.data.storeSelfMention
//
this.isEnough = res.data.isEnough
this.computedPrice()
})
.catch((error) => {
@ -539,3 +457,121 @@ export default {
},
}
</script>
<style scoped lang="less">
.tips{
font-size: 28rpx;
color: #FF1F00;
line-height: 34rpx;
}
.order-submission{
background: #F5F6F7;
padding: 20rpx;
}
.order-submission .wrapper{
border-radius: 10rpx;
}
.order-submission .wrapper .shipping select {
color: #999;
padding-right: 15rpx;
}
.order-submission .wrapper .shipping .iconfont {
font-size: 30rpx;
color: #515151;
}
.order-submission .allAddress {
width: 100%;
background-color: #fff;
margin: 20rpx 0;
border-radius: 10rpx;
}
.order-submission .allAddress .nav {
margin: 0 auto;
padding: 0 30rpx;
width: 100%;
box-sizing: border-box;
}
.order-submission .allAddress .nav .item {
flex: 1;
position: relative;
}
.order-submission .allAddress .nav .item.on {
position: relative;
}
.order-submission .allAddress .nav .item.on:before {
position: absolute;
bottom: 0;
content: '快递配送';
font-size: 0.28 * 100rpx;
display: block;
height: 0;
left: 0;
right: 0;
border-width: 0.4 * 100rpx;
border-style: solid;
border-color: #fff;
z-index: 9;
text-align: center;
line-height: 0.14 * 100rpx;
}
.order-submission .allAddress .nav .item:nth-of-type(2).on:before {
content: '到店自提';
border-width: 0.4 * 100rpx;
}
.order-submission .allAddress .nav .item.on2 {
position: relative;
}
.order-submission .allAddress .nav .item.on2:before {
position: absolute;
bottom: 0;
content: '到店自提';
font-size: 0.28 * 100rpx;
display: block;
height: 0;
left: 0;
right: 0;
border-width: 0.4 * 100rpx;
border-style: solid;
border-color: #d5e6e6;
text-align: center;
line-height: 0.14 * 100rpx;
}
.order-submission .wrapper .item .discount .integral {
margin-right: 0rpx;
}
.order-submission .allAddress .nav .item:nth-of-type(1).on2:before {
content: '快递配送';
border-width: 0.4 * 100rpx;
}
.order-submission .allAddress .address {
width: 690rpx;
height: 170rpx;
margin: 0 auto;
box-sizing: border-box;
.addressCon{
.name{
margin-bottom: 20rpx;
font-size: 32rpx;
}
}
}
.order-submission .wrapper .item .discount input::placeholder {
color: #ccc;
}
.order-submission{
.footer{
.total-word{
font-weight: bold;
font-size: 32rpx;
}
}
}
</style>

355
pages/serviceTeacher/addMember.vue

@ -0,0 +1,355 @@
<template>
<view class="member-box">
<view class="search-box">
<view class="search-input-box acea-row row-middle">
<text class="iconfont icon-xiazai5"></text>
<input type="text" placeholder="请输入会员真实姓名" v-model="keyWord" @input="search">
</view>
</view>
<uni-collapse accordion="true">
<uni-collapse-item title="会员列表" showAnimation="true" open="true" style="border-top: 1px solid #f3f3f3;">
<view style="padding: 20rpx;">
<view class="checkAll-box acea-row row-middle">
<checkbox-group @change="allChoose">
<label class="acea-row row-middle">
<checkbox value="all" :checked="allChecked?true:false" style="transform:scale(0.7);"
color="#fff" />
<text>全选</text>
</label>
</checkbox-group>
</view>
<view class="member-list">
<checkbox-group @change="changeCheckbox">
<label class="member-item acea-row row-middle" v-for="item in memberList" :key="item.value" >
<checkbox
:value="JSON.stringify(item)"
:checked="checkedArr.includes(JSON.stringify(item))"
style="transform:scale(0.7);"
color="#fff" class="member-item acea-row row-middle"></checkbox>
<view class="img-box">
<image :src="item.avatar"></image>
</view>
<view class="memberInfo-box">
<view class="name">{{item.realName}}</view>
<view class="jifen">{{item.level}}级会员</view>
</view>
</label>
</checkbox-group>
</view>
</view>
</uni-collapse-item>
</uni-collapse>
<view class="footer-box">
<view class="selected-box acea-row row-middle">
<!-- <image :src="item.avatar" mode="" ></image> -->
<view class="member-name-box" v-for="(item,index) in checkedAllArr" :key="index">
<text>{{item.realName}}</text>
<view class="close" @click="delSelect(item)">×</view>
</view>
<text>已选择{{checkedAllArr.length}}名会员</text>
</view>
<view class="submit-btn" @click="submitAdd">确认添加</view>
</view>
</view>
</template>
<script>
import {
getMyMemberLevels,
getSellerMembers,
addMembers
} from "@/api/serverTeacher"
export default {
data() {
return {
keyWord:'',
searchType:false,
courseId: '',
isChecked: false,
levelList: [],
checkedArr: [], //
allChecked: false, //
checkedAllArr: [], //
memberList: [],
showMask: false
}
},
onLoad() {
this.courseId = this.$yroute.query.id;
this.getSellerMembers()
},
methods: {
search(){
console.log(this.checkedAllArr)
let arr = []
this.checkedAllArr.forEach((item)=>{
arr.push(JSON.stringify(item))
})
this.checkedArr = arr;
if(this.keyWord == '') {
this.searchType = false;
} else{
this.searchType = true;
}
this.getSellerMembers()
},
getSellerMembers() {
getSellerMembers({courseId:this.courseId,realName:this.keyWord}).then(res => {
if (res.success) {
this.memberList = res.data
}
})
},
//
delSelect(item){
let info = JSON.stringify(item);
let sele = item;
this.checkedArr.splice(this.checkedArr.findIndex(item => item === info), 1);
this.checkedAllArr.splice(this.checkedAllArr.findIndex(item => item === sele), 1);
},
//
allChoose(e){
let chooseItem = e.detail.value;
//
if(chooseItem[0]=='all'){
this.allChecked=true;
for(let item of this.memberList){
let itemVal = JSON.stringify(item);
if(!this.checkedArr.includes(itemVal)){
var arr = [];
this.checkedArr.push(itemVal);
this.checkedArr.forEach((item)=>{
arr.push(JSON.parse(item))
})
this.checkedAllArr = arr;
}
}
}else{
//
this.allChecked=false;
this.checkedArr=[];
this.checkedAllArr = [];
}
},
//
changeCheckbox(e) {
this.checkedArr = e.detail.value;
let arr = []
this.checkedArr.forEach((item)=>{
arr.push(JSON.parse(item))
})
if(this.searchType){
let temp = this.checkedAllArr;
temp.push(...arr);
let obj = {};
this.checkedAllArr = temp.reduce((cur,next) => {
obj[next.uid] ? "" : obj[next.uid] = true && cur.push(next);
return cur;
},[])
} else{
this.checkedAllArr = arr;
}
//
if (this.checkedArr.length > 0 && this.checkedArr.length == this.memberList.length) {
this.allChecked = true;
} else {
this.allChecked = false;
}
},
submitAdd(){
let data = {
courseId: this.courseId,
memberIds: this.checkedAllArr
}
if(this.checkedAllArr.length == 0){
uni.showToast({
title:'请选择至少选择一个会员',
icon:'none',
duration:2000
})
return
}
addMembers(data).then((res)=>{
console.log('res',res)
if(res.success){
uni.showToast({
title: "添加成功!"
})
this.getSellerMembers();
this.checkedArr = [];
this.checkedAllArr = [];
} else{
uni.showToast({
title: res.msg,
icon: 'none'
})
}
})
},
}
}
</script>
<style lang="less" scoped>
.member-box {
width: 100%;
padding-bottom: 350rpx;
.search-box {
background: #fff;
width: 100%;
padding: 20rpx 30rpx;
.search-input-box {
width: 100%;
height: 70rpx;
background: #F2F2F2;
font-size: 28rpx;
color: #999999;
border-radius: 25px;
padding-left: 26rpx;
input{
width: 70%;
height: 100%;
margin-left: 20rpx;
}
}
}
.checkAll-box {
margin-bottom: 20rpx;
}
.member-list {
.member-item {
position: relative;
background: #fff;
padding: 28rpx 20rpx 10rpx;
border-radius: 10rpx;
margin-bottom: 20rpx;
.img-box {
width: 100rpx;
height: 100rpx;
margin: 0 20rpx;
margin-top: -20rpx;
image {
width: 100%;
height: 100%;
border-radius: 50px;
}
}
.memberInfo-box {
font-size: 28rpx;
color: #222;
margin-top: -20rpx;
.jifen {
font-size: 24rpx;
color: #fff;
// padding:0 10rpx;
text-align: center;
width: 110rpx;
padding: 0 10rpx;
margin-top: 10rpx;
box-sizing: content-box;
height: 36rpx;
line-height: 36rpx;
background: linear-gradient(180deg, #FFCF61 0%, #FCA333 100%);
box-shadow: 0px 4rpx 8rpx 0rpx rgba(253, 169, 57, 0.19);
border-radius: 20rpx 20rpx 20rpx 0px;
}
.record-box {
margin-top: 22rpx;
}
.course-record {
color: #666;
font-size: 28rpx;
margin-right: 60rpx;
image {
width: 24rpx;
height: 24rpx;
margin-right: 8rpx;
}
}
}
.call-btn {
position: absolute;
right: 28rpx;
top: 28rpx;
width: 120rpx;
height: 60rpx;
line-height: 60rpx;
font-size: 32rpx;
color: #fff;
text-align: center;
background: #F4C076;
border-radius: 30rpx;
}
}
}
/deep/.uni-collapse-cell__title {
background: #fff !important;
}
.footer-box {
background: #fff;
padding: 44rpx;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
.selected-box {
font-size: 28rpx;
color: #999;
.member-name-box{
position: relative;
padding: 10rpx 16rpx;
font-size: 24rpx;
border: 1px solid #FDBF68;
color: #FDBF68;
border-radius: 6rpx;
margin-right: 10rpx;
margin-bottom: 10rpx;
.close{
font-size: 28rpx;
position: absolute;
top: -20rpx;
right: -10rpx;
width: 30rpx;
height: 30rpx;
border-radius: 25px;
color: #fff;
background: #FDBF68;
display: flex;
align-items: center;
justify-content: center;
}
}
image {
width: 60rpx;
height: 60rpx;
margin-right: 10rpx;
margin-bottom: 10rpx;
border-radius: 50px;
}
}
.submit-btn {
width: 646rpx;
height: 80rpx;
text-align: center;
line-height: 80rpx;
color: #fff;
background: #FDBF68;
border-radius: 44rpx;
margin-top: 20rpx;
}
}
}
</style>

406
pages/serviceTeacher/courseDetail.vue

@ -0,0 +1,406 @@
<template>
<view class="index-box">
<view class="swiper-box">
<image :src="detail.imageArr[0]" mode="aspectFill"></image>
</view>
<view class="course-detail-box">
<view class="course-name-box acea-row row-middle">
<view class="state-box colY" v-if="detail.courseState == 0">未开始</view>
<view class="state-box colG" v-if="detail.courseState == 1">进行中</view>
<view class="state-box colR" v-if="detail.courseState == 2">已结束</view>
<view class="state-box default" v-if="detail.courseState == 3">已取消</view>
<view class="name">{{detail.courseName}}</view>
</view>
<view class="desc">{{detail.courseIntroduce}}</view>
</view>
<view class="course-active-box">
<view class="title-box acea-row row-middle">活动时间及地点</view>
<view class="address-box acea-row row-middle">
<!-- <text class="iconfont icon-dizhi"></text> -->
<image src="../../static/dizhi.png" mode=""></image>
<text>{{detail.coursePlace}}</text>
</view>
<view class="address-box acea-row row-middle">
<!-- <text class="iconfont icon-shijian"></text> -->
<image src="../../static/time.png" mode=""></image>
<text>{{detail.courseStartTime}} {{detail.courseEndTime}}</text>
</view>
</view>
<view class="btn-box" :class="isFixedTop?'fixed':''">
<!-- <view class="btn-item">
<image src="../../static/message.png"></image>
<text>一键通知</text>
</view> -->
<view class="btn-item" @click="submitPlace()" v-if="detail.seatArrange == 1">
<image src="../../static/success.png"></image>
<text>保存座位</text>
</view>
<view class="btn-item" @click="toAddMemeber()">
<image src="../../static/addMenber.png"></image>
<text>添加学员</text>
</view>
</view>
<view class="member-list-box">
<view class="title-box acea-row row-between">
<view>学员列表{{detail.courseMemberList.length || 0}}</view>
<view class="title-box-r">
<view @click="showSort = !this.showSort" class="acea-row row-middle">
<image src="../../static/sort-icon.png" mode="" style="width: 48rpx;height:48rpx;margin-right: 10rpx;"></image>
<text>排序</text>
</view>
<view class="sort-box" v-if="showSort">
<view class="sort-item" :class="sortNum == 1 ? 'bgR' : ''" @click.stop="sortClick(1)">未安排/已安排</view>
<view class="sort-item" :class="sortNum == 2 ? 'bgR' : ''" @click.stop="sortClick(2)">签到情况</view>
</view>
</view>
</view>
<view class="member-list">
<view class="member-item" v-for="(item,index) in detail.courseMemberList" :key="index">
<view class="item-top acea-row row-between row-middle">
<view class="member-info acea-row row-middle">
<view class="img-box"><image :src="item.avatar" mode=""></image></view>
<view class="name-box">
<view class="name">{{item.memberName}}</view>
<view class="state" v-if="item.signState == 0">未签到</view>
<view class="state colG" v-if="item.signState == 1">已签到</view>
</view>
</view>
<view class="call" @click="call(item.memberPhone)">拨号</view>
</view>
<view class="item-btm acea-row row-middle">
<view class="dot"></view>
<view class="mrl">座位安排</view>
<input type="text" placeholder="请输入座位信息" :disabled="detail.seatArrange == 2" v-model="item.seat">
<!-- <view class="submit-btn">修改</view> -->
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { getCourseDetail , setMemberSeat } from '@/api/serverTeacher'
import { mapState, mapGetters, mapMutations, mapActions } from 'vuex'
export default{
computed: mapGetters(['userInfo']),
data(){
return {
id:'',
tabInitTop:'',
detail:{
courseStartTime:[],
courseEndTime:[],
},
isFixedTop:false,
showSort:false,
sortNum:null
}
},
onLoad() {
//
uni.createSelectorQuery().select('.btn-box').boundingClientRect((res) => {
if (res && res.top > 0) {
var tabInitTop= res.top;
this.tabInitTop= tabInitTop
}
}).exec();
this.id = this.$yroute.query.id;
this.getDetail();
},
onShow(){
this.getDetail();
},
methods:{
sortClick(type){
this.sortNum = type
console.log(type)
},
onShareAppMessage: function(res) {
return {
title: this.detail.courseName,
imageUrl:this.detail.imageArr[0],
path: '/pages/course/detail?teacherId=' + this.userInfo.uid + '&courseId=' + this.id + '&validCode=' + this.detail.validCode,
}
},
onPageScroll(res) {
let scrollTop = res.scrollTop;
var isSatisfy = scrollTop >= this.tabInitTop? true : false;
//
if (this.isFixedTop === isSatisfy) {
return false;
}
this.isFixedTop = isSatisfy
},
getDetail(){
getCourseDetail(this.id).then(res=>{
if(res.success){
this.detail = res.data
}
})
},
toAddMemeber(){
if(this.detail.courseState == 2 || this.detail.courseState == 3){
uni.showToast({
title:'课程已结束!',
icon:'none'
})
return
}
this.$yrouter.push({
path: '/pages/serviceTeacher/addMember',
query:{
id: this.id
}
})
},
submitPlace(){
let courseMemberList = this.detail.courseMemberList;
if(this.detail.courseState == 2 || this.detail.courseState == 3){
uni.showToast({
title:'课程已结束!',
icon:'none'
})
return
}
setMemberSeat(courseMemberList).then((res)=>{
if(res.success){
uni.showToast({
title:'操作成功!'
});
this.getDetail()
}
})
},
call(phone){
uni.makePhoneCall({
phoneNumber:phone,
})
}
}
}
</script>
<style lang="less" scoped>
.fixed{
position: -webkit-sticky;
position: sticky;
top: 0;
z-index: 99;
}
.index-box{
padding-bottom: 100rpx;
.swiper-box{
width: 100%;
height: 340rpx;
image{
width: 100%;
height: 100%;
}
}
.course-detail-box{
width: 750rpx;
background: #F7F8FC;
border-radius: 60rpx 60rpx 0px 0px;
padding: 46rpx 40rpx;
margin-top: -55rpx;
position: relative;
.course-name-box{
margin-bottom: 24rpx;
.state-box{
height: 44rpx;
line-height: 44rpx;
padding: 0rpx 6rpx;
background: #F4C076;
color: #fff;
border-radius: 4rpx;
font-size: 26rpx;
margin-right: 26rpx;
border-radius: 10rpx;
}
.name{
font-size: 40rpx;
color: #333;
}
}
.desc{
font-size: 24rpx;
color: #333;
line-height: 40rpx;
}
}
.course-active-box{
background: #fff;
padding: 56rpx 40rpx;
font-size: 28rpx;
.title-box{
font-weight: bold;
margin-bottom: 30rpx;
}
.title-box::before{
content: '';
display: block;
width: 6rpx;
height: 28rpx;
background: #F4C076;
margin-right: 20rpx;
}
image{
width: 28rpx;
height: 28rpx;
margin-right: 20rpx;
}
.address-box{
margin-bottom: 10rpx;
color: #222;
}
}
.btn-box{
width: 100%;
display: flex;
justify-content: space-around;
padding: 0rpx 0 40rpx;
background: #fff;
.btn-item{
width: 206rpx;
height: 80rpx;
padding:0 20rpx;
background: #FFFFFF;
border: 1px solid #E4E4E4;
box-shadow: 0px 4px 8px rgba(240, 240, 240, 0.5);
border-radius: 66rpx;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 28rpx;
image{
width: 40rpx;
height: 40rpx;
}
}
}
.member-list-box{
width: 100%;
padding: 0 20rpx;
font-size: 28rpx;
color: #222;
.title-box{
margin: 40rpx 0 28rpx;
.title-box-r{
position: relative;
font-size: 28rpx;
color: #222;
.sort-box{
width: 230rpx;
background: #fff;
padding: 16rpx 20rpx 0;
position: absolute;
bottom: -150rpx;
left: -180rpx;
border-radius: 10rpx;
box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.16);
.sort-item{
padding: 0rpx;
font-size: 20rpx;
height: 42rpx;
line-height: 42rpx;
text-align: center;
color: #B9B9B9;
background: #F5F6F7;
border-radius: 24rpx;
margin-bottom: 16rpx;
}
.bgR{
background: #EB5744;
color: #fff;
}
}
}
}
.member-list{
background-color: #fff;
padding: 0 20rpx;
border-radius: 20rpx;
.member-item{
padding: 28rpx 0;
.item-top{
image{
width: 144rpx;
height: 144rpx;
border-radius: 50px;
margin-right: 20rpx;
}
.name{
font-size: 32rpx;
line-height: 44rpx;
margin-bottom: 12rpx;
}
.state{
width: 112rpx;
height: 40rpx;
background: #EB5744;
border-radius: 23rpx;
line-height: 40rpx;
text-align: center;
color: #fff;
font-size: 24rpx;
}
.signIn-btn{
background: #67FC55;
}
.call{
width: 120rpx;
height: 60rpx;
line-height: 60rpx;
text-align: center;
background: #F4C076;
border-radius: 30rpx;
color: #fff;
}
}
.item-btm{
width: 100%;
height: 90rpx;
border-radius: 10rpx;
background: #F6F6F6;
padding-left: 30rpx;
margin-top: 50rpx;
.dot{
width: 16rpx;
height: 16rpx;
background: #EB5744;
border-radius: 50px;
}
.mrl{
margin: 0 40rpx 0 20rpx;
}
input{
width: 360rpx;
}
.submit-btn{
color: #EB5744;
font-size: 28rpx;
}
}
}
}
}
.default{
background: #B5B5B5 !important;
color: #fff !important;
}
.colY{
background: #E8C77D !important;
color: #fff !important;
}
.colG{
background: #A5CF70 !important;
color: #fff;
}
.colR{
background: #ED5E48 !important;
color: #fff;
}
}
</style>

195
pages/serviceTeacher/courseManagement.vue

@ -0,0 +1,195 @@
<template>
<view class="member-box">
<view class="search-box">
<view class="search-input-box acea-row row-middle">
<text class="iconfont icon-xiazai5"></text>
<input type="text" placeholder="请输入课程名称">
</view>
</view>
<view class="tabs-box acea-row row-middle row-between">
<view class="tab-item" :class="active == 1 ? 'tab-item-active' : ''" @click="tabClick(1)">未完成</view>
<view class="tab-item" :class="active == 2 ? 'tab-item-active' : ''" @click="tabClick(2)">已完成</view>
</view>
<view class="course-list-box">
<view class="course-item acea-row-nowrap row-between"
v-for="(item,index) in courseList"
:key="index"
@click="toCourdeDetail(item.id)"
>
<view class="item-l">
<view class="name line1">{{item.courseName}}</view>
<view class="desc line2">{{item.courseIntroduce}}</view>
<view class="time">时间{{(item.courseStartTime.split(' ')[0]).replace(/\-/g, '.')}} {{(item.courseEndTime.split(' ')[0]).replace(/\-/g,'.')}}</view>
<view class="time">地点{{item.coursePlace}}</view>
<view class="time">报名总人数{{item.courseEnterPerson}}</view>
</view>
<view class="item-r acea-row row-column row-between">
<view class="img-box">
<image :src="item.imageArr[0]" mode="aspectFill"></image>
</view>
<view class="state-box">
<view class="tip">{{item.signedNum}}/{{item.realEnterPerson}}</view>
<view class="handle-btn default" v-if="item.courseStateSeller == 0">未开始</view>
<view class="handle-btn" v-if="item.courseStateSeller == 1">报名中</view>
<view class="handle-btn" v-if="item.courseStateSeller == 2">签到中</view>
<view class="handle-btn default" v-if="item.courseStateSeller == 3">已结束</view>
<view class="handle-btn default" v-if="item.courseStateSeller == 4">已取消</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { sellerCourses } from "@/api/serverTeacher"
export default{
data(){
return {
active: 1,
courseList:[],
}
},
onLoad() {
this.getList();
},
methods:{
getList(){
sellerCourses({type:this.active}).then((res)=>{
this.courseList = res.data
})
},
tabClick(idx){
this.active = idx;
this.getList();
},
toCourdeDetail(id){
this.$yrouter.push({
path: '/pages/serviceTeacher/courseDetail',
query:{
id: id
}
})
}
}
}
</script>
<style lang="less" scoped>
.member-box{
width: 100%;
.search-box{
background: #fff;
width: 100%;
padding: 20rpx 30rpx;
.search-input-box{
width: 100%;
height: 70rpx;
background: #F2F2F2;
font-size: 28rpx;
color: #999999;
border-radius: 25px;
padding-left: 26rpx;
.iconfont{
margin-right: 12rpx;
}
input{
height: 100%;
}
}
}
.tabs-box{
border-top: 1px solid #d8d8d8;
width: 100%;
height: 90rpx;
padding: 0 122rpx;
background-color: #fff;
color: #999;
font-size: 32rpx;
.tab-item{
height: 100%;
line-height: 90rpx;
border-bottom: 6rpx solid #fff;
text-align: center;
}
.tab-item-active{
color: #222;
height: 100%;
line-height: 90rpx;
border-bottom: 4rpx solid #f4c076;
font-weight: bold;
}
// .tab-item-active::after{
// content: '';
// display: block;
// width: 124rpx;
// height: 6rpx;
// background: #F4C076;
// border-radius: 3rpx;
// position: absolute;
// bottom: 0;
// }
}
.course-list-box{
width: 100%;
padding: 20rpx;
.course-item{
width: 100%;
padding: 24rpx;
background: #fff;
border-radius: 10rpx;
margin-bottom: 22rpx;
.item-l{
width: 70%;
font-size: 28rpx;
color: #222;
.name{
font-size: 32rpx;
color: #333;
line-height: 44rpx;
font-weight: bold;
}
.desc{
color: #999;
line-height: 36rpx;
margin-top: 20rpx;
margin-bottom: 60rpx;
}
.time{
line-height: 34rpx;
margin-bottom: 4rpx;
}
}
.item-r{
image{
width: 180rpx;
height: 180rpx;
border-radius: 12rpx;
}
.tip{
width: 156rpx;
font-size: 24rpx;
color: #786133;
text-align: center;
margin: 20rpx 0 0;
}
.handle-btn{
width: 156rpx;
height: 60rpx;
background: #FEF2D9;
border-radius: 12rpx;
text-align: center;
line-height: 60rpx;
color: #786133;
font-size: 32rpx;
margin: 0rpx auto;
}
.default{
background: #F6F6F6;
color: #666;
}
}
}
}
}
</style>

121
pages/serviceTeacher/index.vue

@ -0,0 +1,121 @@
<template>
<view class="index-box">
<view class="back-home-btn" @click="toUserIndex"><image src="../../static/backhome-icon.png" ></image></view>
<view class="userInfo-box acea-row row-column row-center-wrapper">
<view class="headerimg-box">
<image :src="userInfo.avatar" mode="aspectFill" v-if="userInfo.isPromoter == 0"></image>
<image :src="userInfo.workPhoto" mode="aspectFill" v-else></image>
</view>
<view class="name">{{userInfo.realName || userInfo.nickname}}</view>
<text class="iconfont icon-bianji1" @click.stop="eidtInfo()"></text>
</view>
<view class="btn-box acea-row row-center row-middle" @click="toSetSelfData" v-if="userInfo.isPromoter == 0">请先完善个人信息</view>
<view class="btn-box acea-row row-center row-middle" @click="toCourseManagement" v-if="userInfo.isPromoter == 1">
<image src="../../static/kecheng-icon.png" mode=""></image>
<text>课程管理</text>
</view>
<view class="btn-box acea-row row-center row-middle" @click="toMemberManagement" v-if="userInfo.isPromoter == 1">
<image src="../../static/vipmanage-icon.png" mode=""></image>
<text>会员管理</text>
</view>
</view>
</template>
<script>
import { mapState, mapGetters, mapMutations, mapActions } from 'vuex'
import { getUserInfo, getMenuUser, bindingPhone, wxappBindingPhone } from '@/api/user'
export default{
computed: mapGetters(['userInfo']),
data(){
return {
}
},
onLoad(){
console.log(this.userInfo)
},
methods:{
toUserIndex () {
this.$yrouter.switchTab({
path: '/pages/home/index',
})
},
eidtInfo(){
this.$yrouter.push({
path: '/pages/serviceTeacher/setSelfData'
})
},
toSetSelfData(){
this.$yrouter.push({
path: '/pages/serviceTeacher/setSelfData'
})
},
toCourseManagement(){
this.$yrouter.push({
path: '/pages/serviceTeacher/courseManagement'
})
},
toMemberManagement(){
this.$yrouter.push({
path: '/pages/serviceTeacher/memberManagement'
})
},
}
}
</script>
<style lang="less" scope>
.index-box{
width: 100%;
height: 100vh;
background: #F5F6F7;
font-size: 32rpx;
color: #222;
position: relative;
background: url(https://www.cyjyyjy.com:8081/static/teacher-index-bg.png);
background-size: cover;
.back-home-btn{
width: 80rpx;
height: 80rpx;
position: absolute;
right: 30rpx;
top: 30rpx;
image{
width: 100%;
height: 100%;
}
}
.userInfo-box{
.headerimg-box{
width: 156rpx;
height: 156rpx;
border-radius: 50px;
border: 8rpx solid #d9d9d9;
overflow: hidden;
margin: 150rpx 0 30rpx;
image{
width: 100%;
height: 100%;
border-radius: 50rpx;
}
}
.name{
margin-bottom: 12rpx;
}
}
.btn-box{
width: 590rpx;
height: 264rpx;
background-color: #fff;
border-radius: 10rpx;
font-size: 38rpx;
margin: 60rpx auto;
image{
width: 104rpx;
height: 104rpx;
margin-right: 40rpx;
}
}
}
</style>

203
pages/serviceTeacher/memberDabang.vue

@ -0,0 +1,203 @@
<template>
<view class="dabang-index">
<view class="top-box">
<view class="dabang-name">{{studyListDto.listName}}</view>
<view class="time-box acea-row row-column">
<text>时间{{studyListDto.listStartTime.split(' ')[0]}} {{studyListDto.listEndTime.split(' ')[0]}}{{studyListDto.clockTimes}}</text>
<text>进行中{{studyListDto.signTimes}}/{{studyListDto.clockTimes}}</text>
<view class="sanjiao"></view>
</view>
</view>
<!-- <view class="join-num">参与人数{{detail.enterNum}}</view> -->
<!-- 打榜分享 -->
<view class="dabang-share-box">
<view class="dabang-share-item" v-for="(item,index) in dataList" :key="index">
<view class="user-info-box acea-row row-middle">
<view class="header-img">
<image :src="item.avatar" mode=""></image>
</view>
<view class="acea-row row-column row-center">
<view class="name">{{item.realName}}</view>
<view class="create-time">{{item.recordTime}}</view>
</view>
</view>
<view class="share-word">
{{item.content}}
</view>
<view class="img-box acea-row">
<image :src="imgUrl" mode="aspectFill" v-for="(imgUrl,idx) in item.imgPaths" :key="idx"></image>
</view>
<view class="zan-box acea-row row-middle row-right" @click="voteClick(item)">
<image src="../../static/zan.png" v-if="!item.isVote"></image>
<image src="../../static/like.png" v-else></image>
<text class="zan-conunt">{{item.voteNum}}</text>
</view>
</view>
</view>
</view>
</template>
<script>
import { studyListVote} from '@/api/knowledge';
import { myMemberStudylist} from '@/api/serverTeacher';
export default{
data(){
return {
active: 0,
studyId: '',
memberId:'',
studyListDto:{},
dataList:[]
}
},
onLoad() {
this.studyId = this.$yroute.query.studyId;
this.memberId = this.$yroute.query.memberId;
console.log( this.$yroute.query.studyId)
console.log( this.$yroute.query.memberId)
this.myMemberStudylist();
},
methods:{
myMemberStudylist(){
myMemberStudylist({memberId:this.memberId,studyId:this.studyId}).then((res)=>{
if(res.success){
this.studyListDto = res.data.studyListDto
this.dataList = res.data.recordDtos;
uni.stopPullDownRefresh();
}
})
},
voteClick(item){
let id = item.id,
voteNum = item.voteNum,
isVote = !item.isVote;
this.dataList.map((item)=>{
if(item.id == id){
if(item.isVote){
item.voteNum = item.voteNum - 1
} else{
item.voteNum = item.voteNum + 1
}
item.isVote = !item.isVote
}
})
let data = {
"studylistRecordId": id,
"type": isVote ? '1' : '0'
}
studyListVote(data).then((res)=>{
if(res.success){
uni.showToast({
title: '操作成功!'
})
}
})
},
tabClick(idx){
this.active = idx;
},
onPullDownRefresh() {
this.myMemberStudylist();
}
}
}
</script>
<style lang="less" scoped>
.dabang-index{
min-height: 100vh;
background: #fff;
padding-bottom: 100rpx;
.top-box{
width: 100%;
height: 344rpx;
background: linear-gradient(135deg, #E5B964 0%, #CE9F45 100%);
box-sizing: border-box;
padding: 40rpx 0;
color: #fff;
position: relative;
.dabang-name{
width: 80%;
font-size: 50rpx;
font-weight: 600;
color: #FFFFFF;
line-height: 72rpx;
margin: 40rpx auto;
}
.time-box{
width: 100%;
background: rgba(0,0,0,.1);
font-size: 28rpx;
padding: 20rpx 20rpx;
position: absolute;
bottom: 0;
text{
display: inline-block;
margin:6rpx 0;
}
}
.sanjiao{
width:0;
height:0;
border-right:14rpx solid transparent;
border-left:14rpx solid transparent;
border-bottom:16rpx solid #fff;
position: absolute;
left: 50%;
bottom: 0;
transform: translateX(-50%);
}
}
.dabang-share-box{
width: 100%;
padding: 30rpx;
.dabang-share-item{
color: #222;
padding:20rpx 0;
border-bottom: 1px solid #ececec;
.header-img{
width: 76rpx;
height: 76rpx;
border-radius: 50%;
overflow: hidden;
margin-right: 10rpx;
}
.name{
font-size: 28rpx;
line-height: 40rpx;
}
.create-time{
font-size: 24rpx;
color: #999;
line-height: 34rpx;
}
.share-word{
font-size: 28rpx;
line-height: 46rpx;
margin: 22rpx 0 30rpx;
}
.img-box{
image{
width: 224rpx;
height: 206rpx;
margin-right: 10rpx;
border-radius: 10rpx;
}
}
.zan-box{
margin-top: 20rpx;
image{
width: 30rpx;
height: 32rpx;
margin-right: 20rpx;
}
}
}
}
image{
width: 100%;
height: 100%;
}
}
</style>

248
pages/serviceTeacher/memberDetail.vue

@ -0,0 +1,248 @@
<template>
<view class="member-box">
<view class="member-info-box acea-row row-middle row-between">
<view class="info-l acea-row">
<view><image :src="member.avatar"></image></view>
<view class="name-box">
<view class="acea-row row-middle mt26">
<view class="name">{{member.realName}}</view>
<view class="vip-box">{{member.level}}级会员</view>
</view>
<view class="acea-row">
<!-- <view class="tips-box">湖北 武汉</view> -->
<view class="tips-box">{{member.integral}}积分</view>
</view>
</view>
</view>
<view class="call-btn" @click="call">拨号</view>
</view>
<view class="tab-box acea-row row-around" :class="isFixedTop?'fixed':''">
<view class="tab-item" :class="active == '0' ? 'tab-item-active' : ''" @click="handelScroll('0')">课程({{detail.cyCourseDtos.length}})</view>
<view class="tab-item" :class="active == '1' ? 'tab-item-active' : ''" @click="handelScroll('1')">打榜({{detail.studyListDtos.length}})</view>
</view>
<view class="content-box" v-if="active == 0">
<view class="course-list-box">
<view class="course-item" v-for="item in detail.cyCourseDtos" :key="item" @click="toCourseDetail(item.id)">
<view class="top-box acea-row row-between">
<view class="top-l-box">
<view class="name line1">{{item.courseName}}</view>
<view class="time-box">时间{{item.courseStartTime.split(' ')[0]}} {{item.courseEndTime.split(' ')[0]}}</view>
<view class="time-box">地点{{item.coursePlace}}</view>
</view>
<view class="state-box" v-if="item.signState == 0">未签到</view>
<view class="state-box" v-if="item.signState == 1">已签到</view>
<view class="state-box" v-if="item.signState == 2">签到未开放</view>
<view class="state-box" v-if="item.signState == 3">缺席</view>
<view class="state-box" v-if="item.signState == 4">课程已取消</view>
</view>
<view class="btm-box">座位:{{item.seat || '暂未安排座位'}}</view>
</view>
</view>
</view>
<view class="dabang-list-box" v-else>
<view class="dabang-item" v-for="(item,index) in detail.studyListDtos" @click="bangdanDetail(item.id)">
<view class="dabang-info">
<view class="bangdan-name line1">{{item.listName}}</view>
<view class="time">{{item.listStartTime.split(' ')[0]}}-{{item.listEndTime.split(' ')[0]}}</view>
<view class="time">{{item.integral}}积分</view>
</view>
<view class="dabang-btm colR acea-row row-between-wrapper" v-if="item.listState == 2">
<view>{{item.signState == 2 ? '+' : '-'}} {{item.integral}}积分</view>
<view v-if="item.signState == 2">打榜成功 {{item.signTimes}}/{{item.clockTimes}}</view>
<view v-if="item.signState == 3">打榜失败 {{item.signTimes}}/{{item.clockTimes}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { getMemberDetail } from "@/api/serverTeacher"
export default{
data(){
return {
active: 0,
member:{},
detail:{}
}
},
onLoad() {
this.member = JSON.parse(decodeURIComponent(this.$yroute.query.item));
// this.uid = this.$yroute.query.uid;
this.getDetail()
},
methods:{
toCourseDetail(id){
this.$yrouter.push({
path: '/pages/serviceTeacher/courseDetail',
query:{
id: id
}
})
},
getDetail(){
getMemberDetail({uid:this.member.uid}).then((res)=>{
if(res.success){
this.detail = res.data
}
})
},
bangdanDetail(id){
this.$yrouter.push({
path:'/pages/serviceTeacher/memberDabang',
query:{
studyId: id,
memberId:this.member.uid
}
})
},
handelScroll(idx){
this.active = idx
},
call(){
uni.makePhoneCall({
phoneNumber:this.member.phone
})
},
}
}
</script>
<style lang="less" scoped>
.member-box{
.member-info-box{
padding: 36rpx 30rpx 50rpx;
background: #fff;
.info-l{
image{
width: 124rpx;
height: 124rpx;
border-radius: 50px;
margin-right: 30rpx;
}
.name-box{
font-size: 24rpx;
.mt26{
margin-bottom: 26rpx;
}
.name{
font-size: 36rpx;
color: #222;
}
.vip-box{
// width: 100rpx;
height: 36rpx;
line-height: 36rpx;
text-align: center;
padding: 0 10rpx;
color: #fff;
background: linear-gradient(180deg, #FFCF61 0%, #FCA333 100%);
box-shadow: 0px 4rpx 8rpx 0px rgba(253,169,57,0.19);
border-radius: 20rpx 20rpx 20rpx 0px;
margin-left: 10rpx;
}
.tips-box{
padding: 4rpx 12rpx;
height: 40rpx;
background: #FFF5E6;
border-radius: 23rpx;
color: #FFA726;
font-size: 24rpx;
margin-right: 16rpx;
}
}
}
.call-btn{
width: 120rpx;
height: 60rpx;
line-height: 60rpx;
font-size: 32rpx;
color: #fff;
text-align: center;
background: #F4C076;
border-radius: 30rpx;
}
}
.tab-box{
white-space: nowrap;
width: 100%;
background: #fff;
padding: 18rpx 34rpx 0;
.tab-item{
width: 50%;
text-align: center;
display: inline-block;
padding-bottom: 26rpx;
font-size: 32rpx;
color: #222;
}
.tab-item-active{
font-weight: bold;
border-bottom: 4rpx solid #EB5744;
}
}
.content-box{
padding: 30rpx;
.course-list-box{
.course-item{
background: #fff;
padding: 30rpx;
color: #333;
font-size: 24rpx;
border-radius: 10px;
margin-bottom: 30rpx;
.name{
font-size: 32rpx;
margin-bottom: 20rpx;
}
.state-box{
min-width: 152rpx;
height: 52rpx;
background: #FEF2D9;
border-radius: 4rpx;
border: 1px solid #D89200;
text-align: center;
line-height: 52rpx;
color: #695121;
}
.btm-box{
padding-top: 20rpx;
border-top: 1px solid #ececec;
margin-top: 20rpx;
}
}
}
}
.dabang-list-box{
width: 100%;
padding: 0 32rpx;
.dabang-item{
width: 100%;
background: #fff;
color: #fff;
margin-top: 28rpx;
font-size: 28rpx;
border-radius: 10rpx;
overflow: hidden;
.dabang-info{
height: 200rpx;
padding-left: 24rpx;
padding-top: 24rpx;
background: linear-gradient(148deg, #B4B6C4 0%, #C5CAD6 100%);
.bangdan-name{
font-size: 50rpx;
line-height: 80rpx;
}
}
.dabang-btm{
padding: 0 56rpx 0 24rpx;
height: 80rpx;
color: #8FB85B;
}
.colR{
color:#EB5744;
}
}
}
}
</style>

185
pages/serviceTeacher/memberManagement.vue

@ -0,0 +1,185 @@
<template>
<view class="member-box">
<view class="search-box">
<view class="search-input-box acea-row row-middle">
<text class="iconfont icon-xiazai5"></text>
<input type="text" placeholder="请输入会员真实姓名">
</view>
</view>
<uni-collapse accordion="true" @change="openChange()">
<uni-collapse-item
:title="`${item.levelName} (${item.memberNum})`"
:show-animation="true"
ref="add"
v-for="(item,index) in levelList"
:key="index"
style="border-top: 1px solid #f3f3f3;">
<view style="padding: 20rpx;">
<view class="member-list">
<view class="member-item acea-row" v-for="(member,idx) in memberList" :key="idx" @click="toMemberDetail(member)">
<view class="img-box"><image :src="member.avatar" mode="aspectFill"></image></view>
<view class="memberInfo-box">
<view class="name">{{member.realName}}</view>
<view class="jifen">{{member.integral}}积分</view>
<view class="record-box acea-row">
<view class="course-record">
<image src="../../static/kecheng-icon2.png"></image>
<text>课程 {{member.finishCourseNum}}/{{member.enterCourseNum}}</text>
</view>
<view class="course-record">
<image src="../../static/dabang-icon.png"></image>
<text>打榜 {{member.finishStudylistNm}}/{{member.enterStudylistNum}}</text>
</view>
</view>
</view>
<view class="call-btn" @click.stop="call(member.phone)">拨号</view>
</view>
</view>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
</template>
<script>
import { getMyMemberLevels , getSellerMembers } from "@/api/serverTeacher"
export default{
data(){
return {
levelList:[],
memberList: []
}
},
onLoad() {
this.getMyMemberLevels()
// this.getList()
},
methods:{
getMyMemberLevels(){
getMyMemberLevels().then(res=>{
if(res.success){
this.levelList = res.data
}
})
},
openChange(e){
this.memberList = [];
if(e.length > 0){
uni.showLoading({
title: '正在加载中...'
})
let level = this.levelList[e[0]].level;
getSellerMembers({level:level}).then((res)=>{
uni.hideLoading()
if(res.success){
this.memberList = res.data
}
})
}
},
getList(){
getSellerMembers().then((res)=>{
if(res.success){
this.memberList = res.data
}
})
},
toMemberDetail(item){
console.log(item)
this.$yrouter.push({
path:'/pages/serviceTeacher/memberDetail',
query:{
item: encodeURIComponent(JSON.stringify(item))
}
})
},
call(phone){
uni.makePhoneCall({
phoneNumber:phone
})
}
}
}
</script>
<style lang="less" scoped>
.member-box{
width: 100%;
.search-box{
background: #fff;
width: 100%;
padding: 20rpx 30rpx;
.search-input-box{
width: 100%;
height: 70rpx;
background: #F2F2F2;
font-size: 28rpx;
color: #999999;
border-radius: 25px;
padding-left: 26rpx;
.iconfont{
margin-right: 12rpx;
}
input{
height: 100%;
}
}
}
.member-list{
.member-item{
position: relative;
background: #fff;
padding: 28rpx 20rpx;
border-radius: 10rpx;
margin-bottom: 20rpx;
.img-box{
width: 144rpx;
height: 144rpx;
margin-right: 20rpx;
image{
width: 144rpx;
height: 144rpx;
border-radius: 50px;
}
}
.memberInfo-box{
font-size: 32rpx;
color: #222;
.jifen{
font-size: 24rpx;
color: #EB5744;
}
.record-box{
margin-top: 22rpx;
}
.course-record{
color: #666;
font-size: 28rpx;
margin-right: 60rpx;
image{
width: 24rpx;
height: 24rpx;
margin-right: 8rpx;
}
}
}
.call-btn{
position: absolute;
right: 28rpx;
top: 28rpx;
width: 120rpx;
height: 60rpx;
line-height: 60rpx;
font-size: 32rpx;
color: #fff;
text-align: center;
background: #F4C076;
border-radius: 30rpx;
}
}
}
/deep/.uni-collapse-cell__title{
background: #fff !important;
}
}
</style>

324
pages/serviceTeacher/setSelfData.vue

@ -0,0 +1,324 @@
<template>
<view class="index-box">
<view class="upload-img-box">
<view class="label-box">
<view class="label-l acea-row-nowrap row-middle">
<text class="label">工作照</text>
<text class="sm-word">请上传正面免冠半身照图像大小不超过200kb</text>
</view>
<view class="label-r acea-row row-middle">
<view class="img-box" @tap="chooseImage">
<image :src="form.imgPath == '' ? '../../static/default-headerimg.png' : form.imgPath " mode=""></image>
</view>
<text class="iconfont icon-jiantou"></text>
</view>
</view>
</view>
<view class="form-box">
<view class="form-item acea-row row-middle row-between">
<view class="label">姓名</view>
<view class="input-box acea-row row-middle">
<input type="text" v-model="form.realName" placeholder="请输入真实姓名" />
<text class="iconfont icon-jiantou"></text>
</view>
</view>
<view class="form-item acea-row row-middle row-between">
<view class="label">注册口令</view>
<view class="input-box acea-row row-middle">
<input type="text" v-model="form.code" placeholder="请输入注册口令" />
<text class="iconfont icon-jiantou"></text>
</view>
</view>
<view class="form-item acea-row row-middle row-between ">
<view class="label">性别</view>
<view class="input-box acea-row row-middle">
<radio-group @change="radioChange">
<label class="radio">
<radio value="0" color="#E5270F" style="transform:scale(0.7)" :checked="form.gender == 0" /><text></text>
</label>
<label class="radio">
<radio value="1" color="#E5270F" style="transform:scale(0.7)" :checked="form.gender == 1" /><text></text>
</label>
</radio-group>
</view>
</view>
<view class="form-item acea-row row-middle row-between">
<view class="label">手机号</view>
<view class="input-box acea-row row-middle">
<input type="text" v-model="form.phone" maxlength="11" @blur="editPhone(form.phone)" placeholder="请输入手机号" />
<text class="iconfont icon-jiantou"></text>
</view>
</view>
<view class="form-item acea-row row-middle row-between no-border">
<view class="label">验证码</view>
<view class="acea-row row-middle ">
<view class="input-box acea-row row-middle">
<input type="text" v-model="form.verifyCode" maxlength="6" placeholder="请输入短信验证码" />
</view>
<view class="countdown" :class="disabled ? 'default' : ''" @click="sendCode">
{{disabled ? second + '秒后重新发送' : '发送验证码'}}
</view>
</view>
</view>
</view>
<view class="submit-btn" @click="submitClick">{{userInfo.isPromoter == 1 ? '保存修改' : '保存'}}</view>
</view>
</template>
<script>
import { chooseImage } from "@/utils";
import { editSelfData , getVerificationCode } from "@/api/serverTeacher"
import { mapState, mapGetters, mapMutations, mapActions } from 'vuex'
export default{
computed: mapGetters(['userInfo']),
data(){
return {
disabled: false,
second: 60,
time:null,
form: {
imgPath:'',
realName:'',
code:'',
gender: 0,
phone: '',
verifyCode:''
}
}
},
onLoad(){
if(this.userInfo.isPromoter == 1){
let info = this.userInfo;
this.form.imgPath = info.workPhoto;
this.form.realName = info.realName;
this.form.gender = info.gender;
this.form.phone = info.phone;
}
},
methods:{
sendCode(){
var reg=/^1[3456789]\d{9}$/;
if (this.form.phone === '') {
uni.showModal({
title: '手机号码不能为空',
type: 'none'
});
return
} else if(!reg.test(this.form.phone)){
uni.showModal({
title: '请输入有效的手机号码',
type: 'none'
});
return
} else{
getVerificationCode({phone:this.form.phone}).then((res)=>{
if(res.success){
uni.showToast({
title:'短信已发送!'
})
if(this.disabled == false){
clearInterval(this.timer)
this.disabled = true;
this.timer = setInterval(()=>{ //
this.timeup()
},1000);
}
} else{
uni.showToast({
title:res.msg,
icon:'none'
})
}
})
}
},
timeup(){
this.second = this.second - 1;
if (this.second == 0) {
this.second = 60;
this.disabled = false
clearInterval(this.timer)
return;
}
},
chooseImage() {
chooseImage((img) => {
this.form.imgPath = img;
});
},
radioChange(e){
// console.log(e)
this.form.gender = e.detail.value
},
editPhone(phone){
if (phone === '') {
uni.showModal({
title: '手机号码不能为空',
type: 'none'
});
}
else {
if (phone !== '') {
var reg=/^1[3456789]\d{9}$/;
if(!reg.test(phone)){
uni.showModal({
title: '请输入有效的手机号码',
type: 'none'
});
}
}
}
},
submitClick(){
if(this.form.imgPath == ''){
uni.showModal({
title: '请上传工作照',
type: 'none'
});
return
} else if(this.form.realName == ''){
uni.showModal({
title: '请输入真实姓名',
type: 'none'
});
return
} else if(this.form.code == ''){
uni.showModal({
title: '请输入注册口令',
type: 'none'
});
return
} else if(this.form.phone == ''){
uni.showModal({
title: '请输入手机号',
type: 'none'
});
return
} else if(!(/^1[3456789]\d{9}$/.test(this.form.phone))){
uni.showModal({
title: '请输入正确手机号',
type: 'none'
});
return
} else if(this.form.verifyCode == ''){
uni.showModal({
title: '请输入手机短信验证码',
type: 'none'
});
return
}
editSelfData(this.form).then((res)=>{
if(res.success){
this.$store.dispatch("userInfo", true);
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000,
});
setTimeout(()=>{
this.$yrouter.back();
},2000)
} else{
uni.showToast({
title:res.msg,
icon:'none',
duration:2000
})
}
})
},
}
}
</script>
<style lang="less" scoped>
.index-box{
width: 100%;
height: 100vh;
background-color: #fff;
padding: 0 30rpx;
font-size: 32rpx;
color: #222;
.upload-img-box{
width: 100%;
padding: 40rpx 0;
}
.label-box{
display: flex;
justify-content: space-between;
.label{
width: 110rpx;
}
.sm-word{
width: 270rpx;
font-size: 24rpx;
color: #999;
margin-left: 12rpx;
}
}
.label-r{
.img-box{
border-radius: 50px;
overflow: hidden;
image{
width: 116rpx;
height: 116rpx;
border-radius: 50px;
}
}
.iconfont{
color: #999;
margin-left: 12rpx;
}
}
.form-box{
.form-item{
padding: 30rpx 0;
border-bottom: 1px solid #ececec;
.input-box{
input{
text-align: right;
margin-right: 12rpx;
}
.radio{
margin-left: 20rpx;
}
}
}
.no-border{
border: none;
}
.countdown{
min-width: 140rpx;
height: 70rpx;
padding: 0 10rpx;
font-size: 24rpx;
background-color: #E2B35D;
color: #fff;
line-height: 70rpx;
text-align: center;
border-radius: 10rpx;
}
.default{
background: #999;
color: #fff;
}
}
.submit-btn{
width: 646rpx;
height: 80rpx;
text-align: center;
line-height: 80rpx;
background: #F4C076;
border-radius: 44rpx;
color: #fff;
position: absolute;
bottom: 100rpx;
left: 50%;
margin-left: -320rpx;
}
}
</style>

71
pages/shop/GoodsClass/index.vue

@ -1,5 +1,8 @@
<template>
<view class="productSort">
<view class="cart-btn-box" @click="goShoppingCart()">
<text class="iconfont icon-gouwuche1"></text>
</view>
<div class="index">
<view class="header acea-row row-center-wrapper">
<view @click="goGoodSearch()" class="search acea-row row-middle">
@ -7,7 +10,7 @@
</view>
</view>
</div>
<view class="banner-box">
<!-- <view class="banner-box">
<swiper class="swiper-box" :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000">
<swiper-item>
<view class="swiper-item">1</view>
@ -16,39 +19,39 @@
<view class="swiper-item">2</view>
</swiper-item>
</swiper>
</view>
</view> -->
<view class="userInfo-box acea-row row-between row-middle">
<view class="userInfo-l acea-row row-center-wrapper">
<image src="../../../static/img1.png"></image>
<view class="userInfo">
<view>亲爱的下午好</view>
<view class="name">慵懒的猫</view>
<view>亲爱的{{getTime()}}</view>
<view class="name">{{userInfo.nickname}}</view>
</view>
</view>
<view class="userInfo-r">
<view>
<text>2000</text>积分
<text>{{userInfo.integral}}</text>积分
</view>
<view class="tips">您还有积分未使用</view>
<view class="tips">您还有{{userInfo.integral}}积分未使用</view>
</view>
</view>
<view class="goods-list-box">
<view class="goods-list-item">
<view class="goods-list-item" v-for="item in category" :key="item.id" v-if="item.children[0].products.length>0">
<view class="goods-type-box acea-row row-center row-middle">
<view class="icon-l"><image src="../../../static/titleL-icon.png"></image></view>
<view class="t-word">禅意能量</view>
<view class="t-word">{{item.children[0].cateName}}</view>
<view class="icon-l"><image src="../../../static/titleR-icon.png"></image></view>
</view>
<view class="goods-list acea-row">
<view class="goods-item" @click="toGoodsDetail(1)">
<image src="../../../static/img1.png"></image>
<view class="goods-item" v-for="goods in item.children[0].products" :key="goods.id" @click="toGoodsDetail(goods.id)">
<image :src="goods.image"></image>
<view class="goods-desc-box">
<view class="goods-name">禅易香囊 纯手工制作提神</view>
<view class="price">199+100积分</view>
<view class="buy-count">51人购买</view>
<view class="goods-name line1">{{goods.storeName}}</view>
<view class="price">{{goods.price}}+{{goods.giveIntegral}}积分</view>
<view class="buy-count">已出售{{goods.sales}}{{goods.unitName}}</view>
</view>
</view>
<view class="goods-item">
<!-- <view class="goods-item">
<image src="../../../static/img1.png"></image>
<view class="goods-desc-box">
<view class="goods-name">禅易香囊 纯手工制作提神</view>
@ -71,7 +74,7 @@
<view class="price">199+100积分</view>
<view class="buy-count">51人购买</view>
</view>
</view>
</view> -->
</view>
</view>
</view>
@ -114,12 +117,12 @@
</view>
</template>
<script>
import { getCategory } from "@/api/store";
import { getCategory , getProducts } from "@/api/store";
import { trim } from "@/utils";
import { mapGetters } from 'vuex'
export default {
name: "GoodsClass",
components: {},
computed: mapGetters(['userInfo']),
props: {},
data: function() {
return {
@ -141,7 +144,22 @@ export default {
this.loadCategoryData();
},
methods: {
goGoodSearch() {
getTime() {
let hour = new Date().getHours();
if(0<hour&&hour<12) {
return '早上好';
} else if(12<=hour&&hour<13) {
return '中午好';
} else if(13<=hour&&hour<18) {
return '下午好';
} else {
return '晚上好'
}
},
goShoppingCart() {
this.$yrouter.push('/pages/shop/ShoppingCart/index')
},
goGoodSearch() {
this.$yrouter.push("/pages/shop/GoodSearch/index");
},
goGoodsList(child) {
@ -202,7 +220,21 @@ export default {
.productSort {
height: 100%;
background: #F5F6F7 !important;
position: relative;
.cart-btn-box{
position: fixed;
top: 90%;
right: 16rpx;
width: 60rpx;
height: 60rpx;
background: #fff;
border-radius: 50px;
text-align: center;
line-height: 60rpx;
font-weight: bold;
}
}
.index{
height: 96rpx;
}
@ -226,6 +258,7 @@ export default {
font-size: 28rpx;
color: #222;
background: #fff;
margin: 20rpx 0;
.userInfo-l{
image{
width: 80rpx;

27
pages/shop/GoodsCon/index.vue

@ -10,13 +10,14 @@
<view class="money font-color-red" v-if="!isIntegral">
<text></text>
<text class="num">{{ attr.productSelect.price || storeInfo.price }}</text>
<text class="vip-money" v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0">{{ attr.productSelect.vipPrice || storeInfo.vipPrice }}</text>
<image :src="`${$VUE_APP_RESOURCES_URL}/images/vip.png`" class="image" v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0" />
<!-- <text class="vip-money" v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0">{{ attr.productSelect.vipPrice || storeInfo.vipPrice }}</text> -->
<text class="vip-money">+{{storeInfo.giveIntegral}}积分</text>
<!-- <image :src="`${$VUE_APP_RESOURCES_URL}/images/vip.png`" class="image" v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0" /> -->
</view>
<view class="money font-color-red" v-if="isIntegral">
<text class="num">{{ attr.productSelect.integral || storeInfo.integral }}积分</text>
</view>
<view class="iconfont icon-fenxiang" @click="listenerActionSheet"></view>
<!-- <view class="iconfont icon-fenxiang" @click="listenerActionSheet"></view> -->
</view>
<view class="introduce">{{ storeInfo.storeName }}</view>
<view class="label acea-row row-between-wrapper">
@ -128,27 +129,27 @@
<!-- 操作栏 -->
<view class="footer acea-row row-between-wrapper">
<!-- #ifdef MP-WEIXIN -->
<view class="item">
<!-- <view class="item">
<button open-type="contact" class="contacButton">
<view style="padding-bottom: 8rpx" class="item">
<view class="iconfont icon-kefu"></view>
<text>客服</text>
</view>
</button>
</view>
</view> -->
<!-- #endif -->
<view class="item" @click="goHome">
<view class="item acea-row row-column row-center-wrapper" @click="goHome">
<view class="iconfont icon-shouye-xianxing"></view>
<text>首页</text>
</view>
<view class="item" @click="setCollect" v-if="storeInfo.userCollect">
<view class="item acea-row row-column row-center-wrapper" @click="setCollect" v-if="storeInfo.userCollect">
<view class="iconfont icon-shoucang1"></view>
<text>收藏</text>
</view>
<view class="item" @click="setCollect" v-if="!storeInfo.userCollect">
<!-- <view class="item" @click="setCollect" v-if="!storeInfo.userCollect">
<view class="iconfont icon-shoucang"></view>
<text>收藏</text>
</view>
</view> -->
<view @click="goShoppingCart()" v-if="animated" class="item animated bounceIn">
<view class="iconfont icon-gouwuche1">
<text class="num bg-color-red" v-if="CartCount > 0">{{ CartCount }}</text>
@ -349,7 +350,7 @@ export default {
this.$yrouter.switchTab('/pages/home/index')
},
goShoppingCart() {
this.$yrouter.switchTab('/pages/shop/ShoppingCart/index')
this.$yrouter.push('/pages/shop/ShoppingCart/index')
},
goCustomerList() {
this.$yrouter.push({
@ -777,6 +778,12 @@ export default {
</script>
<style scoped lang="less">
.product-con{
padding-bottom: 200rpx;
.footer{
height: 160rpx;
}
}
.geoPage {
position: fixed;
width: 100%;

42
pages/shop/ShoppingCart/index.vue

@ -1,7 +1,7 @@
<template>
<view class="shoppingCart">
<view v-if="$store.getters.token||userInfo.uid">
<view class="labelNav acea-row row-around row-middle">
<!-- <view class="labelNav acea-row row-around row-middle">
<view class="item">
<text class="iconfont icon-xuanzhong"></text>100%正品保证
</view>
@ -11,7 +11,7 @@
<view class="item">
<text class="iconfont icon-xuanzhong"></text>售后无忧
</view>
</view>
</view> -->
<view class="nav acea-row row-between-wrapper">
<view>
购物数量
@ -28,7 +28,7 @@
<view class="checkbox-wrapper">
<checkbox-group @change="switchSelect(cartListValidIndex)">
<label class="well-check">
<checkbox color="#eb3729" value :checked="item.checked"></checkbox>
<checkbox style="transform: scale(0.9);" value :checked="item.checked"></checkbox>
</label>
</checkbox-group>
</view>
@ -92,7 +92,7 @@
<view class="pictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/noCart.png`" />
</view>
<Recommend></Recommend>
<view class="toBuy-btn" @click="toGoodsClass()">去选购</view>
</view>
<view style="height:210rpx"></view>
<view :class="{'footer acea-row row-between-wrapper':true,'footer-h5':isH5}" v-if="cartList.valid.length > 0">
@ -113,7 +113,7 @@
<checkbox-group @change="allChecked">
<label class="well-check">
<checkbox color="#eb3729" value="allSelect" :checked="isAllSelect && cartCount > 0"></checkbox>
<checkbox style="transform: scale(0.9);" value="allSelect" :checked="isAllSelect && cartCount > 0"></checkbox>
<text class="checkAll">全选 ({{ cartCount }})</text>
</label>
</checkbox-group>
@ -232,6 +232,11 @@
}
},
methods: {
toGoodsClass(){
uni.switchTab({
url:'/pages/shop/GoodsClass/index'
})
},
goGoodsCon(item) {
this.$yrouter.push({
path: "/pages/shop/GoodsCon/index",
@ -520,5 +525,32 @@
}
.shoppingCart{
position: relative;
padding-top: 120rpx;
.nav{
top: 0;
}
.list{
margin-top: 0;
}
}
.shoppingCart .footer {
height: 200rpx;
}
.shoppingCart .noCart{
margin-top: 0;
.toBuy-btn{
width: 194rpx;
height: 68rpx;
background: -webkit-linear-gradient(top, #EA533E 0%, #E5270F 100%);
background: linear-gradient(180deg, #EA533E 0%, #E5270F 100%);
box-shadow: 0px 4rpx 6rpx 2rpx rgba(255, 213, 208, 0.59);
border-radius: 34rpx;
font-size: 32rpx;
color: #fff;
text-align: center;
line-height: 68rpx;
margin: 30rpx auto;
}
}
</style>

95
pages/study/bangdanRecord.vue

@ -1,32 +1,85 @@
<template>
<view class="dabang-share-box" v-else>
<view class="dabang-share-item" v-for="(item,index) in 6" :key="index">
<view class="dabang-share-item" v-for="(item,index) in studyList" :key="index">
<view class="user-info-box acea-row row-middle">
<view class="header-img">
<image src="../../static/img1.png" mode=""></image>
<image :src="item.avatar" mode="aspectFill"></image>
</view>
<view class="acea-row row-column row-center">
<view class="name">失宠的猫咪</view>
<view class="create-time">5小时前</view>
<view class="name">{{item.realName}}</view>
<view class="create-time">{{item.recordTime}}</view>
</view>
</view>
<view class="share-word">
抱朴书院孕育自华夏优秀传统文化博学致用朴含虚为院训弘扬国粹
<view class="share-word">{{item.content}}</view>
<view class="img-box acea-row row-left">
<image :src="imgUrl" v-for="(imgUrl,index) in item.imgPaths" mode="aspectFill"></image>
</view>
<view class="img-box acea-row row-around">
<image src="../../static/img1.png"></image>
<image src="../../static/img1.png"></image>
<image src="../../static/img1.png"></image>
</view>
<view class="zan-box acea-row row-middle row-right">
<image src="../../static/zan.png"></image>
<text class="zan-conunt">55</text>
<view class="zan-box acea-row row-middle row-right" @click="voteClick(item)">
<image src="../../static/zan.png" v-if="!item.isVote"></image>
<image src="../../static/like.png" v-else></image>
<text class="zan-conunt">{{item.voteNum}}</text>
</view>
</view>
</view>
</template>
<script>
import { myStudylist , studyListVote } from "@/api/knowledge"
export default{
data(){
return {
id:'',
studyList:[]
}
},
onLoad() {
console.log(this.$yroute.query.id)
this.id = this.$yroute.query.id;
this.getMyStudyList()
},
methods:{
voteClick(item){
let id = item.id,
voteNum = item.voteNum,
isVote = !item.isVote;
this.studyList.map((item)=>{
if(item.id == id){
if(item.isVote){
item.voteNum = item.voteNum - 1
} else{
item.voteNum = item.voteNum + 1
}
item.isVote = !item.isVote
}
})
let data = {
"studylistRecordId": id,
"type": isVote ? '1' : '0'
}
studyListVote(data).then((res)=>{
if(res.success){
uni.showToast({
title: '操作成功!'
})
} else{
uni.showToast({
title: res.msg,
icon:'none'
})
}
})
},
getMyStudyList(){
uni.showLoading({
title:'正在加载中...'
})
myStudylist(this.id).then((res)=>{
uni.hideLoading()
this.studyList = res.data
})
}
}
}
</script>
<style lang="less" scoped>
@ -44,6 +97,10 @@
border-radius: 50%;
overflow: hidden;
margin-right: 10rpx;
image{
width: 100%;
height: 100%;
}
}
.name{
font-size: 28rpx;
@ -61,8 +118,14 @@
}
.img-box{
image{
width: 224rpx;
width: 222rpx;
height: 206rpx;
margin-right: 10rpx;
margin-bottom: 10rpx;
border-radius: 10rpx;
}
image:nth-child(3n){
margin-right: 0;
}
}
.zan-box{
@ -70,7 +133,7 @@
image{
width: 30rpx;
height: 32rpx;
margin-right: 20rpx;
margin-right: 10rpx;
}
}
}

202
pages/study/dabang.vue

@ -1,14 +1,14 @@
<template>
<view class="dabang-index">
<view class="top-box">
<view class="dabang-name">连续21天打榜站桩</view>
<view class="desc">抱朴书院孕育自华夏优秀传统文化博学致用朴含虚为院训弘扬国粹利益社会为动力</view>
<view class="dabang-name">{{detail.studyListDto.listName}}</view>
<!-- <view class="desc">抱朴书院孕育自华夏优秀传统文化博学致用朴含虚为院训弘扬国粹利益社会为动力</view> -->
<view class="time-box">
<span>时间2021年5月31日 - 2021年6月20日共21天</span>
<span>时间{{detail.studyListDto.listStartTime}} {{detail.studyListDto.listEndTime}}共21天</span>
<view class="sanjiao"></view>
</view>
</view>
<view class="join-num">参与人数231</view>
<view class="join-num">参与人数{{detail.enterNum}}</view>
<view class="my-progress-box">
<view class="t-word acea-row row-between-wrapper">
<text>我的进度</text>
@ -20,98 +20,172 @@
<view class="progress-info-box acea-row-nowrap row-between">
<view class="acea-row">
<view class="user-headerimg">
<image src="../../static/img1.png" mode=""></image>
<image :src="detail.avatar"></image>
</view>
<view class="user-progress">
<view class="name">失宠的猫咪</view>
<view class="name">{{detail.realName}}</view>
<view class="progress">
<view class="pro-icon"><image src="../../static/course-icon2.png" mode=""></image></view>
已坚持<text class="colO">7</text>/21
<view class="pro-icon"><image src="../../static/course-icon1.png" mode=""></image></view>
已坚持<text class="colO">{{detail.finishTimes}}</text>/{{detail.totalTimes}}
</view>
<view class="progress">
<view class="pro-icon"><image src="../../static/course-icon4.png" mode=""></image></view>
完成进度<text class="colO">33</text>%
完成进度<text class="colO">{{(detail.progress*100).toFixed(2)}}</text>%
</view>
<view class="progress">
<view class="pro-icon"><image src="../../static/course-icon3.png" mode=""></image></view>
全榜排名<text class="colO">12</text>
全榜排名<text class="colO">{{detail.rank}}</text>
</view>
</view>
</view>
<view class="progress-r acea-row row-column row-center-wrapper">
<text>今日未打榜</text>
<view class="dabang-btn" @click="toEdit">立即打卡</view>
<text>{{detail.enterState ? '今日已打卡' : '今日未打卡'}}</text>
<view class="dabang-btn default" v-if="detail.enterState">已打卡</view>
<view class="dabang-btn" @click="toEdit" v-if="detail.isClockTime && !detail.enterState">立即打卡</view>
<view class="dabang-btn default" v-if="!detail.isClockTime && !detail.enterState">未开始</view>
</view>
</view>
</view>
<view class="tab-box acea-row row-middle">
<view class="tab-item" :class="active == 0 ? 'tab-item-a' : ''" @click="tabClick(0)">分享</view>
<view class="tab-item" :class="active == 0 ? 'tab-item-a' : ''" @click="tabClick(0)">分享</view>
<view class="tab-item" :class="active == 1 ? 'tab-item-a' : ''" @click="tabClick(1)">排行榜</view>
</view>
<!-- 排行榜 -->
<view class="rank-list" v-if="active == 1">
<view class="rank-item acea-row row-between-wrapper" v-for="(item,index) in 6" :key="index">
<view class="acea-row row-middle">
<view class="ranking">{{index+1}}</view>
<view class="header-img"><image src="../../static/img1.png" mode=""></image></view>
<view class="name">失宠的猫咪</view>
</view>
<view class="acea-row row-column row-center-wrapper">
<view>完成打榜30项</view>
<view class="jifen">3000积分</view>
</view>
</view>
</view>
<!-- 打榜分享 -->
<view class="dabang-share-box" v-else>
<view class="dabang-share-item" v-for="(item,index) in 6" :key="index">
<view class="dabang-share-box" v-if="active == 0">
<view class="dabang-share-item" v-for="(item,index) in detail.studyListRecordDtos" :key="index">
<view class="user-info-box acea-row row-middle">
<view class="header-img">
<image src="../../static/img1.png" mode=""></image>
<image :src="item.avatar" mode="aspectFill"></image>
</view>
<view class="acea-row row-column row-center">
<view class="name">失宠的猫咪</view>
<view class="create-time">5小时前</view>
<view class="name">{{item.realName}}</view>
<view class="create-time">{{item.recordTime}}</view>
</view>
</view>
<view class="share-word">
抱朴书院孕育自华夏优秀传统文化博学致用朴含虚为院训弘扬国粹
{{item.content}}
</view>
<view class="img-box acea-row">
<image :src="imgUrl" mode="aspectFill" @tap="previewImage(item.imgPaths,idx)" v-for="(imgUrl,idx) in item.imgPaths" :key="idx"></image>
</view>
<view class="zan-box acea-row row-middle row-right" @click="voteClick(item)">
<image src="../../static/zan.png" v-if="!item.isVote"></image>
<image src="../../static/like.png" v-else></image>
<text class="zan-conunt">{{item.voteNum}}</text>
</view>
<view class="img-box acea-row row-around">
<image src="../../static/img1.png"></image>
<image src="../../static/img1.png"></image>
<image src="../../static/img1.png"></image>
</view>
</view>
<!-- 排行榜 -->
<view class="rank-list" v-if="active == 1">
<view class="rank-item acea-row row-between-wrapper" v-for="(item,index) in detail.memberIntegralRankVos" :key="index">
<view class="acea-row row-middle">
<view class="rank-img" v-if="index == 0"><image src="../../static/num1.png" mode=""></image></view>
<view class="rank-img" v-if="index == 1"><image src="../../static/num2.png" mode=""></image></view>
<view class="rank-img" v-if="index == 2"><image src="../../static/num3.png" mode=""></image></view>
<view class="ranking" v-if="index > 2">{{index+1}}</view>
<view class="header-img"><image :src="item.headImg" mode=""></image></view>
<view class="name">{{item.realName}}</view>
</view>
<view class="zan-box acea-row row-middle row-right">
<image src="../../static/zan.png"></image>
<text class="zan-conunt">55</text>
<view class="acea-row row-column row-center-wrapper">
<view>完成打榜{{item.finishNum}}</view>
<view class="jifen">{{item.integral}}积分</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { myProgress , studyListVote} from '@/api/knowledge';
export default{
data(){
return {
active: 0
active: 0,
studyId: '',
detail:{
enterNum: 0,
totalTimes: 0,
finishTimes: 0,
progress: 0,
rank: 0,
studyListRecordDtos:[],
memberIntegralRankVos:[],
}
}
},
onLoad() {
this.studyId = this.$yroute.query.id;
this.getProgress();
},
methods:{
previewImage(imgArr,idx) {
//
uni.previewImage({
urls: imgArr,
current: imgArr[idx]
});
},
getProgress(){
myProgress(this.studyId).then((res)=>{
if(res.success){
res.data.studyListDto.listStartTime = res.data.studyListDto.listStartTime.split(" ")[0];
res.data.studyListDto.listEndTime = res.data.studyListDto.listEndTime.split(" ")[0]
this.detail = res.data;
uni.stopPullDownRefresh();
}
})
},
voteClick(item){
let id = item.id,
voteNum = item.voteNum,
isVote = !item.isVote;
this.detail.studyListRecordDtos.map((item)=>{
if(item.id == id){
if(item.isVote){
item.voteNum = item.voteNum - 1
} else{
item.voteNum = item.voteNum + 1
}
item.isVote = !item.isVote
}
})
let data = {
"studylistRecordId": id,
"type": isVote ? '1' : '0'
}
studyListVote(data).then((res)=>{
if(res.success){
uni.showToast({
title: '操作成功!'
})
}
})
},
tabClick(idx){
this.active = idx;
},
toMyBangdan(){
this.$yrouter.push({
path:'/pages/study/bangdanRecord'
path:'/pages/study/bangdanRecord',
query:{
id: this.studyId
}
})
},
toEdit(){
this.$yrouter.push({
path:'/pages/study/editDabang'
path:'/pages/study/editDabang',
query:{
id: this.studyId
}
})
},
onPullDownRefresh() {
this.getProgress();
}
}
}
</script>
@ -123,7 +197,7 @@
padding-bottom: 100rpx;
.top-box{
width: 100%;
height: 396rpx;
height: 300rpx;
background: linear-gradient(135deg, #E5B964 0%, #CE9F45 100%);
box-sizing: border-box;
padding: 40rpx 0;
@ -203,7 +277,7 @@
background: #FFFFFF;
box-shadow: 0px 4px 8px 0px rgba(239,239,239,0.5);
border-radius: 10rpx;
padding: 30rpx;
padding: 30rpx 0;
.user-headerimg{
width: 130rpx;
height: 130rpx;
@ -223,12 +297,14 @@
line-height: 44rpx;
}
.colO{
font-size: 40rpx;
// font-size: 40rpx;
font-weight: bold;
color: #F36F5E;
}
.progress{
display: flex;
align-items: center;
margin-top: 10rpx;
.pro-icon{
width: 32rpx;
height: 32rpx;
@ -254,6 +330,9 @@
font-size: 28rpx;
margin-top: 10rpx;
}
.default{
background: #999;
}
}
}
}
@ -271,6 +350,7 @@
}
.tab-item-a{
color: #EA533E;
font-weight: bold;
border-bottom: 1px solid #EA533E;
}
}
@ -285,14 +365,23 @@
font-size: 28rpx;
color: #222;
.ranking{
width: 32rpx;
height: 32rpx;
width: 50rpx;
height: 50rpx;
border-radius: 50%;
line-height: 32rpx;
line-height: 50rpx;
text-align: center;
color: #fff;
font-size: 24rpx;
background: #EA533E;
color: #EA533E;
font-size: 34rpx;
// background: #EA533E;
}
.rank-img{
width: 50rpx;
height: 50rpx;
image{
width: 100%;
height: 100%;
}
}
.header-img{
width: 82rpx;
@ -336,9 +425,16 @@
margin: 22rpx 0 30rpx;
}
.img-box{
image{
width: 224rpx;
width: 222rpx;
height: 206rpx;
margin-right: 10rpx;
margin-bottom: 10rpx;
border-radius: 10rpx;
}
image:nth-child(3n){
margin-right: 0;
}
}
.zan-box{

237
pages/study/detail.vue

@ -1,7 +1,7 @@
<template>
<view class="course-detail-index">
<view class="banner-box">
<image src="../../static/article1.png"></image>
<image :src="detail.imgPath"></image>
</view>
<view class="tab-box acea-row row-around" :class="isFixedTop?'fixed':''">
<view class="tab-item" :class="active == '0' ? 'tab-item-active' : ''" @click="handelScroll('content1','0')">榜单介绍</view>
@ -11,16 +11,13 @@
<view class="content-box" bindscroll="scroll">
<scroll-view scroll-y="true" scroll-with-animation="true" style="height:100%;" :scroll-into-view="toView" >
<view class="course-desc-box" id="content1">
<view class="course-desc-box content" id="content1">
<view class="title-box acea-row row-middle">
<view class="left-line"></view>
<span>课程简介</span>
<span>榜单介绍</span>
</view>
<text class="desc">
抱朴书院孕育自华夏优秀传统文化博学致用抱朴含虚为院训弘扬国粹利益社会为动力\n
抱朴书院孕育自华夏优秀传统文化博学致用抱朴含虚为院训弘扬国粹利益社会为动力
</text>
<!-- <text class="desc">{{detail.content}}</text> -->
<rich-text class="desc" :nodes="detail.content"></rich-text>
</view>
<view class="course-desc-box content" id="content2">
@ -30,25 +27,25 @@
</view>
<view class="course-card-list">
<view class="course-card-item acea-row row-middle">
<view class="label">开始时间</view>
<view class="info">2021.5.31 - 2021.6.3</view>
<view class="label">打榜时间</view>
<view class="info">{{detail.listStartTime}} {{detail.listEndTime}}</view>
</view>
<view class="course-card-item acea-row row-middle">
<view class="label">截止时间</view>
<view class="info">2021.5.31 - 2021.6.3</view>
<view class="label">报名时间</view>
<view class="info">{{detail.enterEndTime}}</view>
</view>
<view class="course-card-item acea-row row-middle">
<view class="label">榜周期</view>
<view class="info">每日打卡七天/</view>
<view class="label">卡次数</view>
<view class="info">{{detail.clockTimes}}</view>
</view>
<view class="course-card-item acea-row row-middle">
<view class="label">打卡时间</view>
<view class="info">06:00-22:00</view>
<view class="info">{{detail.signStartTime}}{{detail.signEndTime}}</view>
</view>
</view>
</view>
<view class="course-desc-box" >
<view class="course-desc-box content" id="content3">
<view class="title-box acea-row row-middle">
<view class="left-line"></view>
<span>奖惩规则</span>
@ -56,7 +53,7 @@
<view class="course-card-list">
<view class="course-card-item acea-row-nowrap row-middle">
<view class="label">积分奖惩</view>
<view class="info">30积分</view>
<view class="info">{{detail.integral}}积分</view>
</view>
<view class="course-card-item acea-row-nowrap row-middle row-top">
<view class="label">积分用途</view>
@ -64,58 +61,171 @@
</view>
<view class="course-card-item acea-row-nowrap row-middle row-top">
<view class="label">奖惩机制</view>
<view class="info">积极打卡满21天可获得全部积分消极应对无积分奖励积极打卡满21天可获得全部积分消极应对无积分奖励积极打卡满21天可获得全部积分消极应对无积分奖励</view>
<view class="info">积极打卡满{{detail.clockTimes}}天可获得全部积分消极应对无积分奖励积极打卡满{{detail.clockTimes}}天可获得全部积分消极应对无积分奖励积极打卡满{{detail.clockTimes}}天可获得全部积分消极应对无积分奖励</view>
</view>
</view>
</view>
</scroll-view>
</view>
<view class="signin-btn" @click="submitSignin">立即报名</view>
<view class="signin-btn-box">
<view class="signin-btn" @click="submitSignin" v-if="userInfo.phone != ''">{{detail.enterState ? '查看打榜记录' : '立即报名'}}</view>
<!-- #ifdef MP-WEIXIN -->
<button
open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber"
v-if="userInfo.phone == ''"
class="signin-btn" v-else>
<text>绑定手机号</text>
</button>
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<button class="signin-btn" @click="goBindPhone()" v-if="userInfo.phone == ''">
<text>联系服务老师</text>
</button>
<!-- #endif -->
</view>
</view>
</template>
<script>
// import WucTab from '@/components/wuc-tab/wuc-tab.vue';
import { getStudyDetail , enterStudyList } from '@/api/knowledge';
import { mapState, mapGetters, mapMutations, mapActions } from 'vuex'
import { getUserInfo, bindingPhone, wxappBindingPhone } from '@/api/user'
export default {
computed: mapGetters(['userInfo']),
data() {
return {
studyId:'',
active: '0',
toView: '',
heightArr:[],
tabInitTop:'',
isFixedTop: false,
dialog:false
dialog:false,
detail:{}
}
},
onLoad() {
//
uni.createSelectorQuery().select('.tab-box').boundingClientRect((res) => {
console.log(res);
if (res && res.top > 0) {
var tabInitTop= res.top;
this.tabInitTop= tabInitTop
}
}).exec();
this.studyId = this.$yroute.query.id;
this.getDetail()
},
mounted() {
this.getHeightArr()
},
methods: {
getPhoneNumber: function(e) {
let thit = this
//
if (e.mp.detail.errMsg == 'getPhoneNumber:ok') {
uni.showLoading({
title: '绑定中',
})
wxappBindingPhone({
encryptedData: e.mp.detail.encryptedData,
iv: e.mp.detail.iv,
})
.then(res => {
// this.User();
thit.$store.dispatch('userInfo', true)
uni.hideLoading()
uni.showToast({
title: res.msg,
icon: 'success',
duration: 2000,
})
this.getDetail()
})
.catch(error => {
uni.hideLoading()
thit.$store.dispatch('userInfo', true)
uni.showToast({
title: error.msg || error.response.data.msg || error.response.data.message,
icon: 'none',
duration: 2000,
})
})
} else {
uni.showToast({
title: '已拒绝授权',
icon: 'none',
duration: 2000,
})
}
},
getDetail(){
getStudyDetail(this.studyId).then((res)=>{
this.detail = res.data
})
},
signInClick(){
this.dialog = true
},
submitSignin(){
this.$yrouter.push({
path:'/pages/study/dabang'
})
if(this.userInfo.realName == null){
uni.showModal({
title: '提示!',
content: '请完善个人信息后报名!',
success(res) {
if (res.confirm) {
uni.navigateTo({
url:'/pages/user/PersonalData/index'
})
}
}
});
} else{
if(this.detail.enterState){
this.$yrouter.push({
path:'/pages/study/dabang',
query: {
id:this.studyId,
},
})
} else{
enterStudyList({listId:this.studyId}).then((res)=>{
if(res.status == 200){
uni.showToast({
title:'报名成功!',
icon:'success',
duration:1500
})
setTimeout(()=>{
this.$yrouter.push({
path:'/pages/study/dabang',
query: {
id:this.studyId,
},
})
},1500)
} else{
uni.showToast({
title:res.msg,
icon:'none',
duration:2000
})
}
})
}
}
},
handelScroll(id,idx){
uni.createSelectorQuery().select('#'+id).boundingClientRect(function(res){
uni.pageScrollTo({
scrollTop:res.top,
duration: 300
});
}).exec()
uni.createSelectorQuery().select('#'+id).boundingClientRect(data=>{//id
uni.createSelectorQuery().select(".course-detail-index").boundingClientRect(res=>{//id
uni.pageScrollTo({
duration: 500,//
scrollTop:data.top - res.top - 50 ,//top
})
}).exec()
}).exec();
this.active = idx;
this.toView = id
},
@ -125,24 +235,30 @@
//selectAll
uni.createSelectorQuery().selectAll('.content').boundingClientRect((rect) => {
}).exec((res) => {
console.log(res)
res[0].forEach((item)=>{
h+=item.height;
h+=item.top;
heightArr.push(h);
})
this.heightArr = heightArr;
console.log(this.heightArr)
})
},
onPageScroll(res) {
this.scrollTop = res.scrollTop
let scrollTop = res.scrollTop;
let scrollArr = this.heightArr;
for  (let  i = 0; i < scrollArr.length; i++) {
if  (scrollTop >= 0  && scrollTop < scrollArr[0]) {
this.active = 0;
} else if (scrollTop >= (scrollArr[i - 1]) && scrollTop < scrollArr[i]) {
this.active= i;
}
}
let timer = setTimeout(()=>{
if(this.scrollTop===scrollTop){
for  (let  i = 0; i < scrollArr.length; i++) {
if  (scrollTop < scrollArr[0]) {
this.active = 0;
} else if (scrollTop >= (scrollArr[i - 1]) && scrollTop < scrollArr[i]) {
this.active= i;
}
}
clearTimeout(timer)
}
},100)
var isSatisfy = scrollTop >= this.tabInitTop? true : false;
//
if (this.isFixedTop === isSatisfy) {
@ -158,7 +274,7 @@
.course-detail-index{
width: 100%;
background: #fff;
padding-bottom: 70rpx;
padding-bottom: 190rpx;
box-sizing: border-box;
.banner-box{
width: 100%;
@ -216,7 +332,6 @@
color: #222;
}
.tab-item-active{
font-size: 40rpx;
font-weight: bold;
border-bottom: 4rpx solid #EB5744;
}
@ -241,10 +356,15 @@
margin-bottom: 20rpx;
}
.desc{
text-indent: 2em;
// text-indent: 2em;
width: 100%;
font-size: 28rpx;
color: #666666;
line-height: 24px;
overflow: hidden;
image{
width: 100%;
}
}
.info-box{
display: flex;
@ -281,7 +401,7 @@
}
}
.course-card-item{
font-size: 32rpx;
font-size: 26rpx;
color: #666666;
margin-bottom: 10rpx;
image{
@ -289,8 +409,8 @@
height: 30rpx;
}
.label{
width: 160rpx;
line-height: 34rpx;
// width: 160rpx;
// line-height: 34rpx;
}
.info{
width: calc(100% - 160rpx);
@ -298,16 +418,21 @@
}
}
}
.signin-btn{
width: 680rpx;
height: 88rpx;
background: linear-gradient(180deg, #F7D08E 0%, #E2B35D 100%);
border-radius: 44rpx;
text-align: center;
line-height: 88rpx;
margin: 78rpx auto 0;
color: #fff;
.signin-btn-box{
width: 100%;
background: #fff;
padding: 30rpx 32rpx 60rpx;
position: fixed;
bottom: 0;
left: 0;
.signin-btn{
height: 88rpx;
background: linear-gradient(180deg, #F7D08E 0%, #E2B35D 100%);
border-radius: 44rpx;
text-align: center;
line-height: 88rpx;
color: #fff;
}
}
}
</style>

60
pages/study/editDabang.vue

@ -1,12 +1,12 @@
<template>
<view class="editdabang-box">
<view class="edit-box">
<textarea v-model="expect" placeholder="请在此输入文字..." />
<textarea v-model="content" placeholder="请在此输入文字..." />
</view>
<view class="upload-img-box acea-row row-middle">
<view class="pictrue" v-for="(item, uploadPicturesIndex) in uploadPictures"
:key="uploadPicturesIndex">
<image :src="item" />
<image :src="item" mode="aspectFill"/>
<text class="reduce iconfont icon-guanbi1 font-color-red"
@click="uploadPictures.splice(uploadPicturesIndex, 1)"></text>
</view>
@ -15,31 +15,71 @@
<view>上传图片</view>
</view>
</view>
<view class="submit-btn">发布</view>
<view class="submit-btn" @click="submitClick()">发布</view>
</view>
</template>
<script>
import {
chooseImage
} from "@/utils";
import { chooseImages } from "@/utils"
import { studyListPublish } from "@/api/knowledge"
export default {
components: {
// VueCoreImageUpload
},
data: function() {
return {
studyId: '',
uploadPictures: [],
expect: "",
content: "",
unique: ""
};
},
onLoad(){
this.studyId = this.$yroute.query.id;
},
methods:{
chooseImage() {
chooseImage(img => {
chooseImages(img => {
console.log(img)
this.uploadPictures.push(img);
});
},
submitClick(){
if(this.content == ''){
uni.showToast({
title: '请填写分享内容',
icon: 'none'
})
return
}
let data = {
content: this.content,
imgPaths: this.uploadPictures,
studylistId: this.studyId
}
studyListPublish(data).then((res)=>{
if(res.success){
uni.showToast({
title: '发布成功!',
type: 'success',
duration:1500
})
setTimeout(()=>{
// uni.navigateBack({
// delta:1
// })
uni.redirectTo({
url: '/pages/study/dabang?id=' + this.studyId
});
},1500)
} else{
uni.showToast({
title: res.msg,
icon:'none'
})
}
})
},
}
}
</script>
@ -55,6 +95,9 @@
width: 100%;
padding: 50rpx 0;
border-bottom: 1px solid #ececec;
textarea{
width: 100%;
}
}
.upload-img-box{
margin-top: 50rpx;
@ -67,6 +110,7 @@
position: relative;
margin-right: 20rpx;
font-size: 28rpx;
margin-bottom: 20rpx;
image{
width: 100%;
height: 100%;

25
pages/user/PersonalData/index.vue

@ -29,6 +29,12 @@
<input type="text" v-model="userInfo.nickname" />
</view>
</view>
<view class="item acea-row row-between-wrapper">
<view>真实姓名</view>
<view class="input">
<input type="text" placeholder="请填写真实姓名" placeholder-style="color:#EA533E" v-model="userInfo.realName" />
</view>
</view>
<view class="item acea-row row-between-wrapper">
<view>ID号</view>
<view class="input acea-row row-between-wrapper">
@ -163,9 +169,17 @@ export default {
submit: function () {
let userInfo = this.userInfo;
if(userInfo.realName == ''){
uni.showToast({
title:'请填写真实姓名',
icon: "none"
})
return
}
postUserEdit({
nickname: trim(this.userInfo.nickname),
avatar: this.avatar,
realName: trim(this.userInfo.realName)
}).then(
(res) => {
this.$store.dispatch("userInfo", true);
@ -174,7 +188,9 @@ export default {
icon: "none",
duration: 2000,
});
this.$yrouter.back();
setTimeout(()=>{
this.$yrouter.back();
},2000)
},
(err) => {
uni.showToast({
@ -210,3 +226,10 @@ export default {
},
};
</script>
<style scoped lang="less">
.modifyBnt{
height: 80rpx !important;
line-height: 80rpx !important;
font-size: 32rpx !important;
}
</style>

174
pages/user/User/index.vue

@ -12,7 +12,7 @@
<view class="name line1">{{ userInfo.nickname }}</view>
<view class="member acea-row row-middle">
<!-- <image :src="userInfo.vipIcon" /> -->
<text>{{ userInfo.vipName }}</text>
<text>{{ userInfo.levelName}}</text>
</view>
</view>
<view @click="goPersonalData()" class="id" v-if="userInfo.phone">
@ -32,40 +32,48 @@
<!-- #endif -->
</view>
</view>
<view class="jifen-box">积分2000</view>
<view class="jifen-box" @click="goIntegral">积分{{userInfo.integral}}</view>
<!-- <text class="iconfont icon-shezhi" @click="goPersonalData()"></text> -->
</view>
<view class="teacher-box acea-row-nowrap row-between row-middle">
<view class=" teacher-box-l acea-row-nowrap row-between row-middle">
<image src="../../../static/call-icon.png" class="call-icon"></image>
<text>服务老师</text>
<view class="vertical-line"></view>
<view class="teacher-box-r acea-row row-between row-middle" v-if="userInfo.isPromoter == 0">
<image :src="userInfo.workPhoto" v-if="userInfo.workPhoto"></image>
<image src="../../../static/default-headerimg.png" v-else></image>
<text @click="call">{{userInfo.sellerName || '点击联系服务老师'}} </text>
</view>
<view class="teacher-box-r acea-row row-between row-middle">
<text>王老师</text>
<image src="../../../static/img1.png"></image>
<view class=" teacher-box-l acea-row-nowrap row-between row-middle" v-if="userInfo.isPromoter == 0">
<!-- <text>服务老师</text> -->
<image src="../../../static/call-icon.png" class="call-icon" @click="call"></image>
<!-- <view class="vertical-line"></view> -->
</view>
<view class="" style="color: #fff;" v-else @click="toServiceIndex()">服务老师主页</view>
</view>
<view class="myjoin-box">
<view class="myjoin-box" v-if="userInfo.memberStudyVo.cyCourseDtos.length > 0 || userInfo.memberStudyVo.studyListDtos.length > 0">
<view class="t-word">我参与的</view>
<view class="course-box">
<view class="course-info">
<view class="course-name line1">阴阳五行一个人的阴阳五行</view>
<view class="time">2021 5 31-6.3 8:30-18:30</view>
</view>
<view class="address-box acea-row row-between row-middle">
<view class="address">地点中国·武汉</view>
<view class="btn">去签到</view>
<scroll-view class="scroll-view_H" scroll-x="true">
<view class="course-box"
v-for="(item,index) in userInfo.memberStudyVo.cyCourseDtos" :key="index"
@click="toCourseDetail(item.id)">
<view class="course-info">
<view class="course-name line1">{{item.courseName}}</view>
<view class="time">{{item.courseStartTime.split(' ')[0]}}~{{item.courseEndTime.split(' ')[0]}}</view>
</view>
<view class="address-box acea-row row-between row-middle">
<view class="address">地点{{item.coursePlace}}</view>
<view class="btn" @click.stop="startQr()" v-if="item.signState == 2">扫一扫</view>
<view class="btn" v-if="item.signState == 1">已签到</view>
</view>
</view>
</view>
</scroll-view>
<view class="bangdan-box">
<view class="bangdan-list">
<scroll-view class="scroll-view_H" scroll-x="true">
<view class="bangdan-item" v-for="(item,index) in 6" :key="index">
<view class="bangdan-name">连续11天打卡站桩</view>
<view class="bangdan-item" v-for="(item,index) in userInfo.memberStudyVo.studyListDtos" :key="index">
<view class="bangdan-name">{{item.listName}}</view>
<view class="acea-row row-between-wrapper">
<view class="signin-day">已连续12</view>
<view class="signin-btn">立即打榜</view>
<view class="signin-day">已连续{{item.signTimes}}</view>
<view class="signin-btn" @click="toStudyDabang(item)">{{item.enterState ? '已打卡' : '立即打卡'}}</view>
</view>
</view>
</scroll-view>
@ -104,21 +112,27 @@
<view class="pictrue">
<!-- <image :src="`${$VUE_APP_RESOURCES_URL}/images/dfk.png`" /> -->
<image src="../../../static/myorder-icon1.png" />
<text class="order-status-num" v-if="userInfo.orderStatusNum.unpaidCount > 0">{{ userInfo.orderStatusNum.unpaidCount }}</text>
<text class="order-status-num" v-if="userInfo.orderStatusNum.unpaidCount > 0">
{{ userInfo.orderStatusNum.unpaidCount }}
</text>
</view>
<view>待付款</view>
</view>
<view @click="goMyOrder(1)" class="item">
<view class="pictrue">
<image src="../../../static/myorder-icon2.png" />
<text class="order-status-num" v-if="userInfo.orderStatusNum.unshippedCount > 0">{{ userInfo.orderStatusNum.unshippedCount }}</text>
<text class="order-status-num" v-if="userInfo.orderStatusNum.unshippedCount > 0">
{{ userInfo.orderStatusNum.unshippedCount }}
</text>
</view>
<view>待发货</view>
</view>
<view @click="goMyOrder(2)" class="item">
<view class="pictrue">
<image src="../../../static/myorder-icon3.png" />
<text class="order-status-num" v-if="userInfo.orderStatusNum.receivedCount > 0">{{ userInfo.orderStatusNum.receivedCount }}</text>
<text class="order-status-num" v-if="userInfo.orderStatusNum.receivedCount > 0">
{{ userInfo.orderStatusNum.receivedCount }}
</text>
</view>
<text>待收货</text>
</view>
@ -140,6 +154,7 @@
</view>
<view class="myService">
<view class="serviceList acea-row row-middle">
<view class="item" @click="goUserCourse()">
<view class="pictrue">
<image src="../../../static/user-menu1.png" />
@ -151,7 +166,7 @@
<view class="pictrue">
<image src="../../../static/user-menu2.png" />
</view>
<view class="cell">学习打卡</view>
<view class="cell">学习打卡</view>
<text class="iconfont icon-jiantou"></text>
</view>
<view class="item" @click="goUserFeedBack()">
@ -175,6 +190,13 @@
<view class="cell">收货地址</view>
<text class="iconfont icon-jiantou"></text>
</view>
<view class="item" @click="toServiceIndex()">
<view class="pictrue">
<image src="../../../static/user-menu6.png" />
</view>
<view class="cell">我是服务老师</view>
<text class="iconfont icon-jiantou"></text>
</view>
<!-- <template v-for="(item, MyMenusIndex) in MyMenus">
<view class="item" :key="MyMenusIndex" @click="goPages(MyMenusIndex)">
<view class="pictrue">
@ -203,7 +225,7 @@ import { isWeixin, VUE_APP_RESOURCES_URL } from '@/utils'
import cookie from '@/utils/store/cookie'
import SwitchWindow from '@/components/SwitchWindow'
import Authorization from '@/pages/authorization/index'
import { signCourse } from '@/api/knowledge'
const NAME = 'User'
export default {
@ -223,6 +245,36 @@ export default {
computed: mapGetters(['userInfo']),
methods: {
...mapMutations(['updateAuthorizationPage']),
startQr: function() {
uni.scanCode({
success: res => {
// let option = handleUrlParam(res.result)
let id = res.result;
signCourse(id).then((res)=>{
if(res.success){
uni.showModal({
title:'提示!',
content:'签到成功!您的座位号是' + res.data,
})
} else{
uni.showToast({
title:res.msg,
icon:'none',
duration:5000
})
}
})
},
})
},
call(){
uni.makePhoneCall({
phoneNumber: this.userInfo.sellerPhone || this.userInfo.customerPhone
})
},
toServiceIndex(){
this.$yrouter.push('/pages/serviceTeacher/index')
},
goUserCourse() {
this.$yrouter.push('/pages/user/myCourses/index')
},
@ -239,8 +291,43 @@ export default {
this.$yrouter.push('/pages/order/ReturnList/index')
},
goAddressManagement(){
// this.$yrouter.push('/pagesB/pages/user/address/AddressManagement/index')
this.$yrouter.push('/pagesB/pages/shop/Live/LiveList/index')
this.$yrouter.push('/pagesB/pages/user/address/AddressManagement/index')
// this.$yrouter.push('/pagesB/pages/shop/Live/LiveList/index')
},
toCourseDetail(id){
this.$yrouter.push({
path: '/pages/course/detail',
query: {
id:id,
},
})
},
toStudyDabang(item){
if(item.enterState){
this.$yrouter.push({
path: '/pages/study/dabang',
query: {
id: item.id,
},
})
} else{
if(item.isClockTime){
this.$yrouter.push({
path: '/pages/study/editDabang',
query: {
id: item.id,
},
})
} else{
uni.showToast({
title:'未到打卡时间!',
icon:'none',
duration:2000
})
}
}
},
goMyOrder(type) {
this.$yrouter.push({
@ -259,7 +346,8 @@ export default {
this.$yrouter.push('/pages/user/coupon/UserCoupon/index')
},
goIntegral() {
this.$yrouter.push('/pages/user/signIn/Integral/index')
return
this.$yrouter.push('/pagesB/pages/user/signIn/Integral/index')
},
goUserPromotion() {
this.$yrouter.push('/pages/user/promotion/UserPromotion/index')
@ -485,6 +573,7 @@ export default {
font-size: 28rpx;
}
}
.teacher-box{
width: 690rpx;
height: 112rpx;
@ -523,13 +612,13 @@ export default {
height: 88rpx;
border: 1px solid #fff;
border-radius: 25px;
margin-left: 30rpx;
margin-right: 30rpx;
}
}
}
.myjoin-box{
width: 690rpx;
height: 506rpx;
// height: 506rpx;
background: #FFFFFF;
border-radius: 10rpx;
padding: 30rpx;
@ -540,14 +629,22 @@ export default {
margin-bottom: 30rpx;
}
.course-box{
width: 100%;
width: 94%;
height: 190rpx;
background: #FFF5DE;
border-radius: 10rpx;
padding: 26rpx 20rpx 20rpx 42rpx;
color: #C89560;
font-size: 24rpx;
display: inline-block;
margin-bottom: 30rpx;
margin-right: 20rpx;
.course-item{
width: 100%;
display: inline-block;
}
.course-info{
margin-bottom: 10rpx;
.course-name{
color: #C89560;
@ -570,14 +667,13 @@ export default {
}
}
}
.scroll-view_H{
white-space: nowrap;
width: 100%;
}
.bangdan-box{
width: 100%;
box-sizing: border-box;
margin-top: 30rpx;
.scroll-view_H{
white-space: nowrap;
width: 100%;
}
.bangdan-item{
width: 310rpx;
height: 152rpx;

35
pages/user/feedBack/index.vue

@ -1,18 +1,25 @@
<template>
<view class="index">
<view class="inp-box">
<textarea @input="sumfontnum" maxlength="100" @blur="bindTextAreaBlur" placeholder-style="color:#999999;" placeholder="请填写您宝贵的反馈意见" />
<textarea
@input="sumfontnum"
maxlength="100"
@blur="bindTextAreaBlur"
placeholder-style="color:#999999;"
placeholder="请填写您宝贵的反馈意见"
v-model="content"/>
<view class="fontnum">{{fontnum}}/100</view>
</view>
<view class="submit-btn">提交</view>
<view class="submit-btn" @click="submitClick()">提交</view>
</view>
</template>
<script>
import { feedBack } from '@/api/knowledge'
export default{
data(){
return {
feedBack:'',
content:'',
fontnum:0
}
},
@ -22,7 +29,27 @@
},
sumfontnum(e){
this.fontnum = e.detail.value.length
}
},
submitClick(){
feedBack({content:this.content}).then((res)=>{
if(res.success){
uni.showToast({
title: '反馈成功!',
duration:2000
})
setTimeout(()=>{
uni.navigateBack({
delta:1
})
},2000)
} else{
uni.showToast({
title: res.msg,
icon: 'none'
})
}
})
},
}
}
</script>

58
pages/user/myBangdan/index.vue

@ -1,22 +1,26 @@
<template>
<view class="index">
<view class="tabs-box acea-row row-around row-middle">
<view class="tab-item" :class="active == 0 ? 'tab-item-active' : ''" @click="tabClick(0)">打卡中</view>
<view class="tab-item" :class="active == 1 ? 'tab-item-active' : ''" @click="tabClick(1)">已完成</view>
<view class="tab-item" :class="active == 1 ? 'tab-item-active' : ''" @click="tabClick(1)">打卡中</view>
<view class="tab-item" :class="active == 2 ? 'tab-item-active' : ''" @click="tabClick(2)">已完成</view>
</view>
<view class="dabang-list-box">
<view class="dabang-item">
<view class="dabang-item" v-for="(item,index) in studyList" :key="index" @click="toDabang(item.id)">
<view class="dabang-info">
<view class="bangdan-name line1">连续21天打卡站桩</view>
<view class="time">2021.5.28-2021.618</view>
<view class="time">30积分</view>
<view class="bangdan-name line1">{{item.listName}}</view>
<view class="time">{{item.listStartTime.split(' ')[0]}}-{{item.listEndTime.split(' ')[0]}}</view>
<view class="time">{{item.integral}}积分</view>
</view>
<view class="dabang-btm acea-row row-between-wrapper">
<view>+30积分</view>
<view>打榜成功</view>
<view class="dabang-btm acea-row row-between-wrapper" :class="item.signState == 2 ? '' : 'colR'" v-if="active == 2">
<view>{{item.signState == 2 ? '+' : '-'}} {{item.integral}}积分</view>
<view v-if="item.signState == 2">打榜成功 {{item.signTimes}}/{{item.clockTimes}}</view>
<view v-if="item.signState == 3">打榜失败 {{item.signTimes}}/{{item.clockTimes}}</view>
</view>
<view class="dabang-btm acea-row row-between-wrapper" v-else>
<view>{{item.listState == 1 ? '进行中' : '已结束'}} {{item.signTimes}}/{{item.clockTimes}}</view>
</view>
</view>
<view class="dabang-item">
<!-- <view class="dabang-item">
<view class="dabang-info">
<view class="bangdan-name line1">连续21天打卡站桩</view>
<view class="time">2021.5.28-2021.618</view>
@ -26,21 +30,46 @@
<view>-30积分</view>
<view>打榜失败</view>
</view>
</view>
</view> -->
</view>
</view>
</template>
<script>
import { getStudyList } from "@/api/user"
export default{
data(){
return {
active : 0
active : 1,
studyList:[]
}
},
onLoad(){
this.getList()
},
methods:{
getList(){
uni.showLoading({
title: '正在加载中...'
})
getStudyList(this.active).then((res)=>{
uni.hideLoading()
if(res.success){
this.studyList = res.data
}
})
},
toDabang(id){
this.$yrouter.push({
path: '/pages/study/dabang',
query: {
id:id,
},
})
},
tabClick(idx){
this.active = idx
this.active = idx;
this.getList()
}
}
}
@ -59,8 +88,7 @@
line-height: 98rpx;
}
.tab-item-active{
font-size: 40rpx;
font-size: 500;
font-weight: 600;
border-bottom: 4rpx solid #EB5744;
}
}

99
pages/user/myCourses/index.vue

@ -1,45 +1,52 @@
<template>
<view class="index">
<view class="tabs-box acea-row row-around row-middle">
<view class="tab-item" :class="active == 0 ? 'tab-item-active' : ''" @click="tabClick(0)">已报名</view>
<view class="tab-item" :class="active == 1 ? 'tab-item-active' : ''" @click="tabClick(1)">已完成</view>
<view class="tab-item" :class="active == 2 ? 'tab-item-active' : ''" @click="tabClick(2)">可报名</view>
<view class="tab-item" :class="active == 1 ? 'tab-item-active' : ''" @click="tabClick(1)">已报名</view>
<view class="tab-item" :class="active == 2 ? 'tab-item-active' : ''" @click="tabClick(2)">已完成</view>
<view class="tab-item" :class="active == 3 ? 'tab-item-active' : ''" @click="tabClick(3)">可报名</view>
</view>
<view class="course-list-box" v-if="active == 0 || active == 1">
<view class="course-item acea-row row-between">
<view class="course-list-box" v-if="active == 1 || active == 2">
<view class="no-content" v-if="courseList.length == 0">暂无内容...</view>
<view class="course-item acea-row row-between" v-for="(item,index) in courseList" :key="index">
<view class="course-item-l">
<view class="course-info">
<view class="course-name line1">一代天骄王者少年禪易课程教学易课程教学</view>
<view class="course-name line1">{{item.courseName}}</view>
<view class="info-box">
<view class="">时间2021.5.25-5.28 8:30-18:30</view>
<view class="">地点湖北 武汉</view>
<view class="">座位号8排8号</view>
<view class="">酒店安排江汉区江汉路22号武汉大酒店0801号房</view>
<view class="">时间{{item.courseStartTime.split(' ')[0]}}{{item.courseEndTime.split(' ')[0]}}</view>
<view class="">地点{{item.coursePlace}}</view>
<view class="">座位号{{item.seat || '暂未安排座位'}}</view>
<!-- <view class="">酒店安排江汉区江汉路22号武汉大酒店0801号房</view> -->
</view>
</view>
</view>
<view class="course-item-r acea-row ">
<view class="saoyisao"><image src="../../../static/saoyisao-icon.png"></image></view>
<text>去签到</text>
<view class="course-item-r acea-row" v-if="active == 1" @click="startQr()">
<view class="saoyisao" v-if="item.signState == 2"><image src="../../../static/saoyisao-icon.png"></image></view>
<text>{{item.signState == 1 ? '已签到' : '扫一扫'}}</text>
</view>
<view class="course-item-r colG acea-row" v-else>
<!-- <view class="saoyisao"><image src="../../../static/saoyisao-icon.png"></image></view> -->
<text>已结束</text>
</view>
</view>
</view>
<view class="knowledge-list" v-else>
<view class="no-content" v-if="courseList.length == 0">暂无内容...</view>
<view class="knowledge-item acea-row" v-for="item in courseList" @click="toDetail(item.id)">
<view class="img-box">
<image :src="item.imageArr[0]" mode=""></image>
<image :src="item.imageArr[0]" mode="aspectFill"></image>
</view>
<view class="knowledge-info-box">
<view class="title line1">{{item.courseName}}</view>
<view class="time">{{utils.spl(item.courseStartTime)[0]}}~{{utils.spl(item.courseEndTime)[0]}}</view>
<view class="time">{{item.courseStartTime.split(' ')[0]}}{{item.courseEndTime.split(' ')[0]}}</view>
<view class="address">{{item.coursePlace}}</view>
<view class="type-box acea-row row-between row-middle">
<view class="price">{{item.courseCharge}}</view>
<view class="price">{{item.levelName}}</view>
<!-- <view class="price colG" v-if="item.chargeType == 0">免费</view> -->
<view class="signin-btn red">去报名</view>
</view>
</view>
</view>
<view class="knowledge-item acea-row">
<!-- <view class="knowledge-item acea-row">
<view class="img-box">
<image src="../../static/img1.png" mode=""></image>
</view>
@ -52,22 +59,52 @@
<view class="signin-btn red">去报名</view>
</view>
</view>
</view>
</view> -->
</view>
</view>
</template>
<script>
import { getMyCourseList } from "@/api/user"
export default{
data(){
return {
active : 0
active : 1,
courseList:[]
}
},
onLoad(){
this.getList()
},
methods:{
getList(){
uni.showLoading({
title: '正在加载中...'
})
getMyCourseList(this.active).then((res)=>{
uni.hideLoading()
if(res.success){
this.courseList = res.data
}
})
},
tabClick(idx){
this.active = idx
}
this.active = idx;
this.getList()
},
toDetail(id){
this.$yrouter.push({
path:'/pages/course/detail',
query:{id:id}
})
},
startQr: function() {
uni.scanCode({
success: res => {
},
})
},
}
}
</script>
@ -85,11 +122,16 @@
line-height: 98rpx;
}
.tab-item-active{
font-size: 40rpx;
font-size: 500;
font-weight: 600;
border-bottom: 4rpx solid #EB5744;
}
}
.no-content{
font-size: 28rpx;
color: #666666;
text-align: center;
padding: 30rpx 0;
}
.course-list-box{
width: 100%;
.course-item{
@ -127,11 +169,15 @@
margin-bottom: 6rpx;
}
}
}
}
.colG{
color: #8FB85B !important;
}
.knowledge-list {
width: 100%;
margin-top: 50rpx;
// margin-top: 50rpx;
.knowledge-item {
background: #fff;
padding: 32rpx;
@ -143,6 +189,7 @@
image {
width: 100%;
height: 100%;
border-radius: 10rpx;
}
}
.knowledge-info-box {
@ -170,9 +217,9 @@
color: #999;
margin-top: 28rpx;
.price{
font-size: 36rpx;
font-size: 28rpx;
color: #EA533E;
font-weight: 600;
font-weight: 500;
}
.signin-btn{
width: 156rpx;

7
pagesB/pages/user/address/AddressManagement/index.vue

@ -75,6 +75,9 @@
background-color: #fff;
height: 100vh;
}
.address-management .footer{
height: 200rpx;
}
</style>
<script type="text/babel">
import {
@ -140,7 +143,7 @@ export default {
*/
editAddress: function(index) {
this.$yrouter.push({
path: "/pages/user/address/AddAddress/index",
path: "/pagesB/pages/user/address/AddAddress/index",
query: { id: this.addressList[index].id }
});
},
@ -177,7 +180,7 @@ export default {
*/
addAddress: function() {
this.$yrouter.push({
path: "/pages/user/address/AddAddress/index"
path: "/pagesB/pages/user/address/AddAddress/index"
});
},
getAddress() {

155
pagesB/pages/user/signIn/Integral/index.vue

@ -1,9 +1,16 @@
<template>
<view class="integral-details" ref="container">
<view class="header">
<view class="currentScore">当前积分</view>
<view>{{ info.integral }}</view>
<view class="line"></view>
<view class="header acea-row row-between row-middle">
<view class="acea-row row-column row-between">
<view class="integral">{{ info.integral }}</view>
<view class="rule">
<text>积分规则</text>
<text class="icon-font"></text>
</view>
</view>
<!-- <view class="currentScore">当前积分</view> -->
<view class="integral-shop">积分商城</view>
<!-- <view class="line"></view> -->
<!--<view class="nav acea-row">-->
<!--<view class="item">-->
<!--<view class="num">{{ info.sum_integral }}</view>-->
@ -20,7 +27,42 @@
<!--</view>-->
</view>
<view class="wrapper">
<view class="nav acea-row">
<view class="content-title">做任务赚积分</view>
<view class="menu-list">
<view class="menu-item acea-row row-between row-middle">
<view class="menu-item-l acea-row row-middle">
<view class="icon"><image src="../../../../../static/jifen1.png" mode=""></image></view>
<text>完成个人信息</text>
<text class="integral">+10积分</text>
</view>
<view class="btn">去完成</view>
</view>
<view class="menu-item acea-row row-between row-middle">
<view class="menu-item-l acea-row row-middle">
<view class="icon"><image src="../../../../../static/jifen2.png" mode=""></image></view>
<text>每日签到</text>
<text class="integral">+10积分</text>
</view>
<view class="btn">去签到</view>
</view>
<view class="menu-item acea-row row-between row-middle">
<view class="menu-item-l acea-row row-middle">
<view class="icon"><image src="../../../../../static/jifen3.png" mode=""></image></view>
<text>阅读文章2篇</text>
<text class="integral">+10积分</text>
</view>
<view class="btn">去完成</view>
</view>
<view class="menu-item acea-row row-between row-middle">
<view class="menu-item-l acea-row row-middle">
<view class="icon"><image src="../../../../../static/jifen4.png" mode=""></image></view>
<text>报名1项课程</text>
<text class="integral">+80积分</text>
</view>
<view class="btn">去完成</view>
</view>
</view>
<!-- <view class="nav acea-row">
<view
class="item acea-row row-center-wrapper"
:class="current === navListIndex ? 'on' : ''"
@ -31,13 +73,13 @@
<text class="iconfont" :class="item.icon"></text>
{{ item.name }}
</view>
</view>
<view class="list" :hidden="current !== 0">
</view> -->
<!-- <view class="list" :hidden="current !== 0"> -->
<!--<view class="tip acea-row row-middle">-->
<!--<text class="iconfont icon-shuoming"><text-->
<!--&gt;提示积分数值的高低会直接影响您的会员等级-->
<!--</view>-->
<view
<!-- <view
class="item acea-row row-between-wrapper"
v-for="(item, listIndex) in list"
:key="listIndex"
@ -48,8 +90,8 @@
</view>
<text class="num" v-if="item.pm == 1">+{{ item.number }}</text>
<text class="num font-color-red" v-if="item.pm == 0">-{{ item.number }}</text>
</view>
</view>
</view> -->
<!-- </view> -->
<!--<view class="list2" :hidden="current !== 1">-->
<!--<view class="item acea-row row-between-wrapper" @click="goHome()">-->
<!--<view class="pictrue"><image :src="`${$VUE_APP_RESOURCES_URL}/images/score.png`" /></view>-->
@ -134,10 +176,10 @@ export default {
},
err => {
uni.showToast({
title: err.msg || err.response.data.msg|| err.response.data.message,
icon: 'none',
duration: 2000
});
title: err.msg || err.response.data.msg|| err.response.data.message,
icon: 'none',
duration: 2000
});
}
);
},
@ -149,17 +191,90 @@ export default {
},
err => {
uni.showToast({
title: err.msg || err.response.data.msg|| err.response.data.message,
icon: 'none',
duration: 2000
});
title: err.msg || err.response.data.msg|| err.response.data.message,
icon: 'none',
duration: 2000
});
}
);
}
}
};
</script>
<style lang="less">
.list {
<style lang="less" scoped>
.integral-details {
height: 100vh;
background: #fff;
.header{
background-image: none;
width: 750rpx;
height: 266rpx;
padding: 0 40rpx;
background: linear-gradient(176deg, #EC1C07 0%, #F94F0F 100%);
border-radius: 0px 0px 60rpx 60rpx;
.integral{
font-size: 80rpx;
color: #fff;
}
.rule{
width: 150rpx;
height: 44rpx;
background: rgba(0,0,0,.2);
border-radius: 27rpx;
text-align: center;
line-height: 44rpx;
font-size: 24rpx;
}
.integral-shop{
width: 206rpx;
height: 70rpx;
text-align: center;
line-height: 70rpx;
background: linear-gradient(133deg, #FEF2D7 0%, #FCD86D 100%);
border-radius: 40rpx;
font-size: 28rpx;
color: #F53D0D;
}
}
.wrapper{
padding: 0 30rpx;
font-size: 28rpx;
.content-title{
font-size: 36rpx;
font-weight: 600;
color: #222222;
line-height: 50rpx;
margin: 50rpx 0;
}
.menu-list{
.menu-item{
width: 100%;
height: 136rpx;
border-top: 1px solid #ececec;
image{
width: 76rpx;
height: 76rpx;
}
.icon{
margin-right: 20rpx;
}
.integral{
font-size: 32rpx;
color: #FD513B;
margin-left: 20rpx;
}
.btn{
width: 122rpx;
height: 52rpx;
background: #FD513B;
border-radius: 30rpx;
text-align: center;
line-height: 52rpx;
color: #fff;
}
}
}
}
}
</style>

BIN
static/addMenber.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
static/article1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 KiB

BIN
static/backhome-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
static/dabang-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

BIN
static/default-headerimg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
static/dizhi.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
static/home-banner.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 336 KiB

BIN
static/img2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

BIN
static/jifen1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
static/jifen2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
static/jifen3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
static/jifen4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
static/kecheng-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
static/kecheng-icon2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 973 B

BIN
static/like.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 888 B

BIN
static/lock.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 932 B

BIN
static/message.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
static/num1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
static/num2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/num3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
static/sort-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 694 B

BIN
static/success.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
static/tab1-d.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
static/tab2-d.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/tab3-d.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 885 B

BIN
static/tab4-d.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 823 B

BIN
static/tab5-d.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
static/time.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 691 B

BIN
static/user-menu6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
static/vipmanage-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

54
utils/index.js

@ -523,6 +523,11 @@ export const handleLoginStatus = (location, complete, fail, success) => {
path: '/pages/authorization/index',
name: '授权页面',
},
{
path: '/pages/course/index',
name: '课程首页',
},
]
// 是否可以访问
@ -1068,6 +1073,55 @@ export function chooseImage(callback) {
},
})
}
export function chooseImages(callback) {
uni.chooseImage({
count: 9,
sourceType: ['album'],
success: res => {
const tempFilePaths = res.tempFilePaths;
for(let i = 0;i < tempFilePaths.length; i++) {
uni.getImageInfo({
src: tempFilePaths[i],
success: image => {
uni.showLoading({ title: '图片上传中', mask: true })
uni.uploadFile({
url: `${VUE_APP_API_URL}/api/upload`,
file: image,
filePath: image.path,
header: {
Authorization: 'Bearer ' + store.getters.token,
},
name: 'file',
success: res => {
if (callback) {
callback(JSON.parse(res.data).link)
}
},
fail: err => {
uni.showToast({
title: '上传图片失败',
icon: 'none',
duration: 2000,
})
},
complete: res => {
uni.hideLoading()
},
})
},
fail: err => {
uni.showToast({
title: '获取图片信息失败',
icon: 'none',
duration: 2000,
})
},
})
}
},
})
}
export function handleErrorMessage(err) {
console.log(err)

7
utils/request.js

@ -91,6 +91,7 @@ function baseRequest(options) {
const data = res.data || {}
if (res.status !== 200) {
return Promise.reject({ msg: '请求失败', res, data })
return Promise.resolve({ msg: res.data.msg, res, data })
}
// console.log(data)
if ([401, 403].indexOf(data.status) !== -1) {
@ -99,9 +100,11 @@ function baseRequest(options) {
} else if (data.status === 200) {
return Promise.resolve(data, res)
} else if (data.status == 5101) {
return Promise.reject({ msg: res.data.msg, res, data })
// return Promise.reject({ msg: res.data.msg, res, data })
return Promise.resolve({ msg: res.data.msg, res, data })
} else {
return Promise.reject({ msg: res.data.msg, res, data })
// return Promise.reject({ msg: res.data.msg, res, data })
return Promise.resolve({ msg: res.data.msg, res, data })
}
})
}

Loading…
Cancel
Save