刘翔宇-旅管家 3 years ago
parent 4450511858
commit dc2ce4b8a9

@ -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",

@ -44,7 +44,8 @@
<text class="icon-renshu iconfont"></text>
<text>人数限制{{isUnde(item.total)==0?'不限':isUnde(item.total)}}</text>
</view>
<view class="activityBox-row flex-row align-center" style="margin-bottom: 0rpx;">
<view class="activityBox-row flex-row align-center" style="margin-bottom: 0rpx;"
@click.stop="tothere(item)">
<text class="icon-ditu-dibiao iconfont"></text>
<text>距离{{isUnde(item.distance)}}km</text>
<view class="tomap">
@ -64,8 +65,8 @@
return {
showInfo: true,
list: [],
latitude:"",
longitude:"",
latitude: "",
longitude: "",
}
},
onLoad() {
@ -73,25 +74,33 @@
wx.getLocation({
success(res) {
console.log(res)
that.latitude=res.latitude;
that.longitude=res.longitude;
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(){
loadActivity() {
var that = this;
this.util.request({
api: '/api/mobile/activity/index',
data:{
latitude:that.latitude,
longitude:that.longitude,
data: {
latitude: that.latitude,
longitude: that.longitude,
},
utilSuccess: function(res) {
that.list = res.data;
@ -101,16 +110,16 @@
}
})
},
isUnde(val){
if(val){
isUnde(val) {
if (val) {
return val
}else{
} else {
return ""
}
},
getHm(val){
if(val){
return val.substring(11,val.length)
getHm(val) {
if (val) {
return val.substring(11, val.length)
}
}
}

@ -40,7 +40,7 @@
<text class="icon-renshu iconfont"></text>
<text>人数限制{{isUnde(list.total)==0?'不限':isUnde(list.total)}}</text>
</view>
<view class="activityBox-row flex-row align-center">
<view class="activityBox-row flex-row align-center" @click="tothere">
<text class="icon-ditu-dibiao iconfont"></text>
<text>距离{{isUnde(list.distance)}}km</text>
<view class="tomap">
@ -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({

@ -9,7 +9,8 @@
<view class="orderBoxInfo flex-col">
<view class="orderBoxInfoRow flex-row" style="margin-bottom: 20rpx;">
<text class="iconfont icon-youkexuzhi"></text>
<text class="orderBoxInfoRowTxt">订单信息{{$u.timeFormat(new Date(info.activity.start_time), 'mm月dd日')}} {{getHm(info.activity.start_time)}}-{{getHm(info.activity.end_time)}}{{info.total}} 位观众</text>
<text
class="orderBoxInfoRowTxt">订单信息{{$u.timeFormat(new Date(info.activity.start_time), 'mm月dd日')}} {{getHm(info.activity.start_time)}}-{{getHm(info.activity.end_time)}}{{info.total}}位观众</text>
</view>
<view class="orderBoxInfoRow flex-row">
<text class="iconfont icon-iconfontgerenzhongxin"></text>
@ -34,7 +35,7 @@
<text>{{info.code}}</text>
<view>
<view :class="isuse?'imgs isuse':'imgs'">
<image :src="imgsrc" mode="aspectFill"></image>
<canvas canvas-id="qrcode" style="width: 300rpx;margin: 0 auto;" />
</view>
</view>
<text class="ewminfo">{{isuse?'已使用':'请前往现场核销订单二维码'}}</text>
@ -45,7 +46,7 @@
<view class="orderBox">
<view class="orderBoxTitle flex-row" style="justify-content: space-between;">
<text class="orderBoxTitleTxt">观众信息</text>
<text :class="isuse?'share shareuse orderBoxInfoRowTxt':'share orderBoxInfoRowTxt'">
<text v-if="false" :class="isuse?'share shareuse orderBoxInfoRowTxt':'share orderBoxInfoRowTxt'">
分享二维码
</text>
</view>
@ -66,7 +67,7 @@
<view class="orderBoxList p0">
<view class="orderBoxTitle flex-row">
<text class="stars orderBoxTitleTxt">*</text>
<text class="orderBoxTitleTxt">须知</text>
<text class="orderBoxTitleTxt">须知</text>
</view>
<view class="orderBoxTitle flex-row">
<text
@ -77,39 +78,32 @@
</template>
<script>
import uQRCode from "@/utils/qrcode.js"
export default {
data() {
return {
info: {
isteam: true
},
imgsrc: 'https://cdn.uviewui.com/uview/album/1.jpg'
info: {}
}
},
onLoad(options) {
if (!this.util.isNull(options.id)) {
this.loadInfo(options.id);
this.loadQR(options.id);
}
},
methods: {
loadQR(id) {
qrFun: function(text) {
uQRCode.make({
canvasId: 'qrcode',
componentInstance: this,
text: text,
size: 150,
margin: 0,
backgroundColor: '#ffffff',
foregroundColor: '#000000',
fileType: 'jpg',
errorCorrectLevel: uQRCode.errorCorrectLevel.H,
success: res => {
var that = this;
this.util.request({
api: '/api/mobile/activity/person-qrcode',
data: {
id: id
},
utilSuccess: function(res) {
//that.info = res;
console.log(res)
},
utilFail: function(res) {
uni.showToast({
icon: "none",
title: res
})
}
})
},
@ -122,6 +116,7 @@
},
utilSuccess: function(res) {
that.info = res;
that.qrFun(res.code);
},
utilFail: function(res) {
uni.showToast({
@ -131,10 +126,10 @@
}
})
},
getHm(val){
if(val){
return val.substring(11,val.length)
}
getHm(val) {
if (val) {
return this.$moment(val).format("hh:MM")
} else return "";
}
}
}

@ -38,6 +38,7 @@
</template>
<script>
import uQRCode from "@/utils/qrcode.js"
export default {
data() {
return {

@ -0,0 +1,27 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
onShareAppMessage() {
return {
title: "领取我的预约码"
}
},
methods: {
}
}
</script>
<style>
</style>

@ -18,7 +18,8 @@
<view class="orderBoxInfoRow flex-row" style="margin-bottom: 20rpx;">
<text class="iconfont icon-youkexuzhi"></text>
<text class="orderBoxInfoRowTxt">
订单信息{{$u.timeFormat(new Date(item.date), 'mm月dd日')}} {{item.time}}{{item.details_count}} 位观众</text>
订单信息{{$u.timeFormat(new Date(item.date), 'mm月dd日')}}
{{item.time}}{{item.details_count}} 位观众</text>
</view>
<view class="orderBoxInfoRow flex-row">
@ -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('用户点击取消');
}

@ -9,7 +9,8 @@
<view class="orderBoxInfo flex-col">
<view class="orderBoxInfoRow flex-row" style="margin-bottom: 20rpx;">
<text class="iconfont icon-youkexuzhi"></text>
<text class="orderBoxInfoRowTxt">订单信息{{$u.timeFormat(new Date(info.date), 'mm月dd日')}}{{info.time||""}}{{info.total}} 位观众</text></text>
<text
class="orderBoxInfoRowTxt">订单信息{{$u.timeFormat(new Date(info.date), 'mm月dd日')}}{{info.time||""}}{{info.total||0}}位观众</text></text>
</view>
<view class="orderBoxInfoRow flex-row">
<text class="iconfont icon-iconfontgerenzhongxin"></text>
@ -33,8 +34,8 @@
<view class="orderBoxInfo flex-col ewmcode">
<text>{{info.code}}</text>
<view>
<view :class="isuse?'imgs isuse':'imgs'">
<image :src="imgsrc" mode="aspectFill"></image>
<view :class="item.status!=1?'imgs isuse':'imgs'">
<canvas canvas-id="qrcode" style="width: 300rpx;margin: 0 auto;" />
</view>
</view>
<text class="ewminfo">{{isuse?'已使用':'请前往现场核销订单二维码'}}</text>
@ -45,7 +46,7 @@
<view class="orderBox">
<view class="orderBoxTitle flex-row" style="justify-content: space-between;">
<text class="orderBoxTitleTxt">观众信息</text>
<text :class="isuse?'share shareuse orderBoxInfoRowTxt':'share orderBoxInfoRowTxt'">
<text v-if="false" :class="isuse?'share shareuse orderBoxInfoRowTxt':'share orderBoxInfoRowTxt'">
分享二维码
</text>
</view>
@ -77,39 +78,32 @@
</template>
<script>
import uQRCode from "@/utils/qrcode.js"
export default {
data() {
return {
info: {
isteam: true
},
imgsrc: 'https://cdn.uviewui.com/uview/album/1.jpg'
info: {}
}
},
onLoad(options) {
if (!this.util.isNull(options.id)) {
this.loadInfo(options.id);
this.loadQR(options.id);
}
},
methods: {
loadQR(id) {
qrFun: function(text) {
uQRCode.make({
canvasId: 'qrcode',
componentInstance: this,
text: text,
size: 150,
margin: 0,
backgroundColor: '#ffffff',
foregroundColor: '#000000',
fileType: 'jpg',
errorCorrectLevel: uQRCode.errorCorrectLevel.H,
success: res => {
var that = this;
this.util.request({
api: '/api/mobile/visit/person-qrcode',
data: {
id: id
},
utilSuccess: function(res) {
//that.info = res;
console.log(res)
},
utilFail: function(res) {
uni.showToast({
icon: "none",
title: res
})
}
})
},
@ -122,6 +116,7 @@
},
utilSuccess: function(res) {
that.info = res;
that.qrFun(res.code);
},
utilFail: function(res) {
uni.showToast({

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save