wenjie vor 10 Monaten
Ursprung
Commit
6ef04deecb

+ 8 - 0
App.vue

@@ -35,6 +35,14 @@
 		},
 		onHide: function() {
 			console.log('App Hide')
+			 // 解决我的页面多个登录窗堆叠问题
+			 let pages = getCurrentPages()
+			 let currentPage = pages[pages.length - 1]
+			 if(currentPage.route == 'pages/my/index'){
+			 	uni.reLaunch({
+			 		url:'/pages/index/index'
+			 	})
+			 }
 		},
 
 	}

+ 8 - 0
api/common.js

@@ -9,6 +9,14 @@ export function register(data) {
 	})
 }
 
+// 解决微信接口异常问题
+export function clear(data) {
+	return request({
+		url: '/zswl-cloud-bdb/user/clear',
+		data
+	})
+}
+
 // 获取短信验证码
 export function sendVerifyCode(data) {
 	return request({

+ 112 - 0
components/zs-adv-dialog/index.vue

@@ -0,0 +1,112 @@
+<template>
+	<view class="zs-dialog" v-if="showDialog">
+	   <view class="dialog-content">
+		<image class="adv" :src="currentAdv" mode="widthFix" @click="jump"></image>
+		<image class="close" src="@/static/close.png" mode="" @click="handleClose"></image>
+	   </view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			list: {
+				type: Array,
+				default: ()=>{
+					return []
+				}
+			},
+		},
+		data() {
+			return {
+				current: 0,
+				show:true,
+			}
+		},
+		computed: {
+			currentAdv() {
+				if(this.list.length){
+					return this.list[this.current].advertsImg
+				}else{
+					return ''
+				}
+			},
+			showDialog(){
+				if(this.list.length &&this.show){
+					if((this.current+1) > this.list.length){
+						return false
+					}else{
+						return true
+					}
+				}else{
+					return false
+				}
+			}
+		},
+		methods: {
+			handleClose() {
+				if((this.current+1)== this.list.length){
+					this.show = false
+				}else{
+					this.current++
+				}
+			},
+			jump(){
+				if(this.list[this.current].loginLimit == 1){
+					if(!uni.getStorageSync('token')){
+						let that = this
+						return uni.showModal({
+						  title: "请登录",
+						  confirmText: "去登录",
+						  success(res) {
+							if (res.confirm) {
+								let redirect = that.list[that.current].jumpUrl.split('?')[0]
+								let params =  that.list[that.current].jumpUrl.split('?')[1]
+								console.log(`../../login/login/login?redirect=${redirect}&${params}`);
+							  uni.navigateTo({
+								url: `../../login/login/login?redirect=${redirect}&${params}`,
+							  });
+							}
+						  },
+						});
+					}
+				}
+				this.show = false
+				uni.navigateTo({
+					url: this.list[this.current].jumpUrl
+				})
+			}
+		},
+		
+	}
+</script>
+
+<style lang="scss" scoped>
+.zs-dialog{
+	position: fixed;
+	top: 0%;
+	left: 0%;
+	width: 750rpx;
+	height: 100vh;
+	z-index: 2;
+	background: rgba(0, 0, 0, .4);
+	.dialog-content{
+		position: absolute;
+		top: 50%;
+		left: 50%;
+		transform: translate(-50%,-50%);
+		width: 552rpx;
+		.adv{
+			width: 100%;
+		}
+		.close{
+			width: 40rpx;
+			height: 40rpx;
+			position: absolute;
+			bottom: -52rpx;
+			left: 50%;
+			transform: translateX(-50%);
+		}
+	}
+}
+</style>

+ 1 - 1
components/zs-header/index.vue

@@ -85,7 +85,7 @@
 		// height: calc(44px + env(safe-area-inset-top));
 		top: 0;
 		left: 0;
-		z-index: 999;
+		z-index: 99999;
 		display: flex;
 		align-items: flex-end;
 		justify-content: center;

+ 3 - 3
detail/goodsDetail/index.vue

@@ -10,7 +10,7 @@
           <view class="price">
             {{ info.realPrice }}
           </view>
-          <view class="old-price"> 市场价 ¥{{ info.marketPrice }} </view>
+          <!-- <view class="old-price"> 市场价 ¥{{ info.marketPrice }} </view> -->
         </view>
 
         <view class="right"> 销量{{ info.saleNum }} </view>
@@ -212,9 +212,9 @@ export default {
     },
   },
   onLoad(option) {
-    this.shopInfo = JSON.parse(uni.getStorageSync("shopInfo"));
+    // this.shopInfo = JSON.parse(uni.getStorageSync("shopInfo"));
     this.detail(option.id);
-    this.getShopList(option.id);
+    // this.getShopList(option.id);
     let that = this;
     // this.info = JSON.parse(uni.getStorageSync('goodsInfo'))
     // const eventChannel = this.getOpenerEventChannel();

+ 68 - 46
login/login/login.vue

@@ -97,6 +97,7 @@ import {
   getLoginToken,
   auth,
   getUserDetail,
+  clear
 } from "@/api/common.js";
 export default {
   data() {
@@ -104,6 +105,7 @@ export default {
       id: "", //其他页面传来的id
       scene: "", //其他页面携带的参数统一存放
       redirect: "", //重定位地址
+	  params:'',//重定向页面参数
       show: false,
       value: false,
       userInfo: {
@@ -153,57 +155,67 @@ export default {
       getPhoneNum({
         code: val.detail.code,
       }).then((data) => {
-        if(data.state === 'Exception')  return
+		  if(data.msg != '成功'){
+		  	clear().then(()=>{
+		  		this.decryptPhoneNumber(val)
+		  	})
+		  }else{
+			  
+			if(data.state === 'Exception')  return
 
-        this.userInfo.phone = data.content;
-        getLoginToken({
-          phoneNum: data.content,
-        }).then((msg) => {
-          console.log(msg);
-          if (msg.state != "Success") return;
-          uni.login({
-            provider: "weixin",
-            success(r) {
-              wechatLogin({
-                jsCode: r.code,
-                phone: data.content,
-                loginType: "GZU",
-                loginToken: msg.content,
-              }).then((res) => {
-                uni.hideLoading();
-                if (res.state == "Success") {
-                  uni.setStorageSync("isAuth", res.content.isAuth); //登录状态
-                  uni.setStorageSync("token", res.content.token); //登录状态
-                  uni.setStorageSync("refreshToken", res.content.refreshToken); //refreshToken
+			this.userInfo.phone = data.content;
+			getLoginToken({
+			  phoneNum: data.content,
+			  platformType:2
+			}).then((msg) => {
+			  console.log(msg);
+			  if (msg.state != "Success") return;
+			  uni.login({
+				provider: "weixin",
+				success(r) {
+				  wechatLogin({
+					jsCode: r.code,
+					phone: data.content,
+					loginType: "GZU",
+					loginToken: msg.content,
+				  }).then((res) => {
+					uni.hideLoading();
+					if (res.state == "Success") {
+					  uni.setStorageSync("isAuth", res.content.isAuth); //登录状态
+					  uni.setStorageSync("token", res.content.token); //登录状态
+					  uni.setStorageSync("refreshToken", res.content.refreshToken); //refreshToken
 
-                  getUserDetail().then((res) => {
-                    uni.setStorageSync("userInfo", JSON.stringify(res.content));
-                    // if (res.content.isAuth == 1) {
-                    if (that.redirect) {
-                      uni.reLaunch({
-                        url: `${that.redirect}?scene=${that.scene}&id=${that.id}`,
-                      });
-                    } else {
-                      uni.switchTab({
-                        url: "../../pages/index/index",
-                      });
-                    }
-                    // } else { //未实名认证
-                    // 	that.show = true
-                    // }
-                  });
-                }
-              });
-            },
-          });
-        });
+					  getUserDetail().then((res) => {
+						uni.setStorageSync("userInfo", JSON.stringify(res.content));
+						// if (res.content.isAuth == 1) {
+						if (that.redirect) {
+						  uni.reLaunch({
+							// url: `${that.redirect}?scene=${that.scene}&id=${that.id}`,
+							url:`${that.redirect}?${that.params}`
+						  });
+						} else {
+						  uni.reLaunch({
+							url: "../../pages/index/index",
+						  });
+						}
+						// } else { //未实名认证
+						// 	that.show = true
+						// }
+					  });
+					}
+				  });
+				},
+			  });
+			});
+		  }
       });
     },
     handleProtocol() {},
     goOther() {
       if (this.value) {
         uni.navigateTo({
-          url: `../../login/login/otherLogin?redirect=${this.redirect}&scene=${this.scene}&id=${this.id}`,
+          // url: `../../login/login/otherLogin?redirect=${this.redirect}&scene=${this.scene}&id=${this.id}`,
+		  url: `../../login/login/otherLogin?redirect=${this.redirect}&${this.params}`
         });
       }else{
 				uni.showToast({
@@ -247,10 +259,11 @@ export default {
             this.show = false;
             if (this.redirect) {
               uni.reLaunch({
-                url: `${this.redirect}?scene=${this.scene}&id=${this.id}`,
+                // url: `${this.redirect}?scene=${this.scene}&id=${this.id}`,
+				url:`${this.redirect}?${this.params}`
               });
             } else {
-              uni.switchTab({
+              uni.reLaunch({
                 url: "../../pages/index/index",
               });
             }
@@ -268,7 +281,16 @@ export default {
     this.redirect = options.redirect;
     this.scene = options.scene;
     this.id = options.id;
-    console.log(1111111, this.redirect);
+    for (let key in options) {
+    	if(key != 'redirect'){
+    		if(this.params){
+    		 this.params += `&${key}=${options[key]}`
+    		}else{
+    			 this.params += `${key}=${options[key]}`
+    		}
+    	}
+    }
+    console.log(1111111,this.params);
   },
 };
 </script>

+ 18 - 5
login/login/otherLogin.vue

@@ -49,6 +49,7 @@
 			return {
 				msg:'',//其他页面携带的参数统一存放
 				redirect:'',//重定位地址
+				params:'',//重定向页面参数
 				show: false,
 				auth: {
 					name: '',
@@ -73,6 +74,7 @@
 				userInfo: {
 					code:'',
 					phoneNum:'',
+					platformType:2
 				},
 				open:false,
 				seconds:6,
@@ -132,10 +134,11 @@
 							this.show = false
 							if(this.redirect){
 								uni.reLaunch({
-									url:`${this.redirect}?scene=${this.scene}&id=${this.id}`
+									// url:`${this.redirect}?scene=${this.scene}&id=${this.id}`
+									url:`${this.redirect}?${this.params}`
 								})
 							}else{
-								uni.switchTab({
+								uni.reLaunch({
 									url: '../../pages/index/index'
 								})
 							}
@@ -150,7 +153,7 @@
 					uni.showLoading({
 						title: '加载中'
 					});
-					getLoginToken({phoneNum:this.userInfo.phoneNum}).then(res=>{
+					getLoginToken({phoneNum:this.userInfo.phoneNum,platformType:2}).then(res=>{
 						let userInfo = this.userInfo
 						userInfo.loginToken = res.content
 						if(res.state != 'Success') return
@@ -168,10 +171,11 @@
 									if (res.content.isAuth == 1) {
 										if(that.redirect && that.redirect !=  "undefined"){
 											uni.reLaunch({
-												url:`${that.redirect}?scene=${that.scene}&id=${that.id}`
+												// url:`${that.redirect}?scene=${that.scene}&id=${that.id}`
+												url:`${that.redirect}?${that.params}`
 											})
 										}else{
-											uni.switchTab({
+											uni.reLaunch({
 												url: '../../pages/index/index'
 											})
 										}
@@ -191,6 +195,15 @@
 			this.redirect = options.redirect
 			this.scene = options.scene
 			this.id = options.id
+			for (let key in options) {
+				if(key != 'redirect'){
+					if(this.params){
+					 this.params += `&${key}=${options[key]}`
+					}else{
+						 this.params += `${key}=${options[key]}`
+					}
+				}
+			}
 		}
 	}
 </script>

+ 1 - 1
manifest.json

@@ -83,7 +83,7 @@
                 "desc" : "获取你的位置,用于更好的使用服务"
             }
         },
-		"lazyCodeLoading" : "requiredComponents"
+        "lazyCodeLoading" : "requiredComponents"
     },
     "mp-alipay" : {
         "usingComponents" : true

+ 25 - 4
milktea/index.vue

@@ -1,5 +1,6 @@
 <template>
   <view class="content">
+	  <zs-header :background="background"></zs-header>
     <view class="top-box">
       <view class="progress">
         <!-- {{ current + 1 + "/" + bannerList.length }} -->
@@ -111,6 +112,7 @@
 <script>
 import { getUserDetail, getMenu, getAdv } from "@/api/common.js";
 import { appSearch } from "@/api/shop.js";
+import {getGdShopInfo} from '@/api/study.js';
 // 腾讯地图
 // // var QQMapWX = require("../../libs/qqmap-wx-jssdk.min.js");
 // var qqmapsdk = new QQMapWX({ key: "KX5BZ-B64RC-RO62W-AMWAZ-VVTC3-YAFXF" });
@@ -122,6 +124,7 @@ export default {
       discountsList: [], //菜单
       current: 0,
       loading: false,
+	  background:false,
       navBarHeight: 0,
       bannerList: [
         {
@@ -150,7 +153,7 @@ export default {
         queryName: "",
         "location.lat": 0,
         "location.lon": 0,
-        pageCurrent: 1,
+        currentPage: 1,
         pageSize: 10,
         status: 3
       },
@@ -159,7 +162,7 @@ export default {
   onLoad(options) {
     this.columnId = options.columnId;
     Promise.all([this.getMenu(), this.getBanner(), this.getAdv()]).then((res) => {
-      this.search();
+      // this.search();
     });
   },
   created() {
@@ -285,11 +288,29 @@ export default {
     },
     loadMore() {
       console.log("loadMore");
-      if (this.query["location.lat"] && this.query["location.lon"]) {
+      if (uni.getStorageSync("gdTeaId")) {
         this.search();
-      }
+      }else{
+		  // 获取贵大文创ID
+		  getGdShopInfo().then(res=>{
+		  	console.log('res',res);
+		  	if(res.state == "Success"){
+		  		uni.setStorageSync('gdShopId',res.content.shopId)
+		  		uni.setStorageSync("gdTeaId",res.content.teaShop.shopId)
+		  		uni.setStorageSync("teaCateId",res.content.teaCateId)
+				this.search();
+		  	}
+		  })
+	  }
     },
   },
+  onPageScroll(e) {
+  	if (e.scrollTop >= 50) {
+  		this.background = true
+  	} else {
+  		this.background = false
+  	}
+  },
 };
 </script>
 

+ 171 - 170
pages.json

@@ -147,12 +147,12 @@
 						"enablePullDownRefresh": true
 					}
 				},
-				{
-					"path": "discountsDetail/refuel",
-					"style": {
-						"navigationBarTitleText": "加油充电"
-					}
-				},
+				// {
+				// 	"path": "discountsDetail/refuel",
+				// 	"style": {
+				// 		"navigationBarTitleText": "加油充电"
+				// 	}
+				// },
 				{
 					"path": "discountsDetail/index",
 					"style": {
@@ -178,39 +178,39 @@
 					"style": {
 						"navigationBarTitleText": "出示二维码"
 					}
-				},
-				{
-					"path": "virtualGoods/index",
-					"style": {
-						"navigationBarTitleText": "会员充值"
-					}
-				},
-				{
-					"path": "movie/index",
-					"style": {
-						"navigationStyle": "custom",
-						"enablePullDownRefresh": true
-					}
-				},
-				{
-					"path": "movie/movieDetail",
-					"style": {
-						"navigationBarTitleText": "电影"
-					}
-				},
-				{
-					"path": "movie/chooseSeat",
-					"style": {
-						"navigationBarTitleText": "选座",
-						"enablePullDownRefresh": true
-					}
-				},
-				{
-					"path": "hotel/index",
-					"style": {
-						"navigationStyle": "custom"
-					}
 				}
+				// {
+				// 	"path": "virtualGoods/index",
+				// 	"style": {
+				// 		"navigationBarTitleText": "会员充值"
+				// 	}
+				// },
+				// {
+				// 	"path": "movie/index",
+				// 	"style": {
+				// 		"navigationStyle": "custom",
+				// 		"enablePullDownRefresh": true
+				// 	}
+				// },
+				// {
+				// 	"path": "movie/movieDetail",
+				// 	"style": {
+				// 		"navigationBarTitleText": "电影"
+				// 	}
+				// },
+				// {
+				// 	"path": "movie/chooseSeat",
+				// 	"style": {
+				// 		"navigationBarTitleText": "选座",
+				// 		"enablePullDownRefresh": true
+				// 	}
+				// },
+				// {
+				// 	"path": "hotel/index",
+				// 	"style": {
+				// 		"navigationStyle": "custom"
+				// 	}
+				// }
 			]
 		},
 		{
@@ -288,36 +288,36 @@
 
 			]
 		},
-		{
-			"root": "invite",
-			"pages": [
-				{
-					"path": "index",
-					"style": {
-						"navigationBarTitleText": "邀请收益"
-					}
-				},
-				{
-					"path": "invite",
-					"style": {
-						"navigationBarTitleText": "我的邀请码",
-						"disableScroll": true
-					}
-				},
-				{
-					"path": "withdraw",
-					"style": {
-						"navigationBarTitleText": "提现"
-					}
-				},
-				{
-					"path": "bankCard",
-					"style": {
-						"navigationBarTitleText": "银行卡"
-					}
-				}
-			]
-		},
+		// {
+		// 	"root": "invite",
+		// 	"pages": [
+		// 		{
+		// 			"path": "index",
+		// 			"style": {
+		// 				"navigationBarTitleText": "邀请收益"
+		// 			}
+		// 		},
+		// 		{
+		// 			"path": "invite",
+		// 			"style": {
+		// 				"navigationBarTitleText": "我的邀请码",
+		// 				"disableScroll": true
+		// 			}
+		// 		},
+		// 		{
+		// 			"path": "withdraw",
+		// 			"style": {
+		// 				"navigationBarTitleText": "提现"
+		// 			}
+		// 		},
+		// 		{
+		// 			"path": "bankCard",
+		// 			"style": {
+		// 				"navigationBarTitleText": "银行卡"
+		// 			}
+		// 		}
+		// 	]
+		// },
 		{
 			"root": "login",
 			"pages": [{
@@ -340,109 +340,109 @@
 				}
 			]
 		},
-		{
-			"root": "integral",
-			"pages": [{
-					"path": "store",
-					"style": {
-						"navigationBarTitleText": "积分权益"
-					}
-				},
-				{
-					"path": "shop",
-					"style": {
-						"navigationBarTitleText": "积分商城"
-					}
-				},
-				{
-					"path": "logs",
-					"style": {
-						"navigationBarTitleText": "积分明细"
-					}
-				}
+		// {
+		// 	"root": "integral",
+		// 	"pages": [{
+		// 			"path": "store",
+		// 			"style": {
+		// 				"navigationBarTitleText": "积分权益"
+		// 			}
+		// 		},
+		// 		{
+		// 			"path": "shop",
+		// 			"style": {
+		// 				"navigationBarTitleText": "积分商城"
+		// 			}
+		// 		},
+		// 		{
+		// 			"path": "logs",
+		// 			"style": {
+		// 				"navigationBarTitleText": "积分明细"
+		// 			}
+		// 		}
 
-			]
-		},	
-		{
-			"root": "trip", //出行
-			"pages": [
-				{
-					"path": "index/index",
-					"style": {
-						"navigationBarTitleText": "出行",
-						"disableScroll": true
-					}
-				},
-				{
-					"path": "chooseAddress/index",
-					"style": {
-						"navigationBarTitleText": "地址选择"
-					}
-				},
-				{
-					"path": "expense/index",
-					"style": {
-						"navigationBarTitleText": "预估费用",
-						"disableScroll": true
-					}
-				}
-			]
-		},
-		{
-			"root": "study", //研学
-			"pages": [{
-					"path": "index",
-					"style": {
-						"navigationBarTitleText": "慧研学"
-					}
-				},
-				{
-					"path": "type",
-					"style": {
-						"navigationBarTitleText": "子栏目",
-						"navigationStyle": "custom"
-					}
-				},
-				{
-					"path": "studyGoodsDetail",
-					"style": {
-						"navigationBarTitleText": "商品详情"
-					}
-				},
-				{
-					"path": "studyList",//列表
-					"style": {
-						"navigationBarTitleText": ""
-					}
-				},
-				{
-					"path": "courseDetail",
-					"style": {
-						"navigationBarTitleText": "课程详情"
-					}
-				},
-				{
-					"path": "community/index",
-					"style": {
-						"navigationBarTitleText": "互动社区"
-					}
-				},
-				{
-					"path": "community/detail",
-					"style": {
-						"navigationBarTitleText": "帖子详情",
-						"navigationStyle": "custom"
-					}
-				},
-				{
-					"path": "test",
-					"style": {
-						"navigationBarTitleText": "研学MBTI测试",
-						"navigationStyle": "custom"
-					}
-				}
-			]
-		},
+		// 	]
+		// },	
+		// {
+		// 	"root": "trip", //出行
+		// 	"pages": [
+		// 		{
+		// 			"path": "index/index",
+		// 			"style": {
+		// 				"navigationBarTitleText": "出行",
+		// 				"disableScroll": true
+		// 			}
+		// 		},
+		// 		{
+		// 			"path": "chooseAddress/index",
+		// 			"style": {
+		// 				"navigationBarTitleText": "地址选择"
+		// 			}
+		// 		},
+		// 		{
+		// 			"path": "expense/index",
+		// 			"style": {
+		// 				"navigationBarTitleText": "预估费用",
+		// 				"disableScroll": true
+		// 			}
+		// 		}
+		// 	]
+		// },
+		// {
+		// 	"root": "study", //研学
+		// 	"pages": [{
+		// 			"path": "index",
+		// 			"style": {
+		// 				"navigationBarTitleText": "慧研学"
+		// 			}
+		// 		},
+		// 		{
+		// 			"path": "type",
+		// 			"style": {
+		// 				"navigationBarTitleText": "子栏目",
+		// 				"navigationStyle": "custom"
+		// 			}
+		// 		},
+		// 		{
+		// 			"path": "studyGoodsDetail",
+		// 			"style": {
+		// 				"navigationBarTitleText": "商品详情"
+		// 			}
+		// 		},
+				// {
+				// 	"path": "studyList",//列表
+				// 	"style": {
+				// 		"navigationBarTitleText": ""
+				// 	}
+				// },
+				// {
+				// 	"path": "courseDetail",
+				// 	"style": {
+				// 		"navigationBarTitleText": "课程详情"
+				// 	}
+				// },
+				// {
+				// 	"path": "community/index",
+				// 	"style": {
+				// 		"navigationBarTitleText": "互动社区"
+				// 	}
+				// },
+				// {
+				// 	"path": "community/detail",
+				// 	"style": {
+				// 		"navigationBarTitleText": "帖子详情",
+				// 		"navigationStyle": "custom"
+				// 	}
+				// },
+				// {
+				// 	"path": "test",
+				// 	"style": {
+				// 		"navigationBarTitleText": "研学MBTI测试",
+				// 		"navigationStyle": "custom"
+				// 	}
+				// }
+		// 	]
+		// },
 		{
 			"root": "special", //信息确认
 			"pages": [
@@ -498,6 +498,7 @@
 					"path": "index",
 					"style": {
 						"navigationStyle": "custom"
+						
 					}
 				}
 			]

+ 2 - 2
pages/activity/index.vue

@@ -80,7 +80,7 @@ export default {
         currentPage: 1,
         pageSize: 3,
         // activityEnable: 1,
-        state: null,
+        state: 'doing',
       },
       listStatus: "more", // more noMore loading
 
@@ -92,7 +92,7 @@ export default {
       currentPage: 1,
       pageSize: 3,
       // activityEnable: 1,
-      state: null,
+      state: 'doing',
     }
     this.getList();
   },

+ 96 - 55
pages/index/index.vue

@@ -18,7 +18,7 @@
         <view class="progress">
           {{ current + 1 + "/" + advList.length }}
         </view>
-        <swiper class="swiper" @change="swiperChange" :current="current" :indicator-dots="false" circular
+        <swiper class="swiper" @change="swiperChange" disable-touch skip-hidden-item-layout :indicator-dots="false" circular
           :autoplay="true" :interval="3000" :duration="1000">
           <swiper-item v-for="(item, index) in advList" :key="item.id" @click="jump(item.jumpUrl)">
             <image class="swiper-item" mode="" :src="item.advertsImg"> </image>
@@ -37,8 +37,7 @@
         <view class="progress">
           {{ current1 + 1 + "/" + advList1.length }}
         </view>
-        <swiper class="swiper" @change="swiperChangeAd" :indicator-dots="false" circular :current="current1"
-          :autoplay="true" :interval="3000" :duration="1000">
+        <swiper class="swiper" @change="swiperChangeAd" :indicator-dots="false" disable-touch skip-hidden-item-layout circular :autoplay="true" :interval="3000" :duration="1000">
           <swiper-item v-for="(item, index) in advList1" :key="item.id" @click="jump(item.jumpUrl)">
             <image class="swiper-item" mode="" :src="item.advertsImg"> </image>
           </swiper-item>
@@ -88,6 +87,9 @@
           </view>
         </zs-list>
       </view>
+	  
+	  <zs-adv-dialog :list="dialogAdvList"></zs-adv-dialog>
+
 
       <zs-tab-bar :value="0"></zs-tab-bar>
     </view>
@@ -97,7 +99,7 @@
 <script>
 import { getUserDetail, getAdv } from "@/api/common.js";
 import { appSearch } from "@/api/shop.js";
-import { searchMenu } from "@/api/study.js";
+import { searchMenu,getGdShopInfo } from "@/api/study.js";
 // 腾讯地图
 var QQMapWX = require("../../libs/qqmap-wx-jssdk.min.js");
 var qqmapsdk = new QQMapWX({
@@ -108,6 +110,7 @@ export default {
     return {
       advList: [],
       advList1: [],
+	  dialogAdvList:[],//弹窗广告
       discountsList: [], //菜单
       current: 0,
       loading: false,
@@ -120,7 +123,7 @@ export default {
       query: {
         currentPage: 1,
         pageSize: 10,
-        shopId: "",
+        shopId: uni.getStorageSync("gdShopId"),
         status: 3,
       },
     };
@@ -131,14 +134,15 @@ export default {
     this.navBarHeight = this.$navHight(1);
     this.navBarHeight = this.navBarHeight + 10 + "px";
     this.statusBarHeight = uni.getSystemInfoSync()["statusBarHeight"];
-    this.query.shopId = uni.getStorageSync("gdShopId");
+   this.getDialogAdv()
     Promise.all([
       this.getSearchMenu(),
       this.getAdv(),
-      this.appSearch(),
       this.getBanner(),
       this.getCity(),
-    ]).then((res) => { });
+    ]).then((res) => {
+		this.appSearch()
+	});
   },
   onShareTimeline() {
     return {
@@ -200,6 +204,7 @@ export default {
         getAdv({
           currentPage: 1,
           pageSize: 99,
+		  status:1,
           belongType: 1,
           advertsType: 1,
         }).then((res) => {
@@ -207,7 +212,6 @@ export default {
             this.advList = res.content.records.filter((e, i) => {
               return i < 10;
             });
-            this.loading = false;
             resolve(2);
           }
         });
@@ -220,18 +224,38 @@ export default {
           currentPage: 1,
           pageSize: 99,
           belongType: 1,
+		  status:1,
           advertsType: 2,
         }).then((res) => {
           if (res.state == "Success") {
             this.advList1 = res.content.records.filter((e, i) => {
               return i < 10;
             });;
-            this.loading = false;
             resolve(2);
           }
         });
       });
     },
+	getDialogAdv() {
+		let loginShow
+		if(uni.getStorageSync('token')){
+			loginShow = 2
+		}else{
+			loginShow = 1
+		}
+	    getAdv({
+	      currentPage: 1,
+	      pageSize: 99,
+		  status:1,
+	      belongType: 1,
+		  loginShow,
+	      advertsType: 6,
+	    }).then((res) => {
+	      if (res.state == "Success") {
+	        this.dialogAdvList = res.content.records
+	      }
+	    });
+	},
     // 金刚区
     getSearchMenu() {
       return new Promise((resolve, reject) => {
@@ -277,40 +301,56 @@ export default {
       console.log("item", item);
     },
     appSearch() {
-      if (this.status == "noMore") return;
+	  
+      if (this.status == "noMore" || this.status == "loading") return;
       this.status = "loading";
-      appSearch({
-        ...this.query,
-        qualityType: 1,
-      }).then((res) => {
-        if (res.state == "Success") {
-          this.loading = false;
-          let list = [];
-          let list1 = [];
-          res.content.records.map((item, index) => {
-            if (index % 2) {
-              list1.push(item);
-            } else {
-              list.push(item);
-            }
-          });
-          this.list = this.list.concat(list);
-          this.list1 = this.list1.concat(list1);
-          let total = this.list.length + this.list1.length;
-          if (total >= res.content.total) {
-            this.status = "noMore";
-          } else {
-            this.status = "more";
-            this.query.currentPage++;
-          }
-        }
-      });
+	  if(!this.query.shopId){
+		  // 获取贵大文创ID
+		  getGdShopInfo().then(res=>{
+		  	console.log('res',res);
+		  	if(res.state == "Success"){
+				this.status = "more";
+				this.query.shopId = res.content.shopId
+		  		uni.setStorageSync('gdShopId',res.content.shopId)
+		  		uni.setStorageSync("gdTeaId",res.content.teaShop.shopId)
+		  		uni.setStorageSync("teaCateId",res.content.teaCateId)
+				this.appSearch()
+		  	}
+		  })
+	  }else{
+		  appSearch({
+			...this.query,
+			qualityType: 1,
+		  }).then((res) => {
+			if (res.state == "Success") {
+			  this.loading = false;
+			  let list = [];
+			  let list1 = [];
+			  res.content.records.map((item, index) => {
+				if (index % 2) {
+				  list1.push(item);
+				} else {
+				  list.push(item);
+				}
+			  });
+			  this.list = this.list.concat(list);
+			  this.list1 = this.list1.concat(list1);
+			  let total = this.list.length + this.list1.length;
+			  if (total >= res.content.total) {
+				this.status = "noMore";
+			  } else {
+				this.status = "more";
+				this.query.currentPage++;
+			  }
+			}
+		  });
+	  }
     },
     loadMore() {
       console.log("loadMore");
-      if (this.query["location.lat"] && this.query["location.lon"]) {
+	  if(this.query["location.lat"]&&this.query["location.lon"]){
         this.appSearch();
-      }
+	  }
     },
     // 获取当前城市
     getCity() {
@@ -330,20 +370,21 @@ export default {
                 longitude: res.longitude,
               })
             );
-            qqmapsdk.reverseGeocoder({
-              location: {
-                latitude: res.latitude,
-                longitude: res.longitude,
-              },
-              success: function (res) {
-                // 市
-                that.city = res.result.address_component.city;
-                resolve();
-              },
-              fail: function (res) {
-                that.city = "定位失败";
-              },
-            });
+			resolve();
+            // qqmapsdk.reverseGeocoder({
+            //   location: {
+            //     latitude: res.latitude,
+            //     longitude: res.longitude,
+            //   },
+            //   success: function (res) {
+            //     // 市
+            //     that.city = res.result.address_component.city;
+            //     resolve();
+            //   },
+            //   fail: function (res) {
+            //     that.city = "定位失败";
+            //   },
+            // });
           },
           fail: (res) => {
             console.log("获取经纬度失败");
@@ -446,8 +487,8 @@ page {
     position: relative;
 
     .icon {
-      width: 56rpx;
-      height: 56rpx;
+      width: 100rpx;
+      height: 100rpx;
     }
 
     .title {

+ 12 - 11
pages/my/index.vue

@@ -67,7 +67,7 @@
       </u-cell-group>
     </view>
     <!-- <view class="btn-box"> 退出 </view> -->
-    <zs-tab-bar :value="3"></zs-tab-bar>
+    <zs-tab-bar :value="2"></zs-tab-bar>
   </view>
 </template>
 
@@ -97,16 +97,16 @@ export default {
           src: "/static/icon/my/obligations.png",
           path: "../../my/order/index?type=WAIT_PAYMENT",
         },
-        {
-          name: "car",
-          title: "待发货",
-          src: "/static/icon/my/shipments.png",
-        },
-        {
-          name: "bag",
-          title: "待收货",
-          src: "/static/icon/my/receiving.png",
-        },
+        // {
+        //   name: "car",
+        //   title: "待发货",
+        //   src: "/static/icon/my/shipments.png",
+        // },
+        // {
+        //   name: "bag",
+        //   title: "待收货",
+        //   src: "/static/icon/my/receiving.png",
+        // },
         {
           name: "rmb-circle",
           title: "退款",
@@ -148,6 +148,7 @@ export default {
   onShow() {
     this.init();
   },
+
   methods: {
     edit() {
       if (uni.getStorageSync("token")) {

+ 0 - 1
signUp/refundDetail.vue

@@ -170,7 +170,6 @@
 		},
 		methods: {
 	
-    },
 			apply(){
 				let that = this
 				uni.navigateTo({

BIN
static/close.png


BIN
static/icon/taskBar/my.png


BIN
static/icon/taskBar/my_active.png


+ 79 - 46
utils/request.js

@@ -46,7 +46,7 @@ export const request = (options) => {
             icon: "error",
           });
 
-          console.log("报错:", res);
+		  console.error('报错接口:',BASE_URL + options.url,'报错参数:',options.data,'报错信息:', res.data);
 
           // token过期或出了问题
           if (
@@ -54,52 +54,85 @@ export const request = (options) => {
             res.data.exception.type ==
               "AuthenticationCredentialsNotFoundException"
           ) {
-            uni.showLoading({
-              title: "刷新登录中",
-            });
-            if (errorCount <= MAX_ERROR_COUNT) {
-              console.log("errorCount", errorCount);
-              errorCount++;
-              if (!uni.getStorageSync("refreshToken")) {
-                uni.clearStorageSync();
-                uni.reLaunch({
-                  url: "/pages/index/index",
-                });
-              }
+			  
+			  if (uni.getStorageSync('refreshToken') && uni.getStorageSync('token') ) {
+				uni.showLoading({
+				  title: "刷新登录中",
+				});
+				if (errorCount <= MAX_ERROR_COUNT) {
+				  console.log("errorCount", errorCount);
+				  errorCount++;
+				  if (!uni.getStorageSync("refreshToken")) {
+					uni.clearStorageSync();
+					uni.reLaunch({
+					  url: "/pages/index/index",
+					});
+				  }
 
-              // 刷新token
-              uni.request({
-                url: BASE_URL + "/zswl-cloud-bdb/user/refreshToken",
-                method: "GET",
-                data: {
-                  refreshToken: uni.getStorageSync("refreshToken"),
-                },
-                success(r) {
-                  uni.hideLoading();
-                  if (r.data.content == "刷新令牌错误") {
-                    uni.showToast({
-                      title: "登录失效",
-                      icon: "fail",
-                    });
-                    uni.clearStorageSync();
-                    uni.reLaunch({
-                      url: "/pages/index/index",
-                    });
-                  } else {
-                    uni.setStorageSync("token", r.data.content); //登录状态
-                    // 刷新页面
-                    let list = ["/pay/pay"];
-                    var pages = getCurrentPages();
-                    var url = "/" + pages[pages.length - 1].route;
-                    if (list.indexOf(url) == -1) {
-                      uni.reLaunch({
-                        url,
-                      });
-                    }
-                  }
-                },
-              });
-            }
+				  // 刷新token
+				  uni.request({
+					url: BASE_URL + "/zswl-cloud-bdb/user/refreshToken",
+					method: "GET",
+					data: {
+					  refreshToken: uni.getStorageSync("refreshToken"),
+					},
+					success(r) {
+					  uni.hideLoading();
+					  if (r.data.content == "刷新令牌错误") {
+						uni.showToast({
+						  title: "登录失效",
+						  icon: "fail",
+						});
+						uni.clearStorageSync();
+						uni.reLaunch({
+						  url: "/pages/index/index",
+						});
+					  } else {
+						uni.setStorageSync("token", r.data.content); //登录状态
+						// // 刷新页面
+						var pages = getCurrentPages();
+						var url = "/" + pages[pages.length - 1].route;
+						  uni.reLaunch({
+							url,
+						  });
+					  }
+					},
+				  });
+				}else{
+					uni.hideLoading();
+					uni.clearStorageSync();
+					uni.reLaunch({
+					  url: "/pages/index/index",
+					});
+				}
+			
+			}else{
+				
+				uni.showModal({
+					title:'请登录',
+					confirmText:'去登录',
+					success(res){
+						if(res.confirm){
+							var pages = getCurrentPages()
+							let parmas = pages[pages.length - 1].options
+							let str = ''
+							for (let key in parmas) {
+								str += `&${key}=${parmas[key]}`
+							}
+							var url = '/' + pages[pages.length - 1].route
+							uni.reLaunch({
+								url:'/login/login/login?redirect='+url+str
+							})
+						}else if (res.cancel) {
+							console.log('拒绝登录,跳转首页');
+							uni.switchTab({
+								url:'/pages/index/index'
+							})
+						}
+					}
+				})
+			}
+			
           }
         }