hookehuyr

✨ feat(活动详情页): 活动详情里的图片新增长按功能

......@@ -11,7 +11,7 @@
"dependencies": {
"@babel/runtime": "^7.7.7",
"@tarojs/components": "3.4.10",
"@tarojs/extend": "^3.5.7",
"@tarojs/extend": "^3.6.2",
"@tarojs/plugin-framework-react": "^3.4.10",
"@tarojs/plugin-framework-vue3": "3.4.10",
"@tarojs/plugin-html": "^3.4.10",
......@@ -3542,10 +3542,9 @@
}
},
"node_modules/@tarojs/extend": {
"version": "3.5.7",
"resolved": "https://mirrors.cloud.tencent.com/npm/@tarojs%2fextend/-/extend-3.5.7.tgz",
"integrity": "sha512-duVxMBtmafSH751zztv3RCOH1D1LbNZhhV0Gnvtla4/6R1DUBTONBs1KWg1O5ED4FQsv7TGCvwWSetBqEYYD6g==",
"license": "MIT"
"version": "3.6.2",
"resolved": "https://mirrors.cloud.tencent.com/npm/@tarojs/extend/-/extend-3.6.2.tgz",
"integrity": "sha512-lKClhLFk9CPfT2z+djdzX4dBr3KLCzVystjC4KnZ00EAW7j6DlyiudwVUXmPwHAyEkq7n99qKZBy/lWQ3+p+cw=="
},
"node_modules/@tarojs/helper": {
"version": "3.4.10",
......@@ -26961,9 +26960,9 @@
}
},
"@tarojs/extend": {
"version": "3.5.7",
"resolved": "https://mirrors.cloud.tencent.com/npm/@tarojs%2fextend/-/extend-3.5.7.tgz",
"integrity": "sha512-duVxMBtmafSH751zztv3RCOH1D1LbNZhhV0Gnvtla4/6R1DUBTONBs1KWg1O5ED4FQsv7TGCvwWSetBqEYYD6g=="
"version": "3.6.2",
"resolved": "https://mirrors.cloud.tencent.com/npm/@tarojs/extend/-/extend-3.6.2.tgz",
"integrity": "sha512-lKClhLFk9CPfT2z+djdzX4dBr3KLCzVystjC4KnZ00EAW7j6DlyiudwVUXmPwHAyEkq7n99qKZBy/lWQ3+p+cw=="
},
"@tarojs/helper": {
"version": "3.4.10",
......
......@@ -36,7 +36,7 @@
"dependencies": {
"@babel/runtime": "^7.7.7",
"@tarojs/components": "3.4.10",
"@tarojs/extend": "^3.5.7",
"@tarojs/extend": "^3.6.2",
"@tarojs/plugin-framework-react": "^3.4.10",
"@tarojs/plugin-framework-vue3": "3.4.10",
"@tarojs/plugin-html": "^3.4.10",
......
<!--
* @Date: 2022-09-26 14:36:57
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-11-17 11:22:45
* @LastEditTime: 2023-03-01 11:20:02
* @FilePath: /swx/src/pages/activityDetail/index.vue
* @Description: 活动详情页
-->
......@@ -102,8 +102,13 @@
</view>
</view>
<view class="activity-note">
<view v-html="activity.note" class="taro_html"></view>
<view id="taro_html" v-html="activity.note" class="taro_html"></view>
</view>
<!-- <image
:show-menu-by-longpress="true"
style="width: 300px;height: 300px;background: #fff;"
src="https://cdn.ipadbiz.cn/space/068a790496c87cb8d2ed6e551401c544.png"
/> -->
</view>
<view style="height: 6rem;"></view>
<activity-bar
......@@ -158,7 +163,7 @@
<script setup>
import activityBar from '@/components/activity-bar.vue'
import Taro from '@tarojs/taro'
import Taro, { nextTick } from '@tarojs/taro'
import PosterBuilder from '@/components/PosterBuilder/index.vue';
import { ref, onMounted } from "vue";
import { formatDate } from '@/utils/tools.js'
......@@ -167,6 +172,7 @@ import { qrCodeActivityAPI } from '@/api/Activity/index';
import icon_share from '@/images/icon/share.png'
import image_line from '@/images/line@2x-2.png'
import Toast from '../../components/vant-weapp/toast/toast';
import { $ } from '@tarojs/extend'
const nickname = ref('');
const avatar = ref('');
......@@ -176,6 +182,13 @@ onMounted(async () => {
nickname.value = data.user.nickname;
avatar.value = data.user.avatar ? data.user.avatar : 'http://gyzs.onwall.cn/tou%402x.png';
}
// 给每张图片添加长按事件
nextTick(() => {
var imgs = $('#taro_html').children('.h5-p').children('.h5-img');
imgs.forEach(function (img) {
$(img).attr('show-menu-by-longpress', true)
})
})
})
const show_share = ref(false);
......
......@@ -1941,10 +1941,10 @@
"swiper" "6.8.0"
"weui" "^1.1.2"
"@tarojs/extend@^3.5.7":
"integrity" "sha512-duVxMBtmafSH751zztv3RCOH1D1LbNZhhV0Gnvtla4/6R1DUBTONBs1KWg1O5ED4FQsv7TGCvwWSetBqEYYD6g=="
"resolved" "https://mirrors.cloud.tencent.com/npm/@tarojs%2fextend/-/extend-3.5.7.tgz"
"version" "3.5.7"
"@tarojs/extend@^3.6.2":
"integrity" "sha512-lKClhLFk9CPfT2z+djdzX4dBr3KLCzVystjC4KnZ00EAW7j6DlyiudwVUXmPwHAyEkq7n99qKZBy/lWQ3+p+cw=="
"resolved" "https://mirrors.cloud.tencent.com/npm/@tarojs/extend/-/extend-3.6.2.tgz"
"version" "3.6.2"
"@tarojs/helper@3.4.10":
"integrity" "sha512-lu1KrFhusPowrljRkmoFiaOATtiPwPe+WfCbPbIa7gzM6ek+VqwNBVFeIebwyZwL8j2F1wWkk5zJAsyha/hqzw=="
......