Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
swx_weapp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2023-03-01 11:39:48 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a2d49d060f3382e00de6a05d2bb2119f69329871
a2d49d06
1 parent
567e3ad1
✨ feat(活动详情页): 活动详情里的图片新增长按功能
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
16 deletions
package-lock.json
package.json
src/pages/activityDetail/index.vue
yarn.lock
package-lock.json
View file @
a2d49d0
...
...
@@ -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"
,
...
...
package.json
View file @
a2d49d0
...
...
@@ -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"
,
...
...
src/pages/activityDetail/index.vue
View file @
a2d49d0
<!--
* @Date: 2022-09-26 14:36:57
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 202
2-11-17 11:22:45
* @LastEditTime: 202
3-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);
...
...
yarn.lock
View file @
a2d49d0
...
...
@@ -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=="
...
...
Please
register
or
login
to post a comment