lianghanqiang пре 4 година
родитељ
комит
3814a68370
7 измењених фајлова са 81 додато и 20 уклоњено
  1. 4 3
      main.js
  2. 4 4
      manifest.json
  3. 20 7
      package-lock.json
  4. 1 0
      package.json
  5. 28 0
      pages.json
  6. 23 6
      pages/mine/mine.vue
  7. 1 0
      utils/global.js

+ 4 - 3
main.js

@@ -1,6 +1,5 @@
 import Vue from 'vue'
 import App from './App'
-
 //store
 import store from '@/store';
 let vuexStore = require("@/store/$u.mixin.js");
@@ -55,10 +54,12 @@ import verify from 'utils/verify.js'
 Vue.prototype.$verify = verify
 
 
+
 //跳转
-Vue.prototype.$jump=function(url){
+Vue.prototype.$jump=function(url,events){
 	uni.navigateTo({
-		url
+		url,
+		events
 	})
 }
 

+ 4 - 4
manifest.json

@@ -8,7 +8,7 @@
     /* 5+App特有相关 */
     "app-plus" : {
         "usingComponents" : true,
-		"nvueStyleCompiler" : "uni-app",
+        "nvueStyleCompiler" : "uni-app",
         "compilerVersion" : 3,
         "splashscreen" : {
             "alwaysShowBeforeRender" : true,
@@ -50,7 +50,7 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "",
+        "appid" : "wx9ad53e8c83ae1a51",
         "setting" : {
             "urlCheck" : false
         },
@@ -65,7 +65,7 @@
     "mp-toutiao" : {
         "usingComponents" : true
     },
-    "uniStatistics": {  
-        "enable": false
+    "uniStatistics" : {
+        "enable" : false
     }
 }

+ 20 - 7
package-lock.json

@@ -5,22 +5,35 @@
   "requires": true,
   "dependencies": {
     "@dcloudio/types": {
-      "version": "2.3.3",
-      "resolved": "https://registry.nlark.com/@dcloudio/types/download/@dcloudio/types-2.3.3.tgz?cache=0&sync_timestamp=1626160250541&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40dcloudio%2Ftypes%2Fdownload%2F%40dcloudio%2Ftypes-2.3.3.tgz",
-      "integrity": "sha1-DkDCovGSXVbbKXw0xSjqjIz7tOc="
+      "version": "2.4.4",
+      "resolved": "https://registry.npmjs.org/@dcloudio/types/-/types-2.4.4.tgz",
+      "integrity": "sha512-EzUqM5uDg3ZauhnDj9bJp8OVrO/J1JHRktrO3kkoEtK6sECU/F87GtVVpVActyKAMLOSw65yIfeF17Yl+ctaNA=="
+    },
+    "jssha": {
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/jssha/-/jssha-3.2.0.tgz",
+      "integrity": "sha512-QuruyBENDWdN4tZwJbQq7/eAK85FqrI4oDbXjy5IBhYD+2pTJyBUWZe8ctWaCkrV0gy6AaelgOZZBMeswEa/6Q=="
     },
     "luch-request": {
       "version": "3.0.6",
-      "resolved": "https://registry.nlark.com/luch-request/download/luch-request-3.0.6.tgz",
-      "integrity": "sha1-WizwScuL+BV6pWL44lsauV2kLZo=",
+      "resolved": "https://registry.npmjs.org/luch-request/-/luch-request-3.0.6.tgz",
+      "integrity": "sha512-Usv3fcQzrPL1RsVVLTJjPrzyv7NGxPTXoz+hnmq/bDPpcQeKApD2iCSHjxey0zbA6LPB6MbPZL9zBtLKl+GznA==",
       "requires": {
         "@dcloudio/types": "^2.0.16"
       }
     },
+    "totp-generator": {
+      "version": "0.0.9",
+      "resolved": "https://registry.npmjs.org/totp-generator/-/totp-generator-0.0.9.tgz",
+      "integrity": "sha512-ZrUn747mg6+FabOeUKP4neX2oUm69HjV1484kDYvtLfcGlO4XAq5xFwet/KJW7+zc2b09puTKCKMeTxzxfaKjw==",
+      "requires": {
+        "jssha": "^3.1.2"
+      }
+    },
     "uview-ui": {
       "version": "1.8.4",
-      "resolved": "https://registry.npm.taobao.org/uview-ui/download/uview-ui-1.8.4.tgz",
-      "integrity": "sha1-4yu/I3lCHTGQIuMk4ct7U4fTvUQ="
+      "resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.8.4.tgz",
+      "integrity": "sha512-Zr+D5dFdNy6CdHQLBEXeGq/w0LkjxzBtsgaaDwLl0P58g67H7fBBDvy6AzWK/k0c7dwPYMBiK7I4Tr9p92+0DA=="
     }
   }
 }

+ 1 - 0
package.json

@@ -11,6 +11,7 @@
   "license": "ISC",
   "dependencies": {
     "luch-request": "^3.0.6",
+    "totp-generator": "0.0.9",
     "uview-ui": "^1.8.4"
   }
 }

+ 28 - 0
pages.json

@@ -88,6 +88,34 @@
             }
             
         }
+		,{
+		    "path" : "pages/checkstand/index",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "收银台",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
+        ,{
+            "path" : "pages/checkstand/order-res",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "支付结果",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/checkstand/pay-qrcode",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "付款码",
+				"backgroundColor": "#007AFF",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"tabBar": {
 		"color": "#555555",

+ 23 - 6
pages/mine/mine.vue

@@ -1,5 +1,9 @@
 <template>
 	<view >
+		
+		<!-- 扫一扫错误回调 -->
+		<u-modal title="扫描异常"  confirm-color="#dc9b21"  v-model="scanNotify.scan" :content="scanNotify.scanMessage"></u-modal>
+		
 		<view style="position: relative;">
 			<image src="../../static/img/bg.png" class="bg-img"></image>
 			<image src="../../static/img/bg-yin.png" class="shuiyin" mode=""></image>
@@ -17,7 +21,7 @@
 				</view>
 				
 				<view class="cu-list grid col-3 no-border" style="border-radius:20rpx ;">
-					<view class="cu-item" @click="$jump(item.path)" v-for="(item,index) in menuList" :key="index">
+					<view class="cu-item" @click="item.name=='扫一扫'? scanCode() :$jump(item.path)" v-for="(item,index) in menuList" :key="index">
 						<view class="grid-icon" >
 							<image  style="width: 66rpx;height: 66rpx;" :src="item.icon"/>
 						</view>
@@ -119,19 +123,21 @@
 
 <script>
 	export default {
+	
 		data() {
 			return {
+				scanNotify:{scan: false,scanMessage:'扫描错误,请稍后重试!' },
 				toumindu: 0.00,
 				menuList:[
 					{
 						icon:'/static/icon/scan.png',
 						name:'扫一扫',
-						path:'/pages/mine/card/card'
+						path:'/pages/checkstand/index'
 					},
 					{
 						icon:'/static/icon/pay.png',
 						name:'付款码',
-						path:'/pages/mine/card/card'
+						path:'/pages/checkstand/pay-qrcode'
 					},
 					{
 						icon:'/static/icon/card.png',
@@ -184,11 +190,22 @@
 		onPageScroll(obj){
 			this.toumindu = obj.scrollTop*0.006;
 		},
-		onLoad() {
 
-		},
 		methods: {
-			
+			scanCode(){
+				const _this = this;
+				this.$jump('/pages/checkstand/index')
+				// uni.scanCode({
+				//     success: function (res) {
+				// 		_this.$jump('/pages/checkstand/index')
+				//     },
+				// 	fail: (res) => {
+				// 		if(res.errMsg!='scanCode:fail cancel'){
+				// 			this.scanNotify = {scan: true,scanMessage: res.errMsg};
+				// 		}
+				// 	}
+				// });
+			},
 		}
 	}
 </script>

+ 1 - 0
utils/global.js

@@ -4,6 +4,7 @@ let global = {
 	  APPID:'wx5d30bdd3d0f579af',//appid
 	  SECRET:"3e3a7793022808fcb63e215bfa1e1f93"
   },
+ 
 }
 
 export default global