|
|
@@ -75,7 +75,7 @@
|
|
|
dom: '', //房间号
|
|
|
campus: '', //校区
|
|
|
access_token: '',
|
|
|
- sub_appid: '1015730314_1941301045', //商户号
|
|
|
+ sub_appid: '', //商户号
|
|
|
order_id: '202107151048111111', //订单号
|
|
|
pay_info: '',
|
|
|
item: {},
|
|
|
@@ -141,6 +141,10 @@
|
|
|
this.roomSelect = this.campus + this.dom
|
|
|
|
|
|
this.add_class = 1;
|
|
|
+
|
|
|
+ this.order_id = get_order_id();
|
|
|
+
|
|
|
+ this.sub_appid = this.userinfo.sub_appid;
|
|
|
|
|
|
// this.sub_appid = this.userinfo.sub_appid
|
|
|
|
|
|
@@ -378,6 +382,28 @@
|
|
|
|
|
|
},
|
|
|
}
|
|
|
+
|
|
|
+ function get_order_id() {
|
|
|
+ const date = new Date()
|
|
|
+
|
|
|
+ let year = date.getFullYear()
|
|
|
+ let month = date.getMonth() + 1
|
|
|
+ let day = date.getDate()
|
|
|
+ let hour = date.getHours()
|
|
|
+ let minute = date.getMinutes()
|
|
|
+ let second = date.getSeconds()
|
|
|
+ let millisecond = date.getMilliseconds()
|
|
|
+
|
|
|
+ month = month > 9 ? month : '0' + month
|
|
|
+ day = day > 9 ? day : '0' + day
|
|
|
+ second = second > 9 ? second : '0' + second
|
|
|
+ // 小于4位数,前补0
|
|
|
+ // millisecond = millisecond < 1000 ? '00' + millisecond : millisecond
|
|
|
+ // 小于4位数,前补随机数
|
|
|
+ millisecond = millisecond < 1000 ? Math.floor(Math.random() * 999 + 1000) + millisecond : millisecond
|
|
|
+
|
|
|
+ return `${year}${month}${day}${hour}${minute}${second}${millisecond}`
|
|
|
+ }
|
|
|
</script>
|
|
|
|
|
|
<style>
|