bottomCont.vue 4.03 KB
Newer Older
liujinsa committed
1 2 3 4 5 6 7 8 9 10 11 12
<template>
  <div class="bottomCont">
      <div class="bc1 flex">
        <i></i>
        <p @click="showVConsoles">底线在此,不能更低了</p>
        <i></i>
      </div>
      <div class="bc2">
        <img :src="shopInfo.logoUrl" alt />
      </div>
      <div class="bc3">
        <!-- 送颂 -->
liujinsa committed
13
        <p v-if="shopInfo.shopCode=='songsong'">送颂科技提供技术支持</p>
liujinsa committed
14
        <!-- 嗨有料 -->
liujinsa committed
15
        <p v-else-if="shopInfo.shopCode=='HYL' || shopInfo.shopCode=='Id9uwD' "></p>
liujinsa committed
16 17 18 19 20 21
        <!-- <p
          v-else-if="Array.isArray(this.$store.state.sceneModule.songCopyright)"
          @click="showCookie"
        >{{this.$store.state.sceneModule.songCopyright.some(item=>item==shopInfo.shopCode)?'送颂科技提供技术支持':'小工蚁(上股交N板企业300258)提供平台服务'}}</p> -->
      </div>
      <div class="height7"></div>
程智春 committed
22 23 24 25

      <div class="hide-wrap" v-if="showHideWrap" @click="showActionSheet">
        <i class="ant-fenlei-line" style="font-size:22px"></i>
      </div>
liujinsa committed
26 27 28 29 30 31 32 33 34 35 36
  </div>
</template>

<script type="text/ecmascript-6">
import { DFSImg } from "@/utils/index";
export default {
  data() {
    return {
      shopInfo: {
        logoUrl:''
      },
程智春 committed
37 38
      showVConsole : 0,
      showHideWrap : false,
liujinsa committed
39 40 41 42 43 44
    };
  },
  created(){
    this.shopInfo = this.mpApp.globalData.shopInfo
    this.shopInfo.logoUrl = DFSImg(this.shopInfo.logoUrl, 400, 400)
    console.log(this.shopInfo,'mpapp123')
程智春 committed
45 46 47 48

    if(wx.getStorageSync('workBox')){
      this.showHideWrap = true
    }
liujinsa committed
49 50 51 52 53 54
  },
  onLoad() {
  },
  onShow(){
  },
  methods:{
程智春 committed
55 56 57 58 59 60 61 62 63 64 65 66 67 68
    showVConsoles(){

      this.showVConsole++;
      if (this.showVConsole >= 10) {
        this.showVConsole=0;

        wx.setStorageSync('workBox','1')
        this.showHideWrap = true
        
      }
      
    },
    showActionSheet(){
      let vm = this
李嘉林 committed
69 70 71 72 73 74
      let accountInfo = wx.getAccountInfoSync(); 
      let version = accountInfo.miniProgram.version; // 1.0.0 小程序版本号
      let itemList = ['复制页面路径', '隐藏工具箱'];
      if(version){
        itemList.push(`当前版本号:${version}`)
      }
程智春 committed
75
      wx.showActionSheet({
李嘉林 committed
76
        itemList,
程智春 committed
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
        success (res) {
          console.log(res.tapIndex)

          if(res.tapIndex == 0){
            vm.copyUrl()
          }else if(res.tapIndex == 1){
            vm.hideUtils()
          }
        },
        fail (res) {
          console.log(res.errMsg)
        }
      })
    },
    copyUrl(){
      let pages = getCurrentPages()
      let currentPage = pages[pages.length - 1]
      
      let route = currentPage.route
      let options = currentPage.options
      console.log(route,options,'currentPage')
      let query = ''
      for(let attr in options){
        query = attr + '=' + options[attr] + '&'
      }
      let href = '/' + route

      if(query){
        href += '?' + query
      }
      console.log(query)
      wx.setClipboardData({
        data: href,
        success (res) {

        }
      })
    },
    hideUtils(){
      this.showHideWrap = false
      wx.removeStorageSync('workBox','1')
    }
liujinsa committed
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
  }
}
</script>

<style lang="scss" scoped>
  .bottomCont {
    width: 100%;
    position: absolute;
    padding: 10px 0;
    z-index:10;
    div {
      width: 70%;
      margin: 0 auto;
      text-align: center;
      color: #999;
      font-size: 13px;
    }
    .bc1 {
      justify-content: space-between;
      align-items: center;
      i {
        width: 15%;
        height: 1px;
        background: #c3c3c3;
      }
    }
    .bc2 {
      width: 64px;
      height: 64px;
      margin-top: 20px;
      margin-bottom: 10px;
      img {
        width: 100%;
        height: 100%;
        object-fit: contain;
      }
    }
    .height7{
      width:100%;
      height: 50px;
    }
  }
程智春 committed
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
  .hide-wrap{
    width: 40px !important;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 5px;
    font-size: 20px;
  }
liujinsa committed
176
</style>