Ver Fonte

feat:二维码加时间,二维码参数是否为空判断

zhanghui há 1 ano atrás
pai
commit
b251840908
1 ficheiros alterados com 22 adições e 3 exclusões
  1. 22 3
      pages/index/index.vue

+ 22 - 3
pages/index/index.vue

@@ -294,6 +294,9 @@
 				<view class="flex-row justify-center">
 					<text>娇骄儿造型</text>
 				</view>
+        <view class="flex-row justify-center">
+          <text>{{codeTime}}</text>
+        </view>
 			</view>
 		</uni-popup>
 	</view>
@@ -302,6 +305,7 @@
 <script>
 	import MescrollItem from "./module/mescrollUni-item.vue";
 	import QQMapWX from '../../common/js/qqmap/myqqmap-sdk.js'
+  import {date} from "../../uni_modules/uv-ui-tools/libs/function/test";
 	export default {
 		components: {
 			MescrollItem
@@ -335,7 +339,8 @@
 					foregroundImagePadding: 2,
 					foregroundImageBorderRadius: 5,
 					foregroundImageSrc: '/static/logo.png'
-				}
+				},
+        codeTime:null,
 
 			}
 		},
@@ -359,9 +364,23 @@
 			},
 
 			promotion() {
+
+        console.log('------',this.userInfo)
+
+        if(!this.userInfo.workStoreId || !this.userInfo.techNo){
+          uni.showToast({
+            icon: 'error',
+            duration: 2000,
+            title: '请刷新页面重试'
+          });
+          return
+        }
+        let date = new Date();
+        this.codeTime = date.toLocaleString();
+
 				let data = {
-					promotionStoreId: this.userInfo.workStoreId || '',
-					techNo: this.userInfo.techNo || ''
+					promotionStoreId: this.userInfo.workStoreId ,
+					techNo: this.userInfo.techNo
 				};
 
 				for (let key in data) {