1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <template>
- <view>
- <image v-for="(item, index) in detail.attinfos_pic" :key="item.attachmentid" class="image"
- :src="item.attinfos[0].url" mode="widthFix" hover-class="navigator-hover" lazy-load="true"
- @click="onClick(item, index)" />
-
- <bottom1 />
- </view>
- </template>
- <script>
- import { viewImage } from "../../../utils/settleFiles";
- import bottom1 from "./bottom1.vue";
- export default {
- name: "advertisingPage",
- components: { bottom1 },
- data() {
- return {
- detail: {},
- }
- },
- methods: {
- getDetail(id) {
- return new Promise((resolve, reject) => {
- this.$Http.basic({
- "id": "20240408131902",
- "content": {
- "sat_sharematerialid": id
- }
- }).then(res => {
- console.log('获取长图文详情', res)
- if (this.cutoff(res.msg)) return;
- this.detail = res.data;
- resolve(res.data)
- uni.setNavigationBarTitle({
- title: res.data.title,
- })
- })
- })
- },
- onClick(item, index) {
- console.log(item, index)
- if (item.jumpurl) {
- uni.navigateTo({
- url: item.jumpurl,
- fail: (fail) => {
- viewImage(item.attinfos[0].url)
- },
- })
- } else {
- viewImage(item.attinfos[0].url)
- }
- }
- },
- }
- </script>
- <style lang="scss" scoped>
- .image {
- width: 100vw;
- margin-top: 10px;
- }
- .image:first-child {
- margin-top: 0;
- }
- </style>
|