zs 1 年之前
父节点
当前提交
ecdc5d48e5

文件差异内容过多而无法显示
+ 3 - 5846
config.js


+ 8 - 1
pages.json

@@ -75,7 +75,14 @@
 						"backgroundColorTop": "#F4F5F6",
 						"backgroundColorTop": "#F4F5F6",
 						"backgroundColorBottom": "#F4F5F6"
 						"backgroundColorBottom": "#F4F5F6"
 					}
 					}
-				}
+				},
+				{
+					"path": "pages/record/index",
+					"style": {
+						"navigationBarTitleText": "申办记录",
+						"enablePullDownRefresh": true
+					}
+				},
 			]
 			]
 		}
 		}
 	],
 	],

+ 51 - 3
pages/home/index.vue

@@ -8,7 +8,7 @@
 		</view>
 		</view>
 		<view class="thr">
 		<view class="thr">
 			<view class="list" v-for="(item, index) in menuList" :key="index" @click="toCommon(item.route)">
 			<view class="list" v-for="(item, index) in menuList" :key="index" @click="toCommon(item.route)">
-				<image class="image" mode="aspectFill" :src="item.url"></image>
+				<image class="image" mode="aspectFill" :src="item.file&&item.file.length>0?item.file[0].url:''"></image>
 				<view class="left">
 				<view class="left">
 					<view class="name">{{item.title}}</view>
 					<view class="name">{{item.title}}</view>
 					<view class="other">{{item.brief}}</view>
 					<view class="other">{{item.brief}}</view>
@@ -32,14 +32,28 @@
 	const config = ref({ logo: [], file: [] });
 	const config = ref({ logo: [], file: [] });
 	const list = ref([]);
 	const list = ref([]);
 	const total = ref(0);
 	const total = ref(0);
+	const menuList = ref([]);
 	onShow(async () => {
 	onShow(async () => {
 		await searchConfig();
 		await searchConfig();
+		await searchOther();
 		await search();
 		await search();
 	})
 	})
 	// config信息
 	// config信息
 	const searchConfig = async () => {
 	const searchConfig = async () => {
 		config.value = uni.getStorageSync('config');
 		config.value = uni.getStorageSync('config');
 	};
 	};
+	// 其他查询信息
+	const searchOther = async () => {
+		const res = await $api('module', 'GET', { is_use: '0' });
+		if (res.errcode === 0) {
+			menuList.value = res.data
+		} else {
+			uni.showToast({
+				title: res.errmsg || '',
+				icon: 'error',
+			});
+		}
+	};
 	// 查询
 	// 查询
 	const search = async () => {
 	const search = async () => {
 		const info = {
 		const info = {
@@ -74,7 +88,41 @@
 	.content {
 	.content {
 		display: flex;
 		display: flex;
 		flex-direction: column;
 		flex-direction: column;
-		width: 100vw;
-		height: 100vh;
+		background-color: var(--f1Color);
+
+		.thr {
+			margin: 2vw 0;
+
+			.list {
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				background-color: var(--mainColor);
+				margin: 2vw 2vw 0 2vw;
+				padding: 3vw;
+				border-radius: 2vw;
+
+				.image {
+					width: 18vw;
+					height: 18vw;
+					border-radius: 18vw;
+				}
+
+				.left {
+					width: 60vw;
+
+					.name {
+						font-weight: bold;
+						font-size: var(--font16Size);
+					}
+
+					.other {
+						margin: 2vw 0 0 0;
+						font-size: var(--font12Size);
+						color: var(--f85Color);
+					}
+				}
+			}
+		}
 	}
 	}
 </style>
 </style>

+ 2 - 2
pages/my/index.vue

@@ -2,11 +2,11 @@
 	<view class="content">
 	<view class="content">
 		<view class="one">
 		<view class="one">
 			<view class="left">
 			<view class="left">
-				<u-avatar text="车" fontSize="20" randomBgColor :colorIndex="0"></u-avatar>
+				<u-avatar :text="user.name" shape="square" fontSize="40" randomBgColor></u-avatar>
 			</view>
 			</view>
 			<view class="right" @tap="toLogin">
 			<view class="right" @tap="toLogin">
 				<text>点击登录</text>
 				<text>点击登录</text>
-				<u-icon :bold="true" color="#000" name="arrow-right" size="16"></u-icon>
+				<u-icon :bold="true" color="#000" name="arrow-right" size="18"></u-icon>
 			</view>
 			</view>
 		</view>
 		</view>
 		<view class="two">
 		<view class="two">

+ 1 - 14
pagesMy/basic/index.vue

@@ -11,8 +11,7 @@
 				<view class="value icon">
 				<view class="value icon">
 					<view class="title">头像</view>
 					<view class="title">头像</view>
 					<view class="label">
 					<view class="label">
-						<image v-if="form.icon" class="image" mode="aspectFill" :src="form.icon" @tap="Preview"></image>
-						<u-avatar v-else text="车" fontSize="20" randomBgColor :colorIndex="0"></u-avatar>
+						<u-avatar :text="form.name" shape="square" fontSize="40" randomBgColor></u-avatar>
 					</view>
 					</view>
 				</view>
 				</view>
 				<view class="remark">
 				<view class="remark">
@@ -99,18 +98,6 @@
 		const data = sexList.value[e.detail.value]
 		const data = sexList.value[e.detail.value]
 		if (data) form.value.sex = data.dictLabel
 		if (data) form.value.sex = data.dictLabel
 	};
 	};
-	// 上传图片
-	const Preview = () => {
-		uni.chooseImage({
-			count: 1,
-			sizeType: ['original', 'compressed'],
-			sourceType: ['album', 'camera'],
-			success: async function (res) {
-				let tempFile = JSON.parse(JSON.stringify(res.tempFilePaths));
-				console.log(tempFile);
-			}
-		});
-	};
 	// 保存
 	// 保存
 	const formSubmit = async (e) => {
 	const formSubmit = async (e) => {
 		let data = e.detail.value;
 		let data = e.detail.value;

+ 214 - 0
pagesMy/record/index.vue

@@ -0,0 +1,214 @@
+<template>
+	<view class="content">
+		<view class="top">
+			<u-search shape="square" :show-action="false" placeholder="品牌/车系" @focus="toChange"></u-search>
+		</view>
+		<view class="bottom">
+			<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
+				<view class="list-scroll-view">
+					<view class="list" v-for="(item, index) in list" :key="index">
+						<view class="name textOver">
+							<text>{{item.brand||'暂无'}} {{item.bank||'暂无'}} {{item.type||'暂无'}}</text>
+						</view>
+						<view class="other textOver" v-if="item.start">
+							<text>上牌日期:</text>
+							<text>{{item.start||'暂无'}}</text>
+						</view>
+						<view class="other textOver" v-if="item.course">
+							<text>行驶里程:</text>
+							<text>{{item.course||'暂无'}}</text>
+						</view>
+						<view class="other textOver" v-if="item.city">
+							<text>上牌城市:</text>
+							<text>{{item.city||'暂无'}}</text>
+						</view>
+						<view class="other textOver" v-if="item.place">
+							<text>估值地区:</text>
+							<text>{{item.place||'暂无'}}</text>
+						</view>
+						<view class="other textOver" v-if="item.estimate">
+							<text>预估价格:</text>
+							<text style="color: red;">{{item.estimate||'暂无'}}万元</text>
+						</view>
+						<view class="other textOver" v-if="item.status">
+							<text>状态:</text>
+							<text style="color: red;">{{getDict(item.status,'status')}}</text>
+						</view>
+					</view>
+					<view class="is_bottom" v-if="is_bottom">
+						<text>{{config.bottom_title||'没有更多了!'}}</text>
+					</view>
+				</view>
+			</scroll-view>
+		</view>
+	</view>
+</template>
+
+<script setup lang="ts">
+	import { getCurrentInstance, computed, ref } from 'vue';
+	//该依赖已内置不需要单独安装
+	import { onLoad } from "@dcloudio/uni-app";
+	// 请求接口
+	const $api = getCurrentInstance()?.appContext.config.globalProperties.$api;
+	const $config = getCurrentInstance()?.appContext.config.globalProperties.$config;
+	// openid
+	const openid = computed(() => {
+		return uni.getStorageSync('openid');
+	})
+	// 查询
+	const searchInfo = ref({});
+	// 基本信息
+	const config = ref({ logoUrl: [] });
+	// 列表
+	const list = ref([]);
+	const total = ref(0);
+	const skip = ref(0);
+	const limit = ref(6);
+	const page = ref(0);
+	// 数据是否触底
+	const is_bottom = ref(false);
+	const scrollTop = ref(0);
+	// 字典表
+	const statusList = ref([]);
+	onLoad(async () => {
+		await searchOther();
+		await searchConfig();
+		await search();
+	})
+	// 查询其他信息
+	const searchOther = async () => {
+		let res;
+		// 状态
+		res = await $api(`dictData`, 'GET', { code: 'valuation', is_use: '0' });
+		if (res.errcode === 0) statusList.value = res.data;
+	};
+	// config信息
+	const searchConfig = async () => {
+		config.value = uni.getStorageSync('config');
+	};
+	// 查询
+	const search = async () => {
+		const info = {
+			skip: skip.value,
+			limit: limit.value,
+			// openid: openid.value
+		}
+		const res = await $api('estimate', 'GET', {
+			...info,
+			...searchInfo.value
+		});
+		if (res.errcode === 0) {
+			list.value = list.value.concat(res.data)
+			total.value = res.total
+		} else {
+			uni.showToast({
+				title: res.errmsg || '',
+				icon: 'error',
+			});
+		}
+	};
+	// 数据处理
+	const getDict = (data, model) => {
+		let list;
+		switch (model) {
+			case 'status':
+				list = statusList.value;
+				break;
+			default:
+				break;
+		}
+		if (!list) return;
+		const res = list.find((f) => f.value == data);
+		return res?.label || '暂无';
+	};
+	// 搜索
+	const toChange = () => {
+		uni.navigateTo({
+			url: `/pagesHome/type/index`
+		})
+	};
+	// 分页
+	const toPage = () => {
+		if (total.value > list.value.length) {
+			uni.showLoading({
+				title: '加载中',
+				mask: true
+			})
+			page.value = page.value + 1;
+			skip.value = page.value * limit.value;
+			search();
+			uni.hideLoading();
+		} else is_bottom.value = true
+	};
+	// 清空列表
+	const clearPage = () => {
+		list.value = []
+		skip.value = 0
+		limit.value = 6
+		page.value = 0
+	};
+</script>
+<style lang="scss" scoped>
+	.content {
+		display: flex;
+		flex-direction: column;
+		width: 100vw;
+		height: 100vh;
+
+		.top {
+			margin: 2vw;
+		}
+
+		.bottom {
+			position: relative;
+			flex-grow: 1;
+			background-color: var(--f9Color);
+
+			.list {
+				background-color: var(--mainColor);
+				border: 1px solid var(--f5Color);
+				padding: 2vw;
+				margin: 2vw 2vw 0 2vw;
+				border-radius: 5px;
+
+				.name {
+					font-size: var(--font16Size);
+					margin: 0 0 1vw 0;
+				}
+
+				.other {
+					font-size: var(--font14Size);
+
+					text:first-child {
+						color: var(--f85Color);
+					}
+				}
+			}
+		}
+	}
+
+	.scroll-view {
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+
+		.list-scroll-view {
+			display: flex;
+			flex-direction: column;
+		}
+	}
+
+	.is_bottom {
+		width: 100%;
+		text-align: center;
+
+		text {
+			padding: 2vw 0;
+			display: inline-block;
+			color: var(--f85Color);
+			font-size: var(--font12Size);
+		}
+	}
+</style>

+ 2 - 1
unpackage/dist/dev/mp-weixin/app.json

@@ -15,7 +15,8 @@
     {
     {
       "root": "pagesMy",
       "root": "pagesMy",
       "pages": [
       "pages": [
-        "basic/index"
+        "basic/index",
+        "pages/record/index"
       ]
       ]
     }
     }
   ],
   ],

文件差异内容过多而无法显示
+ 4 - 5871
unpackage/dist/dev/mp-weixin/config.js


+ 16 - 3
unpackage/dist/dev/mp-weixin/pages/home/index.js

@@ -14,18 +14,31 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
   __name: "index",
   __name: "index",
   setup(__props) {
   setup(__props) {
     var _a, _b;
     var _a, _b;
-    (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
+    const $api = (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
     (_b = common_vendor.getCurrentInstance()) == null ? void 0 : _b.appContext.config.globalProperties.$config;
     (_b = common_vendor.getCurrentInstance()) == null ? void 0 : _b.appContext.config.globalProperties.$config;
     const config = common_vendor.ref({ logo: [], file: [] });
     const config = common_vendor.ref({ logo: [], file: [] });
     common_vendor.ref([]);
     common_vendor.ref([]);
     common_vendor.ref(0);
     common_vendor.ref(0);
+    const menuList = common_vendor.ref([]);
     common_vendor.onShow(async () => {
     common_vendor.onShow(async () => {
       await searchConfig();
       await searchConfig();
+      await searchOther();
       await search();
       await search();
     });
     });
     const searchConfig = async () => {
     const searchConfig = async () => {
       config.value = common_vendor.index.getStorageSync("config");
       config.value = common_vendor.index.getStorageSync("config");
     };
     };
+    const searchOther = async () => {
+      const res = await $api("module", "GET", { is_use: "0" });
+      if (res.errcode === 0) {
+        menuList.value = res.data;
+      } else {
+        common_vendor.index.showToast({
+          title: res.errmsg || "",
+          icon: "error"
+        });
+      }
+    };
     const search = async () => {
     const search = async () => {
     };
     };
     const toCommon = (item) => {
     const toCommon = (item) => {
@@ -42,9 +55,9 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
           indicatorMode: "line",
           indicatorMode: "line",
           circular: true
           circular: true
         }),
         }),
-        b: common_vendor.f(_ctx.menuList, (item, index, i0) => {
+        b: common_vendor.f(menuList.value, (item, index, i0) => {
           return {
           return {
-            a: item.url,
+            a: item.file && item.file.length > 0 ? item.file[0].url : "",
             b: common_vendor.t(item.title),
             b: common_vendor.t(item.title),
             c: common_vendor.t(item.brief),
             c: common_vendor.t(item.brief),
             d: "4978fed5-1-" + i0,
             d: "4978fed5-1-" + i0,

+ 30 - 2
unpackage/dist/dev/mp-weixin/pages/home/index.wxss

@@ -7,6 +7,34 @@
 .content.data-v-4978fed5 {
 .content.data-v-4978fed5 {
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;
-  width: 100vw;
-  height: 100vh;
+  background-color: var(--f1Color);
+}
+.content .thr.data-v-4978fed5 {
+  margin: 2vw 0;
+}
+.content .thr .list.data-v-4978fed5 {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  background-color: var(--mainColor);
+  margin: 2vw 2vw 0 2vw;
+  padding: 3vw;
+  border-radius: 2vw;
+}
+.content .thr .list .image.data-v-4978fed5 {
+  width: 18vw;
+  height: 18vw;
+  border-radius: 18vw;
+}
+.content .thr .list .left.data-v-4978fed5 {
+  width: 60vw;
+}
+.content .thr .list .left .name.data-v-4978fed5 {
+  font-weight: bold;
+  font-size: var(--font16Size);
+}
+.content .thr .list .left .other.data-v-4978fed5 {
+  margin: 2vw 0 0 0;
+  font-size: var(--font12Size);
+  color: var(--f85Color);
 }
 }

+ 6 - 6
unpackage/dist/dev/mp-weixin/pages/my/index.js

@@ -17,7 +17,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
     (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
     const $config = (_b = common_vendor.getCurrentInstance()) == null ? void 0 : _b.appContext.config.globalProperties.$config;
     const $config = (_b = common_vendor.getCurrentInstance()) == null ? void 0 : _b.appContext.config.globalProperties.$config;
     const config = common_vendor.ref({});
     const config = common_vendor.ref({});
-    common_vendor.ref({});
+    const user = common_vendor.ref({});
     common_vendor.onLoad(async () => {
     common_vendor.onLoad(async () => {
       await searchConfig();
       await searchConfig();
       await search();
       await search();
@@ -50,16 +50,16 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     return (_ctx, _cache) => {
     return (_ctx, _cache) => {
       return {
       return {
         a: common_vendor.p({
         a: common_vendor.p({
-          text: "车",
-          fontSize: "20",
-          randomBgColor: true,
-          colorIndex: 0
+          text: user.value.name,
+          shape: "square",
+          fontSize: "40",
+          randomBgColor: true
         }),
         }),
         b: common_vendor.p({
         b: common_vendor.p({
           bold: true,
           bold: true,
           color: "#000",
           color: "#000",
           name: "arrow-right",
           name: "arrow-right",
-          size: "16"
+          size: "18"
         }),
         }),
         c: common_vendor.o(toLogin),
         c: common_vendor.o(toLogin),
         d: common_vendor.f(common_vendor.unref($config).menuList, (item, index, i0) => {
         d: common_vendor.f(common_vendor.unref($config).menuList, (item, index, i0) => {

+ 16 - 33
unpackage/dist/dev/mp-weixin/pagesMy/basic/index.js

@@ -41,17 +41,6 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       if (data)
       if (data)
         form.value.sex = data.dictLabel;
         form.value.sex = data.dictLabel;
     };
     };
-    const Preview = () => {
-      common_vendor.index.chooseImage({
-        count: 1,
-        sizeType: ["original", "compressed"],
-        sourceType: ["album", "camera"],
-        success: async function(res) {
-          let tempFile = JSON.parse(JSON.stringify(res.tempFilePaths));
-          console.log(tempFile);
-        }
-      });
-    };
     const formSubmit = async (e) => {
     const formSubmit = async (e) => {
       let data = e.detail.value;
       let data = e.detail.value;
       data.icon = form.value.icon;
       data.icon = form.value.icon;
@@ -67,29 +56,23 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       return obj;
       return obj;
     };
     };
     return (_ctx, _cache) => {
     return (_ctx, _cache) => {
-      return common_vendor.e({
+      return {
         a: form.value.id,
         a: form.value.id,
-        b: form.value.icon
-      }, form.value.icon ? {
-        c: form.value.icon,
-        d: common_vendor.o(Preview)
-      } : {
-        e: common_vendor.p({
-          text: "车",
-          fontSize: "20",
-          randomBgColor: true,
-          colorIndex: 0
-        })
-      }, {
-        f: form.value.name,
-        g: form.value.nickname,
-        h: common_vendor.t(form.value.sex || "请选择性别"),
-        i: common_vendor.o(sexChange),
-        j: _ctx.index,
-        k: sexList.value,
-        l: form.value.phone,
-        m: common_vendor.o(formSubmit)
-      });
+        b: common_vendor.p({
+          text: form.value.name,
+          shape: "square",
+          fontSize: "40",
+          randomBgColor: true
+        }),
+        c: form.value.name,
+        d: form.value.nickname,
+        e: common_vendor.t(form.value.sex || "请选择性别"),
+        f: common_vendor.o(sexChange),
+        g: _ctx.index,
+        h: sexList.value,
+        i: form.value.phone,
+        j: common_vendor.o(formSubmit)
+      };
     };
     };
   }
   }
 });
 });

文件差异内容过多而无法显示
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesMy/basic/index.wxml


+ 66 - 0
unpackage/dist/dev/mp-weixin/pagesMy/pages/record/index.js

@@ -0,0 +1,66 @@
+// pagesMy/pages/record/index.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 5 - 0
unpackage/dist/dev/mp-weixin/pagesMy/pages/record/index.json

@@ -0,0 +1,5 @@
+{
+  "navigationBarTitleText": "申办记录",
+  "enablePullDownRefresh": true,
+  "usingComponents": {}
+}

+ 2 - 0
unpackage/dist/dev/mp-weixin/pagesMy/pages/record/index.wxml

@@ -0,0 +1,2 @@
+<!--pagesMy/pages/record/index.wxml-->
+<text>pagesMy/pages/record/index.wxml</text>

+ 1 - 0
unpackage/dist/dev/mp-weixin/pagesMy/pages/record/index.wxss

@@ -0,0 +1 @@
+/* pagesMy/pages/record/index.wxss */