Browse Source

自动登录

shish 4 years ago
parent
commit
001e146425
2 changed files with 6 additions and 18 deletions
  1. 5 17
      hdApp/src/pagesClient/official/result.vue
  2. 1 1
      hdApp/src/utils/util.js

+ 5 - 17
hdApp/src/pagesClient/official/result.vue

@@ -2,37 +2,25 @@
 	<appResult title="已提交">
       <!-- <view class="dec">审核时间为一个工作日</view> -->
       <view class="dec"></view>
-		<button 
-      class="admin-button-com blue big" 
-      @click="close"
-      >
-      返回
-    </button>
+		<button class="admin-button-com blue big" @click="goBack()" >返回</button>
 	</appResult>
 </template>
-
 <script>
 import appResult from '@/components/app-result'
 export default {
-	name: "ApplyResult", // 开单结果
+	name: "ApplyResult",
 	components:{
 		appResult
     },
     onUnload() {
-      uni.setStorageSync('HOME_REFRESH', '1')
-      uni.removeStorageSync('HOME_STATUS_STROAGE_SHOW')
     },
     methods:{
-      close() {
-        uni.removeStorageSync('OPEN_SHOP_ID')
-        uni.removeStorageSync('HOME_STATUS_STROAGE_SHOW')
-        this.$store.commit("setLoginInfo", {})
-        this.pageTo({url: "/admin/home/workbench",type: 3})
+      goBack() {
+        uni.navigateBack()
       }
     }
 };
 </script>
-
 <style lang="scss" scoped>
     .dec {
      color: #666666;   
@@ -44,4 +32,4 @@ export default {
 		margin-bottom: 20upx;
 		width: 100%;
 	}
-</style>
+</style>

+ 1 - 1
hdApp/src/utils/util.js

@@ -242,7 +242,7 @@ export const $formatDate = (num, fmt = "YYYY-MM-DD HH:mm", all) => {
  * @parmas item.funtion 为可执行函数
  * @parmas item.url 为跳转的路径
  * @parmas item.query 为跳转携带的参数
- * @parmas item.type 为跳转调用的函数 1为navigateTo, 2为redirectTo, 3为reLaunch, 4为switchTab
+ * @parmas item.type 为跳转调用的函数 1为navigateTo, 2为redirectTo 关闭当前页,跳转到指定页, 3为reLaunch, 4为switchTab
  */
 export const pageTo = item => {
 	if (isNumber(item)) {