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', -->
<view
:style="{
paddingBottom: navbarRect.bottom + 'px',
paddingBottom: navbarRect.bottom + 'rpx',
height: '50px',
}"

View File

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

View File

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

View File

@ -80,7 +80,7 @@
<view class="other">
<view>其他问题请咨询客服电话</view>
<view>15150231777</view>
<view><text @click="callNumber('15150231777')" class="active">15150231777&nbsp;&nbsp;欢迎咨询</text></view>
</view>
</uni-card>
</template>
@ -180,6 +180,28 @@ const handleClick = (item: any) => {
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>
<style lang="scss" scoped>
@ -289,6 +311,9 @@ const handleClick = (item: any) => {
text-align: center;
margin-top: 50rpx;
margin-bottom: 50rpx;
.active {
color: $u-primary;
}
}
}
</style>

View File

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

View File

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

View File

@ -69,7 +69,7 @@
<view class="other">
<view>其他问题请咨询客服电话</view>
<view>15150231777</view>
<view><text @click="callNumber('15150231777')" class="active">15150231777 &nbsp;&nbsp;欢迎咨询</text></view>
</view>
</uni-card>
</template>
@ -176,6 +176,28 @@ const handleClick = (item: any) => {
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>
<style lang="scss" scoped>
@ -242,6 +264,9 @@ const handleClick = (item: any) => {
text-align: center;
margin-top: 50rpx;
margin-bottom: 50rpx;
.active {
color: $u-primary;
}
}
}
</style>

View File

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

View File

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