Browse Source

v1.0.1 & add lifeIm & site check

dev
刘嘉炜 2 weeks ago
parent
commit
400b68cb9e
  1. 35
      src/pages/member/index.vue
  2. BIN
      src/static/images/service.png
  3. 1
      src/subpackage/groupon/pages/confirm_order/venue.vue
  4. 6
      src/subpackage/groupon/pages/list.vue
  5. 80
      src/subpackage/groupon/pages/site_select.vue
  6. 2
      src/subpackage/order/pages/detail.vue

35
src/pages/member/index.vue

@ -1,7 +1,7 @@
<script setup>
import { onLoad, onShow } from '@dcloudio/uni-app';
import { reactive, ref } from 'vue';
import { routeTo } from "@/utils/polish";
import { routeTo, showModal } from "@/utils/polish";
const tkStr = ref('');
onLoad(() => {
@ -21,22 +21,12 @@ function handleError(e) {
console.log(`${e.detail.errNo}: ${e.detail.errMsg}`);
}
function login() {
tt.login({
success() {
tt.showToast({
title: '登录成功',
icon: 'success',
});
},
fail() {
tt.showToast({
title: '登录失败',
icon: 'fail',
});
},
});
}
function imError(e){
console.warn('imError', e);
showModal({ content: e?.detail?.errMsg ?? '客服功能异常,请稍后重试' });
}
</script>
@ -58,14 +48,18 @@ function login() {
<view class="mu-btn" @click="toLogin">登录</view>
</view>
</view>
<view class="mi-section" v-if="false">
<view class="mi-section">
<view class="ms-tool">
<view class="mt-tit">我的工具</view>
<view class="mt-ls">
<view class="ml-item">
<!-- <view class="ml-item">
<image class="mi-icon" mode="aspectFit" src="/static/images/certification.png"></image>
<view class="mi-txt">服务资质</view>
</view>
</view> -->
<button class="ml-item" open-type="lifeIm" @error="imError">
<image class="mi-icon" mode="aspectFit" src="/static/images/service.png"></image>
<view class="mi-txt">联系客服</view>
</button>
</view>
</view>
</view>
@ -128,6 +122,7 @@ function login() {
margin-top: 40upx;
padding: 0 30upx;
.ml-item{
@include clearBtn;
display: inline-block;
font-size: 0;
.mi-icon{

BIN
src/static/images/service.png

After

Width: 44  |  Height: 44  |  Size: 582 B

1
src/subpackage/groupon/pages/confirm_order/venue.vue

@ -116,6 +116,7 @@ function confirmBtn(){
}
console.log('tt.verifyCertificates data -->', _query)
showLoad();
// api
return tt.verifyCertificates(_query);
}

6
src/subpackage/groupon/pages/list.vue

@ -16,8 +16,10 @@ onLoad(() => {
}
})
.then(res => {
if(res?.data?.data?.total === 0)return showModal({ content: '暂无票券' });
ticketLs.value = res.data?.data?.orders || [];
let _data = res?.data?.data || {};
if(_data?.error_code&&_data?.description)return showModal({ content: _data?.description });
if(_data?.total === 0)return showModal({ content: '暂无票券' });
ticketLs.value = _data?.orders || [];
});
});

80
src/subpackage/groupon/pages/site_select.vue

@ -2,8 +2,9 @@
import { onLoad, onReady } from '@dcloudio/uni-app';
import { reactive, ref, computed, watch, nextTick, onMounted, getCurrentInstance } from 'vue';
import { stadiumBookList } from "@/api";
import { venueTypes, bookDate, bookList } from '../api';
import { venueTypes, bookDate, bookList, orderAdd } from '../api';
import { getNodeMes, showModal } from "@/utils/polish";
import { debounce } from "@/utils";
import siteTable from "../components/site/table.vue";
import siteFooter from "../components/site/footer.vue";
import { get_zh_day, get_zh_date } from "../js/site_select/handle";
@ -15,6 +16,7 @@ const currentVenueType = ref({}); // 当前场地类型
const bookDateData = ref([]); //
const currentBookDate = ref({}); //
const isShowTypeRuleTxt = ref(false);
const APPID = tt.getEnvInfoSync()?.microapp?.appId ?? '';
const stadiumInfo = ref({}); //
let ticketInfo = null; //
@ -161,34 +163,58 @@ async function setScrollViewSize(){
scrollHeight.value = _sysInfo?.windowHeight - (_otherHeight || 0);
}
function submitClick(venues){
console.warn('submitClick venues', venues);
uni.navigateTo({
url: `/subpackage/groupon/pages/confirm_order/venue`,
success: res => {
res.eventChannel.emit('dataFromGrouponSiteSelect', {
stadium: stadiumInfo.value,
ticket: ticketInfo,
venueInfo: {
classify: currentVenueType.value?.key ?? '',
typeName: currentVenueType.value?.name ?? '',
date: (currentBookDate.value?.date ?? '').slice(0, 10),
zh_day: currentBookDate.value?._zh_day,
venues: venues.map(e=>({
time: e?.time ?? '',
venue_name: e?._venue_name ?? '',
venue_id: e?._venue_id ?? '',
price: e?.price ?? '',
date: e?.date ?? '',
index: e?.index ?? '',
_class_tag: e?._class_tag ?? '',
}))
},
})
const submitClick = debounce(function(venues){
let _sVal = stadiumInfo.value;
let _vInfo = {
classify: currentVenueType.value?.key ?? '',
typeName: currentVenueType.value?.name ?? '',
date: (currentBookDate.value?.date ?? '').slice(0, 10),
zh_day: currentBookDate.value?._zh_day,
venues: venues.map(e=>({
time: e?.time ?? '',
venue_name: e?._venue_name ?? '',
venue_id: e?._venue_id ?? '',
price: e?.price ?? '',
date: e?.date ?? '',
index: e?.index ?? '',
_class_tag: e?._class_tag ?? '',
}))
}
let _classTags = (_vInfo?.venues ?? []).map(e=>e?._class_tag ?? '');
// add
return orderAdd({ data: {
appid: APPID,
brand_id: _sVal?.brand_id ?? '',
stadium_id: _sVal?.id ?? '',
date: _vInfo?.date,
sessions: (_vInfo?.venues || []).map(el=>({
venue_id: el?.venue_id ?? '',
duration: el?.time ?? '',
price: el?.price ?? 0,
tag: el?._class_tag ?? '',
})),
type_key: _vInfo?.classify ?? '',
class_tags_enable: _classTags.filter(e=>e!=='').join(','),
douyin_merchant_pay_amount: ticketInfo?.douyin_merchant_pay_amount ?? 0,
douyin_groupon_coupon_code: ticketInfo?.certificate_id ?? '',
} })
.then(res=>{
if(res?.code === 0 && res?.data?.order_no){
uni.navigateTo({
url: `/subpackage/groupon/pages/confirm_order/venue`,
success: res => {
res.eventChannel.emit('dataFromGrouponSiteSelect', {
stadium: stadiumInfo.value,
ticket: ticketInfo,
venueInfo: _vInfo,
})
}
});
}
});
})
}, 300, true);
}
</script>
<template>

2
src/subpackage/order/pages/detail.vue

@ -295,7 +295,7 @@ function imError(e){
<view class="od-fixed">
<!-- <view class="od-fixed"> -->
<button class="of-im-btn" open-type="im" data-im-id="oxydsh" @error="imError">
<button class="of-im-btn" open-type="lifeIm" @error="imError">
<view class="oib-icon">&#xe625;</view>
<view class="oib-txt">客服</view>
</button>

Loading…
Cancel
Save