shish 4 лет назад
Родитель
Сommit
7b35889599

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

@@ -97,10 +97,13 @@
             <tui-list-cell @click="pageTo({ url: '/pagesStore/me/expressSet' })" class="line-cell" :hover="false" :arrow="true">
               <div class="tui-title">快递设置</div>
             </tui-list-cell>
+            <!-- #ifdef APP-PLUS -->
+            <tui-list-cell @click="closeApp()" class="line-cell" :hover="false" :arrow="true">
+              <div class="tui-title">关闭APP</div>
+            </tui-list-cell>
             <tui-list-cell @click="loginOut()" class="line-cell" :hover="false" :arrow="true">
-              <div class="tui-title">退出</div>
+              <div class="tui-title">退出登陆</div>
             </tui-list-cell>
-            <!-- #ifdef APP-PLUS -->
             <!-- #endif -->
           </view>
         </view>
@@ -165,6 +168,7 @@ export default {
         }
       }
     },
+    // #ifdef APP-PLUS
     loginOut(){
         let that = this
         that.$util.confirmModal({content:'确认退出?'},() => {
@@ -173,6 +177,22 @@ export default {
               plus.runtime.restart()
         })
     },
+    closeApp(){
+        let that = this
+        that.$util.confirmModal({content:'确认退出?'},() => {
+          let type = uni.getSystemInfoSync().platform
+          switch(type){
+            case 'android':
+              plus.runtime.quit()
+              break;
+            case 'ios':
+              plus.ios.import("UIApplication").sharedApplication().performSelector("exit")
+              break;
+            default:
+          }
+        })
+    },
+    // #endif
     async selectSussess () {
       uni.showLoading({
         title: "加载中",

+ 3 - 3
ghsApp/src/admin/home/workbench.vue

@@ -119,8 +119,7 @@ export default {
 		FabModule,
 		AppAvatarModule,
     	noneHd,
-		loginModel,
-		isScanEnv:false
+		loginModel
 	},
 	mixins: [productMins],
 	data() {
@@ -159,7 +158,8 @@ export default {
 			skSrc: `${this.$constant.imgUrl}/ghs/home/sk.jpg`,
 			pfSrc: `${this.$constant.imgUrl}/ghs/home/pf.jpg`,
 			skSrc3: `${this.$constant.imgUrl}/ghs/home/sk3.jpg`,
-			pfSrc3: `${this.$constant.imgUrl}/ghs/home/pf3.jpg`
+			pfSrc3: `${this.$constant.imgUrl}/ghs/home/pf3.jpg`,
+			isScanEnv:false
 		};
 	},
 	onShareAppMessage(res) {

+ 5 - 3
ghsApp/src/api/map/index.js

@@ -1,9 +1,11 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 
-/** *
- * 经纬度解析地址  jiangfneg  2021-06-26
- */
+//经纬度解析地址  jiangfneg  2021-06-26
 export const mapResolve = data => {
 	return https.get('/map/resolve', data)
 }
 
+//是否已经导航过
+export const hasHitNavigate = data => {
+	return https.get('/map/has-hit-navigate', data)
+}

+ 26 - 2
ghsApp/src/pagesOrder/detail.vue

@@ -13,7 +13,7 @@
 				</view>
 				<view>
 				<i @click.stop="callUp(detailInfo.customMobile)" class="iconfont icondianhua1"></i>
-				<i @click.stop="navigate(detailInfo.lat,detailInfo.long,detailInfo.customName)" class="iconfont icondianhua" style="font-size:53upx;margin-left:15upx;margin-right:9upx;color:#3385ff;"></i>
+				<i @click.stop="navigateTo(detailInfo.lat,detailInfo.long,detailInfo.customName)" class="iconfont icondianhua" style="font-size:53upx;margin-left:15upx;margin-right:9upx;color:#3385ff;"></i>
 				</view>
 			</view>
 			<view class="title">
@@ -195,6 +195,7 @@
 </template>
 
 <script>
+import { mapGetters } from "vuex";
 import stepStatus from "./components/stepStatus";
 import TuiListCell from "@/components/plugin/list-cell";
 import { getDetail,debtPay,hasPay, freeShipping,confirmFinish,cancel } from "@/api/order/index";
@@ -204,6 +205,7 @@ import productMins from "@/mixins/product";
 import { ORDER_STATUS } from "@/utils/declare";
 import BLE from "@/mixins/BLE";
 import { cloudPrintOrder } from "@/api/order";
+import { hasHitNavigate } from "@/api/map";
 export default {
 	name: "orderDetail",
 	components: {
@@ -235,6 +237,9 @@ export default {
 	onShow() {
 		this.init();
 	},
+	computed: {
+		...mapGetters({ loginInfo: "getLoginInfo" }),
+	},
 	methods: {
 		//结账(单个结账没有优惠)
 		settleOrder(item) {
@@ -272,7 +277,26 @@ export default {
 				}
 			})
 		},
-		navigate(latitude, longitude, address) {   
+		navigateTo(latitude, longitude, address) {
+			// #ifdef APP-PLUS
+			let that = this
+			if(that.loginInfo.hasHitNavigate != 1){
+              that.$util.confirmModal({content:'打开后点右下角按钮可正常导航'},() => {
+				hasHitNavigate().then(res=>{ 
+				  console.log(res.code)
+				  that.$store.commit("setHitNavigation")
+				})
+				that.openNavigateto(latitude, longitude, address)
+              })
+			}else{
+				that.openNavigateto(latitude, longitude, address)
+			}
+			// #endif
+			// #ifdef MP-WEIXIN
+			 this.openNavigateto(latitude, longitude, address)
+			// #endif
+		},
+		openNavigateto(latitude, longitude, address){
 			// 将经纬度转换成Number
 			let latituded = Number(latitude);
 			let longituded = Number(longitude);					

+ 2 - 0
ghsApp/src/pagesPurchase/details.vue

@@ -1,4 +1,5 @@
 <template>
+<view class="app-content">
 	<view class="affirm-page">
 		<view class="affirm-view overscroll">
 			<form>
@@ -128,6 +129,7 @@
 		</view>
 
 	</view>
+</view>
 </template>
 
 <script>

+ 3 - 0
ghsApp/src/store/modules/login.js

@@ -25,5 +25,8 @@ export default {
 		setMyShopInfo(state, payload) {
 			state.myShopInfo = payload
 		},
+		setHitNavigation(state){
+			state.loginInfo.hasHitNavigate = 1
+		}
 	}
 }