Mr.Shi
2023-09-21 c826a3fa86a9ec9b1eb7aed1c1b6c0a4d09f7297
企业端
已添加4个文件
已修改5个文件
254 ■■■■■ 文件已修改
company_admin/.env.development 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company_admin/src/api/system/menu.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/components/bigImg.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/components/bigImg1.vue 140 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/components/noData.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/main.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/package-lock.json 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/index/index.vue 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/static/default_nodata@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
company_admin/.env.development
@@ -3,8 +3,8 @@
# VUE_APP_API = 'https://dmtest.ahapp.net/preselect_interface/'
VUE_APP_API = 'http://192.168.0.15:10022/'
# VUE_APP_API = 'http://192.168.0.15:10024/'
# VUE_APP_API = 'https://dmtest.ahapp.net/preselect_web_interface/'
VUE_APP_API = 'https://dmtest.ahapp.net/preselect_web_interface/'
# VUE_APP_API = 'https://dmtest.ahapp.net/preselect_interface/'
company_admin/src/api/system/menu.js
@@ -36,7 +36,7 @@
// æŸ¥è¯¢èœå•æ ‘
export function fetchMenuTree () {
  return request.get('/system/menu/treeNodes')
  return request.get('/system/menu/treeNodes?type=1')
}
// æŽ’序
h5/components/bigImg.vue
@@ -6,8 +6,8 @@
                <view class="img_content_tu_nr">
                    <swiper style="width: 100%; height: 100%;" @change="handlechange" :current="mycurrent" :indicator-dots="false"  :circular="true" :interval="1000" :duration="1000">
                        <swiper-item v-for="(item,index) in imgList" :key="index">
                            <view :class="['swiper-item',index==mycurrent ? 'active' : '']">
                                <image :src="item" style="width: 100%;height: 100%;" mode="aspectFit" />
                            <view :class="['swiper-item',index == mycurrent ? 'active' : '']">
                                <image :src="item" style="width: 150%;height: 150%;" mode="aspectFit" />
                            </view>
                        </swiper-item>
                    </swiper>
h5/components/bigImg1.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,140 @@
<template>
    <view class="img" :style="{ opacity: opacity, zIndex: zindex }">
        <view class="img_content">
            <view class="img_content_tu">
                <image class="left" src="@/static/ic_left@2x.png" mode="widthFix" @click="jian"></image>
                <view class="img_content_tu_nr">
                    <swiper style="width: 100%; height: 100%;" @change="handlechange" :current="mycurrent" :indicator-dots="false"  :circular="true" :interval="1000" :duration="1000">
                        <swiper-item v-for="(item,index) in imgList" :key="index">
                            <view :class="['swiper-item',index == mycurrent ? 'active' : '']">
                                <image :src="item" style="width: 100%;height: 100%;" mode="aspectFit" />
                            </view>
                        </swiper-item>
                    </swiper>
                </view>
                <image class="right" src="@/static/ic_right@2x.png" mode="widthFix" @click="add"></image>
            </view>
            <view class="img_content_close">
                <image src="@/static/ic_close@2x.png" mode="widthFix" @click="close"></image>
            </view>
        </view>
    </view>
</template>
<script>
    export default {
        data() {
            return {
                opacity: 0,
                zindex: '-1',
                mycurrent: 0
            }
        },
        props: {
            imgList: {
                type: Array,
                default: () => []
            }
        },
        methods: {
            add() {
                if (this.imgList.length - 1 === this.mycurrent) return
                this.mycurrent++
            },
            jian() {
                if (this.mycurrent === 0) return
                this.mycurrent--
            },
            handlechange(e){
                this.mycurrent=e.detail.current
            },
            open(i) {
                this.mycurrent = i
                this.zindex = 3
                this.opacity = 1
            },
            close() {
                this.zindex = '-1'
                this.opacity = 0
            }
        }
    }
</script>
<style lang="scss" scoped>
    .img {
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.4);
        position: fixed;
        transition: .2s;
        top: 0;
        left: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        .img_content {
            display: flex;
            flex-direction: column;
            .img_content_tu {
                display: flex;
                align-items: center;
                .img_content_tu_nr {
                    width: 600px;
                    height: 600px;
                    padding: 30px;
                    box-sizing: border-box;
                    border-radius: 8px;
                    margin: 0 32px;
                    display: flex;
                    align-items: center;
                    flex-wrap: nowrap;
                    .swiper-item{
                        width: 100%;
                        border-radius: 30rpx;
                        overflow: hidden;
                        // åƒè¿™ç§å¤šå¼ è½®æ’­å›¾åŒæ—¶å‡ºçŽ°åœ¨ä¸€å±çš„æƒ…å†µä¸‹å°±ä¸è¦æŒ‡å®šwidth了,不然你会发现previous-margin和 next-margin会出现想不到的效果
                        // å¦‚果想要设置宽每一张轮播图的宽度,只需要设置previous-margin和next-margin就可以了,想要设置高度直接改下面的height就可以了
                        // width: 450rpx;
                        height: 100%;
                        // transform: scale(1);
                        // transition: all 0.5s ease;
                        text-align: center;
                        // transition: all 0.5s ease-in-out;
                    }
                    .img_content_tu_nr_item {
                        width: 100%;
                        height: 600px;
                        image {
                            width: 100%;
                            height: 100%;
                        }
                    }
                }
                .left {
                    width: 80px;
                    height: 80px;
                    cursor: pointer;
                }
                .right {
                    width: 80px;
                    height: 80px;
                    cursor: pointer;
                }
            }
            .img_content_close {
                width: 100%;
                display: flex;
                align-items: center;
                justify-content: center;
                margin-top: 40px;
                image {
                    width: 60px;
                    height: 60px;
                    cursor: pointer;
                }
            }
        }
    }
</style>
h5/components/noData.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
<template>
    <view class="no">
        <image src="@/static/default_nodata@2x.png" mode="widthFix"></image>
    </view>
</template>
<script>
    export default {
        name:"noData"
    }
</script>
<style lang="scss" scoped>
    .no {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        // margin-top: 36px;
        padding: 36px 0;
        box-sizing: border-box;
        image {
            width: 268px;
            height: 268px;
        }
    }
</style>
h5/main.js
@@ -7,6 +7,11 @@
import store from './store/index.js'
import 'viewerjs/dist/viewer.css'
import Viewer from 'v-viewer'
Vue.use(Viewer)
Vue.prototype.$store = store;
try {
h5/package-lock.json
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
{
  "requires": true,
  "lockfileVersion": 1,
  "dependencies": {
    "throttle-debounce": {
      "version": "2.3.0",
      "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-2.3.0.tgz",
      "integrity": "sha512-H7oLPV0P7+jgvrk+6mwwwBDmxTaxnu9HMXmloNLXwnNO0ZxZ31Orah2n8lU1eMPvsaowP2CX+USCgyovXfdOFQ=="
    },
    "v-viewer": {
      "version": "1.6.4",
      "resolved": "https://registry.npmjs.org/v-viewer/-/v-viewer-1.6.4.tgz",
      "integrity": "sha512-LVkiUHpmsbsZXebeNXnu8krRCi5i2n07FeLFxoIVGhw8lVvTBO0ffpbDC6mLEuacCjrIh09HjIqpciwUtWE8lQ==",
      "requires": {
        "throttle-debounce": "^2.0.1",
        "viewerjs": "^1.5.0"
      }
    },
    "viewerjs": {
      "version": "1.11.6",
      "resolved": "https://registry.npmjs.org/viewerjs/-/viewerjs-1.11.6.tgz",
      "integrity": "sha512-TlhdSp2oEOLFXvEp4psKaeTjR5zBjTRcM/sHUN8PkV1UWuY8HKC8n7GaVdW5Xqnwdr/F1OmzLik1QwDjI4w/nw=="
    }
  }
}
h5/pages/index/index.vue
@@ -198,16 +198,19 @@
                        </view>
                    </view>
                    <view class="productPage_shop" v-if="status === 1 && !pkcontent">
                        <view class="productPage_shop_item" v-for="(item, index) in isSOU ? shopPageDataSou : shopPageData" :key="index" @click="clickshoppageItem(item)">
                            <view class="productPage_shop_item_img">
                                <image :src="item.imgurl ? item.prefixUrl + item.imgurl : ''" mode="widthFix"></image>
                        <noData v-if="shopPageData.length === 0 && shopPageDataSou.length === 0" />
                        <template v-else>
                            <view class="productPage_shop_item" v-for="(item, index) in isSOU ? shopPageDataSou : shopPageData" :key="index" @click="clickshoppageItem(item)">
                                <view class="productPage_shop_item_img">
                                    <image :src="item.imgurl ? item.prefixUrl + item.imgurl : ''" mode="widthFix"></image>
                                </view>
                                <!-- stringOperations(item.name, 6) -->
                                <text>{{item.name}}</text>
                            </view>
                            <!-- stringOperations(item.name, 6) -->
                            <text>{{item.name}}</text>
                        </view>
                        <view class="productPage_shop_zw"></view>
                        <view class="productPage_shop_zw"></view>
                        <view class="productPage_shop_zw"></view>
                            <view class="productPage_shop_zw"></view>
                            <view class="productPage_shop_zw"></view>
                            <view class="productPage_shop_zw"></view>
                        </template>
                    </view>
                     <!-- v-if="status === 2" -->
                    <view class="productPage_parameter" v-if="isPK && pkcontent">
@@ -242,6 +245,10 @@
            <bigImg
                ref="bigImg"
                :imgList="imgList"/>
            <!-- æŸ¥çœ‹å¤§å›¾ -->
            <bigImg1
                ref="bigImg1"
                :imgList="imgList"/>
            <!-- æœç´¢ -->
            
            <!-- æœç´¢ç»„ä»¶ -->
@@ -259,7 +266,9 @@
<script>
    import bigImg from '@/components/bigImg.vue'
    import bigImg1 from '@/components/bigImg1.vue'
    import search from '@/components/search.vue'
    import noData from '@/components/noData.vue'
    import { mapState } from 'vuex'
    import { categoryList, goodsList, brandList, h5Image, goodsPage, listForH5 } from '@/apis/index.js'
    export default {
@@ -338,7 +347,7 @@
                page: 1
            }
        },
        components: { bigImg, search },
        components: { bigImg, search, noData, bigImg1 },
        onLoad() {
            var that = this
            // ç›‘听键盘组合键
@@ -694,7 +703,12 @@
                        })
                    }
                })
                this.$refs.bigImg.open(0)
                // console.log(this.imgList)
                this.$viewerApi({
                  images: this.imgList,
                })
                // this.$refs.bigImg.open(0)
                // this.$refs.bigImg1.open(0)
            },
            empty() {
                this.shopList = []
@@ -1135,7 +1149,7 @@
                margin-top: 16px;
                .commodityFrom_head {
                    width: 100%;
                    height: 60px;
                    height: 45px;
                    padding: 10px 8px;
                    box-sizing: border-box;
                    background: rgba(0,224,255,0.24) linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(0,0,0,0.21) 100%);
@@ -1182,7 +1196,7 @@
                        flex-direction: column;
                        .commodityFrom_body_content_item {
                            width: 100%;
                            height: 56px;
                            height: 45px;
                            display: flex;
                            align-items: center;
                            margin-bottom: 6px;
@@ -1203,7 +1217,7 @@
                                opacity: 0;
                                transform: translate(0%, 0%);
                                z-index: -1;
                                height: 56px;
                                height: 45px;
                                display: flex;
                                align-items: center;
                                background: rgba(0,224,255,0.3);
@@ -1352,7 +1366,7 @@
                    }
                    .commodityFrom_body_total {
                        width: 100%;
                        height: 56px;
                        height: 45px;
                        display: flex;
                        align-items: center;
                        .commodityFrom_body_total_item {
@@ -1444,7 +1458,6 @@
                    }
                }
            }
            .productPage {
                width: 100%;
                padding: 0 22px;
@@ -1452,7 +1465,7 @@
                margin-top: 16px;
                .productPage_head {
                    width: 100%;
                    height: 60px;
                    height: 45px;
                    display: flex;
                    align-items: center;
                    background: rgba(0,224,255,0.34) linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(0,0,0,0.21) 100%);
h5/static/default_nodata@2x.png