shish 2 年 前
コミット
1f21142e93
4 ファイル変更23 行追加6 行削除
  1. 2 2
      ghs/vue.config.js
  2. 15 2
      ghsApp/src/admin/home/me.vue
  3. 4 0
      ghsApp/src/api/admin/index.js
  4. 2 2
      pt/vue.config.js

+ 2 - 2
ghs/vue.config.js

@@ -3,13 +3,13 @@ const path = require('path');
 const isProduction = process.env.NODE_ENV === 'production';
 
 //http和https切换请修改这里,修改后需要重新运行npm run serve shish 2021.4.12
-const proxyTarget = 'https://api.shop.wixhb.com';
+const proxyTarget = 'http://api.shop.hzghd.com';
 
 function resolve(dir) {
 	return path.join(__dirname, dir);
 }
 
-let hostUrl = 'https://img.wixhb.com/';
+let hostUrl = 'http://img.hzghd.com/';
 
 const cdn = {
 	dev: {

+ 15 - 2
ghsApp/src/admin/home/me.vue

@@ -136,10 +136,10 @@
               <view class="tui-title">关闭APP</view>
             </tui-list-cell>
 
+            <!-- #endif -->
             <tui-list-cell @click="loginOut()" class="line-cell" :hover="false" :arrow="true" v-if="!$util.isEmpty(getLoginInfo.admin) && getLoginInfo.admin.currentGhsShopId > 0">
               <view class="tui-title">退出账号</view>
             </tui-list-cell>
-            <!-- #endif -->
 
           </view>
         </view>
@@ -187,6 +187,7 @@
 import AppAvatarModule from "@/components/module/app-avatar";
 import TuiListCell from "@/components/plugin/list-cell";
 import { mainMy, applyCash } from "@/api/home";
+import { clearLogin } from "@/api/admin";
 import { inMoney,outMoney } from "@/api/shop-money";
 import ShopSelect from "@/components/module/shopSelect";
 import { list } from "@/mixins";
@@ -365,15 +366,27 @@ export default {
       this.lookMoney = data.lookMoney
       uni.stopPullDownRefresh()      
     },
-    // #ifdef APP-PLUS
     loginOut(){
       let that = this
       that.$util.confirmModal({content:'确认退出?'},() => {
+        // #ifdef APP-PLUS
         uni.clearStorage()
         that.$store.commit("setLoginInfo", {})
         plus.runtime.restart()
+        // #endif
+        // #ifdef MP-WEIXIN
+        clearLogin().then(res=>{
+          uni.hideLoading()
+          if(res.code == 1){
+            uni.clearStorage()
+            that.$store.commit("setLoginInfo", {})
+            uni.reLaunch({url:'/admin/home/workbench'})
+          }
+        })
+        // #endif
       })
     },
+    // #ifdef APP-PLUS
     closeApp(){
       let that = this
       that.$util.confirmModal({content:'确认关闭?'},() => {

+ 4 - 0
ghsApp/src/api/admin/index.js

@@ -1,5 +1,9 @@
 import https from "@/plugins/luch-request_0.0.7/request";
 
+export const clearLogin = data => {
+	return https.get("/admin/clear-login", data);
+};
+
 export const getInfo = data => {
 	return https.get("/admin/info", data);
 };

+ 2 - 2
pt/vue.config.js

@@ -3,13 +3,13 @@ const path = require('path');
 const isProduction = process.env.NODE_ENV === 'production';
 
 //http和https切换请修改这里,修改后需要重新运行 npm run serve 即可 shish 2021.4.12
-const proxyTarget = 'https://api.pt.wixhb.com';
+const proxyTarget = 'http://api.pt.huaml.com';
 
 function resolve(dir) {
 	return path.join(__dirname, dir);
 }
 
-let hostUrl = 'https://img.wixhb.com/';
+let hostUrl = 'http://img.hzghd.com/';
 
 const cdn = {
 	dev: {