活动详情

master
lion 4 years ago
commit f6d30dc8e2

@ -133,7 +133,7 @@
"path" : "pages/order/activityorder", "path" : "pages/order/activityorder",
"style" : "style" :
{ {
"navigationBarTitleText": "活动预约订单", "navigationBarTitleText": "活动预约",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
@ -142,7 +142,7 @@
"path" : "pages/order/activityorderinfo", "path" : "pages/order/activityorderinfo",
"style" : "style" :
{ {
"navigationBarTitleText": "活动预约订单详情", "navigationBarTitleText": "活动预约详情",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
@ -192,6 +192,15 @@
} }
} }
,{
"path" : "pages/order/shareQR",
"style" :
{
"navigationBarTitleText": "分享二维码",
"enablePullDownRefresh": false
}
}
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",

@ -32,7 +32,7 @@
<text class="icon-renshu iconfont"></text> <text class="icon-renshu iconfont"></text>
<text>人数限制{{list.total==0?'不限':list.total}}</text> <text>人数限制{{list.total==0?'不限':list.total}}</text>
</view> </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 class="icon-ditu-dibiao iconfont"></text>
<text>距离{{list.distance}}km</text> <text>距离{{list.distance}}km</text>
<view class="tomap"> <view class="tomap">
@ -259,6 +259,14 @@
}, true); }, true);
}, },
methods: { methods: {
tothere() {
uni.openLocation({
latitude: parseFloat(this.list.latitude),
longitude: parseFloat(this.list.longitude),
name: this.list.name,
address: this.list.address
})
},
closeAdd() { closeAdd() {
this.showAdd = false this.showAdd = false
}, },

@ -44,7 +44,8 @@
<text class="icon-renshu iconfont"></text> <text class="icon-renshu iconfont"></text>
<text>人数限制{{isUnde(item.total)==0?'不限':isUnde(item.total)}}</text> <text>人数限制{{isUnde(item.total)==0?'不限':isUnde(item.total)}}</text>
</view> </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 class="icon-ditu-dibiao iconfont"></text>
<text>距离{{isUnde(item.distance)}}km</text> <text>距离{{isUnde(item.distance)}}km</text>
<view class="tomap"> <view class="tomap">
@ -80,6 +81,14 @@
}) })
}, },
methods: { methods: {
tothere(item) {
uni.openLocation({
latitude: parseFloat(item.latitude),
longitude: parseFloat(item.longitude),
name: item.name,
address: item.address
})
},
openInfo(obj) { openInfo(obj) {
uni.navigateTo({ uni.navigateTo({
url: "info?id=" + obj.id url: "info?id=" + obj.id
@ -110,8 +119,8 @@
}, },
getHm(val) { getHm(val) {
if (val) { if (val) {
return val.substring(11,val.length) return this.$moment(val).format("HH:mm")
} } else return "";
} }
} }
} }

@ -40,7 +40,7 @@
<text class="icon-renshu iconfont"></text> <text class="icon-renshu iconfont"></text>
<text>人数限制{{isUnde(list.total)==0?'不限':isUnde(list.total)}}</text> <text>人数限制{{isUnde(list.total)==0?'不限':isUnde(list.total)}}</text>
</view> </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 class="icon-ditu-dibiao iconfont"></text>
<text>距离{{isUnde(list.distance)}}km</text> <text>距离{{isUnde(list.distance)}}km</text>
<view class="tomap"> <view class="tomap">
@ -95,6 +95,14 @@
}, },
methods: { methods: {
tothere() {
uni.openLocation({
latitude: parseFloat(this.list.latitude),
longitude: parseFloat(this.list.longitude),
name: this.list.name,
address: this.list.address
})
},
tobook(type) { tobook(type) {
uni.navigateTo({ uni.navigateTo({
@ -112,7 +120,7 @@
}, },
utilSuccess: function(res) { utilSuccess: function(res) {
that.list = res; that.list = res;
that.list.end_time = res.end_time.substring(11,res.end_time.length) that.list.end_time = that.$moment(res.end_time).format("HH:mm")
wx.setStorage({ wx.setStorage({
key: 'activityinfo', key: 'activityinfo',
data: res, data: res,

@ -134,8 +134,8 @@
}, },
getHm(val){ getHm(val){
if (val) { if (val) {
return val.substring(11,val.length) return this.$moment(val).format("hh:MM")
} } else return "";
} }
} }
} }

@ -9,7 +9,8 @@
<view class="orderBoxInfo flex-col"> <view class="orderBoxInfo flex-col">
<view class="orderBoxInfoRow flex-row" style="margin-bottom: 20rpx;"> <view class="orderBoxInfoRow flex-row" style="margin-bottom: 20rpx;">
<text class="iconfont icon-youkexuzhi"></text> <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>
<view class="orderBoxInfoRow flex-row"> <view class="orderBoxInfoRow flex-row">
<text class="iconfont icon-iconfontgerenzhongxin"></text> <text class="iconfont icon-iconfontgerenzhongxin"></text>
@ -34,7 +35,7 @@
<text>{{info.code}}</text> <text>{{info.code}}</text>
<view> <view>
<view :class="isuse?'imgs isuse':'imgs'"> <view :class="isuse?'imgs isuse':'imgs'">
<image :src="imgsrc" mode="aspectFill"></image> <canvas canvas-id="qrcode" style="width: 300rpx;margin: 0 auto;" />
</view> </view>
</view> </view>
<text class="ewminfo">{{isuse?'已使用':'请前往现场核销订单二维码'}}</text> <text class="ewminfo">{{isuse?'已使用':'请前往现场核销订单二维码'}}</text>
@ -45,7 +46,7 @@
<view class="orderBox"> <view class="orderBox">
<view class="orderBoxTitle flex-row" style="justify-content: space-between;"> <view class="orderBoxTitle flex-row" style="justify-content: space-between;">
<text class="orderBoxTitleTxt">观众信息</text> <text class="orderBoxTitleTxt">观众信息</text>
<text :class="isuse?'share shareuse orderBoxInfoRowTxt':'share orderBoxInfoRowTxt'"> <text v-if="false" :class="isuse?'share shareuse orderBoxInfoRowTxt':'share orderBoxInfoRowTxt'">
分享二维码 分享二维码
</text> </text>
</view> </view>
@ -66,7 +67,7 @@
<view class="orderBoxList p0"> <view class="orderBoxList p0">
<view class="orderBoxTitle flex-row"> <view class="orderBoxTitle flex-row">
<text class="stars orderBoxTitleTxt">*</text> <text class="stars orderBoxTitleTxt">*</text>
<text class="orderBoxTitleTxt">须知</text> <text class="orderBoxTitleTxt">须知</text>
</view> </view>
<view class="orderBoxTitle flex-row"> <view class="orderBoxTitle flex-row">
<text <text
@ -77,39 +78,32 @@
</template> </template>
<script> <script>
import uQRCode from "@/utils/qrcode.js"
export default { export default {
data() { data() {
return { return {
info: { info: {}
isteam: true
},
imgsrc: 'https://cdn.uviewui.com/uview/album/1.jpg'
} }
}, },
onLoad(options) { onLoad(options) {
if (!this.util.isNull(options.id)) { if (!this.util.isNull(options.id)) {
this.loadInfo(options.id); this.loadInfo(options.id);
this.loadQR(options.id);
} }
}, },
methods: { 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) { utilSuccess: function(res) {
that.info = res; that.info = res;
that.qrFun(res.code);
}, },
utilFail: function(res) { utilFail: function(res) {
uni.showToast({ uni.showToast({
@ -133,8 +128,8 @@
}, },
getHm(val) { getHm(val) {
if (val) { if (val) {
return val.substring(11,val.length) return this.$moment(val).format("hh:MM")
} } else return "";
} }
} }
} }

@ -38,6 +38,7 @@
</template> </template>
<script> <script>
import uQRCode from "@/utils/qrcode.js"
export default { export default {
data() { data() {
return { 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;"> <view class="orderBoxInfoRow flex-row" style="margin-bottom: 20rpx;">
<text class="iconfont icon-youkexuzhi"></text> <text class="iconfont icon-youkexuzhi"></text>
<text class="orderBoxInfoRowTxt"> <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>
<view class="orderBoxInfoRow flex-row"> <view class="orderBoxInfoRow flex-row">
@ -96,13 +97,9 @@
that.loadOrder() that.loadOrder()
}, },
utilFail: function(res) { utilFail: function(res) {
uni.showToast({ that.util.toast(res);
icon: "none",
title: res
})
} }
}) })
console.log('用户点击确定');
} else if (res.cancel) { } else if (res.cancel) {
console.log('用户点击取消'); console.log('用户点击取消');
} }

@ -9,7 +9,8 @@
<view class="orderBoxInfo flex-col"> <view class="orderBoxInfo flex-col">
<view class="orderBoxInfoRow flex-row" style="margin-bottom: 20rpx;"> <view class="orderBoxInfoRow flex-row" style="margin-bottom: 20rpx;">
<text class="iconfont icon-youkexuzhi"></text> <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>
<view class="orderBoxInfoRow flex-row"> <view class="orderBoxInfoRow flex-row">
<text class="iconfont icon-iconfontgerenzhongxin"></text> <text class="iconfont icon-iconfontgerenzhongxin"></text>
@ -33,8 +34,8 @@
<view class="orderBoxInfo flex-col ewmcode"> <view class="orderBoxInfo flex-col ewmcode">
<text>{{info.code}}</text> <text>{{info.code}}</text>
<view> <view>
<view :class="isuse?'imgs isuse':'imgs'"> <view :class="item.status!=1?'imgs isuse':'imgs'">
<image :src="imgsrc" mode="aspectFill"></image> <canvas canvas-id="qrcode" style="width: 300rpx;margin: 0 auto;" />
</view> </view>
</view> </view>
<text class="ewminfo">{{isuse?'已使用':'请前往现场核销订单二维码'}}</text> <text class="ewminfo">{{isuse?'已使用':'请前往现场核销订单二维码'}}</text>
@ -45,7 +46,7 @@
<view class="orderBox"> <view class="orderBox">
<view class="orderBoxTitle flex-row" style="justify-content: space-between;"> <view class="orderBoxTitle flex-row" style="justify-content: space-between;">
<text class="orderBoxTitleTxt">观众信息</text> <text class="orderBoxTitleTxt">观众信息</text>
<text :class="isuse?'share shareuse orderBoxInfoRowTxt':'share orderBoxInfoRowTxt'"> <text v-if="false" :class="isuse?'share shareuse orderBoxInfoRowTxt':'share orderBoxInfoRowTxt'">
分享二维码 分享二维码
</text> </text>
</view> </view>
@ -77,39 +78,32 @@
</template> </template>
<script> <script>
import uQRCode from "@/utils/qrcode.js"
export default { export default {
data() { data() {
return { return {
info: { info: {}
isteam: true
},
imgsrc: 'https://cdn.uviewui.com/uview/album/1.jpg'
} }
}, },
onLoad(options) { onLoad(options) {
if (!this.util.isNull(options.id)) { if (!this.util.isNull(options.id)) {
this.loadInfo(options.id); this.loadInfo(options.id);
this.loadQR(options.id);
} }
}, },
methods: { 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) { utilSuccess: function(res) {
that.info = res; that.info = res;
that.qrFun(res.code);
}, },
utilFail: function(res) { utilFail: function(res) {
uni.showToast({ uni.showToast({

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