Browse Source

上传代码

chanyi2.0
杨豪 3 years ago
parent
commit
6bfc95dd8e
  1. 10
      App.vue
  2. 57
      api/diandeng.js
  3. 13
      api/user.js
  4. 10
      assets/css/base.less
  5. 4
      components/CitySelect.vue
  6. 12
      components/OrderGoods.vue
  7. 5
      config/index.js
  8. 27
      pages.json
  9. 73
      pages/course/detail.vue
  10. 32
      pages/course/index.vue
  11. 534
      pages/diandeng/index.vue
  12. 453
      pages/diandeng/lighting.vue
  13. 112
      pages/home/index.vue
  14. 1
      pages/knowledge/detail.vue
  15. 25
      pages/knowledge/index.vue
  16. 129
      pages/order/MyOrder/index.vue
  17. 108
      pages/order/OrderDetails/index.vue
  18. 3
      pages/order/OrderSubmission/index.vue
  19. 6
      pages/order/ReturnList/index.vue
  20. 31
      pages/serviceTeacher/index.vue
  21. 8
      pages/serviceTeacher/setSelfData.vue
  22. 7
      pages/shop/GoodsClass/index.vue
  23. 6
      pages/shop/GoodsCon/index.vue
  24. 14
      pages/study/dabang.vue
  25. 27
      pages/study/detail.vue
  26. 20
      pages/study/editDabang.vue
  27. 139
      pages/user/PersonalData/index.vue
  28. 73
      pages/user/User/index.vue
  29. 2
      pages/user/feedBack/index.vue
  30. 53
      pages/user/myBangdan/index.vue
  31. 39
      pages/user/myCourses/index.vue
  32. 341
      pagesB/pages/user/signIn/Integral/index.vue
  33. BIN
      static/course-icon1.png
  34. BIN
      static/course-icon2.png
  35. BIN
      static/course-icon3.png
  36. BIN
      static/course-icon4.png
  37. BIN
      static/glod.png
  38. BIN
      static/jifen1.png
  39. BIN
      static/jifen2.png
  40. BIN
      static/jifen3.png
  41. BIN
      static/jifen4.png
  42. BIN
      static/myorder-icon1.png
  43. BIN
      static/myorder-icon2.png
  44. BIN
      static/myorder-icon3.png
  45. BIN
      static/myorder-icon4.png
  46. BIN
      static/myorder-icon5.png
  47. BIN
      static/tips.png
  48. BIN
      static/xyddImages/back.png
  49. BIN
      static/xyddImages/border2.png
  50. BIN
      static/xyddImages/btn-bg.png
  51. BIN
      static/xyddImages/light-bg.png
  52. BIN
      static/xyddImages/light-border.png
  53. BIN
      static/xyddImages/light-l.png
  54. BIN
      static/xyddImages/tabs-box-bg.png

10
App.vue

@ -103,7 +103,17 @@ export default {
/* .wx-checkbox-input.wx-checkbox-input-checked { /* .wx-checkbox-input.wx-checkbox-input-checked {
border: none !important; border: none !important;
} */ } */
radio .wx-radio-input {
transform: scale(0.6);
border-radius: 50% !important;
/* color: #ffffff !important; */
}
radio .wx-radio-input.wx-radio-input-checked {
color: #fff;
background: #FDBF68;
border-color: #FDBF68 !important;
}
/* #endif */ /* #endif */
</style> </style>

57
api/diandeng.js

@ -0,0 +1,57 @@
import request from "@/utils/request";
/**
* 获取祈福灯列表
*/
export function getLightList(data) {
return request.post("/BlessingLamp/listBlessingLamp", data);
}
/**
* 获取祈福灯广场
*/
export function blessingList(data) {
return request.get("/Blessing/blessingList?type="+data);
}
/**
* 获取我的祈福灯
*/
export function myBlessings(data) {
return request.get("/Blessing/myBlessings");
}
/**
* 为他人祈福
*/
export function blessingOthers(data) {
return request.post("/Blessing/blessingOthers",data);
}
/**
* 获取祈福灯详情
*/
export function blessingLampDetail(data) {
return request.get("/BlessingLamp/blessingLampDetail?id=" + data);
}
/**
* 点灯
*/
export function addBlessing(data) {
return request.post("/Blessing/addBlessing", data);
}
/**
* 万年历
*/
export function getWanniali(data) {
return request.get("/Wannianli/getWanniali?date", data);
}
/**
* 点灯开关
*/
export function getBlessingFlag(data) {
return request.get("/getBlessingFlag", data);
}

13
api/user.js

@ -448,3 +448,16 @@ export function getMyCourseList(q) {
export function getStudyList(q) { export function getStudyList(q) {
return request.get('/StudyList/getStudyListByMemberId?type='+q) return request.get('/StudyList/getStudyListByMemberId?type='+q)
} }
/*
* 获取签到状态
* */
export function integral(q) {
return request.post('/user/integral')
}
/*
* 签到
* */
export function signIntegral(q) {
return request.post('/sign/integral')
}

10
assets/css/base.less

@ -4,17 +4,17 @@
*/ */
.font-color-red { .font-color-red {
color: #E5270F !important; color: #F99C10 !important;
} }
.bg-color-red { .bg-color-red {
background-color: #E5270F !important; background-color: #F99C10 !important;
} }
.icon-color { .icon-color {
color: #E5270F; color: #F99C10;
} }
.cart-color { .cart-color {
color: #E5270F !important; color: #F99C10 !important;
border: 1px solid #E5270F !important; border: 1px solid #F99C10 !important;
} }
/* padding20 */ /* padding20 */
.padding20 { .padding20 {

4
components/CitySelect.vue

@ -250,8 +250,8 @@ export default {
text-overflow: ellipsis; text-overflow: ellipsis;
max-width: 40%; max-width: 40%;
&.active { &.active {
color: #f23030 !important; color: #F99C10 !important;
border-bottom: 1rpx solid #f23030; border-bottom: 1rpx solid #F99C10;
} }
} }
} }

12
components/OrderGoods.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="orderGoods"> <view class="orderGoods">
<view class="total">{{ cartInfo.length }}件商品</view> <!-- <view class="total">{{ cartInfo.length }}件商品</view> -->
<view class="goodWrapper"> <view class="goodWrapper">
<view class="item acea-row-nowrap" 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"> <view class="pictrue">
@ -9,10 +9,13 @@
<view class="text"> <view class="text">
<view class="acea-row row-between-wrapper"> <view class="acea-row row-between-wrapper">
<view class="name line1">{{ cart.productInfo.storeName }}</view> <view class="name line1">{{ cart.productInfo.storeName }}</view>
</view>
<view class="acea-row-nowrap row-middle">
<view class="attr" v-if="cart.productInfo.attrInfo">{{ cart.productInfo.attrInfo.sku }}</view>
<view class="num">x {{ cart.cartNum }}</view> <view class="num">x {{ cart.cartNum }}</view>
</view> </view>
<view class="attr line1" v-if="cart.productInfo.attrInfo">{{ cart.productInfo.attrInfo.sku }}</view> <view class="money"><text class="sm-word"></text>{{ cart.productInfo.price }}<text class="sm-word" v-if="cart.productInfo.giveIntegral > 0">+{{ cart.productInfo.giveIntegral }}积分</text></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 font-color-red" v-if="isIntegral">{{ cart.costPrice }}积分</view>
<view class="money" v-else><text class="sm-word"></text>{{ cart.truePrice }}</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 class="evaluate" v-if="evaluate == 3 && cart.isReply == 0" @click="routerGo(cart)">评价</view>
@ -60,6 +63,8 @@ export default {
border-radius: 10rpx; border-radius: 10rpx;
} }
.attr{ .attr{
width: auto;
margin-right: 12rpx;
color: #999; color: #999;
font-size: 24rpx; font-size: 24rpx;
line-height: 34rpx; line-height: 34rpx;
@ -77,6 +82,7 @@ export default {
font-size: 38rpx; font-size: 38rpx;
color: #E5270F; color: #E5270F;
font-weight: 500; font-weight: 500;
margin-top: 38rpx;
} }
.sm-word{ .sm-word{
font-size: 24rpx; font-size: 24rpx;

5
config/index.js

@ -1,10 +1,11 @@
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api'; // 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 = '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://139.186.134.205:9006/api'
// export const VUE_APP_API_URL = 'http://192.168.0.114: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 = 'https://www.cyjyyjy.com/api'
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/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://thapi.xinxintuan.co/api'
// export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api'; // export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';
// export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api'; // export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';
export const VUE_APP_RESOURCES_URL = 'https://h5.yixiang.co/static' export const VUE_APP_RESOURCES_URL = 'https://h5.yixiang.co/static'

27
pages.json

@ -3,7 +3,7 @@
{ {
"path": "pages/Loading/index", "path": "pages/Loading/index",
"style": { "style": {
"navigationBarTitleText": "禪易精舍" "navigationBarTitleText": "禅易教育研究院"
} }
}, },
{ {
@ -40,13 +40,28 @@
{ {
"path": "pages/home/index", "path": "pages/home/index",
"style": { "style": {
"navigationBarTitleText": "禪易" "navigationBarTitleText": "禅易教育研究院"
}
},
{
"path": "pages/diandeng/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/diandeng/lighting",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/course/index", "path": "pages/course/index",
"style": { "style": {
"navigationBarTitleText": "学习" "navigationBarTitleText": "课程",
"enablePullDownRefresh": true
} }
}, },
{ {
@ -214,7 +229,7 @@
{ {
"path": "pages/serviceTeacher/index", "path": "pages/serviceTeacher/index",
"style": { "style": {
"navigationBarTitleText": "禪易" "navigationBarTitleText": "禅易教育研究院"
} }
}, },
{ {
@ -604,13 +619,13 @@
"pagePath": "pages/home/index", "pagePath": "pages/home/index",
"iconPath": "static/tab1-d.png", "iconPath": "static/tab1-d.png",
"selectedIconPath": "static/tab1.png", "selectedIconPath": "static/tab1.png",
"text": "禪易" "text": "首页"
}, },
{ {
"pagePath": "pages/course/index", "pagePath": "pages/course/index",
"iconPath": "static/tab2-d.png", "iconPath": "static/tab2-d.png",
"selectedIconPath": "static/tab2.png", "selectedIconPath": "static/tab2.png",
"text": "学习" "text": "课程"
}, },
{ {
"pagePath": "pages/knowledge/index", "pagePath": "pages/knowledge/index",

73
pages/course/detail.vue

@ -2,11 +2,12 @@
<view class="course-detail-index"> <view class="course-detail-index">
<view v-if="$store.getters.token || userInfo.uid"> <view v-if="$store.getters.token || userInfo.uid">
<view class="swiper-box"> <view class="swiper-box">
<swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000"> <view class="swiper-item"><image :src="item" mode="aspectFill" v-for="(item,index) in detail.imageArr"></image></view>
<!-- <swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000">
<swiper-item v-for="(item,index) in detail.imageArr" :key="index"> <swiper-item v-for="(item,index) in detail.imageArr" :key="index">
<view class="swiper-item"><image :src="item" mode="aspectFill"></image></view> <view class="swiper-item"><image :src="item" mode="aspectFill"></image></view>
</swiper-item> </swiper-item>
</swiper> </swiper> -->
</view> </view>
<view class="course-info-box"> <view class="course-info-box">
<view class="course-title">{{detail.courseName}}</view> <view class="course-title">{{detail.courseName}}</view>
@ -33,7 +34,7 @@
<image :src="item.photoPath"></image> <image :src="item.photoPath"></image>
<view class="name">{{item.name}}</view> <view class="name">{{item.name}}</view>
<view class="tip">禪易能量高级讲师</view> <view class="tip">禪易能量高级讲师</view>
<view class="desc">{{item.introduction}}</view> <view class="desc" :class="item.introductionType == 0 ? 'left' : 'center'">{{item.introduction}}</view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
@ -42,7 +43,8 @@
<view class="left-line"></view> <view class="left-line"></view>
<span>课程简介</span> <span>课程简介</span>
</view> </view>
<text class="desc">{{detail.courseIntroduce}}</text> <!-- <text class="desc">{{detail.courseIntroduce}}</text> -->
<rich-text class="content" :nodes="detail.courseIntroduce"></rich-text>
</view> </view>
<view class="course-desc-box content" id="content2"> <view class="course-desc-box content" id="content2">
<view class="title-box acea-row row-middle"> <view class="title-box acea-row row-middle">
@ -98,11 +100,12 @@
<view class="time">{{courseStartTime}}~{{courseEndTime}}</view> <view class="time">{{courseStartTime}}~{{courseEndTime}}</view>
<view class="address">{{item.coursePlace}}</view> <view class="address">{{item.coursePlace}}</view>
<view class="type-box acea-row row-between row-middle"> <view class="type-box acea-row row-between row-middle">
<view class="price">{{item.levelName}}</view> <!-- <view class="price">{{item.levelName}}</view> -->
<view></view>
<!-- <view class="price" v-if="item.level == 2">{{item.courseCharge}}</view> <!-- <view class="price" v-if="item.level == 2">{{item.courseCharge}}</view>
<view class="price colG" v-if="item.chargeType == 0">免费</view> --> <view class="price colG" v-if="item.chargeType == 0">免费</view> -->
<view class="signin-btn red">去报名</view> <view class="signin-btn yellow">去报名</view>
</view> </view>
</view> </view>
</view> </view>
@ -122,14 +125,14 @@
<view class="btn-box acea-row row-between-wrapper" v-if="userInfo.phone != '' && teacherId != null && detail.haveSeller == 0 && detail.enterState == 0"> <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 class="count-down">
<view>距离截止时间还剩</view> <view>距离截止时间还剩</view>
<uni-countdown color="#EB5744" :day="day" :hour="hour" :minute="minute" :second="second" /> <uni-countdown color="#F99C10" :day="day" :hour="hour" :minute="minute" :second="second" />
</view> </view>
<view class="signin-btn" @click="signInClick(2)">立即报名</view> <view class="signin-btn" @click="signInClick(2)">立即报名</view>
</view> </view>
<view class="btn-box acea-row row-between-wrapper" v-if="userInfo.phone != '' && detail.haveSeller == 1 && detail.enterState == 0"> <view class="btn-box acea-row row-between-wrapper" v-if="userInfo.phone != '' && detail.haveSeller == 1 && detail.enterState == 0">
<view class="count-down"> <view class="count-down">
<view>距离截止时间还剩</view> <view>距离截止时间还剩</view>
<uni-countdown color="#EB5744" :day="day" :hour="hour" :minute="minute" :second="second" /> <uni-countdown color="#F99C10" :day="day" :hour="hour" :minute="minute" :second="second" />
</view> </view>
<view class="signin-btn" @click="signInClick(2)">立即报名</view> <view class="signin-btn" @click="signInClick(2)">立即报名</view>
</view> </view>
@ -143,13 +146,13 @@
<!-- #ifdef MP-WEIXIN --> <!-- #ifdef MP-WEIXIN -->
<button open-type="getPhoneNumber" <button open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber" v-if="userInfo.phone == '' && detail.haveSeller == 0 && detail.enterState == 0" class="binding signin-btn call-btn" v-else> @getphonenumber="getPhoneNumber" v-if="userInfo.phone == '' && detail.haveSeller == 0 && detail.enterState == 0" class="binding signin-btn call-btn" v-else>
<text>绑定手机号</text> <text>点击绑定手机号</text>
</button> </button>
<!-- #endif --> <!-- #endif -->
<!-- #ifndef MP-WEIXIN --> <!-- #ifndef MP-WEIXIN -->
<button class="binding" @click="goBindPhone()" v-if="userInfo.phone == '' && detail.haveSeller == 0"> <button class="binding" @click="goBindPhone()" v-if="userInfo.phone == '' && detail.haveSeller == 0">
<text>绑定手机号</text> <text>点击绑定手机号</text>
</button> </button>
<!-- #endif --> <!-- #endif -->
</view> </view>
@ -256,7 +259,7 @@
iv: e.mp.detail.iv, iv: e.mp.detail.iv,
}) })
.then(res => { .then(res => {
// this.User(); if(res.success){
thit.$store.dispatch('userInfo', true) thit.$store.dispatch('userInfo', true)
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
@ -264,6 +267,18 @@
icon: 'success', icon: 'success',
duration: 2000, duration: 2000,
}) })
} else{
uni.hideLoading()
uni.showModal({
title:'提示!',
content:'授权已过期,请重新授权后绑定手机号',
success:function(res){
if(res.confirm){
thit.$store.commit('logout')
}
},
})
}
}) })
.catch(error => { .catch(error => {
uni.hideLoading() uni.hideLoading()
@ -301,8 +316,8 @@
let nowTime = Date.parse(new Date())/1000; let nowTime = Date.parse(new Date())/1000;
getCourseDetail({id:this.courseId}).then((res)=>{ getCourseDetail({id:this.courseId}).then((res)=>{
uni.hideLoading() uni.hideLoading()
res.data.courseIntroduce = res.data.courseIntroduce.replace(/\<img/g, "<img style='width: 100%;'")
this.detail = res.data this.detail = res.data
console.log(this.detail,'this.detail')
let t = res.data.signEndTime.replace(/-/g, '/'); let t = res.data.signEndTime.replace(/-/g, '/');
let endTime = Date.parse(new Date(t))/1000 let endTime = Date.parse(new Date(t))/1000
this.times = endTime - nowTime; this.times = endTime - nowTime;
@ -511,6 +526,14 @@
.swiper-box{ .swiper-box{
width: 100%; width: 100%;
height: 340rpx; height: 340rpx;
.swiper-item{
width: 100%;
height: 100%;
image{
width: 100%;
height: 100%;
}
}
swiper{ swiper{
height: 100%; height: 100%;
.swiper-item{ .swiper-item{
@ -574,7 +597,7 @@
.tab-item-active{ .tab-item-active{
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
border-bottom: 4rpx solid #EB5744; border-bottom: 4rpx solid #F99C10;
} }
} }
.fixed{ .fixed{
@ -631,6 +654,12 @@
width: 100%; width: 100%;
white-space: pre-wrap; white-space: pre-wrap;
} }
.left{
text-align: left;
}
.center{
text-align: center;
}
} }
.title-box{ .title-box{
font-size: 36rpx; font-size: 36rpx;
@ -641,7 +670,7 @@
.left-line{ .left-line{
width: 6rpx; width: 6rpx;
height: 32rpx; height: 32rpx;
background-color: #EB5744; background-color: #F99C10;
margin-right: 16rpx; margin-right: 16rpx;
} }
} }
@ -673,14 +702,14 @@
.recommend-box{ .recommend-box{
.title-box{ .title-box{
font-size: 32rpx; font-size: 32rpx;
color: #EB5744; color: #F99C10;
.title{ .title{
margin: 0 10rpx; margin: 0 10rpx;
} }
.row-line{ .row-line{
width: 36rpx; width: 36rpx;
height: 2rpx; height: 2rpx;
border: 2rpx solid #EB5744; border: 2rpx solid #F99C10;
} }
} }
.knowledge-list { .knowledge-list {
@ -721,10 +750,10 @@
.type-box { .type-box {
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
margin-top: 28rpx; margin-top: 20rpx;
.price{ .price{
font-size: 28rpx; font-size: 28rpx;
color: #EA533E; color: #F99C10;
font-weight: 500; font-weight: 500;
} }
.signin-btn{ .signin-btn{
@ -766,7 +795,7 @@
left: 0; left: 0;
.price{ .price{
font-size: 44rpx; font-size: 44rpx;
color: #EA533E; color: #F99C10;
} }
.fz24{ .fz24{
font-size: 24rpx; font-size: 24rpx;
@ -778,7 +807,7 @@
width: 410rpx; width: 410rpx;
height: 80rpx; height: 80rpx;
border-radius: 44px; border-radius: 44px;
border: 2rpx solid #EB5744; border: 2rpx solid #F99C10;
box-sizing: border-box; box-sizing: border-box;
overflow: hidden; overflow: hidden;
.count-down{ .count-down{
@ -788,7 +817,7 @@
color: #999; color: #999;
} }
.colR{ .colR{
color: #EB5744; color: #F99C10;
} }
.signin-btn{ .signin-btn{
width: 178rpx; width: 178rpx;
@ -796,7 +825,7 @@
line-height: 84rpx; line-height: 84rpx;
font-size: 32rpx; font-size: 32rpx;
color: #fff; color: #fff;
background: #EB5744; background: #F99C10;
} }
} }
.call-btn{ .call-btn{

32
pages/course/index.vue

@ -28,7 +28,7 @@
</SecondMenu> </SecondMenu>
</view> </view>
<view class="bangdan-box" v-if="studyList.length > 0"> <view class="bangdan-box" v-if="studyList.length > 0">
<view class="active-word">学习</view> <view class="active-word">打卡</view>
<view class="bangdan-list"> <view class="bangdan-list">
<scroll-view class="scroll-view_H" scroll-x="true" v-if="studyList.length > 0"> <scroll-view class="scroll-view_H" scroll-x="true" v-if="studyList.length > 0">
<view class="bangdan-item" <view class="bangdan-item"
@ -61,9 +61,10 @@
<view class="address">{{item.coursePlace}}</view> <view class="address">{{item.coursePlace}}</view>
<view class="type-box acea-row row-between row-middle"> <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">{{item.levelName}}</view> -->
<view></view>
<!-- <view class="price colG" v-if="item.chargeType == 0">免费</view> --> <!-- <view class="price colG" v-if="item.chargeType == 0">免费</view> -->
<view class="signin-btn red">去报名</view> <view class="signin-btn yellow">去报名</view>
</view> </view>
</view> </view>
</view> </view>
@ -192,7 +193,6 @@
}, },
getCourses() { getCourses() {
var cid = null; var cid = null;
console.log(this.currentTab)
this.active == null ? cid = this.currentTab.id : cid = this.active this.active == null ? cid = this.currentTab.id : cid = this.active
getCourses({categoryId: cid,listState:0,uid:this.userInfo.uid}).then((res) => { getCourses({categoryId: cid,listState:0,uid:this.userInfo.uid}).then((res) => {
if (res.success) { if (res.success) {
@ -236,6 +236,24 @@
this.categoryTitle = item.categoryName; this.categoryTitle = item.categoryName;
this.getStudyList() this.getStudyList()
this.getCourses() this.getCourses()
},
onPullDownRefresh() {
getCategory().then((res) => {
this.tabList = res.data
this.$set(this, 'secondMenu', res.data[0].categoryList)
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()
})
} }
} }
} }
@ -287,8 +305,8 @@
color: #999999; color: #999999;
} }
.tab-item-active{ .tab-item-active{
color: #EA533E; color: #F99C10;
border-bottom: 2px solid #EA533E; border-bottom: 2px solid #F99C10;
font-weight: bold; font-weight: bold;
} }
} }
@ -408,7 +426,7 @@
.type-box { .type-box {
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
margin-top: 28rpx; margin-top: 20rpx;
.price{ .price{
font-size: 28rpx; font-size: 28rpx;
color: #EA533E; color: #EA533E;

534
pages/diandeng/index.vue

@ -0,0 +1,534 @@
<template>
<view class="container" id="container">
<view class="back-btn" :style="{top:CustomBar + 'rpx'}" @click="backPrevPage()">
<image src="../../static/xyddImages/back.png" mode=""></image>
</view>
<view class="float-light"><image src="https://qiniu.upload.gznl.top/d4bd8c56-2c69-4f1d-b664-8c2cb476f17c.png"></view>
<view class="float-light float-light2"><image src="https://qiniu.upload.gznl.top/d4bd8c56-2c69-4f1d-b664-8c2cb476f17c.png"></view>
<view class="float-light float-light3"><image src="https://qiniu.upload.gznl.top/d4bd8c56-2c69-4f1d-b664-8c2cb476f17c.png"></view>
<view class="tabs-box acea-row row-middle row-center">
<view class="tab-item" :class="current == 0 ? 'active' : ''" @click="tabClick(0)">点灯祈福</view>
<view class="col-line"></view>
<view class="tab-item" :class="current == 1 ? 'active' : ''" @click="tabClick(1)">祈福灯广场</view>
<view class="col-line"></view>
<view class="tab-item" :class="current == 2 ? 'active' : ''" @click="tabClick(2)">我的祈福灯</view>
</view>
<!-- 点灯祈福 -->
<view class="content-box content1-box" v-if="current == 0">
<view class="content1-top-box acea-row row-center-wrapper">
<view class="top-box-content">
<view class="acea-row-nowrap">
<view class="light-box">
<view class="light-l-box">
<image :src="topLight[0].lampPic" alt="">
<text>{{topLight[0].lampName}}</text>
</view>
</view>
<view class="light-desc-box">
<view class="light-name">{{topLight[0].lampName}}</view>
<!-- <view class="current-year">{{topLight[0].lampIntroduce}}</view> -->
<view class="light-desc">{{topLight[0].lampIntroduce}}</view>
</view>
</view>
<view class="btn-box" @click="toLighting(topLight[0].id)">我要点灯</view>
</view>
<view class="right-image"><image src="https://qiniu.upload.gznl.top/3a51ab9e-3b02-4dca-aec3-7c7f00a2b6cb.png" ></view>
<view class="cloud1"><image src="https://qiniu.upload.gznl.top/e5277b85-8a22-4448-931b-b0f0540b1dd7.png" ></view>
<view class="cloud2"><image src="https://qiniu.upload.gznl.top/f442f228-c6e8-4491-a8cf-feff34be6f61.png" ></view>
</view>
<view class="light-list-box acea-row row-between">
<view class="light-item" v-for="(item,index) in lightList" :key="item.id">
<view class="light-name">{{item.lampName}}</view>
<view class="light-box"><image :src="item.lampPic" ></view>
<view class="btn" @click="toLighting(item.id)"><image src="../../static/xyddImages/btn-bg.png" alt=""></view>
</view>
</view>
</view>
<!-- 祈福灯广场 -->
<view class="content-box content2-box" v-if="current == 1">
<view class="content2-top-box">
<view class="right-image"><image src="https://qiniu.upload.gznl.top/3a51ab9e-3b02-4dca-aec3-7c7f00a2b6cb.png" ></view>
<view class="cloud2"><image src="https://qiniu.upload.gznl.top/f442f228-c6e8-4491-a8cf-feff34be6f61.png" ></view>
<view class="title-box"><image src="https://qiniu.upload.gznl.top/09668a77-149a-4e88-be8b-5d3edff449a6.png" alt=""></view>
<view class="content2-tabs-box acea-row row-between">
<view class="content2-tab-item" :class="active == 1 ? 'content2-tab-item-active' : ''" @click="tab2Click(1)">最新祈福灯</view>
<view class="content2-tab-item" :class="active == 2 ? 'content2-tab-item-active' : ''" @click="tab2Click(2)">本周最亮祈福灯</view>
<view class="content2-tab-item" :class="active == 3 ? 'content2-tab-item-active' : ''" @click="tab2Click(3)">最亮祈福灯</view>
</view>
<view class="lightUp-list">
<view class="lightUp-item acea-row row-middle" v-for="(item,index) in lightingList" :key="item.id">
<view class="light-l-box">
<image :src="item.lampPhoto" alt="">
<text>{{item.blessingLampName}}</text>
</view>
<view class="userInfo-box">
<view class="user-name red">{{item.blessingPersonRealname}}</view>
<view class="word line2">{{item.blessingContent}}</view>
<view class="word2">已有<text class="red">{{item.beBlessedTimes}}</text>人为Ta祈福</view>
</view>
<view class="btn-box"
:class="!item.isVote ? '' : 'default'"
@click="blessingOthers(item)">{{item.isVote ? '已祈福' : '为他祈福'}}</view>
</view>
</view>
</view>
</view>
<!-- 我的祈福灯 -->
<view class="content-box content2-box" v-if="current == 2">
<view class="content2-top-box">
<view class="right-image"><image src="https://qiniu.upload.gznl.top/3a51ab9e-3b02-4dca-aec3-7c7f00a2b6cb.png" ></view>
<view class="cloud2"><image src="https://qiniu.upload.gznl.top/f442f228-c6e8-4491-a8cf-feff34be6f61.png" ></view>
<view class="title-box"><image src="https://qiniu.upload.gznl.top/35dc97c2-5b89-4248-8b78-728fb384d70f.png" alt=""></view>
<view class="lightUp-list">
<view class="lightUp-item acea-row row-middle" v-for="(item,index) in lightingList" :key="item.id">
<view class="light-l-box">
<image :src="item.lampPhoto" alt="">
<text>{{item.blessingLampName}}</text>
</view>
<view class="userInfo-box">
<view class="user-name red">{{item.blessingPersonRealname}}</view>
<view class="word line2">{{item.blessingContent}}</view>
<view class="word2">已有<text class="red">{{item.beBlessedTimes}}</text>人为Ta祈福</view>
</view>
<view class="btn-box">已亮{{item.lightedDays}}</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { getLightList, blessingList, myBlessings, blessingOthers } from '@/api/diandeng.js'
export default{
data(){
return {
current: 0,
active: 1,
CustomBar: this.CustomBar,
lightList: [],
topLight:null,
lightingList:[],
}
},
onLoad(){
uni.showLoading({
title:'正在加载中...'
})
this.getLightList();
},
mounted(){
console.log(this.CustomBar);
},
methods: {
getLightList(){
getLightList().then((res)=>{
if(res.success){
this.lightList = res.data
this.topLight = res.data.filter((item)=>{
return item.isTop == 1
})
}
uni.hideLoading()
})
},
tabClick(idx){
this.current = idx;
if(idx == 1){
this.getLihtingList()
} else if(idx == 2){
this.getMyLihtingList()
}
},
//
getMyLihtingList(){
myBlessings().then((res)=>{
if(res.success){
this.lightingList = res.data
}
})
},
//广
getLihtingList(){
blessingList(this.active).then((res)=>{
if(res.success){
this.lightingList = res.data
}
})
},
tab2Click(idx){
this.active = idx;
this.getLihtingList(idx)
},
blessingOthers(item){
let that = this;
if(item.isVote){
uni.showToast({
title: '已为他祈福过了!',
icon: 'none'
})
return
}
uni.showModal({
title: '提示',
content: '是否确认为Ta祈福?',
success: function (res) {
if (res.confirm) {
blessingOthers({blessingId:item.id}).then((res)=>{
if(res.success){
uni.showToast({
title: '祈福成功!'
})
that.getLihtingList(that.active)
}
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
backPrevPage(){
this.$yrouter.switchTab("/pages/home/index");
},
toLighting(i){
this.$yrouter.push({
path: '/pages/diandeng/lighting',
query: {
id: i
},
})
}
}
}
</script>
<style lang="less">
image{
width: 100%;
height: 100%;
}
@font-face {
font-family: mFont;
src: url('https://www.cyjyyjy.com:8081/static/PangMenZhengDaoCuShuTi-2.ttf');
}
.back-btn{
width: 72rpx;
height: 72rpx;
position: fixed;
left: 40rpx;
text-align: center;
line-height: 72rpx;
z-index: 99;
image{
width: 36rpx;
height: 36rpx;
}
}
.container{
width: 100%;
height: 2600rpx;
overflow: hidden;
background: url(https://qiniu.upload.gznl.top/c3478068-dcaf-4a09-86e8-f018700edd3d.png) no-repeat center;
background-size: 100% 100%;
padding-top: 360rpx;
position: relative;
}
.float-light{
width: 70rpx;
height: 154rpx;
position: absolute;
animation: lightMove 15s ease-in;
animation-iteration-count: infinite;
opacity: 0.4;
}
.float-light2{
animation: lightMove2 25s ease-in;
animation-iteration-count: infinite;
}
.float-light3{
animation: lightMove3 20s ease-in;
animation-iteration-count: infinite;
}
@keyframes lightMove{
0%{
bottom: -100rpx;
left: 0rpx;
}
100%{
bottom: 100%;
left: 500rpx;
}
}
@keyframes lightMove2{
0%{
bottom: -200rpx;
left: 300rpx;
}
100%{
bottom: 100%;
left: 240rpx;
}
}
@keyframes lightMove3{
0%{
bottom: -200rpx;
left: 600rpx;
}
100%{
bottom: 100%;
left: 0rpx;
}
}
.tabs-box{
width: 685rpx;
height: 95rpx;
background: url(../../static/xyddImages/tabs-box-bg.png) no-repeat center;
background-size: 100% 100%;
margin: 0 auto;
font-size: 32rpx;
color: #CECECE;
}
.tabs-box .active{
font-size: 32rpx;
color: #F7D08E;
}
.col-line{
width: 1rpx;
height: 28rpx;
background: #F7D08E;
margin: 0 16rpx;
}
.content1-box .content1-top-box{
width: 685rpx;
height: 350rpx;
border: 2rpx solid #F7D08E;
border-radius: 8rpx;
margin: 36rpx auto 0;
position: relative;
}
.content1-box .content1-top-box .top-box-content{
width: 534rpx;
height: 314rpx;
background: #FFDA9B;
border: 2rpx solid #F7D08E;
border-radius: 12rpx;
box-sizing: border-box;
padding: 20rpx 22rpx 12rpx 34rpx;
font-size: 28rpx;
color: #FFDCAB;
position: relative;
}
.light-l-box{
width: 112rpx;
height: 244rpx;
background: url(../../static/xyddImages/light-bg.png) no-repeat center;
background-size: 100% 100%;
font-family: mFont;
box-sizing: border-box;
padding-top: 48rpx;
text-align: center;
}
.light-l-box image{
width: 72rpx;
height: 74rpx;
display: block;
margin: 0 auto;
}
.light-desc-box{
margin-left: 28rpx;
font-family: mFont;
}
.light-desc-box .light-name{
font-size: 36rpx;
line-height: 50rpx;
color: #FF322D;
}
.current-year{
font-size: 28rpx;
color: #FF9C10;
margin: 6rpx 0 12rpx;
line-height: 28rpx;
}
.light-desc{
font-size: 30rpx;
line-height: 28rpx;
color: #FF9C10;
}
.top-box-content .btn-box{
width: 232rpx;
height: 48rpx;
background: linear-gradient(180deg, #FFD190 0%, #E88739 100%);
border-radius: 4rpx;
text-align: center;
line-height: 48rpx;
color: #fff;
font-size: 28rpx;
position: absolute;
bottom: 10px;
left: 50%;
margin-left: -122rpx;
z-index: 10;
}
.right-image{
width: 234rpx;
height: 200rpx;
position: absolute;
top: -70rpx;
right: -30rpx;
}
.cloud1{
width: 212rpx;
height: 212rpx;
position: absolute;
top: 140rpx;
right: -30rpx;
}
.cloud2{
width: 422rpx;
height: 212rpx;
position: absolute;
bottom: -60rpx;
left: -40rpx;
}
.light-list-box{
width: 100%;
box-sizing: border-box;
padding: 0 32rpx;
margin-top: 30rpx;
}
.light-item{
width: 202rpx;
height: 228rpx;
background: url(../../static/xyddImages/light-border.png) no-repeat center;
background-size: 100% 100%;
position: relative;
font-family: mFont;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-bottom: 46rpx;
}
.light-item .light-name{
position: absolute;
left: 12rpx;
top: 16rpx;
font-size: 28rpx;
color: #F7D08E;
writing-mode:tb-rl;
}
.light-item .light-box{
width: 144rpx;
height: 156rpx;
}
.light-item .btn{
width: 102rpx;
height: 34rpx;
}
.content2-top-box{
width: 685rpx;
min-height: 900rpx;
background: #FFDA9B;
border: 2rpx solid #F7D08E;
border-radius: 12rpx;
position: relative;
margin: 50rpx auto 0;
}
.content2-top-box .right-image{
position: absolute;
left: -60rpx;
top: -100rpx;
transform: rotateY(180deg) scale(0.9);
}
.content2-top-box .cloud2{
}
.content2-top-box .title-box{
width: 466rpx;
height: 104rpx;
margin: 20rpx auto;
}
.content2-tabs-box{
font-size: 24rpx;
color: #B5B5B5;
padding: 0 28rpx;
box-sizing: border-box;
}
.content2-tab-item-active{
border-bottom: 6rpx solid #F3B153;
color: #000;
}
.lightUp-list{
height: 800rpx;
padding: 0 28rpx;
overflow-y: scroll;
box-sizing: border-box;
margin-top: 24rpx;
}
.lightUp-list .lightUp-item{
width: 632rpx;
height: 218rpx;
background: #FFE7BC;
border-radius: 8rpx;
font-size: 24rpx;
margin-bottom: 32rpx;
}
.lightUp-item .light-l-box{
color: #FFDCAB;
margin-left: 52rpx;
margin-right: 36rpx;
}
.lightUp-item .light-l-box{
width: 100rpx;
height: 200rpx;
padding-top: 32rpx;
}
.lightUp-item .light-l-box image{
width: 68rpx;
height: 70rpx;
}
.userInfo-box{
width: 286rpx;
font-size: 24rpx;
color: #292929;
height: 100%;
display: flex;
flex-direction: column;
justify-content: flex-start;
}
.userInfo-box .red{
color: #F53F3F;
}
.user-name{
margin-top: 30rpx;
}
.word{
margin-top: 32rpx;
margin-bottom: 8rpx;
line-height: 34rpx;
}
.lightUp-list .btn-box{
margin-left: 0;
}
.btn-box{
width: 148rpx;
height: 59rpx;
background: linear-gradient(180deg, #F7D08E 0%, #ECBE71 100%);
border-radius: 12rpx;
text-align: center;
line-height: 59rpx;
font-size: 24rpx;
color: #fff;
margin-left: 74rpx;
margin-top: 50rpx;
}
.default{
background: #999;
}
</style>

453
pages/diandeng/lighting.vue

@ -0,0 +1,453 @@
<template>
<view class="container" id="container">
<view class="back-btn" :style="{top:CustomBar + 'rpx'}" @click="backPrevPage()">
<image src="../../static/xyddImages/back.png" mode=""></image>
</view>
<view class="float-light"><image src="https://qiniu.upload.gznl.top/d4bd8c56-2c69-4f1d-b664-8c2cb476f17c.png"></view>
<view class="float-light float-light2"><image src="https://qiniu.upload.gznl.top/d4bd8c56-2c69-4f1d-b664-8c2cb476f17c.png"></view>
<view class="float-light float-light3"><image src="https://qiniu.upload.gznl.top/d4bd8c56-2c69-4f1d-b664-8c2cb476f17c.png"></view>
<!-- 点灯祈福 -->
<view class="content-box content1-box">
<view class="content1-top-box acea-row row-center-wrapper">
<view class="right-image"><image src="https://qiniu.upload.gznl.top/3a51ab9e-3b02-4dca-aec3-7c7f00a2b6cb.png" ></view>
<view class="form-box">
<form action="" method="post">
<view class="input-box">
<text class="label-box">您的姓名</text>
<input type="text" placeholder="请输入姓名" v-model="form.blessingPersonRealname"/>
</view>
<view class="input-box">
<text class="label-box">出生日期</text>
<picker mode="date" :value="form.blessingPersonBirth" :start="startDate" :end="endDate" @change="bindDateChange">
<view class="input">{{form.blessingPersonBirth}}</view>
</picker>
</view>
<view class="input-box noBorder">
<text class="label-box">您的愿望</text>
<textarea type="text" placeholder="请输入心中愿望(140字以内)" v-model="form.blessingContent" maxlength="140"></textarea>
</view>
</form>
</view>
</view>
<view class="radio-box acea-row row-middle">
<text>在祈福灯广场显示</text>
<radio-group @change="radioChange" class="acea-row row-middle">
<label class="radio acea-row row-middle">
<radio value="1" :checked="form.isShow == 1" /><text>显示</text>
</label>
<label class="radio acea-row row-middle">
<radio value="0" :checked="form.isShow == 0" /><text>不显示</text>
</label>
</radio-group>
</view>
<view class="submit-btn" @click="lightingHandler">我要点灯</view>
</view>
<!-- 我的祈福灯 -->
<view class="content-box content2-box">
<view class="content2-top-box">
<view class="tips-box">温馨提示{{lightDetail.lampName}}祈福扣除{{lightDetail.lampPrice}}积分</view>
<view class="cloud2"><image src="https://qiniu.upload.gznl.top/f442f228-c6e8-4491-a8cf-feff34be6f61.png" ></view>
<view class="top-box-content">
<view class="acea-row-nowrap">
<view class="light-box">
<view class="light-l-box">
<image :src="lightDetail.lampPic" alt="">
<text>{{lightDetail.lampName}}</text>
</view>
</view>
<view class="light-desc-box">
<view class="light-name">{{lightDetail.lampName}}介绍</view>
<view class="light-desc">{{lightDetail.lampDetail}}</view>
</view>
</view>
<view class="effect-box mt50">
<view class="light-name">时效</view>
<view class="words">{{lightDetail.lightDays}}</view>
</view>
<view class="effect-box">
<view class="light-name">适用对象</view>
<view class="words">对2021年有着美好期待的人所有祈求好运的人</view>
</view>
<view class="effect-box">
<view class="light-name">祈福提示</view>
<view class="words">祈福点灯后在点灯期限内您的许愿灯将会一直长明在我的祈福灯您可以随时查看如果您选择公开展示您的祈福灯则祈福灯会同时出现在祈福广场与其它朋友的祈福灯一直常明</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { addBlessing, blessingLampDetail } from '@/api/diandeng.js'
export default{
data(){
return {
id:null,
form:{
blessingPersonRealname:'',
blessingPersonBirth:'2021-7-20',
blessingContent:'',
isShow: 1
},
CustomBar: this.CustomBar,
lightDetail:{}
}
},
onLoad(){
this.id = this.$yroute.query.id;
this.blessingLampDetail();
},
mounted(){
},
methods: {
blessingLampDetail(){
blessingLampDetail(this.id).then(res=>{
if(res.success){
this.lightDetail = res.data
}
})
},
bindDateChange: function(e) {
this.form.blessingPersonBirth = e.target.value;
},
lightingHandler(){
var that = this;
this.form.blessingLampId = this.id;
if(that.form.blessingPersonRealname == ''){
uni.showToast({
title: '请填写姓名!',
icon: 'none'
})
return
}
if(that.form.blessingContent == ''){
uni.showToast({
title: '请填写您的愿望!',
icon: 'none'
})
return
}
uni.showModal({
title: '提示',
content: '是否确认点灯?',
success: function (res) {
if (res.confirm) {
addBlessing(that.form).then((res)=>{
if(res.success){
uni.showToast({
title: '操作成功!',
duration:1500
})
setTimeout(()=>{
uni.navigateBack({
delta:1
})
},1500)
} else{
uni.showToast({
title: res.msg,
icon: 'none',
duration:1500
})
}
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
radioChange(e){
// console.log(e)
this.form.isShow = e.detail.value
},
backPrevPage(){
uni.navigateBack({
delta: 1
})
},
}
}
</script>
<style lang="less">
image{
width: 100%;
height: 100%;
}
@font-face {
font-family: mFont;
src: url('https://www.cyjyyjy.com:8081/static/PangMenZhengDaoCuShuTi-2.ttf');
}
.back-btn{
width: 72rpx;
height: 72rpx;
position: fixed;
z-index: 99;
left: 40rpx;
text-align: center;
line-height: 72rpx;
z-index: 99;
image{
width: 36rpx;
height: 36rpx;
}
}
.container{
width: 100%;
height: 2600rpx;
overflow: hidden;
background: url(https://qiniu.upload.gznl.top/c3478068-dcaf-4a09-86e8-f018700edd3d.png) no-repeat center;
background-size: 100% 100%;
padding-top: 360rpx;
position: relative;
}
.float-light{
width: 70rpx;
height: 154rpx;
position: absolute;
animation: lightMove 15s ease-in;
animation-iteration-count: infinite;
opacity: 0.4;
}
.float-light2{
animation: lightMove2 25s ease-in;
animation-iteration-count: infinite;
}
.float-light3{
animation: lightMove3 20s ease-in;
animation-iteration-count: infinite;
}
@keyframes lightMove{
0%{
bottom: -100rpx;
left: 0rpx;
}
100%{
bottom: 100%;
left: 500rpx;
}
}
@keyframes lightMove2{
0%{
bottom: -200rpx;
left: 300rpx;
}
100%{
bottom: 100%;
left: 240rpx;
}
}
@keyframes lightMove3{
0%{
bottom: -200rpx;
left: 600rpx;
}
100%{
bottom: 100%;
left: 0rpx;
}
}
.content1-box .content1-top-box{
width: 685rpx;
height: 350rpx;
border-radius: 8rpx;
margin: 36rpx auto 0;
position: relative;
background: #FFDA9B;
box-sizing: border-box;
padding: 24rpx 24rpx 0;
}
.form-box{
width: 100%;
height: 100%;
}
.input-box{
font-size: 30rpx;
color: #F8560E;
display: flex;
align-items: center;
width: 100%;
height: 68rpx;
border-bottom: 2rpx solid #FFCC84;
}
.input-box .label-box{
margin-right: 32rpx;
}
.input-box input{
background: transparent;
height: 100%;
border:0;
outline:none;
color: #414141;
}
.input{
color: #414141;
}
.noBorder{
border: none;
}
.input-box textarea{
width: 72%;
padding-top: 4rpx;
height: 100%;
background: transparent;
border:0;
outline:none;
color: #414141;
}
.radio-box{
font-size: 24rpx;
color: #FFDEAF;
justify-content: flex-end;
padding-right: 34rpx;
box-sizing: border-box;
padding-top: 28rpx;
}
.radio{
margin-right: 20rpx;
}
.submit-btn{
width: 360rpx;
height: 64rpx;
background: linear-gradient(180deg, #F7D08E 0%, #ECBE71 100%);
text-align: center;
line-height: 64rpx;
color: #fff;
border-radius: 12rpx;
font-size: 36rpx;
margin: 40rpx 0;
position: relative;
left: 50%;
margin-left: -180rpx;
}
.content2-box .top-box-content{
padding: 0 68rpx;
height: 314rpx;
background: #FFDA9B;
border-radius: 12rpx;
box-sizing: border-box;
padding: 10rpx 22rpx 50rpx 34rpx;
font-size: 28rpx;
color: #FFDCAB;
}
.mt50{
margin-top: 50rpx;
}
.light-l-box{
width: 112rpx;
height: 244rpx;
background: url(../../static/xyddImages/light-bg.png) no-repeat center;
background-size: 100% 100%;
font-family: mFont;
box-sizing: border-box;
padding-top: 48rpx;
text-align: center;
}
.light-l-box image{
width: 72rpx;
height: 74rpx;
display: block;
margin: 0 auto;
}
.light-desc-box{
margin-left: 28rpx;
}
.light-name{
font-size: 36rpx;
line-height: 44rpx;
color: #F18D00;
margin-bottom: 16rpx;
}
.current-year{
font-size: 28rpx;
color: #FF9C10;
margin: 6rpx 0 12rpx;
line-height: 24rpx;
}
.light-desc{
font-size: 28rpx;
line-height: 46rpx;
color: #232323;
}
.top-box-content .btn-box{
width: 232rpx;
height: 48rpx;
background: linear-gradient(180deg, #FFD190 0%, #E88739 100%);
border-radius: 4rpx;
text-align: center;
line-height: 48rpx;
color: #fff;
font-size: 28rpx;
margin: -30rpx auto;
}
.right-img{
width: 234rpx;
height: 200rpx;
position: absolute;
top: -70rpx;
right: -30rpx;
}
.cloud1{
width: 212rpx;
height: 212rpx;
position: absolute;
top: 14rpx;
right: -30rpx;
}
.cloud2{
width: 422rpx;
height: 212rpx;
position: absolute;
bottom: -60rpx;
left: -40rpx;
}
.content2-top-box{
width: 685rpx;
min-height: 972rpx;
background: #FFDA9B;
border: 2rpx solid #F7D08E;
border-radius: 12rpx;
position: relative;
margin: 0rpx auto 0;
}
.effect-box{
margin-bottom: 20rpx;
.light-name{
font-size: 34rpx;
}
}
.words{
font-size: 28rpx;
color: #232323;
line-height: 42rpx;
}
.btn-box{
width: 148rpx;
height: 59rpx;
background: linear-gradient(180deg, #F7D08E 0%, #ECBE71 100%);
border-radius: 12rpx;
text-align: center;
line-height: 59rpx;
font-size: 24rpx;
color: #fff;
margin-left: 74rpx;
margin-top: 50rpx;
}
.tips-box{
font-size: 24rpx;
margin: 20rpx 0;
color: #F93030;
text-align: center;
}
</style>

112
pages/home/index.vue

@ -19,7 +19,7 @@
<view class="today-fortune-box"> <view class="today-fortune-box">
<view class="top-box acea-row row-between-wrapper"> <view class="top-box acea-row row-between-wrapper">
<view class="title">今日·宜忌</view> <view class="title">今日·宜忌</view>
<view>{{dateStr}}</view> <view>{{year}}{{month}}{{day}}</view>
</view> </view>
<view class="date-box acea-row row-middle row-center"> <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="date-btn prev-btn"><image src="../../static/prev.png"></image></view>
@ -27,28 +27,28 @@
<view class="date-btn next-btn"><image src="../../static/next.png"></image></view> <view class="date-btn next-btn"><image src="../../static/next.png"></image></view>
</view> </view>
<view class="week-box"> <view class="week-box">
<span class="week">{{week}}</span> <span class="week">星期{{week}}</span>
<span>辛丑牛年 甲午月 丙戌日</span> <span>{{suici}}</span>
</view> </view>
<view class="fortune-detail"> <view class="fortune-detail">
<view class="fortune-n acea-row-nowrap mt20"> <view class="fortune-n acea-row-nowrap mt20">
<view class="fortune-icon nice"></view> <view class="fortune-icon nice"></view>
<view class="fortune">安机械 移徙 入宅 出行 祭祀 祈福 动土祭祀 祈福 动土</view> <view class="fortune">{{yi}}</view>
</view> </view>
<view class="fortune-b acea-row-nowrap mt20"> <view class="fortune-b acea-row-nowrap mt20">
<view class="fortune-icon bad"></view> <view class="fortune-icon bad"></view>
<view class="fortune">开市 伐木 作梁 作灶 </view> <view class="fortune">{{ji}}</view>
</view> </view>
</view> </view>
<view class="qiuqian-box"> <view class="qiuqian-box" v-if="flag == 1">
<image class="qiuqian-bg" src="../../static/qiuqian-bg.png"></image> <image class="qiuqian-bg" @click="todiandeng()" src="https://qiniu.upload.gznl.top/90a6420b-abd9-41e2-be4f-dcf10fe93bed.png"></image>
<view class="txt-box acea-row row-between-wrapper"> <!-- <view class="txt-box acea-row row-between-wrapper">
<view>今日还没有求签哦</view> <view></view>
<view class="qiuqin-btn">每日一签</view> <view class="qiuqin-btn" @click="todiandeng()">祈福点灯</view>
</view> -->
</view> </view>
</view> </view>
</view> <!-- <view class="fortune-menu-box acea-row row-between">
<view class="fortune-menu-box acea-row row-between">
<view class="fortune-menu-item acea-row row-middle" @click="toWebView()"> <view class="fortune-menu-item acea-row row-middle" @click="toWebView()">
<image src="../../static/f-menu1.png" mode=""></image> <image src="../../static/f-menu1.png" mode=""></image>
<text>周公解梦</text> <text>周公解梦</text>
@ -61,7 +61,7 @@
<image src="../../static/f-menu3.png" mode=""></image> <image src="../../static/f-menu3.png" mode=""></image>
<text>八字财运</text> <text>八字财运</text>
</view> </view>
</view> </view> -->
</view> </view>
<!-- 推荐课程 --> <!-- 推荐课程 -->
<view class="recommend-box p30"> <view class="recommend-box p30">
@ -129,7 +129,8 @@
<view class="author-box acea-row row-between"> <view class="author-box acea-row row-between">
<view class="acea-row"> <view class="acea-row">
<view class="author">{{item.author}}</view> <view class="author">{{item.author}}</view>
<view class="time">{{item.addTime}}</view> <view class="time">{{item.addTime.split(' ')[0]}}</view>
<view>{{item.visit}}人阅读</view>
</view> </view>
<view class="tips" <view class="tips"
:class="item.chargeType == 0 ? 'free-bg' : item.chargeType == 1 ? '' : 'jifen'"> :class="item.chargeType == 0 ? 'free-bg' : item.chargeType == 1 ? '' : 'jifen'">
@ -165,6 +166,8 @@ import { isWeixin, handleUrlParam } from '@/utils/index'
import { signCourse } from '@/api/knowledge' import { signCourse } from '@/api/knowledge'
import { getWanniali , getBlessingFlag } from '@/api/diandeng'
import { openShareAll } from '@/libs/wechat' import { openShareAll } from '@/libs/wechat'
const HAS_COUPON_WINDOW = 'has_coupon_window' const HAS_COUPON_WINDOW = 'has_coupon_window'
@ -221,14 +224,19 @@ export default {
benefit: [], benefit: [],
couponList: [], couponList: [],
bgImage: '', bgImage: '',
chinese: ['〇', '一', '二', '三', '四', '五', '六', '七', '八', '九'],
weeks: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
week:'', week:'',
suici:'',
year:'',
month:'',
day:'',
ji:'',
yi:'',
dateStr:'', dateStr:'',
todayDate:'', todayDate:'',
courseList: [], courseList: [],
studyList: [], studyList: [],
articleList: [] articleList: [],
flag:0
} }
}, },
computed: { computed: {
@ -252,10 +260,13 @@ export default {
uni.showLoading({ uni.showLoading({
title:'正在加载中...' title:'正在加载中...'
}) })
getCanvas() // getCanvas()
.then(res => {}) // .then(res => {})
.catch(error => { // .catch(error => {
this.homeData = JSON.parse(error.data.json) // this.homeData = JSON.parse(error.data.json)
// })
getBlessingFlag().then((res)=>{
this.flag = res.data
}) })
getHomeData().then(res => { getHomeData().then(res => {
uni.hideLoading() uni.hideLoading()
@ -275,54 +286,43 @@ export default {
that.$set(that, 'articleList', res.data.articleDtos) that.$set(that, 'articleList', res.data.articleDtos)
uni.hideLoading() uni.hideLoading()
that.setOpenShare() that.setOpenShare()
// that.doColorThief() })
getWanniali(this.dateStr2).then((res)=>{
console.log(res)
var data = res.data
if(res.success){
this.suici = JSON.parse(data.huangli.suici).join(' ')
this.week = data.week
this.todayDate = data.lunarmonth + data.lunarday
this.year = data.year
this.month = data.month
this.day = data.day
this.ji = JSON.parse(data.huangli.ji).join(' ')
this.yi = JSON.parse(data.huangli.yi).join(' ')
}
}) })
}, },
methods: { methods: {
...mapActions(['getLocation']), ...mapActions(['getLocation']),
// toWebView(){ todiandeng(){
// uni.navigateTo({ uni.navigateTo({
// url:'/pages/webView/index' url:'/pages/diandeng/index'
// }) })
// }, },
setDate(t){ setDate(t){
console.log()
let str = t.split(" ")[0].split("-")[1] + "." + t.split(" ")[0].split("-")[2] let str = t.split(" ")[0].split("-")[1] + "." + t.split(" ")[0].split("-")[2]
return str return str
}, },
getDate(){ getDate(){
var today = new Date(); var today = new Date();
var y = today.getFullYear().toString(); var y = today.getFullYear().toString();
console.log('y',y)
var m = (today.getMonth()+1).toString(); var m = (today.getMonth()+1).toString();
var d = today.getDate().toString(); var d = today.getDate().toString();
// var d = '22'
var day = today.getDay(); var day = today.getDay();
this.dateStr = y + '年' + m + '月' + d + '日' ; this.dateStr = y + '年' + m + '月' + d + '日';
this.week = this.weeks[day] this.dateStr2 = y + '-' + m + '-' + d ;
if (m.length == 2) {
if (m.charAt(0) == "0") {
this.todayDate += (this.chinese[m.charAt(1)] + "月");
}
if (m.charAt(0) == "1") {
this.todayDate += ("十" + this.chinese[m.charAt(1)] + "月");
}
} else {
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)]) + '日';
}
}, },
onShareTimeline: function() { onShareTimeline: function() {
return { return {
@ -834,7 +834,9 @@ export default {
// text-indent: 1em; // text-indent: 1em;
.author{ .author{
color: #EA533E; color: #EA533E;
margin-right: 12rpx; }
.time{
margin: 0 12rpx;
} }
.tips{ .tips{
width: 100rpx; width: 100rpx;

1
pages/knowledge/detail.vue

@ -41,7 +41,6 @@ export default{
}, },
onLoad(){ onLoad(){
this.id = this.$yroute.query.id; this.id = this.$yroute.query.id;
}, },
onShow(){ onShow(){
this.getDetail(); this.getDetail();

25
pages/knowledge/index.vue

@ -30,9 +30,9 @@
<image :src="item.imageInput" mode="aspectFill"></image> <image :src="item.imageInput" mode="aspectFill"></image>
</view> </view>
<view class="knowledge-info-box acea-row row-column row-between"> <view class="knowledge-info-box acea-row row-column row-between">
<view class="line1"> <view style="width: 100%;">
<view class="title line1">{{item.title}}</view> <view class="title line1">{{item.title}}</view>
<view class="intro line2">{{item.synopsis}}</view> <view class="intro">{{item.synopsis}}</view>
</view> </view>
<view class="type-box acea-row"> <view class="type-box acea-row">
<view class="tip" :class="item.chargeType == 0 ? 'free-bg' : item.chargeType == 1 ? '' : 'jifen'"> <view class="tip" :class="item.chargeType == 0 ? 'free-bg' : item.chargeType == 1 ? '' : 'jifen'">
@ -183,8 +183,8 @@
color: #999999; color: #999999;
} }
.tab-item-active{ .tab-item-active{
color: #EA533E; color: #F99C10;
border-bottom: 2px solid #EA533E; border-bottom: 2px solid #F99C10;
font-weight: bold; font-weight: bold;
} }
} }
@ -202,10 +202,10 @@
.introduce-box{ .introduce-box{
width: calc(100% - 60rpx); width: calc(100% - 60rpx);
height: auto; height: auto;
box-shadow: 0px 6rpx 14rpx 8rpx rgba(255,234,231,0.5); box-shadow: 0px 6rpx 14rpx 8rpx rgba(255, 237, 204, 1);
border-radius: 8px; border-radius: 8px;
overflow: hidden; overflow: hidden;
margin: 0rpx auto 30rpx; margin: 10rpx auto 30rpx;
padding-bottom: 30rpx; padding-bottom: 30rpx;
padding-left: 10rpx; padding-left: 10rpx;
position: relative; position: relative;
@ -232,7 +232,7 @@
display: block; display: block;
width: 16rpx; width: 16rpx;
height: 100%; height: 100%;
background: #FAEFED; // background: #F7D08E;
position: absolute; position: absolute;
left: -1rpx; left: -1rpx;
top: 50%; top: 50%;
@ -271,11 +271,20 @@
line-height: 32rpx; line-height: 32rpx;
} }
.intro{ .intro{
height: 82rpx; // height: 82rpx;
font-size: 28rpx; font-size: 28rpx;
color: #999999; color: #999999;
line-height: 40rpx; line-height: 40rpx;
margin: 8rpx 0 36rpx; margin: 8rpx 0 36rpx;
overflow:hidden;
text-overflow:ellipsis;
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
} }
.type-box{ .type-box{
font-size: 24rpx; font-size: 24rpx;

129
pages/order/MyOrder/index.vue

@ -1,51 +1,53 @@
<template> <template>
<view class="my-order" ref="container"> <view class="my-order" ref="container">
<view class="header bg-color-red"> <!-- <view class="header">
<view class="picTxt acea-row row-between-wrapper"> <view class="picTxt acea-row row-between-wrapper">
<view class="text"> <view class="text">
<view class="name">订单信息</view> <view class="name">订单信息</view>
<view>累计订单{{ orderData.orderCount || 0 }} 总消费{{ orderData.sumPrice || 0 }}</view> <view>累计订单{{ orderData.orderCount || 0 }} 总消费{{ orderData.sumPrice || 0 }}</view>
</view> </view>
</view> </view>
</view> </view> -->
<view class="nav acea-row row-around"> <view class="nav acea-row row-around">
<view class="item" :class="{ on: type === 0 }" @click="changeType(0)"> <view class="item" :class="{ on: type === 0 }" @click="changeType(0)">
<view>待付款</view> <view>待付款</view>
<view class="num">{{ orderData.unpaidCount || 0 }}</view> <!-- <view class="num">{{ orderData.unpaidCount || 0 }}</view> -->
</view> </view>
<view class="item" :class="{ on: type === 1 }" @click="changeType(1)"> <view class="item" :class="{ on: type === 1 }" @click="changeType(1)">
<view>待发货</view> <view>待发货</view>
<view class="num">{{ orderData.unshippedCount || 0 }}</view> <!-- <view class="num">{{ orderData.unshippedCount || 0 }}</view> -->
</view> </view>
<view class="item" :class="{ on: type === 2 }" @click="changeType(2)"> <view class="item" :class="{ on: type === 2 }" @click="changeType(2)">
<view>待收货</view> <view>待收货</view>
<view class="num">{{ orderData.receivedCount || 0 }}</view> <!-- <view class="num">{{ orderData.receivedCount || 0 }}</view> -->
</view> </view>
<view class="item" :class="{ on: type === 3 }" @click="changeType(3)"> <view class="item" :class="{ on: type === 3 }" @click="changeType(3)">
<view>待评价</view> <view>待评价</view>
<view class="num">{{ orderData.evaluatedCount || 0 }}</view> <!-- <view class="num">{{ orderData.evaluatedCount || 0 }}</view> -->
</view> </view>
<view class="item" :class="{ on: type === 4 }" @click="changeType(4)"> <view class="item" :class="{ on: type === 4 }" @click="changeType(4)">
<view>已完成</view> <view>已完成</view>
<view class="num">{{ orderData.completeCount || 0 }}</view> <!-- <view class="num">{{ orderData.completeCount || 0 }}</view> -->
</view> </view>
</view> </view>
<view class="list"> <view class="list">
<view class="item" v-for="(order, orderListIndex) in orderList" :key="orderListIndex"> <view class="item" v-for="(order, orderListIndex) in orderList" :key="orderListIndex">
<view class="title acea-row row-between-wrapper"> <view class="title acea-row row-between-wrapper">
<view class="acea-row row-middle"> <view class="acea-row row-middle">
<span class="sign cart-color acea-row row-center-wrapper" v-if="order.combinationId > 0">拼团</span> <!-- <span class="sign cart-color acea-row row-center-wrapper" v-if="order.combinationId > 0">拼团</span>
<span class="sign cart-color acea-row row-center-wrapper" v-if="order.seckillId > 0">秒杀</span> <span class="sign cart-color acea-row row-center-wrapper" v-if="order.seckillId > 0">秒杀</span>
<span class="sign cart-color acea-row row-center-wrapper" v-if="order.bargainId > 0">砍价</span> <span class="sign cart-color acea-row row-center-wrapper" v-if="order.bargainId > 0">砍价</span>
<span class="sign cart-color acea-row row-center-wrapper" v-if="order.storeId > 0">门店</span> <span class="sign cart-color acea-row row-center-wrapper" v-if="order.storeId > 0">门店</span> -->
{{ order.createTime }} 订单号 {{ orderList[0].orderId }}
</view> </view>
<view class="font-color-red">{{ getStatus(order) }}</view> <view class="state">{{ getStatus(order) }}</view>
</view> </view>
<view @click="goOrderDetails(order)"> <view @click="goOrderDetails(order)">
<view class="item-info acea-row row-between row-top" v-for="(cart, cartInfoIndex) in order.cartInfo" :key="cartInfoIndex"> <view class="item-info acea-row-nowrap row-between row-top" v-for="(cart, cartInfoIndex) in order.cartInfo" :key="cartInfoIndex">
<view class="pictrue"> <view class="pictrue">
<image :src="cart.productInfo.image" @click.stop="$yrouter.push({ path: '/pages/shop/GoodsCon/index', query: { id: cart.productInfo.id } })" v-if="cart.combinationId === 0 && cart.bargainId === 0 && cart.seckillId === 0" /> <image :src="cart.productInfo.image"
@click.stop="$yrouter.push({ path: '/pages/shop/GoodsCon/index', query: { id: cart.productInfo.id } })"
v-if="cart.combinationId === 0 && cart.bargainId === 0 && cart.seckillId === 0" />
<image <image
:src="cart.productInfo.image" :src="cart.productInfo.image"
@click.stop=" @click.stop="
@ -78,19 +80,23 @@
/> />
</view> </view>
<view class="text acea-row row-between"> <view class="text acea-row row-between">
<view class="name line2">{{ cart.productInfo.storeName }}</view> <view class="name">
<view class="money"> <view class="line1">{{ cart.productInfo.storeName }}</view>
<view v-if="order.payType != 'integral'"> {{ cart.productInfo.attrInfo ? cart.productInfo.attrInfo.price : cart.productInfo.price }} </view> <view class="money acea-row row-column">
<view v-if="order.payType == 'integral'"> {{ order.payIntegral }}积分 </view> <view class="cart-num">数量x{{ cart.cartNum }}</view>
<view>x{{ cart.cartNum }}</view> <view class="money-txt" v-if="order.payType != 'integral'"> {{ cart.productInfo.attrInfo ? cart.productInfo.attrInfo.price : cart.productInfo.price }} </view>
<view class="money-txt" v-if="order.payType == 'integral'"> {{ order.payIntegral }}积分 </view>
</view> </view>
</view> </view>
</view>
</view> </view>
</view> </view>
<view class="totalPrice"> <view class="totalPrice">
{{ order.cartInfo.length || 0 }}件商品总金额 {{ order.cartInfo.length || 0 }}件商品总金额
<text class="money font-color-red" v-if="order.payType != 'integral'">{{ order.payPrice }}</text> <text class="money" v-if="order.payType != 'integral'">{{ order.payPrice }}</text>
<text class="money font-color-red" v-if="order.payType == 'integral'">{{ order.payIntegral }}积分</text> <text class="money" v-if="order.payType == 'integral'">{{ order.payIntegral }}积分</text>
</view> </view>
<view class="bottom acea-row row-right row-middle"> <view class="bottom acea-row row-right row-middle">
<template v-if="order._status._type == 0"> <template v-if="order._status._type == 0">
@ -150,7 +156,7 @@ export default {
return { return {
offlinePayStatus: 2, offlinePayStatus: 2,
orderData: {}, orderData: {},
type: '', type: 0,
page: 1, page: 1,
limit: 20, limit: 20,
loaded: false, loaded: false,
@ -284,6 +290,87 @@ export default {
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.header{
width: 100%;
background: #F99C10;
}
.my-order{
width: 100%;
.nav{
width: 100%;
height: auto;
margin: 0;
.item{
padding: 28rpx 0;
color: #222;
font-size: 32rpx;
}
.on{
border-color: #F99C10 !important;
}
}
.list{
width: 710rpx;
margin: 20rpx auto 0;
.item{
border-radius: 10rpx;
.title{
font-size: 24rpx;
color: #222;
.state{
font-size: 32rpx;
color: #E5270F;
}
}
.item-info {
.pictrue {
width: 170rpx;
height: 170rpx;
image{
width: 170rpx;
height: 170rpx;
}
margin-right: 30rpx;
}
}
.item-info{
.text{
.money{
text-align: left;
.cart-num{
font-size: 24rpx;
color: #999;
margin-bottom: 40rpx;
}
.money-txt{
color: #E5270F;
font-size: 44rpx;
}
}
}
.name{
width: 100%;
font-size: 28rpx;
color: #222;
}
}
.totalPrice {
font-size: 26rpx;
color: #282828;
text-align: right;
margin: 27rpx 0 0 30rpx;
padding: 30rpx 30rpx 0rpx 0;
border: none;
border-top: 1rpx solid #eee;
.money{
color: #E5270F;
}
}
}
}
}
.noCart { .noCart {
margin-top: 0.17 * 100rpx; margin-top: 0.17 * 100rpx;
padding-top: 0.1 * 100rpx; padding-top: 0.1 * 100rpx;

108
pages/order/OrderDetails/index.vue

@ -1,14 +1,30 @@
<template> <template>
<view class="order-details"> <view class="order-details">
<!-- 给header上与data上加on为退款订单--> <!-- 给header上与data上加on为退款订单-->
<view class="header bg-color-red acea-row row-middle" :class="refundOrder ? 'on' : ''"> <view class="header" :class="refundOrder ? 'on' : ''">
<view class="data" :class="refundOrder ? 'on' : ''"> <view class="data" :class="refundOrder ? 'on' : ''">
<!-- <view>{{ orderInfo.createTime }}</view> -->
<view class="status" v-if="status.type === 0 || status.type === 9">待付款</view>
<view class="status" v-if="status.type === 1 && orderInfo.shippingType === 2">待核销</view>
<view class="status" v-if="status.type === 1">待发货</view>
<view class="status" v-if="status.type === 2 && orderInfo.shippingType === 1">待收货</view>
<view class="status" v-if="status.type === 3">待评价</view>
<view class="status" v-if="status.type === 4">已完成</view>
<view class="state">{{ orderInfo._status._msg }}</view> <view class="state">{{ orderInfo._status._msg }}</view>
<view>{{ orderInfo.createTime }}</view> </view>
<view class="address">
<view class="name">
{{ orderInfo.realName }}
<text class="phone">{{ orderInfo.userPhone }}</text>
<text @click="telPhone(orderInfo.userPhone)" class="iconfont icon-tonghua font-color-red"></text>
</view>
<view class="line2">{{ orderInfo.userAddress }}</view>
</view> </view>
</view> </view>
<template v-if="!refundOrder"> <template v-if="!refundOrder">
<view class="nav"> <!-- <view class="nav">
<view class="navCon acea-row row-between-wrapper"> <view class="navCon acea-row row-between-wrapper">
<view :class="{ on: status.type === 0 || status.type === 9 }">待付款</view> <view :class="{ on: status.type === 0 || status.type === 9 }">待付款</view>
<view :class="{ on: status.type === 1 }" v-if="orderInfo.shippingType === 2">待核销</view> <view :class="{ on: status.type === 1 }" v-if="orderInfo.shippingType === 2">待核销</view>
@ -57,8 +73,8 @@
: '' : ''
]"></view> ]"></view>
</view> </view>
</view> </view> -->
<div class="writeOff" v-if="orderInfo.shippingType === 2 && orderInfo.paid === 1"> <!-- <div class="writeOff" v-if="orderInfo.shippingType === 2 && orderInfo.paid === 1">
<div class="title">核销信息</div> <div class="title">核销信息</div>
<div class="grayBg"> <div class="grayBg">
<div class="pictrue"> <div class="pictrue">
@ -112,32 +128,32 @@
</div> </div>
<view class="line" v-if="orderInfo.shippingType === 1"> <view class="line" v-if="orderInfo.shippingType === 1">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/line.jpg`" /> <image :src="`${$VUE_APP_RESOURCES_URL}/images/line.jpg`" />
</view> </view> -->
</template> </template>
<OrderGoods :evaluate="status.type || 0" :isIntegral="isIntegral" :cartInfo="orderInfo.cartInfo || []"></OrderGoods> <OrderGoods :evaluate="status.type || 0" :isIntegral="isIntegral" :cartInfo="orderInfo.cartInfo || []"></OrderGoods>
<view class="wrapper"> <view class="wrapper">
<view class="item acea-row row-between"> <view class="item acea-row">
<view>订单编号</view> <view>订单编号</view>
<view class="conter acea-row row-middle row-right"> <view class="conter acea-row row-middle row-between">
{{ orderInfo.orderId }} {{ orderInfo.orderId }}
<!-- #ifndef H5 --> <!-- #ifndef H5 -->
<text class="copy copy-data" @click="copyClipboard(orderInfo.orderId)">复制</text> <text class="copy copy-data" @click="copyClipboard(orderInfo.orderId)">复制</text>
<!-- #endif --> <!-- #endif -->
</view> </view>
</view> </view>
<view class="item acea-row row-between"> <view class="item acea-row ">
<view>下单时间</view> <view>下单时间</view>
<view class="conter">{{ orderInfo.createTime }}</view> <view class="conter">{{ orderInfo.createTime }}</view>
</view> </view>
<view class="item acea-row row-between"> <view class="item acea-row ">
<view>订单类型</view> <view>订单类型</view>
<view class="conter">{{ orderTypeName }}</view> <view class="conter">{{ orderTypeName }}</view>
</view> </view>
<view class="item acea-row row-between"> <view class="item acea-row ">
<view>支付状态</view> <view>支付状态</view>
<view class="conter">{{ orderInfo.paid ? "已支付" : "未支付" }}</view> <view class="conter">{{ orderInfo.paid ? "已支付" : "未支付" }}</view>
</view> </view>
<view class="item acea-row row-between"> <view class="item acea-row ">
<view>支付方式</view> <view>支付方式</view>
<view class="conter">{{ orderInfo._status._payType }}</view> <view class="conter">{{ orderInfo._status._payType }}</view>
</view> </view>
@ -219,8 +235,8 @@
</view> </view>
<view class="actualPay acea-row row-right"> <view class="actualPay acea-row row-right">
实付款 实付款
<text class="money font-color-red" v-if="!isIntegral">{{ orderInfo.payPrice }}</text> <text class="money" v-if="!isIntegral">{{ orderInfo.payPrice }}</text>
<text class="money font-color-red" v-if="isIntegral">{{ orderInfo.payIntegral }}积分</text> <text class="money" v-if="isIntegral">{{ orderInfo.payIntegral }}积分</text>
</view> </view>
</view> </view>
<view style="height:100rpx;" v-if="!refundOrder && offlineStatus"></view> <view style="height:100rpx;" v-if="!refundOrder && offlineStatus"></view>
@ -503,6 +519,65 @@
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.order-details{
.header {
height: 250rpx;
background: linear-gradient(161deg, #F7C37A 0%, #E29F40 100%);;
padding: 40rpx 30rpx;
position: relative;
margin-bottom: 110rpx;
font-size: 28rpx;
color: #fff;
.data{
.state{
font-size: 28rpx;
margin-top: 10rpx;
}
}
.status{
font-size: 44rpx;
color: #fff;
line-height: 60rpx;
}
}
.address{
font-size: 26rpx;
color: #868686;
background-color: #fff;
position: absolute;
width: 710rpx;
height: 170rpx;
left: 20rpx;
bottom: -85rpx;
border-radius: 10rpx;
.name{
color: #222222;
font-size: 32rpx;
line-height: 44rpx;
margin-bottom: 22rpx;
}
}
}
.order-details .wrapper .item{
color: #666;
.conter{
text-align: left;
color: #222;
width: 545rpx;
.copy{
width: 88rpx;
height: 40rpx;
border: 2rpx solid #F7C37A;
border-radius: 20rpx;
color: #F7C37A;
line-height: 40rpx;
text-align: center;
padding: 0;
font-size: 26rpx;
}
}
}
.geoPage { .geoPage {
position: fixed; position: fixed;
width: 100%; width: 100%;
@ -570,7 +645,10 @@
text-align: center; text-align: center;
padding-top: 0.04 * 100rpx; padding-top: 0.04 * 100rpx;
} }
.order-details .wrapper .actualPay .money {
color: #E5270F;
font-weight: normal;
}
.order-details .writeOff .rules { .order-details .writeOff .rules {
margin: 0.46 * 100rpx 0.3 * 100rpx 0 0.3 * 100rpx; margin: 0.46 * 100rpx 0.3 * 100rpx 0 0.3 * 100rpx;
border-top: 0.01 * 100rpx solid #f0f0f0; border-top: 0.01 * 100rpx solid #f0f0f0;

3
pages/order/OrderSubmission/index.vue

@ -152,7 +152,7 @@
<view class="footer acea-row row-between-wrapper"> <view class="footer acea-row row-between-wrapper">
<view> <view>
合计: 合计:
<text class="font-color-red total-word" v-if="!isIntegral">{{ orderPrice.payPrice }}+{{orderPrice.usedIntegral}}积分</text> <text class="total-word" v-if="!isIntegral">{{ orderPrice.payPrice }}</text>
<!-- <text class="font-color-red total-word" v-if="isIntegral">{{ orderPrice.payIntegral }}积分</text> --> <!-- <text class="font-color-red total-word" v-if="isIntegral">{{ orderPrice.payIntegral }}积分</text> -->
</view> </view>
<view class="settlement" @click="createOrder">立即结算</view> <view class="settlement" @click="createOrder">立即结算</view>
@ -569,6 +569,7 @@ export default {
.order-submission{ .order-submission{
.footer{ .footer{
.total-word{ .total-word{
color: #e93323;
font-weight: bold; font-weight: bold;
font-size: 32rpx; font-size: 32rpx;
} }

6
pages/order/ReturnList/index.vue

@ -97,3 +97,9 @@ export default {
} }
}; };
</script> </script>
<style lang="less">
.pictrue{
text-align: center;
padding-top: 78rpx;
}
</style>

31
pages/serviceTeacher/index.vue

@ -1,6 +1,9 @@
<template> <template>
<view class="index-box"> <view class="index-box">
<view class="back-home-btn" @click="toUserIndex"><image src="../../static/backhome-icon.png" ></image></view> <view class="back-home-btn" @click="toUserIndex">
<image src="../../static/backhome-icon.png" ></image>
<text>回到首页</text>
</view>
<view class="userInfo-box acea-row row-column row-center-wrapper"> <view class="userInfo-box acea-row row-column row-center-wrapper">
<view class="headerimg-box"> <view class="headerimg-box">
<image :src="userInfo.avatar" mode="aspectFill" v-if="userInfo.isPromoter == 0"></image> <image :src="userInfo.avatar" mode="aspectFill" v-if="userInfo.isPromoter == 0"></image>
@ -76,14 +79,22 @@
background: url(https://www.cyjyyjy.com:8081/static/teacher-index-bg.png); background: url(https://www.cyjyyjy.com:8081/static/teacher-index-bg.png);
background-size: cover; background-size: cover;
.back-home-btn{ .back-home-btn{
width: 80rpx;
height: 80rpx;
position: absolute; position: absolute;
right: 30rpx; left: 50%;
top: 30rpx; margin-left: -40rpx;
bottom: 56rpx;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
image{ image{
width: 100%; width: 80rpx;
height: 100%; height: 80rpx;
}
text{
color: #fff;
font-size: 28rpx;
} }
} }
.userInfo-box{ .userInfo-box{
@ -93,7 +104,7 @@
border-radius: 50px; border-radius: 50px;
border: 8rpx solid #d9d9d9; border: 8rpx solid #d9d9d9;
overflow: hidden; overflow: hidden;
margin: 150rpx 0 30rpx; margin: 100rpx 0 30rpx;
image{ image{
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -110,7 +121,9 @@
background-color: #fff; background-color: #fff;
border-radius: 10rpx; border-radius: 10rpx;
font-size: 38rpx; font-size: 38rpx;
margin: 60rpx auto; margin: 40rpx auto;
transform: scale(.8);
box-shadow: 0px 6rpx 14rpx 8rpx rgba(0, 0, 0, 0.1);
image{ image{
width: 104rpx; width: 104rpx;
height: 104rpx; height: 104rpx;

8
pages/serviceTeacher/setSelfData.vue

@ -34,10 +34,10 @@
<view class="input-box acea-row row-middle"> <view class="input-box acea-row row-middle">
<radio-group @change="radioChange"> <radio-group @change="radioChange">
<label class="radio"> <label class="radio">
<radio value="0" color="#E5270F" style="transform:scale(0.7)" :checked="form.gender == 0" /><text></text> <radio value="0" color="#F99C10" :checked="form.gender == 0" /><text></text>
</label> </label>
<label class="radio"> <label class="radio">
<radio value="1" color="#E5270F" style="transform:scale(0.7)" :checked="form.gender == 1" /><text></text> <radio value="1" color="#F99C10" :checked="form.gender == 1" /><text></text>
</label> </label>
</radio-group> </radio-group>
</view> </view>
@ -87,6 +87,9 @@
} }
}, },
onLoad(){ onLoad(){
if(this.userInfo.phone){
this.form.phone = this.userInfo.phone;
}
if(this.userInfo.isPromoter == 1){ if(this.userInfo.isPromoter == 1){
let info = this.userInfo; let info = this.userInfo;
this.form.imgPath = info.workPhoto; this.form.imgPath = info.workPhoto;
@ -131,7 +134,6 @@
} }
}) })
} }
}, },
timeup(){ timeup(){
this.second = this.second - 1; this.second = this.second - 1;

7
pages/shop/GoodsClass/index.vue

@ -22,10 +22,10 @@
</view> --> </view> -->
<view class="userInfo-box acea-row row-between row-middle"> <view class="userInfo-box acea-row row-between row-middle">
<view class="userInfo-l acea-row row-center-wrapper"> <view class="userInfo-l acea-row row-center-wrapper">
<image src="../../../static/img1.png"></image> <image :src="userInfo.avatar"></image>
<view class="userInfo"> <view class="userInfo">
<view>亲爱的{{getTime()}}</view> <view>亲爱的{{getTime()}}</view>
<view class="name">{{userInfo.nickname}}</view> <view class="name line1">{{userInfo.nickname}}</view>
</view> </view>
</view> </view>
<view class="userInfo-r"> <view class="userInfo-r">
@ -47,7 +47,7 @@
<image :src="goods.image"></image> <image :src="goods.image"></image>
<view class="goods-desc-box"> <view class="goods-desc-box">
<view class="goods-name line1">{{goods.storeName}}</view> <view class="goods-name line1">{{goods.storeName}}</view>
<view class="price">{{goods.price}}+{{goods.giveIntegral}}积分</view> <view class="price">{{goods.price}}<text v-if="goods.giveIntegral > 0">+{{goods.giveIntegral}}积分</text></view>
<view class="buy-count">已出售{{goods.sales}}{{goods.unitName}}</view> <view class="buy-count">已出售{{goods.sales}}{{goods.unitName}}</view>
</view> </view>
</view> </view>
@ -269,6 +269,7 @@ export default {
line-height: 40rpx; line-height: 40rpx;
margin-left: 20rpx; margin-left: 20rpx;
.name{ .name{
width: 340rpx;
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
line-height: 34rpx; line-height: 34rpx;

6
pages/shop/GoodsCon/index.vue

@ -11,7 +11,7 @@
<text></text> <text></text>
<text class="num">{{ attr.productSelect.price || storeInfo.price }}</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> --> <!-- <text class="vip-money" v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0">{{ attr.productSelect.vipPrice || storeInfo.vipPrice }}</text> -->
<text class="vip-money">+{{storeInfo.giveIntegral}}积分</text> <text class="vip-money" v-if="storeInfo.giveIntegral>0">+{{storeInfo.giveIntegral}}积分</text>
<!-- <image :src="`${$VUE_APP_RESOURCES_URL}/images/vip.png`" class="image" v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0" /> --> <!-- <image :src="`${$VUE_APP_RESOURCES_URL}/images/vip.png`" class="image" v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0" /> -->
</view> </view>
<view class="money font-color-red" v-if="isIntegral"> <view class="money font-color-red" v-if="isIntegral">
@ -125,7 +125,7 @@
<view class="conter" v-html="storeInfo.description"></view> <view class="conter" v-html="storeInfo.description"></view>
</view> </view>
<view style="height: 100rpx"></view> <!-- <view style="height: 100rpx"></view> -->
<!-- 操作栏 --> <!-- 操作栏 -->
<view class="footer acea-row row-between-wrapper"> <view class="footer acea-row row-between-wrapper">
<!-- #ifdef MP-WEIXIN --> <!-- #ifdef MP-WEIXIN -->
@ -779,7 +779,7 @@ export default {
<style scoped lang="less"> <style scoped lang="less">
.product-con{ .product-con{
padding-bottom: 200rpx; padding-bottom: 160rpx;
.footer{ .footer{
height: 160rpx; height: 160rpx;
} }

14
pages/study/dabang.vue

@ -4,7 +4,7 @@
<view class="dabang-name">{{detail.studyListDto.listName}}</view> <view class="dabang-name">{{detail.studyListDto.listName}}</view>
<!-- <view class="desc">抱朴书院孕育自华夏优秀传统文化博学致用朴含虚为院训弘扬国粹利益社会为动力</view> --> <!-- <view class="desc">抱朴书院孕育自华夏优秀传统文化博学致用朴含虚为院训弘扬国粹利益社会为动力</view> -->
<view class="time-box"> <view class="time-box">
<span>时间{{detail.studyListDto.listStartTime}} {{detail.studyListDto.listEndTime}}21</span> <span>时间{{detail.studyListDto.listStartTime}} {{detail.studyListDto.listEndTime}}{{detail.studyListDto.clockTimes}}</span>
<view class="sanjiao"></view> <view class="sanjiao"></view>
</view> </view>
</view> </view>
@ -23,7 +23,7 @@
<image :src="detail.avatar"></image> <image :src="detail.avatar"></image>
</view> </view>
<view class="user-progress"> <view class="user-progress">
<view class="name">{{detail.realName}}</view> <view class="name line1">{{detail.realName}}</view>
<view class="progress"> <view class="progress">
<view class="pro-icon"><image src="../../static/course-icon1.png" mode=""></image></view> <view class="pro-icon"><image src="../../static/course-icon1.png" mode=""></image></view>
已坚持<text class="colO">{{detail.finishTimes}}</text>/{{detail.totalTimes}} 已坚持<text class="colO">{{detail.finishTimes}}</text>/{{detail.totalTimes}}
@ -41,8 +41,9 @@
<view class="progress-r acea-row row-column row-center-wrapper"> <view class="progress-r acea-row row-column row-center-wrapper">
<text>{{detail.enterState ? '今日已打卡' : '今日未打卡'}}</text> <text>{{detail.enterState ? '今日已打卡' : '今日未打卡'}}</text>
<view class="dabang-btn default" v-if="detail.enterState">已打卡</view> <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.studyListDto.listState == 0">未开始</view>
<view class="dabang-btn default" v-if="!detail.isClockTime && !detail.enterState">未开始</view> <view class="dabang-btn" @click="toEdit" v-if="detail.studyListDto.isClockTime && !detail.enterState && detail.studyListDto.listState == 1">立即打卡</view>
<view class="dabang-btn default" v-if="!detail.studyListDto.isClockTime && !detail.enterState && detail.studyListDto.listState == 1">未开始</view>
</view> </view>
</view> </view>
</view> </view>
@ -62,10 +63,10 @@
<view class="create-time">{{item.recordTime}}</view> <view class="create-time">{{item.recordTime}}</view>
</view> </view>
</view> </view>
<view class="share-word"> <view class="share-word" :class="item.isShow == 0 ? 'line1' : ''">
{{item.content}} {{item.content}}
</view> </view>
<view class="img-box acea-row"> <view class="img-box acea-row" v-if="item.isShow == 1">
<image :src="imgUrl" mode="aspectFill" @tap="previewImage(item.imgPaths,idx)" v-for="(imgUrl,idx) in item.imgPaths" :key="idx"></image> <image :src="imgUrl" mode="aspectFill" @tap="previewImage(item.imgPaths,idx)" v-for="(imgUrl,idx) in item.imgPaths" :key="idx"></image>
</view> </view>
<view class="zan-box acea-row row-middle row-right" @click="voteClick(item)"> <view class="zan-box acea-row row-middle row-right" @click="voteClick(item)">
@ -291,6 +292,7 @@
.user-progress{ .user-progress{
font-size: 28rpx; font-size: 28rpx;
.name{ .name{
width: 340rpx;
font-size: 32rpx; font-size: 32rpx;
font-weight: 500; font-weight: 500;
color: #222222; color: #222222;

27
pages/study/detail.vue

@ -1,7 +1,7 @@
<template> <template>
<view class="course-detail-index"> <view class="course-detail-index">
<view class="banner-box"> <view class="banner-box">
<image :src="detail.imgPath"></image> <image :src="detail.imgPath" mode="aspectFill"></image>
</view> </view>
<view class="tab-box acea-row row-around" :class="isFixedTop?'fixed':''"> <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 == '0' ? 'tab-item-active' : ''" @click="handelScroll('content1','0')">榜单介绍</view>
@ -57,11 +57,11 @@
</view> </view>
<view class="course-card-item acea-row-nowrap row-middle row-top"> <view class="course-card-item acea-row-nowrap row-middle row-top">
<view class="label">积分用途</view> <view class="label">积分用途</view>
<view class="info">可用于兑换积分商城内商品并抵扣一定款项1积分=1</view> <view class="info">可用于限定课程及商品活动参与名额的兑换</view>
</view> </view>
<view class="course-card-item acea-row-nowrap row-middle row-top"> <view class="course-card-item acea-row-nowrap row-middle row-top">
<view class="label">奖惩机制</view> <view class="label">奖惩机制</view>
<view class="info">积极打卡满{{detail.clockTimes}}天可获得全部积分消极应对无积分奖励积极打卡满{{detail.clockTimes}}天可获得全部积分消极应对无积分奖励积极打卡满{{detail.clockTimes}}天可获得全部积分消极应对无积分奖励</view> <view class="info">积极打卡满{{detail.clockTimes}}天可获得全部积分消极应对无积分奖励</view>
</view> </view>
</view> </view>
</view> </view>
@ -75,7 +75,7 @@
@getphonenumber="getPhoneNumber" @getphonenumber="getPhoneNumber"
v-if="userInfo.phone == ''" v-if="userInfo.phone == ''"
class="signin-btn" v-else> class="signin-btn" v-else>
<text>绑定手机号</text> <text>点击绑定手机号</text>
</button> </button>
<!-- #endif --> <!-- #endif -->
@ -134,7 +134,7 @@
iv: e.mp.detail.iv, iv: e.mp.detail.iv,
}) })
.then(res => { .then(res => {
// this.User(); if(res.success){
thit.$store.dispatch('userInfo', true) thit.$store.dispatch('userInfo', true)
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
@ -143,6 +143,18 @@
duration: 2000, duration: 2000,
}) })
this.getDetail() this.getDetail()
} else{
uni.hideLoading()
uni.showModal({
title:'提示!',
content:'授权已过期,请重新授权后绑定手机号',
success:function(res){
if(res.confirm){
thit.$store.commit('logout')
}
},
})
}
}) })
.catch(error => { .catch(error => {
uni.hideLoading() uni.hideLoading()
@ -164,6 +176,7 @@
getDetail(){ getDetail(){
getStudyDetail(this.studyId).then((res)=>{ getStudyDetail(this.studyId).then((res)=>{
this.detail = res.data this.detail = res.data
res.data.content = res.data.content.replace(/\<img/g, "<img style='width: 100%;'")
}) })
}, },
signInClick(){ signInClick(){
@ -333,7 +346,7 @@
} }
.tab-item-active{ .tab-item-active{
font-weight: bold; font-weight: bold;
border-bottom: 4rpx solid #EB5744; border-bottom: 4rpx solid #F99C10;
} }
} }
.fixed{ .fixed{
@ -396,7 +409,7 @@
.left-line{ .left-line{
width: 6rpx; width: 6rpx;
height: 32rpx; height: 32rpx;
background-color: #EB5744; background-color: #F99C10;
margin-right: 16rpx; margin-right: 16rpx;
} }
} }

20
pages/study/editDabang.vue

@ -15,6 +15,11 @@
<view>上传图片</view> <view>上传图片</view>
</view> </view>
</view> </view>
<view class="isShow-box acea-row row-middle row-right">
<text>是否显示打卡内容</text>
<switch checked @change="switchChange" color="#FDBF68" />
<text>{{isShow == 1 ? '显示' : '不显示'}}</text>
</view>
<view class="submit-btn" @click="submitClick()">发布</view> <view class="submit-btn" @click="submitClick()">发布</view>
</view> </view>
</template> </template>
@ -28,6 +33,7 @@
}, },
data: function() { data: function() {
return { return {
isShow: 1,
studyId: '', studyId: '',
uploadPictures: [], uploadPictures: [],
content: "", content: "",
@ -38,6 +44,9 @@
this.studyId = this.$yroute.query.id; this.studyId = this.$yroute.query.id;
}, },
methods:{ methods:{
switchChange(e){
this.isShow = e.target.value ? 1 : 0
},
chooseImage() { chooseImage() {
chooseImages(img => { chooseImages(img => {
console.log(img) console.log(img)
@ -55,7 +64,8 @@
let data = { let data = {
content: this.content, content: this.content,
imgPaths: this.uploadPictures, imgPaths: this.uploadPictures,
studylistId: this.studyId studylistId: this.studyId,
isShow: this.isShow
} }
studyListPublish(data).then((res)=>{ studyListPublish(data).then((res)=>{
if(res.success){ if(res.success){
@ -121,6 +131,10 @@
right: -12rpx; right: -12rpx;
} }
} }
}
.isShow-box{
font-size: 24rpx;
} }
.submit-btn{ .submit-btn{
width: 340rpx; width: 340rpx;
@ -133,5 +147,7 @@
color: #fff; color: #fff;
margin: 72rpx auto; margin: 72rpx auto;
} }
switch{
transform: scale(0.7);
}
</style> </style>

139
pages/user/PersonalData/index.vue

@ -8,7 +8,7 @@
<div class="pictrue"> <div class="pictrue">
<img :src="avatar" /> <img :src="avatar" />
</div> </div>
<image :src="`${$VUE_APP_RESOURCES_URL}/images/alter.png`" class="alter" /> <!-- <image :src="`${$VUE_APP_RESOURCES_URL}/images/alter.png`" class="alter" /> -->
</view> </view>
<view class="text"> <view class="text">
<view class="name line1">{{ userInfo.nickname }}</view> <view class="name line1">{{ userInfo.nickname }}</view>
@ -26,7 +26,7 @@
<view class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<view>昵称</view> <view>昵称</view>
<view class="input"> <view class="input">
<input type="text" v-model="userInfo.nickname" /> <input type="text" disabled v-model="userInfo.nickname" />
</view> </view>
</view> </view>
<view class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
@ -36,17 +36,42 @@
</view> </view>
</view> </view>
<view class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<view>身份证号码</view>
<view class="input">
<input type="idcard" placeholder="请填写真实身份证号码" maxlength="18" v-model="userInfo.idCard" />
</view>
</view>
<!-- <view class="item acea-row row-between-wrapper">
<view>ID号</view> <view>ID号</view>
<view class="input acea-row row-between-wrapper"> <view class="input acea-row row-between-wrapper">
<input type="text" :value="userInfo.uid" disabled class="id" /> <input type="text" :value="userInfo.uid" disabled class="id" />
<text class="iconfont icon-suozi"></text> <text class="iconfont icon-suozi"></text>
</view> </view>
</view> </view> -->
<view class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<view>手机号</view> <view>手机号</view>
<view class="input"> <view class="input">
<input type="text" v-if="userInfo.phone" v-model="userInfo.phone" /> <input type="text" v-if="userInfo.phone" v-model="userInfo.phone" />
<input type="text" v-else value="未绑定" disabled class="id" /> <input type="text" v-else placeholder="未绑定" v-model="userInfo.phone" disabled class="id" />
</view>
</view>
<view class="item acea-row row-between-wrapper">
<view>验证码</view>
<view class="acea-row row-middle ">
<view class="input-box acea-row row-middle row-right">
<input type="text" v-model="verifyCode" maxlength="6" placeholder="请输入短信验证码" />
</view>
<view class="countdown" :class="disabled ? 'default' : ''" @click="sendCode">
{{disabled ? second + '秒后重新发送' : '发送验证码'}}
</view>
</view>
</view>
<view class="item acea-row row-between-wrapper">
<view>区域</view>
<view class="input">
<picker @change="bindPickerChange" mode="region" :range="array">
<view class="uni-input">{{city}}</view>
</picker>
</view> </view>
</view> </view>
<!-- <!--
@ -59,7 +84,8 @@
</view> </view>
--> -->
</view> </view>
<view class="modifyBnt bg-color-red" @click="submit">保存修改</view> <view class="tips">会员信息仅用于身份确认不做他用</view>
<view class="modifyBnt" @click="submit">保存修改</view>
<!-- #ifndef MP-WEIXIN --> <!-- #ifndef MP-WEIXIN -->
<view <view
class="logOut cart-color acea-row row-center-wrapper" class="logOut cart-color acea-row row-center-wrapper"
@ -71,6 +97,7 @@
<script> <script>
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { trim, isWeixin, chooseImage } from "@/utils"; import { trim, isWeixin, chooseImage } from "@/utils";
import { getVerificationCode } from "@/api/serverTeacher"
import { VUE_APP_API_URL } from "@/config"; import { VUE_APP_API_URL } from "@/config";
import { import {
postUserEdit, postUserEdit,
@ -94,6 +121,11 @@ export default {
currentAccounts: 0, currentAccounts: 0,
switchUserInfo: [], switchUserInfo: [],
userIndex: 0, userIndex: 0,
disabled: false,
second: 60,
time: null,
city: '省/市/区',
verifyCode:''
}; };
}, },
computed: mapGetters(["userInfo"]), computed: mapGetters(["userInfo"]),
@ -101,8 +133,57 @@ export default {
this.avatar = this.userInfo.avatar; this.avatar = this.userInfo.avatar;
this.isWeixin = isWeixin(); this.isWeixin = isWeixin();
this.getUserInfo(); this.getUserInfo();
this.userInfo.city ? this.city = this.userInfo.city : this.userInfo.city = '省/市/区';
}, },
methods: { methods: {
bindPickerChange(e){
this.city = e.detail.value.join(' ')
},
sendCode(){
var reg=/^1[3456789]\d{9}$/;
if (this.userInfo.phone === '') {
uni.showModal({
title: '手机号码不能为空',
type: 'none'
});
return
} else if(!reg.test(this.userInfo.phone)){
uni.showModal({
title: '请输入有效的手机号码',
type: 'none'
});
return
} else{
getVerificationCode({phone:this.userInfo.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;
}
},
goChangePassword() { goChangePassword() {
this.$yrouter.push("/pages/user/ChangePassword/index"); this.$yrouter.push("/pages/user/ChangePassword/index");
}, },
@ -169,19 +250,32 @@ export default {
submit: function () { submit: function () {
let userInfo = this.userInfo; let userInfo = this.userInfo;
if(userInfo.realName == ''){ console.log(userInfo)
if(userInfo.realName == '' || userInfo.realName == null){
uni.showToast({ uni.showToast({
title:'请填写真实姓名', title:'请填写真实姓名',
icon: "none" icon: "none"
}) })
return return
} }
if(this.verifyCode == ''){
uni.showModal({
title: '请输入手机短信验证码',
type: 'none'
});
return
}
postUserEdit({ postUserEdit({
nickname: trim(this.userInfo.nickname), nickname: trim(this.userInfo.nickname),
avatar: this.avatar, avatar: this.avatar,
realName: trim(this.userInfo.realName) realName: trim(this.userInfo.realName),
idCard: this.userInfo.idCard,
code: this.verifyCode,
phone: this.userInfo.phone,
city: this.city
}).then( }).then(
(res) => { (res) => {
if(res.success){
this.$store.dispatch("userInfo", true); this.$store.dispatch("userInfo", true);
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -191,6 +285,7 @@ export default {
setTimeout(()=>{ setTimeout(()=>{
this.$yrouter.back(); this.$yrouter.back();
},2000) },2000)
}
}, },
(err) => { (err) => {
uni.showToast({ uni.showToast({
@ -231,5 +326,35 @@ export default {
height: 80rpx !important; height: 80rpx !important;
line-height: 80rpx !important; line-height: 80rpx !important;
font-size: 32rpx !important; font-size: 32rpx !important;
background: #F99C10;
}
.countdown{
min-width: 140rpx;
height: 58rpx;
padding: 0 10rpx;
font-size: 24rpx;
background-color: #F99C10;
color: #fff;
line-height: 58rpx;
text-align: center;
border-radius: 10rpx;
}
.tips{
color: #F99C10;
font-size: 28rpx;
line-height: 34rpx;
padding: 24rpx;
box-sizing: border-box;
}
.default{
background: #999;
color: #fff;
}
.input-box{
text-align: right;
input{
width: 80%;
margin-right: 10rpx;
}
} }
</style> </style>

73
pages/user/User/index.vue

@ -21,13 +21,13 @@
</view> </view>
<!-- #ifdef MP-WEIXIN --> <!-- #ifdef MP-WEIXIN -->
<button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" class="binding" v-else> <button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" class="binding" v-else>
<text>绑定手机号</text> <text>点击绑定手机号</text>
</button> </button>
<!-- #endif --> <!-- #endif -->
<!-- #ifndef MP-WEIXIN --> <!-- #ifndef MP-WEIXIN -->
<button class="binding" @click="goBindPhone()" v-else> <button class="binding" @click="goBindPhone()" v-else>
<text>绑定手机号</text> <text>点击绑定手机号</text>
</button> </button>
<!-- #endif --> <!-- #endif -->
</view> </view>
@ -166,7 +166,7 @@
<view class="pictrue"> <view class="pictrue">
<image src="../../../static/user-menu2.png" /> <image src="../../../static/user-menu2.png" />
</view> </view>
<view class="cell">学习榜打卡</view> <view class="cell">打卡榜打卡</view>
<text class="iconfont icon-jiantou"></text> <text class="iconfont icon-jiantou"></text>
</view> </view>
<view class="item" @click="goUserFeedBack()"> <view class="item" @click="goUserFeedBack()">
@ -176,13 +176,13 @@
<view class="cell">建议反馈</view> <view class="cell">建议反馈</view>
<text class="iconfont icon-jiantou"></text> <text class="iconfont icon-jiantou"></text>
</view> </view>
<view class="item" @click="goUserJoinUs()"> <!-- <view class="item" @click="goUserJoinUs()">
<view class="pictrue"> <view class="pictrue">
<image src="../../../static/user-menu4.png" /> <image src="../../../static/user-menu4.png" />
</view> </view>
<view class="cell">企业招聘</view> <view class="cell">企业招聘</view>
<text class="iconfont icon-jiantou"></text> <text class="iconfont icon-jiantou"></text>
</view> </view> -->
<view class="item" @click="goAddressManagement()"> <view class="item" @click="goAddressManagement()">
<view class="pictrue"> <view class="pictrue">
<image src="../../../static/user-menu5.png" /> <image src="../../../static/user-menu5.png" />
@ -190,7 +190,7 @@
<view class="cell">收货地址</view> <view class="cell">收货地址</view>
<text class="iconfont icon-jiantou"></text> <text class="iconfont icon-jiantou"></text>
</view> </view>
<view class="item" @click="toServiceIndex()"> <view class="item noBorder" @click="toServiceIndex()">
<view class="pictrue"> <view class="pictrue">
<image src="../../../static/user-menu6.png" /> <image src="../../../static/user-menu6.png" />
</view> </view>
@ -346,8 +346,16 @@ export default {
this.$yrouter.push('/pages/user/coupon/UserCoupon/index') this.$yrouter.push('/pages/user/coupon/UserCoupon/index')
}, },
goIntegral() { goIntegral() {
return if(this.userInfo.phone){
this.$yrouter.push('/pagesB/pages/user/signIn/Integral/index') this.$yrouter.push('/pagesB/pages/user/signIn/Integral/index')
} else{
uni.showToast({
title: '请先绑定手机号',
icon: 'none',
duration: 2000
})
}
}, },
goUserPromotion() { goUserPromotion() {
this.$yrouter.push('/pages/user/promotion/UserPromotion/index') this.$yrouter.push('/pages/user/promotion/UserPromotion/index')
@ -362,7 +370,6 @@ export default {
}, },
getPhoneNumber: function(e) { getPhoneNumber: function(e) {
let thit = this let thit = this
console.log(e)
// //
if (e.mp.detail.errMsg == 'getPhoneNumber:ok') { if (e.mp.detail.errMsg == 'getPhoneNumber:ok') {
uni.showLoading({ uni.showLoading({
@ -374,6 +381,7 @@ export default {
}) })
.then(res => { .then(res => {
// this.User(); // this.User();
if(res.success){
thit.$store.dispatch('userInfo', true) thit.$store.dispatch('userInfo', true)
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
@ -381,17 +389,29 @@ export default {
icon: 'success', icon: 'success',
duration: 2000, duration: 2000,
}) })
}) } else{
.catch(error => {
uni.hideLoading() uni.hideLoading()
thit.$store.dispatch('userInfo', true) uni.showModal({
console.log(error) title:'提示!',
uni.showToast({ content:'授权已过期,请重新授权后绑定手机号',
title: error.msg || error.response.data.msg || error.response.data.message, success:function(res){
icon: 'none', if(res.confirm){
duration: 2000, thit.$store.commit('logout')
}
},
}) })
}
}) })
// .catch(error => {
// uni.hideLoading()
// thit.$store.dispatch('userInfo', true)
// console.log(error)
// uni.showToast({
// title: error.msg || error.response.data.msg || error.response.data.message,
// icon: 'none',
// duration: 2000,
// })
// })
// // // //
// uni.getProvider({ // uni.getProvider({
// service: "oauth", // service: "oauth",
@ -482,7 +502,6 @@ export default {
}) })
return return
} }
console.log(this.userInfo)
if (url === '/pages/orderAdmin/OrderCancellation/index' && !this.userInfo.checkStatus) { if (url === '/pages/orderAdmin/OrderCancellation/index' && !this.userInfo.checkStatus) {
uni.showToast({ uni.showToast({
title: '您没有核销权限,请后台店员设置!!', title: '您没有核销权限,请后台店员设置!!',
@ -509,17 +528,17 @@ export default {
}, },
watch: { watch: {
userInfo() { userInfo() {
this.MenuUser() // this.MenuUser()
}, },
}, },
onShow() { onShow() {
if (this.$store.getters.token) { if (this.$store.getters.token) {
// //
uni.showLoading({ // uni.showLoading({
title: '加载中', // title: '',
}) // })
this.$store.dispatch('getUser', true) this.$store.dispatch('getUser', true)
this.MenuUser() // this.MenuUser()
this.isWeixin = isWeixin() this.isWeixin = isWeixin()
} }
}, },
@ -563,11 +582,12 @@ export default {
width: 200rpx; width: 200rpx;
height: 62rpx; height: 62rpx;
background: #BF922B; background: #BF922B;
border-radius: 31rpx; border-radius: 30rpx;
text-align: center; text-align: center;
line-height: 62rpx; line-height: 62rpx;
position: absolute; position: absolute;
right: 50rpx; right: 30rpx;
top: 30rpx;
z-index: 4; z-index: 4;
color: #fff; color: #fff;
font-size: 28rpx; font-size: 28rpx;
@ -718,7 +738,6 @@ export default {
} }
.order-status-num { .order-status-num {
min-width: 0.33 * 100rpx;
background-color: #fff; background-color: #fff;
color: #eb3729; color: #eb3729;
border-radius: 15px; border-radius: 15px;
@ -749,7 +768,9 @@ export default {
border: 1px solid #e8695e; border: 1px solid #e8695e;
color: #ffffff; color: #ffffff;
} }
.noBorder{
border: none !important;
}
.by { .by {
text-align: center; text-align: center;
padding: 30rpx 0; padding: 30rpx 0;

2
pages/user/feedBack/index.vue

@ -72,7 +72,7 @@
.submit-btn{ .submit-btn{
width: 208rpx; width: 208rpx;
height: 80rpx; height: 80rpx;
background: #6E85EB; background: #F99C10;
color: #fff; color: #fff;
text-align: center; text-align: center;
line-height: 80rpx; line-height: 80rpx;

53
pages/user/myBangdan/index.vue

@ -5,6 +5,11 @@
<view class="tab-item" :class="active == 2 ? 'tab-item-active' : ''" @click="tabClick(2)">已完成</view> <view class="tab-item" :class="active == 2 ? 'tab-item-active' : ''" @click="tabClick(2)">已完成</view>
</view> </view>
<view class="dabang-list-box"> <view class="dabang-list-box">
<view class="no-content" v-if="studyList.length == 0">
<image class="noContent" src="https://qiniu.upload.gznl.top/704d5b2c-730f-4a95-b9a0-1b0c8aa8b74f.png"></image>
<text>暂无学习榜打卡哦~</text>
<view class="btn" @click="toStudy()">去参加</view>
</view>
<view class="dabang-item" v-for="(item,index) in studyList" :key="index" @click="toDabang(item.id)"> <view class="dabang-item" v-for="(item,index) in studyList" :key="index" @click="toDabang(item.id)">
<view class="dabang-info"> <view class="dabang-info">
<view class="bangdan-name line1">{{item.listName}}</view> <view class="bangdan-name line1">{{item.listName}}</view>
@ -20,17 +25,6 @@
<view>{{item.listState == 1 ? '进行中' : '已结束'}} {{item.signTimes}}/{{item.clockTimes}}</view> <view>{{item.listState == 1 ? '进行中' : '已结束'}} {{item.signTimes}}/{{item.clockTimes}}</view>
</view> </view>
</view> </view>
<!-- <view class="dabang-item">
<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>
<view class="dabang-btm colR acea-row row-between-wrapper">
<view>-30积分</view>
<view>打榜失败</view>
</view>
</view> -->
</view> </view>
</view> </view>
</template> </template>
@ -67,6 +61,11 @@
}, },
}) })
}, },
toStudy(){
uni.switchTab({
url:"/pages/course/index"
})
},
tabClick(idx){ tabClick(idx){
this.active = idx; this.active = idx;
this.getList() this.getList()
@ -89,7 +88,35 @@
} }
.tab-item-active{ .tab-item-active{
font-weight: 600; font-weight: 600;
border-bottom: 4rpx solid #EB5744; border-bottom: 4rpx solid #F99C10;
}
}
.no-content{
font-size: 28rpx;
color: #666666;
text-align: center;
padding: 30rpx 0;
image{
width: 100%;
height: 740rpx;
transform: scale(0.8);
}
text{
font-size: 36rpx;
color: #d8d8d8;
position: relative;
top: -110rpx;
}
.btn{
width: 437rpx;
height: 78rpx;
background: rgba(248, 163, 45, 0.61);
border-radius: 44rpx;
line-height: 78rpx;
text-align: center;
color: #fff;
font-size: 32rpx;
margin: 0 auto;
} }
} }
.dabang-list-box{ .dabang-list-box{
@ -119,7 +146,7 @@
color: #8FB85B; color: #8FB85B;
} }
.colR{ .colR{
color:#EB5744; color:#F99C10;
} }
} }
} }

39
pages/user/myCourses/index.vue

@ -6,7 +6,10 @@
<view class="tab-item" :class="active == 3 ? 'tab-item-active' : ''" @click="tabClick(3)">可报名</view> <view class="tab-item" :class="active == 3 ? 'tab-item-active' : ''" @click="tabClick(3)">可报名</view>
</view> </view>
<view class="course-list-box" v-if="active == 1 || active == 2"> <view class="course-list-box" v-if="active == 1 || active == 2">
<view class="no-content" v-if="courseList.length == 0">暂无内容...</view> <view class="no-content" v-if="courseList.length == 0">
<image class="noContent" src="https://qiniu.upload.gznl.top/6cefe3b3-d5ae-41b4-9d52-3e35986d7e5c.png"></image>
<text>暂无课程</text>
</view>
<view class="course-item acea-row row-between" v-for="(item,index) in courseList" :key="index"> <view class="course-item acea-row row-between" v-for="(item,index) in courseList" :key="index">
<view class="course-item-l"> <view class="course-item-l">
<view class="course-info"> <view class="course-info">
@ -30,7 +33,10 @@
</view> </view>
</view> </view>
<view class="knowledge-list" v-else> <view class="knowledge-list" v-else>
<view class="no-content" v-if="courseList.length == 0">暂无内容...</view> <view class="no-content" v-if="courseList.length == 0">
<image class="noContent" src="https://qiniu.upload.gznl.top/6cefe3b3-d5ae-41b4-9d52-3e35986d7e5c.png"></image>
<text>暂无课程</text>
</view>
<view class="knowledge-item acea-row" v-for="item in courseList" @click="toDetail(item.id)"> <view class="knowledge-item acea-row" v-for="item in courseList" @click="toDetail(item.id)">
<view class="img-box"> <view class="img-box">
<image :src="item.imageArr[0]" mode="aspectFill"></image> <image :src="item.imageArr[0]" mode="aspectFill"></image>
@ -46,20 +52,6 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="knowledge-item acea-row">
<view class="img-box">
<image src="../../static/img1.png" mode=""></image>
</view>
<view class="knowledge-info-box">
<view class="title line1">阴阳五行一个人的阴阳五的阴阳五行</view>
<view class="time">2021-5-31-6.3 8:30-18:30</view>
<view class="address">中国 武汉</view>
<view class="type-box acea-row row-between row-middle">
<view class="price">3000</view>
<view class="signin-btn red">去报名</view>
</view>
</view>
</view> -->
</view> </view>
</view> </view>
</template> </template>
@ -123,7 +115,7 @@
} }
.tab-item-active{ .tab-item-active{
font-weight: 600; font-weight: 600;
border-bottom: 4rpx solid #EB5744; border-bottom: 4rpx solid #F99C10;
} }
} }
.no-content{ .no-content{
@ -131,6 +123,17 @@
color: #666666; color: #666666;
text-align: center; text-align: center;
padding: 30rpx 0; padding: 30rpx 0;
image{
width: 100%;
height: 740rpx;
transform: scale(0.8);
}
text{
font-size: 36rpx;
color: #d8d8d8;
position: relative;
top: -110rpx;
}
} }
.course-list-box{ .course-list-box{
width: 100%; width: 100%;
@ -161,7 +164,7 @@
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
color: #EB5744; color: #F99C10;
border-left: 1px solid #d8d8d8; border-left: 1px solid #d8d8d8;
image{ image{
width: 50rpx; width: 50rpx;

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

@ -1,6 +1,6 @@
<template> <template>
<view class="integral-details" ref="container"> <view class="integral-details" ref="container">
<view class="header acea-row row-between row-middle"> <!-- <view class="header acea-row row-between row-middle">
<view class="acea-row row-column row-between"> <view class="acea-row row-column row-between">
<view class="integral">{{ info.integral }}</view> <view class="integral">{{ info.integral }}</view>
<view class="rule"> <view class="rule">
@ -8,58 +8,72 @@
<text class="icon-font"></text> <text class="icon-font"></text>
</view> </view>
</view> </view>
<!-- <view class="currentScore">当前积分</view> -->
<view class="integral-shop">积分商城</view> <view class="integral-shop">积分商城</view>
<!-- <view class="line"></view> --> </view> -->
<!--<view class="nav acea-row">--> <view class="week-signIn-box">
<!--<view class="item">--> <view class="signIn-box-title acea-row row-between-wrapper">
<!--<view class="num">{{ info.sum_integral }}</view>--> <view class="title-l">可用积分<text class="colR">{{ integral }}</text></view>
<!--<view>累计积分</view>--> <view class="title-r" @click="toShop">去兑换 <text class="iconfont icon-jiantou"></text></view>
<!--</view>--> </view>
<!--<view class="item">--> <view class="day-list acea-row row-between">
<!--<view class="num">{{ info.deduction_integral }}</view>--> <view class="day-item acea-row row-column row-center row-middle"
<!--<view>累计消费</view>--> :class=" index+1 <= signNum ? 'active' : '' "
<!--</view>--> v-for="(item,index) in signInfos"
<!--<view class="item">--> :key="index"
<!--<view class="num">{{ info.today_integral }}</view>--> v-if="index < signInfos.length - 1">
<!--<view>今日获得</view>--> <view>{{item.day}}</view>
<!--</view>--> <image src="../../../../../static/glod.png"></image>
<!--</view>--> <text class="fz20">+{{item.signNum}}积分</text>
</view>
<view class="day-item day-item-last acea-row row-center row-middle"
:class=" signNum == signInfos.length+1 ? 'active' : '' " v-else>
<view class="acea-row row-column row-center">
<view>{{signInfos[signInfos.length-1].day}}</view>
<text class="colG">签到大礼包</text>
<text class="fz20">+{{signInfos[signInfos.length-1].signNum}}积分</text>
</view>
<image src="../../../../../static/glod.png"></image>
</view>
</view>
<view class="tips-box acea-row">
<image src="../../../../../static/tips.png"></image>
<text>连续签到积分累加</text>
</view>
<view class="signIn-btn acea-row row-column row-center row-middle" :class="isDaySign ? 'default' : ''" @click="handelSignin">
<text class="b-word">{{isDaySign ? '今日已签到' : '立即签到'}}</text>
<text>本轮累计签到{{signNum}}</text>
</view>
</view> </view>
<view class="wrapper"> <view class="wrapper">
<view class="content-title">做任务赚积分</view> <!-- <view class="content-title">做任务赚积分</view> -->
<view class="menu-list"> <view class="menu-list">
<view class="menu-item acea-row row-between row-middle"> <view class="menu-item acea-row row-between row-middle noBorder">
<view class="menu-item-l acea-row row-middle"> <view class="menu-item-l acea-row row-middle">
<view class="icon"><image src="../../../../../static/jifen1.png" mode=""></image></view> <view class="icon"><image src="../../../../../static/jifen1.png" mode=""></image></view>
<view class="acea-row row-column">
<text>完成个人信息</text> <text>完成个人信息</text>
<text class="integral">+10积分</text> <text class="integral">+{{completedNum}}积分</text>
</view>
</view> </view>
<view class="btn">去完成</view> <view class="btn" @click="toPersonalData" :class="isCompleted ? 'default' : ''">{{isCompleted ? '已完成' : '去完成'}}</view>
</view> </view>
<view class="menu-item acea-row row-between row-middle"> <view class="menu-item acea-row row-between row-middle">
<view class="menu-item-l acea-row row-middle"> <view class="menu-item-l acea-row row-middle">
<view class="icon"><image src="../../../../../static/jifen2.png" mode=""></image></view> <view class="icon"><image src="../../../../../static/jifen2.png" mode=""></image></view>
<view class="acea-row row-column">
<text>每日签到</text> <text>每日签到</text>
<text class="integral">+10积分</text>
</view> </view>
<view class="btn">去签到</view> </view>
<view class="btn" :class="isDaySign ? 'default' : ''">{{isDaySign ? '已签到' : '去签到'}}</view>
</view> </view>
<view class="menu-item acea-row row-between row-middle"> <view class="menu-item acea-row row-between row-middle">
<view class="menu-item-l acea-row row-middle"> <view class="menu-item-l acea-row row-middle">
<view class="icon"><image src="../../../../../static/jifen3.png" mode=""></image></view> <view class="icon"><image src="../../../../../static/jifen3.png" mode=""></image></view>
<text>阅读文章2篇</text> <view class="acea-row row-column">
<text class="integral">+10积分</text> <text>报名学习打榜</text>
</view>
<view class="btn">去完成</view>
</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>
<view class="btn">去完成</view> <view class="btn" @click="toCourse">去完成</view>
</view> </view>
</view> </view>
<!-- <view class="nav acea-row"> <!-- <view class="nav acea-row">
@ -108,11 +122,11 @@
<!--</view>--> <!--</view>-->
<!--</view>--> <!--</view>-->
</view> </view>
<Loading :loaded="loaded" :loading="loading"></Loading> <!-- <Loading :loaded="loaded" :loading="loading"></Loading> -->
</view> </view>
</template> </template>
<script> <script>
import { getIntegralList, postSignUser } from "@/api/user"; import { getIntegralList, postSignUser, signIntegral, integral } from "@/api/user";
import Loading from "@/components/Loading"; import Loading from "@/components/Loading";
import { dataFormat } from "@/utils"; import { dataFormat } from "@/utils";
@ -140,18 +154,68 @@ export default {
}, },
list: [], list: [],
info: [], info: [],
isDaySign: false,
integral: 0,
signInfos: [],
isCompleted: false,
completedNum: 0,
signNum:null,
loaded: false, loaded: false,
loading: false loading: false
}; };
}, },
mounted: function() { onShow(){
this.getIntegral(); this.getIntegral();
this.getInfo();
}, },
onReachBottom() { mounted: function() {
!this.loading && this.getInfo();
// this.getInfo();
}, },
// onReachBottom() {
// !this.loading && this.getInfo();
// },
methods: { methods: {
getIntegral(){
uni.showLoading({
title: '正在加载中...'
})
integral().then((res)=>{
console.log(res)
if(res.success){
this.signInfos = res.data.signInfos
this.signNum = res.data.signNum
this.isDaySign = res.data.isDaySign
this.integral = res.data.integral
this.isCompleted = res.data.isCompleted
this.completedNum = res.data.completedNum
}
uni.hideLoading()
})
},
handelSignin(){
signIntegral().then((res)=>{
if(res.success){
uni.showToast({
title: '签到成功!'
})
this.getIntegral();
} else{
uni.showToast({
title: res.msg,
icon: 'none'
})
}
})
},
toShop(){
this.$yrouter.switchTab("/pages/shop/GoodsClass/index");
},
toPersonalData(){
this.$yrouter.push("/pages/user/PersonalData/index");
},
toCourse(){
this.$yrouter.switchTab("/pages/course/index");
},
dataFormat, dataFormat,
goSignIn() { goSignIn() {
this.$yrouter.push("/pages/user/signIn/Sign/index"); this.$yrouter.push("/pages/user/signIn/Sign/index");
@ -162,49 +226,155 @@ export default {
nav: function(index) { nav: function(index) {
this.current = index; this.current = index;
}, },
getInfo: function() { // getInfo: function() {
let that = this; // let that = this;
if (that.loaded == true || that.loading == true) return; // if (that.loaded == true || that.loading == true) return;
that.loading = true; // that.loading = true;
getIntegralList(that.where).then( // getIntegralList(that.where).then(
res => { // res => {
that.loading = false; // that.loading = false;
that.loaded = res.data.length < that.where.limit; // that.loaded = res.data.length < that.where.limit;
that.loadTitle = that.loaded ? "人家是有底线的" : "上拉加载更多"; // that.loadTitle = that.loaded ? "线" : "";
that.where.page = that.where.page + 1; // that.where.page = that.where.page + 1;
that.list.push.apply(that.list, res.data); // that.list.push.apply(that.list, res.data);
}, // },
err => { // err => {
uni.showToast({ // uni.showToast({
title: err.msg || err.response.data.msg|| err.response.data.message, // title: err.msg || err.response.data.msg|| err.response.data.message,
icon: 'none', // icon: 'none',
duration: 2000 // duration: 2000
}); // });
} // }
); // );
}, // },
getIntegral: function() { // getIntegral: function() {
let that = this; // let that = this;
postSignUser(that.data).then( // postSignUser(that.data).then(
res => { // res => {
that.info = res.data; // that.info = res.data;
}, // },
err => { // err => {
uni.showToast({ // uni.showToast({
title: err.msg || err.response.data.msg|| err.response.data.message, // title: err.msg || err.response.data.msg|| err.response.data.message,
icon: 'none', // icon: 'none',
duration: 2000 // duration: 2000
}); // });
} // }
); // );
} // }
} }
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.integral-details { .integral-details {
height: 100vh; height: 100vh;
background: #EEEEEE;
box-sizing: border-box;
padding: 20rpx 30rpx;
.week-signIn-box{
width: 100%;
background: #fff; background: #fff;
padding: 30rpx 30rpx 40rpx;
font-size: 28rpx;
box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.16);
border-radius: 22rpx;
margin: 20rpx 0;
.signIn-box-title{
.title-l{
font-size: 32rpx;
color: #222;
.colR{
color: #FF0D0D;
}
}
.title-r{
font-size: 20rpx;
color: #f8c06f;
width: 104rpx;
height: 30rpx;
line-height: 30rpx;
text-align: center;
background: #F3F3F3;
border-radius: 14rpx;
.icon-jiantou{
font-size: 20rpx;
margin-top: 2rpx;
}
}
}
.day-list{
.day-item{
width: 148rpx;
height: 160rpx;
background: #EFEFF1;
border-radius: 12rpx;
color: #fff;
font-size: 24rpx;
color: #333;
margin-top: 28rpx;
.fz20{
font-size: 20rpx;
color: #AFAFAF;
}
image{
width: 72rpx;
height: 72rpx;
}
}
.day-item-last{
width: 312rpx;
.colG{
color: #AFAFAF;
margin: 10rpx 0 0;
}
image{
width: 106rpx;
height: 106rpx;
margin-left: 30rpx;
}
}
.active{
color: #fff;
background: #F7C37A;
.fz20{
color: #fff;
}
.colG{
color: #fff;
}
}
}
.tips-box{
font-size: 24rpx;
color: #D1D1D1;
margin: 28rpx 0 48rpx;
image{
width: 36rpx;
height: 36rpx;
margin-right: 8rpx;
}
}
.signIn-btn{
width: 424rpx;
height: 110rpx;
background: linear-gradient(320deg, #FBBE66 0%, #FABF69 100%);
box-shadow: 0px 6rpx 12rpx #F7D08E;
border-radius: 56rpx;
margin: 0 auto;
font-size: 20rpx;
color: #fff;
.b-word{
font-size: 40rpx;
line-height: 56rpx;
}
}
}
.default{
color: #999 !important;
background: #EFEFF1 !important;
box-shadow: 0px 6rpx 12rpx #EFEFF1 !important;
}
.header{ .header{
background-image: none; background-image: none;
width: 750rpx; width: 750rpx;
@ -237,9 +407,11 @@ export default {
} }
} }
.wrapper{ .wrapper{
background: #fff;
padding: 0 30rpx; padding: 30rpx;
font-size: 28rpx; font-size: 28rpx;
box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.16);
border-radius: 22rpx;
.content-title{ .content-title{
font-size: 36rpx; font-size: 36rpx;
font-weight: 600; font-weight: 600;
@ -248,10 +420,13 @@ export default {
margin: 50rpx 0; margin: 50rpx 0;
} }
.menu-list{ .menu-list{
margin-top: 20rpx;
.menu-item{ .menu-item{
width: 100%; width: 100%;
height: 136rpx; height: 100rpx;
border-top: 1px solid #ececec; border-top: 1px solid #ececec;
font-size: 28rpx;
color: #222;
image{ image{
width: 76rpx; width: 76rpx;
height: 76rpx; height: 76rpx;
@ -260,20 +435,22 @@ export default {
margin-right: 20rpx; margin-right: 20rpx;
} }
.integral{ .integral{
font-size: 32rpx; font-size: 24rpx;
color: #FD513B; color: #FCBF64;
margin-left: 20rpx;
} }
.btn{ .btn{
width: 122rpx; width: 122rpx;
height: 52rpx; height: 52rpx;
background: #FD513B; background: #FCBF64;
border-radius: 30rpx; border-radius: 30rpx;
text-align: center; text-align: center;
line-height: 52rpx; line-height: 52rpx;
color: #fff; color: #fff;
} }
} }
.noBorder{
border: none;
}
} }
} }
} }

BIN
static/course-icon1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 511 B

After

Width:  |  Height:  |  Size: 615 B

BIN
static/course-icon2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 825 B

After

Width:  |  Height:  |  Size: 629 B

BIN
static/course-icon3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 562 B

After

Width:  |  Height:  |  Size: 511 B

BIN
static/course-icon4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 642 B

After

Width:  |  Height:  |  Size: 578 B

BIN
static/glod.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
static/jifen1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
static/jifen2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
static/jifen3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
static/jifen4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

BIN
static/myorder-icon1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1007 B

BIN
static/myorder-icon2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
static/myorder-icon3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
static/myorder-icon4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 912 B

BIN
static/myorder-icon5.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
static/tips.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 662 B

BIN
static/xyddImages/back.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

BIN
static/xyddImages/border2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
static/xyddImages/btn-bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
static/xyddImages/light-bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

BIN
static/xyddImages/light-border.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

BIN
static/xyddImages/light-l.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
static/xyddImages/tabs-box-bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Loading…
Cancel
Save