achao 2 år sedan
förälder
incheckning
11428e8357

+ 1 - 1
xiaochengxu/pages/cardHolder/cardHolder.vue

@@ -282,7 +282,7 @@
 		<poster :data="canvasData" background-color="#FFF" :width='750' :height='420' @on-success="posterSuccess"
 			ref="poster" @on-error="posterError"></poster>
 		<!-- #ifdef MP-WEIXIN -->
-		<u-popup :show="isPhone" @close="cancelClick" mode="center" :round="10">
+		<u-popup :show="isPhone" mode="center" :round="10">
 			<view class='sq-view'>
 				<view class="text">
 					手机登录后才能查看名片哦~

+ 20 - 10
xiaochengxu/pages/circle/circle.vue

@@ -15,7 +15,7 @@
 				<u-badge :isDot="true" type="error" class="point position"></u-badge>
 			</view>
 		</view>
-		<mescroll-body ref="mescrollRef" @init="mescrollInit" @up="upCallback" @down="downCallback">
+		<mescroll-body ref="mescrollRef" @init="mescrollInit" @up="upCallback" @down="downCallback" :up="upOption" :down="downOption">
 			<view class="content2 flex flex-between">
 
 				<view class="left flex title">
@@ -70,21 +70,31 @@
 			return {
 				searchVal: '',
 				circleList: [],
-				userInfo: {},
+				userInfo:{},
+				downOption: {
+					auto: false,
+				},
+				upOption: {
+					auto: false,
+				},
 				canReset: false,
 			};
 		},
 		onLoad() {
 		},
 		onShow() {
-			// this.searchVal = uni.getStorageSync("cirlce_search_val") ? uni.getStorageSync("cirlce_search_val") : ''
-			this.userInfo = uni.getStorageSync("userInfo")
-			this.$nextTick(function() {
-				this.canReset && this.mescroll.resetUpScroll() // 重置列表数据为第一页  
-				this.canReset && this.mescroll.scrollTo(0, 0) // 重置列表数据为第一页时,建议把滚动条也重置到顶部,避免无法再次翻页的问题  
-				this.canReset = true // 过滤第一次的onShow事件,避免初始化界面时重复触发upCallback, 无需配置auto:false
-			});
-			this.searchVal = uni.getStorageSync("cirlce_search_val") ? uni.getStorageSync("cirlce_search_val") : ''
+			if (uni.getStorageSync("userInfo").phone) {
+				this.userInfo = uni.getStorageSync("userInfo")
+				this.$nextTick(function() {
+					this.mescroll.resetUpScroll()
+				});
+				this.searchVal = uni.getStorageSync("cirlce_search_val") ? uni.getStorageSync("cirlce_search_val") : ''
+			} else {
+				uni.switchTab({
+					url:"/pages/cardHolder/cardHolder"
+				})
+			}
+			
 		},
 		methods: {
 			delSearchVal() {

+ 26 - 19
xiaochengxu/pages/mySet/mySet.vue

@@ -38,6 +38,7 @@
 			@confirm="cardConfirm" :show="show1" :columns="cardList"></u-picker>
 		<poster :data="canvasData" background-color="#FFF" :width='750' :height='420' @on-success="posterSuccess"
 			ref="poster" @on-error="posterError"></poster>
+		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
 
@@ -98,22 +99,28 @@
 			};
 		},
 		onShow() {
-			this.userInfo = uni.getStorageSync("userInfo")
-			console.log(this.userInfo)
-			this.$request.baseRequest('admin.unimall.cardManagementInfo', 'list', {
-				commonId: uni.getStorageSync("userInfo").id
-			}, failres => {
-				this.$refs.uToast.show({
-					type: 'error',
-					message: failres.errmsg,
+			if (uni.getStorageSync("userInfo").phone) {
+				this.userInfo = uni.getStorageSync("userInfo")
+				this.$request.baseRequest('admin.unimall.cardManagementInfo', 'list', {
+					commonId: uni.getStorageSync("userInfo").id
+				}, failres => {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: failres.errmsg,
+					})
+					uni.hideLoading()
+				}).then(res => {
+					this.cardList = [res.data.items]
+					this.cardChange({
+						value: this.cardList[[0]]
+					})
 				})
-				uni.hideLoading()
-			}).then(res => {
-				this.cardList = [res.data.items]
-				this.cardChange({
-					value: this.cardList[[0]]
+			} else {
+				uni.switchTab({
+					url: "/pages/cardHolder/cardHolder"
 				})
-			})
+			}
+
 		},
 		onShareAppMessage(res) {
 			this.popupshow = false
@@ -441,12 +448,12 @@
 			},
 			menuClick(typeName) {
 				if (typeName == "contactCustomer") return
-			let _url = '/pages/mySet/' + typeName
-			uni.navigateTo({
-				url: _url
-			})
+				let _url = '/pages/mySet/' + typeName
+				uni.navigateTo({
+					url: _url
+				})
 			}
-			
+
 		}
 	}
 </script>