zhaojunkai

人民号-动态Tab下的内容新增互动入口图标

@@ -2,4 +2,5 @@ export default class BuildProfile { @@ -2,4 +2,5 @@ export default class BuildProfile {
2 static readonly HAR_VERSION = '1.0.0'; 2 static readonly HAR_VERSION = '1.0.0';
3 static readonly BUILD_MODE_NAME = 'debug'; 3 static readonly BUILD_MODE_NAME = 'debug';
4 static readonly DEBUG = true; 4 static readonly DEBUG = true;
  5 + static readonly TARGET_NAME = 'default';
5 } 6 }
  1 +import { ToastUtils } from 'wdKit';
  2 +
  3 +/**
  4 + * 卡片 分享、评论、点赞公用组件
  5 + */
  6 +@Component
  7 +export struct CarderInteraction {
  8 + build() {
  9 + Row(){
  10 + Row(){
  11 + Image($r('app.media.CarderInteraction_share'))
  12 + .width(18)
  13 + .height(18)
  14 + Text('分享')
  15 + .margin({left:4})
  16 + .fontSize(14)
  17 + .fontColor('#666666')
  18 + }
  19 + .justifyContent(FlexAlign.Center)
  20 + .onClick(()=>{
  21 + ToastUtils.showToast('分享为公共方法,待开发', 1000)
  22 + })
  23 + Row(){
  24 + Image($r('app.media.CarderInteraction_comment'))
  25 + .width(18)
  26 + .height(18)
  27 + Text('评论')
  28 + .margin({left:4})
  29 + .fontSize(14)
  30 + .fontColor('#666666')
  31 + }
  32 + .justifyContent(FlexAlign.Center)
  33 + .onClick(()=>{
  34 + ToastUtils.showToast('分享为公共方法,待开发', 1000)
  35 + })
  36 + Row(){
  37 + Image($r('app.media.CarderInteraction_like'))
  38 + .width(18)
  39 + .height(18)
  40 + Text('点赞')
  41 + .margin({left:4})
  42 + .fontSize(14)
  43 + .fontColor('#666666')
  44 + }
  45 + .justifyContent(FlexAlign.Center)
  46 + .onClick(()=>{
  47 + ToastUtils.showToast('分享为公共方法,待开发', 1000)
  48 + })
  49 + }
  50 + .width('100%')
  51 + .margin({top:11})
  52 + .padding({
  53 + left:21,
  54 + right:21
  55 + })
  56 + .justifyContent(FlexAlign.SpaceBetween)
  57 + .alignItems(VerticalAlign.Center)
  58 + }
  59 +}
@@ -3,6 +3,7 @@ import { RmhTitle } from '../cardCommon/RmhTitle' @@ -3,6 +3,7 @@ import { RmhTitle } from '../cardCommon/RmhTitle'
3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
4 import { CommonConstants } from 'wdConstant/Index'; 4 import { CommonConstants } from 'wdConstant/Index';
5 import { ProcessUtils } from 'wdRouter'; 5 import { ProcessUtils } from 'wdRouter';
  6 +import {CarderInteraction} from '../CarderInteraction'
6 7
7 const TAG = 'Card12Component'; 8 const TAG = 'Card12Component';
8 9
@@ -34,7 +35,7 @@ export struct Card12Component { @@ -34,7 +35,7 @@ export struct Card12Component {
34 .lineHeight(25) 35 .lineHeight(25)
35 .fontFamily('PingFang SC-Regular') 36 .fontFamily('PingFang SC-Regular')
36 } 37 }
37 - 38 + CarderInteraction()
38 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件 39 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
39 } 40 }
40 .padding({ 41 .padding({
@@ -3,6 +3,7 @@ import { RmhTitle } from '../cardCommon/RmhTitle' @@ -3,6 +3,7 @@ import { RmhTitle } from '../cardCommon/RmhTitle'
3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
4 import { CommonConstants } from 'wdConstant/Index'; 4 import { CommonConstants } from 'wdConstant/Index';
5 import { ProcessUtils } from 'wdRouter'; 5 import { ProcessUtils } from 'wdRouter';
  6 +import {CarderInteraction} from '../CarderInteraction'
6 7
7 const TAG = 'Card14Component'; 8 const TAG = 'Card14Component';
8 9
@@ -79,7 +80,7 @@ export struct Card14Component { @@ -79,7 +80,7 @@ export struct Card14Component {
79 .width(CommonConstants.FULL_WIDTH) 80 .width(CommonConstants.FULL_WIDTH)
80 .margin({ bottom: 8 }) 81 .margin({ bottom: 8 })
81 .height(75) 82 .height(75)
82 - 83 + CarderInteraction()
83 84
84 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件 85 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
85 } 86 }
@@ -3,6 +3,7 @@ import { ProcessUtils } from 'wdRouter'; @@ -3,6 +3,7 @@ import { ProcessUtils } from 'wdRouter';
3 import { RmhTitle } from '../cardCommon/RmhTitle' 3 import { RmhTitle } from '../cardCommon/RmhTitle'
4 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 4 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
5 import { CommonConstants } from 'wdConstant/Index'; 5 import { CommonConstants } from 'wdConstant/Index';
  6 +import {CarderInteraction} from '../CarderInteraction'
6 7
7 const TAG: string = 'Card15Component'; 8 const TAG: string = 'Card15Component';
8 9
@@ -80,7 +81,7 @@ export struct Card15Component { @@ -80,7 +81,7 @@ export struct Card15Component {
80 .width(CommonConstants.FULL_WIDTH) 81 .width(CommonConstants.FULL_WIDTH)
81 .aspectRatio(16 / 9) 82 .aspectRatio(16 / 9)
82 .alignContent(Alignment.BottomEnd) 83 .alignContent(Alignment.BottomEnd)
83 - 84 + CarderInteraction()
84 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件 85 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
85 } 86 }
86 .padding({ 87 .padding({
@@ -3,6 +3,7 @@ import { RmhTitle } from '../cardCommon/RmhTitle' @@ -3,6 +3,7 @@ import { RmhTitle } from '../cardCommon/RmhTitle'
3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
4 import { CommonConstants } from 'wdConstant/Index'; 4 import { CommonConstants } from 'wdConstant/Index';
5 import { ProcessUtils } from 'wdRouter'; 5 import { ProcessUtils } from 'wdRouter';
  6 +import {CarderInteraction} from '../CarderInteraction'
6 7
7 const TAG = 'Card16Component'; 8 const TAG = 'Card16Component';
8 9
@@ -44,6 +45,7 @@ export struct Card16Component { @@ -44,6 +45,7 @@ export struct Card16Component {
44 }) 45 })
45 } 46 }
46 } 47 }
  48 + CarderInteraction()
47 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件 49 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
48 } 50 }
49 .padding({ 51 .padding({
@@ -2,6 +2,7 @@ import { ContentDTO, FullColumnImgUrlDTO, PhotoListBean } from 'wdBean'; @@ -2,6 +2,7 @@ import { ContentDTO, FullColumnImgUrlDTO, PhotoListBean } from 'wdBean';
2 import { RmhTitle } from '../cardCommon/RmhTitle' 2 import { RmhTitle } from '../cardCommon/RmhTitle'
3 import { ProcessUtils } from 'wdRouter'; 3 import { ProcessUtils } from 'wdRouter';
4 import { CommonConstants } from 'wdConstant/Index'; 4 import { CommonConstants } from 'wdConstant/Index';
  5 +import {CarderInteraction} from '../CarderInteraction'
5 6
6 const TAG = 'Card19Component'; 7 const TAG = 'Card19Component';
7 8
@@ -104,6 +105,7 @@ export struct Card19Component { @@ -104,6 +105,7 @@ export struct Card19Component {
104 }) 105 })
105 ProcessUtils.gotoMultiPictureListPage(photoList,0) 106 ProcessUtils.gotoMultiPictureListPage(photoList,0)
106 }) 107 })
  108 + CarderInteraction()
107 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件 109 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
108 } 110 }
109 .padding({ 111 .padding({
@@ -3,6 +3,7 @@ import { RmhTitle } from '../cardCommon/RmhTitle' @@ -3,6 +3,7 @@ import { RmhTitle } from '../cardCommon/RmhTitle'
3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
4 import { CommonConstants } from 'wdConstant/Index'; 4 import { CommonConstants } from 'wdConstant/Index';
5 import { ProcessUtils } from 'wdRouter'; 5 import { ProcessUtils } from 'wdRouter';
  6 +import {CarderInteraction} from '../CarderInteraction'
6 const TAG = 'Card20Component'; 7 const TAG = 'Card20Component';
7 8
8 /** 9 /**
@@ -64,6 +65,7 @@ export struct Card20Component { @@ -64,6 +65,7 @@ export struct Card20Component {
64 if (this.contentDTO.fullColumnImgUrls[0]) { 65 if (this.contentDTO.fullColumnImgUrls[0]) {
65 createImg({ contentDTO: this.contentDTO }) 66 createImg({ contentDTO: this.contentDTO })
66 } 67 }
  68 + CarderInteraction()
67 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件 69 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
68 } 70 }
69 .padding({ 71 .padding({
@@ -3,7 +3,7 @@ import { CommonConstants, CompStyle } from 'wdConstant'; @@ -3,7 +3,7 @@ import { CommonConstants, CompStyle } from 'wdConstant';
3 import { ProcessUtils } from 'wdRouter'; 3 import { ProcessUtils } from 'wdRouter';
4 import { RmhTitle } from '../cardCommon/RmhTitle' 4 import { RmhTitle } from '../cardCommon/RmhTitle'
5 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 5 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
6 - 6 +import {CarderInteraction} from '../CarderInteraction'
7 const TAG: string = 'Card6Component-Card13Component'; 7 const TAG: string = 'Card6Component-Card13Component';
8 8
9 /** 9 /**
@@ -42,7 +42,7 @@ export struct Card21Component { @@ -42,7 +42,7 @@ export struct Card21Component {
42 } 42 }
43 .columnsTemplate('2fr 1fr') 43 .columnsTemplate('2fr 1fr')
44 .maxCount(1) 44 .maxCount(1)
45 - 45 + CarderInteraction()
46 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件 46 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
47 } 47 }
48 .onClick((event: ClickEvent) => { 48 .onClick((event: ClickEvent) => {