From dc2ce4b8a9ff3c796bab8f06a8ea52bbb9f96e8e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=88=98=E7=BF=94=E5=AE=87-=E6=97=85=E7=AE=A1=E5=AE=B6?=
<153298343@qq.com>
Date: Mon, 16 May 2022 15:49:50 +0800
Subject: [PATCH] up
---
pages.json | 13 +-
pages/activity/index.vue | 99 +-
pages/activity/info.vue | 10 +-
pages/order/activityorderinfo.vue | 55 +-
pages/order/parkorderinfo.vue | 1 +
pages/order/shareQR.vue | 27 +
pages/order/visitorder.vue | 9 +-
pages/order/visitorderinfo.vue | 45 +-
utils/qrcode.js | 1441 +++++++++++++++++++++++++++++
9 files changed, 1591 insertions(+), 109 deletions(-)
create mode 100644 pages/order/shareQR.vue
create mode 100644 utils/qrcode.js
diff --git a/pages.json b/pages.json
index 720100e..f7cedda 100644
--- a/pages.json
+++ b/pages.json
@@ -133,7 +133,7 @@
"path" : "pages/order/activityorder",
"style" :
{
- "navigationBarTitleText": "活动预约订单",
+ "navigationBarTitleText": "活动预约",
"enablePullDownRefresh": false
}
@@ -142,7 +142,7 @@
"path" : "pages/order/activityorderinfo",
"style" :
{
- "navigationBarTitleText": "活动预约订单详情",
+ "navigationBarTitleText": "活动预约详情",
"enablePullDownRefresh": false
}
@@ -192,6 +192,15 @@
}
}
+ ,{
+ "path" : "pages/order/shareQR",
+ "style" :
+ {
+ "navigationBarTitleText": "分享二维码",
+ "enablePullDownRefresh": false
+ }
+
+ }
],
"globalStyle": {
"navigationBarTextStyle": "black",
diff --git a/pages/activity/index.vue b/pages/activity/index.vue
index 5fd69f2..c564736 100644
--- a/pages/activity/index.vue
+++ b/pages/activity/index.vue
@@ -1,7 +1,7 @@
-
+
@@ -44,7 +44,8 @@
人数限制:{{isUnde(item.total)==0?'不限':isUnde(item.total)}}
-
+
距离:{{isUnde(item.distance)}}km
@@ -63,55 +64,63 @@
data() {
return {
showInfo: true,
- list: [],
- latitude:"",
- longitude:"",
+ list: [],
+ latitude: "",
+ longitude: "",
}
- },
- onLoad() {
- var that = this;
- wx.getLocation({
- success(res) {
- console.log(res)
- that.latitude=res.latitude;
- that.longitude=res.longitude;
- that.loadActivity()
- }
- })
+ },
+ onLoad() {
+ var that = this;
+ wx.getLocation({
+ success(res) {
+ console.log(res)
+ that.latitude = res.latitude;
+ that.longitude = res.longitude;
+ that.loadActivity()
+ }
+ })
},
methods: {
+ tothere(item) {
+ uni.openLocation({
+ latitude: parseFloat(item.latitude),
+ longitude: parseFloat(item.longitude),
+ name: item.name,
+ address: item.address
+ })
+ },
openInfo(obj) {
uni.navigateTo({
- url: "info?id="+obj.id
+ url: "info?id=" + obj.id
+ })
+ },
+ loadActivity() {
+ var that = this;
+ this.util.request({
+ api: '/api/mobile/activity/index',
+ data: {
+ latitude: that.latitude,
+ longitude: that.longitude,
+ },
+ utilSuccess: function(res) {
+ that.list = res.data;
+ },
+ utilFail: function(res) {
+
+ }
})
- },
- loadActivity(){
- var that = this;
- this.util.request({
- api: '/api/mobile/activity/index',
- data:{
- latitude:that.latitude,
- longitude:that.longitude,
- },
- utilSuccess: function(res) {
- that.list = res.data;
- },
- utilFail: function(res) {
-
- }
- })
- },
- isUnde(val){
- if(val){
- return val
- }else{
- return ""
- }
- },
- getHm(val){
- if(val){
- return val.substring(11,val.length)
- }
+ },
+ isUnde(val) {
+ if (val) {
+ return val
+ } else {
+ return ""
+ }
+ },
+ getHm(val) {
+ if (val) {
+ return val.substring(11, val.length)
+ }
}
}
}
diff --git a/pages/activity/info.vue b/pages/activity/info.vue
index 4248d53..2b4c904 100644
--- a/pages/activity/info.vue
+++ b/pages/activity/info.vue
@@ -40,7 +40,7 @@
人数限制:{{isUnde(list.total)==0?'不限':isUnde(list.total)}}
-
+
距离:{{isUnde(list.distance)}}km
@@ -94,6 +94,14 @@
},
methods: {
+ tothere() {
+ uni.openLocation({
+ latitude: parseFloat(this.list.latitude),
+ longitude: parseFloat(this.list.longitude),
+ name: this.list.name,
+ address: this.list.address
+ })
+ },
tobook(type) {
uni.navigateTo({
diff --git a/pages/order/activityorderinfo.vue b/pages/order/activityorderinfo.vue
index 02b5690..f0341e8 100644
--- a/pages/order/activityorderinfo.vue
+++ b/pages/order/activityorderinfo.vue
@@ -9,7 +9,8 @@
- 订单信息:{{$u.timeFormat(new Date(info.activity.start_time), 'mm月dd日')}} {{getHm(info.activity.start_time)}}-{{getHm(info.activity.end_time)}}丨{{info.total}} 位观众
+ 订单信息:{{$u.timeFormat(new Date(info.activity.start_time), 'mm月dd日')}} {{getHm(info.activity.start_time)}}-{{getHm(info.activity.end_time)}}丨{{info.total}}位观众
@@ -34,7 +35,7 @@
{{info.code}}
-
+
{{isuse?'已使用':'请前往现场核销订单二维码'}}
@@ -45,7 +46,7 @@
观众信息
-
+
分享二维码
@@ -66,7 +67,7 @@
*
- 参观须知
+ 参与须知
+
+
diff --git a/pages/order/visitorder.vue b/pages/order/visitorder.vue
index 2faee38..6df5d11 100644
--- a/pages/order/visitorder.vue
+++ b/pages/order/visitorder.vue
@@ -18,7 +18,8 @@
- 订单信息:{{$u.timeFormat(new Date(item.date), 'mm月dd日')}} {{item.time}}丨{{item.details_count}} 位观众
+ 订单信息:{{$u.timeFormat(new Date(item.date), 'mm月dd日')}}
+ {{item.time}}丨{{item.details_count}} 位观众
@@ -96,13 +97,9 @@
that.loadOrder()
},
utilFail: function(res) {
- uni.showToast({
- icon: "none",
- title: res
- })
+ that.util.toast(res);
}
})
- console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
diff --git a/pages/order/visitorderinfo.vue b/pages/order/visitorderinfo.vue
index aeb3cb8..225c70d 100644
--- a/pages/order/visitorderinfo.vue
+++ b/pages/order/visitorderinfo.vue
@@ -9,7 +9,8 @@
- 订单信息:{{$u.timeFormat(new Date(info.date), 'mm月dd日')}}{{info.time||""}}丨{{info.total}} 位观众
+ 订单信息:{{$u.timeFormat(new Date(info.date), 'mm月dd日')}}{{info.time||""}}丨{{info.total||0}}位观众
@@ -33,8 +34,8 @@
{{info.code}}
-
-
+
+
{{isuse?'已使用':'请前往现场核销订单二维码'}}
@@ -45,7 +46,7 @@
观众信息
-
+
分享二维码
@@ -77,39 +78,32 @@