yanj 2 dienas atpakaļ
vecāks
revīzija
440e1a6087
5 mainītis faili ar 28 papildinājumiem un 19 dzēšanām
  1. 2 1
      .gitignore
  2. 6 2
      main.js
  3. 6 3
      pages/user/info-edit.vue
  4. 6 5
      pages/user/like.vue
  5. 8 8
      pages/user/login.vue

+ 2 - 1
.gitignore

@@ -1,3 +1,4 @@
 .hbuilderx/
 node_modules/
-unpackage/dist/
+unpackage/dist/
+.idea/

+ 6 - 2
main.js

@@ -6,7 +6,7 @@ import store from './store'
 import { initLocale } from '@/locales/i18n'
 import loadCloudFontFace from '@/utils/font'
 import Dialog from '@/wxcomponents/vant/dialog/dialog'
-	
+
 import './uni.promisify.adaptor'
 Vue.config.productionTip = false
 Vue.prototype.$config = {
@@ -16,6 +16,8 @@ Vue.prototype.onInitNavbar = function(e) {
 	this.$config.pageHeight = e.detail.pageHeight
 }
 Vue.prototype.checkAuth = function(pagePath) {
+	console.log(pagePath)
+	console.log(store.getters.user)
 	if (!store.getters.user) {
 		this.redirectTo('/pages/user/login?redirect=' + encodeURIComponent(pagePath))
 		return false
@@ -24,6 +26,7 @@ Vue.prototype.checkAuth = function(pagePath) {
 	}
 }
 Vue.prototype.redirectTo = function(pagePath) {
+	console.log(pagePath)
 	if (pagePath.indexOf('https') === -1) {
 		uni.redirectTo({
 			url: pagePath
@@ -35,6 +38,7 @@ Vue.prototype.redirectTo = function(pagePath) {
 	}
 }
 Vue.prototype.navigateTo = function(pagePath) {
+	console.log(pagePath)
 	if (pagePath.indexOf('http') === 0) {
 		this.webviewTo(pagePath)
 	} else {
@@ -157,4 +161,4 @@ export function createApp() {
 		app
 	}
 }
-// #endif
+// #endif

+ 6 - 3
pages/user/info-edit.vue

@@ -33,7 +33,7 @@
 	import VanCell from '@/wxcomponents/vant/cell/index'
 	import VanField from '@/wxcomponents/vant/field/index'
 	import { updateInfo, uploadFile } from '@/api/user'
-	
+
 	export default {
 		options: {
 			styleIsolation: 'shared'
@@ -82,7 +82,7 @@
 					this.avatar = res.data.avatar
 				}
 			})
-		}, 
+		},
 		methods: {
 			onChooseAvatar(e) {
 				this.avatar = e.detail.avatarUrl
@@ -146,6 +146,9 @@
 	.user-info-edit{
 		.right-icon{
 			position: relative;
+      button::after {
+        content: unset;
+      }
 			.btn-choose{
 				position: absolute;
 				background-color: transparent;
@@ -189,4 +192,4 @@
 			}
 		}
 	}
-</style>
+</style>

+ 6 - 5
pages/user/like.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="user-like">
+	<view class="user-like" v-if="loading">
 		<nav-bar title="我的点赞" @init="onInitNavbar"></nav-bar>
 		<u-scroll-view>
 			<view class="user-like-tabs-wrapper">
@@ -29,7 +29,7 @@
 	import UScrollView from '@/components/common/u-scroll-view'
 	import ExhibitItem from '@/pages/exhibitor/components/exhibit-item.vue'
 	import ExhibitorItem from '@/pages/exhibitor/components/exhibitor-item.vue'
-	
+
 	export default {
 		options: {
 			styleIsolation: 'shared'
@@ -45,6 +45,7 @@
 		},
 		data() {
 			return {
+        loading: false,
 				tabActive: 'exhibitor',
 				tabs: [{
 					label: '展商',
@@ -61,10 +62,10 @@
 			this.loadFontFace('Poppins')
 		},
 		onShow() {
-		}, 
+		},
 		methods: {
 			tabChange() {
-				
+
 			}
 		}
 	}
@@ -72,4 +73,4 @@
 
 <style lang="scss">
 	@import "@/static/style/pages/user-like.scss";
-</style>
+</style>

+ 8 - 8
pages/user/login.vue

@@ -45,7 +45,7 @@
 							 </van-button>
 						</view>
 						<view class="user-phone-login-protocol" :class="{ 'protocol-shake': protocolShake }">
-							<van-checkbox :value="protocolChecked" shape="square" @change="onCheckChange">	
+							<van-checkbox :value="protocolChecked" shape="square" @change="onCheckChange">
 								<view class="user-login-protocol-text">
 									<text>我已仔细阅读主办方的</text>
 									<text class="link-text" @click="navigateTo('https://www.productronicachina.com.cn/%E9%9A%90%E7%A7%81%E6%9D%A1%E6%AC%BE')">《隐私政策》</text>
@@ -61,13 +61,13 @@
 					</view>
 				</view>
 			</van-overlay>
-			<van-dialog 
-				:show.sync="showGetProfile" 
+			<van-dialog
+				:show.sync="showGetProfile"
 				title="登录成功"
-				message="设置您的的头像和呢称?" 
+				message="设置您的的头像和呢称?"
 				show-cancel-button
 				confirm-button-open-type="chooseAvatar"
-				@chooseavatar="onConfirmGetProfile" 
+				@chooseavatar="onConfirmGetProfile"
 				@cancel="onCancelGetProfile"
 			>
 			</van-dialog>
@@ -82,7 +82,7 @@
 	import VanCheckbox from '@/wxcomponents/vant/checkbox/index'
 	import VanOverlay from '@/wxcomponents/vant/overlay/index'
 	import VanDialog from '@/wxcomponents/vant/dialog/index'
-	
+
 	export default {
 		options: {
 			styleIsolation: 'shared'
@@ -365,8 +365,8 @@
 	  }
 	}
 	.protocol-shake {
-	  display: inline-block; 
+	  display: inline-block;
 	  animation: shake 0.3s ease-in-out infinite;
 	}
 }
-</style>
+</style>