wcni před 5 roky
rodič
revize
03610cba85

+ 1 - 1
common/request.js

@@ -25,7 +25,7 @@ const request = function(options) {
 		if(response.data.code != 1000) {
 			uni.showToast({
 				title: response.data.msg,
-				duration: 2000,
+				duration: 2500,
 				icon: 'none'
 			});
 		}

+ 201 - 0
component/newpoup.vue

@@ -0,0 +1,201 @@
+<template>
+    <view>
+        <view v-show="show" :style="{ top: offsetTop + 'px' }" class="uni-mask" @click="hide" @touchmove.stop.prevent="moveHandle" />
+        <view v-show="show" :class="'uni-popup-' + position + ' ' + 'uni-popup-' + mode" class="uni-popup">
+            {{ msg }}
+            <slot />
+            <view v-if="position === 'middle' && mode === 'insert'" :class="{
+          'uni-close-bottom': buttonMode === 'bottom',
+          'uni-close-right': buttonMode === 'right'
+        }" class=" uni-icon uni-icon-close" @click="closeMask" />
+        </view>
+    </view>
+</template>
+ 
+<script>
+    export default {
+        name: 'UniPopup',
+        props: {
+            /**
+             * 页面显示
+             */
+            show: {
+                type: Boolean,
+                default: false
+            },
+            /**
+             * 对齐方式
+             */
+            position: {
+                type: String,
+                // top - 顶部, middle - 居中, bottom - 底部
+                default: 'middle'
+            },
+            /**
+             * 显示模式
+             */
+            mode: {
+                type: String,
+                default: 'insert'
+            },
+            /**
+             * 额外信息
+             */
+            msg: {
+                type: String,
+                default: ''
+            },
+            /**
+             * h5遮罩是否到顶
+             */
+            h5Top: {
+                type: Boolean,
+                default: false
+            },
+            buttonMode: {
+                type: String,
+                default: 'bottom'
+            }
+        },
+        data() {
+            return {
+                offsetTop: 0
+            }
+        },
+        watch: {
+            h5Top(newVal) {
+                if (newVal) {
+                    this.offsetTop = 44
+                } else {
+                    this.offsetTop = 0
+                }
+            }
+        },
+        created() {
+            let offsetTop = 0
+            // #ifdef H5
+            if (!this.h5Top) {
+                offsetTop = 44
+            } else {
+                offsetTop = 0
+            }
+            // #endif
+            this.offsetTop = offsetTop
+        },
+        methods: {
+            hide() {
+                if (this.mode === 'insert' && this.position === 'middle') return
+                this.$emit('hidePopup')
+            },
+            closeMask() {
+                if (this.mode === 'insert') {
+                    this.$emit('hidePopup')
+                }
+            },
+            moveHandle() {}
+        }
+    }
+</script>
+<style>
+    .uni-mask {
+        position: fixed;
+        z-index: 998;
+        top: 0;
+        right: 0;
+        bottom: 0;
+        left: 0;
+        background-color: rgba(0, 0, 0, 0.3);
+    }
+ 
+    .uni-popup {
+        position: fixed;
+        z-index: 999;
+        background-color: #ffffff;
+    }
+ 
+    .uni-popup-middle {
+        display: flex;
+        flex-direction: column;
+        align-items: center;
+        justify-content: center;
+        top: 50%;
+        left: 50%;
+        transform: translate(-50%, -50%);
+    }
+ 
+    .uni-popup-middle.uni-popup-insert {
+        min-width: 380upx;
+        min-height: 380upx;
+        max-width: 100%;
+        max-height: 80%;
+        transform: translate(-50%, -65%);
+        background: none;
+        box-shadow: none;
+    }
+ 
+    .uni-popup-middle.uni-popup-fixed {
+        border-radius: 10upx;
+        padding: 30upx;
+    }
+ 
+    .uni-close-bottom,
+    .uni-close-right {
+        position: absolute;
+        bottom: -180upx;
+        text-align: center;
+        border-radius: 50%;
+        color: #f5f5f5;
+        font-size: 60upx;
+        font-weight: bold;
+        opacity: 0.8;
+        z-index: -1;
+    }
+ 
+    .uni-close-bottom {
+        margin: auto;
+        left: 0;
+        right: 0;
+    }
+ 
+    .uni-close-right {
+        right: -60upx;
+        top: -80upx;
+    }
+ 
+    .uni-close-bottom:after {
+        content: '';
+        position: absolute;
+        width: 0px;
+        border: 1px #f5f5f5 solid;
+        top: -300upx;
+        bottom: 56upx;
+        left: 50%;
+        transform: translate(-50%, -0%);
+        opacity: 0.8;
+    }
+ 
+    .uni-popup-top,
+    .uni-popup-bottom {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+    }
+ 
+    .uni-popup-top {
+        top: 0;
+        left: 0;
+        width: 100%;
+        height: 100upx;
+        line-height: 100upx;
+        text-align: center;
+    }
+ 
+    .uni-popup-bottom {
+        left: 0;
+        bottom: 0;
+        width: 100%;
+        min-height: 100upx;
+        line-height: 100upx;
+        text-align: center;
+    }
+</style>

+ 1 - 1
component/popup.vue

@@ -11,7 +11,7 @@
 </template>
 
 <script>
-	import uniPopup from './uni-popup.vue'
+	import uniPopup from './newpoup.vue'
 	export default {
 		props: {
 			ishow: {

+ 2 - 2
main.js

@@ -2,9 +2,9 @@ import Vue from 'vue'
 import App from './App'
 import store from './store/logion.js'	
 import request from './common/request.js'
-// 定义全局提示title
+// 定义全局提示title  https://www.qzaiwang.com/
 const pictureUrl = 'https://www.qzaiwang.com'  
-const msg = (title, duration=1500, mask=false, icon='none')=>{
+const msg = (title, duration=2000, mask=false, icon='none')=>{
 	//统一提示方便全局修改
 	if(Boolean(title) === false){
 		return;

+ 2 - 2
pages/index/index.vue

@@ -78,8 +78,8 @@
 		 定位失败暂时获取不到周边酒店信息哦
 	 </view>
      </scroll-view>
-	 <!-- || !successlogion -->
-	 <unipopup :images="images" v-if="enable == 1" :show="ishow"/>
+	 <!-- || !successlogion-->
+	 <unipopup :images="images"   v-if="enable == 1"  :show="ishow"/>
 	 <Gobacktop @getop="getop" v-if="isTop" />
 	</view>
 </template>

+ 4 - 2
pages/myOrder/index.vue

@@ -1,10 +1,11 @@
 <template>
 	<view>
-		 <van-skeleton  :loading="loading">
+		
 		<van-tabs :active="active"  @change="changeselect" style="width: 20%!important;">
 		  <van-tab v-for="(item, index) in menu" :name="index" :title="item.name">
 		  </van-tab>
 		</van-tabs>
+		<van-skeleton  :loading="loading">
 		<scroll-view  v-if="order_list.length > 0" style="height: 95vh;" class="floor-list"
 		  :scroll-top="scrollTop" scroll-y="true"  @scroll="scroll"  @scrolltoupper="upper" @scrolltolower="lower"
 		 :refresher-enabled="false">
@@ -43,6 +44,7 @@
 		  </view>
 		
 		</scroll-view> 
+		 </van-skeleton>
 		<view  v-if="order_list.length == 0 && successlogion && hasLogin" >
 			  <view style="margin: 120upx auto;text-align: center;">
 					<van-icon size="160rpx" color="#909399" name="description" />
@@ -64,7 +66,7 @@
 		 />
 		 <Gobacktop @getop="getop" v-if="isTop" />
 		<!--  <logionDialog @confirmDiaolog="confirmDiaolog" :ishow="false" @cancelDiaolog="cancelDiaolog" :showdialog="showdialog"/> -->
-	   </van-skeleton>
+	  
 	</view>
 </template>
 

+ 4 - 1
pages/myOrder/returngood.vue

@@ -87,7 +87,10 @@
 							this.$msg("申请退款成功");
 						}
 						uni.$emit('refshlist'); // 刷新订单详情
-						uni.navigateBack();
+						setTimeout(() => {
+							uni.navigateBack();
+						}, 2000)
+						
 					}
 				})
 			}