From 591100a8b753e235a4abbad38482b455519c671a Mon Sep 17 00:00:00 2001
From: weipengfei <2187978347@qq.com>
Date: Tue, 12 Dec 2023 18:11:46 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8A=9F=E8=83=BD=E4=BF=AE?=
=?UTF-8?q?=E5=A4=8Dbug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/Loading.vue | 95 ++++++++++++++++++++++++++
main.js | 2 +
manifest.json | 4 +-
pages/chat/customer_list/chat.vue | 27 +++++---
pages/gather/gather.vue | 7 +-
pages/goods_details/index.vue | 6 +-
pages/nongKe/cloud_entrepot/indexb.vue | 14 +++-
pages/users/order_list/index.vue | 4 +-
utils/uniMP.js | 69 +++++--------------
9 files changed, 154 insertions(+), 74 deletions(-)
create mode 100644 components/Loading.vue
diff --git a/components/Loading.vue b/components/Loading.vue
new file mode 100644
index 0000000..c675451
--- /dev/null
+++ b/components/Loading.vue
@@ -0,0 +1,95 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/main.js b/main.js
index c99b17d..88585cf 100644
--- a/main.js
+++ b/main.js
@@ -17,10 +17,12 @@ import {
} from '@/config/app';
import skeleton from './components/skeleton/index.vue'
import BaseMoney from './components/BaseMoney.vue';
+import Loading from './components/Loading.vue';
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)
Vue.component('skeleton', skeleton)
Vue.component('BaseMoney', BaseMoney)
+Vue.component('Loading', Loading)
Vue.prototype.$util = util;
Vue.prototype.$Cache = Cache;
Vue.prototype.$eventHub = new Vue();
diff --git a/manifest.json b/manifest.json
index 37cf72a..eacab8f 100644
--- a/manifest.json
+++ b/manifest.json
@@ -2,8 +2,8 @@
"name" : "惠农生活",
"appid" : "__UNI__3A527D1",
"description" : "",
- "versionName" : "1.6.4",
- "versionCode" : 164,
+ "versionName" : "1.6.5",
+ "versionCode" : 165,
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
diff --git a/pages/chat/customer_list/chat.vue b/pages/chat/customer_list/chat.vue
index 9b7d49f..86f5981 100644
--- a/pages/chat/customer_list/chat.vue
+++ b/pages/chat/customer_list/chat.vue
@@ -780,6 +780,7 @@
+
@@ -793,9 +794,9 @@
{{ speak }}
-
+ v-model="textCon" @click="handleClick">
@@ -808,7 +809,6 @@
-
@@ -1402,9 +1402,14 @@
});
});
},
- focus: function() {
- this.active = false;
+ focus: async function() {
+ this.active = false;
},
+ handleClick(){
+ if(this.active){
+ this.active = false;
+ }
+ },
keyup: function() {
if (this.$refs.input.value.length > 0) {
this.sendColor = true;
@@ -1560,7 +1565,7 @@
self.scrollTop = parseInt(scrollTop) + 100
}
}).exec()
- }, 1000)
+ }, 200)
},
// 滚动到头部
bindScroll() {
@@ -1626,7 +1631,8 @@
margin-top: 20rpx;
width: 710rpx;
position: fixed;
- bottom: 160rpx;
+ bottom: 180rpx;
+ bottom: calc(160rpx + env(safe-area-inset-bottom)); /* 适应底部安全距离 */
left: 20rpx;
.broadcast-details_box,
@@ -1967,11 +1973,10 @@
transition: all 0.005s cubic-bezier(0.25, 0.5, 0.5, 0.9);
background-color: #fff;
position: fixed;
- bottom:var(--status-bar-height);
+ // bottom:var(--status-bar-height);
+ bottom: 20rpx;
+ bottom: calc(20rpx + env(safe-area-inset-bottom) );
left: 0;
-
-
-
}
.broadcast-details .footerCon.on {
diff --git a/pages/gather/gather.vue b/pages/gather/gather.vue
index 754dd11..d320cc2 100644
--- a/pages/gather/gather.vue
+++ b/pages/gather/gather.vue
@@ -81,6 +81,7 @@
-->
+
@@ -287,7 +288,6 @@
this.jurisdiction = true
}
this.getUserInfo()
-
},
onPullDownRefresh() {
@@ -328,7 +328,9 @@
}
},
// #endif
-
+ onHide() {
+ uni.$emit('showLoading', false);
+ },
methods: {
getPositionFn() {
this.street = '定位中'
@@ -435,6 +437,7 @@
},
getUniMp(type, data) {
let that = this;
+
// #ifdef APP-PLUS
switch (type) {
case 1:
diff --git a/pages/goods_details/index.vue b/pages/goods_details/index.vue
index 0019105..0481707 100644
--- a/pages/goods_details/index.vue
+++ b/pages/goods_details/index.vue
@@ -787,6 +787,7 @@
title: res.message
})
}).catch(err => {
+ console.log(err);
//状态异常返回上级页面
return that.$util.Tips({
title: err
@@ -1060,14 +1061,14 @@
}
that.$set(that, 'storeInfo', storeInfo);
that.$set(that, 'description', storeInfo.content);
- if(typeof that.description.content == 'string'){
+ if(that.description?.content && typeof that.description.content == 'string'){
try{
that.description.content = JSON.parse(that.description.content);
}catch(e){
console.log(e);
}
}
- if (that.description.type == 0 && typeof that.description.content == 'string') {
+ if (that.description?.content && that.description?.type == 0 && typeof that.description?.content == 'string') {
that.description.content = that.description.content.replace(
/
{
+ console.log(err);
//状态异常返回上级页面
return that.$util.Tips({
title: err
diff --git a/pages/nongKe/cloud_entrepot/indexb.vue b/pages/nongKe/cloud_entrepot/indexb.vue
index 2c766c6..59d10e2 100644
--- a/pages/nongKe/cloud_entrepot/indexb.vue
+++ b/pages/nongKe/cloud_entrepot/indexb.vue
@@ -398,6 +398,12 @@
type: 2
})
this.cloudList = data;
+ this.cloudList.forEach((item)=>{
+ item.children.unshift({
+ cate_name: '全部',
+ store_category_id: item.store_category_id,
+ });
+ })
this.merchant = this.cloudList[0];
this.merchantTow = this.merchant?.children[0];
this.storeParam.category_id = this.merchantTow.store_category_id;
@@ -719,14 +725,16 @@
this.storeParam.page = 1;
this.goodsList = [];
}
- townCloud({
+ let query = {
street_code: this.street_id,
- category_id: this.storeParam.category_id,
order: this.storeParam.order,
keyword: this.storeParam.keyword,
page: this.storeParam.page,
location: this.latitude+','+this.longitude,
- }).then(res => {
+ }
+ if(!this.merchantTow.pid) query.cate_pid = this.storeParam.category_id; // 全部是查询一级分类pid
+ else query.category_id = this.storeParam.category_id; // 否则查询二级分类
+ townCloud(query).then(res => {
this.goodsList = [...this.goodsList, ...res.data.list]
this.showLoading = false
this.goodsList.forEach(item => {
diff --git a/pages/users/order_list/index.vue b/pages/users/order_list/index.vue
index 7acf0c2..fd38af4 100644
--- a/pages/users/order_list/index.vue
+++ b/pages/users/order_list/index.vue
@@ -568,6 +568,7 @@ import { Toast } from '../../../libs/uniApi';
goOrderDetails: function(order_id) {
let self = this
+
if (!order_id) return that.$util.Tips({
title: '缺少订单号无法查看订单详情'
@@ -576,7 +577,6 @@ import { Toast } from '../../../libs/uniApi';
uni.showLoading({
title: '正在加载',
})
-
openOrderSubscribe().then(() => {
uni.hideLoading();
@@ -599,6 +599,7 @@ import { Toast } from '../../../libs/uniApi';
})
// #endif
// #ifndef MP
+ console.log(self.orderStatus);
if (self.orderStatus == 0) {
uni.navigateTo({
url: '/pages/order_details/stay?order_id=' + order_id
@@ -655,7 +656,6 @@ import { Toast } from '../../../libs/uniApi';
*/
statusClick: function(status) {
if (status == this.orderStatus) return;
-
this.orderStatus = status;
this.loadend = false;
this.loading = false;
diff --git a/utils/uniMP.js b/utils/uniMP.js
index 3cc129e..b3cacf2 100644
--- a/utils/uniMP.js
+++ b/utils/uniMP.js
@@ -35,10 +35,7 @@ const loadMP = async (id) => {
console.log('最新版本', info.data);
console.log(mp, uni);
// return ;
- uni.showLoading({
- title: '初始化中...',
- mask: true
- })
+ uni.$emit('showLoading', true, '初始化中');
mp.getUniMPVersion(id, (ret) => {
console.log('当前版本', ret);
let flag;
@@ -51,15 +48,9 @@ const loadMP = async (id) => {
true) {
let count = 0;
timer = setInterval(() => {
- if (count < 100) uni.showLoading({
- title: `初始化中... ${count}%`,
- mask: true
- })
- else uni.showLoading({
- title: '初始化中...99%',
- mask: true
- })
- }, 600)
+ if (count < 100 && count > 0) uni.$emit('showLoading', true, `初始化中... ${count}%`)
+ else uni.$emit('showLoading', true, `初始化中... 99%`)
+ }, 200)
let downloadTask = uni.downloadFile({
url: info.data.version_info?.dow_url,
success(res) {
@@ -99,10 +90,7 @@ const loadMPx = async (id) => {
console.log('最新版本', info.data);
console.log(mp, uni);
// return ;
- uni.showLoading({
- title: '初始化中...',
- mask: true
- })
+ uni.$emit('showLoading', true, `初始化中...`)
mp.getUniMPVersion(id, (ret) => {
console.log('当前版本', ret);
let flag;
@@ -116,15 +104,9 @@ const loadMPx = async (id) => {
true) {
let count = 0;
timer = setInterval(() => {
- if (count < 100) uni.showLoading({
- title: `初始化中... ${count}%`,
- mask: true
- })
- else uni.showLoading({
- title: '初始化中...99%',
- mask: true
- })
- }, 600)
+ if (count < 100 && count > 0) uni.$emit('showLoading', true, `初始化中... ${count}%`)
+ else uni.$emit('showLoading', true, `初始化中... 99%`)
+ }, 200)
let downloadTask = uni.downloadFile({
url: info.data.appInfo.dow_url,
@@ -161,10 +143,7 @@ const loadMPx = async (id) => {
const loadMPurl = async (e) => {
appid = e.id;
let FURL = e.url;
- uni.showLoading({
- title: '初始化中...',
- mask: true
- })
+ uni.$emit('showLoading', true, `初始化中...`)
uni.request({
url: FURL,
method: 'GET',
@@ -181,15 +160,9 @@ const loadMPurl = async (e) => {
true) {
let count = 0;
timer = setInterval(() => {
- if (count < 100) uni.showLoading({
- title: `初始化中... ${count}%`,
- mask: true
- })
- else uni.showLoading({
- title: '初始化中...99%',
- mask: true
- })
- }, 600)
+ if (count < 100 && count > 0) uni.$emit('showLoading', true, `初始化中... ${count}%`)
+ else uni.$emit('showLoading', true, `初始化中... 99%`)
+ }, 200)
let downloadTask = uni.downloadFile({
url: fileInfo.data?.data?.down_url,
success(res) {
@@ -232,21 +205,12 @@ const loadMPurl = async (e) => {
const loadMPdns = async (e) => {
appid = e.id;
let FURL = e.url;
- uni.showLoading({
- title: '初始化中...',
- mask: true
- })
+ uni.$emit('showLoading', true, `初始化中...`)
let count = 0;
timer = setInterval(() => {
- if (count < 100) uni.showLoading({
- title: `初始化中... ${count}%`,
- mask: true
- })
- else uni.showLoading({
- title: '初始化中...99%',
- mask: true
- })
- }, 600)
+ if (count < 100 && count > 0) uni.$emit('showLoading', true, `初始化中... ${count}%`)
+ else uni.$emit('showLoading', true, `初始化中... 99%`)
+ }, 200)
let downloadTask = uni.downloadFile({
url: FURL,
success(res) {
@@ -313,6 +277,7 @@ const doInstallMP = () => {
};
const open = (id = null) => {
+ uni.$emit('showLoading', false);
let token = uni.getStorageSync('LOGIN_STATUS_TOKEN');
if (!token) return uni.showToast({
icon: 'none',