Compare commits

..

6 Commits

  1. 21
      api/user.js
  2. 15
      components/ProductConSwiper.vue
  3. 2
      components/ProductWindow.vue
  4. 95
      components/sSwiper.vue
  5. 3
      components/uni-easyinput/common.js
  6. 5
      config/index.js
  7. 1
      main.js
  8. 44
      pages.json
  9. 120
      pages/authorization/agreementPage.vue
  10. 116
      pages/course/detail.vue
  11. 218
      pages/course/index.vue
  12. 2
      pages/course/signIn.vue
  13. 108
      pages/home/components/ArticleList.vue
  14. 124
      pages/home/components/CourseList.vue
  15. 6
      pages/home/components/FirstNewProduct.vue
  16. 54
      pages/home/components/ListTitleBox.vue
  17. 95
      pages/home/components/StadyList.vue
  18. 435
      pages/home/index-copy.vue
  19. 569
      pages/home/index.vue
  20. 35
      pages/knowledge/index.vue
  21. 119
      pages/shop/GoodsClass/index.vue
  22. 139
      pages/shop/GoodsCon/index.vue
  23. 2
      pages/study/dabang.vue
  24. 2
      pages/study/detail.vue
  25. 298
      pages/user/User/index.vue
  26. 108
      pages/user/bindCard/index.vue
  27. 167
      pages/user/cashOut/index.vue
  28. 114
      pages/user/myTeam/index.vue
  29. BIN
      static/bangdanbg.png
  30. BIN
      static/car-icon.png
  31. BIN
      static/gwd.png
  32. BIN
      static/gwd.zip
  33. BIN
      static/idx-icon1.png
  34. BIN
      static/ji.png
  35. BIN
      static/jifen-icon.png
  36. BIN
      static/kefu.png
  37. BIN
      static/myorder-icon1.png
  38. BIN
      static/myorder-icon2.png
  39. BIN
      static/myorder-icon3.png
  40. BIN
      static/myorder-icon4.png
  41. BIN
      static/myorder-icon5.png
  42. BIN
      static/profit.png
  43. BIN
      static/tit1.png
  44. BIN
      static/tit2.png
  45. BIN
      static/tit3.png
  46. BIN
      static/tit4.png
  47. BIN
      static/tit5.png
  48. BIN
      static/tit6.png
  49. BIN
      static/uni.ttf
  50. BIN
      static/user-index-bg.png
  51. BIN
      static/user-menu1.png
  52. BIN
      static/user-menu2.png
  53. BIN
      static/user-menu3.png
  54. BIN
      static/user-menu4.png
  55. BIN
      static/user-menu5.png
  56. BIN
      static/user-menu6.png
  57. BIN
      static/yi.png
  58. 108
      utils/index.js
  59. 4
      utils/request.js

21
api/user.js

@ -472,3 +472,24 @@ export function integral(q) {
export function signIntegral(q) { export function signIntegral(q) {
return request.post('/sign/integral') return request.post('/sign/integral')
} }
/*
* 获取我的团队
* */
export function getMyTeam(){
return request.post('user/myTeam')
}
/*
* 提现
* */
export function cash(data){
return request.post('extract/cash',data)
}
/*
* 绑定银行卡
* */
export function bingCard(data){
return request.post('userBank/saveBankInfo',data)
}

15
components/ProductConSwiper.vue

@ -3,11 +3,14 @@
<swiper <swiper
class="swiper-wrapper" class="swiper-wrapper"
@change="handleChange" @change="handleChange"
:indicator-dots="true"
indicator-color="#868884"
indicator-active-color="#fff"
v-if="imgUrls.length > 0" v-if="imgUrls.length > 0"
> >
<block v-for="(item, imgUrlsIndex) in imgUrls" :key="imgUrlsIndex"> <block v-for="(item, imgUrlsIndex) in imgUrls" :key="imgUrlsIndex">
<swiper-item> <swiper-item>
<image :src="item" @tap="previewImage(imgUrlsIndex)" class="slide-image" /> <image :src="item" @tap="previewImage(imgUrlsIndex)" class="slide-image" mode="aspectFill" />
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
@ -16,7 +19,7 @@
<image :src="item" class="slide-image" /> <image :src="item" class="slide-image" />
</swiperSlide> </swiperSlide>
</swiper>--> </swiper>-->
<view class="pages">{{ currents || 1 }}/{{ imgUrls.length || 1 }}</view> <!-- <view class="pages">{{ currents || 1 }}/{{ imgUrls.length || 1 }}</view> -->
</view> </view>
</template> </template>
<script> <script>
@ -69,3 +72,11 @@ export default {
}, },
}; };
</script> </script>
<style lang="less">
.product-bg{
height: 600rpx;
swiper{
height: 100%;
}
}
</style>

2
components/ProductWindow.vue

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

95
components/sSwiper.vue

@ -0,0 +1,95 @@
<template>
<swiper class="swiper-block" circular="true" previous-margin="100rpx" next-margin="100rpx" current="0" @change="swiperChange">
<swiper-item v-for="(item, index) in list" :key="index">
<view class="swiper-item" :class="(swiperIndex == index ? 'active' : '')" @click="toDetail(item.id)">
<image mode="aspectFill" :src="item.imageInput" class="slide-image"></image>
<view class="title line1">{{item.title}}</view>
<view class="intro line2">{{item.synopsis}}</view>
</view>
</swiper-item>
</swiper>
</template>
<script>
export default{
props: {
imgs: {
type: Array,
default: []
},
list: {
type: Array,
default: []
}
},
data(){
return {
swiperIndex: 0
}
},
methods: {
swiperChange(e) {
this.swiperIndex = e.detail.current
},
toDetail(id){
this.$yrouter.push({
path: '/pages/knowledge/detail',
query: {
id: id,
},
})
},
}
}
</script>
<style lang="less">
.swiper-block {
width: 100%;
height: 780rpx;
}
swiper-item{
width: 100%;
height: 780rpx;
}
.swiper-item {
width: 420rpx;
height: 740rpx;
margin: 0 auto;
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
overflow: unset;
position: relative;
}
.slide-image {
width: 420rpx;
height: 578rpx;
border-radius: 230rpx 230rpx 34rpx 34rpx;
border: 1rpx solid #B67827;
z-index: 1;
}
.title{
width: 420rpx;
height: 96rpx;
background: #B67827;
color: #FFCB85;
text-align: center;
line-height: 96rpx;
margin-top: -96rpx;
padding: 0 12rpx;
border-radius: 0rpx 0rpx 34rpx 34rpx;
z-index: 99;
}
.intro{
font-size: 28rpx;
color: #222;
margin-top: 20rpx;
}
.active {
transform: scale(1.1);
transition: all 0.2s linear;
z-index: 20;
}
</style>

3
components/uni-easyinput/common.js

@ -8,9 +8,10 @@ export const debounce = function(func, wait = 1000, immediate = true) {
let timer; let timer;
console.log(1); console.log(1);
return function() { return function() {
console.log(123); console.log(timer,'timer');
let context = this, let context = this,
args = arguments; args = arguments;
console.log(args,'argsargs')
if (timer) clearTimeout(timer); if (timer) clearTimeout(timer);
if (immediate) { if (immediate) {
let callNow = !timer; let callNow = !timer;

5
config/index.js

@ -1,9 +1,10 @@
// 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://10.11.32.109:8088/api' // export const VUE_APP_API_URL = 'http://192.168.0.112:8088/api'
// export const VUE_APP_API_URL = 'http://192.168.1.34:8088/api/' // export const VUE_APP_API_URL = 'http://192.168.68.126: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'

1
main.js

@ -40,6 +40,7 @@ Object.defineProperty(Vue.prototype, '$yroute', {
}) })
Vue.prototype.$VUE_APP_API_URL = VUE_APP_API_URL Vue.prototype.$VUE_APP_API_URL = VUE_APP_API_URL
Vue.prototype.$VUE_APP_RESOURCES_URL = VUE_APP_RESOURCES_URL
Vue.component('cu-custom', cuCustom) Vue.component('cu-custom', cuCustom)
let deviceType = '' let deviceType = ''

44
pages.json

@ -55,20 +55,6 @@
"navigationBarTitleText": "禅易教育研究院", "navigationBarTitleText": "禅易教育研究院",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
},
{
"path": "pages/diandeng/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/diandeng/lighting",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
}, },
{ {
"path": "pages/course/index", "path": "pages/course/index",
@ -170,8 +156,7 @@
{ {
"path": "pages/user/User/index", "path": "pages/user/User/index",
"style": { "style": {
"navigationBarTitleText": "我的", "navigationBarTitleText": "会员中心"
"enablePullDownRefresh": true
} }
}, },
@ -312,6 +297,33 @@
// "navigationBarTitleText": "商家订单统计" // "navigationBarTitleText": "商家订单统计"
// } // }
// } // }
,{
"path" : "pages/user/myTeam/index",
"style" :
{
"navigationBarTitleText": "我的团队",
"enablePullDownRefresh": true
}
}
,{
"path" : "pages/user/cashOut/index",
"style" :
{
"navigationBarTitleText": "提现",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/user/bindCard/index",
"style" :
{
"navigationBarTitleText": "绑定银行卡",
"enablePullDownRefresh": false
}
}
], ],
"subPackages": [ "subPackages": [
{ {

120
pages/authorization/agreementPage.vue

@ -24,32 +24,32 @@
用户协议<br/> 用户协议<br/>
特别提示<br/> 特别提示<br/>
云生态在此特别提醒您用户在注册成为用户之前请认真阅读本用户协议以下简称协议确保您充分理解本协议中各条款请您审慎阅读并选择接受或不接受本协议除非您接受本协议所有条款否则您无权注册登录或使用本协议所涉服务您的注册登录使用等行为将视为对本协议的接受并同意接受本协议各项条款的约束<br/> 禅易精舍在此特别提醒您用户在注册成为用户之前请认真阅读本用户协议以下简称协议确保您充分理解本协议中各条款请您审慎阅读并选择接受或不接受本协议除非您接受本协议所有条款否则您无权注册登录或使用本协议所涉服务您的注册登录使用等行为将视为对本协议的接受并同意接受本协议各项条款的约束<br/>
本协议约定云生态与用户之间关于云生态软件服务以下简称服务的权利义务用户是指注册登录使用本服务的个人本协议可由云生态随时更新更新后的协议条款一旦公布即代替原来的协议条款恕不再另行通知用户可在本网站查阅最新版协议条款云生态修改协议条款后如果用户不接受修改后的条款请立即停止使用云生态提供的服务用户继续使用云生态提供的服务将被视为接受修改后的协议<br/> 本协议约定禅易精舍与用户之间关于禅易精舍软件服务以下简称服务的权利义务用户是指注册登录使用本服务的个人本协议可由禅易精舍随时更新更新后的协议条款一旦公布即代替原来的协议条款恕不再另行通知用户可在本网站查阅最新版协议条款禅易精舍修改协议条款后如果用户不接受修改后的条款请立即停止使用禅易精舍提供的服务用户继续使用禅易精舍提供的服务将被视为接受修改后的协议<br/>
用户个人信息保护<br/> 用户个人信息保护<br/>
1用户在注册帐号或使用本服务的过程中可能需要填写或提交一些必要的个人信息如法律法规规章规范性文件以下称法律法规规定的需要填写的身份信息如用户提交的信息不完整或不符合法律法规的规定则用户可能无法使用本服务或在使用本服务的过程中受到限制<br/> 1用户在注册帐号或使用本服务的过程中可能需要填写或提交一些必要的个人信息如法律法规规章规范性文件以下称法律法规规定的需要填写的身份信息如用户提交的信息不完整或不符合法律法规的规定则用户可能无法使用本服务或在使用本服务的过程中受到限制<br/>
2用户个人信息包括<br/> 2用户个人信息包括<br/>
1用户自行提供的用户个人信息如注册时填写的手机号码电子邮件等个人信息使用服务时提供的共享信息等<br/> 1用户自行提供的用户个人信息如注册时填写的手机号码电子邮件等个人信息使用服务时提供的共享信息等<br/>
2其他方分享的用户个人信息<br/> 2其他方分享的用户个人信息<br/>
3云生态为提供服务而合法收集的用户必要个人信息如使用服务时系统自动采集的设备或软件信息浏览历史信息通讯时间信息等技术信息用户开启定位功能并使用服务时的地理位置信息等 3禅易精舍为提供服务而合法收集的用户必要个人信息如使用服务时系统自动采集的设备或软件信息浏览历史信息通讯时间信息等技术信息用户开启定位功能并使用服务时的地理位置信息等
其中个人隐私信息是指涉及用户个人身份或个人隐私的信息比如用户真实姓名身份证号手机号码手机设备识别码IP地址用户聊天记录非个人隐私信息是指用户对本服务的操作状态以及使用习惯等明确且客观反映在云生态服务器端的基本记录信息个人隐私信息范围外的其它普通信息以及用户同意公开的上述隐私信息云生态保证在取得用户书面同意的情况下收集使用或公开用户的个人隐私信息用户同意云生态无需获得用户的另行确认与授权即可收集使用或公开用户的非个人隐私信息<br/> 其中个人隐私信息是指涉及用户个人身份或个人隐私的信息比如用户真实姓名身份证号手机号码手机设备识别码IP地址用户聊天记录非个人隐私信息是指用户对本服务的操作状态以及使用习惯等明确且客观反映在禅易精舍服务器端的基本记录信息个人隐私信息范围外的其它普通信息以及用户同意公开的上述隐私信息禅易精舍保证在取得用户书面同意的情况下收集使用或公开用户的个人隐私信息用户同意禅易精舍无需获得用户的另行确认与授权即可收集使用或公开用户的非个人隐私信息<br/>
3尊重用户个人信息的私有性是云生态的一贯制度云生态将采取技术措施和其他必要措施确保用户个人信息安全防止在本服务中收集的用户个人信息泄露毁损或丢失在发生前述情形或者云生态发现存在发生前述情形的可能时云生态将及时采取补救措施并告知用户用户如发现存在前述情形亦需立即与云生态联系<br/> 3尊重用户个人信息的私有性是禅易精舍的一贯制度禅易精舍将采取技术措施和其他必要措施确保用户个人信息安全防止在本服务中收集的用户个人信息泄露毁损或丢失在发生前述情形或者禅易精舍发现存在发生前述情形的可能时禅易精舍将及时采取补救措施并告知用户用户如发现存在前述情形亦需立即与禅易精舍联系<br/>
4云生态未经用户同意不向任何第三方公开 透露用户个人隐私信息但以下特定情形除外<br/> 4禅易精舍未经用户同意不向任何第三方公开 透露用户个人隐私信息但以下特定情形除外<br/>
(1) 云生态根据法律法规规定或有权机关的指示提供用户的个人隐私信息<br/> (1) 禅易精舍根据法律法规规定或有权机关的指示提供用户的个人隐私信息<br/>
(2) 由于用户将其用户密码告知他人或与他人共享注册帐户与密码由此导致的任何个人信息的泄漏或其他非因云生态原因导致的个人隐私信息的泄露<br/> (2) 由于用户将其用户密码告知他人或与他人共享注册帐户与密码由此导致的任何个人信息的泄漏或其他非因禅易精舍原因导致的个人隐私信息的泄露<br/>
(3) 用户自行向第三方公开其个人隐私信息<br/> (3) 用户自行向第三方公开其个人隐私信息<br/>
(4) 用户与云生态及合作单位之间就用户个人隐私信息的使用公开达成约定云生态因此向合作单位公开用户个人隐私信息<br/> (4) 用户与禅易精舍及合作单位之间就用户个人隐私信息的使用公开达成约定禅易精舍因此向合作单位公开用户个人隐私信息<br/>
(5) 任何由于黑客攻击电脑病毒侵入及其他不可抗力事件导致用户个人隐私信息的泄露<br/> (5) 任何由于黑客攻击电脑病毒侵入及其他不可抗力事件导致用户个人隐私信息的泄露<br/>
(6) 用户个人信息已经经过处理无法识别特定个人且不能复原<br/> (6) 用户个人信息已经经过处理无法识别特定个人且不能复原<br/>
5用户同意云生态可在以下事项中使用用户的个人隐私信息<br/> 5用户同意禅易精舍可在以下事项中使用用户的个人隐私信息<br/>
(1) 云生态向用户及时发送重要通知如软件更新本协议条款的变更<br/> (1) 禅易精舍向用户及时发送重要通知如软件更新本协议条款的变更<br/>
(2) 云生态内部进行审计数据分析和研究等以改进云生态的产品服务和与用户之间的沟通<br/> (2) 禅易精舍内部进行审计数据分析和研究等以改进禅易精舍的产品服务和与用户之间的沟通<br/>
(3) 依本协议约定云生态管理审查用户信息及进行处理措施<br/> (3) 依本协议约定禅易精舍管理审查用户信息及进行处理措施<br/>
(4) 适用法律法规规定的其他事项<br/> (4) 适用法律法规规定的其他事项<br/>
除上述事项外如未取得用户事先同意云生态不会将用户个人隐私信息使用于任何其他用途<br/> 除上述事项外如未取得用户事先同意禅易精舍不会将用户个人隐私信息使用于任何其他用途<br/>
内容规范<br/> 内容规范<br/>
1本条所述内容是指用户使用本服务过程中所制作上载复制发布传播的任何内容包括但不限于帐号头像名称用户说明等注册信息及认证资料或文字语音图片视频图文等发送回复或自动回复消息和相关链接页面以及其他使用帐号或本服务所产生的内容<br/> 1本条所述内容是指用户使用本服务过程中所制作上载复制发布传播的任何内容包括但不限于帐号头像名称用户说明等注册信息及认证资料或文字语音图片视频图文等发送回复或自动回复消息和相关链接页面以及其他使用帐号或本服务所产生的内容<br/>
2用户不得利用云生态帐号或本服务制作上载复制发布传播如下法律法规和政策禁止的内容<br/> 2用户不得利用禅易精舍帐号或本服务制作上载复制发布传播如下法律法规和政策禁止的内容<br/>
(1) 反对宪法所确定的基本原则的<br/> (1) 反对宪法所确定的基本原则的<br/>
(2) 危害国家安全泄露国家秘密颠覆国家政权破坏国家统一的<br/> (2) 危害国家安全泄露国家秘密颠覆国家政权破坏国家统一的<br/>
(3) 损害国家荣誉和利益的<br/> (3) 损害国家荣誉和利益的<br/>
@ -60,7 +60,7 @@
(8) 侮辱或者诽谤他人侵害他人合法权益的<br/> (8) 侮辱或者诽谤他人侵害他人合法权益的<br/>
(9) 不遵守法律法规底线社会主义制度底线国家利益底线公民合法权益底线社会公共秩序底线道德风尚底线和信息真实性底线的七条底线要求的<br/> (9) 不遵守法律法规底线社会主义制度底线国家利益底线公民合法权益底线社会公共秩序底线道德风尚底线和信息真实性底线的七条底线要求的<br/>
(10) 含有法律行政法规禁止的其他内容的信息<br/> (10) 含有法律行政法规禁止的其他内容的信息<br/>
3用户不得利用云生态帐号或本服务制作上载复制发布传播如下干扰云生态正常运营以及侵犯其他用户或第三方合法权益的内容<br/> 3用户不得利用禅易精舍帐号或本服务制作上载复制发布传播如下干扰禅易精舍正常运营以及侵犯其他用户或第三方合法权益的内容<br/>
(1) 含有任何性或性暗示的<br/> (1) 含有任何性或性暗示的<br/>
(2) 含有辱骂恐吓威胁内容的<br/> (2) 含有辱骂恐吓威胁内容的<br/>
(3) 含有骚扰垃圾广告恶意信息诱骗信息的<br/> (3) 含有骚扰垃圾广告恶意信息诱骗信息的<br/>
@ -68,78 +68,78 @@
(5) 侵害他人名誉权肖像权知识产权商业秘密等合法权利的<br/> (5) 侵害他人名誉权肖像权知识产权商业秘密等合法权利的<br/>
(6) 含有其他干扰本服务正常运营和侵犯其他用户或第三方合法权益内容的信息<br/> (6) 含有其他干扰本服务正常运营和侵犯其他用户或第三方合法权益内容的信息<br/>
使用规则<br/> 使用规则<br/>
1用户在本服务中或通过本服务所传送发布的任何内容并不反映或代表也不得被视为反映或代表云生态的观点立场或政策云生态对此不承担任何责任<br/> 1用户在本服务中或通过本服务所传送发布的任何内容并不反映或代表也不得被视为反映或代表禅易精舍的观点立场或政策禅易精舍对此不承担任何责任<br/>
2用户不得利用云生态帐号或本服务进行如下行为<br/> 2用户不得利用禅易精舍帐号或本服务进行如下行为<br/>
(1) 提交发布虚假信息或盗用他人头像或资料冒充利用他人名义的<br/> (1) 提交发布虚假信息或盗用他人头像或资料冒充利用他人名义的<br/>
(2) 强制诱导其他用户关注点击链接页面或分享信息的<br/> (2) 强制诱导其他用户关注点击链接页面或分享信息的<br/>
(3) 虚构事实隐瞒真相以误导欺骗他人的<br/> (3) 虚构事实隐瞒真相以误导欺骗他人的<br/>
(4) 利用技术手段批量建立虚假帐号的<br/> (4) 利用技术手段批量建立虚假帐号的<br/>
(5) 利用云生态帐号或本服务从事任何违法犯罪活动的<br/> (5) 利用禅易精舍帐号或本服务从事任何违法犯罪活动的<br/>
(6) 制作发布与以上行为相关的方法工具或对此类方法工具进行运营或传播无论这些行为是否为商业目的<br/> (6) 制作发布与以上行为相关的方法工具或对此类方法工具进行运营或传播无论这些行为是否为商业目的<br/>
(7) 其他违反法律法规规定侵犯其他用户合法权益干扰云生态正常运营或云生态未明示授权的行为<br/> (7) 其他违反法律法规规定侵犯其他用户合法权益干扰禅易精舍正常运营或禅易精舍未明示授权的行为<br/>
3用户须对利用云生态帐号或本服务传送信息的真实性合法性无害性准确性有效性等全权负责与用户所传播的信息相关的任何法律责任由用户自行承担云生态无关如因此给云生态或第三方造成损害的用户应当依法予以赔偿<br/> 3用户须对利用禅易精舍帐号或本服务传送信息的真实性合法性无害性准确性有效性等全权负责与用户所传播的信息相关的任何法律责任由用户自行承担禅易精舍无关如因此给禅易精舍或第三方造成损害的用户应当依法予以赔偿<br/>
4云生态提供的服务中可能包括广告用户同意在使用过程中显示云生态和第三方供应商合作伙伴提供的广告除法律法规明确规定外用户应自行对依该广告信息进行的交易负责对用户因依该广告信息进行的交易或前述广告商提供的内容而遭受的损失或损害云生态不承担任何责任<br/> 4禅易精舍提供的服务中可能包括广告用户同意在使用过程中显示禅易精舍和第三方供应商合作伙伴提供的广告除法律法规明确规定外用户应自行对依该广告信息进行的交易负责对用户因依该广告信息进行的交易或前述广告商提供的内容而遭受的损失或损害禅易精舍不承担任何责任<br/>
5除非云生态书面许可用户不得从事下列任一行为<br/> 5除非禅易精舍书面许可用户不得从事下列任一行为<br/>
(1) 删除软件及其副本上关于著作权的信息<br/> (1) 删除软件及其副本上关于著作权的信息<br/>
(2) 对软件进行反向工程反向汇编反向编译或者以其他方式尝试发现软件的源代码<br/> (2) 对软件进行反向工程反向汇编反向编译或者以其他方式尝试发现软件的源代码<br/>
(3) 云生态拥有知识产权的内容进行使用出租出借复制修改链接转载汇编发表出版建立镜像站点等<br/> (3) 禅易精舍拥有知识产权的内容进行使用出租出借复制修改链接转载汇编发表出版建立镜像站点等<br/>
(4) 对软件或者软件运行过程中释放到任何终端内存中的数据软件运行过程中客户端与服务器端的交互数据以及软件运行所必需的系统数据进行复制修改增加删除挂接运行或创作任何衍生作品形式包括但不限于使用插件外挂或非经云生态授权的第三方工具/服务接入软件和相关系统<br/> (4) 对软件或者软件运行过程中释放到任何终端内存中的数据软件运行过程中客户端与服务器端的交互数据以及软件运行所必需的系统数据进行复制修改增加删除挂接运行或创作任何衍生作品形式包括但不限于使用插件外挂或非经禅易精舍授权的第三方工具/服务接入软件和相关系统<br/>
(5) 通过修改或伪造软件运行中的指令数据增加删减变动软件的功能或运行效果或者将用于上述用途的软件方法进行运营或向公众传播无论这些行为是否为商业目的<br/> (5) 通过修改或伪造软件运行中的指令数据增加删减变动软件的功能或运行效果或者将用于上述用途的软件方法进行运营或向公众传播无论这些行为是否为商业目的<br/>
(6) 通过非云生态开发授权的第三方软件插件外挂系统登录或使用云生态软件及服务或制作发布传播非云生态开发授权的第三方软件插件外挂系统<br/> (6) 通过非禅易精舍开发授权的第三方软件插件外挂系统登录或使用禅易精舍软件及服务或制作发布传播非禅易精舍开发授权的第三方软件插件外挂系统<br/>
账户管理<br/> 账户管理<br/>
1 云生态帐号的所有权归云生态所有用户完成申请注册手续后获得云生态帐号的使用权该使用权仅属于初始申请注册人禁止赠与借用租用转让或售卖云生态因经营需要有权回收用户的云生态帐号<br/> 1 禅易精舍帐号的所有权归禅易精舍所有用户完成申请注册手续后获得禅易精舍帐号的使用权该使用权仅属于初始申请注册人禁止赠与借用租用转让或售卖禅易精舍因经营需要有权回收用户的禅易精舍帐号<br/>
2用户可以通过<br/> 2用户可以通过<br/>
1查看与编辑个人资料页<br/> 1查看与编辑个人资料页<br/>
2设置页面里的账号与安全页面来查询更改删除注销云生态帐户上的个人资料注册信息及传送内容等但需注意删除有关信息的同时也会删除用户储存在系统中的文字和图片用户需承担该风险<br/> 2设置页面里的账号与安全页面来查询更改删除注销禅易精舍帐户上的个人资料注册信息及传送内容等但需注意删除有关信息的同时也会删除用户储存在系统中的文字和图片用户需承担该风险<br/>
3用户有责任妥善保管注册帐号信息及帐号密码的安全因用户保管不善可能导致遭受盗号或密码失窃责任由用户自行承担用户需要对注册帐号以及密码下的行为承担法律责任用户同意在任何情况下不使用其他用户的帐号或密码在用户怀疑他人使用其帐号或密码时用户同意立即通知云生态<br/> 3用户有责任妥善保管注册帐号信息及帐号密码的安全因用户保管不善可能导致遭受盗号或密码失窃责任由用户自行承担用户需要对注册帐号以及密码下的行为承担法律责任用户同意在任何情况下不使用其他用户的帐号或密码在用户怀疑他人使用其帐号或密码时用户同意立即通知禅易精舍<br/>
4用户应遵守本协议的各项条款正确适当地使用本服务如因用户违反本协议中的任何条款云生态在通知用户后有权依据协议中断或终止对违约用户云生态帐号提供服务同时云生态保留在任何时候收回云生态帐号用户名的权利<br/> 4用户应遵守本协议的各项条款正确适当地使用本服务如因用户违反本协议中的任何条款禅易精舍在通知用户后有权依据协议中断或终止对违约用户禅易精舍帐号提供服务同时禅易精舍保留在任何时候收回禅易精舍帐号用户名的权利<br/>
5如用户注册云生态帐号后一年不登录通知用户后云生态可以收回该帐号以免造成资源浪费由此造成的不利后果由用户自行承担<br/> 5如用户注册禅易精舍帐号后一年不登录通知用户后禅易精舍可以收回该帐号以免造成资源浪费由此造成的不利后果由用户自行承担<br/>
6用户可以通过设置页面里的账号与安全页面来进行账号注销服务用户确认注销账号是不可恢复的操作用户应自行备份与云生态账号相关的信息和数据用户确认操作之前与云生态账号相关的所有服务均已进行妥善处理用户确认并同意注销账号后并不代表本云生态账号注销前的账号行为和相关责任得到豁免或减轻如在注销期间用户的账号被他人投诉被国家机关调查或者正处于诉讼仲裁程序中云生态有限自行终止用户的账号注销并无需另行得到用户的同意<br/> 6用户可以通过设置页面里的账号与安全页面来进行账号注销服务用户确认注销账号是不可恢复的操作用户应自行备份与禅易精舍账号相关的信息和数据用户确认操作之前与禅易精舍账号相关的所有服务均已进行妥善处理用户确认并同意注销账号后并不代表本禅易精舍账号注销前的账号行为和相关责任得到豁免或减轻如在注销期间用户的账号被他人投诉被国家机关调查或者正处于诉讼仲裁程序中禅易精舍有限自行终止用户的账号注销并无需另行得到用户的同意<br/>
数据储存<br/> 数据储存<br/>
1云生态不对用户在本服务中相关数据的删除或储存失败负责<br/> 1禅易精舍不对用户在本服务中相关数据的删除或储存失败负责<br/>
2云生态可以根据实际情况自行决定用户在本服务中数据的最长储存期限并在服务器上为其分配数据最大存储空间等用户可根据自己的需要自行备份本服务中的相关数据<br/> 2禅易精舍可以根据实际情况自行决定用户在本服务中数据的最长储存期限并在服务器上为其分配数据最大存储空间等用户可根据自己的需要自行备份本服务中的相关数据<br/>
3如用户停止使用本服务或本服务终止云生态可以从服务器上永久地删除用户的数据本服务停止终止后云生态没有义务向用户返还任何数据<br/> 3如用户停止使用本服务或本服务终止禅易精舍可以从服务器上永久地删除用户的数据本服务停止终止后禅易精舍没有义务向用户返还任何数据<br/>
风险承担<br/> 风险承担<br/>
1用户理解并同意云生态仅为用户提供信息分享传送及获取的平台用户必须为自己注册帐号下的一切行为负责包括用户所传送的任何内容以及由此产生的任何后果用户应对云生态及本服务中的内容自行加以判断并承担因使用内容而引起的所有风险包括因对内容的正确性完整性或实用性的依赖而产生的风险云生态无法且不会对因用户行为而导致的任何损失或损害承担责任 1用户理解并同意禅易精舍仅为用户提供信息分享传送及获取的平台用户必须为自己注册帐号下的一切行为负责包括用户所传送的任何内容以及由此产生的任何后果用户应对禅易精舍及本服务中的内容自行加以判断并承担因使用内容而引起的所有风险包括因对内容的正确性完整性或实用性的依赖而产生的风险禅易精舍无法且不会对因用户行为而导致的任何损失或损害承担责任
2用户理解并同意因业务发展需要云生态保留单方面对本服务的全部或部分服务内容变更暂停终止或撤销的权利用户需承担此风险<br/> 2用户理解并同意因业务发展需要禅易精舍保留单方面对本服务的全部或部分服务内容变更暂停终止或撤销的权利用户需承担此风险<br/>
知识产权声明<br/> 知识产权声明<br/>
1除本服务中涉及广告的知识产权由相应广告商享有外云生态在本服务中提供的内容包括但不限于网页文字图片音频视频图表等的知识产权均归云生态所有但用户在使用本服务前对自己发布的内容已合法取得知识产权的除外<br/> 1除本服务中涉及广告的知识产权由相应广告商享有外禅易精舍在本服务中提供的内容包括但不限于网页文字图片音频视频图表等的知识产权均归禅易精舍所有但用户在使用本服务前对自己发布的内容已合法取得知识产权的除外<br/>
2除另有特别声明外云生态提供本服务时所依托软件的著作权专利权及其他知识产权均归云生态所有<br/> 2除另有特别声明外禅易精舍提供本服务时所依托软件的著作权专利权及其他知识产权均归禅易精舍所有<br/>
3云生态在本服务中所涉及的图形文字或其组成以及其他云生态标志及产品服务名称以下统称云生态标识其著作权或商标权归云生态所有未经云生态事先书面同意用户不得将云生态标识以任何方式展示或使用或作其他处理也不得向他人表明用户有权展示使用或其他有权处理云生态标识的行为<br/> 3禅易精舍在本服务中所涉及的图形文字或其组成以及其他禅易精舍标志及产品服务名称以下统称禅易精舍标识其著作权或商标权归禅易精舍所有未经禅易精舍事先书面同意用户不得将禅易精舍标识以任何方式展示或使用或作其他处理也不得向他人表明用户有权展示使用或其他有权处理禅易精舍标识的行为<br/>
4上述及其他任何云生态或相关广告商依法拥有的知识产权均受到法律保护未经云生态或相关广告商书面许可用户不得以任何形式进行使用或创造相关衍生作品<br/> 4上述及其他任何禅易精舍或相关广告商依法拥有的知识产权均受到法律保护未经禅易精舍或相关广告商书面许可用户不得以任何形式进行使用或创造相关衍生作品<br/>
5用户在使用云生态服务时发表上传的文字图片视频音频软件以及表演等信息此部分信息的知识产权归用户责任由用户承担但用户的发表上传行为视为对云生态的授权用户理解并同意授予云生态及其关联公司全球范围内完全免费不可撤销独家永久可转授权和可再许可的权利包括但不限于复制权发行权出租权展览权表演权放映权广播权信息网络传播权摄制权改编权翻译权汇编权以及著作权法规定的由著作权人享有的其他著作财产权利及邻接权利云生态可自行选择是否使用以及使用方式包括但不限于将前述信息在云生态旗下的服务平台上使用与传播将上述信息再次编辑后使用以及由云生态授权给合作方使用编辑与传播等<br/> 5用户在使用禅易精舍服务时发表上传的文字图片视频音频软件以及表演等信息此部分信息的知识产权归用户责任由用户承担但用户的发表上传行为视为对禅易精舍的授权用户理解并同意授予禅易精舍及其关联公司全球范围内完全免费不可撤销独家永久可转授权和可再许可的权利包括但不限于复制权发行权出租权展览权表演权放映权广播权信息网络传播权摄制权改编权翻译权汇编权以及著作权法规定的由著作权人享有的其他著作财产权利及邻接权利禅易精舍可自行选择是否使用以及使用方式包括但不限于将前述信息在禅易精舍旗下的服务平台上使用与传播将上述信息再次编辑后使用以及由禅易精舍授权给合作方使用编辑与传播等<br/>
十一法律责任<br/> 十一法律责任<br/>
1如果云生态发现或收到他人举报或投诉用户违反本协议约定的云生态有权不经通知随时对相关内容包括但不限于用户资料聊天记录进行审查删除并视情节轻重对违规帐号处以包括但不限于警告帐号封禁 设备封禁 功能封禁 的处罚且通知用户处理结果<br/> 1如果禅易精舍发现或收到他人举报或投诉用户违反本协议约定的禅易精舍有权不经通知随时对相关内容包括但不限于用户资料聊天记录进行审查删除并视情节轻重对违规帐号处以包括但不限于警告帐号封禁 设备封禁 功能封禁 的处罚且通知用户处理结果<br/>
2因违反用户协议被封禁的用户在封禁期限届满后自助解封其中被实施功能封禁的用户会在封禁期届满后自动恢复被封禁功能被封禁用户可向云生态网站相关页面提交申诉云生态将对申诉进行审查并自行合理判断决定是否变更处罚措施<br/> 2因违反用户协议被封禁的用户在封禁期限届满后自助解封其中被实施功能封禁的用户会在封禁期届满后自动恢复被封禁功能被封禁用户可向禅易精舍网站相关页面提交申诉禅易精舍将对申诉进行审查并自行合理判断决定是否变更处罚措施<br/>
3用户理解并同意云生态有权依合理判断对违反有关法律法规或本协议规定的行为进行处罚对违法违规的任何用户采取适当的法律行动并依据法律法规保存有关信息向有关部门报告等用户应承担由此而产生的一切法律责任<br/> 3用户理解并同意禅易精舍有权依合理判断对违反有关法律法规或本协议规定的行为进行处罚对违法违规的任何用户采取适当的法律行动并依据法律法规保存有关信息向有关部门报告等用户应承担由此而产生的一切法律责任<br/>
4用户理解并同意因用户违反本协议约定导致或产生的任何第三方主张的任何索赔要求或损失包括合理的律师费用户应当赔偿云生态与合作公司关联公司并使之免受损害<br/> 4用户理解并同意因用户违反本协议约定导致或产生的任何第三方主张的任何索赔要求或损失包括合理的律师费用户应当赔偿禅易精舍与合作公司关联公司并使之免受损害<br/>
十二不可抗力及其他免责事由<br/> 十二不可抗力及其他免责事由<br/>
1用户理解并确认在使用本服务的过程中可能会遇到不可抗力等风险因素使本服务发生中断不可抗力是指不能预见不能克服并不能避免且对一方或双方造成重大影响的客观事件包括但不限于自然灾害如洪水地震瘟疫流行和风暴等以及社会事件如战争动乱政府行为等出现上述情况时云生态将努力在第一时间与相关单位配合及时进行修复但是由此给用户或第三方造成的损失云生态及合作单位在法律允许的范围内免责<br/> 1用户理解并确认在使用本服务的过程中可能会遇到不可抗力等风险因素使本服务发生中断不可抗力是指不能预见不能克服并不能避免且对一方或双方造成重大影响的客观事件包括但不限于自然灾害如洪水地震瘟疫流行和风暴等以及社会事件如战争动乱政府行为等出现上述情况时禅易精舍将努力在第一时间与相关单位配合及时进行修复但是由此给用户或第三方造成的损失禅易精舍及合作单位在法律允许的范围内免责<br/>
2本服务同大多数互联网服务一样受包括但不限于用户原因网络服务质量社会环境等因素的差异影响可能受到各种安全问题的侵扰如他人利用用户的资料造成现实生活中的骚扰用户下载安装的其它软件或访问的其他网站中含有特洛伊木马等病毒威胁到用户的计算机信息和数据的安全继而影响本服务的正常使用等等用户应加强信息安全及使用者资料的保护意识要注意加强密码保护以免遭致损失和骚扰<br/> 2本服务同大多数互联网服务一样受包括但不限于用户原因网络服务质量社会环境等因素的差异影响可能受到各种安全问题的侵扰如他人利用用户的资料造成现实生活中的骚扰用户下载安装的其它软件或访问的其他网站中含有特洛伊木马等病毒威胁到用户的计算机信息和数据的安全继而影响本服务的正常使用等等用户应加强信息安全及使用者资料的保护意识要注意加强密码保护以免遭致损失和骚扰<br/>
3用户理解并确认本服务存在因不可抗力计算机病毒或黑客攻击系统不稳定用户所在位置用户关机以及其他任何技术互联网络通信线路原因等造成的服务中断或不能满足用户要求的风险因此导致的用户或第三方任何损失云生态不承担任何责任<br/> 3用户理解并确认本服务存在因不可抗力计算机病毒或黑客攻击系统不稳定用户所在位置用户关机以及其他任何技术互联网络通信线路原因等造成的服务中断或不能满足用户要求的风险因此导致的用户或第三方任何损失禅易精舍不承担任何责任<br/>
4用户理解并确认在使用本服务过程中存在来自任何他人的包括误导性的欺骗性的威胁性的诽谤性的令人反感的或非法的信息或侵犯他人权利的匿名或冒名的信息以及伴随该等信息的行为因此导致的用户或第三方的任何损失云生态不承担任何责任<br/> 4用户理解并确认在使用本服务过程中存在来自任何他人的包括误导性的欺骗性的威胁性的诽谤性的令人反感的或非法的信息或侵犯他人权利的匿名或冒名的信息以及伴随该等信息的行为因此导致的用户或第三方的任何损失禅易精舍不承担任何责任<br/>
5用户理解并确认云生态需要定期或不定期地对云生态平台或相关的设备进行检修或者维护如因此类情况而造成服务在合理时间内的中断云生态无需为此承担任何责任但云生态应事先进行通告<br/> 5用户理解并确认禅易精舍需要定期或不定期地对禅易精舍平台或相关的设备进行检修或者维护如因此类情况而造成服务在合理时间内的中断禅易精舍无需为此承担任何责任但禅易精舍应事先进行通告<br/>
6云生态重视对未成年人的保护云生态将依赖用户提供的个人信息判断用户是否为未成年人任何18岁以下的未成年人均不得注册帐号或使用本服务<br/> 6禅易精舍重视对未成年人的保护禅易精舍将依赖用户提供的个人信息判断用户是否为未成年人任何18岁以下的未成年人均不得注册帐号或使用本服务<br/>
7云生态提供的服务系基于地理位置提供的移动社交服务用户确认其地理位置信息为非个人隐私信息用户成功注册云生态帐号视为确认授权云生态提取公开及使用用户的地理位置信息<br/>用户地理位置信息将作为用户公开资料之一云生态向其他用户公开以便云生态向用户提供基于地理位置的移动社交服务如用户需要终止向其他用户公开其地理位置信息可随时自行设置为隐身状态<br/> 7禅易精舍提供的服务系基于地理位置提供的移动社交服务用户确认其地理位置信息为非个人隐私信息用户成功注册禅易精舍帐号视为确认授权禅易精舍提取公开及使用用户的地理位置信息<br/>用户地理位置信息将作为用户公开资料之一禅易精舍向其他用户公开以便禅易精舍向用户提供基于地理位置的移动社交服务如用户需要终止向其他用户公开其地理位置信息可随时自行设置为隐身状态<br/>
8为了改善云生态的技术和服务向用户提供更好的服务体验云生态或可会自行收集使用或向第三方提供用户的非个人隐私信息<br/> 8为了改善禅易精舍的技术和服务向用户提供更好的服务体验禅易精舍或可会自行收集使用或向第三方提供用户的非个人隐私信息<br/>
9云生态保证在合法正当与必要的原则下收集使用或者公开用户个人信息且不会收集与提供的服务无关的用户个人信息<br/> 9禅易精舍保证在合法正当与必要的原则下收集使用或者公开用户个人信息且不会收集与提供的服务无关的用户个人信息<br/>
10云生态十分注重保护用户的个人隐私并制定了云生态隐私权政策用户亦可以通过设置页面里的帮助来进行具体查看用户确认并同意使用云生态提供的服务将被视为接受云生态隐私权政策<br/> 10禅易精舍十分注重保护用户的个人隐私并制定了禅易精舍隐私权政策用户亦可以通过设置页面里的帮助来进行具体查看用户确认并同意使用禅易精舍提供的服务将被视为接受禅易精舍隐私权政策<br/>
2如发生下列任何一种情形云生态有权变更中断或终止向用户提供的免费服务或收费服务而无需对用户或任何第三方承担任何责任<br/> 2如发生下列任何一种情形禅易精舍有权变更中断或终止向用户提供的免费服务或收费服务而无需对用户或任何第三方承担任何责任<br/>
(1) 根据法律规定用户应提交真实信息而用户提供的个人资料不真实或与注册时信息不一致又未能提供合理证明<br/> (1) 根据法律规定用户应提交真实信息而用户提供的个人资料不真实或与注册时信息不一致又未能提供合理证明<br/>
(2) 用户违反相关法律法规或本协议的约定<br/> (2) 用户违反相关法律法规或本协议的约定<br/>
(3) 按照法律规定或有权机关的要求<br/> (3) 按照法律规定或有权机关的要求<br/>
(4) 出于安全的原因或其他必要的情形<br/> (4) 出于安全的原因或其他必要的情形<br/>
十四活动服务说明与免责条款<br/> 十四活动服务说明与免责条款<br/>
1云生态活动功能板块是以地理位置为基础发布用户周边文化活动信息的活动信息共享平台下称本平台<br/><br/> 1禅易精舍活动功能板块是以地理位置为基础发布用户周边文化活动信息的活动信息共享平台下称本平台<br/><br/>
2本平台发布之全部文化活动信息,包括但不限于活动地理位置信息均直接或者间接来自于文化活动主办方<br/> 2本平台发布之全部文化活动信息,包括但不限于活动地理位置信息均直接或者间接来自于文化活动主办方<br/>
3本平台发布文化活动信息意在宣传文化活动丰富用户文化生活本平台用户于本平台活动功能板块发布的留言评论等信息均系用户自行发布本平台不对上述信息的真实性准确性或及时性完整性负责<br/> 3本平台发布文化活动信息意在宣传文化活动丰富用户文化生活本平台用户于本平台活动功能板块发布的留言评论等信息均系用户自行发布本平台不对上述信息的真实性准确性或及时性完整性负责<br/>
十五其他<br/> 十五其他<br/>
1云生态郑重提醒用户注意本协议中免除云生态责任和限制用户权利的条款请用户仔细阅读自主考虑风险<br/> 1禅易精舍郑重提醒用户注意本协议中免除禅易精舍责任和限制用户权利的条款请用户仔细阅读自主考虑风险<br/>
2本协议的效力解释及纠纷的解决适用于中华人民共和国法律若用户和云生态之间发生任何纠纷或争议首先应友好协商解决协商不成的用户同意将纠纷或争议提交云生态住所地有管辖权的人民法院管辖<br/> 2本协议的效力解释及纠纷的解决适用于中华人民共和国法律若用户和禅易精舍之间发生任何纠纷或争议首先应友好协商解决协商不成的用户同意将纠纷或争议提交禅易精舍住所地有管辖权的人民法院管辖<br/>
3本协议的任何条款无论因何种原因无效或不具可执行性其余条款仍有效对双方具有约束力<br/> 3本协议的任何条款无论因何种原因无效或不具可执行性其余条款仍有效对双方具有约束力<br/>
4由于互联网高速发展您与云生态签署的本协议列明的条款可能并不能完整罗列并覆盖您云生态所有权利与义务现有的约定也不能保证完全符合未来发展的需求因此云生态隐私权政策云生态平台行为规范等均为本协议的补充协议与本协议不可分割且具有同等法律效力如您使用云生态平台服务视为您同意上述补充协议 4由于互联网高速发展您与禅易精舍签署的本协议列明的条款可能并不能完整罗列并覆盖您禅易精舍所有权利与义务现有的约定也不能保证完全符合未来发展的需求因此禅易精舍隐私权政策禅易精舍平台行为规范等均为本协议的补充协议与本协议不可分割且具有同等法律效力如您使用禅易精舍平台服务视为您同意上述补充协议
</view> </view>
</template> </template>

116
pages/course/detail.vue

@ -3,8 +3,13 @@
<view v-if="$store.getters.token || userInfo.uid"> <view v-if="$store.getters.token || userInfo.uid">
<view class="swiper-box"> <view class="swiper-box">
<view class="swiper-item"> <view class="swiper-item">
<image :src="detail.coverImg" mode="aspectFill"></image> <image :src="detail.coverImg" mode="aspectFill" :key="index"></image>
</view> </view>
<!-- <swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000">
<swiper-item v-for="(item,index) in detail.imageArr" :key="index">
<view class="swiper-item"><image :src="item" mode="aspectFill"></image></view>
</swiper-item>
</swiper> -->
</view> </view>
<view class="course-info-box"> <view class="course-info-box">
<view class="course-title acea-row row-between-wrapper"> <view class="course-title acea-row row-between-wrapper">
@ -14,7 +19,7 @@
</view> </view>
<view class="tips-box"> <view class="tips-box">
<view class="tip-item blue">{{detail.categoryName}}</view> <view class="tip-item blue">{{detail.categoryName}}</view>
<!-- <view class="tip-item orange">{{detail.flag[0]}}</view> --> <view class="tip-item orange">{{detail.flag[0]}}</view>
</view> </view>
</view> </view>
<view class="tab-box acea-row row-around" :class="isFixedTop?'fixed':''"> <view class="tab-box acea-row row-around" :class="isFixedTop?'fixed':''">
@ -187,6 +192,7 @@
<script> <script>
// import WucTab from '@/components/wuc-tab/wuc-tab.vue'; // import WucTab from '@/components/wuc-tab/wuc-tab.vue';
import { mapState, mapGetters, mapMutations, mapActions } from 'vuex' import { mapState, mapGetters, mapMutations, mapActions } from 'vuex'
import dayjs from 'dayjs'
import { getUserInfo, bindingPhone, wxappBindingPhone } from '@/api/user' import { getUserInfo, bindingPhone, wxappBindingPhone } from '@/api/user'
import { bindPhoneNumber } from '@/utils/index.js' import { bindPhoneNumber } from '@/utils/index.js'
import { getCourseDetail ,enterCourse } from '@/api/knowledge'; import { getCourseDetail ,enterCourse } from '@/api/knowledge';
@ -241,9 +247,6 @@
userInfo(){ userInfo(){
return this.$store.getters["userInfo"] return this.$store.getters["userInfo"]
}, },
},
mounted(){
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.getDetail() this.getDetail()
@ -354,6 +357,7 @@
}).then(()=>{ }).then(()=>{
this.setStatus(); this.setStatus();
}) })
}, },
signInClick(type){ signInClick(type){
if(this.userInfo.realName == null){ if(this.userInfo.realName == null){
@ -398,6 +402,10 @@
}, },
sign(){ sign(){
// if(!this.userInfo.spreadUid){
// this.maskDialog = true
// return
// }
enterCourse({ enterCourse({
lessionId: this.courseId lessionId: this.courseId
}).then((res)=>{ }).then((res)=>{
@ -595,6 +603,104 @@
} }
} }
}
.mask-box2{
width: 100%;
height: 100%;
background: rgba(0,0,0,.6);
position: fixed;
top: 0;
z-index: 99;
.dialog-bg{
width: 726rpx;
height: 1026rpx;
background: linear-gradient(180deg, #fbd8a5 0%, #fcc86a 100%);
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
border-radius: 8rpx;
}
.signUp-box{
width: 543rpx;
height: 836rpx;
background: #fff;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
display: flex;
flex-direction: column;
align-items: center;
border-radius: 8rpx;
.signup-success{
width: 470rpx;
height: 100rpx;
margin: 60rpx 0 46rpx;
}
.divsion-line{
width: 467rpx;
border-bottom: 1px dashed #fbd69e;
position: relative;
&::before{
display: inline-block;
content: '';
width: 50rpx;
height: 50rpx;
border-radius: 50px;
background: #FBD293;
position: absolute;
left: -62rpx;
top: -25rpx;
}
&::after{
display: inline-block;
content: '';
width: 50rpx;
height: 50rpx;
border-radius: 50px;
background: #FBD293;
position: absolute;
right: -62rpx;
top: -25rpx;
}
}
.er-code{
image{
width: 297rpx;
height: 297rpx;
}
}
.tips{
width: 340rpx;
font-size: 28rpx;
color: #000;
margin: 28rpx auto 12rpx;
text-align: center;
}
.longpress-btn{
width: 327rpx;
height: 75rpx;
text-align: center;
line-height: 75rpx;
font-size: 32rpx;
color: #fff;
background: linear-gradient(90deg, #F7D08E 0%, #E2B35D 99%);
border-radius: 37rpx;
margin-top: 32rpx;
}
}
.close-btn{
width: 80rpx;
height: 80rpx;
background: url(../../static/close-btn.png) no-repeat;
background-size: 100% 100%;
position: absolute;
bottom: 100rpx;
left: 50%;
margin-left: -40rpx;
}
} }
.mask-box2{ .mask-box2{
width: 100%; width: 100%;

218
pages/course/index.vue

@ -1,46 +1,32 @@
<template> <template>
<view class="konwledge-index index"> <view class="konwledge-index index">
<!-- <view class="header header-search acea-row row-center-wrapper"> -->
<!-- <view @click="goGoodSearch()" class="search acea-row row-middle">
<text class="iconfont icon-xiazai5"></text>
搜索商品
</view> -->
<!-- #ifndef H5 -->
<!-- <view class="qr" @click="startQr()" v-if="$deviceType !== 'weixin'">
<image src="../../static/saoyisao-icon.png" />
</view> -->
<!-- #endif -->
<!-- </view> -->
<view class="content-box"> <view class="content-box">
<view class="tab-box"> <view class="tab-box" :class="isFixedTop ? 'fixed' : ''">
<!-- <wuc-tab :tab-list="tabList" :tabCur.sync="TabCur" @change="tabChange"
tab-class="text-center text-black bg-white" select-class="text-orange text-xl">
</wuc-tab> -->
<view class="tabs"> <view class="tabs">
<scroll-view class="scroll-view_H" scroll-x="true" scroll-with-animation :scroll-left='scrollLeft'> <scroll-view class="scroll-view_H" scroll-x="true" scroll-with-animation :scroll-left='scrollLeft'>
<view class="tab-item scroll-item" :class="index == tabSelect ? 'tab-item-active' : ''" <view class="tab-item scroll-item" :class="index == tabSelect ? 'tab-item-active' : ''" v-for="(item,index) in tabList"
v-for="(item,index) in tabList" :key="item.id" :key="item.id" @click="tabChange(item,index)">{{item.categoryName}}</view>
@click="tabChange(item,index)">{{item.categoryName}}</view>
</scroll-view> </scroll-view>
</view> </view>
<SecondMenu :menuList="secondMenu" :active.sync="active" @secondMenuClick="secondMenuClick" v-if="secondMenu.length > 0"> <SecondMenu :menuList="secondMenu" :active.sync="active" @secondMenuClick="secondMenuClick" v-if="secondMenu.length > 0">
</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"><image src="../../static/tit5.png" mode=""></image></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" v-for="(item,index) in studyList" :key="index"
:class="index%2 !== 0 ? 'bgR' : ''"
v-for="(item,index) in studyList" :key="index"
@click="toStudyDetail(item.id)"> @click="toStudyDetail(item.id)">
<view> <view>
<view>{{item.listName}}</view> <view class="name">{{item.listName}}</view>
<view class="time">{{item.listStartTime.split(' ')[0]}} {{item.listEndTime.split(' ')[0]}}</view> <view class="time">{{item.listStartTime.split(' ')[0]}} {{item.listEndTime.split(' ')[0]}}</view>
</view> </view>
<view class="acea-row row-between-wrapper" style="width: 100%;margin-top: 30rpx;"> <view class="acea-row row-between-wrapper" style="width: 100%;margin-top: 30rpx;">
<view class="jifen">{{item.integral}}积分</view> <view class="jifen">
<text class="fz44">{{item.integral}}</text>
积分
</view>
<view class="signin-btn">报名参加</view> <view class="signin-btn">报名参加</view>
</view> </view>
</view> </view>
@ -49,7 +35,7 @@
</view> </view>
</view> </view>
<view class="knowledge-list"> <view class="knowledge-list">
<view class="active-word">课程</view> <view class="active-word2"><image src="../../static/tit6.png"></image></view>
<view class="no-content" v-if="courseList.length == 0">暂无内容...</view> <view class="no-content" v-if="courseList.length == 0">暂无内容...</view>
<view class="knowledge-item acea-row" v-for="(item,index) in courseList" :key="index" @click="toDetail(item.id)"> <view class="knowledge-item acea-row" v-for="(item,index) in courseList" :key="index" @click="toDetail(item.id)">
<view class="img-box"> <view class="img-box">
@ -70,19 +56,27 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <view style="color:#000;z-index: 9999;" @click="dClick">按钮按钮</view>
<view style="color:#000;z-index: 9999;" @click="tClick">按钮C按钮</view> -->
</view> </view>
</template> </template>
<script module="utils" lang="wxs" src="../../utils/subutil.wxs"></script> <script module="utils" lang="wxs" src="../../utils/subutil.wxs"></script>
<script> <script>
import WucTab from '@/components/wuc-tab/wuc-tab.vue'; import WucTab from '@/components/wuc-tab/wuc-tab.vue';
import SecondMenu from '../knowledge/components/secondMenu.vue'; import SecondMenu from '../knowledge/components/secondMenu.vue';
import { mapState, mapGetters, mapMutations, mapActions } from 'vuex' import {
mapState,
mapGetters,
mapMutations,
mapActions
} from 'vuex'
import { import {
getCategory, getCategory,
getArticle, getArticle,
getStudyList, getStudyList,
getCourses getCourses
} from '@/api/knowledge'; } from '@/api/knowledge';
import { debounce, throttle } from '@/components/uni-easyinput/common.js'
export default { export default {
computed: mapGetters(['userInfo']), computed: mapGetters(['userInfo']),
data() { data() {
@ -107,9 +101,8 @@
onLoad() { onLoad() {
// //
uni.createSelectorQuery().select('.tab-box').boundingClientRect((res) => { uni.createSelectorQuery().select('.tab-box').boundingClientRect((res) => {
console.log(res) if (res && res.top > 0) {
if (res && res.height > 0) { this.tabInitTop = res.top;
this.tabInitTop= res.height;
} }
}).exec(); }).exec();
getCategory().then((res) => { getCategory().then((res) => {
@ -128,9 +121,6 @@
this.getStudyList() this.getStudyList()
this.getCourses() this.getCourses()
}) })
},
onShow() {
}, },
mounted() { mounted() {
uni.getSystemInfo({ uni.getSystemInfo({
@ -140,9 +130,14 @@
}) })
}, },
methods: { methods: {
dClick: debounce(function(){
console.log('dClick')
}),
tClick: throttle(()=>{
console.log('throttleClick')
}),
onPageScroll(res) { onPageScroll(res) {
let scrollTop = res.scrollTop; let scrollTop = res.scrollTop;
console.log(this.tabInitTop)
var isSatisfy = scrollTop >= this.tabInitTop ? true : false; var isSatisfy = scrollTop >= this.tabInitTop ? true : false;
// //
if (this.isFixedTop === isSatisfy) { if (this.isFixedTop === isSatisfy) {
@ -172,7 +167,10 @@
}) })
var cid = null; var cid = null;
this.active == null ? cid = this.currentTab.id : cid = this.active this.active == null ? cid = this.currentTab.id : cid = this.active
getStudyList({categoryId: cid,listState:0}).then((res) => { getStudyList({
categoryId: cid,
listState: 0
}).then((res) => {
if (res.success) { if (res.success) {
this.studyList = res.data this.studyList = res.data
} }
@ -185,9 +183,12 @@
}) })
var cid = null; var cid = null;
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}).then((res) => { getCourses({
categoryId: cid,
listState: 0
}).then((res) => {
if (res.success) { if (res.success) {
this.courseList = res.data.reverse() this.courseList = res.data
} }
uni.hideLoading() uni.hideLoading()
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
@ -239,42 +240,23 @@
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.header{ page{
.qr {
width: 36rpx;
height: 38rpx;
image{
width: 36rpx;
height: 38rpx;
}
}
}
.header-search {
transition: all linear 0.3s;
background: #fff; background: #fff;
.search {
border: 2rpx solid #EA533E;
background-color: #fff;
}
}
.colG{
color: #8FB85B !important;
} }
.content-box { .content-box {
width: 100%; width: 100%;
padding-top: 96rpx;
box-sizing: border-box; box-sizing: border-box;
.tab-box { .tab-box {
width: 100%;
height: 96rpx; height: 96rpx;
position: fixed;
top: 0;
box-shadow: 0px 6px 12px 0px rgba(227, 227, 227, 0.29); box-shadow: 0px 6px 12px 0px rgba(227, 227, 227, 0.29);
.tabs{ .tabs{
width:auto; width:100%;
height: 96rpx; height: 96rpx;
padding-left: 20rpx; padding-left: 20rpx;
position: fixed;
top: 0;
background: #fff; background: #fff;
z-index: 10;
.scroll-view_H{ .scroll-view_H{
white-space: nowrap; white-space: nowrap;
width: 100%; width: 100%;
@ -295,127 +277,162 @@
} }
} }
} }
/deep/.second-menu-box { /deep/.second-menu-box {
padding: 30rpx 32rpx; padding: 30rpx 32rpx;
} }
.fixed { .fixed {
width: 100%; position: -webkit-sticky;
// position: -webkit-sticky; position: sticky;
position: fixed;
top: 0; top: 0;
z-index: 99; z-index: 99;
} }
} }
.active-word { .active-word {
font-size: 34rpx; image {
width: 136rpx;
height: 46rpx;
}
}
.active-word2{
image{
width: 108rpx;
height: 46rpx;
} }
}
.no-content { .no-content {
font-size: 28rpx; font-size: 28rpx;
color: #666666; color: #666666;
text-align: center; text-align: center;
padding: 30rpx 0; padding: 30rpx 0;
} }
.bangdan-box { .bangdan-box {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
padding-left: 30rpx; padding-left: 30rpx;
margin-top: 30rpx; margin: 80rpx 0;
.scroll-view_H { .scroll-view_H {
white-space: nowrap; white-space: nowrap;
width: 100%; width: 100%;
} }
.bangdan-list { .bangdan-list {
padding: 16rpx 0 0; padding: 16rpx 0 0;
} }
.bangdan-item { .bangdan-item {
width: 514rpx; width: 412rpx;
height: 234rpx; height: 224rpx;
box-sizing: border-box; box-sizing: border-box;
padding: 20rpx; padding: 34rpx;
color: #fff; color: #191919;
display: inline-block; display: inline-block;
background: linear-gradient(165deg, #3ABFB8 0%, #7CE1DD 100%); background: url('https://download.cyjyyjy.com/bangdanbg.png');
border-radius: 10rpx; background-size: 100% 100%;
font-size: 34rpx; font-size: 28rpx;
margin-right: 20rpx; margin-right: 20rpx;
display: inline-block; display: inline-block;
.name{
font-weight: bold;
}
.time { .time {
font-size: 24rpx; font-size: 24rpx;
color: #FFFFFF; line-height: 34rpx;
line-height: 40rpx; margin: 8rpx 0 10rpx;
margin:10rpx 0 18rpx;
} }
.jifen { .jifen {
font-size: 46rpx; font-size: 24rpx;
font-weight: 500; font-weight: 500;
color: #FCB047;
.fz44{
font-size: 44rpx;
} }
}
.signin-btn { .signin-btn {
width: 180rpx; width: 122rpx;
height: 68rpx; height: 48rpx;
background: #FFFFFF; background: linear-gradient(180deg, #FEECCB 0%, #FCAB3B 100%);
border-radius: 40rpx; border-radius: 8rpx;
text-align: center; text-align: center;
line-height: 68rpx; line-height: 48rpx;
color: #222222; font-size: 24rpx;
font-size: 26rpx; color: #fff;
}
} }
.bgR{
background: linear-gradient(165deg, #FF7563 0%, #FEABA0 100%);
} }
} }
.konwledge-index { .konwledge-index {
min-height: 100%; min-height: 100%;
width: 100%; width: 100%;
background: #fff; background: #fff;
.knowledge-list { .knowledge-list {
width: 100%; width: 100%;
padding: 0 32rpx; padding: 0 32rpx;
margin-top: 30rpx; margin-top: 80rpx;
.knowledge-item { .knowledge-item {
width: 100%;
height: 208rpx;
margin-top: 20rpx;
background: #fff; background: #fff;
padding: 16rpx 0; border-bottom: 1rpx solid #ECECEC;
border-bottom: 1px solid #ECECEC; position: relative;
.img-box { .img-box {
width: 204rpx; width: 204rpx;
height: 200rpx; height: 200rpx;
margin-right: 30rpx; margin-right: 30rpx;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 10rpx; border-radius: 10rpx;
} }
} }
.knowledge-info-box { .knowledge-info-box {
width: calc(100% - 234rpx); width: calc(100% - 234rpx);
.title { .title {
font-size: 32rpx; font-size: 38rpx;
color: #333; color: #333;
font-size: 500; font-size: 500;
line-height: 40rpx; line-height: 52rpx;
} }
.time,.address{
.time,
.address {
color: #999; color: #999;
font-size: 24rpx; font-size: 28rpx;
margin-top: 5rpx; margin: 10rpx 0;
line-height: 34rpx; line-height: 38rpx;
} }
.intro { .intro {
font-size: 28rpx; font-size: 28rpx;
color: #999999; color: #999999;
line-height: 40rpx; line-height: 40rpx;
margin: 8rpx 0 36rpx; margin: 8rpx 0 36rpx;
} }
.type-box { .type-box {
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
margin-top: 20rpx; margin-top: 20rpx;
.price { .price {
font-size: 28rpx; font-size: 28rpx;
color: #EA533E; color: #EA533E;
} }
.signin-btn { .signin-btn {
width: 156rpx; width: 156rpx;
height: 60rpx; height: 60rpx;
@ -424,15 +441,21 @@
background: #FFEAE7; background: #FFEAE7;
border-radius: 12rpx; border-radius: 12rpx;
font-size: 32rpx; font-size: 32rpx;
position: absolute;
right: 4rpx;
bottom: 4rpx;
} }
.red { .red {
background: #FFEAE7; background: #FFEAE7;
color: #EE7060; color: #EE7060;
} }
.blue { .blue {
color: #6E85EB; color: #6E85EB;
background: #ECEFFD; background: #ECEFFD;
} }
.yellow { .yellow {
color: #F99C10; color: #F99C10;
background: #FFEDCC; background: #FFEDCC;
@ -440,6 +463,7 @@
} }
} }
} }
.knowledge-item:nth-last-child(1) { .knowledge-item:nth-last-child(1) {
border: none; border: none;
} }

2
pages/course/signIn.vue

@ -90,7 +90,7 @@
if (!url) { if (!url) {
url = handleUrlParam(getCurrentPageUrlWithArgs()) url = handleUrlParam(getCurrentPageUrlWithArgs())
} }
console.log(url,'urlurlurlurl') console.log(url)
if (url && url.id) { if (url && url.id) {
this.courseId = url.id this.courseId = url.id
} }

108
pages/home/components/ArticleList.vue

@ -0,0 +1,108 @@
<template>
<view class="article-list">
<view class="article-item" v-for="(item,index) in list" :key="index" @click="toArticleDetail(item.id)">
<image :src="item.imageInput" mode="aspectFill"></image>
<view class="article-content">
<view class="article-title line1">{{item.title}}</view>
<view class="article-desc line1">{{item.synopsis}}</view>
<view class="author-box acea-row row-between">
<view class="acea-row">
<view class="author">{{item.author}}</view>
<view class="time">{{item.addTime.split(' ')[0]}}</view>
<view>{{item.visit}}人阅读</view>
</view>
<view class="tips"
:class="item.chargeType == 0 ? 'free-bg' : item.chargeType == 1 ? '' : 'jifen'">
{{item.chargeType == 0 ? '免费' : item.chargeType == 1 ? '收费' : '积分'}}
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default{
props:{
list: {
type: Array,
default: []
}
},
methods:{
toArticleDetail(id){
this.$yrouter.push({
path: '/pages/knowledge/detail',
query: {
id:id,
},
})
},
}
}
</script>
<style lang="less">
.article-list{
width: 100%;
margin-top: 20rpx;
.article-item{
width: 100%;
background: #fff;
box-sizing: border-box;
margin-bottom: 52rpx;
box-shadow: 0px 2rpx 8rpx rgba(0, 0, 0, 0.16);
image{
width: 100%;
height: 266rpx;
border-radius: 10rpx;
margin-bottom: 20rpx;
}
.article-content{
padding: 28rpx 32rpx;
}
.article-title{
font-size: 36rpx;
font-weight: 500;
color: #333333;
line-height: 50rpx;
margin-bottom: 8rpx;
}
.article-desc{
font-size: 24rpx;
font-weight: 400;
color: #999999;
line-height: 40rpx;
margin-bottom: 30rpx;
}
.author-box{
font-size: 24rpx;
color: #999;
.author{
color: #EA533E;
}
.time{
margin: 0 12rpx;
}
.tips{
width: 100rpx;
font-size: 20rpx;
color: #FFAD3A;
height: 34rpx;
text-align: center;
line-height: 34rpx;
background: #fcd391;
border-radius: 44rpx;
}
.free-bg{
background: #8FB85B;
color: #D7FFA4;
}
.jifen{
background: #AAC8FA;
color: #5693F9;
}
}
}
}
</style>

124
pages/home/components/CourseList.vue

@ -0,0 +1,124 @@
<template>
<view class="recommend-list-box acea-row row-between">
<view class="recommend-item" v-for="(item,index) in list" :key="index" @click="toCourseDetail(item.id)">
<view class="img-box"><image :src="item.coverImg" mode="aspectFill"></image></view>
<view class="course-content">
<view class="course-title line1">{{item.courseName}}</view>
<view class="course-tips-box acea-row">
<view class="course-tip-item blue">{{item.categoryName}}</view>
</view>
<!-- <view class="price" v-if="item.level > 2">{{item.level}}级课程</view>
<view class="price" v-if="item.level == 2">{{item.courseCharge}}</view>
<view class="price colG" v-if="item.chargeType == 0 || item.level == 1">免费</view> -->
<view class="course-address acea-row row-between-wrapper">
<view class="address">{{item.coursePlace}}</view>
<view class="course-time">{{item.enterStartTime}}-{{item.enterEndTime}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default{
props: {
list: {
type: Array,
default: []
}
},
data(){
return {
titImg: '../../../static/tit1.png',
titleWord: '查看更多课程'
}
},
methods:{
toCourseDetail(id){
this.$yrouter.push({
path: '/pages/course/detail',
query: {
id:id,
},
})
},
seeMoreClick(){
uni.switchTab({
url: "/pages/course/index"
})
},
}
}
</script>
<style lang="less">
.recommend-list-box{
width: 100%;
.recommend-item{
width: 334rpx;
background: #fff;
border-radius: 10rpx;
font-size: 28rpx;
color: #333;
margin-right: 22rpx;
margin-bottom: 22rpx;
box-shadow: 0px 2rpx 4rpx rgba(0, 0, 0, 0.16);
image{
width: 334rpx;
height: 216rpx;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
}
.course-content{
width: 100%;
box-sizing: border-box;
padding:0 10rpx 20rpx;
}
.course-title{
line-height: 40rpx;
}
.course-tips-box{
margin: 12rpx 0 24rpx;
font-size: 24rpx;
color: #999;
.course-tip-item{
min-width: 60rpx;
height: 34rpx;
line-height: 32rpx;
text-align: center;
background: #EDEFF8;
border-radius: 4rpx;
border: 1px solid #6E85EB;
padding: 0 6rpx;
font-size: 22rpx;
margin-right: 20rpx;
box-sizing: border-box;
margin-right: 10rpx;
}
.blue{
color: #6E85EB;
background: #EDEFF8;
border-color: #6E85EB;
}
.yellow{
color: #F99C10;
background: #FFEDCC;
border-color: #F99C10;
}
}
.price{
font-size: 32rpx;
color: #EA533E;
font-weight: 500;
margin: 16rpx 0;
}
.course-address{
font-size: 24rpx;
color: #999999;
}
}
.recommend-item:nth-child(2n){
margin-right: 0;
}
}
</style>

6
pages/home/components/FirstNewProduct.vue

@ -12,8 +12,7 @@
<swiper-item v-for="(goods, index) in goodsList" :key="index" class="carousel-item"> <swiper-item v-for="(goods, index) in goodsList" :key="index" class="carousel-item">
<view class="goods-list-box x-f"> <view class="goods-list-box x-f">
<block v-for="mgoods in goods" :key="mgoods.id"> <block v-for="mgoods in goods" :key="mgoods.id">
<view class="min-goods" <view class="min-goods" @tap="$yrouter.push({ path: '/pages/shop/GoodsCon/index',query:{id:mgoods.id} })">
@tap="$yrouter.push({ path: '/pages/shop/GoodsCon/index',query:{id:mgoods.id} })">
<view class="img-box"> <view class="img-box">
<view class="tag">new</view> <view class="tag">new</view>
<image class="img" :src="mgoods.image" mode="widthFix"></image> <image class="img" :src="mgoods.image" mode="widthFix"></image>
@ -33,8 +32,7 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
<view class="swiper-dots" v-if="goodsList.length > 1"> <view class="swiper-dots" v-if="goodsList.length > 1">
<text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length" <text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length" :key="index"></text>
:key="index"></text>
</view> </view>
</view> </view>
</view> </view>

54
pages/home/components/ListTitleBox.vue

@ -0,0 +1,54 @@
<template>
<view class="title-box acea-row row-between-wrapper">
<view class="title"><image :src="titImg"></image></view>
<view class="more" @click="seeMoreClick">{{titWord}}</view>
</view>
</template>
<script>
export default{
name: 'ListTitleBox',
props:{
//
titImg:{
type: String,
default: ''
},
//
titWord: {
type: String,
default: ''
},
//
width: {
type: String,
default: ''
},
height: {
type: String,
default: ''
}
},
methods:{
seeMoreClick(){
this.$emit('seeMoreClick')
}
}
}
</script>
<style lang="less">
.title-box{
width: 100%;
margin-bottom: 28rpx;
image{
width: 206rpx;
height: 58rpx;
}
.more{
font-size: 28rpx;
color: #999;
}
}
</style>

95
pages/home/components/StadyList.vue

@ -0,0 +1,95 @@
<template>
<view class="study-list uni-padding-wrap uni-common-mt">
<scroll-view class="scroll-view_H" scroll-x="true">
<view class="study-item scroll-view-item_H" v-for="(item,index) in list" :key="index" @click="toStudyDetail(item.id)">
<view class="day-box acea-row row-middle">
<image src="../../../static/date-icon.png" v-if="index%2 == 0"></image>
<image src="../../../static/date-icon2.png" v-if="index%2 != 0"></image>
<text>{{item.clockTimes}}</text>
</view>
<view class="study-content">
<view class="study-title line1">{{item.listName}}</view>
<view class="study-time acea-row-nowrap row-between-wrapper">
<view>{{item.listStartTime}}开始</view>
<view>{{item.enterNum}}人已参与</view>
</view>
</view>
</view>
</scroll-view>
</view>
</template>
<script>
export default{
props:{
list: {
type: Array,
default: []
}
},
methods:{
toStudyDetail(id){
this.$yrouter.push({
path: '/pages/study/detail',
query: {
id:id,
},
})
},
}
}
</script>
<style lang="less">
.study-list{
width: 100%;
.scroll-view_H{
white-space: nowrap;
width: 100%;
}
.study-item{
width: 334rpx;
height: 180rpx;
display: inline-block;
background: linear-gradient(143deg, #FDAF97 0%, #ED5E48 100%);
box-shadow: 0px 4rpx 8rpx 4rpx rgba(250,194,183,0.32);
border-radius: 10rpx;
margin-right: 20rpx;
.day-box{
color: #E73D21;
font-size: 48rpx;
line-height: 58rpx;
margin-left: 10rpx;
image{
width: 34rpx;
height: 34rpx;
margin-right: 10rpx;
}
}
.study-content{
width: calc(100% - 12rpx);
background: #fff;
font-size: 24rpx;
color: #999;
box-shadow: 0px 4rpx 8rpx 4rpx rgba(250,194,183,0.32);
border-radius: 10rpx;
margin: 2rpx auto;
padding:16rpx 10rpx 10rpx;
box-sizing: border-box;
.study-title{
font-size: 28rpx;
font-weight: 500;
color: #222222;
line-height: 40rpx;
margin-bottom: 12rpx;
}
}
}
.study-item:nth-child(2n){
background: linear-gradient(143deg, #C4DBFF 0%, #7FAAF2 100%);
.day-box{
color: #557AB3;
}
}
}
</style>

435
pages/home/index-copy.vue

@ -1,435 +0,0 @@
<template>
<view class="index">
<view class="header header-search acea-row row-center-wrapper">
<view @click="goGoodSearch()" class="search acea-row row-middle">
<text class="iconfont icon-xiazai5"></text>
搜索商品
</view>
<!-- #ifndef H5 -->
<view class="qr" @click="startQr()" v-if="$deviceType !== 'weixin'">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/qr.png`" />
</view>
<!-- #endif -->
</view>
<view v-for="(item, index) in homeData" :key="index">
<!-- <view class="head_box" v-if="item.type == 'header'" :style="{ background: bgcolor }" :class="{ active: bgcolor }">
<cu-custom :isBack="true" :bgColor="bgcolor">
<block slot="backText">
<text class="nav-title shopro-selector-rect">{{ item.componentContent.title }}</text>
</block>
</cu-custom>
</view> -->
<Banner v-if="item.type == 'banner'" :detail="item.componentContent.bannerData" @getbgcolor="getbgcolor"></Banner>
<uni-notice-bar v-if="item.type == 'noticeBar'" scrollable="true" @click="goRoll(item.componentContent.roll[0])" single="true" :speed="10" showIcon="true" :text="item.componentContent.roll[0].info"></uni-notice-bar>
<view class="content_box home_content_box" v-if="item.type == 'menu' && item.componentContent.menus">
<!-- 菜单 -->
<Menu :list="item.componentContent.menus"></Menu>
</view>
<!-- 滚动新闻 -->
<!-- 广告 -->
<Adv v-if="item.type == 'adv' && item.componentContent.detail" :detail="item.componentContent.detail" />
<!-- 热门榜单 -->
<HotCommodity v-if="item.type == 'hotCommodity'" :detail="likeInfo"></HotCommodity>
<!-- 超值拼团 -->
<Groupon v-if="item.type == 'groupon'" :detail="combinationList" />
<!-- 首发新品->秒杀 -->
<FirstNewProduct v-if="item.type == 'firstNewProduct'" :detail="firstList"></FirstNewProduct>
<!-- 精品推荐 -->
<ProductsRecommended v-if="item.type == 'productsRecommended'" :detail="bastList"></ProductsRecommended>
<!-- 促销单品 -->
<PromoteProduct v-if="item.type == 'promoteProduct'" :detail="benefit"></PromoteProduct>
<!-- 直播 -->
<!-- #ifdef MP-WEIXIN -->
<Live v-if="item.type == 'liveList'" :detail="liveList"></Live>
<!-- #endif -->
<!-- 为您推荐 -->
<PromotionGood v-if="item.type == 'promotionGood'" :benefit="benefit"></PromotionGood>
<Coupon-window :coupon-list="couponList" v-if="showCoupon" @checked="couponClose" @close="couponClose"> </Coupon-window>
</view>
</view>
</template>
<script>
import { mapState, mapMutations, mapActions } from 'vuex'
import GoodList from '@/components/GoodList'
import PromotionGood from '@/components/PromotionGood'
import CouponWindow from '@/components/CouponWindow'
import Menu from '@/components/Menu'
import UniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar'
import Adv from '@/components/sh-adv'
import Groupon from '@/components/sh-groupon.vue'
import Banner from './components/Banner'
import HotCommodity from './components/HotCommodity'
import FirstNewProduct from './components/FirstNewProduct'
import ProductsRecommended from './components/ProductsRecommended'
import Live from './components/Live'
import { getHomeData, getShare, getCanvas } from '@/api/public'
import cookie from '@/utils/store/cookie'
import { isWeixin, handleUrlParam } from '@/utils/index'
import { openShareAll } from '@/libs/wechat'
const HAS_COUPON_WINDOW = 'has_coupon_window'
export default {
name: 'Index',
components: {
// swiper,
// swiperSlide,
UniNoticeBar,
GoodList,
PromotionGood,
CouponWindow,
Menu,
Adv,
Groupon,
Banner,
HotCommodity,
FirstNewProduct,
ProductsRecommended,
Live,
},
props: {},
data: function() {
return {
homeData: [],
CustomBar: this.CustomBar,
StatusBar: this.StatusBar,
formatMenus: [],
categoryCurrent: 0,
menuNum: 4,
bgcolor: '',
bgColor: '',
swiperCurrent: 0, //
webviewId: 0,
showCoupon: false,
logoUrl: '',
banner: [],
menus: [],
combinationList: [],
roll: [],
activity: [],
activityOne: {},
bastList: [],
firstList: [],
info: {
fastList: [],
bastBanner: [],
bastList: [],
},
likeInfo: [],
live: [],
lovely: [],
benefit: [],
couponList: [],
swiperOption: {
pagination: {
el: '.swiper-pagination',
clickable: true,
},
autoplay: {
disableOnInteraction: false,
delay: 2000,
},
loop: true,
speed: 1000,
observer: true,
observeParents: true,
},
swiperRoll: {
direction: 'vertical',
autoplay: {
disableOnInteraction: false,
delay: 2000,
},
loop: true,
speed: 1000,
observer: true,
observeParents: true,
},
swiperScroll: {
freeMode: true,
freeModeMomentum: false,
slidesPerView: 'auto',
observer: true,
observeParents: true,
},
swiperBoutique: {
pagination: {
el: '.swiper-pagination',
clickable: true,
},
autoplay: {
disableOnInteraction: false,
delay: 2000,
},
loop: true,
speed: 1000,
observer: true,
observeParents: true,
},
swiperProducts: {
freeMode: true,
freeModeMomentum: false,
slidesPerView: 'auto',
observer: true,
observeParents: true,
},
bgImage: '',
}
},
computed: {
singNew() {
return this.roll.length > 0 ? this.roll[0] : '你还没添加通知哦!'
},
customStyle() {
var bgImage = this.bgImage
// var style = `height:${this.CustomBar}px;padding-top:${0}px;background: ${this.bgcolor}`;
var style = `height:${this.CustomBar}px;padding-top:${this.StatusBar}px;background: ${this.bgcolor}`
if (this.bgImage) {
style = `${style}background-image:url(${bgImage});`
}
return style
},
},
onLoad: function() {
this.getLocation()
let that = this
// uni.showLoading({
// title: "",
// });
getCanvas()
.then(res => {})
.catch(error => {
this.homeData = JSON.parse(error.data.json)
console.log(this.homeData)
})
getHomeData().then(res => {
that.logoUrl = res.data.logoUrl
res.data.banner.map(item => (item.bgcolor = item.color || ''))
that.$set(that, 'info', res.data.info)
that.$set(that, 'firstList', res.data.firstList)
that.$set(that, 'bastList', res.data.bastList)
that.$set(that, 'likeInfo', res.data.likeInfo)
that.$set(that, 'live', res.data.liveList)
that.$set(that, 'lovely', res.data.lovely)
that.$set(that, 'benefit', res.data.benefit)
that.$set(that, 'couponList', res.data.couponList)
that.$set(that, 'combinationList', res.data.combinationList)
uni.hideLoading()
that.setOpenShare()
// that.doColorThief()
})
},
methods: {
...mapActions(['getLocation']),
onShareTimeline: function() {
return {
title: this.miniHomeRemark,
imageUrl: this.miniHomeImg,
path: 'pages/home/index?spread=' + uni.getStorageSync('uid'),
}
},
onShareAppMessage: function() {
return {
title: this.miniHomeRemark,
imageUrl: this.miniHomeImg,
path: 'pages/home/index?spread=' + uni.getStorageSync('uid'),
}
},
goRoll(item) {
if (item.uniapp_url) {
this.$yrouter.push(item.uniapp_url)
}
},
goGoodSearch() {
// this.$yrouter.push('/pages/shop/GoodsEvaluate/index');
this.$yrouter.push('/pages/shop/GoodSearch/index')
},
goWxappUrl(item) {
this.$yrouter.push(item.uniapp_url)
},
goHotNewGoods(type) {
this.$yrouter.push({
path: '/pages/shop/HotNewGoods/index',
query: {
type,
},
})
},
goGoodsCon(item) {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: {
id: item.id,
},
})
},
goGoodsPromotion() {
this.$yrouter.push('/pages/shop/GoodsPromotion/index')
},
setOpenShare: function() {
if (this.$deviceType == 'weixin') {
getShare().then(res => {
var data = res.data.data
var configAppMessage = {
desc: data.synopsis,
title: data.title,
link: location.href,
imgUrl: data.img,
}
openShareAll(configAppMessage)
})
}
},
startQr: function() {
uni.scanCode({
success: res => {
let option = handleUrlParam(res.result)
switch (option.pageType) {
case 'good':
//
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: {
q: res.result,
},
})
break
case 'group':
//
this.$yrouter.push({
path: '/pages/activity/GroupRule/index',
query: {
q: res.result,
},
})
break
case 'dargain':
//
this.$yrouter.push({
path: '/pages/activity/DargainDetails/index',
query: {
q: res.result,
},
})
break
default:
//
this.$yrouter.push({
path: '/pages/Loading/index',
query: {},
})
break
}
},
})
},
getbgcolor(e) {
this.bgcolor = e
},
},
created: async function() {
// await this.doColorThief();
},
}
</script>
<style scoped lang="less">
.content_box {
background: #f3f3f3;
}
.index {
background-color: #f3f3f3;
}
.swiper-item {
height: 100%;
}
.fixed-header {
position: fixed;
z-index: 99;
// #ifdef H5
top: 88rpx;
// #endif
// #ifndef H5
top: 0;
// #endif
left: 0;
right: 0;
background: #fff;
box-shadow: 0 0 20rpx -10rpx #aaa;
& + .fixed-header-box {
height: 98rpx;
}
}
.head_box {
width: 750rpx;
// background: #fff;
transition: all linear 0.3s;
/deep/.cuIcon-back {
display: none;
}
.nav-title {
font-size: 38rpx;
font-family: PingFang SC;
font-weight: 500;
color: #fff;
}
}
.cu-bar.fixed {
position: fixed;
width: 100%;
top: 0;
z-index: 1024;
// box-shadow: 0 1upx 6upx rgba(0, 0, 0, 0.1);
}
.cu-bar {
box-sizing: border-box;
.index .header {
height: 64rpx;
}
}
.header-search {
transition: all linear 0.3s;
background: #fff;
.search{
border: 2rpx solid #EA533E;
background-color: #fff;
}
}
.cu-bar .action {
display: -webkit-box;
display: -webkit-flex;
display: flex;
align-items: center;
height: 100%;
max-height: 100%;
&:first-child {
margin-left: 15px;
font-size: 15px;
}
}
.home_content_box {
margin-top: -20rpx;
}
.head_box {
}
.nav-title {
margin-left: 20rpx;
line-height: 40px;
}
</style>

569
pages/home/index.vue

@ -1,30 +1,37 @@
<template> <template>
<view class="index"> <view class="index">
<!-- <view class="header header-search acea-row row-middle"> --> <view class="header header-search acea-row row-middle">
<!-- view @click="goGoodSearch()" class="search acea-row row-middle"> <view @click="goGoodSearch()" class="search acea-row row-middle">
<text class="iconfont icon-xiazai5"></text> <text class="iconfont icon-xiazai5"></text>
搜索商品 搜索商品
</view> --> </view>
<!-- #ifndef H5 --> </view>
<!-- <view class="qr" @click="startQr()" v-if="$deviceType !== 'weixin'">
<image src="../../static/saoyisao-icon.png" />
</view> -->
<!-- #endif -->
<!-- </view> -->
<view class="banner-box"> <view class="banner-box">
<image src="https://www.cyjyyjy.com:8081/static/home-banner.png" mode=""></image> <swiper class="swiper-box">
<swiper-item>
<view class="swiper-item">
<image src="https://www.cyjyyjy.com:8081/static/home-banner.png" mode="aspectFill"></image>
</view>
</swiper-item>
</swiper>
</view> </view>
<!-- 每日一签 --> <!-- 每日一签 -->
<view class="today-fortune-content"> <view class="today-fortune-content">
<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">
<image src="../../static/idx-icon1.png"></image>
</view>
<view>{{year}}{{month}}{{day}}</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>
<view class="time-box">{{todayDate}}</view> <view class="time-box">{{todayDate}}</view>
<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>
@ -32,120 +39,62 @@
</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">
<image src="../../static/yi.png"></image>
</view>
<view class="fortune">{{yi}}</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 class="fortune">{{ji}}</view> <image src="../../static/ji.png"></image>
</view> </view>
<view class="fortune">{{ji}}</view>
</view> </view>
<!-- <view class="qiuqian-box" v-if="flag == 1">
<image class="qiuqian-bg" @click="todiandeng()" src="https://qiniu.upload.gznl.top/90a6420b-abd9-41e2-be4f-dcf10fe93bed.png"></image>
</view> -->
</view>
<!-- <view class="fortune-menu-box acea-row row-between">
<view class="fortune-menu-item acea-row row-middle" @click="toWebView()">
<image src="../../static/f-menu1.png" mode=""></image>
<text>周公解梦</text>
</view>
<view class="fortune-menu-item acea-row row-middle">
<image src="../../static/f-menu2.png" mode=""></image>
<text>周易八卦</text>
</view> </view>
<view class="fortune-menu-item acea-row row-middle">
<image src="../../static/f-menu3.png" mode=""></image>
<text>八字财运</text>
</view> </view>
</view> -->
</view> </view>
<!-- <view class="notice-box acea-row row-middle" @click="toNoticePage"> <!-- <view class="notice-box acea-row row-middle" @click="toNoticePage">
<view class="notice-t">公告</view> <view class="notice-t">公告</view>
<view class="notice">点击下载直播APP在线观看</view> <view class="notice">点击下载直播APP在线观看</view>
</view> --> </view> -->
<!-- 推荐课程 --> <!-- 推荐直播 -->
<view class="recommend-box p30" v-if="courseList.length > 0"> <view class="liveCourse-list-box p30" v-if="live.length> 0">
<view class="title-box acea-row row-between-wrapper"> <ListTitleBox :titImg="'../../../static/tit1.png'"> </ListTitleBox>
<view class="title">今日推荐</view> <view class="liveCourse-list acea-row row-between">
<view class="more" @click="toCourse">查看全部课程</view> <view class="item" v-for="item in live" :key="item.id" @click="toCourseDetail(item.id)">
</view> <image :src="item.coverImge" mode="aspectFill"></image>
<view class="recommend-list-box acea-row"> <text>{{item.name}}</text>
<view class="recommend-item" v-for="(item,index) in courseList" :key="index" @click="toCourseDetail(item.id)">
<view class="img-box"><image :src="item.coverImg" mode="aspectFill"></image></view>
<view class="course-content">
<view class="course-title line1">{{item.courseName}}</view>
<view class="course-tips-box acea-row">
<view class="course-tip-item blue">{{item.categoryName}}</view>
<!-- <view class="course-tip-item yellow">{{item.levelName}}</view> -->
</view>
<!-- <view class="price" v-if="item.level > 2">{{item.level}}级课程</view>
<view class="price" v-if="item.level == 2">{{item.courseCharge}}</view>
<view class="price colG" v-if="item.chargeType == 0 || item.level == 1">免费</view> -->
<view class="course-address acea-row row-between-wrapper">
<view class="address">{{item.coursePlace}}</view>
<view class="course-time">{{setDate(item.enterStartTime)}}-{{setDate(item.enterEndTime)}}</view>
</view>
</view> </view>
</view> </view>
</view> </view>
<!-- 推荐课程 -->
<view class="recommend-box p30" v-if="courseList.length> 0">
<ListTitleBox :titImg="'../../../static/tit2.png'" :titWord="'查看更多课程'" @seeMoreClick="toCourse">
</ListTitleBox>
<CourseList :list="courseList"></CourseList>
</view> </view>
<!-- 学习榜 --> <!-- 学习榜 -->
<view class="study-list-box" v-if="studyList.length > 0"> <view class="study-list-box p30" v-if="studyList.length> 0">
<view class="title-box acea-row row-between-wrapper"> <ListTitleBox :titImg="'../../../static/tit3.png'" :titWord="'查看更多打卡榜单'" @seeMoreClick="toCourse">
<view class="title">学习榜单</view> </ListTitleBox>
<view class="more" @click="toCourse">查看全部榜单</view> <StadyList :list="studyList"></StadyList>
</view>
<view class="study-list uni-padding-wrap uni-common-mt">
<scroll-view class="scroll-view_H" scroll-x="true">
<view class="study-item scroll-view-item_H" v-for="(item,index) in studyList" :key="index" @click="toStudyDetail(item.id)">
<view class="day-box acea-row row-middle">
<image src="../../static/date-icon.png" v-if="index%2 == 0"></image>
<image src="../../static/date-icon2.png" v-if="index%2 != 0"></image>
<text>{{item.clockTimes}}</text>
</view>
<view class="study-content">
<view class="study-title line1">{{item.listName}}</view>
<view class="study-time acea-row-nowrap row-between-wrapper">
<view>{{setDate(item.listStartTime)}}开始</view>
<view>{{item.enterNum}}人已参与</view>
</view>
</view>
</view>
</scroll-view>
</view>
</view> </view>
<!-- 都在看 --> <!-- 都在看 -->
<view class="readyarticle-box"> <view class="readyarticle-box p30">
<view class="title-box acea-row row-between-wrapper"> <ListTitleBox :titImg="'../../../static/tit4.png'" :titWord="'查看全部文章'" @seeMoreClick="toKnowledge">
<view class="title">大家都在看</view> </ListTitleBox>
<view class="more" @click="toKnowledge">查看全部文章</view> <ArticleList :list="articleList"></ArticleList>
</view>
<view class="article-list">
<view class="article-item" v-for="(item,index) in articleList" :key="index" @click="toArticleDetail(item.id)">
<image :src="item.imageInput" mode="aspectFill"></image>
<view class="article-content">
<view class="article-title line1">{{item.title}}</view>
<view class="article-desc line1">{{item.synopsis}}</view>
<view class="author-box acea-row row-between">
<view class="acea-row">
<view class="author">{{item.author}}</view>
<view class="time">{{item.addTime.split(' ')[0]}}</view>
<view>{{item.visit}}人阅读</view>
</view>
<view class="tips"
:class="item.chargeType == 0 ? 'free-bg' : item.chargeType == 1 ? '' : 'jifen'">
{{item.chargeType == 0 ? '免费' : item.chargeType == 1 ? '收费' : '积分'}}
</view>
</view>
</view>
</view>
</view>
</view> </view>
<view class="no-more">没有更多内容了</view> <view class="no-more">没有更多内容了</view>
</view> </view>
</template> </template>
<script> <script>
import { mapState, mapMutations, mapActions } from 'vuex' import {
mapState,
mapMutations,
mapActions
} from 'vuex'
import GoodList from '@/components/GoodList' import GoodList from '@/components/GoodList'
import PromotionGood from '@/components/PromotionGood' import PromotionGood from '@/components/PromotionGood'
import CouponWindow from '@/components/CouponWindow' import CouponWindow from '@/components/CouponWindow'
@ -153,30 +102,40 @@ import Menu from '@/components/Menu'
import UniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar' import UniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar'
import Adv from '@/components/sh-adv' import Adv from '@/components/sh-adv'
import Groupon from '@/components/sh-groupon.vue' import Groupon from '@/components/sh-groupon.vue'
import Banner from './components/Banner' import Banner from './components/Banner'
import HotCommodity from './components/HotCommodity' import HotCommodity from './components/HotCommodity'
import FirstNewProduct from './components/FirstNewProduct' import FirstNewProduct from './components/FirstNewProduct'
import ProductsRecommended from './components/ProductsRecommended' import ProductsRecommended from './components/ProductsRecommended'
import Live from './components/Live' // import Live from './components/Live'
import CourseList from './components/CourseList.vue'
import { getHomeData, getShare, getCanvas } from '@/api/public' import ListTitleBox from './components/ListTitleBox.vue'
import StadyList from './components/StadyList.vue'
import ArticleList from './components/ArticleList.vue'
import {
getHomeData,
getShare,
getCanvas
} from '@/api/public'
import cookie from '@/utils/store/cookie' import cookie from '@/utils/store/cookie'
import { isWeixin, handleUrlParam } from '@/utils/index' import {
isWeixin,
import { signCourse } from '@/api/knowledge' handleUrlParam
} from '@/utils/index'
import { getWanniali , getBlessingFlag } from '@/api/diandeng' import {
signCourse
import { openShareAll } from '@/libs/wechat' } from '@/api/knowledge'
import {
getWanniali,
getBlessingFlag
} from '@/api/diandeng'
import {
openShareAll
} from '@/libs/wechat'
const HAS_COUPON_WINDOW = 'has_coupon_window' const HAS_COUPON_WINDOW = 'has_coupon_window'
export default { export default {
name: 'Index', name: 'Index',
components: { components: {
// swiper,
// swiperSlide,
UniNoticeBar, UniNoticeBar,
GoodList, GoodList,
PromotionGood, PromotionGood,
@ -188,7 +147,10 @@ export default {
HotCommodity, HotCommodity,
FirstNewProduct, FirstNewProduct,
ProductsRecommended, ProductsRecommended,
Live, CourseList,
ListTitleBox,
StadyList,
ArticleList,
}, },
props: {}, props: {},
data: function() { data: function() {
@ -236,7 +198,11 @@ export default {
courseList: [], courseList: [],
studyList: [], studyList: [],
articleList: [], articleList: [],
flag:0 flag: 0,
titImg1: '../../../static/tit1.png',
titleWord1: '查看更多课程',
titImg2: '../../../static/tit2.png',
titleWord2: '查看更多打卡榜单'
} }
}, },
computed: { computed: {
@ -245,13 +211,12 @@ export default {
}, },
customStyle() { customStyle() {
var bgImage = this.bgImage var bgImage = this.bgImage
// var style = `height:${this.CustomBar}px;padding-top:${0}px;background: ${this.bgcolor}`;
var style = `height:${this.CustomBar}px;padding-top:${this.StatusBar}px;background: ${this.bgcolor}` var style = `height:${this.CustomBar}px;padding-top:${this.StatusBar}px;background: ${this.bgcolor}`
if (this.bgImage) { if (this.bgImage) {
style = `${style}background-image:url(${bgImage});` style = `${style}background-image:url(${bgImage});`
} }
return style return style
}, }
}, },
onLoad: function() { onLoad: function() {
this.getLocation() this.getLocation()
@ -284,13 +249,19 @@ export default {
}, },
methods: { methods: {
...mapActions(['getLocation']), ...mapActions(['getLocation']),
getData() { getData() {
var that = this; var that = this;
getHomeData().then(res => { getHomeData().then(res => {
uni.hideLoading() uni.hideLoading()
that.logoUrl = res.data.logoUrl that.logoUrl = res.data.logoUrl
res.data.banner.map(item => (item.bgcolor = item.color || '')) res.data.banner.map(item => (item.bgcolor = item.color || ''))
res.data.lessionDtos.map(item => {
item.enterStartTime = this.setDate(item.enterStartTime)
item.enterEndTime = this.setDate(item.enterEndTime)
})
res.data.studyLists.map(item => {
item.listStartTime = this.setDate(item.listStartTime)
})
that.$set(that, 'info', res.data.info) that.$set(that, 'info', res.data.info)
that.$set(that, 'firstList', res.data.firstList) that.$set(that, 'firstList', res.data.firstList)
that.$set(that, 'bastList', res.data.bastList) that.$set(that, 'bastList', res.data.bastList)
@ -306,7 +277,6 @@ export default {
uni.hideLoading() uni.hideLoading()
that.setOpenShare() that.setOpenShare()
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
// console.log(res.data.courseDtos)
}) })
}, },
todiandeng() { todiandeng() {
@ -315,19 +285,16 @@ export default {
}) })
}, },
setDate(t) { setDate(t) {
if(t && t.length > 0){ return t.split(" ")[0].split("-")[1] + "." + t.split(" ")[0].split("-")[2]
let str = t.split(" ")[0].split("-")[1] + "." + t.split(" ")[0].split("-")[2]
return str
}
}, },
getDate() { getDate() {
var today = new Date(); var today = new Date();
var y = today.getFullYear().toString(); var y = today.getFullYear().toString()
var m = (today.getMonth()+1).toString(); var m = (today.getMonth() + 1).toString()
var d = today.getDate().toString(); var d = today.getDate().toString()
var day = today.getDay(); var day = today.getDay()
this.dateStr = y + '年' + m + '月' + d + '日'; this.dateStr = y + '年' + m + '月' + d + '日'
this.dateStr2 = y + '-' + m + '-' + d ; this.dateStr2 = y + '-' + m + '-' + d
}, },
onShareTimeline: function() { onShareTimeline: function() {
return { return {
@ -342,11 +309,6 @@ export default {
imageUrl: this.miniHomeImg, imageUrl: this.miniHomeImg,
path: 'pages/home/index?spread=' + uni.getStorageSync('uid'), path: 'pages/home/index?spread=' + uni.getStorageSync('uid'),
} }
},
toNoticePage(){
this.$yrouter.push({
path: '/pages/noticePage/index',
})
}, },
toCourseDetail(id){ toCourseDetail(id){
this.$yrouter.push({ this.$yrouter.push({
@ -356,12 +318,9 @@ export default {
}, },
}) })
}, },
toStudyDetail(id){ toNoticePage() {
this.$yrouter.push({ this.$yrouter.push({
path: '/pages/study/detail', path: '/pages/noticePage/index',
query: {
id:id,
},
}) })
}, },
toArticleDetail(id) { toArticleDetail(id) {
@ -441,6 +400,7 @@ export default {
uni.showModal({ uni.showModal({
title: '提示!', title: '提示!',
content: '签到成功!您的座位号是' + res.data, content: '签到成功!您的座位号是' + res.data,
}) })
} else { } else {
uni.showToast({ uni.showToast({
@ -450,43 +410,6 @@ export default {
}) })
} }
}) })
// switch (option.pageType) {
// case 'good':
// //
// this.$yrouter.push({
// path: '/pages/shop/GoodsCon/index',
// query: {
// q: res.result,
// },
// })
// break
// case 'group':
// //
// this.$yrouter.push({
// path: '/pages/activity/GroupRule/index',
// query: {
// q: res.result,
// },
// })
// break
// case 'dargain':
// //
// this.$yrouter.push({
// path: '/pages/activity/DargainDetails/index',
// query: {
// q: res.result,
// },
// })
// break
// default:
// //
// this.$yrouter.push({
// path: '/pages/Loading/index',
// query: {},
// })
// break
// }
}, },
}) })
}, },
@ -494,25 +417,26 @@ export default {
this.bgcolor = e this.bgcolor = e
}, },
}, },
created: async function() {
// await this.doColorThief();
},
} }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.content_box { .content_box {
background: #fff; background: #fff;
} }
.colG { .colG {
color: #8FB85B !important; color: #8FB85B !important;
} }
.index { .index {
// background-color: #fff;
padding-bottom: 68rpx; padding-bottom: 68rpx;
background: #fff !important;
.header { .header {
.qr { .qr {
width: 36rpx; width: 36rpx;
height: 38rpx; height: 38rpx;
image { image {
width: 36rpx; width: 36rpx;
height: 38rpx; height: 38rpx;
@ -521,6 +445,21 @@ export default {
} }
} }
.header-search {
width: 690rpx;
height: 70rpx;
background: #F3F3F3;
color: #999999;
margin: 0 auto;
border-radius: 35rpx;
.search {
width: 100%;
background: #F3F3F3;
color: #999999;
}
}
.notice-box { .notice-box {
width: 690rpx; width: 690rpx;
height: 66rpx; height: 66rpx;
@ -528,6 +467,7 @@ export default {
border-radius: 8px; border-radius: 8px;
background: #F9F9F9; background: #F9F9F9;
font-weight: 500; font-weight: 500;
.notice-t { .notice-t {
width: 120rpx; width: 120rpx;
height: 100%; height: 100%;
@ -538,22 +478,27 @@ export default {
border-top-right-radius: 8rpx; border-top-right-radius: 8rpx;
border-bottom-right-radius: 8rpx; border-bottom-right-radius: 8rpx;
} }
.notice { .notice {
font-size: 28rpx; font-size: 28rpx;
color: #411E04; color: #411E04;
margin-left: 20rpx; margin-left: 20rpx;
} }
} }
.swiper-item { .swiper-item {
height: 100%; height: 100%;
image{
border-radius: 20rpx;
} }
}
.fixed-header { .fixed-header {
position: fixed; position: fixed;
z-index: 99; z-index: 99;
// #ifdef H5 // #ifdef H5
top: 88rpx; top: 88rpx;
// #endif // #endif
// #ifndef H5 // #ifndef H5
top: 0; top: 0;
// #endif // #endif
@ -561,19 +506,29 @@ export default {
right: 0; right: 0;
background: #fff; background: #fff;
box-shadow: 0 0 20rpx -10rpx #aaa; box-shadow: 0 0 20rpx -10rpx #aaa;
&+.fixed-header-box { &+.fixed-header-box {
height: 98rpx; height: 98rpx;
} }
} }
.banner-box { .banner-box {
width: 100%; width: 688rpx;
height: 372rpx; height: 268rpx;
border-radius: 20rpx;
overflow: hidden;
margin: 32rpx auto;
.swiper-box {
height: 100%;
}
} }
.today-fortune-content { .today-fortune-content {
width: 100%; width: 100%;
padding: 0 30rpx; padding: 0 30rpx;
box-sizing: border-box; box-sizing: border-box;
margin-bottom: 20rpx; margin-bottom: 36rpx;
.today-fortune-box { .today-fortune-box {
width: 100%; width: 100%;
@ -581,18 +536,33 @@ export default {
box-sizing: border-box; box-sizing: border-box;
padding: 30rpx 40rpx; padding: 30rpx 40rpx;
border-radius: 20rpx; border-radius: 20rpx;
box-shadow: 0px 6px 14px 0px rgba(124,124,124,0.08); box-shadow: 0px 6rpx 14rpx rgba(80, 80, 80, 0.08);
font-size: 24rpx; font-size: 24rpx;
position: relative;
top: -24rpx; .top-box {
color: #999999;
.title {
width: 208rpx;
height: 62rpx;
image {
width: 100%;
height: 100%;
} }
}
}
}
.date-box { .date-box {
font-size: 72rpx; font-size: 72rpx;
color: #EA533E; color: #EA533E;
margin-top: 38rpx; margin-top: 38rpx;
.time-box { .time-box {
margin: 0 24rpx; margin: 0 24rpx;
} }
.date-btn { .date-btn {
width: 84rpx; width: 84rpx;
height: 84rpx; height: 84rpx;
@ -600,55 +570,58 @@ export default {
line-height: 100rpx; line-height: 100rpx;
} }
} }
.week-box { .week-box {
width: 100%; width: 100%;
color: #7C7C7C; color: #7C7C7C;
text-align: center; text-align: center;
border-bottom: 1px solid #ECECEC; // border-bottom: 1px solid #ECECEC;
padding: 30rpx 0; padding: 30rpx 0;
.week { .week {
display: inline-block; display: inline-block;
margin-right: 12rpx; margin-right: 12rpx;
color: #222; color: #222;
} }
} }
.fortune-detail { .fortune-detail {
font-size: 30rpx; font-size: 30rpx;
color: #222; color: #222;
.fortune-n { .fortune-n {
color: #EA533E; color: #EA533E;
} }
.fortune-icon { .fortune-icon {
width: 44rpx; width: 64rpx;
height: 44rpx; height: 52rpx;
text-align: center; margin-right: 24rpx;
line-height: 44rpx;
border-radius: 25px; image {
font-size: 28rpx; width: 100%;
color: #fff; height: 100%;
margin-right: 20rpx;
}
.fortune{
width:calc(100% - 70rpx)
} }
.nice{
background: #EA533E;
} }
.bad{
background: #8FB85B; .fortune {
width: calc(100% - 88rpx)
} }
} }
.qiuqian-box { .qiuqian-box {
width: 100%; width: 100%;
height: 124rpx; height: 124rpx;
position: relative; position: relative;
margin-top: 40rpx; margin-top: 40rpx;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: absolute; position: absolute;
z-index: 1; z-index: 1;
} }
.txt-box { .txt-box {
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -659,6 +632,7 @@ export default {
position: absolute; position: absolute;
z-index: 3; z-index: 3;
} }
.qiuqin-btn { .qiuqin-btn {
width: 194rpx; width: 194rpx;
height: 68rpx; height: 68rpx;
@ -671,6 +645,7 @@ export default {
line-height: 68rpx; line-height: 68rpx;
} }
} }
.fortune-menu-box { .fortune-menu-box {
.fortune-menu-item { .fortune-menu-item {
width: 216rpx; width: 216rpx;
@ -679,6 +654,7 @@ export default {
background: #fff; background: #fff;
font-size: 28rpx; font-size: 28rpx;
color: #222; color: #222;
image { image {
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;
@ -686,165 +662,50 @@ export default {
} }
} }
} }
} }
.p30 { .p30 {
width: 100%; width: 100%;
padding: 0 30rpx; padding: 0 30rpx;
box-sizing: border-box;
margin-bottom: 40rpx; margin-bottom: 40rpx;
} }
.recommend-box{
.recommend-list-box{ .liveCourse-list {
width: 100%; .item {
// margin-top: 20rpx;
.recommend-item{
width: 334rpx; width: 334rpx;
background: #fff;
border-radius: 10rpx;
font-size: 28rpx; font-size: 28rpx;
color: #333; color: #000;
margin-right: 23rpx; font-weight: bold;
margin-top: 23rpx;
overflow: hidden; overflow: hidden;
margin-bottom: 20rpx;
image { image {
width: 334rpx;
height: 216rpx;
}
.course-content{
width: 100%; width: 100%;
box-sizing: border-box; height: 224rpx;
padding:0 10rpx 20rpx; margin-bottom: 18rpx;
} border-radius: 12rpx;
.course-title{
line-height: 40rpx;
} }
.course-tips-box{
margin: 12rpx 0 24rpx;
font-size: 24rpx;
color: #999;
.course-tip-item{
min-width: 60rpx;
height: 34rpx;
line-height: 32rpx;
text-align: center;
background: #EDEFF8;
border-radius: 4rpx;
border: 1px solid #6E85EB;
padding: 0 6rpx;
font-size: 22rpx;
margin-right: 20rpx;
box-sizing: border-box;
margin-right: 10rpx;
}
.blue{
color: #6E85EB;
background: #EDEFF8;
border-color: #6E85EB;
}
.yellow{
color: #F99C10;
background: #FFEDCC;
border-color: #F99C10;
}
}
.price{
font-size: 32rpx;
color: #EA533E;
font-weight: 500;
margin: 16rpx 0;
}
.course-address{
font-size: 24rpx;
color: #999999;
}
}
.recommend-item:nth-child(2n){
margin-right: 0;
} }
} }
}
.study-list-box,.readyarticle-box{
margin-bottom: 40rpx;
.title-box{
width: 100%;
padding: 0 30rpx;
box-sizing: border-box;
}
}
.study-list{
width: 100%;
margin-top: 20rpx;
margin-bottom: 40rpx;
padding-left: 20rpx;
box-sizing: border-box;
.scroll-view_H{
white-space: nowrap;
width: 100%;
}
.study-item{
width: 334rpx;
height: 180rpx;
display: inline-block;
background: linear-gradient(143deg, #FDAF97 0%, #ED5E48 100%);
box-shadow: 0px 4rpx 8rpx 4rpx rgba(250,194,183,0.32);
border-radius: 10rpx;
margin-right: 20rpx;
.day-box{
color: #E73D21;
font-size: 48rpx;
line-height: 58rpx;
margin-left: 10rpx;
image{
width: 34rpx;
height: 34rpx;
margin-right: 10rpx;
}
}
.study-content{
width: calc(100% - 12rpx);
background: #fff;
font-size: 24rpx;
color: #999;
box-shadow: 0px 4rpx 8rpx 4rpx rgba(250,194,183,0.32);
border-radius: 10rpx;
margin: 2rpx auto;
padding:16rpx 10rpx 10rpx;
box-sizing: border-box;
.study-title{
font-size: 28rpx;
font-weight: 500;
color: #222222;
line-height: 40rpx;
margin-bottom: 12rpx;
}
}
}
.study-item:nth-child(2n){
background: linear-gradient(143deg, #C4DBFF 0%, #7FAAF2 100%);
.day-box{
color: #557AB3;
}
}
}
.readyarticle-box { .readyarticle-box {
.article-list { .article-list {
width: 100%; width: 100%;
margin-top: 20rpx; margin-top: 20rpx;
.article-item { .article-item {
width: 100%; width: 100%;
background: #fff; background: #fff;
padding: 20rpx;
box-sizing: border-box; box-sizing: border-box;
margin-bottom: 12rpx; margin-bottom: 12rpx;
image { image {
width: 710rpx; width: 100%;
height: 266rpx; height: 266rpx;
border-radius: 10rpx; border-radius: 10rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.article-title { .article-title {
font-size: 36rpx; font-size: 36rpx;
font-weight: 500; font-weight: 500;
@ -852,24 +713,29 @@ export default {
line-height: 50rpx; line-height: 50rpx;
margin-bottom: 8rpx; margin-bottom: 8rpx;
} }
.article-desc { .article-desc {
font-size: 24rpx; font-size: 24rpx;
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
line-height: 40rpx; line-height: 40rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
text-indent: 1em; // text-indent: 1em;
} }
.author-box { .author-box {
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
// text-indent: 1em; // text-indent: 1em;
.author { .author {
color: #EA533E; color: #EA533E;
} }
.time { .time {
margin: 0 12rpx; margin: 0 12rpx;
} }
.tips { .tips {
width: 100rpx; width: 100rpx;
font-size: 20rpx; font-size: 20rpx;
@ -880,10 +746,12 @@ export default {
background: #fcd391; background: #fcd391;
border-radius: 44rpx; border-radius: 44rpx;
} }
.free-bg { .free-bg {
background: #8FB85B; background: #8FB85B;
color: #D7FFA4; color: #D7FFA4;
} }
.jifen { .jifen {
background: #AAC8FA; background: #AAC8FA;
color: #5693F9; color: #5693F9;
@ -892,21 +760,27 @@ export default {
} }
} }
} }
.title-box { .title-box {
color: #222; width: 208rpx;
.title{ height: 62rpx;
font-size: 40rpx;
font-weight: 500; image {
width: 100%;
height: 100%;
} }
.more { .more {
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
} }
} }
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.no-more { .no-more {
text-align: center; text-align: center;
color: #999; color: #999;
@ -940,20 +814,12 @@ image{
.cu-bar { .cu-bar {
box-sizing: border-box; box-sizing: border-box;
.index .header { .index .header {
height: 64rpx; height: 64rpx;
} }
} }
.header-search {
transition: all linear 0.3s;
background: #fff;
color: #999999;
.search{
border: 2rpx solid #EA533E;
background-color: #fff;
}
}
.cu-bar .action { .cu-bar .action {
display: -webkit-box; display: -webkit-box;
@ -973,8 +839,7 @@ image{
margin-top: -20rpx; margin-top: -20rpx;
} }
.head_box { .head_box {}
}
.nav-title { .nav-title {
margin-left: 20rpx; margin-left: 20rpx;

35
pages/knowledge/index.vue

@ -13,7 +13,7 @@
<view class="right-box"> <view class="right-box">
<view class="title-txt">{{currentTab.categoryName}}</view> <view class="title-txt">{{currentTab.categoryName}}</view>
<view class="desc line5"> <view class="desc line5">
<text>{{currentTab.categoryDetails || '暂无'}}</text> <text>{{currentTab.categoryDetails || '暂无简介'}}</text>
</view> </view>
</view> </view>
</view> </view>
@ -25,24 +25,8 @@
</view> </view>
<view class="content-box"> <view class="content-box">
<view class="knowledge-list"> <view class="knowledge-list">
<view class="knowledge-item acea-row" v-if="articleList.length > 0" v-for="item in articleList" @click="toDetail(item.id)">
<view class="img-box">
<image :src="item.imageInput" mode="aspectFill"></image>
</view>
<view class="knowledge-info-box acea-row row-column row-between">
<view style="width: 100%;">
<view class="title line1">{{item.title}}</view>
<view class="intro">{{item.synopsis}}</view>
</view>
<view class="type-box acea-row">
<view class="tip" :class="item.chargeType == 0 ? 'free-bg' : item.chargeType == 1 ? '' : 'jifen'">
{{item.chargeType == 0 ? '免费' : item.chargeType == 1 ? '收费' : '积分'}}
</view>
<view class="time">{{item.addTime}}</view>
</view>
</view>
</view>
<view class="no-content" v-if="articleList.length == 0">暂无内容...</view> <view class="no-content" v-if="articleList.length == 0">暂无内容...</view>
<sSwiper :list="articleList" v-else></sSwiper>
</view> </view>
</view> </view>
</view> </view>
@ -51,6 +35,7 @@
<script> <script>
import SecondMenu from './components/secondMenu.vue'; import SecondMenu from './components/secondMenu.vue';
import { getArticleCategorys,getArticle } from '@/api/knowledge'; import { getArticleCategorys,getArticle } from '@/api/knowledge';
import sSwiper from '../../components/sSwiper.vue'
export default { export default {
data() { data() {
return { return {
@ -69,12 +54,14 @@
scrollTop:0 scrollTop:0
} }
}, },
components: { SecondMenu }, components: { SecondMenu, sSwiper },
onShow() { onShow() {
console.log(this.tabSelect,'tabSelect') console.log(this.tabSelect,'tabSelect')
}, },
onLoad(){ onLoad(){
uni.showLoading({
title: '正在加载中...'
})
getArticleCategorys().then((res)=>{ getArticleCategorys().then((res)=>{
this.tabList = res.data this.tabList = res.data
this.$set(this, 'currentTab', res.data[0]) this.$set(this, 'currentTab', res.data[0])
@ -86,6 +73,7 @@
// this.$set(this, 'tabSelect', 0) // this.$set(this, 'tabSelect', 0)
// this.scrollLeft = 0 // this.scrollLeft = 0
} }
uni.hideLoading()
}).then(()=>{ }).then(()=>{
this.getArticle() this.getArticle()
}) })
@ -116,9 +104,13 @@
this.currentTab = item this.currentTab = item
this.tabSelect = index this.tabSelect = index
this.moveTo(index) this.moveTo(index)
if(item.categoryList.length > 0){ if(item.categoryList.length > 0){
this.$set(this, 'active', item.categoryList[0].id) this.$set(this, 'active', item.categoryList[0].id)
} else{
this.$set(this, 'active', null)
} }
// console.log(item)
this.secondMenu = item.categoryList this.secondMenu = item.categoryList
this.getArticle() this.getArticle()
}, },
@ -154,8 +146,7 @@
min-height: 100%; min-height: 100%;
padding-top: 110rpx; padding-top: 110rpx;
.tab-box{ .tab-box{
// position: fixed; box-shadow: 0px 6px 12px 0px rgba(227, 227, 227, 0.29);
// top: 0;
background: #fff; background: #fff;
/deep/.second-menu-box { /deep/.second-menu-box {
padding: 0 24rpx; padding: 0 24rpx;

119
pages/shop/GoodsClass/index.vue

@ -1,26 +1,25 @@
<template> <template>
<view class="productSort"> <view class="productSort">
<view class="cart-btn-box" @click="goShoppingCart()">
<text class="iconfont icon-gouwuche1"></text>
</view>
<div class="index"> <div class="index">
<view class="header acea-row row-center-wrapper"> <view class="header acea-row row-center-wrapper">
<view @click="goGoodSearch()" class="search acea-row row-middle"> <view @click="goGoodSearch()" class="search acea-row row-middle">
<text class="iconfont icon-xiazai5"></text>搜索商品 <text class="iconfont icon-xiazai5"></text>搜索商品
</view> </view>
<view class="cart-btn-box" @click="goShoppingCart()">
<image src="../../../static/car-icon.png"></image>
</view>
</view> </view>
</div> </div>
<!-- <view class="banner-box"> <view class="banner-box">
<swiper class="swiper-box" :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000"> <swiper class="swiper-box" :indicator-dots="true" indicator-color="#868884" indicator-active-color="#fff" :autoplay="true" :interval="3000" :duration="1000">
<swiper-item> <swiper-item v-for="item in category" :key="item.id">
<view class="swiper-item">1</view> <view class="swiper-item">
</swiper-item> <image :src="item.pic" mode="aspectFill"></image>
<swiper-item> </view>
<view class="swiper-item">2</view>
</swiper-item> </swiper-item>
</swiper> </swiper>
</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="userInfo.avatar || '../../../static/default-headerimg.png'"></image> <image :src="userInfo.avatar || '../../../static/default-headerimg.png'"></image>
<view class="userInfo"> <view class="userInfo">
@ -34,7 +33,7 @@
</view> </view>
<view class="tips">您还有{{userInfo.integral || 0}}积分未使用</view> <view class="tips">您还有{{userInfo.integral || 0}}积分未使用</view>
</view> </view>
</view> </view> -->
<view class="goods-list-box"> <view class="goods-list-box">
<view class="goods-list-item" v-for="item in category" :key="item.id" v-if="item.children[0].products.length>0"> <view class="goods-list-item" v-for="item in category" :key="item.id" v-if="item.children[0].products.length>0">
<view class="goods-type-box acea-row row-center row-middle"> <view class="goods-type-box acea-row row-center row-middle">
@ -42,6 +41,7 @@
<view class="t-word">{{item.children[0].cateName}}</view> <view class="t-word">{{item.children[0].cateName}}</view>
<view class="icon-l"><image src="../../../static/titleR-icon.png"></image></view> <view class="icon-l"><image src="../../../static/titleR-icon.png"></image></view>
</view> </view>
<view class="category-img"><image :src="item.pic" mode="aspectFill"></image></view>
<view class="goods-list acea-row"> <view class="goods-list acea-row">
<view class="goods-item" v-for="goods in item.children[0].products" :key="goods.id" @click="toGoodsDetail(goods.id)"> <view class="goods-item" v-for="goods in item.children[0].products" :key="goods.id" @click="toGoodsDetail(goods.id)">
<image :src="goods.image"></image> <image :src="goods.image"></image>
@ -51,30 +51,6 @@
<view class="buy-count">已出售{{goods.sales}}{{goods.unitName}}</view> <view class="buy-count">已出售{{goods.sales}}{{goods.unitName}}</view>
</view> </view>
</view> </view>
<!-- <view class="goods-item">
<image src="../../../static/img1.png"></image>
<view class="goods-desc-box">
<view class="goods-name">禅易香囊 纯手工制作提神</view>
<view class="price">199+100积分</view>
<view class="buy-count">51人购买</view>
</view>
</view>
<view class="goods-item">
<image src="../../../static/img1.png"></image>
<view class="goods-desc-box">
<view class="goods-name">禅易香囊 纯手工制作提神</view>
<view class="price">199+100积分</view>
<view class="buy-count">51人购买</view>
</view>
</view>
<view class="goods-item">
<image src="../../../static/img1.png"></image>
<view class="goods-desc-box">
<view class="goods-name">禅易香囊 纯手工制作提神</view>
<view class="price">199+100积分</view>
<view class="buy-count">51人购买</view>
</view>
</view> -->
</view> </view>
</view> </view>
</view> </view>
@ -223,19 +199,16 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.productSort { .productSort {
height: 100%; height: 100%;
background: #F5F6F7 !important; background: #fff !important;
position: relative; position: relative;
.cart-btn-box{ .cart-btn-box{
position: fixed; width: 40rpx;
top: 90%; height: 40rpx;
right: 16rpx; margin-left: 12rpx;
width: 60rpx; image{
height: 60rpx; width: 100%;
background: #fff; height: 100%;
border-radius: 50px; }
text-align: center;
line-height: 60rpx;
font-weight: bold;
} }
} }
@ -244,17 +217,28 @@ export default {
} }
.banner-box{ .banner-box{
width: 100%; width: 100%;
height: 386rpx; height: 272rpx;
margin: 20rpx 0; margin: 40rpx 0;
background: #fff; background: #fff;
padding: 0 40rpx;
.swiper-box{ .swiper-box{
width: 100%; width: 100%;
height: 100%; height: 100%;
.swiper-item{
width: 100%;
height: 100%;
image{
width: 100%;
height: 100%;
border-radius: 14rpx;
}
}
} }
} }
.header .search{ .header .search{
border: 2rpx solid #EA533E; border: none;
background-color: #fff; background: #FAFAFC;
} }
.userInfo-box{ .userInfo-box{
width: 100%; width: 100%;
@ -297,9 +281,19 @@ export default {
} }
.goods-list-box{ .goods-list-box{
width: 100%; width: 100%;
padding: 0 30rpx; padding: 0 40rpx;
.goods-list-item{ .goods-list-item{
width: 100%; width: 100%;
.category-img{
width: 100%;
height: 182rpx;
margin: 36rpx 0;
image{
width: 100%;
height: 100%;
border-radius: 14rpx;
}
}
.goods-type-box{ .goods-type-box{
image{ image{
width: 94rpx; width: 94rpx;
@ -314,22 +308,23 @@ export default {
.goods-list{ .goods-list{
width: 100%; width: 100%;
.goods-item{ .goods-item{
width: 335rpx; width: 206rpx;
background: #fff; padding: 10rpx 12rpx 0rpx 12rpx;
margin-right: 18rpx; background: #F9F9FB;
margin-bottom: 30rpx; margin-bottom: 30rpx;
border-radius: 10rpx; margin-right: 26rpx;
border-radius: 12rpx;
overflow: hidden; overflow: hidden;
image{ image{
width: 100%; width: 100%;
height: 336rpx; height: 172rpx;
} border-radius: 8rpx;
} }
.goods-item:nth-child(2n){ &:nth-child(3n){
margin-right: 0; margin-right: 0;
} }
}
.goods-desc-box{ .goods-desc-box{
width: 100%; width: 100%;
padding: 16rpx; padding: 16rpx;
font-size: 24rpx; font-size: 24rpx;
@ -340,7 +335,7 @@ export default {
font-size: 28rpx; font-size: 28rpx;
color: #E5270F; color: #E5270F;
line-height: 40rpx; line-height: 40rpx;
margin-bottom: 26rpx; margin-bottom: 16rpx;
} }
} }
} }

139
pages/shop/GoodsCon/index.vue

@ -3,15 +3,20 @@
<view v-if="storeInfo.id"> <view v-if="storeInfo.id">
<!-- 轮播图 --> <!-- 轮播图 -->
<product-con-swiper :img-urls="storeInfo.sliderImageArr"></product-con-swiper> <product-con-swiper :img-urls="storeInfo.sliderImageArr"></product-con-swiper>
<view class="kefu-box">
<button open-type="contact"></button>
<image src="../../../static/kefu.png"></image>
</view>
<!-- 商品信息描述 --> <!-- 商品信息描述 -->
<view class="wrapper"> <view class="wrapper">
<view class="introduce">{{ storeInfo.storeName }}</view>
<view class="share acea-row row-between row-bottom"> <view class="share acea-row row-between row-bottom">
<view class="money font-color-red" v-if="!isIntegral"> <view class="money" v-if="!isIntegral">
<text></text> <text></text>
<text class="num">{{ attr.productSelect.price || storeInfo.price }}</text> <text class="num">{{ attr.productSelect.price || storeInfo.price }}</text>
<text class="old-price">{{ storeInfo.otPrice }}</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" v-if="storeInfo.giveIntegral>0">+{{storeInfo.giveIntegral}}积分</text> <text class="vip-money jifen">+{{storeInfo.giveIntegral || 0}}积分</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">
@ -19,9 +24,8 @@
</view> </view>
<!-- <view class="iconfont icon-fenxiang" @click="listenerActionSheet"></view> --> <!-- <view class="iconfont icon-fenxiang" @click="listenerActionSheet"></view> -->
</view> </view>
<view class="introduce">{{ storeInfo.storeName }}</view>
<view class="label acea-row row-between-wrapper"> <view class="label acea-row row-between-wrapper">
<text v-if="!isIntegral">原价:{{ storeInfo.otPrice }}</text> <!-- <text class="old-price" v-if="!isIntegral">原价:{{ storeInfo.otPrice }}</text> -->
<text>库存:{{ storeInfo.stock }}{{ storeInfo.unitName }}</text> <text>库存:{{ storeInfo.stock }}{{ storeInfo.unitName }}</text>
<text>销量:{{ storeInfo.sales }}{{ storeInfo.unitName }}</text> <text>销量:{{ storeInfo.sales }}{{ storeInfo.unitName }}</text>
</view> </view>
@ -138,25 +142,29 @@
</view> --> </view> -->
<!-- #endif --> <!-- #endif -->
<view class="item acea-row row-column row-center-wrapper" @click="goHome"> <view class="item acea-row row-column row-center-wrapper" @click="goHome">
<view class="iconfont icon-shouye-xianxing"></view> <view class="acea-row row-column row-center-wrapper">
<image src="../../../static/icon-home.png"></image>
</view>
<text>首页</text> <text>首页</text>
</view> </view>
<view class="item acea-row row-column row-center-wrapper" @click="setCollect" v-if="storeInfo.userCollect"> <!-- <view class="item acea-row row-column row-center-wrapper" @click="setCollect" v-if="storeInfo.userCollect">
<view class="iconfont icon-shoucang1"></view> <view class="iconfont icon-shoucang1"></view>
<text>收藏</text> <text>收藏</text>
</view> </view> -->
<!-- <view class="item" @click="setCollect" v-if="!storeInfo.userCollect"> <!-- <view class="item" @click="setCollect" v-if="!storeInfo.userCollect">
<view class="iconfont icon-shoucang"></view> <view class="iconfont icon-shoucang"></view>
<text>收藏</text> <text>收藏</text>
</view> --> </view> -->
<view @click="goShoppingCart()" v-if="animated" class="item animated bounceIn"> <view @click="goShoppingCart()" v-if="animated" class="item animated bounceIn">
<view class="iconfont icon-gouwuche1"> <view class="acea-row row-column row-center-wrapper">
<image src="../../../static/gwd.png"></image>
<text class="num bg-color-red" v-if="CartCount > 0">{{ CartCount }}</text> <text class="num bg-color-red" v-if="CartCount > 0">{{ CartCount }}</text>
</view> </view>
<text>购物车</text> <text>购物车</text>
</view> </view>
<view @click="goShoppingCart()" class="item animated" v-if="!animated"> <view @click="goShoppingCart()" class="item animated" v-if="!animated">
<view class="iconfont icon-gouwuche1"> <view class="acea-row row-column row-center-wrapper">
<image src="../../../static/gwd.png"></image>
<text class="num bg-color-red" v-if="CartCount > 0">{{ CartCount }}</text> <text class="num bg-color-red" v-if="CartCount > 0">{{ CartCount }}</text>
</view> </view>
<text>购物车</text> <text>购物车</text>
@ -777,10 +785,105 @@ export default {
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.kefu-box{
width: 80rpx;
height: 80rpx;
position: fixed;
top: 50%;
right: 30rpx;
background: #fff;
border-radius: 50%;
padding: 16rpx;
button{
width: 100%;
height: 100%;
opacity: 0;
position: absolute;
top: 0;
left: 0;
z-index: 2;
}
image{
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
}
.product-con{ .product-con{
padding-bottom: 160rpx; padding-bottom: 230rpx;
.wrapper{
width: 710rpx;
padding: 20rpx;
border-radius: 20rpx;
margin: 20rpx auto;
.introduce{
font-size: 36rpx;
color: #222;
}
.share{
padding: 0;
}
.money{
color: #E5270F;
font-size: 32rpx;
.num{
color: #E5270F;
font-size: 56rpx;
}
.old-price{
font-size: 28rpx;
color: #999999;
text-decoration: line-through;
}
.jifen{
color: #E5270F;
font-size: 42rpx;
}
}
}
.attribute{
width: 710rpx;
margin: 20rpx auto;
border-radius: 20rpx;
}
.footer{ .footer{
height: 160rpx; height: 200rpx;
.item{
font-size: 26rpx;
color: #414141;
image{
width: 50rpx;
height: 50rpx;
}
}
.bnt{
width: auto;
height: 100rpx;
font-size: 32rpx;
.joinCart{
width: 216rpx;
height: 100rpx;
background: #222222;
border-radius: 50rpx;
text-align: center;
line-height: 100rpx;
color: #fff;
margin-right: 20rpx;
transform: scale(.9);
}
.buy{
width: 216rpx;
height: 100rpx;
background: linear-gradient(147deg, #FFE0AC 0%, #F5BF5F 100%);
border-radius: 50px;
text-align: center;
line-height: 100rpx;
color: #322E27;
transform: scale(.9);
}
}
} }
} }
.geoPage { .geoPage {
@ -952,6 +1055,18 @@ export default {
.product-con .product-intro .conter view { .product-con .product-intro .conter view {
width: 100% !important; width: 100% !important;
} }
.product-con .product-intro{
.title {
color: #000000;
font-size: 32rpx;
margin: 20rpx auto;
align-items: center;
&::after{
background: #000;
}
}
}
.generate-posters { .generate-posters {
width: 100%; width: 100%;

2
pages/study/dabang.vue

@ -83,9 +83,7 @@
<view class="rank-img" v-if="index == 0"><image src="../../static/num1.png" mode=""></image></view> <view class="rank-img" v-if="index == 0"><image src="../../static/num1.png" mode=""></image></view>
<view class="rank-img" v-if="index == 1"><image src="../../static/num2.png" mode=""></image></view> <view class="rank-img" v-if="index == 1"><image src="../../static/num2.png" mode=""></image></view>
<view class="rank-img" v-if="index == 2"><image src="../../static/num3.png" mode=""></image></view> <view class="rank-img" v-if="index == 2"><image src="../../static/num3.png" mode=""></image></view>
<view class="ranking" v-if="index > 2">{{index+1}}</view> <view class="ranking" v-if="index > 2">{{index+1}}</view>
<view class="header-img"><image :src="item.headImg" mode=""></image></view> <view class="header-img"><image :src="item.headImg" mode=""></image></view>
<view class="name line1">{{item.realName}}</view> <view class="name line1">{{item.realName}}</view>
</view> </view>

2
pages/study/detail.vue

@ -93,6 +93,7 @@
import { getStudyDetail , enterStudyList } from '@/api/knowledge'; import { getStudyDetail , enterStudyList } from '@/api/knowledge';
import { mapState, mapGetters, mapMutations, mapActions } from 'vuex' import { mapState, mapGetters, mapMutations, mapActions } from 'vuex'
import { getUserInfo, bindingPhone, wxappBindingPhone } from '@/api/user' import { getUserInfo, bindingPhone, wxappBindingPhone } from '@/api/user'
import dayjs from 'dayjs'
export default { export default {
computed: mapGetters(['userInfo']), computed: mapGetters(['userInfo']),
data() { data() {
@ -135,6 +136,7 @@
}) })
.then(res => { .then(res => {
if(res.success){ if(res.success){
thit.$store.commit('login', res.data.token, dayjs(res.data.expires_time))
thit.$store.dispatch('userInfo', true) thit.$store.dispatch('userInfo', true)
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({

298
pages/user/User/index.vue

@ -2,13 +2,13 @@
<view class="user"> <view class="user">
<view v-if="$store.getters.token || userInfo.uid" class="content"> <view v-if="$store.getters.token || userInfo.uid" class="content">
<view class="header acea-row row-between-wrapper"> <view class="header acea-row row-between-wrapper">
<image src="../../../static/user-index-bg.png" mode="" class="header-bg"></image> <!-- <image src="../../../static/user-index-bg.png" mode="" class="header-bg"></image> -->
<view class="picTxt acea-row row-between-wrapper"> <view class="picTxt acea-row row-between-wrapper">
<view class="pictrue"> <view class="pictrue">
<image :src="userInfo.avatar" /> <image :src="userInfo.avatar" />
</view> </view>
<view class="text"> <view class="text">
<view class="acea-row row-middle"> <view class="name-box acea-row row-middle">
<view class="name line1">{{ userInfo.nickname }}</view> <view class="name line1">{{ userInfo.nickname }}</view>
<view class="member acea-row row-middle"> <view class="member acea-row row-middle">
<!-- <image :src="userInfo.vipIcon" /> --> <!-- <image :src="userInfo.vipIcon" /> -->
@ -32,11 +32,14 @@
<!-- #endif --> <!-- #endif -->
</view> </view>
</view> </view>
<view class="jifen-box" @click="goIntegral">积分{{userInfo.integral}}</view> <view class="jifen-box" @click="goIntegral">
<image src="../../../static/jifen-icon.png"></image>
<text>点击签到</text>
</view>
<!-- <view class="jifen-box" @click="goIntegral">积分{{userInfo.integral}}</view> -->
<!-- <text class="iconfont icon-shezhi" @click="goPersonalData()"></text> --> <!-- <text class="iconfont icon-shezhi" @click="goPersonalData()"></text> -->
</view> </view>
<view class="teacher-box acea-row-nowrap row-between row-middle"> <!-- <view class="teacher-box acea-row-nowrap row-between row-middle">
<view class="teacher-box-r acea-row row-between row-middle" v-if="userInfo.isPromoter == 0"> <view class="teacher-box-r acea-row row-between row-middle" v-if="userInfo.isPromoter == 0">
<image :src="userInfo.workPhoto" v-if="userInfo.workPhoto"></image> <image :src="userInfo.workPhoto" v-if="userInfo.workPhoto"></image>
<image src="../../../static/default-headerimg.png" v-else></image> <image src="../../../static/default-headerimg.png" v-else></image>
@ -46,12 +49,45 @@
<image src="../../../static/call-icon.png" class="call-icon" @click="call"></image> <image src="../../../static/call-icon.png" class="call-icon" @click="call"></image>
</view> </view>
<view class="" style="color: #fff;" v-else @click="toServiceIndex()">服务老师主页</view> <view class="" style="color: #fff;" v-else @click="toServiceIndex()">服务老师主页</view>
</view> -->
<view class="panel-box">
<image src="https://download.cyjyyjy.com/course-bg.png" class="panel-bg"></image>
<view class="panel-content acea-row row-between">
<view class="profit-box">
<view class="mt20">
<view>今日收益</view>
<view class="fz40">{{userInfo.todayBrokerage || 0}}积分</view>
</view>
<view class="">
<view>累计收益</view>
<view class="fz40">{{userInfo.brokeragePrice || 0}}积分</view>
</view>
<view class="panel-btn" @click="toCashOut">去提现</view>
</view>
<!-- <view class="col-line"></view> -->
<view class="sale-box">
<view class="mt20">
<view>推广人数</view>
<view class="fz40">{{userInfo.spreadCount || 0}}</view>
</view>
<view class="">
<view>今日收益</view>
<view class="fz40">{{userInfo.todaySpreadNum || 0}}</view>
</view>
<view class="panel-btn" @click="toMyTeam">我的团队</view>
</view>
<!-- <view class="to-more-box">
<image src="../../images/jifen-icon.png" class="jifen-icon"></image>
<view class="col-text">积分详情</view>
<image src="../../images/arror-d.png" class="arror-r-icon"></image>
</view> -->
</view>
</view> </view>
<view class="myjoin-box" <view class="myjoin-box" v-if="userInfo.memberStudyVo.courseDtos.length > 0 || userInfo.memberStudyVo.studyListDtos.length > 0">
v-if="(memberStudyVo.courseDtos && memberStudyVo.courseDtos.length > 0) || (memberStudyVo.studyListDtos && memberStudyVo.studyListDtos.length > 0)">
<view class="t-word">我参与的</view> <view class="t-word">我参与的</view>
<scroll-view class="scroll-view_H" scroll-x="true"> <scroll-view class="scroll-view_H" scroll-x="true" v-if="userInfo.memberStudyVo.courseDtos && userInfo.memberStudyVo.courseDtos.length > 0">
<view class="course-box" v-for="(item,index) in memberStudyVo.courseDtos" :key="index" <view class="course-box"
v-for="(item,index) in userInfo.memberStudyVo.courseDtos" :key="index"
@click="toCourseDetail(item.id)"> @click="toCourseDetail(item.id)">
<view class="course-info"> <view class="course-info">
<view class="course-name line2">{{item.courseName}}</view> <view class="course-name line2">{{item.courseName}}</view>
@ -64,7 +100,7 @@
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<view class="bangdan-box"> <view class="bangdan-box" v-if="userInfo.memberStudyVo.studyListDtos && userInfo.memberStudyVo.studyListDtos.length > 0">
<view class="bangdan-list"> <view class="bangdan-list">
<scroll-view class="scroll-view_H" scroll-x="true"> <scroll-view class="scroll-view_H" scroll-x="true">
<view class="bangdan-item" v-for="(item,index) in memberStudyVo.studyListDtos" :key="index" <view class="bangdan-item" v-for="(item,index) in memberStudyVo.studyListDtos" :key="index"
@ -81,24 +117,6 @@
</view> </view>
</view> </view>
<view class="wrapper"> <view class="wrapper">
<!-- <view class="nav acea-row row-middle">
<view @click="goUserAccount()" class="item">
<text>我的余额</text>
<text class="num">{{ userInfo.nowMoney || 0 }}</text>
</view>
<view @click="goUserPromotion()" class="item" v-if="userInfo.isPromoter === 1 || userInfo.statu === 2">
<text>当前佣金</text>
<text class="num">{{ userInfo.brokeragePrice || 0 }}</text>
</view>
<view @click="goIntegral()" class="item" v-else>
<text>当前积分</text>
<text class="num">{{ userInfo.integral || 0 }}</text>
</view>
<view @click="goUserCoupon()" class="item">
<text>优惠券</text>
<text class="num">{{ userInfo.couponCount || 0 }}</text>
</view>
</view> -->
<view class="myOrder"> <view class="myOrder">
<view class="title acea-row row-between-wrapper"> <view class="title acea-row row-between-wrapper">
<text>我的订单</text> <text>我的订单</text>
@ -110,7 +128,6 @@
<view class="orderState acea-row row-middle"> <view class="orderState acea-row row-middle">
<view @click="goMyOrder(0)" class="item"> <view @click="goMyOrder(0)" class="item">
<view class="pictrue"> <view class="pictrue">
<!-- <image :src="`${$VUE_APP_RESOURCES_URL}/images/dfk.png`" /> -->
<image src="../../../static/myorder-icon1.png" /> <image src="../../../static/myorder-icon1.png" />
<text class="order-status-num" v-if="userInfo.orderStatusNum.unpaidCount > 0"> <text class="order-status-num" v-if="userInfo.orderStatusNum.unpaidCount > 0">
{{ userInfo.orderStatusNum.unpaidCount }} {{ userInfo.orderStatusNum.unpaidCount }}
@ -192,13 +209,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 noBorder" @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>
<view class="cell">我是服务老师</view> <view class="cell">我是服务老师</view>
<text class="iconfont icon-jiantou"></text> <text class="iconfont icon-jiantou"></text>
</view> </view> -->
<!-- <template v-for="(item, MyMenusIndex) in MyMenus"> <!-- <template v-for="(item, MyMenusIndex) in MyMenus">
<view class="item" :key="MyMenusIndex" @click="goPages(MyMenusIndex)"> <view class="item" :key="MyMenusIndex" @click="goPages(MyMenusIndex)">
<view class="pictrue"> <view class="pictrue">
@ -389,6 +406,12 @@
goPersonalData() { goPersonalData() {
this.$yrouter.push('/pages/user/PersonalData/index') this.$yrouter.push('/pages/user/PersonalData/index')
}, },
toMyTeam(){
this.$yrouter.push('/pages/user/myTeam/index')
},
toCashOut(){
this.$yrouter.push('/pages/user/cashOut/index')
},
getPhoneNumber: function(e) { getPhoneNumber: function(e) {
bindPhoneNumber(e).then((res) => { bindPhoneNumber(e).then((res) => {
if (res.success) { if (res.success) {
@ -491,12 +514,13 @@
</script> </script>
<style lang="less"> <style lang="less">
page{
background: #fff;
}
.header{ .header{
width: 100%; width: 100%;
height: 336rpx !important;
padding: 0 !important; padding: 0 !important;
position: relative !important; position: relative !important;
.header-bg{ .header-bg{
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -504,105 +528,141 @@
top: 0; top: 0;
z-index: 2; z-index: 2;
} }
.picTxt{ .picTxt{
position: absolute !important; position: absolute !important;
left: 32rpx; left: 32rpx;
z-index: 3; z-index: 3;
.text { .text {
width: 390rpx;
.id{
color: #222 !important;
}
.name { .name {
font-size: 36rpx; font-size: 36rpx;
max-width: 260rpx; width: 100%;
color: #A8873D; color: #222;
font-weight: bold;
}
.member{
max-width: 120rpx;
padding: 0 6rpx;
background: linear-gradient(180deg, #FFCF61 0%, #FCA333 100%);
} }
} }
.binding{ .binding{
background: #BF922B !important; background: #BF922B !important;
border-color: #BF922B !important; border-color: #BF922B !important;
} }
} }
.jifen-box{ .jifen-box{
width: 200rpx; width: 176rpx;
height: 62rpx; height: 50rpx;
background: #BF922B; background: #FF4444;
border-radius: 30rpx; border-top-left-radius: 20rpx;
text-align: center; border-bottom-left-radius: 20rpx;
line-height: 62rpx;
position: absolute; position: absolute;
right: 30rpx; right: 0rpx;
top: 30rpx; top: 50%;
margin-top: -25rpx;
z-index: 4; z-index: 4;
color: #fff; color: #fff;
font-size: 28rpx; font-size: 24rpx;
display: flex;
align-items: center;
justify-content: center;
image{
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
}
} }
} }
.teacher-box { .panel-box{
width: 690rpx; width: 100%;
height: 112rpx; height: 376rpx;
padding-left: 28rpx;
padding-right: 40rpx;
background: linear-gradient(180deg, #332810 0%, #4E4229 100%);
border-radius: 10rpx;
position: relative; position: relative;
margin-top: 32rpx;
.panel-bg{
width: 688rpx;
height: 376rpx;
position: absolute;
left: 50%; left: 50%;
top: -56rpx; top: 0;
margin-left: -345rpx; margin-left: -344rpx;
z-index: 7; }
.panel-content{
.teacher-box-l { width: 688rpx;
color: #FFFADD; height: 376rpx;
position: absolute;
left: 50%;
top: 0;
margin-left: -344rpx;
font-size: 28rpx; font-size: 28rpx;
color: #C89560;
.call-icon { padding: 32rpx 0;
width: 56rpx;
height: 56rpx;
} }
.panel-btn{
text { width: 167rpx;
display: inline-block; height: 54rpx;
margin-left: 20rpx; background: linear-gradient(180deg, #FFCC5D 0%, #FCA535 100%);
margin-right: 14rpx; border-radius: 12rpx;
text-align: center;
line-height: 54rpx;
color: #fff;
font-size: 26rpx;
margin: 20rpx auto;
} }
.profit-box,.sale-box{
.vertical-line { width: 312rpx;
text-align: center;
}
.fz40{
font-size: 32rpx;
}
.mt20{
margin: 20rpx 0;
}
.col-line{
width: 2rpx; width: 2rpx;
height: 34rpx; height: 100%;
background: #FFFADD; background: #fff;
} }
.to-more-box{
width: 100rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
} }
.jifen-icon{
.teacher-box-r { width: 37rpx;
color: #F9EDCC; height: 42rpx;
font-size: 24rpx; }
.col-text{
image { width: 30rpx;
width: 88rpx; margin: 4rpx 0;
height: 88rpx;
border: 1px solid #fff;
border-radius: 25px;
margin-right: 30rpx;
} }
.arror-r-icon{
width: 28rpx;
height: 16rpx;
} }
} }
.myjoin-box{ .myjoin-box{
width: 690rpx; width: 100%;
// height: 506rpx; // height: 506rpx;
background: #FFFFFF; background: #FFFFFF;
border-radius: 10rpx; border-radius: 10rpx;
padding: 30rpx; padding: 32rpx;
margin: -26rpx auto 0; margin: 50rpx auto 0;
.t-word{ .t-word{
font-size: 32rpx; font-size: 32rpx;
color: #222; color: #222;
font-weight: bold;
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
.course-box{ .course-box{
width: 94%; width: 94%;
height: 190rpx; height: 190rpx;
@ -621,7 +681,6 @@
.course-info{ .course-info{
margin-bottom: 10rpx; margin-bottom: 10rpx;
.course-name{ .course-name{
width: 100%;
color: #C89560; color: #C89560;
font-size: 28rpx; font-size: 28rpx;
line-height: 40rpx; line-height: 40rpx;
@ -629,12 +688,10 @@
font-weight: 500; font-weight: 500;
} }
} }
.address-box{ .address-box{
.address{ .address{
width: calc(100% - 190rpx); width: calc(100% - 190rpx);
} }
.btn{ .btn{
width: 172rpx; width: 172rpx;
height: 56rpx; height: 56rpx;
@ -647,36 +704,32 @@
} }
} }
} }
.scroll-view_H{ .scroll-view_H{
white-space: nowrap; white-space: nowrap;
width: 100%; width: 100%;
} }
.bangdan-box{ .bangdan-box{
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
.bangdan-item{ .bangdan-item{
width: 310rpx; width: 370rpx;
height: 152rpx; height: 222rpx;
background: url(../../../static/bangdanbg.png) no-repeat;
background-size: 100% 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 20rpx; padding: 42rpx 30rpx;
color: #fff; color: #191919;
display: inline-block; display: inline-block;
background: linear-gradient(143deg, #FDAF97 0%, #ED5E48 100%);
border-radius: 10rpx; border-radius: 10rpx;
font-size: 28rpx; font-size: 28rpx;
margin-right: 20rpx; margin-right: 20rpx;
.bangdan-name{ .bangdan-name{
margin-bottom: 28rpx; margin-bottom: 46rpx;
font-weight: bold;
} }
.signin-day{ .signin-day{
font-size: 24rpx; font-size: 24rpx;
} }
.signin-btn{ .signin-btn{
width: 122rpx; width: 122rpx;
height: 48rpx; height: 48rpx;
@ -685,20 +738,45 @@
border-radius: 8rpx; border-radius: 8rpx;
text-align: center; text-align: center;
line-height: 48rpx; line-height: 48rpx;
color: #C71A00; color: #fff;
font-size: 24rpx; font-size: 24rpx;
} }
} }
} }
} }
.content{ .content{
padding-bottom: 100rpx; padding-bottom: 100rpx;
} }
.user .wrapper { .user .wrapper {
background: #F5F6F7; width: 100%;
background: #fff;
padding: 0 30rpx; padding: 0 30rpx;
.myOrder{
width: 100%;
.title{
padding: 0 !important;
font-size: 32rpx;
color: #222;
font-weight: bold;
}
}
.serviceList{
padding: 20rpx 0 !important;
.item{
.pictrue{
width: 70rpx !important;
height: 70rpx !important;
image{
width: 70rpx !important;
height: 70rpx !important;
}
}
&:last-child{
border: none !important;
}
}
}
} }
.footer-line-height { .footer-line-height {
@ -736,11 +814,9 @@
border: 1px solid #e8695e; border: 1px solid #e8695e;
color: #ffffff; color: #ffffff;
} }
.noBorder{ .noBorder{
border: none !important; border: none !important;
} }
.by { .by {
text-align: center; text-align: center;
padding: 30rpx 0; padding: 30rpx 0;

108
pages/user/bindCard/index.vue

@ -0,0 +1,108 @@
<template>
<view class="bindcard-page">
<view class="form">
<view class="form-item">
<view class="label">持卡人</view>
<input type="text" v-model="form.name" placeholder="请输入持卡人姓名" />
</view>
<view class="form-item">
<view class="label">银行卡号</view>
<input type="text" v-model="form.card" placeholder="请输入银行卡号" />
</view>
<view class="form-item">
<view class="label">开户行</view>
<input type="text" v-model="form.bank" placeholder="请输入开户行" />
</view>
</view>
<view class="submit" @click="submit">确定</view>
</view>
</template>
<script>
import { bingCard } from '@/api/user.js'
export default {
data() {
return {
form: {
name: '',
card: '',
bank: ''
}
}
},
methods: {
submit(){
if(this.form.name == '' ){
return this.alertMessage('请输入持卡人姓名')
} else if(this.form.card == ''){
return this.alertMessage('请输入银行卡号')
} else if(this.form.bank == ''){
return this.alertMessage('请输入开户行')
}
bingCard({
bankName: this.form.bank,
cardNumber: this.form.card,
cardholderName: this.form.name
}).then((res)=>{
uni.showToast({
title: '绑定成功!',
})
setTimeout(()=>{
uni.navigateBack({
delta: 1,
})
},1500)
})
},
alertMessage(msg){
uni.showToast({
title: msg,
icon: 'none'
})
}
}
}
</script>
<style>
page{
width: 100%;
height: 100%;
background: #F8F8F8;
}
.bindcard-page{
width: 100%;
padding: 32rpx 38rpx;
}
.form{
width: 100%;
background: #fff;
border-radius: 18rpx;
}
.form-item{
width: 100%;
height: 100rpx;
padding: 0 36rpx;
font-size: 34rpx;
color: #000;
display: flex;
align-items: center;
justify-content: space-between;
border: 2rpx solid #F5F5F5;
}
.form-item input{
text-align: right;
font-size: 32rpx;
}
.submit{
width: 440rpx;
height: 88rpx;
background: #F7C37A;
border-radius: 44rpx;
text-align: center;
line-height: 88rpx;
font-size: 46rpx;
color: #fff;
margin: 60rpx auto;
}
</style>

167
pages/user/cashOut/index.vue

@ -0,0 +1,167 @@
<template>
<view class="cashout-page">
<view class="profit-box">
<image src="../../../static/profit.png" class="profit-bg"></image>
<view class="profit-info">
<view>当前可提现积分<text class="s-word">积分比例为1:1</text></view>
<view class="fz70">{{userInfo.brokeragePrice || 0}}</view>
</view>
</view>
<view class="tips">提现需在每月20-26日进行其他时间不可提现</view>
<view class="handle-box">
<view class="tit">提现金额</view>
<view class="inp-box acea-row row-between row-middle">
<text class="fz50"></text>
<input type="text" v-model="cashNum" placeholder="最低提现100积分" />
<view class="colO" @click="allCash">全部提现</view>
</view>
</view>
<view class="submit-btn" @click="cashClick">提现</view>
</view>
</template>
<script>
import { getUserInfo, cash } from '@/api/user.js'
import cookie from '@/utils/store/cookie'
export default {
data() {
return {
cashNum: '',
userInfo: {},
}
},
mounted() {
getUserInfo().then((res)=>{
this.userInfo = res.data
})
},
methods: {
allCash(){
this.cashNum = this.userInfo.brokeragePrice
},
cashClick(){
if(this.userInfo.userBank){
if(this.cashNum == '' || Number(this.cashNum) <= 100 || Number(this.cashNum) > this.userInfo.brokeragePrice){
return this.alertMessage('请输入正确的积分')
}
cash({
extractType: 'bank',
money: this.cashNum
}).then((res)=>{
uni.showToast({
title: '申请提现成功',
})
setTimeout(()=>{
uni.navigateBack({
delta: 1,
})
},1500)
})
} else{
uni.showModal({
title: '提示!',
content: '您还未绑定银行卡,点击确定按钮立即绑定。',
success: (res)=> {
if(res.confirm){
this.$yrouter.push({
path: '/pages/user/bindCard/index'
})
}
}
})
}
},
alertMessage(msg){
uni.showToast({
title: msg,
icon: 'none'
})
}
}
}
</script>
<style>
/* pages/user/cashOut/index.wxss */
.cashout-page{
width: 100%;
min-height: 100vh;
padding: 40rpx;
background: #F8F8F8;
}
.profit-box{
width: 100%;
height: 256rpx;
position: relative;
margin-top: 20rpx;
}
.profit-box image{
width: 100%;
height: 256rpx;
position: absolute;
top: 0;
}
.profit-info{
width: 100%;
height: 100%;
position: absolute;
top: 0;
z-index: 3;
padding: 48rpx 94rpx 0 36rpx;
color: #fff;
font-weight: 500;
}
.s-word{
font-size: 22rpx;
}
.fz70{
font-size: 70rpx;
font-weight: 500;
line-height: 98rpx;
}
.tips{
font-size: 20rpx;
color:#FF3434;
margin: 62rpx 0 20rpx;
font-weight: 600;
}
.handle-box{
background: #fff;
border-radius: 18rpx;
font-size: 28rpx;
}
.handle-box .tit{
width: 100%;
height: 98rpx;
line-height: 98rpx;
text-indent: 2em;
border-bottom: 2rpx solid #F5F5F5;
font-size: 28rpx;
}
.inp-box{
width: 100%;
padding: 0 32rpx;
height: 108rpx;
}
.inp-box input{
margin-left: -100rpx;
}
.fz50{
font-size: 50rpx;
}
.colO{
color: #F68514;
}
.submit-btn{
width: 440rpx;
height: 88rpx;
background: #F7C37A;
border-radius: 44rpx;
text-align: center;
line-height: 88rpx;
font-size: 42rpx;
color: #FFFFFF;
margin: 110rpx auto 0;
}
</style>

114
pages/user/myTeam/index.vue

@ -0,0 +1,114 @@
<template>
<view class="index-page">
<view class="data-panel-box acea-row row-between">
<view>
<view>今日新增</view>
<view class="fz40">{{teamInfo.todayNum}}</view>
</view>
<view>
<view>一级</view>
<view class="fz40">{{teamInfo.firstNum}}</view>
</view>
<view>
<view>二级</view>
<view class="fz40">{{teamInfo.secondNum}}</view>
</view>
</view>
<view class="t-header acea-row row-middle row-between">
<view class="h-item">成员名称</view>
<view class="h-item w180">一级积分收益</view>
<view class="h-item w180">二级积分收益</view>
</view>
<view class="t-body">
<view class="b-item acea-row row-middle row-between" v-for="(item,index) in teamInfo.teamList" wx:key="index">
<view class="name">{{item.name}}</view>
<view class="name w180">{{item.firstNum}}积分</view>
<view class="name w180">{{item.secondNum}}积分</view>
</view>
</view>
<view class="loading-status">{{loadingStatus}}</view>
</view>
</template>
<script>
import { getMyTeam } from '@/api/user.js'
import cookie from '@/utils/store/cookie'
export default {
data() {
return {
userInfo: {},
teamInfo: {},
loadingStatus: '没有更多了。。。'
}
},
mounted() {
this.userInfo = cookie.get('userInfo')
this.getTeam()
},
onPullDownRefresh: function () {
this.getTeam()
},
methods: {
getTeam(){
getMyTeam().then((res)=>{
this.teamInfo = res.data
console.log(this.teamInfo)
uni.stopPullDownRefresh()
})
},
}
}
</script>
<style>
.index-page{
width: 100%;
min-height: 100vh;
background: #F8F8F8;
padding: 32rpx 38rpx;
}
.data-panel-box{
width: 100%;
padding: 38rpx 66rpx;
background: #FFD092;
border-radius: 24rpx;
color: #fff;
}
.data-panel-box view{
text-align: center;
}
.fz40{
font-size: 40rpx;
line-height: 56rpx;
}
.t-header{
width: 100%;
height: 48rpx;
border-radius: 16rpx;
color: #AF681B;
font-size: 28rpx;
background: #fff;
padding: 0 22rpx;
margin: 16rpx 0;
}
.b-item{
width: 100%;
padding: 22rpx;
background: #fff;
border-radius: 24rpx;
margin-bottom: 24rpx;
font-size: 28rpx;
color: #CC8E46;
}
.w180{
width: 180rpx;
text-align: center;
}
.loading-status{
text-align: center;
font-size: 28rpx;
color: #B9B9B9;
}
</style>

BIN
static/bangdanbg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
static/car-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 838 B

BIN
static/gwd.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
static/gwd.zip

Binary file not shown.

BIN
static/idx-icon1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
static/ji.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/jifen-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

BIN
static/kefu.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

BIN
static/myorder-icon1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1007 B

After

Width:  |  Height:  |  Size: 560 B

BIN
static/myorder-icon2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 565 B

BIN
static/myorder-icon3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 852 B

BIN
static/myorder-icon4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 912 B

After

Width:  |  Height:  |  Size: 990 B

BIN
static/myorder-icon5.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
static/profit.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
static/tit1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
static/tit2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
static/tit3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

BIN
static/tit4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

BIN
static/tit5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
static/tit6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
static/uni.ttf

Binary file not shown.

BIN
static/user-index-bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

BIN
static/user-menu1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
static/user-menu2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
static/user-menu3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
static/user-menu4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
static/user-menu5.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
static/user-menu6.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

BIN
static/yi.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

108
utils/index.js

@ -2,13 +2,23 @@ import Vue from 'vue'
// import MpvueRouterPatch from 'mpvue-router-patch' // import MpvueRouterPatch from 'mpvue-router-patch'
// Vue.use(MpvueRouterPatch) // Vue.use(MpvueRouterPatch)
import { wxappAuth, getUserInfo, wxappBindingPhone } from '@/api/user' import {
wxappAuth,
getUserInfo
} from '@/api/user'
import store from '@/store' import store from '@/store'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import cookie from '@/utils/store/cookie' import cookie from '@/utils/store/cookie'
import stringify from '@/utils/querystring' import stringify from '@/utils/querystring'
import { VUE_APP_API_URL } from '@/config' import {
import { wechat, auth, oAuth, toAuth } from '@/libs/wechat' VUE_APP_API_URL
} from '@/config'
import {
wechat,
auth,
oAuth,
toAuth
} from '@/libs/wechat'
export function dataFormat(time, option) { export function dataFormat(time, option) {
time = +time * 1000 time = +time * 1000
@ -29,7 +39,8 @@ export function dataFormat(time, option) {
if (option) { if (option) {
// return parseTime(time, option); // return parseTime(time, option);
} else { } else {
let timeStr = d.getFullYear() + '年' + (d.getMonth() + 1) + '月' + d.getDate() + '日' + d.getHours() + '时' + d.getMinutes() + '分' let timeStr = d.getFullYear() + '年' + (d.getMonth() + 1) + '月' + d.getDate() + '日' + d.getHours() + '时' + d.getMinutes() +
'分'
return timeStr return timeStr
} }
} }
@ -191,7 +202,9 @@ export const login = loginInfo => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (Vue.prototype.$deviceType == 'weixin') { if (Vue.prototype.$deviceType == 'weixin') {
// 微信授权登录 // 微信授权登录
const { code } = parseQuery() const {
code
} = parseQuery()
if (code) { if (code) {
auth(code) auth(code)
.then(() => { .then(() => {
@ -218,8 +231,7 @@ export const login = loginInfo => {
path: '/pages/home/index', path: '/pages/home/index',
}) })
}) })
} else { } else {}
}
return return
} }
if (Vue.prototype.$deviceType == 'weixinh5') { if (Vue.prototype.$deviceType == 'weixinh5') {
@ -268,7 +280,9 @@ export const login = loginInfo => {
code: code, code: code,
spread: cookie.get('spread'), spread: cookie.get('spread'),
}) })
.then(({ data }) => { .then(({
data
}) => {
console.log('登录接口调用成功') console.log('登录接口调用成功')
console.log('开始处理登录信息保存,并获取用户详情') console.log('开始处理登录信息保存,并获取用户详情')
uni.hideLoading() uni.hideLoading()
@ -308,7 +322,9 @@ export const login = loginInfo => {
code: code, code: code,
spread: cookie.get('spread'), spread: cookie.get('spread'),
}) })
.then(({ data }) => { .then(({
data
}) => {
console.log('登录接口调用成功') console.log('登录接口调用成功')
console.log('开始处理登录信息保存,并获取用户详情') console.log('开始处理登录信息保存,并获取用户详情')
uni.hideLoading() uni.hideLoading()
@ -446,7 +462,10 @@ export const handleGetUserInfo = () => {
export function parseUrl(location) { export function parseUrl(location) {
if (typeof location === 'string') return location if (typeof location === 'string') return location
const { path, query } = location const {
path,
query
} = location
const queryStr = stringify(query) const queryStr = stringify(query)
@ -490,8 +509,7 @@ export function handleAuth() {
export const handleLoginStatus = (location, complete, fail, success) => { export const handleLoginStatus = (location, complete, fail, success) => {
// 不登录可访问的页面 // 不登录可访问的页面
let page = [ let page = [{
{
path: '/pages/Loading/index', path: '/pages/Loading/index',
name: 'loading页面', name: 'loading页面',
}, },
@ -1036,7 +1054,10 @@ export function chooseImage(callback) {
src: res.tempFilePaths[0], src: res.tempFilePaths[0],
success: image => { success: image => {
console.log(image) console.log(image)
uni.showLoading({ title: '图片上传中', mask: true }) uni.showLoading({
title: '图片上传中',
mask: true
})
uni.uploadFile({ uni.uploadFile({
url: `${VUE_APP_API_URL}/api/upload`, url: `${VUE_APP_API_URL}/api/upload`,
file: image, file: image,
@ -1047,7 +1068,7 @@ export function chooseImage(callback) {
name: 'file', name: 'file',
success: res => { success: res => {
if (callback) { if (callback) {
callback(JSON.parse(res.data).data.link) callback(JSON.parse(res.data).link)
} }
}, },
fail: err => { fail: err => {
@ -1083,7 +1104,10 @@ export function chooseImages(callback) {
uni.getImageInfo({ uni.getImageInfo({
src: tempFilePaths[i], src: tempFilePaths[i],
success: image => { success: image => {
uni.showLoading({ title: '图片上传中', mask: true }) uni.showLoading({
title: '图片上传中',
mask: true
})
uni.uploadFile({ uni.uploadFile({
url: `${VUE_APP_API_URL}/api/upload`, url: `${VUE_APP_API_URL}/api/upload`,
file: image, file: image,
@ -1094,8 +1118,7 @@ export function chooseImages(callback) {
name: 'file', name: 'file',
success: res => { success: res => {
if (callback) { if (callback) {
console.log(JSON.parse(res.data),'res.data') callback(JSON.parse(res.data).link)
callback(JSON.parse(res.data).data.link)
} }
}, },
fail: err => { fail: err => {
@ -1132,54 +1155,3 @@ export function handleErrorMessage(err) {
duration: 2000, duration: 2000,
}) })
} }
// 微信小程序绑定手机号
export function bindPhoneNumber(e){
return new Promise((resolve) =>{
// 判断一下这里是不是小程序 如果是小程序,走获取微信手机号进行绑定
if (e.mp.detail.errMsg == 'getPhoneNumber:ok') {
uni.showLoading({ title: '绑定中...', })
uni.login({
provider: 'weixin',
success: function (loginRes) {
wxappBindingPhone({
encryptedData: e.mp.detail.encryptedData,
iv: e.mp.detail.iv,
code: loginRes.code
}).then(res => {
resolve(res)
if(res.success){
store.dispatch('userInfo', true)
uni.hideLoading()
} else{
uni.hideLoading()
uni.showModal({
title:'提示!',
content:'授权已过期,请重新授权后绑定手机号',
success:function(res){
if(res.confirm){
store.commit('logout')
}
},
})
}
}).catch(error => {
uni.hideLoading()
store.dispatch('userInfo', true)
uni.showToast({
title: error.msg || error.response.data.msg || error.response.data.message,
icon: 'none',
duration: 2000,
})
})
}
});
} else {
uni.showToast({
title: '不在微信小程序',
icon: 'none',
duration: 2000,
})
}
})
}

4
utils/request.js

@ -62,9 +62,9 @@ function baseRequest(options) {
// 如果接口需要登录,携带 token 去请求 // 如果接口需要登录,携带 token 去请求
options.headers = { options.headers = {
version: "2.0",
...options.headers, ...options.headers,
version: '2.0', dept: '2',
dept: 2
} }
if (options.login === true) { if (options.login === true) {

Loading…
Cancel
Save