update: 優化

This commit is contained in:
admin 2024-09-06 14:37:50 +08:00
parent f6bba9e78d
commit 0ed71d3bcd
10 changed files with 293 additions and 132 deletions

View File

@ -0,0 +1,36 @@
<template>
<u-popup
:show="show"
mode="bottom"
:round="10"
:closeable="true"
@close="handleClose"
>
<plate-input
:plate="statePlate.plateNo"
@export="setPlate"
@close="handleClose"
/>
</u-popup>
</template>
<script setup lang="ts">
import plateInput from "@/components/uni-plate-input/uni-plate-input.vue";
const props = defineProps<{
show: boolean;
}>();
const emit = defineEmits(["handleDialog", "changeCarNo"]);
const statePlate = reactive({
plateNo: "",
});
const handleClose = () => {
emit("handleDialog", false);
};
const setPlate = (plate: string) => {
if (plate.length >= 7) statePlate.plateNo = plate;
emit("changeCarNo", plate);
statePlate.plateNo = ''
};
</script>
<style lang="scss" scoped></style>

View File

@ -10,7 +10,7 @@
<!-- background: '#ddd', --> <!-- background: '#ddd', -->
<view <view
:style="{ :style="{
paddingBottom: navbarRect.bottom + 'px', paddingBottom: navbarRect.bottom + 'rpx',
height: '50px', height: '50px',
}" }"

View File

@ -1,103 +1,117 @@
{ {
"name" : "在生万有", "name": "在生万有",
// DCloud ios // DCloud ios
"appid" : "__UNI__898003A", "appid": "__UNI__898003A",
"description" : "", "description": "",
"versionName" : "1.0.0", "versionName": "1.0.0",
"versionCode" : 100, "versionCode": 100,
"transformPx" : false, "transformPx": false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus": {
"compatible" : { "compatible": {
"ignoreVersion" : true "ignoreVersion": true
}, },
"usingComponents" : true, "usingComponents": true,
"nvueStyleCompiler" : "uni-app", "nvueStyleCompiler": "uni-app",
"compilerVersion" : 3, "compilerVersion": 3,
"splashscreen" : { "splashscreen": {
"alwaysShowBeforeRender" : true, "alwaysShowBeforeRender": true,
"waiting" : true, "waiting": true,
"autoclose" : true, "autoclose": true,
"delay" : 0 "delay": 0
}, },
/* */ /* */
"modules" : { "modules": {
"Camera" : {} "Camera": {}
}, },
/* */ /* */
"distribute" : { "distribute": {
/* android */ /* android */
"android" : { "android": {
"permissions" : [ "permissions": [
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>", "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", "<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>", "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", "<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
] "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
}, "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
/* ios */ "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"ios" : { "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
"dSYMs" : false ]
}, },
/* SDK */ /* ios */
"sdkConfigs" : { "ios": {
"ad" : {} "dSYMs": false
}, },
"icons" : { /* SDK */
"android" : { "sdkConfigs": {
"hdpi" : "/Users/admin/workspace/aifanda/project/在生万有/logo 72 x 72.png", "ad": {}
"xhdpi" : "/Users/admin/workspace/aifanda/project/在生万有/logo 96 x 96.png", },
"xxhdpi" : "/Users/admin/workspace/aifanda/project/在生万有/logo 144 x144.png", "icons": {
"xxxhdpi" : "/Users/admin/workspace/aifanda/project/在生万有/logo 192 x192.png" "android": {
} "hdpi": "/Users/admin/workspace/aifanda/project/在生万有/logo 72 x 72.png",
} "xhdpi": "/Users/admin/workspace/aifanda/project/在生万有/logo 96 x 96.png",
"xxhdpi": "/Users/admin/workspace/aifanda/project/在生万有/logo 144 x144.png",
"xxxhdpi": "/Users/admin/workspace/aifanda/project/在生万有/logo 192 x192.png"
} }
}
}
},
/* */
"quickapp": {},
// h5
"h5": {
"router": {
"base": "./"
}
},
/* */
"mp-weixin": {
"appid": "wx9251d74fe0e87028",
"logoPath": "https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesLogin/logo-simple.png",
"setting": {
"urlCheck": false
}, },
/* */ "usingComponents": true,
"quickapp" : {}, "optimization": {
// h5 "subPackages": true //
"h5" : {
"router" : {
"base" : "./"
}
}, },
/* */ "lazyCodeLoading": "requiredComponents"
"mp-weixin" : { },
"appid" : "wx9251d74fe0e87028", "mp-alipay": {
"logoPath" : "https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesLogin/logo-simple.png", "usingComponents": true
"setting" : { },
"urlCheck" : false "mp-baidu": {
}, "usingComponents": true
"usingComponents" : true, },
"optimization" : { "mp-toutiao": {
"subPackages" : true // "appid": "tt5ff52948c0c236df01",
}, "usingComponents": true,
"lazyCodeLoading" : "requiredComponents" "setting": {
"minified": true
}, },
"mp-alipay" : { "permissions": {
"usingComponents" : true "writePhotosAlbum": true,
}, "photos": {
"mp-baidu" : { "desc": "你的应用使用照片的目的描述"
"usingComponents" : true },
}, "camera": {
"mp-toutiao" : { "desc": "你的应用使用摄像头的目的描述"
"usingComponents" : true, }
"setting" : { }
"minified" : true },
} "uniStatistics": {
}, "enable": false
"uniStatistics" : { },
"enable" : false "vueVersion": "3"
},
"vueVersion" : "3"
} }

View File

@ -122,9 +122,7 @@
] ]
}, },
"permissions": { "permissions": {
"scope.userLocation": true, "scope.writePhotosAlbum": true
"scope.userInfo": true,
"scope.snsapi_base": true
}, },
"pageOrientation": "auto", "pageOrientation": "auto",
"globalStyle": { "globalStyle": {

View File

@ -80,7 +80,7 @@
<view class="other"> <view class="other">
<view>其他问题请咨询客服电话</view> <view>其他问题请咨询客服电话</view>
<view>15150231777</view> <view><text @click="callNumber('15150231777')" class="active">15150231777&nbsp;&nbsp;欢迎咨询</text></view>
</view> </view>
</uni-card> </uni-card>
</template> </template>
@ -180,6 +180,28 @@ const handleClick = (item: any) => {
url: item.url, // url: item.url, //
}); });
}; };
const callNumber = (number) => {
//
if (
uni.getSystemInfoSync().platform === "android" ||
uni.getSystemInfoSync().platform === "ios"
) {
// 使
uni.makePhoneCall({
phoneNumber: number, //
success: function () {
console.log("拨号成功");
},
fail: function (err) {
console.error("拨号失败:", err);
},
});
} else {
// 使window.open
window.open("tel:" + number);
}
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -289,6 +311,9 @@ const handleClick = (item: any) => {
text-align: center; text-align: center;
margin-top: 50rpx; margin-top: 50rpx;
margin-bottom: 50rpx; margin-bottom: 50rpx;
.active {
color: $u-primary;
}
} }
} }
</style> </style>

View File

@ -21,7 +21,9 @@
<view>主营业务{{ item.business }}</view> <view>主营业务{{ item.business }}</view>
<view>货场名称{{ item.name }}</view> <view>货场名称{{ item.name }}</view>
<view>货场地址{{ item.address }}</view> <view>货场地址{{ item.address }}</view>
<view>联系电话{{ item.phone }}</view> <view
>联系电话{{item.owner}} &nbsp;&nbsp;<text @click="callNumber(item.phone)" class="active">{{ item.phone }} &nbsp;&nbsp;欢迎询价</text></view
>
</view> </view>
</view> </view>
</view> </view>
@ -49,10 +51,12 @@
<view class="mt-30 mb-30" style="width: 60%"> <view class="mt-30 mb-30" style="width: 60%">
<view <view
><u-button type="primary" shape="circle" @click="handleJoin" ><u-button type="primary" shape="circle" @click="handleJoin"
>我要加入</u-button >加入爱梵达</u-button
></view ></view
> >
</view> </view>
<view class="mt-30 mb-30">爱梵达智能过磅系统提升您的经营效率</view>
</uni-grid> </uni-grid>
</view> </view>
</uni-card> </uni-card>
@ -75,7 +79,8 @@ const list = ref([
"长期回收废钢(轻一、轻二、轻三、重废、钢板料等)、废纸、泡沫、塑料等,量大价优,欢迎来电咨询。", "长期回收废钢(轻一、轻二、轻三、重废、钢板料等)、废纸、泡沫、塑料等,量大价优,欢迎来电咨询。",
name: "在生万有-中悦犇站", name: "在生万有-中悦犇站",
address: "上海市奉贤区川南奉公路8598号", address: "上海市奉贤区川南奉公路8598号",
phone: "刘女士 13341778368", owner: '刘先生',
phone: "13651779998",
}, },
{ {
path: "f2.png", path: "f2.png",
@ -83,7 +88,8 @@ const list = ref([
"长期回收重废、中废、轻废、小废、岩棉板、花盒等,量大价优,欢迎来电咨询。", "长期回收重废、中废、轻废、小废、岩棉板、花盒等,量大价优,欢迎来电咨询。",
name: "上海宽钢公司", name: "上海宽钢公司",
address: "上海市宝山区兰岗路2号门", address: "上海市宝山区兰岗路2号门",
phone: "李女士 13601647155", owner: '李女士',
phone: "13601647155",
}, },
]); ]);
@ -115,6 +121,28 @@ const handleJoin = () => {
url: "/pagesScrapSteel/registration", // url: "/pagesScrapSteel/registration", //
}); });
}; };
const callNumber = (number) => {
//
if (
uni.getSystemInfoSync().platform === "android" ||
uni.getSystemInfoSync().platform === "ios"
) {
// 使
uni.makePhoneCall({
phoneNumber: number, //
success: function () {
console.log("拨号成功");
},
fail: function (err) {
console.error("拨号失败:", err);
},
});
} else {
// 使window.open
window.open("tel:" + number);
}
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -134,6 +162,9 @@ const handleJoin = () => {
color: #000000; color: #000000;
line-height: 42rpx; line-height: 42rpx;
padding: 0px 10px 10px 10px; padding: 0px 10px 10px 10px;
.active {
color: $u-primary;
}
} }
} }
> view + view { > view + view {

View File

@ -65,7 +65,7 @@
<view class="btn-box-fix-btn"> <view class="btn-box-fix-btn">
<view <view
><u-button type="primary" shape="circle" @click="save" ><u-button type="primary" shape="circle" @click="save"
>提交试用</u-button >提交申请</u-button
></view ></view
> >
</view> </view>

View File

@ -69,7 +69,7 @@
<view class="other"> <view class="other">
<view>其他问题请咨询客服电话</view> <view>其他问题请咨询客服电话</view>
<view>15150231777</view> <view><text @click="callNumber('15150231777')" class="active">15150231777 &nbsp;&nbsp;欢迎咨询</text></view>
</view> </view>
</uni-card> </uni-card>
</template> </template>
@ -176,6 +176,28 @@ const handleClick = (item: any) => {
url: item.url, // url: item.url, //
}); });
}; };
const callNumber = (number) => {
//
if (
uni.getSystemInfoSync().platform === "android" ||
uni.getSystemInfoSync().platform === "ios"
) {
// 使
uni.makePhoneCall({
phoneNumber: number, //
success: function () {
console.log("拨号成功");
},
fail: function (err) {
console.error("拨号失败:", err);
},
});
} else {
// 使window.open
window.open("tel:" + number);
}
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -242,6 +264,9 @@ const handleClick = (item: any) => {
text-align: center; text-align: center;
margin-top: 50rpx; margin-top: 50rpx;
margin-bottom: 50rpx; margin-bottom: 50rpx;
.active {
color: $u-primary;
}
} }
} }
</style> </style>

View File

@ -31,7 +31,11 @@
:customStyle="{}" :customStyle="{}"
border="none" border="none"
:disabled="item.disabled" :disabled="item.disabled"
:type="['contactInfo', 'curbWeight'].indexOf(item.key) > -1 ? 'number' : 'text'" :type="
['contactInfo', 'curbWeight'].indexOf(item.key) > -1
? 'number'
: 'text'
"
> >
<template #suffix> <template #suffix>
<text v-if="item.unit"> <text v-if="item.unit">
@ -282,7 +286,6 @@ const contrlModalParams = reactive<any>({
}, },
}); });
const handleSelect = (key: string, v: any) => { const handleSelect = (key: string, v: any) => {
contrlModalParams[key].isShow = false; contrlModalParams[key].isShow = false;
if (key === "vehicleType") { if (key === "vehicleType") {
@ -295,28 +298,29 @@ const handleSelect = (key: string, v: any) => {
}; };
// //
const handleUpload = () => { const handleUpload = () => {
upload(); upload()
// uni.getSetting({success(res){ // uni.authorize({
// if(!res.authSetting['scope.userInfo']) { // scope: "scope.writePhotosAlbum",
// uni.showModal({ // success() {
// title:'', // console.log("");
// content:'', // //
// showCancel:false, // },
// confirmText:'', // fail() {
// cancelText:'', // console.log("");
// success:(res)=>{ // //
// if(res.confirm) { // if (uni.getSystemInfoSync().platform === "android") {
// uni.openSetting({success: res => { // uni.showModal({
// debugger // title: "",
// if(res.authSetting['scope.userInfo']) { // content: "访访",
// upload() // success: function (modalRes) {
// } // if (modalRes.confirm) {
// }}) // uni.openSetting();
// } // }
// }, // },
// }) // });
// } // }
// }}) // },
// });
}; };
// //
const upload = () => { const upload = () => {

View File

@ -31,7 +31,9 @@
:customStyle="{}" :customStyle="{}"
border="none" border="none"
:disabled="item.disabled" :disabled="item.disabled"
:disabledColor="'#ffffff'"
:type="['contactInfo'].indexOf(item.key) > -1 ? 'number' : 'text'" :type="['contactInfo'].indexOf(item.key) > -1 ? 'number' : 'text'"
> >
<template #suffix> <template #suffix>
<text v-if="item.unit"> <text v-if="item.unit">
@ -81,13 +83,26 @@
:closeOnClickAction="true" :closeOnClickAction="true"
></u-action-sheet> ></u-action-sheet>
</block> </block>
<!-- 车牌号 -->
<CarNoDialog
:show="showDialog.showCarNo"
@handleDialog="(v:boolean) => {handleDialog('showCarNo', v)}"
@changeCarNo="changeCarNo"
ref="carNoRef"
></CarNoDialog>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import CarNoDialog from "@/components/Dialog/CarNoDialog.vue";
import { VehicleApi, UserApi } from "@/services"; import { VehicleApi, UserApi } from "@/services";
import pinia from "@/store"; import pinia from "@/store";
import { useMemberStore } from "@/store/index"; import { useMemberStore } from "@/store/index";
const store = useMemberStore(pinia); const store = useMemberStore(pinia);
//
const showDialog = <any>reactive({
showCarNo: false,
});
const model1 = reactive<any>({ const model1 = reactive<any>({
formData: {}, formData: {},
}); });
@ -116,6 +131,10 @@ const formAttrList = reactive<any>([
type: "input", type: "input",
required: true, required: true,
unit: "", unit: "",
disabled: true,
fn: () => {
showDialog.showCarNo = true;
},
}, },
{ {
name: "所在地", name: "所在地",
@ -225,6 +244,15 @@ const startSave = () => {
} }
}); });
}; };
const handleDialog = (key: string, v: boolean) => {
showDialog[key] = v;
};
const changeCarNo = (plate: string) => {
if (plate.length >= 7) model1.formData.licensePlate = plate;
showDialog.showCarNo = false;
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .uni-card__content { ::v-deep .uni-card__content {