Przeglądaj źródła

修正布局单位偏差、引入微信jdk

Joe 4 lat temu
rodzic
commit
550b068091
5 zmienionych plików z 100 dodań i 7 usunięć
  1. 16 1
      layouts/default.vue
  2. 2 2
      package-lock.json
  3. 1 1
      pages/point/index.vue
  4. 13 3
      pages/point/success.vue
  5. 68 0
      project.config.json

+ 16 - 1
layouts/default.vue

@@ -3,6 +3,20 @@
     <Nuxt />
   </div>
 </template>
+<script>
+export default {
+    mounted() {
+    console.log(this);
+     (function() {
+      var hm = document.createElement("script");
+      hm.src = "http://res.wx.qq.com/open/js/jweixin-1.6.0.js";
+      var s = document.getElementsByTagName("script")[0];
+      s.parentNode.insertBefore(hm, s);
+    })();
+    console.log(window)
+  },
+}
+</script>t
 
 <style>
 html {
@@ -16,7 +30,8 @@ html {
     'Helvetica Neue',
     Arial,
     sans-serif;
-    font-size: 13.6986301369863vw;
+    /* font-size: 13.6986301369863vw;*/
+    font-size: 13.333333333333333vw;
 }
 body {
   font-size: 12px;	

+ 2 - 2
package-lock.json

@@ -10237,8 +10237,8 @@
     },
     "weixin-js-sdk": {
       "version": "1.6.0",
-      "resolved": "https://registry.npmjs.org/weixin-js-sdk/-/weixin-js-sdk-1.6.0.tgz",
-      "integrity": "sha512-3IYQH7aalJGFJrwdT3epvTdR1MboMiH7vIZ5BRL2eYOJ12BNah7csoMkmSZzkq1+l92sSq29XdTCVjCJoK2sBQ=="
+      "resolved": "https://registry.npm.taobao.org/weixin-js-sdk/download/weixin-js-sdk-1.6.0.tgz",
+      "integrity": "sha1-/1BITYEYzhII8RJIz0ocCDFXdRQ="
     },
     "weixin-jsapi": {
       "version": "1.1.0",

+ 1 - 1
pages/point/index.vue

@@ -101,7 +101,7 @@ export default {
 }
 .point-index .background {
   background-color: #f3b335;
-  width: 100%;
+  width: 7.5rem;
   height: 49.46vw;
   position: relative;
   background: url("../../static/point/bj.png") no-repeat 0px 0px;

+ 13 - 3
pages/point/success.vue

@@ -6,7 +6,7 @@
     </div>
     <div class="container">
       <div class="menu">
-        <span class="text1">回到首页</span>  <span class="text2">查看订单</span>
+        <span class="text1">回到首页</span> <span class="text2">查看订单</span>
       </div>
       <div class="show">
         <product-list />
@@ -17,10 +17,12 @@
 
 <script>
 import ProductList from "../../components/ProductList";
+import wx from 'weixin-js-sdk';
+
 export default {
   head() {
     return {
-      title: "积分主页",
+      title: "支付成功",
     };
   },
   data() {
@@ -39,7 +41,15 @@ export default {
   created() {},
   beforeMount() {},
   mounted() {
-    console.log(this);
+    console.log("测试一下微信jdk");
+    wx.config({
+      debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
+      appId: 'wxc8189d3b3a7283e0', // 必填,公众号的唯一标识
+      timestamp: 11, // 必填,生成签名的时间戳
+      nonceStr: '', // 必填,生成签名的随机串
+      signature: '',// 必填,签名
+      jsApiList: [] // 必填,需要使用的JS接口列表
+    });
   },
   beforeUpdate() {},
   updated() {},

+ 68 - 0
project.config.json

@@ -0,0 +1,68 @@
+{
+  "description": "项目配置文件",
+  "packOptions": {
+    "ignore": []
+  },
+  "setting": {
+    "bundle": false,
+    "userConfirmedBundleSwitch": false,
+    "urlCheck": true,
+    "scopeDataCheck": false,
+    "coverView": true,
+    "es6": true,
+    "postcss": true,
+    "compileHotReLoad": false,
+    "preloadBackgroundData": false,
+    "minified": true,
+    "autoAudits": false,
+    "newFeature": false,
+    "uglifyFileName": false,
+    "uploadWithSourceMap": true,
+    "useIsolateContext": true,
+    "nodeModules": false,
+    "enhance": false,
+    "useCompilerModule": true,
+    "userConfirmedUseCompilerModuleSwitch": false,
+    "useMultiFrameRuntime": true,
+    "useApiHook": true,
+    "useApiHostProcess": false,
+    "showShadowRootInWxmlPanel": true,
+    "packNpmManually": false,
+    "enableEngineNative": false,
+    "packNpmRelationList": [],
+    "minifyWXSS": true
+  },
+  "compileType": "miniprogram",
+  "libVersion": "2.16.0",
+  "appid": "wx1871a296d5f54304",
+  "projectname": "miniprogram-2",
+  "debugOptions": {
+    "hidedInDevtools": []
+  },
+  "scripts": {},
+  "staticServerOptions": {
+    "baseURL": "",
+    "servePath": ""
+  },
+  "isGameTourist": false,
+  "condition": {
+    "search": {
+      "list": []
+    },
+    "conversation": {
+      "list": []
+    },
+    "game": {
+      "list": []
+    },
+    "plugin": {
+      "list": []
+    },
+    "gamePlugin": {
+      "list": []
+    },
+    "miniprogram": {
+      "list": []
+    }
+  }
+}