Skip to content

Commit

Permalink
refactor: 页面增加分享
Browse files Browse the repository at this point in the history
  • Loading branch information
Hope committed Mar 1, 2018
1 parent 7544eb9 commit ef82d4e
Show file tree
Hide file tree
Showing 19 changed files with 164 additions and 117 deletions.
Binary file modified src/common/resources/VIP.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/common/resources/VIP1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
102 changes: 0 additions & 102 deletions src/components/minui-flex.wpy

This file was deleted.

28 changes: 20 additions & 8 deletions src/pages/init/add.wpy
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<style lang="less" scoped>
.search{
.zan-cell{
padding: 5px 15px;
<style lang="less">
.workbookAdd{
.search{
.zan-cell{
padding: 5px 15px;
}
}
.zan-btn {
border-radius:0;
}
}
.zan-btn {
border-radius:0;
}
</style>

<template>
<view class="container">
<view class="container workbookAdd">
<!--标题-->
<view class="zan-row zan-center" style="margin: 40rpx 0;">
<text class="zan-col zan-col-24 zan-font-22 zan-c-black">选择你正在使用的习题册</text>
Expand Down Expand Up @@ -159,5 +161,15 @@
this.workbookList = await this._getAllWorkbook(this.textbookId, this.base_search.value)
this.$apply()
}

onShareAppMessage (res) {
if (res.from === 'button') {
console.log(res.target)
}
return {
title: '各位家长,用这个记错题,速度快,用处大',
path: '/pages/my/index'
}
}
}
</script>
10 changes: 10 additions & 0 deletions src/pages/my/email.wpy
Original file line number Diff line number Diff line change
Expand Up @@ -172,5 +172,15 @@
}
this.$apply()
}

onShareAppMessage (res) {
if (res.from === 'button') {
console.log(res.target)
}
return {
title: '各位家长,用这个记错题,速度快,用处大',
path: '/pages/my/index'
}
}
}
</script>
12 changes: 11 additions & 1 deletion src/pages/my/index.wpy
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<view class="zan-row zan-center" style="padding-top:60rpx;position: relative">
<navigator url='/pages/my/info' hover-class="none">
<image class="zan-col zan-col-24" class="userinfo-avatar" src='{{userInfo.headImg}}' mode='scaleToFill'/>
<image wx:if="{{ userInfo.vip != 0 }}" class="userinfo-vip" src='../../common/resources/vip.png' mode='scaleToFill'/>
<image wx:if="{{ userInfo.vip != 0 }}" class="userinfo-vip" src='../../common/resources/VIP1.png' mode='scaleToFill'/>
<text class="zan-col zan-col-24 zan-font-22">{{userInfo.name}}</text>
<text class="zan-arrow"></text>
</navigator>
Expand Down Expand Up @@ -194,5 +194,15 @@
this.userInfo.vip = wepy.getStorageSync('User').vip
this.$apply()
}

onShareAppMessage (res) {
if (res.from === 'button') {
console.log(res.target)
}
return {
title: '各位家长,用这个记错题,速度快,用处大',
path: '/pages/my/index'
}
}
}
</script>
10 changes: 10 additions & 0 deletions src/pages/my/info.wpy
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,15 @@
this.gradeIndex = Number(wepy.getStorageSync('User').grade) - 3
this.$apply()
}

onShareAppMessage (res) {
if (res.from === 'button') {
console.log(res.target)
}
return {
title: '各位家长,用这个记错题,速度快,用处大',
path: '/pages/my/index'
}
}
}
</script>
10 changes: 10 additions & 0 deletions src/pages/my/pay.wpy
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,15 @@ export default class MyPay extends wepy.page {
})
})
}

onShareAppMessage (res) {
if (res.from === 'button') {
console.log(res.target)
}
return {
title: '各位家长,用这个记错题,速度快,用处大',
path: '/pages/my/index'
}
}
}
</script>
2 changes: 1 addition & 1 deletion src/pages/my/vip.wpy
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<view class="zan-panel zan-center" style="padding:30px 0;margin-top: 0;">
<view style="padding:5px 0"><text style="color:#3fc6c6">支付提示</text></view>
<view style="padding:15px 0"><text class="zan-c-black zan-font-30">¥29/月</text></view>
<view style="padding:5px 0"><text class="zan-c-gray-dark zan-font-22">30天内无理由全额退款</text></view>
<view style="padding:5px 0"><text class="zan-c-gray-dark zan-font-22">首次支付30天内无理由全额退款</text></view>
</view>
<view class="footer" style="margin-top: 20px;">
<view class="zan-row">
Expand Down
10 changes: 10 additions & 0 deletions src/pages/statistics/correct.wpy
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,15 @@
this.name = wepy.getStorageSync('User').name
this.$apply()
}

onShareAppMessage (res) {
if (res.from === 'button') {
console.log(res.target)
}
return {
title: '各位家长,用这个记错题,速度快,用处大',
path: '/pages/my/index'
}
}
}
</script>
10 changes: 10 additions & 0 deletions src/pages/statistics/error.wpy
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,15 @@ export default class StatisticsError extends wepy.page {
this.$apply()
}
}

onShareAppMessage (res) {
if (res.from === 'button') {
console.log(res.target)
}
return {
title: '各位家长,用这个记错题,速度快,用处大',
path: '/pages/my/index'
}
}
}
</script>
10 changes: 10 additions & 0 deletions src/pages/statistics/index.wpy
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,15 @@
this.statistics = await this._getStatistics(this.textbook)
this.$apply()
}

onShareAppMessage (res) {
if (res.from === 'button') {
console.log(res.target)
}
return {
title: '各位家长,用这个记错题,速度快,用处大',
path: '/pages/my/index'
}
}
}
</script>
18 changes: 15 additions & 3 deletions src/pages/workbook/add.wpy
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<style lang="less" scoped>
.zan-btn {
<style lang="less">
.workbookAdd{
.zan-btn{
border-radius:0;
}
.search{
Expand All @@ -14,10 +15,11 @@
padding: 5px 15px;
}
}
}
</style>

<template>
<view class="container">
<view class="container workbookAdd">
<!--搜索-->
<view class="zan-panel search">
<searchField :options.sync="base_search" componentId="searchField"/>
Expand Down Expand Up @@ -152,5 +154,15 @@ export default class WorkbookAdd extends wepy.page {
this.base_search.value = ''
this.$apply()
}

onShareAppMessage (res) {
if (res.from === 'button') {
console.log(res.target)
}
return {
title: '各位家长,用这个记错题,速度快,用处大',
path: '/pages/my/index'
}
}
}
</script>
10 changes: 10 additions & 0 deletions src/pages/workbook/chapter.wpy
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,15 @@
this.chapter = await this._getChapter(this.id)
this.$apply()
}

onShareAppMessage (res) {
if (res.from === 'button') {
console.log(res.target)
}
return {
title: '各位家长,用这个记错题,速度快,用处大',
path: '/pages/my/index'
}
}
}
</script>
9 changes: 9 additions & 0 deletions src/pages/workbook/correct.wpy
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,14 @@
this.name = wepy.getStorageSync('User').name
this.$apply()
}
onShareAppMessage (res) {
if (res.from === 'button') {
console.log(res.target)
}
return {
title: '各位家长,用这个记错题,速度快,用处大',
path: '/pages/my/index'
}
}
}
</script>
10 changes: 10 additions & 0 deletions src/pages/workbook/error.wpy
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,15 @@
this.error = await this._getChapter(this.id)
this.$apply()
}

onShareAppMessage (res) {
if (res.from === 'button') {
console.log(res.target)
}
return {
title: '各位家长,用这个记错题,速度快,用处大',
path: '/pages/my/index'
}
}
}
</script>
10 changes: 8 additions & 2 deletions src/pages/workbook/exercise.wpy
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,14 @@ export default class WorkbookExercise extends wepy.page {
this.$apply()
}

onReady() {
this.$invoke('zanNoticebar1', 'initZanNoticeBarScroll')
onShareAppMessage (res) {
if (res.from === 'button') {
console.log(res.target)
}
return {
title: '各位家长,用这个记错题,速度快,用处大',
path: '/pages/my/index'
}
}
}
</script>
10 changes: 10 additions & 0 deletions src/pages/workbook/index.wpy
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,15 @@ export default class Statistics extends wepy.page {
this.workbookList = await this._getMyWorkbook(this.textbook)
this.$apply()
}

onShareAppMessage (res) {
if (res.from === 'button') {
console.log(res.target)
}
return {
title: '各位家长,用这个记错题,速度快,用处大',
path: '/pages/my/index'
}
}
}
</script>
Loading

0 comments on commit ef82d4e

Please sign in to comment.