Pārlūkot izejas kodu

2.门店和小程序功能按钮蒙层的高度高一点
3.门店APP购物车的商品下单后,及时刷新购物车订单
10.门店APP 实时显示加入购物车订单数量
13.门店APP 小程序 轮胎保列表页,轮胎规格去除
14.门店APP订单提交后,输入框的默认提示文字不应存在
18.门店二维码 提示信息一行显示,字体小点

Qukatie 1 mēnesi atpakaļ
vecāks
revīzija
4765848840

+ 1 - 1
components/debounce-button.vue

@@ -1,6 +1,6 @@
 <template>
 	<button :type="type" :size="size" :class="['debounce-btn', disabled||readOnly ? 'disabled' : '']" :disabled="disabled||readOnly"
-		@click="handleClick" :style="{backgroundColor:bgColor,color:color}" :loading="loading">
+		@click="handleClick" :style="{backgroundColor:bgColor,color:color}" style="border-radius: 50px;" :loading="loading">
 		<slot>{{ text }}</slot>
 	</button>
 </template>

+ 39 - 5
http/api.js

@@ -10,7 +10,36 @@ import {
 } from '@/utils/base64.js';
 import Request from '@/utils/luch-request/index.js';
 const http = new Request(options);
-http.interceptors.request.use((config) => { // 可使用async await 做异步操作
+// 检查网络状态函数
+const checkNetworkStatus = () => {
+	return new Promise((resolve, reject) => {
+		uni.getNetworkType({
+			success: (res) => {
+				console.log(res)
+				if (res.networkType === 'none') {
+					reject(new Error('网络连接已断开'));
+				} else {
+					resolve(true);
+				}
+			},
+			fail: () => {
+				reject(new Error('网络状态检测失败'));
+			}
+		});
+	});
+};
+
+http.interceptors.request.use(async (config) => { // 可使用async await 做异步操作
+	try {
+		await checkNetworkStatus();
+	} catch (error) {
+		uni.showToast({
+			title: error.message,
+			icon: 'none',
+			duration: 3000
+		});
+		return Promise.reject(config);
+	}
 	// 假设有token值需要在头部需要携带
 	let accessToken = uni.getStorageSync('accessToken');
 	if (accessToken) {
@@ -57,7 +86,7 @@ http.interceptors.response.use((response) => {
 				title: response.data.msg,
 				icon: 'none'
 			});
-		}else if (response.data.code === 403) {
+		} else if (response.data.code === 403) {
 			uni.showModal({
 				title: '提示',
 				content: response.data.msg,
@@ -72,7 +101,7 @@ http.interceptors.response.use((response) => {
 					}
 				}
 			});
-		}else if (response.data.code) {
+		} else if (response.data.code) {
 			return Promise.reject(response);
 		} else {
 			return response.data;
@@ -80,7 +109,6 @@ http.interceptors.response.use((response) => {
 	}
 	return response.data;
 }, (response) => {
-	
 	/*  对响应错误做点什么 (statusCode !== 200)*/
 	if (response.data.code === 401) {
 		uni.showModal({
@@ -95,7 +123,7 @@ http.interceptors.response.use((response) => {
 				}
 			}
 		});
-	}else if (response.data.error === "unauthorized") {
+	} else if (response.data.error === "unauthorized") {
 		if (response.data.error_description) {
 			uni.showToast({
 				title: response.data.error_description,
@@ -123,6 +151,12 @@ http.interceptors.response.use((response) => {
 			icon: 'none'
 		});
 	}
+	if (response.statusCode === 0) { // 网络中断状态码
+		uni.showToast({
+			title: '网络连接中断,请检查网络设置',
+			icon: 'none'
+		});
+	}
 	return Promise.reject(response.data)
 })
 export default http;

+ 4 - 3
manifest.json

@@ -2,8 +2,8 @@
     "name" : "库比森轮胎",
     "appid" : "__UNI__421BF74",
     "description" : "",
-    "versionName" : "1.0.13",
-    "versionCode" : 1013,
+    "versionName" : "1.0.16",
+    "versionCode" : 1016,
     "transformPx" : false,
     "plus" : {
         "distribute" : {
@@ -65,7 +65,8 @@
                     "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
                     "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
                     "<uses-feature android:name=\"android.hardware.camera\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
+                    "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>"
                 ],
                 "scope.camera" : {
                     "desc" : "用于拍照和录制视频"

+ 16 - 1
pages/goods/index.vue

@@ -144,7 +144,10 @@
 	} from '@/api/home/index.js'
 	import {
 		isProcurement
-	} from '@/api/goods/index.js'
+	} from '@/api/goods/index.js'	
+	import {
+		shoppingCartList
+	} from '@/api/shoppingCart/index.js'
 	export default {
 		data() {
 			return {
@@ -225,12 +228,23 @@
 					})
 				}
 			})
+			
+			this.getBadge()
 			// 获取最近搜索数据
 			if (uni.getStorageSync('recentSearches')) {
 				this.recentSearches = uni.getStorageSync('recentSearches').slice(0, 8);
 			}
 		},
 		methods: {
+			getBadge() {
+				shoppingCartList().then(res => {
+					let num = res.data.length
+					uni.setTabBarBadge({
+						index: 3, // tabIndex,tabBar的哪一项,从0开始
+						text: num.toString() // 显示的文本,超过 99 显示成 “…”
+					})
+				})
+			},
 			opensalesman() {
 				if (this.checkStatus != '审核通过') {
 					uni.showToast({
@@ -360,6 +374,7 @@
 							title: "加入购物车成功",
 							icon: "none",
 						});
+						this.getBadge()
 						uni.hideLoading();
 					}).catch(err => {
 						uni.hideLoading();

+ 5 - 5
pages/home/index.vue

@@ -47,7 +47,7 @@
 				<uni-grid-item>
 					<view class="grid-item-box" @click="allClick('轮胎保注册')">
 						<view class="grid-item-box-img">
-							<image style="width: 100rpx;height: 80rpx;" src="@/static/images/home/home (17).png" />
+							<image style="width: 80rpx;height: 80rpx;" src="@/static/images/home/baoxian.png" />
 						</view>
 						<view class="grid-item-box-text">
 							轮胎保
@@ -57,7 +57,7 @@
 				<uni-grid-item>
 					<view class="grid-item-box" @click="allClick('保单')">
 						<view class="grid-item-box-img">
-							<image style="width: 100rpx;height: 80rpx;" src="@/static/images/home/home (18).png" />
+							<image style="width: 80rpx;height: 80rpx;" src="@/static/images/home/chexian.png" />
 						</view>
 						<view class="grid-item-box-text">
 							保单
@@ -123,7 +123,7 @@
 	} from '@/api/home/index.js'
 	import {
 		shoppingCartList
-	} from '@/api/goods/index.js'
+	} from '@/api/shoppingCart/index.js'
 	import {
 		details,
 		nameDetail
@@ -228,7 +228,7 @@
 		},
 		onShow() {
 			this.getDetails()
-			// this.getBadge()
+			this.getBadge()
 			this.$u.api.isDisable()
 		},
 		mounted() {
@@ -537,7 +537,7 @@
 				display: flex;
 				flex-direction: column;
 				align-items: center;
-
+				padding: 20rpx 0;
 				.uni-grid-item__box {
 					justify-content: center;
 				}

+ 2 - 2
pages/home/insurance/details.vue

@@ -75,7 +75,7 @@
 					<uni-forms-item name="tyreNo" label="胎号">
 						<view style="display: flex;align-items: center;">
 							<uni-easyinput v-model="item.tyreNo" class="right-align"
-								placeholder-class="placeholder-right" placeholder="请输入胎号" :inputBorder="false"
+								placeholder-class="placeholder-right" :placeholder="form.status>0?' ':'请输入胎号'" :inputBorder="false"
 								:disabled="form.status>0" :clearable="false"
 								@change="getMaterialDetail($event,activeTab)"></uni-easyinput>
 							<uni-icons v-if="!form.status>0" type="scan" size="24" color='#03803B'
@@ -164,7 +164,7 @@
 			<view
 				style="width: 470rpx;height: 470rpx;background-color: #fff;display: flex;flex-direction: column;align-items: center;justify-content: center;">
 				<image style="width: 400rpx;height: 400rpx;" :src="form.fileUrl" />
-				<view class="">
+				<view style="font-size: 22rpx;">
 					请使用车主小程序扫码查询轮胎保进度
 				</view>
 			</view>

+ 4 - 3
pages/home/insurance/index.vue

@@ -32,9 +32,9 @@
 								<view style="font-weight: 800;color: #03803B;">
 									{{item.vehicleNumber||'暂无车牌'}}
 								</view>
-								<view class="">
+								<!-- <view class="">
 									轮胎规格: {{item.tyreSpecs||'-'}}
-								</view>
+								</view> -->
 							</view>
 							<view class="list-item">
 								<view class="">
@@ -162,7 +162,8 @@
 				try {
 					const obj = {
 						current: pageNo,
-						size: pageSize
+						size: pageSize,
+						searchCriteria:this.searchValue
 					}
 					const res = await getList(obj)
 					this.$refs.paging.complete(res.data.records)

+ 1 - 1
pages/home/insurance/rules.vue

@@ -88,7 +88,7 @@
 			</view>
 			<view style="display: flex;justify-content: center;padding-bottom:40rpx;">
 
-				<button class="button_1 flex-col" @click="inEdit" :disabled="counting">
+				<button class="button_1 flex-col" style="border-radius: 50px;" @click="inEdit" :disabled="counting">
 					{{ buttonText }}
 				</button>
 			</view>

+ 6 - 2
pages/login/index.vue

@@ -72,6 +72,7 @@
 				phone:uni.getStorageSync('phone'), //手机号码
 				code: '', //验证码
 				uuid: uuidv4(),
+				sendBtn:false,
 			};
 		},
 		onLoad() {},
@@ -148,11 +149,12 @@
 					});
 					return;
 				}
-				
 				let obj = {
 					phone: this.phone,
 					uuid: this.uuid
 				}
+				if (this.sendBtn) return
+				this.sendBtn = true
 				getPhoneVerifyCode(obj).then(res => {
 					uni.showToast({
 						title: res.msg,
@@ -172,7 +174,9 @@
 							that.showText = true;
 						}, 60000);
 					}
-				})
+				}).finally(() => {
+					this.sendBtn = false
+				});
 			},
 			//等三方微信登录
 			wxLogin() {

+ 1 - 1
pages/shoppingCart/index.vue

@@ -339,7 +339,7 @@
 										icon: 'none',
 										duration: 2000
 									});
-									// _this.$refs.paging.reload();
+									_this.$refs.paging.reload();
 									// uni.navigateTo({
 									// 	url: '/pages/settlement/index'
 									// })

+ 1 - 1
static/customicons.css

@@ -28,7 +28,7 @@
 	// display: flex;
 	// flex-direction: column;
 	position: fixed;
-	z-index:99999;
+	z-index:1000;
 	left: 0;
 	right: 0;
 	/* #ifdef H5 */

BIN
static/images/home/baoxian.png


BIN
static/images/home/chexian.png