From 00bf17838b496e6fcfed2e521f9c27f8f0e3e3c7 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期一, 05 八月 2024 18:38:20 +0800
Subject: [PATCH] ‘’
---
wechat_staff/components/detailFooter/index.js | 81 +++++++++++++++++++++++++++++-----------
1 files changed, 58 insertions(+), 23 deletions(-)
diff --git a/wechat_staff/components/detailFooter/index.js b/wechat_staff/components/detailFooter/index.js
index 996192b..7991f46 100644
--- a/wechat_staff/components/detailFooter/index.js
+++ b/wechat_staff/components/detailFooter/index.js
@@ -1,8 +1,7 @@
import {
- getContentShareImg
+ getContentShareImg,
+ actionDo
} from '../../api/index'
-const { HYEventBus } = require('hy-event-store')
-const eventBus = new HYEventBus()
Component({
/**
* 缁勪欢鐨勫睘鎬у垪琛�
@@ -28,9 +27,27 @@
var app = getApp().globalData
this.setData({
bottomLift: app.bottomLift
- })
+ })
},
methods: {
+ handleShare() {
+ let map = [
+ '/pages/detailDis/product',//浜у搧璇︽儏
+ '/pages/detailDis/case',//妗堜緥璇︽儏
+ '/pages/detailDis/realpic',//瀹炴櫙璇︽儏
+ '/pages/consult/detail',//璧勮璇︽儏
+ ]
+ const { info, path} = this.data
+ actionDo({
+ actionType: 'share',
+ id: info.id
+ })
+ wx.navigateToMiniProgram({
+ appId: 'wxcd2b89fd2ff065f8',
+ path: `${map[path]}?origin=b&id=${info.id}&userId=${wx.getStorageSync('member').id}`,
+ envVersion: 'trial'
+ })
+ },
handleEnjoy() {
const {
info
@@ -40,7 +57,7 @@
flag: !info.isEnjoy
})
},
- handleCollec() {
+ handleCollec() {
const {
info
} = this.data
@@ -48,16 +65,17 @@
type: 'collec',
flag: !info.isCollection
})
+
},
handleDown() {
const {
info,
path
} = this.data
- let that = this
+
getContentShareImg({
- articleId: path + '&' + info.id,
- type: '1',
+ articleId: `${info.id}_${path}`,
+ type: '0',
// pageUrl: path,
imgurl: info.coverImage,
}).then(res => {
@@ -65,8 +83,7 @@
isShowPoster: true,
showShare: false,
posterUrl: res.data
- })
-
+ })
})
},
saveCard() {
@@ -83,11 +100,27 @@
that.setData({
isShowPoster: false
})
- wx.showToast({
- title: '淇濆瓨鎴愬姛',
- icon: 'success',
- duration: 2000
+ wx.setClipboardData({
+ data: ' >>绮惧搧妗堜緥<<\n'
+ +' 馃绮剧泭姹傜簿锛屽搧璐ㄧ敓娲火煡嘰n'
+ +'姹囬泦鍏ㄥ浗浼樼璁捐甯堣幏濂栨渚媆n'
+ +'馃憠鍚勭椋庢牸鐏垫劅妗堜緥涓婁竾濂楌煈圽n'
+ +' 鎬绘湁涓�濂楄兘鎵撳姩鎮紝閫傚悎鎮�',
+ success: function (res) {
+ wx.getClipboardData({
+ success: function (res) {
+ wx.showToast({
+ title: '鏂囨宸插鍒舵垚鍔燂紝鍘诲垎浜惂'
+ })
+ }
+ })
+ }
})
+ // wx.showToast({
+ // title: '淇濆瓨鎴愬姛',
+ // icon: 'success',
+ // duration: 2000
+ // })
}
})
@@ -95,16 +128,18 @@
})
},
batchDown() {
- console.log('鐐硅В浜嗕笅杞�');
- this.triggerEvent('down')
- setTimeout(() => {
- eventBus.emit('batchDown', [1,2,3])
- }, 1000)
- setTimeout(() => {
- wx.navigateTo({
- url: '/pages/download/index',
- }, 1000)
+ const downloadList = this.data.info.imageurlList || []
+ wx.setStorageSync('downloadList', downloadList)
+ wx.setStorageSync('downloadConfig', {
+ path: this.data.path,id: this.data.info.id
})
+ actionDo({
+ actionType: 'download',
+ id: this.data.info.id
+ })
+ wx.navigateTo({
+ url: '/pages/download/index',
+ }, 1000)
},
closeCard() {
this.setData({ isShowPoster: false })
--
Gitblit v1.9.3