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