From 907ec8bf7687f8feaf4efbad3c98c585c31fc0e8 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期四, 21 八月 2025 10:53:23 +0800
Subject: [PATCH] 优化
---
small-program/pages/index/index.vue | 38 ++++++++++++++++++++++++++++----------
1 files changed, 28 insertions(+), 10 deletions(-)
diff --git a/small-program/pages/index/index.vue b/small-program/pages/index/index.vue
index 1c2ed91..c25d8e5 100644
--- a/small-program/pages/index/index.vue
+++ b/small-program/pages/index/index.vue
@@ -318,6 +318,7 @@
<script>
import { mapState } from 'vuex'
import sunuiMverify from '@/components/sunui-mverify/sunui-mverify.vue';
+ var QQMapWX = require('@/utils/qqmap-wx-jssdk.js');
export default {
components: { sunuiMverify },
computed: {
@@ -331,6 +332,7 @@
show: false,
isLogin: false,
typeId: 0,
+ qqmapsdk: null,
type: [
{ name: '鐢ㄥ伐', id: 0 },
{ name: '杩愯揣', id: 1 },
@@ -392,23 +394,38 @@
},
async onLoad() {
await this.$onLaunched;
- this.getCategoryLists()
- this.getOrderList()
+
+ if (this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}') {
+ this.getOrderList()
+ this.getCategoryLists()
+ }
+
+ this.qqmapsdk = new QQMapWX({
+ key: '4PXBZ-JLBC7-LCLXG-P2SZX-C4HYE-LDBLQ'
+ });
+
this.form.linkPhone = this.userInfo.telephone
},
onShow(options) {
this.typeViewId = 0
- if(this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}'){
+ if(this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}') {
+ console.log('宸茬櫥闄�')
this.isLogin = true
+
+ if (!this.isOnce && this.userInfo.useIdentity == 1) {
+ this.page = 1
+ this.next = true
+ this.orderList = []
+ this.getOrderList()
+ }
+
+ } else {
+ this.isLogin = false
+ console.log('鏈櫥闄�')
}
+
if (this.userInfo && this.userInfo.useIdentity == 1) {
this.typeViewId = 1
- }
- if (!this.isOnce && this.userInfo.useIdentity == 1) {
- this.page = 1
- this.next = true
- this.orderList = []
- this.getOrderList()
}
},
watch: {
@@ -421,7 +438,7 @@
this.form.longitude = ''
this.form.location = ''
this.form.locationEnd = ''
- this.form.wayInfoDTOList = ''
+ this.form.wayInfoDTOList = []
this.form.workType = ''
this.form.days = ''
this.form.locationRemark = ''
@@ -465,6 +482,7 @@
methods: {
// 鎵嬪姩鎺ュ崟
getaccept(e, orderId, index) {
+ if (!e.msg) return;
this.$u.api.accept({ orderId })
.then(res => {
if (res.code === 200) {
--
Gitblit v1.9.3