提交 fc318ba7 authored 作者: haodaking's avatar haodaking

金句通过接口返回

上级 a9d912f4
import { getShare, getQrcode, imageTransfer } from '../../api/base.js' import { getShare, getQrcode, imageTransfer } from '../../api/base.js'
import { wxml, style } from './share.js' import { wxml, style } from './share.js'
import TEXTLIST from './text.js' // import TEXTLIST from './text.js'
const app = getApp() const app = getApp()
Component({ Component({
...@@ -38,20 +38,7 @@ Component({ ...@@ -38,20 +38,7 @@ Component({
'https://webapp-pub.ezijing.com/weapp/share/bg/09.jpg', 'https://webapp-pub.ezijing.com/weapp/share/bg/09.jpg',
'https://webapp-pub.ezijing.com/weapp/share/bg/01.jpg' 'https://webapp-pub.ezijing.com/weapp/share/bg/01.jpg'
], ],
textList: [ textList: [],
{ text: '本质上,我们都生活在我们与内部体验或者外部事件的主观互动中。' },
{ text: '人本主义认为人是多维的,不能只去剖析本能,还要看思想和精神。' },
{ text: '灵性体验发生于与世界的关系中,这种关系是一个有生命的系统。' },
{ text: '参与式方法认为要尊重文化、科学、宗教的差异,而不是进行统一' },
{ text: '宇宙并非独立于我们而存在于别处,我们就身处宇宙之中——惠勒' },
{ text: '别把身份全建立在与人的关系上,要寻找独立于关系之外的自我意识' },
{ text: '反思能力可得知自己的他人的不同,及自己的道德价值观和伦理模式' },
{ text: '多元交织身份意味着你我之间看着不同,但可建立某种奇特的联盟' },
{ text: '权力和特权是相互关联的,但取决于交互关系和背景' },
{ text: '当触碰到自己的羞愧,可把这些感受当成履行责任的指引' },
{ text: '只有认真观察我们的投射,才能看到自己的阴影中有什么——荣格' },
{ text: '改变自己对他人的看法,这是追求社会公正的一种方法' }
],
avatarList: [], avatarList: [],
colorList: [ colorList: [
'#d78c4a', '#d78c4a',
...@@ -76,7 +63,7 @@ Component({ ...@@ -76,7 +63,7 @@ Component({
controls: { controls: {
active: '0', active: '0',
bg: 'https://webapp-pub.ezijing.com/weapp/share/bg/02.jpg', bg: 'https://webapp-pub.ezijing.com/weapp/share/bg/02.jpg',
text: '本质上,我们都生活在我们与内部体验或者外部事件的主观互动中。', text: '',
avatar: '', avatar: '',
color: '#d78c4a' color: '#d78c4a'
}, },
...@@ -147,8 +134,11 @@ Component({ ...@@ -147,8 +134,11 @@ Component({
const numLength = data.used_day.toString().length const numLength = data.used_day.toString().length
// 金句设置 // 金句设置
const textList = TEXTLIST[this.data.chapterId] const textList = data.sentences.map(item => {
if (textList) { return { text: item }
})
// const textList = data.TEXTLIST[this.data.chapterId]
if (textList.length) {
this.setData({ textList, 'controls.text': textList[0].text }) this.setData({ textList, 'controls.text': textList[0].text })
} }
this.setData({ share: Object.assign(data, { lecturer }), numLength }) this.setData({ share: Object.assign(data, { lecturer }), numLength })
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论