Browse Source

登陆增加返回

chenjj 2 days ago
parent
commit
3d32ff3b1d

+ 1 - 0
components/Client/new_file.vue

@@ -129,6 +129,7 @@ const handleGridClick = async (service) => {
       parentId: service.id,
     }
     const res = await volunteerSeachgetTreeList(params)
+		console.log("TCL: handleGridClick -> res", res)
     uni.navigateTo({
       url: `/pages_home/pages/client/details?dataList=${encodeURIComponent(JSON.stringify(res.data))}&serviceCategory=${service.id}`
     });

+ 1 - 1
config.js

@@ -2,7 +2,7 @@
 const config = {
   // baseUrl: 'https://vue.ruoyi.vip/prod-api',
   //cloud后台网关地址
-  baseUrl: 'http://192.168.100.139:9527', //嵘哥
+  // baseUrl: 'http://192.168.100.139:9527', //嵘哥
   // baseUrl: 'http://192.168.100.122:9527',//龙哥
   // baseUrl: 'http://192.168.100.122:9527',
   baseUrl: 'https://goldshulin.com/prod-api',

+ 20 - 4
pages/login.vue

@@ -1,5 +1,8 @@
 <template>
   <view class="normal-login-container">
+    <view class="back-icon"  :style="`margin-top: ${globalData.statusBarHeight}px`">
+      <up-icon name="arrow-left" size="24" @click="backClick"></up-icon>
+    </view>
     <image src="/static/login13785@1x.png" mode="widthFix" class="wave-img"></image>
 
     <view class="logo-content" :style="`margin-top: ${globalData.navBarHeight}px`">
@@ -22,10 +25,6 @@
           </up-checkbox>
         </up-checkbox-group>
 
-        <!-- 备用方案:使用原生checkbox -->
-        <!-- <checkbox :checked="checkboxValue.value" @change="onNativeChange" style="transform:scale(0.7)" />
-        <text class="text-grey1">我已认真阅读、理解并同意</text> -->
-
         <text @click="handleUserAgrement" class="text-blue">《用户协议》</text>
         <text @click="handlePrivacy" class="text-blue">《隐私协议》</text>
       </view>
@@ -238,10 +237,27 @@ const onCheckboxChange = (value) => {
   checkboxValue.value = value
 }
 
+const backClick =() =>{
+  console.log('back');
+  
+  wx.navigateBack({  
+      delta: 1,  // 返回上一页 
+  });
+}
 
 </script>
 
 <style lang="scss" scoped>
+.back-icon {
+  height: 108rpx;
+  position: fixed;
+  width: 100%;
+  padding: 0 34rpx;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  z-index: 99;
+}
 .normal-login-container {
   // border: 2px solid red;
   width: 100vw;

+ 1 - 2
pages/mine/index.vue

@@ -326,7 +326,7 @@ const onLogin = () => {
         showConfirm('您还未登陆系统,是否前往登陆?').then((res) => {
             if (res.confirm) {
                 store.dispatch('LogOut').then((res) => {
-                    uni.reLaunch({ url: '/pages/login' })
+                    uni.navigateTo({ url: '/pages/login' })
                 })
             }
         })
@@ -336,7 +336,6 @@ const onLogou = () => {
     showConfirm('确认退出登陆吗?').then((res) => {
         if (res.confirm) {
             store.dispatch('LogOut').then((res) => {
-                // uni.reLaunch({ url: '/pages/login' })
                 uni.reLaunch({
                     url: '/pages/index',
                 })

+ 9 - 9
pages_home/components/pickerAddress/pickerAddress.vue

@@ -118,15 +118,15 @@ export default {
     /**
      * 点击确定
      * */
-    // bindPickerChange(e) {
-    // 	this.$emit('change', {
-    // 		index: this.value,
-    // 		data: selectVal,
-    // 		code: selectCode
-    // 	})
-    // 	console.log(selectCode)
-    // 	return this
-    // }
+    bindPickerChange(e) {
+    	this.$emit('change', {
+    		index: this.value,
+    		data: selectVal,
+    		code: selectCode
+    	})
+    	console.log(selectCode)
+    	return this
+    }
   }
 }
 </script>

+ 1 - 11
utils/request.ts

@@ -45,21 +45,11 @@ const request = <T>(config:RequestConfig):Promise<ResponseData<T>> => {
         showConfirm('您还未登陆系统,是否前往登陆?').then(res => {
           if (res.confirm) {
             store.dispatch('LogOut').then(res => {
-              uni.reLaunch({ url: '/pages/login' })
+              uni.navigateTo({ url: '/pages/login' })
             })
           }
         })
 
-        // uni.showToast({
-        //   title: '登陆后可以享受更多的服务哦',
-        //   icon: 'none',
-        // });
-        // setTimeout(() => {
-        //   store.dispatch('LogOut').then(res => {
-        //     uni.reLaunch({ url: '/pages/login' })
-        //   })
-        // }, 500);
-
         reject('无效的会话,或者会话已过期,请重新登录。')
       } else if (code === 500) {
         toast(msg)

+ 1 - 1
utils/upload.ts

@@ -40,7 +40,7 @@ const upload = <T>(config:RequestUploadConfig):Promise<ResponseData<T>> => {
             showConfirm("登录状态已过期,您可以继续留在该页面,或者重新登录?").then(res => {
               if (res.confirm) {
                 store.dispatch('LogOut').then(res => {
-                  uni.reLaunch({ url: '/pages/login' })
+                  uni.navigateTo({ url: '/pages/login' })
                 })
               }
             })