tangning 9 ay önce
ebeveyn
işleme
c3518f9183

+ 4 - 1
package.json

@@ -18,20 +18,23 @@
   "dependencies": {
     "@vue/composition-api": "^1.7.2",
     "axios": "^1.7.7",
+    "crypto-js": "^4.2.0",
     "echarts": "^5.5.1",
     "echarts-map": "^3.0.1",
     "html2canvas": "^1.4.1",
     "jsonp": "^0.2.1",
     "qrcodejs2": "^0.0.2",
     "qs": "^6.10.3",
-    "swiper": "5",
+    "swiper": "4.5.1",
     "swiper-vue2": "^1.0.10",
     "vant": "^2.12.48",
     "vue": "^2.6.14",
+    "vue-awesome-swiper": "3.1.3",
     "vue-cli-plugin-windicss": "^1.1.6",
     "vue-cropp": "^1.1.8",
     "vue-echarts": "^7.0.3",
     "vue-router": "^3.5.4",
+    "vue-seamless-scroll": "^1.1.23",
     "vue2-preview": "^1.0.5",
     "vuex": "^3.6.2",
     "weixin-js-sdk": "^1.6.5",

+ 2 - 2
public/index.html

@@ -7,7 +7,7 @@
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
     <meta name="viewport" content="viewport-fit=cover">
     <script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
-    <!-- <script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script> -->
+    <script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
     <script src="https://gitee.com/dcloud/uni-app/raw/dev/dist/uni.webview.1.5.3.js"></script>
     <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover, user-scalable=0">
     <title>南华灯会</title>
@@ -27,6 +27,6 @@
   
 <script>
   // VConsole 默认会挂载到 `window.VConsole` 上
-  // var vConsole = new window.VConsole();
+  var vConsole = new window.VConsole();
 </script>
 </html>

+ 7 - 5
src/App.vue

@@ -8,9 +8,8 @@
       @click-right="onClickRight"
     /> -->
     <page-slide indexPagePath="/login">
-      <router-view
+      <router-view style="height: calc(100vh - 65px)"
         class="pageContent"
-        :style="{ height: isshow ? 'calc(100vh - 65px)' : '100vh' }"
       />
     </page-slide>
     <tabbar v-show="isshow" />
@@ -20,8 +19,6 @@
 <script>
 import pageSlide from '@/components/page-slide'
 import tabbar from '@/components/tabbar/index.vue'
-import jsonp from 'jsonp'
-import wx from 'weixin-js-sdk'
 export default {
   name: 'App',
   components: {
@@ -55,7 +52,11 @@ export default {
     }
   },
   mounted() {
-    this.wxShare()
+    // this.wxShare()
+    this.getRequest('/api/show/wx/getJsapiTicket').then((res) => {
+      console.log(res)
+      this.$store.dispatch('wx/initJssdk',res.data)
+      })
   },
   methods: {
     async getWinxinCodeFun(huiyi_id){//获得微信code
@@ -181,6 +182,7 @@ export default {
 .pageContent {
   /* padding-top: 46px; */
   position: relative;
+  /* height: calc(100% - 65px) */
 }
 .van-nav-bar {
   position: absolute;

+ 95 - 15
src/components/tabbar/index.vue

@@ -37,7 +37,8 @@
       @close="close"
       @open="open"
     >
-      <div class="codeData" ref="downDiv">
+    <!-- :style="{backgroundImage: `url(${codeImg})`}" -->
+      <div class="codeData" ref="downDiv" >
         <div class="close" @click="close">
           <img
             width="42px"
@@ -45,7 +46,8 @@
             src="/static/img/icon_cancel@2x.png"
           ></img>
         </div>
-        <div class="text">
+        <img class="codeImg" :src="codeImg" alt="">
+        <!-- <div class="text">
           <img
             width="100%"
             height="185px"
@@ -64,9 +66,12 @@
             <div class="qrcode" ref="qrCodeUrl1"></div>
             <div class="qrcode" ref="qrCodeUrl2"></div>
           </div>
-        </div>
+        </div> -->
       </div>
       <div class="codebutList">
+        <div class="tips" style="text-align: center; color: #fff">
+          长按保存图片
+        </div>
           <!-- <div class="downText" v-if="false">
             <div class="img flex justify-center items-center">
               <div style="width: 36px; height: 36px">
@@ -80,8 +85,8 @@
             </div>
             <div class="tips">完成6处打卡,即可点灯祈愿</div>
           </div> -->
-          <div class="downButtom flex justify-center">
-            <div class="downButtomItem" @click="handleDown">下载图片</div>
+          <div class="downButtom flex justify-center" v-if="codeListok.length>5">
+            <!-- <div class="downButtomItem" @click="handleDown">下载图片</div> -->
             <div class="downButtomItem" @click="handleqiyuan">去祈愿</div>
           </div>
         </div>
@@ -92,7 +97,10 @@
 <script>
 import { mapState } from 'vuex'
 import QRCode from 'qrcodejs2'
-let wx = window.wx
+import wx from 'weixin-js-sdk'
+import { Toast } from 'vant'
+import Bus from '@/utils/bus.js'
+
 // import QiyanQrcode from '@/components/qiyan-qrcode/qiyan-qrcode.vue'
 // import uButton from "udiv-ui/components/u-button/u-button.vue";
 export default {
@@ -104,7 +112,20 @@ export default {
       show: false,
       qrcode1: null,
       qrcode2: null,
+      codeImg: 'https://4dscene.4dage.com/new4dkk/deng/static/img/code/01.png',
       title1: '1.现在时间戳:' + Date.now(),
+      codeListok:[],
+      codeList:{
+        code1: 'https://4dscene.4dage.com/new4dkk/deng/static/img/code/01.png',
+        code2: 'https://4dscene.4dage.com/new4dkk/deng/static/img/code/02.png',
+        code3: 'https://4dscene.4dage.com/new4dkk/deng/static/img/code/04.png',
+        code4: 'https://4dscene.4dage.com/new4dkk/deng/static/img/code/05.png',
+        code5: 'https://4dscene.4dage.com/new4dkk/deng/static/img/code/06.png',
+        code6: 'https://4dscene.4dage.com/new4dkk/deng/static/img/code/07.png',
+        code7: 'https://4dscene.4dage.com/new4dkk/deng/static/img/code/11.png',
+        code8: 'https://4dscene.4dage.com/new4dkk/deng/static/img/code/12.png',
+        code9: 'https://4dscene.4dage.com/new4dkk/deng/static/img/code/13.png',
+      },
       list: [
         {
           active: '/static/img/icon_home_active.png',
@@ -169,6 +190,7 @@ export default {
     }
   },
   mounted() {
+    this.getloadlist()
     // let path = this.$route.path
     // this.list.map((item, index) => {
     //   if (path == item.path) {
@@ -178,7 +200,35 @@ export default {
     // })
   },
   methods: {
+    getloadlist() {
+      this.getRequest('/api/wx/getCode').then((res) => {
+        this.codeListok = res.data || []
+      })
+     },
     handleItem(item, index) {
+      let obj = { 
+        'https://houseoss.4dkankan.com/project/nanHua/index.html#/code?m=1':this.codeList.code1,
+        'https://houseoss.4dkankan.com/project/nanHua/index.html#/code?m=2':this.codeList.code2,
+        'https://houseoss.4dkankan.com/project/nanHua/index.html#/code?m=3':this.codeList.code3,
+        'https://houseoss.4dkankan.com/project/nanHua/index.html#/code?m=4':this.codeList.code4,
+        'https://houseoss.4dkankan.com/project/nanHua/index.html#/code?m=5':this.codeList.code5,
+        'https://houseoss.4dkankan.com/project/nanHua/index.html#/code?m=6':this.codeList.code6,
+        'https://houseoss.4dkankan.com/project/nanHua/index.html#/code?m=7':this.codeList.code7,
+        'https://houseoss.4dkankan.com/project/nanHua/index.html#/code?m=8':this.codeList.code8,
+        'https://houseoss.4dkankan.com/project/nanHua/index.html#/code?m=9':this.codeList.code9,
+        'https://houseoss.4dkankan.com/project/nanHua/index.html#/code?m=10':this.codeList.code9,
+       };
+      //  let objclockIn = { 
+      //   'https://houseoss.4dkankan.com/project/nanHua/index.html#/code?m=1':'SG-PHP2F5mD35e',
+      //   'https://houseoss.4dkankan.com/project/nanHua/index.html#/code?m=2':'SG-PHP2F5mD35e',
+      //   'https://houseoss.4dkankan.com/project/nanHua/index.html#/code?m=3':'SG-PHP2F5mD35e',
+      //   'https://houseoss.4dkankan.com/project/nanHua/index.html#/code?m=4':'SG-PHP2F5mD35e',
+      //   'https://houseoss.4dkankan.com/project/nanHua/index.html#/code?m=5':'SG-PHP2F5mD35e',
+      //   'https://houseoss.4dkankan.com/project/nanHua/index.html#/code?m=6':'SG-PHP2F5mD35e',
+      //   'https://houseoss.4dkankan.com/project/nanHua/index.html#/code?m=7':'SG-PHP2F5mD35e',
+      //   'https://houseoss.4dkankan.com/project/nanHua/index.html#/code?m=8':'SG-PHP2F5mD35e',
+      //   'https://houseoss.4dkankan.com/project/nanHua/index.html#/code?m=9':'SG-PHP2F5mD35e',
+      //  };
       console.log('handleItem', item, index)
       let that = this
       if (item.name == '扫码打卡') {
@@ -189,9 +239,9 @@ export default {
         //     console.log('条码类型:' + res.scanType)
         //     console.log('条码内容:' + res.result)
         // wx.miniProgram.postMessage({ data: { foo: 'scanCode', type: 'tabbar' } })
-        wx.miniProgram.navigateTo({
-          url: '/pages/my/index?scanCode=true'
-        })
+        // wx.miniProgram.navigateTo({
+        //   url: '/pages/my/index?scanCode=true'
+        // })
         // that.show = true
         // that.$store.commit('home/changeActive', index)
         // setTimeout(() => {
@@ -203,6 +253,29 @@ export default {
         //     that.show = true
         //   }
         // })
+        wx.scanQRCode({
+          needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
+          scanType: ["qrCode","barCode"], // 可以指定扫二维码还是一维码,默认二者都有
+          success: function (res) {
+            console.log(res, 'scanQRCode');
+            var result = res.resultStr; // 当needResult 为 1 时,扫码返回的结果
+            if(!result || (result && result.indexOf('https://houseoss.4dkankan.com/project/nanHua/index.html') == -1)){
+              return Toast('无效二维码')
+            }
+            if(result == 'https://houseoss.4dkankan.com/project/nanHua/index.html#/code?m=10'){//线下祈福
+              that.$router.push('/prayers/list')
+              return 
+            }
+            that.show = true;
+            that.codeImg = obj[result];
+            // that.$store.commit("changeActive", index);
+            if(!that.codeListok.includes(result)){
+              Bus.emit('handleItem', result)
+              that.getRequest('/api/wx/clockIn', {code: result})
+              that.getloadlist()
+            }
+          }
+        });
         return
       }else if (item.name == '我的') {
         this.$store.commit('home/changeActive', 4)
@@ -358,17 +431,24 @@ export default {
 .codeData {
   // background: url(https://4dscene.4dage.com/new4dkk/deng/static/img/pop2@2x.png) no-repeat cover;
   background: url(https://4dscene.4dage.com/new4dkk/deng/static/img/pop2@2x.png) 100% 100% no-repeat;
-  background-size: 100% 100%;
-  width: calc(100vw - 108px);
-  height: 490px;
-  padding: 48px 52px 30px 36px;
+  background-size: 100% auto;
+  width: calc(100vw - 20px);
+  height: auto;
+  // padding: 48px 52px 30px 36px;
   position: relative;
+  .codeImg {
+    width: 100%;
+    height: auto;
+    object-fit: cover;
+  }
   .close {
     position: absolute;
     right: -0px;
     top: -0px;
-    width: 42px;
-    height: 42px;
+    img{
+      width: 42px;
+      height: 42px;
+    }
   }
   .text {
     font-weight: 400;

+ 6 - 2
src/main.js

@@ -5,8 +5,11 @@ import store from './store';
 import App from './App.vue';
 import './static/styles/reset.css';
 import 'windi.css';
-import Swiper from 'swiper'
-import "swiper/css/swiper.css";
+// import Swiper from 'swiper'
+// import "swiper/css/swiper.css";
+import VueAwesomeSwiper from 'vue-awesome-swiper'
+import 'swiper/dist/css/swiper.css'
+
 import *as echarts from 'echarts'
 Vue.prototype.$echarts = echarts
 import { POST, GET } from './api/request';
@@ -17,6 +20,7 @@ Vue.prototype.postRequest = POST;
 Vue.prototype.getRequest = GET;
 Vue.config.productionTip = false;
 Vue.use(Vant);
+Vue.use(VueAwesomeSwiper);
 const app = new Vue({
   render: (h) => h(App),
   router,

+ 14 - 10
src/pages/composite/img.vue

@@ -312,7 +312,7 @@ export default {
 
 <style scoped>
 .home {
-  width: 100vw;
+  width: 100%;
   margin: 50px auto;
   position: relative;
   height: 100%;
@@ -320,13 +320,14 @@ export default {
 
 .bgsrc {
   width: 100%;
-  height: auto;
-  object-fit: cover;
-  pointer-events: none;
-  position: absolute;
-  z-index: 10;
-  left: calc(50% - 50vw);
-  top: calc(50% - 50vw - 115px);
+    height: auto;
+    object-fit: cover;
+    pointer-events: none;
+    position: relative;
+    z-index: 10;
+    left: 0;
+    top: 0;
+    z-index: 3;
 }
 .btn-area {
   display: flex;
@@ -343,10 +344,13 @@ export default {
 .image-box {
   position: relative;
   margin: 0 auto;
-  width: 100vw;
-  height: calc(100vh - 300px);
+  width: 100%;
+  height: 100%;
+  /* height: calc(100vh - 300px); */
   /* border: 1px solid #333; */
   overflow: hidden;
+  position: absolute;
+
 }
 .image-box img {
   position: absolute;

+ 93 - 47
src/pages/composite/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="composite-page" :style="{ paddingTop: 0, backgroundImage: `url(${getImgUrl()})` }">
-    <div class="compositeImg" v-if="!imgUrl">
-      <van-uploader :after-read="afterRead" class="img-uploader" :max-count="1" v-model="fileList">
+    <div class="compositeImg">
+      <van-uploader v-show="!imgUrl" :after-read="afterRead" class="img-uploader" :max-count="1" v-model="fileList">
         <img src="https://4dscene.4dage.com/new4dkk/deng/static/img/icon_upload.svg" alt="" />
         <div>上传照片进行合成</div>
         <span>请上传竖屏图片</span>
@@ -19,27 +19,13 @@
         alt=""
       />
     </div>
-    <div class="compositeImg showimg1" v-else ref="downDiv">
-      <myImg :src="imgUrl" :bgsrc="activeImg" />
-      <div v-if="imgUrl && !showShare" class="bit2 mybut" @click="handleSavaimg">
-        <!-- <img style="margin: 0; height: 24px; width: 24px" src="/static/img/dowm.png" alt="" /> -->
-        查看图片
-      </div>
-      <!-- <div class="scz"><van-icon name="photo-o" size="26" style="margin-right: 11px" />照片合成中...</div> -->
-      <!-- <div class="result">
-        <div class="butlist flex justify-between">
-          <div class="bit2">
-            下载图片
-          </div>
-        </div>
-      </div> -->
-    </div>
     <div class="list">
       <div class="mbl"></div>
       <div class="title" :style="{ color: imgUrl ? '#fff' : '#303030' }">请选择艺术风格</div>
       <div class="listcontent">
         <div
-          class="listItem" :style="{ backgroundImage: `url(${imgUrl})` }"
+          class="listItem"
+          :style="{ backgroundImage: `url(${imgUrl})` }"
           v-for="(item, index) in list"
           :class="{ active: active == index }"
           @click="handleacibe(item, index)"
@@ -50,29 +36,53 @@
         </div>
       </div>
     </div>
-    <van-image-preview
-      ref="downDiv"
-      v-model="show"
-      :images="fileList.map(ele => ele.src)"
-      :maxZoom="10"
-      :minZoom="0.1"
-      @change="onChange"
-    >
-      <template v-slot:index>第{{ index }}页</template>
-    </van-image-preview>
     <van-popup
       closeIconPos="bottom-right"
       v-model="shareImg"
       position="center"
       bgColor="transparent"
       style="background: transparent"
-      @close="shareImg = false;showShare = false;"
+      @close="
+        shareImg = false
+        showShare = false
+        imgUrl = ''
+        fileList = []
+        $store.commit('home/setImg', null)
+      "
     >
-      <div style="width: calc(100vw - 40px)">
-        <img style="width: 100%" :src="img" alt="">
-        <div class="pl-10px tips" style="    text-align: center;
-    color: #fff;
-    margin-top: 10px">长按保存图片</div>
+      <div class="shareImgDiv showimg1" v-if="imgUrl" >
+        <div ref="downDiv" style="width: 100%; height: 100%">
+          <myImg :src="imgUrl" :bgsrc="activeImg"  />
+        </div>
+        <div v-if="!img && !showShare" class="bit2 mybut" @click="handleSavaimg">
+          <!-- <img style="margin: 0; height: 24px; width: 24px" src="/static/img/dowm.png" alt="" /> -->
+          查看图片{{ img }}
+        </div>
+        <!-- <div class="scz"><van-icon name="photo-o" size="26" style="margin-right: 11px" />照片合成中...</div> -->
+        <!-- <div class="result">
+        <div class="butlist flex justify-between">
+          <div class="bit2">
+            下载图片
+          </div>
+        </div>
+      </div> -->
+      </div>
+      <div class="shareImg" v-if="img">
+        <div class="close" @click="shareImg = false
+        showShare = false
+        imgUrl = ''
+        fileList = []
+        $store.commit('home/setImg', null)">
+                <img
+                  width="42px"
+                  height="42px"
+                  src="/static/img/icon_cancel@2x.png"
+                ></img>
+              </div>
+        <img style="width: 100%" :src="img" alt="" />
+        <div class="tips" style="text-align: center; color: #fff; margin-top: 10px">
+          长按保存图片
+        </div>
       </div>
     </van-popup>
   </div>
@@ -148,7 +158,7 @@ export default {
   },
   methods: {
     getImgUrl() {
-      return 'https://4dscene.4dage.com/new4dkk/deng/static/img/bg03@2x.png'
+      return this.imgUrl || 'https://4dscene.4dage.com/new4dkk/deng/static/img/bg03@2x.png'
     },
     showLoading() {
       Loading.show()
@@ -158,6 +168,7 @@ export default {
     },
     afterRead(file) {
       // 此时可以自行将文件上传至服务器
+      this.$store.commit('home/setImg', null)
       console.log(file)
       let that = this
       let imgFile = new FormData()
@@ -173,6 +184,7 @@ export default {
         .then(res => {
           file.src = 'https://sit-nanhuacs.4dage.com' + res.data.data.filePath
           that.imgUrl = 'https://sit-nanhuacs.4dage.com' + res.data.data.filePath
+          that.shareImg = true
         })
         .catch(() => {})
       // this.postRequest('/api/wx/upload', imgFile, {header}).then(r => {
@@ -255,13 +267,12 @@ export default {
       let that = this
       console.log('base64', this.$refs.downDiv)
       this.showShare = true
-      if(!this.$refs.downDiv) return
+      if (!this.$refs.downDiv) return
       this.$store.commit('home/setImg', null)
       this.$nextTick(() => {
         console.log('DOM updated!')
         // 在 DOM 更新后执行的回调函数
         setTimeout(() => {
-          that.shareImg = true
           that.$store.dispatch('home/saveImage', that.$refs.downDiv)
         }, 1000)
         // this.$store.dispatch('home/saveImage', this.$refs.downDiv)
@@ -280,7 +291,7 @@ export default {
   overflow: hidden;
   padding-top: 46px;
   .showimg1 {
-    background: rgba(39, 26, 12, 0.5);
+    // background: rgba(39, 26, 12, 0.5);
     border-radius: 0px 0px 0px 0px;
     backdrop-filter: blur(5px);
     top: -4px;
@@ -299,12 +310,12 @@ export default {
       width: 100px;
       left: calc(50% - 50px);
       height: 42px;
-          width: 124px;
-          line-height: 42px;
-          background: rgba(187, 171, 146, 0.8);
-          border-radius: 38px 38px 38px 38px;
-          border: 1px solid #fff9b1;
-          color: #5b472e;
+      width: 124px;
+      line-height: 42px;
+      background: rgba(187, 171, 146, 0.8);
+      border-radius: 38px 38px 38px 38px;
+      border: 1px solid #fff9b1;
+      color: #5b472e;
     }
     .scz {
       width: 217px;
@@ -461,8 +472,43 @@ export default {
       }
     }
   }
-  
-  .bit2 {
-        }
+
+  .shareImg {
+    height: 100%;
+    width: 100%;
+    position: absolute;
+    left: 0;
+    top: 0;
+    .close{
+
+      position: absolute;
+      right: -0;
+      top: -0;
+      width: 42px;
+      height: 42px;
+    }
+  }
+  .shareImgDiv {
+    width: calc(100vw - 40px);
+    height: 100%;
+    margin: 0 auto;
+    padding-bottom: 50px;
+    .home {
+      margin: 0 auto;
+    }
+    .bit2 {
+      height: 42px;
+      width: 124px;
+      line-height: 42px;
+      background: rgba(187, 171, 146, 0.8);
+      border-radius: 38px 38px 38px 38px;
+      border: 1px solid #fff9b1;
+      color: #5b472e;
+      position: absolute;
+      bottom: 0;
+      left: calc(50% - 62px);
+      text-align: center;
+    }
+  }
 }
 </style>

+ 10 - 7
src/pages/home/index.vue

@@ -1,7 +1,8 @@
 <template>
   <div class="content">
-    <div class="home-img" id="home-img">
-      <div class="homeBg">
+    <div class="home-img"  id="home-img">
+      <div class="homeBg" style="    background-size: auto 930px;
+      height: 930px;">
           <div class="list">
             <div
               class="itme"
@@ -14,7 +15,7 @@
               <div class="itmeText">{{ item.title }}</div>
               <div class="mypopup" :style="{top: item.title == '宝林道场'?'125px':''}">
                 <div class="popupImg">
-                  <div class="but" v-if="!codeList.includes(item.m)" @click="handleDaka(item)">可打卡</div>
+                  <div class="but">可打卡</div>
                   <img
                     width="209px"
                     height="131px"
@@ -224,7 +225,9 @@ export default {
           img: 'https://4dscene.4dage.com/new4dkk/deng/static/img/m/11.png',
           style: {    
             left: '323px',
-            top: '750px'
+            top: '750px',
+            height: '145px',
+            paddingTop: '10px'
           }
         },
       ]
@@ -288,15 +291,15 @@ export default {
   .homeBg {
     width: 200.33333vw;
     background-image: url(https://4dscene.4dage.com/new4dkk/deng/static/img/homeBg.jpg);
-    background-size: 826px 859px;
-    height: 223.33333vw;
+    background-size: 900px 930px;
+    height: 930px;
     background-repeat: no-repeat;
     position: relative;
     .list {
       width: 100%;
       height: 100%;
       .itme {
-        background-image: url(https://4dscene.4dage.com/new4dkk/deng/static/img/tab_normal@2x.png);
+        background-image: url(https://4dscene.4dage.com/new4dkk/deng/static/img/tab_normal1@2x.png);
         background-size: 100% 100%;
         background-repeat: no-repeat;
         position: absolute;

+ 18 - 3
src/pages/home/map.vue

@@ -22,11 +22,13 @@
     </div>
     <div class="bottom flex justify-between items-end">
       <div class="list">
+        <vue-seamless-scroll :data="list" class="wrap">
         <div class="listItem" v-for="item in list" :key="item.id">
           {{item.creatorName}}
           <span style="color: #7EE3DE">【{{item.province}}】</span>
           {{item.name}}
         </div>
+      </vue-seamless-scroll>
       </div>
       <div class="qiyuan" @click="handleqiyuan">
         <img
@@ -42,9 +44,12 @@
 
 <script>
 import echarsMap from '@/components/echars/index.vue'
+import { Toast } from 'vant';
+import vueSeamlessScroll from 'vue-seamless-scroll'
 export default {
   components: {
-    echarsMap
+    echarsMap,
+    vueSeamlessScroll
   },
   data() {
     return {
@@ -81,7 +86,14 @@ export default {
     },
     handleqiyuan() {
       this.show = false
-      this.$router.push('/prayers/list')
+      // this.getRequest('/api/wx/getCode').then((res) => {
+      //   let codeList = res.data || []
+      //   if(codeList.length > 6){
+          this.$router.push('/prayers/list')
+      //   }else {
+      //     Toast('请至少完成6次打卡~');
+      //   }
+      // })
     },
   }
 }
@@ -90,7 +102,7 @@ export default {
 <style lang="scss">
 .homeMap {
   width: 100%;
-  height: 100vh;
+  height: 100%;
   position: relative;
   background: url(https://4dscene.4dage.com/new4dkk/deng/static/img/bg03@2x.png) 100% 100% no-repeat;
   background-size: cover;
@@ -102,6 +114,9 @@ export default {
     height: 25vh;
     padding: 0 27px 0 20px;
     .list {
+      height: 100%;
+      overflow: hidden;
+      // overflow-y: scroll;
       .listItem {
         padding: 6px 10px;
         background: rgba(0, 0, 0, 0.3);

+ 31 - 23
src/pages/prayers/clocked.vue

@@ -24,10 +24,10 @@
               <van-icon name="arrow" size="48px" />
             </div>
           </div> -->
-          <img class="hua" :src="active.bgimg" alt="">
+          <img class="hua" :src="active && active.bgimg" alt="">
+          <div class="title">{{active && active.name}}</div>
         </div>
-        <div class="title">{{active.name}}</div>
-        <div class="text">{{active.text}}</div>
+        <div class="text">{{active && active.text}}</div>
         <div class="downButtomItem" @click.stop="handleShare">分享</div>
         <div class="tips" style="font-size: 12px">您已完成祈愿,请明天再来</div>
       </div>
@@ -118,6 +118,7 @@
 import { mapState } from 'vuex'
 import QRCode from 'qrcodejs2'
 import { Toast } from 'vant'
+import Bus from '@/utils/bus.js'
 // import QiyanQrcode from '@/components/qiyan-qrcode/qiyan-qrcode.vue'
 // import uButton from "udiv-ui/components/u-button/u-button.vue";
 export default {
@@ -131,11 +132,11 @@ export default {
       showlist: false,
       qrcode1: null,
       active: {
-          class: 'item1',
-          name: '清净灯',
-          text: '白色光由佛陀的骨齿放出,白色的莲花灯代表清净与纯洁。清净灯寓意内心的无染与脱离烦恼,法性的纯净无染引导众生走向内在的自由与心灵的澄明,帮助修行者从轮回中得到解脱,达至清净的境界。',
-          img: 'https://4dscene.4dage.com/new4dkk/deng/static/img/flowerwhite@2x.png',
-          bgimg: 'https://4dscene.4dage.com/new4dkk/deng/static/img/img_flower_white@2x.png'
+          class: 'item2',
+          name: '中道灯',
+          text: '黄色光由佛陀的皮肤放出,黄色的莲花灯代表佛教核心教义中的中道。中道教义强调远离两极对立,如有无、苦乐、生灭,主张修行者应在平衡中找到觉悟的道路。',
+          img: 'https://4dscene.4dage.com/new4dkk/deng/static/img/flower_yellow@2x.png',
+          bgimg: 'https://4dscene.4dage.com/new4dkk/deng/static/img/img_flower_yellow@2x.png'
         },
       qrcode2: null,
       checkLight: false,
@@ -242,6 +243,11 @@ export default {
     ...mapState('home', ['img'])
   },
   mounted() {
+    Bus.on('handleItem', value => {
+      console.log(value, 'BushandleItem')
+      this.getcodeList()
+    })
+    this.getcodeList()
     let obj = {
       '清净灯': 'item1',
       '中道灯': 'item2',
@@ -250,19 +256,10 @@ export default {
       '真如灯': 'item5',
       '慈悲灯': 'item6',
     }
-    this.getRequest('/api/wx/getCode').then(res => {
-      this.codeList = res.data || []
-      // if(this.codeList.length > 6) {
-      //   this.list.length = 6
-      // }else{
-      //   this.list.length = this.codeList.length
-      // }
-      console.log(res, 'getCode', this.codeList, this.list)
-    })
     this.getRequest('/api/wx/checkLight', {}).then(res => {
       console.log(res, '是否点过灯')
       this.checkLight = res.msg == '2'?'':res.msg
-      this.active = this.imgobj[obj[this.checkLight]]
+      this.active = this.imgobj[obj[this.checkLight]]||{}
     })
     // if (this.list.length != 6) {
     //   this.list.push({
@@ -274,6 +271,12 @@ export default {
     // console.log(this.imgobj
   },
   methods: {
+    getcodeList(){
+      this.getRequest('/api/wx/getCode').then(res => {
+      this.codeList = res.data || []
+      console.log(this.codeList, 'BusnewList')
+    })
+    },
     handleItem(item) {
       if (item.img == 'https://4dscene.4dage.com/new4dkk/deng/static/img/flower@2x.png') {
         //none
@@ -355,7 +358,7 @@ export default {
 .clockedPage {
   width: 100%;
   height: 100%;
-  min-height: calc(100vh - 138px);
+  // min-height: calc(100vh - 138px);
   background: url(https://4dscene.4dage.com/new4dkk/deng/static/img/bg02@2x.png)
       100% 100% no-repeat;
     background-size: 100% 100%;
@@ -511,6 +514,7 @@ export default {
           height: 306px;
           writing-mode: vertical-rl;
           text-align: left;
+          direction: initial;
           // overflow: hidden; //超出的文本隐藏
           // text-overflow: ellipsis; //溢出用省略号显示
           // white-space:nowrap; //溢出不换行
@@ -536,12 +540,15 @@ export default {
     }
   }
   .dengList {
-    padding: 50px 30px 0 30px;
+    padding: 30px 30px 0 30px;
     .showinfo {
       text-align: center;
+      position: relative;
       .dengimg {
         width: 322px;
         height: auto;
+        position: relative;
+
         .hua {
           width: 100%;
           height: auto;
@@ -567,8 +574,9 @@ export default {
         font-size: 30px;
         color: #fff9b1;
         line-height: 35px;
-        position: relative;
-        top: -50px;
+        width: 100%;
+        position: absolute;
+        bottom: 20px;
       }
       .text {
         text-align: left;
@@ -588,7 +596,7 @@ export default {
         color: #ffffff;
         line-height: 19px;
         font-style: normal;
-        margin: 48px auto 11px auto;
+        margin: 40px auto 11px auto;
         line-height: 42px;
         text-align: center;
       }

+ 22 - 8
src/pages/prayers/list.vue

@@ -33,7 +33,7 @@
         <!-- </swiper-item>
         </swiper> -->
       </div>
-      <div class="tips">请选择祈愿类型</div>
+      <div class="tips" style="margin-top: 15px;">请选择祈愿类型</div>
       <div class="img_signal" v-if="!show"></div>
     </div>
     <div class="activeIndex" v-else>
@@ -79,6 +79,7 @@
 <script>
 // import { Navigation, Pagination } from 'swiper'
 // import { SwiperCore, Swiper, SwiperSlide } from 'swiper-vue2'
+import { Toast } from 'vant'
 
 // Import Swiper styles
 // import 'swiper/swiper-bundle.css'
@@ -200,6 +201,14 @@ export default {
     }
   },
   onLoad() {},
+  created() {
+    this.getRequest('/api/wx/pray/check',).then(res => {
+      console.log('res', res)
+      if(res){
+        this.$router.replace('/prayers/show')
+      }
+    })
+   },
   methods: {
     handleHome() {
       console.log('开启云上观灯', uni)
@@ -232,7 +241,12 @@ export default {
         name: this.active,
         province: this.province
       }
-      this.postRequest('/api/wx/pray/add', param)
+      this.postRequest('/api/wx/pray/add', param).then(res =>{
+        Toast('祈愿成功!')
+        setTimeout(() => {
+          this.$router.push('/prayers/show')
+        }, 500)
+      })
     }
   }
 }
@@ -260,7 +274,7 @@ export default {
   .tips {
     width: 100%;
     text-align: center;
-    margin-top: 27px;
+    
     color: #fff;
     font-size: 14px;
     line-height: 21px;
@@ -316,7 +330,7 @@ export default {
   }
   .activeIndex {
     width: 100%;
-    height: calc(100% - 100px);
+    height: calc(100% - 50px);
     position: relative;
     padding-top: 20px;
     .indexHome {
@@ -343,13 +357,13 @@ export default {
     }
     .qiyuan {
       position: absolute;
-      bottom: 3%;
+      bottom: 10px;
       right: 20px;
     }
     .selcet {
       position: absolute;
       width: 100%;
-      bottom: 3%;
+      bottom: 10px;
       text-align: center;
       color: #fff;
       font-size: 14px;
@@ -403,7 +417,7 @@ export default {
       position: absolute;
       font-weight: 400;
       font-size: 11px;
-      top: 180px;
+      top: 80px;
       color: #dcdcdc;
       width: 30px;
     }
@@ -417,7 +431,7 @@ export default {
     }
     .text1 {
       left: 80px;
-      top: 276px;
+      top: 156px;
     }
     .text2 {
       right: 30px;

+ 151 - 66
src/pages/prayers/showlist.vue

@@ -28,22 +28,42 @@
           </div>
         </div> -->
     <div class="content-scroll swiper">
-        <div class="swiper-wrapper">
-            <div class="swiper-slide scroll-item list" v-for="(item,index) in list" :key="index" :class="
+      <!-- 使用swiper -->
+      <div class="swiper-wrapper">
+      <swiper :options="swiperoption" ref="mySwiper">
+            <swiper-slide class="swiper-slide scroll-item list active" v-for="(item,index) in list" :key="item.id" :class="
               current == index
                 ? `active index${index} ${curIndex == index ? 'fang' : ''}`
-                : `index${index}`"  @click="changeTitle(index)">
-            <div class="activeItem" v-if="curIndex == index">
-              <div class="activetext" v-for="(items, a) in item.list" :key="a">
-                {{ items }}
+                : `index${index}`">
+                <div @click="changeTitle(index)">
+                  <div class="activeItem" v-if="curIndex == index" >
+              <div class="activetext">
+                {{ item.content }}
+              </div>
+            </div>
+            <div class="item-text item" v-else>{{ item.name }}</div>
+            <div class="source">
+              <span style="color: #9c9590;margin-bottom: 10px">来源</span>
+              <span>{{item.creatorName}}</span>
+            </div>
+                </div>
+            </swiper-slide>
+        </swiper>
+            <!-- <div class="swiper-slide scroll-item list" v-for="(item,index) in list" :key="item.id" @click="changeTitle(index)" :class="
+              current == index
+                ? `active index${index} ${curIndex == index ? 'fang' : ''}`
+                : `index${index}`" >
+            <div class="activeItem" v-if="curIndex == index" >
+              <div class="activetext">
+                {{ item.content }}
               </div>
             </div>
             <div class="item-text item" v-else>{{ item.name }}</div>
             <div class="source">
               <text style="color: #9c9590">来源</text>
-              <text>小阿飞</text>
+              <text>{{item.creatorName}}</text>
             </div>
-          </div>
+          </div> -->
         </div>
 
         <!-- <div class="swiper-button-next"></div>
@@ -57,7 +77,7 @@
           <div class="downButtomItem">返回我的祈愿</div>
         </div>
         <div v-else class="downButtom flex justify-center">
-          <div class="downButtomItem">祈愿地图</div>
+          <div class="downButtomItem" @click="$router.push('/map')">祈愿地图</div>
           <div class="downButtomItem" @click="handleShare">分享</div>
         </div>
       </div>
@@ -70,16 +90,15 @@
         style="background: transparent"
         @close="close"
       >
-      <div class="popItme">
-        <div class="mySharepopup planel" ref="addImage" id="capture">
+      <div class="popItme" ref="downDiv">
+        <div class="mySharepopup planel" id="capture">
+          <img v-if="img" :src="img" class="showImgbase64" alt="">
           <div class="shareItem answer_draw_canvas">
             <div class="activeItem answer_draw_canvas">
               <div
                 class="activetext answer_draw_canvas"
-                v-for="(items, a) in shareData.list"
-                :key="a"
               >
-                {{ items }}
+                {{ shareData.content }}
               </div>
             </div>
           </div>
@@ -104,11 +123,15 @@
                   </div>
                 </div>
               </div>
-              <div class="downText" @click="handleDown">下载图片</div>
+              <div class="downText" @click="dowmImg">{{img?'长按保存':'下载图片'}}</div>
             </div>
             <div class="qrcodeDiv">
-              <div class="codeImg1 qrcode" ref="qrCodeUrl1"></div>
-              <div class="codeImg2 qrcode" ref="qrCodeUrl2"></div>
+              <div class="codeImg1 qrcode" ref="qrCodeUrl1">
+                <img src="https://4dscene.4dage.com/new4dkk/deng/static/img/code/gzhcode.png" alt="">
+              </div>
+              <div class="codeImg2 qrcode" ref="qrCodeUrl2">
+                <img src="https://4dscene.4dage.com/new4dkk/deng/static/img/code/xcxcode.png" alt="">
+              </div>
             </div>
         </div>
       </div>
@@ -118,11 +141,15 @@
 
 <script>
 import html2canvas from 'html2canvas'
-import Swiper from 'swiper'
+// import { Swiper, SwiperSlide } from 'vue-awesome-swiper';
+// import 'swiper/dist/css/swiper.css'
+// import Swiper from 'swiper'
+import { mapState } from 'vuex'
 import QRCode from 'qrcodejs2'
 export default {
   components: {
-    // uNavbar
+    // Swiper,
+    // SwiperSlide
   },
   data() {
     return {
@@ -131,39 +158,14 @@ export default {
       show: false,
       shareShow: false,
       scrollLeft: 0, // 横向滚动条位置
-      current: 2,
+      current: 0,
       curIndex: null,
       qrcode1: null,
       qrcode2: null,
       province: '请选择',
       provinceShow: false,
       shareData: {},
-      list: [
-        {
-          name: '学业祈愿1',
-          list: ['知识的殿堂中闪耀属于你的光芒。', '愿你学业精进,成绩辉煌,']
-        },
-        {
-          name: '学业祈愿2',
-          list: ['知识的殿堂中闪耀属于你的光芒。', '愿你学业精进,成绩辉煌,']
-        },
-        {
-          name: '学业祈愿3',
-          list: ['知识的殿堂中闪耀属于你的光芒。', '愿你学业精进,成绩辉煌,']
-        },
-        {
-          name: '学业祈愿4',
-          list: ['知识的殿堂中闪耀属于你的光芒。', '愿你学业精进,成绩辉煌,']
-        },
-        {
-          name: '学业祈愿5',
-          list: ['知识的殿堂中闪耀属于你的光芒。', '愿你学业精进,成绩辉煌,']
-        },
-        {
-          name: '学业祈愿6',
-          list: ['知识的殿堂中闪耀属于你的光芒。', '愿你学业精进,成绩辉煌,']
-        }
-      ],
+      list: [],
       canvasWidth: 180, // 默认canvas宽高
       canvasHeight: 700,
       screenWidth: null, // 设备宽度
@@ -173,26 +175,71 @@ export default {
       // chapter1: '',
       // chapter2: '',
       widget: null,
+      swiperoption: {
+        pagination: {
+          el: '.swiper-pagination', //与slot="pagination"处 class 一致
+          clickable: true //轮播按钮支持点击
+        },
+        //自动播放
+        autoplay: false,
+        spaceBetween: 0, // 模块之间的间隔
+        slidesPerView: 1,
+        //更改后自动刷新
+        observer: true,
+        observeParents: true,
+        //循环
+        loop: false
+      },
       msg: '加载中,请稍等...' // 提示语
     }
   },
+  computed: {
+    ...mapState('home', ['img']),
+    swiper() {
+      return this.$refs.mySwiper.swiper
+    }
+  },
   mounted() {
-    // 下面是普通swiper模板
-    new Swiper('.content-scroll', {
-      loop: true,
-      mousewheel: true,
-      keyboard: true,
-      navigation: {
-        nextEl: '.swiper-button-next',
-        prevEl: '.swiper-button-prev'
-      },
-
-      pagination: {
-        el: '.swiper-pagination'
-      }
+    this.$store.commit('home/setImg', null)
+    this.getRequest('/api/show/pray/getList').then(res => {
+      console.log(res, 'getList')
+      this.list = res.data
     })
   },
   methods: {
+    swiperOption() {
+      let that = this
+      return {
+        loop: true,
+        autoplay: {
+          //swiper手动滑动之后自动轮播失效的解决方法,包括触碰,拖动,点击pagination,重新启动自动播放
+          disableOnInteraction: false,
+          // 自动播放时间:毫秒
+          delay: 2000
+        },
+        touchRatio: 1, // 触摸滑动的顺畅度
+        initialSlide: 1, // 默认展示页
+        width: '100vw', // 默认canvas宽高
+        autoplay: true, // 是否自动播放
+        speed: 1000, // 播放速度
+        slidesPerView: 1,
+        centeredSlides: true,
+        paginationClickable: true,
+        observeParents: true,
+        observer: true,
+        spaceBetween: 0, // 模块之间的间隔
+        on: {
+          slideChangeTransitionEnd: function () {
+            // 处理手动操作轮播图后后不再自动轮播
+            this.autoplay.start()
+          },
+          click(e) {
+            console.log('点击', e)
+            // that.changeTitle(e,);
+          }
+        }
+      }
+    },
     renderInit() {
       // 获取设备信息
       wx.getSystemInfo({
@@ -258,13 +305,23 @@ export default {
       this.show = true
     },
     handleShare() {
-      console.log('handleShare')
+      this.current = this.swiper.activeIndex
       this.shareShow = true
       this.shareData = this.list[this.current]
+      console.log('handleShare', this.swiper.activeIndex, this.shareData)
+      this.$nextTick(() => {
+        this.dowmImg()
+      })
       setTimeout(() => {
-        this.creatQrCode()
+        // this.creatQrCode()
       }, 500)
     },
+    dowmImg() {
+      setTimeout(() => {
+        console.log('dowmImg', this.$refs.downDiv)
+        this.$store.dispatch('home/saveImage', this.$refs.downDiv)
+      }, 100)
+    },
     close() {
       this.shareShow = false
       console.log('handleShare', this.shareShow)
@@ -315,8 +372,8 @@ export default {
 <style lang="scss" scoped>
 .prayers-list {
   background: url('https://4dscene.4dage.com/new4dkk/deng/static/img/bg02@2x(2).png') 100% 100%
-      no-repeat;
-    background-size: cover;
+    no-repeat;
+  background-size: cover;
   // background: rgba(32, 21, 10, 0.7);
   border-radius: 0px 0px 0px 0px;
   height: 100vh;
@@ -340,6 +397,7 @@ export default {
       position: absolute;
       right: 65px;
       top: 40%;
+      z-index: 11;
       .shareRight {
         position: relative;
       }
@@ -351,6 +409,11 @@ export default {
           padding: 5px;
           margin: 0 5px;
           background: #fff;
+          img {
+            width: 72px;
+            height: 72px;
+            object-fit: cover;
+          }
         }
       }
       .close {
@@ -403,7 +466,19 @@ export default {
     // width: 330px;
     // height: 537px;
     padding: 19px 17px 0px 17px;
+    position: relative;
 
+    .showImgbase64 {
+      position: absolute;
+      width: 100%;
+      height: 100%;
+      object-fit: cover;
+      left: 0;
+      right: 0;
+      top: 0;
+      border: 0;
+      z-index: 10;
+    }
     .shareItem {
       width: 150px;
       height: calc(100% - 512px);
@@ -493,7 +568,7 @@ export default {
           writing-mode: vertical-lr;
           position: absolute;
           bottom: 23%;
-          right: -10px;
+          left: calc(50% - 70px);
         }
         .item-text {
           // transform: rotateY(180deg);
@@ -523,7 +598,8 @@ export default {
           transform: rotateY(180deg);
         }
       }
-      .active, .swiper-slide-active {
+      .active,
+      .swiper-slide-active {
         .item-text {
           top: calc(50% - 226px);
           left: calc(50% - 50px);
@@ -548,7 +624,7 @@ export default {
           line-height: 18px;
           display: flex;
           writing-mode: vertical-lr;
-          text-align: left;
+          text-align: center;
           justify-content: center;
           flex-direction: column;
           background: url(https://4dscene.4dage.com/new4dkk/deng/static/img/img_label@2x.png) 100%
@@ -599,6 +675,15 @@ export default {
       // }
     }
   }
+  .activetext {
+    display: inline-block;
+    height: 100%;
+    /*文字居中*/
+    /*文字竖排*/
+    white-space: break-spaces;
+    writing-mode: vertical-lr; /*从左向右 从右向左是 writing-mode: vertical-rl;*/
+    writing-mode: tb-lr; /*IE浏览器的从左向右 从右向左是 writing-mode: tb-rl;*/
+  }
 }
 
 @keyframes handleAni {

+ 2 - 2
src/store/index.js

@@ -1,6 +1,6 @@
 import Vue from 'vue'
 import Vuex from 'vuex'
-import base from './module/base'
+import wx from './module/wx'
 import userInfo from './module/user-info'
 import home from './module/home'
 
@@ -8,7 +8,7 @@ Vue.use(Vuex)
 
 export default new Vuex.Store({
   modules: {
-    base,
+    wx,
     userInfo,
     home,
     HTMLFormElement

+ 0 - 15
src/store/module/base/index.js

@@ -1,15 +0,0 @@
-const baseModule = {
-  namespaced: true,
-  state: () => ({
-    b: '我是baseModule'
-  }),
-  getters: {
-    getB(state) {
-      return `${state.b}99999`
-    }
-  },
-  mutations: {},
-  actions: {}
-}
-
-export default baseModule

+ 3 - 1
src/store/module/home/index.js

@@ -1,4 +1,5 @@
 import html2canvas from 'html2canvas'
+
 const userInfoModule = {
   namespaced: true,
   state: () => ({
@@ -29,12 +30,13 @@ const userInfoModule = {
     //保存图片
     saveImage(context, refs) {
       console.log('saveImage', refs);
+      // const scaleBy = window && window.devicePixelRatio>1?window.devicePixelRatio:1;
       // if(!refs) return
       // 第一个参数是需要生成截图的元素,第二个是自己需要配置的参数,宽高等
       html2canvas(refs, {
         backgroundColor: null, //画出来的图片有白色的边框,不要可设置背景为透明色(null)
         useCORS: true, //支持图片跨域
-        scale: 1, //设置放大的倍数
+        scale: window.devicePixelRatio, //设置放大的倍数
       }).then((canvas) => {
         // 把生成的base64位图片上传到服务器,生成在线图片地址
         let url = canvas.toDataURL("image/png"); // toDataURL: 图片格式转成 base64

+ 63 - 0
src/store/module/wx/index.js

@@ -0,0 +1,63 @@
+// 加密插件
+import CryptoJS from 'crypto-js'
+import wx from 'weixin-js-sdk'
+//是否是微信浏览器
+const isWechat = () => {
+  var ua = window.navigator.userAgent.toLowerCase()
+  if (ua.match(/micromessenger/i) == 'micromessenger') {
+    return true;
+  } else {
+    return false;
+  }
+}
+//需要使用的JS接口列表
+let jsApiList = [
+  'checkJsApi',
+  'getLocation',
+  'openLocation',
+  'wx-open-launch-app',
+  'scanQRCode',
+  'wx-open-launch-weapp'
+]
+// 生成随机字符
+function randomString(len) {
+  len = len || 32;
+  var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';    /****默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1****/
+  var maxPos = $chars.length;
+  var pwd = '';
+  for (let i = 0; i < len; i++) {
+    pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
+  }
+  return pwd;
+}
+const baseModule = {
+  namespaced: true,
+  state: () => ({
+    isWechat: isWechat()
+  }),
+  getters: {
+    getB(state) {
+      return `${state.b}99999`
+    }
+  },
+  mutations: {},
+  actions: {
+    initJssdk(context, ticket){
+      let url = window.location.href.split('#')[0]
+      let timestamp = Math.round(new Date().getTime() / 1000).toString() // 时间戳
+      let nonceStr = randomString()  // 随机字符
+      let signature = CryptoJS.SHA1(`jsapi_ticket=${ticket}&noncestr=${nonceStr}&timestamp=${timestamp}&url=${url}`).toString()
+      wx.config({
+        debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来
+        appId: 'wx8398d947880ce37a', // 必填,公众号的唯一标识
+        timestamp, // 必填,生成签名的时间戳
+        nonceStr, // 必填,生成签名的随机串
+        signature,// 必填,签名
+        jsApiList, // 必填,需要使用的JS接口列表
+        openTagList:['wx-open-launch-weapp']
+      });
+    }
+  }
+}
+
+export default baseModule

+ 38 - 8
yarn.lock

@@ -2694,6 +2694,11 @@ compression@^1.7.4:
     safe-buffer "5.1.2"
     vary "~1.1.2"
 
+comutils@^1.1.9:
+  version "1.1.19"
+  resolved "https://mirrors.cloud.tencent.com/npm/comutils/-/comutils-1.1.19.tgz#3e07f306abf48e83726511713a72b20565034443"
+  integrity sha512-JxXB67juILiwhdLwOsYyjUqwWEhHdObI0EClOPk+JDtEuTbac59s0pxGpfCBnNNQ5JommifmcMGneW/4Cg7YWw==
+
 concat-map@0.0.1:
   version "0.0.1"
   resolved "https://mirrors.cloud.tencent.com/npm/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
@@ -2812,6 +2817,11 @@ cross-spawn@^7.0.2, cross-spawn@^7.0.3:
     shebang-command "^2.0.0"
     which "^2.0.1"
 
+crypto-js@^4.2.0:
+  version "4.2.0"
+  resolved "https://mirrors.cloud.tencent.com/npm/crypto-js/-/crypto-js-4.2.0.tgz#4d931639ecdfd12ff80e8186dba6af2c2e856631"
+  integrity sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==
+
 css-declaration-sorter@^6.3.1:
   version "6.4.1"
   resolved "https://mirrors.cloud.tencent.com/npm/css-declaration-sorter/-/css-declaration-sorter-6.4.1.tgz#28beac7c20bad7f1775be3a7129d7eae409a3a71"
@@ -3124,7 +3134,7 @@ dom-serializer@^1.0.1:
     domhandler "^4.2.0"
     entities "^2.0.0"
 
-dom7@^2.1.5:
+dom7@^2.1.3:
   version "2.1.5"
   resolved "https://mirrors.cloud.tencent.com/npm/dom7/-/dom7-2.1.5.tgz#a79411017800b31d8400070cdaebbfc92c1f6377"
   integrity sha512-xnhwVgyOh3eD++/XGtH+5qBwYTgCm0aW91GFgPJ3XG+jlsRLyJivnbP0QmUBFhI+Oaz9FV0s7cxgXHezwOEBYA==
@@ -5333,7 +5343,7 @@ nth-check@^2.0.1:
   dependencies:
     boolbase "^1.0.0"
 
-object-assign@>=4.0.1, object-assign@^4.0.1:
+object-assign@>=4.0.1, object-assign@^4.0.1, object-assign@^4.1.1:
   version "4.1.1"
   resolved "https://mirrors.cloud.tencent.com/npm/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
   integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==
@@ -6638,6 +6648,11 @@ sprintf-js@~1.0.2:
   resolved "https://mirrors.cloud.tencent.com/npm/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
   integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==
 
+ssr-window@^1.0.1:
+  version "1.0.1"
+  resolved "https://mirrors.cloud.tencent.com/npm/ssr-window/-/ssr-window-1.0.1.tgz#30752a6a4666e7767f0b7e6aa6fc2fdbd0d9b369"
+  integrity sha512-dgFqB+f00LJTEgb6UXhx0h+SrG50LJvti2yMKMqAgzfUmUXZrLSv2fjULF7AWGwK25EXu8+smLR3jYsJQChPsg==
+
 ssr-window@^2.0.0:
   version "2.0.0"
   resolved "https://mirrors.cloud.tencent.com/npm/ssr-window/-/ssr-window-2.0.0.tgz#98c301aef99523317f8d69618f0010791096efc4"
@@ -6849,13 +6864,13 @@ swiper-vue2@^1.0.10:
   resolved "https://mirrors.cloud.tencent.com/npm/swiper-vue2/-/swiper-vue2-1.0.10.tgz#edfe31440e4e58a74785866b62dd6e52c578d2aa"
   integrity sha512-eFO1SFJMGzD8nKmT1PHkmUf+IaZUqghIuE3wR7ecqb3cRkTOW/+fQhndjgnJo5Wo4+fUIfsSbl1a9bNeui2ahg==
 
-swiper@5:
-  version "5.4.5"
-  resolved "https://mirrors.cloud.tencent.com/npm/swiper/-/swiper-5.4.5.tgz#a350f654bf68426dbb651793824925512d223c0f"
-  integrity sha512-7QjA0XpdOmiMoClfaZ2lYN6ICHcMm72LXiY+NF4fQLFidigameaofvpjEEiTQuw3xm5eksG5hzkaRsjQX57vtA==
+swiper@4.5.1, swiper@^4.0.7:
+  version "4.5.1"
+  resolved "https://mirrors.cloud.tencent.com/npm/swiper/-/swiper-4.5.1.tgz#ed43998e780ceb478610079c8d23fd425eca636f"
+  integrity sha512-se6I7PWWu950NAMXXT+ENtF/6SVb8mPyO+bTfNxbQBILSeLqsYp3Ndap+YOA0EczOIUlea274PKejT6gKZDseA==
   dependencies:
-    dom7 "^2.1.5"
-    ssr-window "^2.0.0"
+    dom7 "^2.1.3"
+    ssr-window "^1.0.1"
 
 table@^6.0.9:
   version "6.8.2"
@@ -7212,6 +7227,14 @@ vary@~1.1.2:
   resolved "https://mirrors.cloud.tencent.com/npm/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
   integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==
 
+vue-awesome-swiper@3.1.3:
+  version "3.1.3"
+  resolved "https://mirrors.cloud.tencent.com/npm/vue-awesome-swiper/-/vue-awesome-swiper-3.1.3.tgz#05500b501ffb3fec9bf7eb9985bcf4ae8360ed9e"
+  integrity sha512-E7suzkyApO8vNZbgdEnjSmnpsmQZyRvSVXJ7sey3XYwKPOkLhH3+GnHroBw+5PZIQXvWBwdCeQsPG1xQ1r1Rhg==
+  dependencies:
+    object-assign "^4.1.1"
+    swiper "^4.0.7"
+
 vue-cli-plugin-windicss@^1.1.6:
   version "1.1.6"
   resolved "https://mirrors.cloud.tencent.com/npm/vue-cli-plugin-windicss/-/vue-cli-plugin-windicss-1.1.6.tgz#57d58381d2d9306bffb0abc5a734a1914da15782"
@@ -7289,6 +7312,13 @@ vue-router@^3.5.4:
   resolved "https://mirrors.cloud.tencent.com/npm/vue-router/-/vue-router-3.6.5.tgz#95847d52b9a7e3f1361cb605c8e6441f202afad8"
   integrity sha512-VYXZQLtjuvKxxcshuRAwjHnciqZVoXAjTjcqBTz4rKc8qih9g9pI3hbDjmqXaHdgL3v8pV6P8Z335XvHzESxLQ==
 
+vue-seamless-scroll@^1.1.23:
+  version "1.1.23"
+  resolved "https://mirrors.cloud.tencent.com/npm/vue-seamless-scroll/-/vue-seamless-scroll-1.1.23.tgz#dde81b3c79aa499791b3c3bffd0fdb22ff3e59a7"
+  integrity sha512-HBjUub8WwsKJzbFCrwKPDrZn4e+SSbkKgwWtjKtfLwesiFGwSsVxP44/Z6d3kpXy94qIFOiflJH6l0/9pj7SGA==
+  dependencies:
+    comutils "^1.1.9"
+
 vue-style-loader@^4.1.0, vue-style-loader@^4.1.3:
   version "4.1.3"
   resolved "https://mirrors.cloud.tencent.com/npm/vue-style-loader/-/vue-style-loader-4.1.3.tgz#6d55863a51fa757ab24e89d9371465072aa7bc35"