tree.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790
  1. <template>
  2. <view class="page-container">
  3. <view class="base-container">
  4. <member-level :treeData="treeData">
  5. <view class="toogle" @click="handleShow">切换 {{name}}<up-icon class="icon" name="arrow-down" color="#fff"
  6. size="12"></up-icon></view>
  7. </member-level>
  8. <view class="tree-cont">
  9. <!-- 弹幕组件 -->
  10. <view class="danmaku-wrapper">
  11. <danmakuManager
  12. ref="danmakuRef"
  13. :danmakuList="danmakuList"
  14. :height="100"
  15. :infinite="true"
  16. :speed="80"
  17. @danmakuComplete="onDanmakuComplete"
  18. ></danmakuManager>
  19. </view>
  20. <view class="dialogue-tips">
  21. <view class="tips-name">
  22. <image class="tip-img" :src="`${config.BASIC_IMG}img/treePage/sun-icon.png`"></image>
  23. <text>亲爱的主人!</text>
  24. </view>
  25. <view class="tips-cont">今天是我开花的日子,我很开心!</view>
  26. </view>
  27. <view class="tree-name">
  28. <view>{{treeName}}</view>
  29. <image v-if="userInfo.tel" @click="handleEditName" class="edit-icon" :src="`${config.BASIC_IMG}img/edit-icon.png`">
  30. </image>
  31. </view>
  32. <image class="drone-icon" :src="`${config.BASIC_IMG}img/treePage/drone-icon.png`"></image>
  33. <view class="tool-wrap">
  34. <view class="tool-left">
  35. <view :class="['tool-item',item.className]" v-for="(item,index) in toolLeftList" :key="index"
  36. @click="handleToolItem(item)">
  37. <image class="icon" :src="`${config.BASIC_IMG}img/treePage/l-tree-icon-${index+1}.png`">
  38. </image>
  39. <view class="name">{{item.name}}</view>
  40. </view>
  41. </view>
  42. <view class="tool-right">
  43. <view :class="['tool-item',item.className]" v-for="(item,index) in toolRightList" :key="index"
  44. @click="handleToolItem(item)">
  45. <image class="icon" :src="`${config.BASIC_IMG}img/treePage/r-tree-icon-${index+1}.png`">
  46. </image>
  47. <view class="name">{{item.name}}</view>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. <view class="tree-footer">
  53. <template v-if="userInfo.tel">
  54. <view class="footer-item" v-for="(item,index) in footerList" :key="index" @click="handleItem(index)">
  55. <view @click="requestSubscribe">
  56. <button class="share-btn" open-type="share" v-if="index === 2">
  57. <image class="icon" :src="`${config.BASIC_IMG}img/treePage/b-tree-icon-${index+1}.png`">
  58. </image>
  59. </button>
  60. <image v-else class="icon" :class="{small:index === 0}" :src="`${config.BASIC_IMG}img/treePage/b-tree-icon-${index+1}.png`">
  61. </image>
  62. <view class="name">{{item}}</view>
  63. </view>
  64. </view>
  65. </template>
  66. <view v-else class="button" @click="handlePage">开启我的守护</view>
  67. </view>
  68. </view>
  69. <!-- 引导弹窗 -->
  70. <view class="guide-bg" v-if="showMask" @click="handleClose">
  71. <image class="guide-icon" :src="`${config.BASIC_IMG}img/treePage/guide-1.png`"></image>
  72. </view>
  73. <!-- 切换 -->
  74. <up-picker :show="showPicker" :columns="columns" :defaultIndex="[0]" @cancel="handleCancel"
  75. @confirm="handleConfirm" keyName="name" valueName="speciesId"></up-picker>
  76. <!-- 签到打卡 -->
  77. <checkinPopup v-if="showCheckin" @closedCheckPopup="closedCheckPopup"></checkinPopup>
  78. <!-- 编辑树名称 -->
  79. <editNamePopup ref="editNameRef" @editEnd="getBySampleId"></editNamePopup>
  80. <!-- 海报弹窗 -->
  81. <posterPopup
  82. :showPoster="showPoster"
  83. :farmBuyId="farmBuyId"
  84. :treeName="treeName"
  85. :sampleId="sampleId"
  86. @download-poster="handleDownloadPoster"
  87. ></posterPopup>
  88. <!-- 果树成功弹窗 -->
  89. <guardSuccessPopup :show="showGuardSuccess" :treeData="treeData" @closedGuardSuccessPopup="featchIsLookedGuide"></guardSuccessPopup>
  90. <!-- 果树相册弹窗 -->
  91. <tree-album-popup :show="showAlbum" :farmBuyId="farmBuyId" :sampleId="sampleId"></tree-album-popup>
  92. <!-- 等级升级成功弹窗 -->
  93. <levelSuccessPopup :show="showUpgradePopup" @closeLevel="closeLevel"></levelSuccessPopup>
  94. <!-- 祝福弹窗 -->
  95. <blessingsPopup :show="showBlessingsPopup" :showSuccess="showSuccess" :farmBuyId="farmBuyId"
  96. :clockinType="clockinType" @clockinCallback="getBySampleId" @closeBlessings="closeBlessings"></blessingsPopup>
  97. <!-- canvas生成图片 - 隐藏的canvas元素 -->
  98. <canvas id="posterCanvas" canvas-id="posterCanvas" style="width: 1380rpx;height: 2280rpx;position: fixed;left: 750rpx;top: 2000rpx;z-index: 9999;"></canvas>
  99. </view>
  100. </template>
  101. <script setup>
  102. import config from "@/api/config.js"
  103. import {
  104. onLoad,
  105. onShareAppMessage,
  106. onShow,
  107. onHide,
  108. onUnload
  109. } from '@dcloudio/uni-app'
  110. import memberLevel from "./components/memberLevel.vue"
  111. import treeAlbumPopup from "./components/treeAlbumPopup.vue"
  112. import blessingsPopup from "./components/blessingsPopup.vue"
  113. import checkinPopup from "@/components/checkinPopup/checkinPopup.vue"
  114. import editNamePopup from "@/components/editNamePopup/editNamePopup.vue"
  115. import guardSuccessPopup from "@/components/guardSuccessPopup/guardSuccessPopup.vue"
  116. import levelSuccessPopup from "@/components/levelSuccessPopup/levelSuccessPopup.vue"
  117. import danmakuManager from "@/components/danmakuManager/danmakuManager.vue"
  118. import posterPopup from "@/components/posterPopup/posterPopup.vue"
  119. import TREE from '@/api/tree.js'
  120. import USER from '@/api/user.js'
  121. import { CanvasUtils } from '@/utils/canvasUtils.js'
  122. import {
  123. onMounted,
  124. ref
  125. } from 'vue';
  126. const name = ref('荔枝')
  127. const showPicker = ref(false)
  128. const columns = ref([[{name:'荔枝',speciesId:'1'}]]);
  129. const speciesId = ref('')
  130. const handleShow = () => {
  131. showPicker.value = true
  132. }
  133. const handleCancel = () => {
  134. showPicker.value = false
  135. }
  136. const handleConfirm = (e) => {
  137. name.value = e.value[0].name
  138. speciesId.value = e.value[0].speciesId
  139. handleCancel()
  140. }
  141. const toolLeftList = [{
  142. name: "相册",
  143. clickName: 'album'
  144. },
  145. {
  146. name: "日记",
  147. path: 'diary'
  148. },
  149. {
  150. name: "海报",
  151. className: 'blue',
  152. clickName: 'poster'
  153. },
  154. {
  155. name: "礼物",
  156. className: 'gift',
  157. path: 'gift'
  158. }
  159. ]
  160. const toolRightList = [{
  161. name: "好友",
  162. className: 'friend',
  163. path: 'rank'
  164. },
  165. {
  166. name: "认养",
  167. },
  168. {
  169. name: "果园",
  170. },
  171. {
  172. name: "动态",
  173. className: 'dynamic',
  174. path: 'dynamic',
  175. params: 'farmBuyId'
  176. }
  177. ]
  178. const showGuardSuccess = ref(false)
  179. const showCheckin = ref(false)
  180. const editNameRef = ref(null)
  181. const formatDate = (dateStr) => {
  182. return dateStr.split(" ")[0].replace(/-/g, ".");
  183. };
  184. const handleEditName = () => {
  185. editNameRef.value.showPopup({
  186. id: farmBuyId.value,
  187. treeName: treeName.value,
  188. nickname: treeData.value.buyList[0].nickname,
  189. showName: treeData.value.buyList[0].showName,
  190. createDate: formatDate(treeData.value.buyList[0].createDate),
  191. })
  192. }
  193. const userInfo = ref({})
  194. // onLoad(() => {
  195. // featchCategoryList()
  196. // })
  197. onShow(async ()=>{
  198. userInfo.value = uni.getStorageSync('userInfo')
  199. await featchLightTree(() => {
  200. handleUpgrade()
  201. })
  202. featchSessionStore()
  203. })
  204. onHide(() => {
  205. // 页面隐藏时停止弹幕
  206. stopDanmaku()
  207. })
  208. onUnload(() => {
  209. // 页面卸载时停止弹幕
  210. stopDanmaku()
  211. })
  212. onMounted(() => {
  213. featchIsLookedGuide()
  214. })
  215. async function handleUpgrade() {
  216. // 是否有200积分弹窗
  217. await TREE.fetchLevelAwardInfo({buyId: farmBuyId.value}).then(({data}) => {
  218. if (data?.hasAward) {
  219. clockinType.value = 4
  220. showSuccess.value = !showSuccess.value
  221. } else {
  222. showCheckin.value = true
  223. }
  224. })
  225. }
  226. //品类查询所有
  227. const featchCategoryList = () =>{
  228. TREE.categoryList().then(({
  229. data
  230. }) => {
  231. columns.value[0] = data || []
  232. speciesId.value = data[0].speciesId
  233. featchLightTree()
  234. })
  235. }
  236. const showMask = ref(false)
  237. const featchIsLookedGuide = () => {
  238. USER.isLookedGuide({
  239. type: 1
  240. }).then(({
  241. data
  242. }) => {
  243. if (data == false) {
  244. showMask.value = true
  245. }
  246. })
  247. }
  248. const handleClose = async () =>{
  249. const {code} = await USER.lookedGuide({type:1})
  250. if(code === 0){
  251. showMask.value = false
  252. }
  253. }
  254. const featchSessionStore = () => {
  255. USER.getSessionStore({
  256. key: 'successTree',
  257. miniUserId: userInfo.value.id
  258. }).then((({data}) => {
  259. if(data?.text === 'orderSuccess'){
  260. // clockinType.value = 4
  261. // showSuccess.value = !showSuccess.value
  262. // treeSetSessionStore()
  263. }else{
  264. if (data?.val == 0) {
  265. showGuardSuccess.value = !showGuardSuccess.value
  266. treeSetSessionStore()
  267. }else{
  268. featchIsLookedGuide()
  269. }
  270. }
  271. }))
  272. }
  273. const treeSetSessionStore = () =>{
  274. USER.setSessionStore({
  275. key: 'successTree',
  276. miniUserId: userInfo.value.id,
  277. val:1,
  278. text:'1'
  279. })
  280. }
  281. // 得到200分弹窗关闭
  282. function closeBlessings() {
  283. TREE.fetchClaimAward({buyId: farmBuyId.value, levelAwardId: 1}).then(({data}) => {
  284. showUpgradePopup.value = true
  285. })
  286. }
  287. // 升级弹窗关闭方法
  288. function closeLevel() {
  289. showCheckin.value = true
  290. }
  291. const closedCheckPopup = () =>{
  292. showPoster.value = !showPoster.value
  293. }
  294. const sampleId = ref('')
  295. //通过品类查询当前树
  296. const featchLightTree = (callback) =>{
  297. TREE.getLightTreeList().then((res =>{
  298. sampleId.value = res.data[0].sampleId
  299. getBySampleId(callback)
  300. }))
  301. }
  302. const treeData = ref({})
  303. const farmBuyId = ref('')
  304. const treeName = ref('')
  305. const getBySampleId = (callback) => {
  306. TREE.getBySampleId({
  307. sampleId: sampleId.value
  308. }).then(({
  309. data
  310. }) => {
  311. treeData.value = data || {}
  312. if (userInfo.value.tel) {
  313. treeName.value = data.buyList[0].treeName || (data.buyList[0].nickname.length ? data.buyList[0]
  314. .nickname.slice(0, 3) + "荔" : data.buyList[0].owner.slice(0, 3) + "荔")
  315. } else {
  316. treeName.value = '飞鸟守护'
  317. }
  318. farmBuyId.value = data.buyList[0].id
  319. callback && callback()
  320. featchSessionStore()
  321. // 获取能量记录
  322. // featchEnergyRecords()
  323. })
  324. }
  325. const handlePage = () =>{
  326. uni.navigateTo({
  327. url: `/pages/login/index`
  328. });
  329. }
  330. const showPoster = ref(false)
  331. const showAlbum = ref(false)
  332. const handleToolItem = ({
  333. path,
  334. clickName,
  335. params
  336. }) => {
  337. if (clickName === 'album') {
  338. showAlbum.value = !showAlbum.value
  339. } else if (clickName === 'poster') {
  340. showPoster.value = !showPoster.value
  341. } else {
  342. uni.navigateTo({
  343. url: `/pages/tabBar/tree/subPages/${path}?farmBuyId=${farmBuyId.value}&sampleId=${sampleId.value}`
  344. });
  345. }
  346. }
  347. const footerList = ["每日阳光", "送ta祝福", "分享转发", "水果订购"]
  348. const showBlessingsPopup = ref(false)
  349. const showSuccess = ref(false)
  350. const showUpgradePopup = ref(false)
  351. const clockinType = ref('1')
  352. // 弹幕相关数据
  353. const danmakuList = ref([])
  354. const featchEnergyRecords = () => {
  355. console.log('开始获取能量记录,farmBuyId:', farmBuyId.value)
  356. TREE.getEnergyRecords({
  357. page: 1,
  358. limit: 9999,
  359. onlyOther:1,
  360. farmBuyId: farmBuyId.value
  361. }).then(({
  362. data
  363. }) => {
  364. console.log('接口返回的原始数据:', data)
  365. // 将接口返回的数据转换为弹幕组件期望的格式
  366. const formattedData = (data || []).map(item => ({
  367. msg: item.desc || item.text || item.content || '守护果树,收获美好', // 使用desc字段作为消息内容
  368. icon: item.icon || `${config.BASIC_IMG}img/treePage/drone-icon.png` // 使用icon字段作为头像
  369. }))
  370. console.log('格式化后的弹幕数据:', formattedData)
  371. danmakuList.value = formattedData
  372. if(formattedData.length > 0){
  373. console.log('有弹幕数据,准备启动弹幕')
  374. // 页面显示时启动弹幕
  375. setTimeout(() => {
  376. startDanmaku()
  377. }, 1000)
  378. } else {
  379. console.log('没有弹幕数据')
  380. }
  381. }).catch(error => {
  382. console.error('获取能量记录失败:', error)
  383. })
  384. }
  385. // 弹幕组件引用
  386. const danmakuRef = ref(null)
  387. // 弹幕完成回调
  388. const onDanmakuComplete = (id) => {
  389. // console.log('弹幕播放完成:', id)
  390. }
  391. // 启动弹幕
  392. const startDanmaku = () => {
  393. console.log('启动弹幕,danmakuRef:', danmakuRef.value)
  394. if (danmakuRef.value) {
  395. console.log('调用弹幕组件的startDanmakuAnimation方法')
  396. danmakuRef.value.startDanmakuAnimation()
  397. } else {
  398. console.log('弹幕组件引用为空')
  399. }
  400. }
  401. // 停止弹幕
  402. const stopDanmaku = () => {
  403. if (danmakuRef.value) {
  404. danmakuRef.value.stopDanmakuAnimation()
  405. }
  406. }
  407. // 创建canvas工具类实例
  408. const canvasUtils = new CanvasUtils('posterCanvas')
  409. // 处理海报下载
  410. const handleDownloadPoster = async (data) => {
  411. // 检查数据完整性
  412. if (!data || !data.treeObj) {
  413. uni.showToast({
  414. title: '数据不完整,无法生成海报',
  415. icon: 'none'
  416. });
  417. return;
  418. }
  419. try {
  420. uni.showLoading({
  421. title: '正在生成海报...',
  422. mask: true
  423. });
  424. const success = await canvasUtils.generateAndSave(data);
  425. uni.hideLoading();
  426. } catch (error) {
  427. uni.hideLoading();
  428. console.error('海报处理出错:', error);
  429. uni.showToast({
  430. title: '海报生成失败: ' + error.message,
  431. icon: 'none'
  432. });
  433. }
  434. }
  435. const handleItem = (index) => {
  436. if (index === 0) {
  437. clockinType.value = 1
  438. if (treeData.value.buyList[0].level.clockinMap['1']) {
  439. uni.showToast({
  440. title: '今日已守护',
  441. icon: 'none',
  442. duration: 2000
  443. });
  444. } else {
  445. showSuccess.value = !showSuccess.value
  446. }
  447. } else if (index === 1) {
  448. clockinType.value = 3
  449. if (treeData.value.buyList[0].level.clockinMap['3']) {
  450. uni.showToast({
  451. title: '今日已送过祝福',
  452. icon: 'none',
  453. duration: 2000
  454. });
  455. } else {
  456. showBlessingsPopup.value = !showBlessingsPopup.value
  457. }
  458. } else if (index === 2) {
  459. clockinType.value = 2
  460. if (!treeData.value.buyList[0].level.clockinMap['2']) {
  461. showSuccess.value = !showSuccess.value
  462. }
  463. } else {
  464. uni.navigateTo({
  465. url: `/pages/tabBar/home/subPages/gardenItem`
  466. });
  467. }
  468. }
  469. function requestSubscribe() {
  470. // #ifdef MP-WEIXIN
  471. //订阅模板
  472. TREE.getSubscribeTemplate({
  473. id: 1
  474. }).then(({
  475. data
  476. }) => {
  477. uni.requestSubscribeMessage({
  478. tmplIds: [data.templateId], // 模板ID
  479. success(res) {
  480. if (res[data.templateId] === 'accept') {
  481. TREE.addSubscribe({
  482. templateId: 1
  483. })
  484. } else if (res[data.templateId] === 'reject') {
  485. console.log('用户拒绝订阅模板');
  486. }
  487. },
  488. fail(err) {
  489. uni.openSetting({
  490. withSubscriptions: true, // 显示订阅消息开关
  491. });
  492. },
  493. });
  494. })
  495. // #endif
  496. }
  497. onShareAppMessage((res) => {
  498. return {
  499. title: '我分享了我的果树,快来查看吧~',
  500. path: `/pages/tabBar/tree/subPages/friendTree?sampleId=${sampleId.value}`, // 分享的小程序页面路径
  501. imageUrl: `http://birdseye-api.feiniaotech.sysuimars.cn/mini/z_farm_buy/genImage/${farmBuyId.value}?key=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9&x1=25&y1=220&fontSize1=40&x2=55&y2=250&fontSize2=16&timestamp=${Date.now()}`,
  502. }
  503. })
  504. </script>
  505. <style lang="scss" scoped>
  506. @import "@/static/style/mixin.scss";
  507. .guide-bg{
  508. position: fixed;
  509. top: 0;
  510. width: 100%;
  511. height: 107vh;
  512. @include ossBg("treePage/guide-bg.png");
  513. z-index: 999;
  514. display: flex;
  515. align-items: center;
  516. justify-content: center;
  517. .guide-icon{
  518. width: 360rpx;
  519. height: 236rpx
  520. }
  521. }
  522. /* #ifdef H5 */
  523. .guide-bg{
  524. height: 102vh;
  525. }
  526. /* #endif */
  527. .base-container {
  528. @include ossBg("tree-bg.png");
  529. // background-position: top left;
  530. padding: 22rpx 0;
  531. position: relative;
  532. .danmaku-wrapper {
  533. position: absolute;
  534. top: 21%;
  535. left: 0;
  536. right: 0;
  537. z-index: 100;
  538. pointer-events: none;
  539. }
  540. .toogle {
  541. position: absolute;
  542. right: 0;
  543. top: calc(50% - 32rpx);
  544. font-size: 24rpx;
  545. color: #fff;
  546. border-radius: 50rpx 0 0 50rpx;
  547. background: rgba(0, 0, 0, 0.2);
  548. padding: 12rpx 20rpx;
  549. display: flex;
  550. .icon {
  551. margin-left: 10rpx;
  552. }
  553. }
  554. .tree-cont {
  555. width: 100%;
  556. margin-top: 10rpx;
  557. .dialogue-tips{
  558. position: absolute;
  559. top: 31.5%;
  560. right: 80rpx;
  561. font-size: 24rpx;
  562. @include ossBg("treePage/tips-bg.png");
  563. padding: 10rpx 10rpx 30rpx 20rpx;
  564. .tips-name{
  565. font-size: 28rpx;
  566. font-weight: 500;
  567. margin-bottom: 6rpx;
  568. display: flex;
  569. align-items: center;
  570. .tip-img{
  571. width: 40rpx;
  572. height: 40rpx;
  573. margin-right: 4rpx;
  574. }
  575. }
  576. }
  577. .tree-name {
  578. position: absolute;
  579. top: 60.45%;
  580. left: calc(50% - 32rpx);
  581. z-index: 2;
  582. font-size: 22rpx;
  583. font-family: 'SweiSpringCJKtc';
  584. text-align: center;
  585. width: 88rpx;
  586. .edit-icon {
  587. width: 44rpx;
  588. height: 44rpx;
  589. margin-top: 14rpx;
  590. }
  591. }
  592. .drone-icon {
  593. width: 376rpx;
  594. height: 384rpx;
  595. margin-left: 26rpx;
  596. }
  597. .tool-wrap {
  598. width: 100%;
  599. padding: 14rpx;
  600. box-sizing: border-box;
  601. position: absolute;
  602. bottom: calc(50% - 350rpx);
  603. display: flex;
  604. justify-content: space-between;
  605. .tool-left,
  606. .tool-right {
  607. .tool-item {
  608. color: #fff;
  609. font-size: 24rpx;
  610. font-weight: 500;
  611. text-align: center;
  612. width: 100rpx;
  613. margin-bottom: 16rpx;
  614. text-shadow:
  615. 0 0 3rpx #D7660A,
  616. 0 0 3rpx #D7660A,
  617. 0 0 3rpx #D7660A,
  618. 0 0 3rpx #D7660A;
  619. &.blue {
  620. text-shadow:
  621. 0 0 3rpx #2199F8,
  622. 0 0 3rpx #2199F8,
  623. 0 0 3rpx #2199F8,
  624. 0 0 3rpx #2199F8;
  625. }
  626. .icon {
  627. width: 100%;
  628. height: 82rpx;
  629. position: relative;
  630. }
  631. .name {
  632. margin-top: -24rpx;
  633. position: relative;
  634. z-index: 2;
  635. }
  636. &.gift {
  637. .icon {
  638. height: 114rpx;
  639. margin-top: -5rpx;
  640. }
  641. .name {
  642. margin-top: -44rpx;
  643. }
  644. }
  645. &.friend {
  646. .icon {
  647. height: 90rpx;
  648. }
  649. .name {
  650. margin-top: -35rpx;
  651. }
  652. }
  653. &.dynamic {
  654. .icon {
  655. height: 96rpx;
  656. }
  657. .name {
  658. margin-top: -32rpx;
  659. }
  660. }
  661. }
  662. }
  663. }
  664. }
  665. .tree-footer {
  666. position: absolute;
  667. left: 0;
  668. bottom: 76rpx;
  669. width: 100%;
  670. display: flex;
  671. justify-content: center;
  672. .button {
  673. padding: 26rpx 80rpx;
  674. border-radius: 50rpx;
  675. border: 2rpx solid #fff;
  676. background-image: linear-gradient(120deg, #FFD887, #ED9E1E);
  677. margin-top: 20rpx;
  678. color: #fff;
  679. }
  680. .footer-item {
  681. width: 18%;
  682. text-align: center;
  683. .icon {
  684. width: 96rpx;
  685. height: 96rpx;
  686. }
  687. .share-btn {
  688. background: transparent;
  689. display: inline-flex;
  690. .icon {
  691. width: 90rpx;
  692. height: 90rpx;
  693. margin-top: 6rpx;
  694. }
  695. &::after {
  696. border: none;
  697. }
  698. }
  699. .small{
  700. width: 90rpx;
  701. height: 90rpx;
  702. margin-top: 6rpx;
  703. }
  704. .name {
  705. font-size: 24rpx;
  706. font-weight: 500;
  707. padding: 2rpx 16rpx;
  708. background-image: linear-gradient(0deg, #FFFFFF, #FFE079);
  709. border-radius: 50rpx;
  710. border: 2rpx solid #fff;
  711. }
  712. }
  713. .footer-item+.footer-item {
  714. margin-left: 30rpx;
  715. }
  716. }
  717. }
  718. </style>