hookehuyr

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

...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
11 "dependencies": { 11 "dependencies": {
12 "@babel/runtime": "^7.7.7", 12 "@babel/runtime": "^7.7.7",
13 "@tarojs/components": "3.4.10", 13 "@tarojs/components": "3.4.10",
14 - "@tarojs/extend": "^3.5.7", 14 + "@tarojs/extend": "^3.6.2",
15 "@tarojs/plugin-framework-react": "^3.4.10", 15 "@tarojs/plugin-framework-react": "^3.4.10",
16 "@tarojs/plugin-framework-vue3": "3.4.10", 16 "@tarojs/plugin-framework-vue3": "3.4.10",
17 "@tarojs/plugin-html": "^3.4.10", 17 "@tarojs/plugin-html": "^3.4.10",
...@@ -3542,10 +3542,9 @@ ...@@ -3542,10 +3542,9 @@
3542 } 3542 }
3543 }, 3543 },
3544 "node_modules/@tarojs/extend": { 3544 "node_modules/@tarojs/extend": {
3545 - "version": "3.5.7", 3545 + "version": "3.6.2",
3546 - "resolved": "https://mirrors.cloud.tencent.com/npm/@tarojs%2fextend/-/extend-3.5.7.tgz", 3546 + "resolved": "https://mirrors.cloud.tencent.com/npm/@tarojs/extend/-/extend-3.6.2.tgz",
3547 - "integrity": "sha512-duVxMBtmafSH751zztv3RCOH1D1LbNZhhV0Gnvtla4/6R1DUBTONBs1KWg1O5ED4FQsv7TGCvwWSetBqEYYD6g==", 3547 + "integrity": "sha512-lKClhLFk9CPfT2z+djdzX4dBr3KLCzVystjC4KnZ00EAW7j6DlyiudwVUXmPwHAyEkq7n99qKZBy/lWQ3+p+cw=="
3548 - "license": "MIT"
3549 }, 3548 },
3550 "node_modules/@tarojs/helper": { 3549 "node_modules/@tarojs/helper": {
3551 "version": "3.4.10", 3550 "version": "3.4.10",
...@@ -26961,9 +26960,9 @@ ...@@ -26961,9 +26960,9 @@
26961 } 26960 }
26962 }, 26961 },
26963 "@tarojs/extend": { 26962 "@tarojs/extend": {
26964 - "version": "3.5.7", 26963 + "version": "3.6.2",
26965 - "resolved": "https://mirrors.cloud.tencent.com/npm/@tarojs%2fextend/-/extend-3.5.7.tgz", 26964 + "resolved": "https://mirrors.cloud.tencent.com/npm/@tarojs/extend/-/extend-3.6.2.tgz",
26966 - "integrity": "sha512-duVxMBtmafSH751zztv3RCOH1D1LbNZhhV0Gnvtla4/6R1DUBTONBs1KWg1O5ED4FQsv7TGCvwWSetBqEYYD6g==" 26965 + "integrity": "sha512-lKClhLFk9CPfT2z+djdzX4dBr3KLCzVystjC4KnZ00EAW7j6DlyiudwVUXmPwHAyEkq7n99qKZBy/lWQ3+p+cw=="
26967 }, 26966 },
26968 "@tarojs/helper": { 26967 "@tarojs/helper": {
26969 "version": "3.4.10", 26968 "version": "3.4.10",
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
36 "dependencies": { 36 "dependencies": {
37 "@babel/runtime": "^7.7.7", 37 "@babel/runtime": "^7.7.7",
38 "@tarojs/components": "3.4.10", 38 "@tarojs/components": "3.4.10",
39 - "@tarojs/extend": "^3.5.7", 39 + "@tarojs/extend": "^3.6.2",
40 "@tarojs/plugin-framework-react": "^3.4.10", 40 "@tarojs/plugin-framework-react": "^3.4.10",
41 "@tarojs/plugin-framework-vue3": "3.4.10", 41 "@tarojs/plugin-framework-vue3": "3.4.10",
42 "@tarojs/plugin-html": "^3.4.10", 42 "@tarojs/plugin-html": "^3.4.10",
......
1 <!-- 1 <!--
2 * @Date: 2022-09-26 14:36:57 2 * @Date: 2022-09-26 14:36:57
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2022-11-17 11:22:45 4 + * @LastEditTime: 2023-03-01 11:20:02
5 * @FilePath: /swx/src/pages/activityDetail/index.vue 5 * @FilePath: /swx/src/pages/activityDetail/index.vue
6 * @Description: 活动详情页 6 * @Description: 活动详情页
7 --> 7 -->
...@@ -102,8 +102,13 @@ ...@@ -102,8 +102,13 @@
102 </view> 102 </view>
103 </view> 103 </view>
104 <view class="activity-note"> 104 <view class="activity-note">
105 - <view v-html="activity.note" class="taro_html"></view> 105 + <view id="taro_html" v-html="activity.note" class="taro_html"></view>
106 </view> 106 </view>
107 + <!-- <image
108 + :show-menu-by-longpress="true"
109 + style="width: 300px;height: 300px;background: #fff;"
110 + src="https://cdn.ipadbiz.cn/space/068a790496c87cb8d2ed6e551401c544.png"
111 + /> -->
107 </view> 112 </view>
108 <view style="height: 6rem;"></view> 113 <view style="height: 6rem;"></view>
109 <activity-bar 114 <activity-bar
...@@ -158,7 +163,7 @@ ...@@ -158,7 +163,7 @@
158 163
159 <script setup> 164 <script setup>
160 import activityBar from '@/components/activity-bar.vue' 165 import activityBar from '@/components/activity-bar.vue'
161 -import Taro from '@tarojs/taro' 166 +import Taro, { nextTick } from '@tarojs/taro'
162 import PosterBuilder from '@/components/PosterBuilder/index.vue'; 167 import PosterBuilder from '@/components/PosterBuilder/index.vue';
163 import { ref, onMounted } from "vue"; 168 import { ref, onMounted } from "vue";
164 import { formatDate } from '@/utils/tools.js' 169 import { formatDate } from '@/utils/tools.js'
...@@ -167,6 +172,7 @@ import { qrCodeActivityAPI } from '@/api/Activity/index'; ...@@ -167,6 +172,7 @@ import { qrCodeActivityAPI } from '@/api/Activity/index';
167 import icon_share from '@/images/icon/share.png' 172 import icon_share from '@/images/icon/share.png'
168 import image_line from '@/images/line@2x-2.png' 173 import image_line from '@/images/line@2x-2.png'
169 import Toast from '../../components/vant-weapp/toast/toast'; 174 import Toast from '../../components/vant-weapp/toast/toast';
175 +import { $ } from '@tarojs/extend'
170 176
171 const nickname = ref(''); 177 const nickname = ref('');
172 const avatar = ref(''); 178 const avatar = ref('');
...@@ -176,6 +182,13 @@ onMounted(async () => { ...@@ -176,6 +182,13 @@ onMounted(async () => {
176 nickname.value = data.user.nickname; 182 nickname.value = data.user.nickname;
177 avatar.value = data.user.avatar ? data.user.avatar : 'http://gyzs.onwall.cn/tou%402x.png'; 183 avatar.value = data.user.avatar ? data.user.avatar : 'http://gyzs.onwall.cn/tou%402x.png';
178 } 184 }
185 + // 给每张图片添加长按事件
186 + nextTick(() => {
187 + var imgs = $('#taro_html').children('.h5-p').children('.h5-img');
188 + imgs.forEach(function (img) {
189 + $(img).attr('show-menu-by-longpress', true)
190 + })
191 + })
179 }) 192 })
180 193
181 const show_share = ref(false); 194 const show_share = ref(false);
......
...@@ -1941,10 +1941,10 @@ ...@@ -1941,10 +1941,10 @@
1941 "swiper" "6.8.0" 1941 "swiper" "6.8.0"
1942 "weui" "^1.1.2" 1942 "weui" "^1.1.2"
1943 1943
1944 -"@tarojs/extend@^3.5.7": 1944 +"@tarojs/extend@^3.6.2":
1945 - "integrity" "sha512-duVxMBtmafSH751zztv3RCOH1D1LbNZhhV0Gnvtla4/6R1DUBTONBs1KWg1O5ED4FQsv7TGCvwWSetBqEYYD6g==" 1945 + "integrity" "sha512-lKClhLFk9CPfT2z+djdzX4dBr3KLCzVystjC4KnZ00EAW7j6DlyiudwVUXmPwHAyEkq7n99qKZBy/lWQ3+p+cw=="
1946 - "resolved" "https://mirrors.cloud.tencent.com/npm/@tarojs%2fextend/-/extend-3.5.7.tgz" 1946 + "resolved" "https://mirrors.cloud.tencent.com/npm/@tarojs/extend/-/extend-3.6.2.tgz"
1947 - "version" "3.5.7" 1947 + "version" "3.6.2"
1948 1948
1949 "@tarojs/helper@3.4.10": 1949 "@tarojs/helper@3.4.10":
1950 "integrity" "sha512-lu1KrFhusPowrljRkmoFiaOATtiPwPe+WfCbPbIa7gzM6ek+VqwNBVFeIebwyZwL8j2F1wWkk5zJAsyha/hqzw==" 1950 "integrity" "sha512-lu1KrFhusPowrljRkmoFiaOATtiPwPe+WfCbPbIa7gzM6ek+VqwNBVFeIebwyZwL8j2F1wWkk5zJAsyha/hqzw=="
......