submit
This commit is contained in:
parent
70eb04db12
commit
efad69a78b
@ -49,6 +49,7 @@ watch(acc,()=>{
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.main{
|
||||
box-shadow: 0px -15rpx 30rpx 0px rgba(0, 0, 0, 0.1);
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
z-index: 9;
|
||||
|
@ -14,6 +14,7 @@ export const getInfo = () => {
|
||||
export const ticketlist = (data) => {
|
||||
return uniReq.post({
|
||||
url: '/api/ticket/ticketList',
|
||||
isLoading:false,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
@ -7,22 +7,29 @@ export default uniRequest.created({
|
||||
},
|
||||
interceptor: {
|
||||
request(config){
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask: true
|
||||
})
|
||||
setTimeout(()=>{
|
||||
uni.hideLoading()
|
||||
},5000)
|
||||
if (config.isLoading){
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask: true
|
||||
})
|
||||
setTimeout(()=>{
|
||||
uni.hideLoading()
|
||||
},5000)
|
||||
}
|
||||
|
||||
|
||||
return config
|
||||
},
|
||||
response(response) {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: response.data.msg,
|
||||
icon: 'none',
|
||||
duration: 50000
|
||||
})
|
||||
if (response.data.code!==200){
|
||||
uni.showToast({
|
||||
title: response.data.msg,
|
||||
icon: 'none',
|
||||
duration: 50000
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
return response.data
|
||||
}
|
||||
|
@ -16,6 +16,7 @@ type HttpMethod =
|
||||
interface RequestOptions {
|
||||
baseUrl?: string;
|
||||
url?: string;
|
||||
isLoading?: boolean;
|
||||
data?: Record<string, any>;
|
||||
method?: HttpMethod;
|
||||
header?: Record<string, string>;
|
||||
@ -65,10 +66,12 @@ type ResponseInterceptor = (response: any) => any;
|
||||
|
||||
class uniRequest {
|
||||
baseUrl?: string;
|
||||
isLoading: boolean;
|
||||
defaultHeader: Record<string, string>;
|
||||
interceptors: { request?: RequestInterceptor; response?: ResponseInterceptor };
|
||||
|
||||
constructor(request: RequestOptions) {
|
||||
this.isLoading= request.isLoading??true
|
||||
this.baseUrl = request.baseUrl;
|
||||
this.defaultHeader = {
|
||||
"Content-Type": "application/json;charset=UTF-8",
|
||||
@ -90,6 +93,7 @@ class uniRequest {
|
||||
request(options: RequestOptions): Promise<any> {
|
||||
options = this.buildRequestOptions(options)
|
||||
options = options || {};
|
||||
options.isLoading ??= this.isLoading;
|
||||
options.baseUrl = options.baseUrl || this.baseUrl;
|
||||
options.url = `${options.baseUrl}${options.url}`;
|
||||
options.data = options.data || {};
|
||||
|
@ -9,6 +9,7 @@
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"disableScroll": true,
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
@ -20,6 +21,7 @@
|
||||
{
|
||||
"path": "pages/home/index",
|
||||
"style": {
|
||||
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
|
@ -42,7 +42,7 @@ const getData=async ()=>{
|
||||
"pageSize": pageSize.value
|
||||
}
|
||||
const res=await ticketlist(data)
|
||||
if (res.code===0){
|
||||
if (res.code===200){
|
||||
tableData.value=res.data.data
|
||||
}
|
||||
}
|
||||
@ -61,11 +61,11 @@ const handleTips = () => {
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
.content2{
|
||||
height: 2000rpx;
|
||||
flex: 1;
|
||||
overflow-y: scroll;
|
||||
margin-top: 22rpx;
|
||||
.wrap2{
|
||||
margin-bottom: 68rpx;
|
||||
margin-top: 68rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
@ -2,12 +2,8 @@
|
||||
<div class="tab-index">
|
||||
<custom-title class="title-block" :title="accTitleList.find(x=>x.value===acc).title" :isBack="false">
|
||||
</custom-title>
|
||||
<uni-transition :show="acc===0" ref="ani" custom-class="transition" :mode-class="['fade', 'slide-left']">
|
||||
<home/>
|
||||
</uni-transition>
|
||||
<uni-transition :show="acc===1" ref="ani" custom-class="transition" :mode-class="['fade', 'slide-right']">
|
||||
<mine />
|
||||
</uni-transition>
|
||||
<div class="ld ld-float-ltr-in" v-show="acc===0"><home /></div>
|
||||
<div v-show="acc===1" class="ld ld-float-rtl-in"><mine /></div>
|
||||
<self-tabbar v-model="acc"></self-tabbar>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -22,12 +22,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="content2">
|
||||
<div class="wrap1">
|
||||
<div class="wrap1" :class="currentTab===0?['active']:[]" @click="switchOptions(0)">
|
||||
<div class="wrap1_1">2</div>
|
||||
<div class="wrap1_2">未使用门票</div>
|
||||
</div>
|
||||
<div class="wrap2"></div>
|
||||
<div class="wrap3 active">
|
||||
<div class="wrap3" :class="currentTab===1?['active']:[]" @click="switchOptions(1)">
|
||||
<div class="wrap1_1">3</div>
|
||||
<div class="wrap1_2">历史门票</div>
|
||||
</div>
|
||||
@ -66,11 +66,15 @@
|
||||
import {ref} from 'vue'
|
||||
import {onShow} from "@dcloudio/uni-app";
|
||||
const modeClass = ref('')
|
||||
const currentTab = ref(0)
|
||||
const show = ref(true)
|
||||
const userInfo = ref(uni.getStorageSync('userInfo') ?? {})
|
||||
onShow(() => {
|
||||
show.value = true
|
||||
})
|
||||
const switchOptions=(num)=>{
|
||||
currentTab.value=num
|
||||
}
|
||||
const goViewVenues = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/view-venues/index'
|
||||
|
@ -19,7 +19,7 @@
|
||||
<image src="../../static/zu1065@3x.png"></image>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="dialog" class="content4">
|
||||
<div v-show="dialog" class="content4">
|
||||
<div class="wrap1">
|
||||
<div class="wrap1_1">
|
||||
<div class="wrap1_1_1">
|
||||
@ -43,7 +43,7 @@
|
||||
<div class="wrap1_1_2_2">首都博物馆</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wrap1_2" @click="dialog=false">
|
||||
<div class="wrap1_2" @click="closeDialog">
|
||||
<div class="wrap1_2_1" >退出</div>
|
||||
<image style="width:28rpx;height: 28rpx " src="../../static/zu1043@3x.png"></image>
|
||||
</div>
|
||||
@ -52,8 +52,13 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import {ref} from 'vue'
|
||||
import {ref,nextTick} from 'vue'
|
||||
const dialogRef=ref(null)
|
||||
const dialog=ref(false)
|
||||
const closeDialog=()=>{
|
||||
dialog.value=false
|
||||
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.large-container{
|
||||
|
Loading…
Reference in New Issue
Block a user