学习中心

feature/v-xuexi
wangdong 11 months ago
parent 07758efb34
commit b8bd350f4e
  1. 42
      pages.json
  2. 6
      pages/forgotPwd/index.vue
  3. 6
      pages/index/index.vue
  4. 136
      pages/learningCenter/recite.vue
  5. 185
      pages/learningCenter/reciteContent.vue
  6. 238
      pages/learningCenter/reciteDetail.vue
  7. 6
      pages/mine/index.vue
  8. 10
      pages/my/about_us.vue
  9. 60
      pages/my/feedback.vue
  10. 115
      pages/my/helpCenter.vue
  11. 283
      pages/my/orgCooperation.vue
  12. 2
      pages/my/sign_in.vue
  13. 116
      pages/my/user_info.vue
  14. 2
      pages/special/details.vue
  15. 178
      pages/special/grade_list.vue
  16. 57
      pages/special/offline_apply.vue
  17. BIN
      static/images/learning/audio.png
  18. BIN
      static/images/learning/audio_active.png
  19. BIN
      static/images/learning/icon.png
  20. BIN
      static/images/learning/lock.png
  21. BIN
      static/images/learning/nolock.png
  22. BIN
      static/images/my/feedback.png

@ -392,12 +392,29 @@
"navigationBarTitleText": "我的关注"
}
},
{
"path": "invoiceList",
"style": {
"navigationBarTitleText": "开票申请"
}
},
{
"path": "orgCooperation",
"style": {
"navigationBarTitleText": "出国留学"
}
},
{
"path": "helpCenter",
"style": {
"navigationBarTitleText": "帮助与反馈"
}
},
{
"path": "feedback",
"style": {
"navigationBarTitleText": "帮助与反馈"
}
}
]
},
@ -429,6 +446,29 @@
}
]
},
{
"root": "pages/learningCenter",
"pages": [
{
"path": "recite",
"style": {
"navigationBarTitleText": "背诵过关"
}
},
{
"path": "reciteContent",
"style": {
"navigationBarTitleText": "内容列表"
}
},
{
"path": "reciteDetail",
"style": {
"navigationBarTitleText": "详情"
}
}
]
},
{
"root": "pages/live",
"pages": [

@ -69,7 +69,11 @@ export default {
commitPwdShow: false, //
};
},
onLoad() {},
onLoad(options) {
if (options.phone) {
this.phone = options.phone;
}
},
methods: {
//
async getCode() {

@ -985,9 +985,9 @@ page {
}
.goodsList .image {
width: 156rpx;
height: 184rpx;
margin-right: 52rpx;
width: 270rpx;
height: 160rpx;
margin-right: 24rpx;
flex-shrink: 0;;
}

@ -0,0 +1,136 @@
<template>
<BaseContainer class="recite">
<NavBar title="背诵过关" />
<view class="list">
<template v-if="list.length > 0">
<view v-for="(item, index) in list" class="list-item flex flex-center-x" @click="toContent">
<view class="item-left">
<view class="title">
<image src="@/static/images/learning/icon.png" mode="aspectFill"></image>
{{ item.name }}
</view>
<view class="content">
<view :style="{ borderColor: item.todayRecite ? '' : '#FFC067', color: item.todayRecite ? '': '#FFBF66' }">今日{{ item.todayRecite ? '已' : '未' }}背诵</view>
<view>词汇量{{ item.count }}</view>
</view>
</view>
<view class="item-right">
<view
v-if="item.type < 2"
class="status"
:style="{ background: item.type === 0 ? '#FFEDE9' : '#EFF8FE', color: item.type === 0 ? '#FF4B33': '#0F74BB' }">{{ item.type === 0 ? '免费' : '试看' }}</view>
<image v-if="item.type === 2" src="@/static/images/learning/nolock.png" mode="aspectFill"></image>
<image v-if="item.type === 3" src="@/static/images/learning/lock.png" mode="aspectFill"></image>
<view class="list-more"></view>
</view>
</view>
</template>
</view>
</BaseContainer>
</template>
<script>
export default {
data() {
return {
list: [ // 0 1 2 3
{ name: '大学英语四级词汇背诵', count: '1000', todayRecite: true, type: 0 },
{ name: '大学英语四级词汇背诵', count: '1000', todayRecite: false, type: 0 },
{ name: '大学英语四级词汇背诵', count: '1000', todayRecite: false, type: 1 },
{ name: '大学英语四级词汇背诵', count: '1000', todayRecite: false, type: 1 },
{ name: '大学英语四级词汇背诵', count: '1000', todayRecite: false, type: 2 },
{ name: '大学英语四级词汇背诵', count: '1000', todayRecite: false, type: 3 }
],
};
},
methods: {
toContent() {
uni.navigateTo({
url: '/pages/learningCenter/reciteContent',
});
},
},
};
</script>
<style lang="scss" scoped>
.recite {
background: #f6f6f6;
.list {
width: 690rpx;
margin: 20rpx 30rpx 0;
.list-item {
width: 100%;
height: 158rpx;
background: #fff;
border-radius: 8rpx;
box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(68,68,68,0.04);
align-items: center;
padding: 0 30rpx;
margin-bottom: 20rpx;
.item-left {
flex: 1;
.title {
color: #333;
font-size: 30rpx;
display: flex;
align-items: center;
image {
width: 44rpx;
height: 44rpx;
margin-right: 15rpx;
}
}
.content {
display: flex;
align-items: center;
margin-top: 20rpx;
>view {
font-size: 20rpx;
color: #666666;
&:first-child {
width: 112rpx;
height: 33rpx;
border-radius: 5rpx;
border: 1px solid #2DD092;
font-size: 20rpx;
color: #2DD092;
text-align: center;
line-height: 33rpx;
margin-right: 24rpx;
}
}
}
}
.item-right {
display: flex;
align-items: center;
.status {
width: 76rpx;
height: 39rpx;
background: #FFEDE9;
border-radius: 6rpx 0rpx 6rpx 0rpx;
text-align: center;
line-height: 39rpx;
font-size: 22rpx;
}
image {
width: 44rpx;
height: 44rpx;
}
.list-more {
width: 14rpx;
height: 14rpx;
border-width: 2px 2px 0 0;
border-color: #ccc;
border-style: solid;
-webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
vertical-align: top;
margin-left: 13rpx;
}
}
}
}
}
</style>

@ -0,0 +1,185 @@
<template>
<BaseContainer class="recite-content flex">
<NavBar title="内容列表" />
<view class="content-box">
<view class="content-info">
<view class="info-top flex">
<image src="@/static/images/learning/icon.png" mode="aspectFill"></image>
{{ info.name }}
<view class="change">修改</view>
</view>
<view class="info-center">
<view class="center-percent" :style="{ width: `${ info.hasRecite / info.count * 100 }%`}"></view>
</view>
<view class="info-bottom flex flex-center-x">
<view>已练习{{ info.hasRecite }}/{{ info.count }}</view>
<view>试看剩余{{ info.surplus }}</view>
</view>
</view>
<view class="list-content">
<template v-if="info.contentList.length > 0">
<view v-for="(item, index) in info.contentList" :key="index" class="list-box">
<view class="title flex flex-center-x">
{{ item.title }}
<image v-if="item.isLock" src="@/static/images/learning/lock.png" mode="aspectFill"></image>
<image v-else src="@/static/images/learning/nolock.png" mode="aspectFill"></image>
</view>
<view class="list">
<view v-for="(con, k) in item.list" class="list-item flex flex-center-x" @click="toDetail(con, item.isLock)">
<view class="item-name">{{ k + 1 < 10 ? `0${k+1}` : k }}.{{ con }}</view>
<view class="list-more"></view>
</view>
</view>
</view>
</template>
</view>
</view>
</BaseContainer>
</template>
<script>
export default {
data() {
return {
info: {
name: '大学英语四级词汇背诵',
count: 1000,
hasRecite: 120,
surplus: '00:12:12',
contentList: [
{
title: '第一章节',
isLock: false,
list: ['goods', 'administration', 'goods', 'administration', 'goods', 'administration']
},
{
title: '第二章节',
isLock: true,
list: ['goods', 'administration', 'goods', 'administration', 'goods', 'administration']
}
]
},
list: [],
};
},
methods: {
toDetail(con, isLock) {
console.log(isLock);
if (isLock) {
this.$util.showMsg('还未解锁');
} else {
uni.navigateTo({
url: '/pages/learningCenter/reciteDetail',
});
}
},
},
};
</script>
<style lang="scss" scoped>
.recite-content {
background: #f6f6f6;
flex-direction: column;
.content-box {
width: 690rpx;
margin: 20rpx 30rpx 0;
flex: 1;
.content-info {
height: 178rpx;
background: #FFFFFF;
box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(68,68,68,0.04);
border-radius: 8rpx;
padding: 27rpx 30rpx 0;
.info-top {
color: #333;
font-size: 30rpx;
display: flex;
align-items: center;
image {
width: 44rpx;
height: 44rpx;
margin-right: 14rpx;
}
.change {
width: 100rpx;
height: 36rpx;
background: #0F74BB;
border-radius: 18rpx;
display: flex;
align-items: center;
justify-content: center;
color: #FFFFFF;
font-size: 20rpx;
margin-left: auto;
line-height: 36rpx;
}
}
.info-center {
margin: 13rpx 0 18rpx;
height: 20rpx;
background: rgba(255, 149, 0, 0.1);
border-radius: 10rpx;
position: relative;
.center-percent {
background: #FF9500;
border-radius: 10rpx;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
}
.info-bottom {
justify-content: space-between;
color: #666;
font-size: 20rpx;
}
}
}
.list-content {
.list-box {
margin-top: 50rpx;
.title {
color: #333;
font-size: 30rpx;
justify-content: center;
margin-bottom: 25rpx;
image {
width: 44rpx;
height: 44rpx;
margin-left: 14rpx;
}
}
.list {
background: #FFFFFF;
box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(68,68,68,0.04);
border-radius: 8rpx;
padding: 0 30rpx;
.list-item {
height: 100rpx;
border-bottom: 2rpx solid #F6F6F6;
padding-left: 15rpx;
.list-more {
width: 14rpx;
height: 14rpx;
border-width: 2px 2px 0 0;
border-color: #ccc;
border-style: solid;
-webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
vertical-align: top;
margin-left: 13rpx;
}
.item-name {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
}
}
}
</style>

@ -0,0 +1,238 @@
<template>
<BaseContainer class="recite-detail flex">
<NavBar title="详情" />
<view class="detail-box">
<view class="detail-info">
<view class="info-name flex">
{{ detailInfo.name }}
<view :class="[
'iconfont',
detailInfo.collect ? 'iconshoucang2' : 'iconshoucang11',
]" @click="detailInfo.collect = !detailInfo.collect"></view>
</view>
<view class="audio-box">
<view class="audio" :class="{ audioActive: activeAudio === 1 }" @click="activeAudio = 1;">
<text>{{ detailInfo.enAudio }}</text>
<image v-if="activeAudio !== 1" src="@/static/images/learning/audio.png" mode="aspectFill" @click="openAudio"></image>
<image v-else src="@/static/images/learning/audio_active.png" mode="aspectFill" @click="openAudio"></image>
</view>
<view class="audio" :class="{ audioActive: activeAudio === 2 }" @click="activeAudio = 2;">
<text>{{ detailInfo.uaAudio }}</text>
<image v-if="activeAudio !== 2" src="@/static/images/learning/audio.png" mode="aspectFill" @click="openAudio"></image>
<image v-else src="@/static/images/learning/audio_active.png" mode="aspectFill" @click="openAudio"></image>
</view>
</view>
<view class="info-remark flex flex-center-x">
<view>{{ detailInfo.remark }}</view>
<view>单词报错</view>
</view>
<view class="info-adverb">
副词 <text>{{ detailInfo.adverb }}</text>
</view>
</view>
<view class="example">
<view class="title">例句</view>
<view v-for="(item, index) in detailInfo.example" :key="index" class="example-item">
<view class="item-content">
<view v-html="item.content"></view>
<image src="@/static/images/learning/audio.png" mode="aspectFill"></image>
</view>
<view class="item-translate">{{ item.translate }}</view>
</view>
</view>
<view class="analysis">
<view class="title">词根词缀句</view>
<view class="analysis-content">{{ detailInfo.analysis }}</view>
</view>
</view>
<view class="detail-footer flex flex-center-x">
<view class="btn cut">砍掉</view>
<view class="btn next">下一题</view>
</view>
</BaseContainer>
</template>
<script>
export default {
data() {
return {
detailInfo: {
collect: false,
name: 'outdoor',
enAudio: '/’aʊtdɔ:(r)/',
uaAudio: '/’aʊtdɔ:r/ ',
remark: 'adj.户外的;室外的',
adverb: 'outdoors',
example: [
{ content: 'If you enjoy <text style="color: #0F74BB;">outdoor</text> activities, this is the trip for you.', translate: '如果你喜欢户外运动,这一旅行很适合你。' },
{ content: 'If you enjoy <text style="color: #0F74BB;">outdoor</text> activities, this is the trip for you.', translate: '如果你喜欢户外运动,这一旅行很适合你。' },
{ content: 'If you enjoy <text style="color: #0F74BB;">outdoor</text> activities, this is the trip for you.', translate: '如果你喜欢户外运动,这一旅行很适合你。' },
{ content: 'If you enjoy <text style="color: #0F74BB;">outdoor</text> activities, this is the trip for you.', translate: '如果你喜欢户外运动,这一旅行很适合你。' },
],
analysis: 'out- 在外面 + door n.门'
},
activeAudio: 1,
};
},
methods: {
openAudio() {
},
},
};
</script>
<style lang="scss" scoped>
.recite-detail {
background: #f6f6f6;
flex-direction: column;
.detail-box {
width: 690rpx;
margin: 20rpx auto;
flex: 1;
overflow-y: auto;
.detail-info {
padding: 36rpx 20rpx 36rpx 32rpx;
background: #FFFFFF;
box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(68,68,68,0.04);
border-radius: 8rpx;
.info-name {
color: #333333;
font-size: 62rpx;
line-height: 62rpx;
align-items: baseline;
font-weight: bold;
.iconfont {
font-size: 40rpx;
margin-left: auto;
font-weight: normal;
&.iconshoucang2 {
color: #ff6b00 !important;
}
}
}
.audio-box {
display: flex;
flex-wrap: wrap;
margin-top: 40rpx;
.audio {
height: 48rpx;
background: #F7F7F7;
border-radius: 24rpx;
display: flex;
align-items: center;
padding: 0 26rpx;
&:first-child {
margin-right: 16rpx;
}
&.audioActive {
background: rgba(15, 116, 187, 0.1);
}
text {
margin-left: 10rpx;
}
image {
width: 28rpx;
height: 28rpx;
margin-left: 27rpx;
}
}
}
.info-remark {
color: #333;
font-size: 26rpx;
margin: 16rpx 0 24rpx;
view:last-child {
width: 93rpx;
height: 39rpx;
background: #EEEEEE;
border-radius: 10rpx;
color: #666666;
font-size: 20rpx;
text-align: center;
line-height: 39rpx;
margin-left: auto;
}
}
.info-adverb {
color: #999999;
font-size: 26rpx;
text {
color: #333;
margin-left: 22rpx;
}
}
}
.example {
background: #FFFFFF;
box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(68,68,68,0.04);
border-radius: 8rpx;
padding: 30rpx;
margin-top: 20rpx;
.title {
color: #999999;
font-size: 26rpx;
}
.example-item {
margin-top: 30rpx;
.item-content {
display: flex;
margin-bottom: 24rpx;
>view {
width: 520rpx;
}
image {
width: 28rpx;
height: 28rpx;
margin-left: auto;
margin-top: 10rpx;
}
}
.item-translate {
color: #999999;
font-size:24rpx;
}
}
}
.analysis {
background: #FFFFFF;
box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(68,68,68,0.04);
border-radius: 8rpx;
padding: 30rpx 32rpx;
margin-top: 20rpx;
.title {
color: #999999;
font-size: 26rpx;
margin-bottom: 24rpx;
}
.analysis-content {
color: #333333;
font-size: 30rpx;
}
}
}
.detail-footer {
width: 100%;
height: 130rpx;
justify-content: center;
padding-left: 30rpx;
background: #fff;
box-shadow: 0rpx -19rpx 54rpx 0rpx rgba(34,34,34,0.05);
flex-shrink: 0;
.btn {
color: #666;
font-size: 30rpx;
&.next {
width: 550rpx;
height: 88rpx;
background: linear-gradient(0deg, #0F74BB 0%, #3293FF 100%);
border-radius: 44rpx;
color: #fff;
line-height: 88rpx;
text-align: center;
margin-left: 44rpx;
}
}
}
}
</style>

@ -87,9 +87,9 @@
</button> -->
<view v-if="!TOUTIAO_STATUS" class="section-link" v-for="item in menuList.slice(0, 6)" :key="item.id" @click="goUrl(item, 2)" >
<image mode="aspectFill" :src="item.icon" />
{{ item.title }}
<view v-if="!TOUTIAO_STATUS" class="section-link" v-for="item in menuList.slice(0, 6)" :key="item.id" @click="goUrl(item, 2)" >
<image mode="aspectFill" :src="item.icon" />
{{ item.title }}
<view class="menu-more"></view>
</view>
</view>

@ -37,4 +37,12 @@ export default {
};
</script>
<style scoped lang="scss"></style>
<style scoped lang="scss">
::v-deep {
._root {
width: 690rpx;
margin: 20rpx auto 0;
padding: 60rpx 40rpx!important;
}
}
</style>

@ -0,0 +1,60 @@
<template>
<BaseContainer class="feedback">
<NavBar title="帮助与反馈" />
<view class="feedback-form">
<textarea v-model="suggest" placeholder="请填写具体内容帮助我们了解您的意见和建议。" placeholder-class="input-placeholder" />
<view class="btn" @click="submitFeedback">提交</view>
</view>
</BaseContainer>
</template>
<script>
export default {
data() {
return {
suggest: '',
};
},
methods: {
submitFeedback() {
if (!this.suggest) {
return this.$util.showMsg("请输入您的意见和建议");
}
},
},
};
</script>
<style lang="scss" scoped>
.feedback {
background: linear-gradient(to top, #f6f6f6 0%, #f6f6f6 60%, #F6F8FA 70%, #A1BFFD 100%);
.feedback-form {
padding: 60rpx 30rpx 0;
.input-placeholder {
font-size: 28rpx;
color: #ABABAB;
font-weight: bold;
}
textarea {
width: 100%;
height: 420rpx;
padding: 30rpx;
font-size: 28rpx;
color: #333;
background: #fff;
border-radius: 10rpx;
}
.btn {
width: 100%;
height: 80rpx;
background: linear-gradient(0deg, #0F74BB 0%, #3293FF 100%);
border-radius: 40rpx;
color: #fff;
font-size: 32rpx;
text-align: center;
line-height: 80rpx;
margin-top: 100rpx;
}
}
}
</style>

@ -0,0 +1,115 @@
<template>
<BaseContainer class="help-center">
<NavBar title="帮助与反馈" />
<view class="help-box flex flex-center-x">
<view class="help-left">
<view class="title">常见问题解答</view>
<view class="cont">如您问题未得到解决可咨询我们客服哦 ~</view>
</view>
<view class="help-right flex flex-center-y" @click="toFeedback">
<image src="@/static/images/my/feedback.png" mode="aspectFill"></image>
<view class="name">意见反馈</view>
</view>
</view>
<view class="section-list">
<view class="section-link" v-for="(item, index) in menuList" :key="index" @click="goUrl(item.url)" >
{{ item.title }}
<view class="menu-more"></view>
</view>
</view>
</BaseContainer>
</template>
<script>
export default {
data() {
return {
menuList: [
{ title: '怎么申请发票' , url: '' },
{ title: '如何联系人工客服' , url: '' },
{ title: '怎么绑定手机号' , url: '' },
{ title: '忘记密码找回' , url: '' },
],
};
},
methods: {
goUrl(url) {
if (url) {
uni.navigateTo({
url,
});
}
},
toFeedback() {
},
},
};
</script>
<style lang="scss" scoped>
.help-center {
background: linear-gradient(to top, #f6f6f6 0%, #f6f6f6 60%, #F6F8FA 70%, #A1BFFD 100%);
.help-box {
padding: 30rpx 32rpx 0;
height: 193rpx;
.help-left {
flex: 1;
color: #333333;
font-size: 26rpx;
line-height: 26rpx;
.title {
font-size: 36rpx;
line-height: 36rpx;
font-weight: bold;
margin-bottom: 26rpx;
}
}
.help-right {
width: 99rpx;
height: 99rpx;
background: #fff;
border-radius: 20rpx;
color: #333333;
font-size: 22rpx;
line-height: 22rpx;
flex-direction: column;
align-items: center;
>image {
width: 51rpx;
height: 44rpx;
margin-bottom: 6rpx;
}
}
}
.section-list {
width: 690rpx;
margin: 0 auto;
font-size: 30rpx;
color: #282828;
background-color: #ffffff;
border-radius: 10rpx;
margin-top: 20rpx;
.section-link {
display: flex;
align-items: center;
font-size: 28rpx;
color: #333;
height: 96rpx;
padding-left: 36rpx;
padding-right: 26rpx;
.menu-more {
width: 14rpx;
height: 14rpx;
border-width: 2px 2px 0 0;
border-color: #ccc;
border-style: solid;
-webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
vertical-align: top;
margin-left: auto;
}
}
}
}
</style>

@ -0,0 +1,283 @@
<template>
<BaseContainer class="cooperation-apply">
<NavBar title="出国留学" />
<view class="cooperation-form">
<view class="form-item">
<view class="item-label"><text>姓名</text></view>
<view class="item-content">
<input type="text" v-model="applyForm.real_name" placeholder="请输入姓名" placeholder-class="input-placeholder"/>
</view>
</view>
<view class="form-item">
<view class="item-label"><text>电话</text></view>
<view class="item-content">
<input type="text" v-model="applyForm.mobile" placeholder="请输入电话" placeholder-class="input-placeholder"/>
</view>
</view>
<view class="form-item">
<view class="item-label"><text>推荐人</text></view>
<view class="item-content">
<input type="text" v-model="applyForm.recommend_user" placeholder="请输入推荐人" placeholder-class="input-placeholder"/>
</view>
</view>
<view class="form-item">
<view class="item-label"><text>详细地址</text></view>
<view class="item-content">
<input type="text" v-model="applyForm.address" placeholder="请输入详细地址" placeholder-class="input-placeholder"/>
</view>
</view>
</view>
<view class="gold-box flex">
<label class="radio">
<radio value="意向金" :checked="true" color="#FF9500" /><text>意向金</text>
</label>
<view class="gold">{{ 200 }}</view>
</view>
<view class="apply-btn" @click="apply">立即报名</view>
<PayDialog v-if="initDataLoading" :open.sync="payDialogOpen" :money="Number(money)" :now_money="now_money"
:pay_type_num="pay_type_num" :special_id="Number(special_id)" :is-wechat="isWechat" :is-alipay="is_alipay" :is-balance="is_yue"
:template-id="templateId" :wxpay-h5="wxpayH5" @change="changeVal" />
</BaseContainer>
</template>
<script>
import PayDialog from "@/components/PayDialog/index.vue";
import {
applycooperation,
delSpecialOrder,
getInitData
} from "@/api/special";
export default {
components: {
PayDialog,
},
data() {
return {
special_id: '',
specialInfo: {},
applyForm: {
real_name: '',
mobile: '',
recommend_user: '',
address: '',
},
payDialogOpen: false,
payDialogOpen: false, //
money: 200.0,
pay_type_num: 20,
is_alipay: false, //
is_yue: false, //
now_money: 0, //
templateId: "",
wxpayH5: false,
initDataLoading: false,
};
},
onLoad(options) {
this.special_id = options.id;
this.getInitData();
},
methods: {
getInitData() {
getInitData().then(({ data }) => {
const { isWechat, is_alipay, is_yue, now_money, wxpayH5 } = data;
Object.assign(this, {
isWechat,
url: isWechat ? "/pages/index/login" : "/pages/login/phone_check",
is_alipay: is_alipay == 1,
is_yue: is_yue == 1,
now_money: Number(now_money),
wxpayH5,
initDataLoading: true,
});
});
},
apply() {
if (!this.applyForm.real_name) {
return this.$util.showMsg("请输入姓名");
}
if (!this.applyForm.mobile) {
return this.$util.showMsg("请输入电话");
}
if (!/^1[3456789]\d{9}$/.test(this.applyForm.mobile)) {
return this.$util.showMsg("电话错误");
}
if (!this.applyForm.recommend_user) {
return this.$util.showMsg("请输入推荐人");
}
if (!this.applyForm.address) {
return this.$util.showMsg("请输入详细地址");
}
this.payDialogOpen = true;
// } else {
// this.submitApply();
// }
},
async submitApply() {
uni.showLoading({ mask: true });
try {
const { data, msg } = await applycooperation({
oc_id: this.special_id,
...this.applyForm
});
uni.hideLoading();
this.$util.showMsg('报名成功');
uni.navigateBack();
} catch (err) {
uni.hideLoading();
this.$util.showMsg(err.msg);
}
},
changeVal(opt) {
if (typeof opt !== "object") {
opt = {};
}
console.log(opt);
var action = opt.action || "";
var value = opt.value || "";
this[action] && this[action](value);
},
//
pay_order: function (data) {
this.orderId = data.data.result.orderId || "";
switch (data.data.status) {
case "PAY_ERROR":
case "ORDER_EXIST":
case "ORDER_ERROR":
this.extendOrder(data.msg);
break;
case "WECHAT_PAY":
this.wechatPay(data.data.result.jsConfig);
break;
case "WECHAT_H5_PAY":
this.payDialogOpen = false;
this.$util.wechatH5Pay(data.data.result.jsConfig, this);
break;
case "WECHAT_ROUTINE_PAY":
this.$util.wechatRoutinePay(data.data.result.jsConfig, this);
break;
case "SUCCESS":
this.successOrder(data.msg);
break;
case "ZHIFUBAO_PAY":
this.aliPay(data.data.result, "datadownload");
break;
case 'TOUTIAO_PAY':
this.$util.toutiaoPay(data.data.result.jsConfig, this);
break;
case 'KUAISHOU_PAY':
this.$util.kuaishouPay(data.data.result.jsConfig, this);
break
}
},
extendOrder(msg) {
if (typeof msg === "object" && msg.errMsg === "chooseWXPay:cancel") {
msg = "微信支付取消";
} else {
msg = "支付失败";
}
this.$util.showMsg(msg);
this.payDialogOpen = false;
if (this.orderId) {
delSpecialOrder(this.orderId);
}
},
wechatPay(config) {
this.$util.weixinpay(config, this);
},
successOrder(msg) {
this.$util.showMsg(msg ? msg : "支付成功");
this.payDialogOpen = false;
this.submitApply();
},
aliPay(msn, type) {
this.$util.aliPay(msn, type, this);
},
},
}
</script>
<style lang="scss" scoped>
.cooperation-apply {
background: linear-gradient(to top, #f6f6f6 0%, #f6f6f6 60%, #F6F8FA 70%, #A1BFFD 100%);
}
.input-placeholder {
color: #999;
font-size: 24rpx;
}
.cooperation-form {
width: 690rpx;
background: #fff;
margin: 20rpx auto 0;
box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(68,68,68,0.04);
border-radius: 10rpx;
padding: 25rpx 30rpx 60rpx 30rpx;
.form-item {
display: flex;
align-items: center;
margin-bottom: 26rpx;
padding: 0 10rpx;
&:last-child {
margin-bottom: 0;
}
.item-label {
width: 140rpx;
display: flex;
color: #333;
font-size: 28rpx;
margin-right: 16rpx;
text {
flex: 1;
text-align-last: justify;
}
}
.item-content {
flex: 1;
input {
width: 100%;
height: 71rpx;
background: #f7f7f7;
border-radius: 10rpx;
font-size: 24rpx;
color: #333;
padding: 0 20rpx;
}
}
}
}
::v-deep .gold-box {
width: 690rpx;
height: 98rpx;
background: #fff;
margin: 20rpx auto 0;
box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(68,68,68,0.04);
border-radius: 10rpx;
align-items: center;
padding-left: 36rpx;
color: #333;
font-size: 28rpx;
line-height: 98rpx;
.uni-radio-input {
width: 34rpx;
height: 34rpx;
}
.gold {
color: #FF9500;
}
}
.apply-btn {
width: 600rpx;
height: 88rpx;
background: linear-gradient(0deg, #0F74BB 0%, #3293FF 100%);
border-radius: 44rpx;
margin: 90rpx auto 0;
color: #fff;
font-size: 30rpx;
text-align: center;
line-height: 88rpx;
}
</style>

@ -78,7 +78,7 @@
</view>
</view>
<view style="height: 100vh;"></view>
<!-- <view style="height: 100vh;"></view> -->
<TkiQrcode
loadMake

@ -3,46 +3,43 @@
<BaseContainer>
<NavBar title="个人资料" />
<view class="user-info">
<view class="avatar" @click="handlePickAvatar">
<view class="name">头像</view>
<image :src="xUserInfo.avatar" class="image" mode="aspectFill" />
<view class="iconfont iconxiangyou"></view>
</view>
<view class="list">
<view class="item">
<span class="name">ID</span>
<input :value="xUserInfo.uid" class="value input" type="text" disabled />
</view>
<view class="item">
<span class="name">昵称</span>
<input v-model="xUserInfo.nickname" class="value input" type="text" />
</view>
<navigator v-if="xUserInfo.phone" class="item" url="/pages/my/save_phone">
<span class="name">手机号</span>
<span class="value">{{ xUserInfo.phone }}</span>
<span class="iconfont iconxiangyou"></span>
</navigator>
<view v-if="xUserInfo.phone" class="item password" @click="popupShow = true">
<view>密码</view>
<view>******</view>
</view>
<navigator class="item" url="/pages/index/agree?type=user_agreement">
<span class="name">用户协议</span>
<span class="value">用户协议</span>
<span class="iconfont iconxiangyou"></span>
</navigator>
<navigator class="item" url="/pages/index/agree?type=user_privacy">
<span class="name">隐私政策</span>
<span class="value">隐私政策</span>
<span class="iconfont iconxiangyou"></span>
</navigator>
<view class="info-box">
<view class="avatar" @click="handlePickAvatar">
<view class="name">头像</view>
<image :src="xUserInfo.avatar" class="image" mode="aspectFill" />
<view class="iconfont iconxiangyou"></view>
</view>
<view class="list">
<view class="item">
<span class="name">昵称</span>
<input v-model="xUserInfo.nickname" class="value input" type="text" />
</view>
<navigator v-if="xUserInfo.phone" class="item" url="/pages/my/save_phone">
<span class="name">手机号</span>
<span class="value">{{ xUserInfo.phone }}</span>
<span class="iconfont iconxiangyou"></span>
</navigator>
</view>
</view>
<view class="info-box">
<view class="list">
<view class="item">
<span class="name">收货邮箱</span>
<input v-model="xUserInfo.email" class="value input" type="text" />
</view>
<navigator class="item" :url="`/pages/forgotPwd/index?phone=${xUserInfo.phone}`">
<span class="name">修改密码</span>
<span class="value"></span>
<span class="iconfont iconxiangyou"></span>
</navigator>
</view>
</view>
<view class="btn-group">
<button class="btn flex flex-center" type="button" @click="save_user_info">
保存修改
提交
</button>
<button class="btn flex flex-center out-btn" type="button" @click="logout">
退出登录
退出
</button>
</view>
</view>
@ -142,10 +139,14 @@ export default {
}
},
async save_user_info() {
let { nickname, avatar } = this.xUserInfo;
let { nickname, avatar, email } = this.xUserInfo;
nickname = nickname.trim();
if (nickname == "" || nickname.length > 15)
if (nickname == "" || nickname.length > 15) {
return this.$util.showMsg("昵称长度必须在1-15个字符之间!");
}
if (email === '' || !(/\w+[@]{1}\w+[.]\w+/.test(email))) {
return this.$util.showMsg("邮箱格式错误!");
}
uni.showLoading({
mask: true,
});
@ -154,6 +155,7 @@ export default {
const result = await saveUserInfo({
nickname,
avatar,
email,
});
this.$util.showMsg(result.msg);
@ -244,6 +246,15 @@ export default {
input {
height: 98rpx;
}
.user-info {
padding-top: 10rpx;
background: #f6f6f6;
.info-box {
background: #fff;
padding: 0 30rpx;
margin-bottom: 20rpx;
}
}
.user-info .avatar {
@ -252,8 +263,8 @@ input {
align-items: center;
padding: 30rpx;
background-color: #ffffff;
border-bottom: 1px solid #f5f5f5;
}
.user-info .avatar .name {
@ -288,12 +299,10 @@ input {
display: flex;
align-items: center;
height: 98rpx;
padding-right: 30rpx;
padding-left: 30rpx;
}
.user-info .list .item~.item {
border-top: 1px solid #f5f5f5;
border-bottom: 1px solid #e6e6e6;
&:last-child {
border-bottom: none;
}
}
.user-info .list .item .name {
@ -304,7 +313,7 @@ input {
}
.user-info .list .item .value {
font-size: 30rpx;
font-size: 28rpx;
color: #666;
}
@ -321,17 +330,21 @@ input {
}
.user-info .btn-group {
padding: 80rpx 30rpx 0;
padding: 176rpx 30rpx 0;
}
.user-info .btn-group .btn {
width: 100%;
height: 90rpx;
border-radius: 45rpx;
height: 88rpx;
border-radius: 44rpx;
margin-bottom: 30rpx;
background-color: #2c8eff;
background: linear-gradient(0deg, #0F74BB 0%, #3293FF 100%);;
font-size: 32rpx;
color: #ffffff;
border: none;
&:after {
display: none;
}
}
.user-info .btn-group .btn:last-child {
@ -339,9 +352,8 @@ input {
}
.user-info .btn-group .out-btn {
border: 1px solid #2c8eff;
background-color: #ffffff;
color: #2c8eff;
background: #E5E5E5;
color: #A2A2A2;
}
.user-info .group .link {

@ -1469,6 +1469,7 @@
getTopicSpecialTestPaper(this.special_id, 2).then(
({ data: questions }) => {
if (questions.length) {
console.log(this.special.type, 1472);
if (this.special.type === 5) {
this.cloumnNavlist.splice(this.cloumnNavlist.length - 1, 0, {
title: "考试",
@ -1479,6 +1480,7 @@
title: "考试",
value: 4,
});
console.log(this.otherNavlist);
}
}
this.questionList = questions;

@ -1,47 +1,63 @@
<template>
<BaseContainer class="favorite" :fixedNav="false">
<NavBarTitle title="我的收藏" :height="300"/>
<NavBarTitle title="我的收藏" :height="88"/>
<view v-if="type" ref="tabbar" class="tabbar">
<view :class="{ on: active === 1 }" @click="tab(1)">资料</view>
<view :class="{ on: active === 2 }" @click="tab(2)">老师</view>
<view :class="{ on: active === 0 }" @click="tab(0)">课程</view>
</view>
<view v-if="makeGradeList.length" :class="{ material: active }" class="list">
<navigator v-for="item in makeGradeList" :key="item.id" :url="item.path">
<view>
<image mode="aspectFill" :src="item.image" alt="" />
<view v-if="!active">{{ type == 1 ? item.types : item.type }}</view>
</view>
<view>
<view>{{ item.title }}</view>
<template v-if="active">
<view :class="{ money: item.pay_type }" style="color:#23272E;">
<template v-if="item.pay_type"> <text >{{item.money}}</text> </template>
<template v-else> 免费 </template>
</view>
<view>
<view>{{ item.ficti + item.sales }}人已下载</view>
<view class="button">去下载</view>
</view>
</template>
<template v-else>
<view v-if="item.label.length">
<template v-for="(label, index) in item.label">
<view v-if="index < 2" :key="index">{{ label }}</view>
</template>
</view>
<view>
<view :class="{ money: item.pay_type }">
<template v-if="item.pay_type">
<text>{{ item.is_pink ? item.pink_money : item.money }}</text>
</template>
<template v-else> 免费 </template>
</view>
<view v-if="!item.is_light && item.types !== 4">{{ item.count }}</view>
</view>
</template>
</view>
</navigator>
<template v-if="Number(active) === 0">
<navigator
v-for="(item, index) in makeGradeList"
:key="item.id"
:url="item.path"
ref="box_center"
class="list-item"
@touchstart="drawStart"
@touchmove="drawMove(index,$event)"
@touchend="drawEnd(index,$event)"
>
<view>
<image mode="aspectFill" :src="item.image" alt="" />
<!-- <view v-if="!active">{{ type == 1 ? item.types : item.type }}</view> -->
</view>
<view class="function">
<view class="btn">取消收藏</view>
</view>
<view>
<view>{{ item.title }}</view>
<template v-if="active">
<view :class="{ money: item.pay_type }" style="color:#23272E;">
<template v-if="item.pay_type"> <text >{{item.money}}</text> </template>
<template v-else> 免费 </template>
</view>
<view>
<view>{{ item.ficti + item.sales }}人已下载</view>
<view class="button">去下载</view>
</view>
</template>
<template v-else>
<view v-if="item.label.length">
<template v-for="(label, index) in item.label">
<view v-if="index < 2" :key="index">{{ label }}</view>
</template>
</view>
<view>
<view :class="{ money: item.pay_type }">
<template v-if="item.pay_type">
<text>{{ item.is_pink ? item.pink_money : item.money }}</text>
</template>
<template v-else> 免费 </template>
</view>
<view v-if="!item.is_light && item.types !== 4">{{ item.count }}</view>
</view>
</template>
</view>
</navigator>
</template>
</view>
<view v-show="loading" class="loading">
<text class="fa fa-spinner"></text>
@ -69,7 +85,6 @@ import specialType from "@/constants/special-type";
export default {
data() {
return {
navlist: [{ title: "我的课程" }, { title: "我的收藏" }],
loadend: false,
loading: false,
active: 0,
@ -146,6 +161,44 @@ export default {
this.loadend = false;
this.getGradeList();
},
//
drawStart(e) {
console.log('触摸',e);
this.clientX = e.changedTouches[0].clientX
},
//
drawMove(id, e) {
console.log('过程',e.changedTouches[0]);
var endX = e.changedTouches[0].clientX;
let diff = endX - this.clientX;
console.log(diff);
if (Math.abs(diff) <= 60 && diff < 0) {
let box_center = this.$refs.box_center[id]
// console.log(diff);
box_center.$el.style.left = diff + 'px'
}
},
//
drawEnd(id, e) {
// console.log('',e.changedTouches[0]);
var endX = e.changedTouches[0].clientX;
let diff = endX - this.clientX;
let box_center = this.$refs.box_center[id]
if (Math.abs(diff) > 20) {
// console.log('',diff,id,e);
if (diff < 0) {
box_center.$el.style.left = '-60px'
} else {
box_center.$el.style.left = '0'
}
}else{
box_center.$el.style.left = '0'
}
},
},
};
</script>
@ -160,30 +213,53 @@ page{
</style>
<style scoped lang="scss">
.favorite .tabbar {
position: absolute;
left: 0;
right: 0;
width: 686rpx;
margin: 0 auto;
margin-top: calc(100rpx + var(--safe-top));
.favorite {
::v-deep .nav-box {
background: #fff;
}
.tabbar {
position: relative;
width: 100%;
margin-top: calc(88rpx + var(--safe-top));
border-radius: 24rpx;
z-index: 999;
background: none;
background: #fff;
border-bottom:none;
}
}
.list {
// padding-top: calc(88rpx + var(--safe-top) + 90rpx) !important;
position: absolute;
left: 0;
right: 0;
width: 686rpx;
width: 690rpx;
margin: 0 auto;
margin-top: calc(230rpx + var(--safe-top));
margin-top: 20rpx;
border-radius: 24rpx;
z-index: 999;
background: #ffffff;
overflow-x: hidden;
.list-item {
position: relative;
background: #ffffff;
.function {
width: 120rpx;
height: 100%;
background: #F8473E;
border-radius: 0rpx 10rpx 10rpx 0rpx;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
top: 0;
right: -120rpx;
.btn {
width: 30rpx;
white-space: pre-wrap;
overflow: auto;
font-size: 28rpx;
color: #fff;
line-height: 36rpx;
}
}
}
}
.money{
width: 134rpx;

@ -63,6 +63,7 @@
import {
getOfflineSpecialInfo,
applyOffline,
delSpecialOrder,
getInitData
} from "@/api/special";
@ -160,6 +161,62 @@
this.$util.showMsg(err.msg);
}
},
//
pay_order: function (data) {
this.orderId = data.data.result.orderId || "";
switch (data.data.status) {
case "PAY_ERROR":
case "ORDER_EXIST":
case "ORDER_ERROR":
this.extendOrder(data.msg);
break;
case "WECHAT_PAY":
this.wechatPay(data.data.result.jsConfig);
break;
case "WECHAT_H5_PAY":
this.payDialogOpen = false;
this.$util.wechatH5Pay(data.data.result.jsConfig, this);
break;
case "WECHAT_ROUTINE_PAY":
this.$util.wechatRoutinePay(data.data.result.jsConfig, this);
break;
case "SUCCESS":
this.successOrder(data.msg);
break;
case "ZHIFUBAO_PAY":
this.aliPay(data.data.result, "datadownload");
break;
case 'TOUTIAO_PAY':
this.$util.toutiaoPay(data.data.result.jsConfig, this);
break;
case 'KUAISHOU_PAY':
this.$util.kuaishouPay(data.data.result.jsConfig, this);
break
}
},
extendOrder(msg) {
if (typeof msg === "object" && msg.errMsg === "chooseWXPay:cancel") {
msg = "微信支付取消";
} else {
msg = "支付失败";
}
this.$util.showMsg(msg);
this.payDialogOpen = false;
if (this.orderId) {
delSpecialOrder(this.orderId);
}
},
wechatPay(config) {
this.$util.weixinpay(config, this);
},
successOrder(msg) {
this.$util.showMsg(msg ? msg : "支付成功");
this.payDialogOpen = false;
this.submitApply();
},
aliPay(msn, type) {
this.$util.aliPay(msn, type, this);
},
},
}
</script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Loading…
Cancel
Save