diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..7a73a41
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,2 @@
+{
+}
\ No newline at end of file
diff --git a/common/config.js b/common/config.js
index b446adc..a6f0024 100644
--- a/common/config.js
+++ b/common/config.js
@@ -1,8 +1,9 @@
// 全局配置文件
-// let baseUrl = 'https://sourcebyte.vip';
-// let staticUrl = 'https://sourcebyte.vip';
-let baseUrl = 'http://localhost:8089';
-let staticUrl = 'http://localhost:8089';
+// let baseUrl = 'http://219.138.32.164:8089';
+// let baseUrl = 'http://localhost:3000/api';
+// let staticUrl = 'http://localhost:3000';
+let baseUrl = 'https://www.wujiaguotou.com/api';
+let staticUrl = 'https://www.wujiaguotou.com';
// 版本号 用于更新
let version = 1;
// vuex_version版本号 用于显示
diff --git a/common/http.interceptor.js b/common/http.interceptor.js
index 44ca65f..650f7d1 100644
--- a/common/http.interceptor.js
+++ b/common/http.interceptor.js
@@ -5,16 +5,23 @@ const install = (Vue, vm) => {
Vue.prototype.$u.http.setConfig({
// baseUrl打包app时放开,h5模式下会和vue.config.js代理冲突,导致失效
baseUrl: config.baseUrl,
-
+ originalData:true,
+ timeout: 10000,
});
// 请求拦截,配置Token等参数
Vue.prototype.$u.http.interceptor.request = (config) => {
// config.header.Token = '5d33018e653d897fc259b42cf022c1b3';
// 方式一,存放在vuex的token,假设使用了uView封装的vuex方式,见:https://uviewui.com/components/globalVariable.html
// 自定义token头
+ // 1️⃣ 获取本地 userInfo
+ const userInfo = uni.getStorageSync('userInfo') || {};
+
+ // 2️⃣ 提取 userType
+ const userType = userInfo.userType;
config.header = {
...config.header, // ⭐ 保留你外部传入的 header
- 'content-type': 'application/json'
+ 'content-type': 'application/json',
+ ...(userType ? { 'USERTYPE': userType } : {}) // 有 userType 才加
}
return config;
};
@@ -22,25 +29,25 @@ const install = (Vue, vm) => {
Vue.prototype.$u.http.interceptor.response = (res) => {
// 如果把originalData设置为了true,这里得到将会是服务器返回的所有的原始数据
// 判断可能变成了res.statueCode,或者res.data.code之类的,请打印查看结果
- if(res.code == 200) {
- return res;
- } else if(res.code == 301) {
+ if(res.statusCode == 200) {
+ return res.data;
+ } else if(res.statusCode == 301) {
vm.$u.toast('警告:' + res.msg);
return false;
- } else if(res.code == 401) {
- uni.reLaunch({
- url:'../login/login'
+ } else if(res.statusCode == 401) {
+ uni.navigateTo({
+ url:'/pages-biz/login/login'
})
vm.$u.toast('认证失败,请重新登录')
return false;
- } else if(res.code == 403) {
- uni.reLaunch({
- url:'../login/login'
+ } else if(res.statusCode == 403) {
+ uni.navigateTo({
+ url:'/pages-biz/login/login'
})
vm.$u.toast('认证失败,请重新登录')
return false;
- } else if(res.code == 500) {
- vm.$u.toast('错误:' + res.msg);
+ } else if(res.statusCode == 500) {
+ vm.$u.toast('请求错误:' + res.msg);
return false;
} else {
// 其他情况都认为是不合法的
@@ -48,6 +55,20 @@ const install = (Vue, vm) => {
return false;
}
};
+
+
+ Vue.prototype.$u.http.interceptor.responseError = (err) => {
+ // err 是 uni.request 的 fail 对象
+ // 超时一般是 err.errMsg 包含 timeout
+
+ if (err.errMsg && err.errMsg.includes('timeout')) {
+ vm.$u.toast('请求超时,请稍后重试');
+ } else {
+ vm.$u.toast('网络异常,请检查网络');
+ }
+
+ return Promise.reject(err);
+ };
}
export default {
diff --git a/common/utils/auth.js b/common/utils/auth.js
new file mode 100644
index 0000000..bdea0e6
--- /dev/null
+++ b/common/utils/auth.js
@@ -0,0 +1,38 @@
+export function getToken() {
+ const lifeData = uni.getStorageSync('lifeData') || {}
+ const token = lifeData.vuex_token
+ return token;
+}
+
+export function checkToken(token) {
+ if (!token || (typeof token === 'object' && Object.keys(token).length === 0)) {
+ uni.reLaunch({
+ url: '/pages-biz/login/login'
+ })
+ return Promise.reject('no token')
+ }
+
+ return new Promise((resolve, reject) => {
+ uni.$u.get('/login/checkExpiration', {}, {
+ WT: token
+ }).then(res => {
+ if (res.data) {
+ uni.reLaunch({
+ url: '/pages-biz/login/login'
+ })
+ reject('token expired')
+ } else {
+ resolve(true)
+ }
+ }).catch(err => {
+ uni.reLaunch({
+ url: '/pages-biz/login/login'
+ })
+ })
+ })
+}
+
+export function getUserType(){
+ let userInfo = uni.getStorageSync('userInfo')
+ return userInfo.userType
+}
\ No newline at end of file
diff --git a/common/utils/ras.js b/common/utils/ras.js
new file mode 100644
index 0000000..2b307b2
--- /dev/null
+++ b/common/utils/ras.js
@@ -0,0 +1,13 @@
+import JSEncrypt from 'jsencrypt'
+
+const PUBLIC_KEY = `
+-----BEGIN PUBLIC KEY-----
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAk6Kvq4tCfQJFO3xqMN86ra6YPKEGgDJGVNAo8HAb9ZxL8fgckaHN4wpI8D8D0HDP/Xn8ZrS7wZFSAecUmWBtyBjZdMOdSMZm1LdX036+XpyGVktsrE15n85KG9+P4H4he9ZbiPPMGYvmkn/zaxMxUagSHhPpvrwRMovA8onKzSL67CFOWl95HXxhJ1GhlKIQVBz9R5OsHhwZFfPu2xtajCtiGtF2zjF3ojwpLNca+ADC6mZufRV/MD1+gMMS5GcwG5xALDyG+Aqv4xHto30SGks3FJ9k9bAwA8vyOU8SBeG8fW8lbO9XrtbupmxUm5RnSEtNUy/iUuO1hEmpSqQfBQIDAQAB
+-----END PUBLIC KEY-----
+`
+
+export function rsaEncrypt(text) {
+ const encryptor = new JSEncrypt()
+ encryptor.setPublicKey(PUBLIC_KEY)
+ return encryptor.encrypt(text)
+}
diff --git a/common/utils/searchData.js b/common/utils/searchData.js
index 99c1643..6eaa167 100644
--- a/common/utils/searchData.js
+++ b/common/utils/searchData.js
@@ -16,6 +16,16 @@ export default [{
"value": ""
},
]
+},
+{
+ "name": '街道',
+ "type": 'hierarchy',
+ "submenu": [
+ {
+ "name": "不限",
+ "value": ""
+ },
+ ]
},
{
"name": '方式',
diff --git a/common/utils/text.js b/common/utils/text.js
new file mode 100644
index 0000000..7cbf2f6
--- /dev/null
+++ b/common/utils/text.js
@@ -0,0 +1,16 @@
+/**
+ * 文本省略处理
+ * @param {String} text 原始文本
+ * @param {Number} maxLen 最大显示字数
+ * @param {String} suffix 省略后缀,默认 ...
+ * @returns {String}
+ */
+function ellipsisText(text, maxLen = 20, suffix = '...') {
+ if (!text) return '';
+ if (text.length <= maxLen) return text;
+ return text.slice(0, maxLen) + suffix;
+}
+
+module.exports = {
+ ellipsisText
+};
\ No newline at end of file
diff --git a/components/Carousel/Carousel.vue b/components/Carousel/Carousel.vue
new file mode 100644
index 0000000..0c7d78b
--- /dev/null
+++ b/components/Carousel/Carousel.vue
@@ -0,0 +1,402 @@
+
+
+
+
+
+
+
+
+
+
+
+ ▶
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ‹
+ ›
+
+
+
+
+ {{ item.name }}
+
+
+
+
+ {{ current + 1 }} / {{ normalizedList.length }}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/asset/assetList.vue b/components/asset/assetList.vue
index c8bb65a..45338f8 100644
--- a/components/asset/assetList.vue
+++ b/components/asset/assetList.vue
@@ -2,23 +2,21 @@
-
+
- {{ item.name }}
- {{ item.address }}
- {{ item.statusText }}
+ {{ item.assetsName }}
+ {{ item.assetsAddress }}
-
-
+
@@ -29,17 +27,11 @@ export default {
list: {
type: Array,
default: () => [],
- },
- showLoadmore: {
- type: Boolean,
- default: true,
- },
- loadStatus: {
- type: String,
- default: "loadmore",
- },
+ }
},
emits: ["click"],
+ onLoad(options) {
+ },
methods: {
onClick(item) {
this.$emit("click", item);
diff --git a/components/bottom/assetBottomBar.vue b/components/bottom/assetBottomBar.vue
index 4dfc14f..d9626b7 100644
--- a/components/bottom/assetBottomBar.vue
+++ b/components/bottom/assetBottomBar.vue
@@ -11,10 +11,10 @@
-
- 预约看房
+
+ {{btnTitle || '加载错误'}}
-
+
@@ -25,7 +25,51 @@ import share from '../share/share.vue';
export default {
name: 'assetBottomBar',
components: { share },
- props: { assetId: [String, Number], phone: String },
+ props: {
+ assetId: [String, Number],
+ phone: String ,
+ btnTitle: {
+ type: String,
+ default: ''
+ },
+ shareBtnTitle: {
+ type: String,
+ default: ''
+ },
+ /** 小程序页面路径 */
+ pagePath: {
+ type: String,
+ required: true
+ },
+
+ /** H5 页面路径 */
+ h5Path: {
+ type: String,
+ required: true
+ },
+
+ /** 分享参数(id / code 等) */
+ query: {
+ type: Object,
+ default: () => ({})
+ },
+
+ /** 小程序码接口 */
+ minicodeApi: {
+ type: String,
+ default: ''
+ },
+
+ /** H5 基础域名(可选) */
+ baseUrl: {
+ type: String,
+ default: ''
+ },
+ btnColor: {
+ type: String,
+ default: ''
+ }
+ },
methods: {
onShare() {
console.log("调用分享")
@@ -92,18 +136,15 @@ export default {
font-size: 22rpx;
}
-/* 蓝色描边主按钮(完全居中) */
.main-btn {
flex-shrink: 0;
width: 340rpx;
height: 88rpx;
- border: 2rpx solid #FF2F31;
border-radius: 44rpx;
- background-color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
- color: #FF2F31;
+ color: #ffffff;
font-size: 30rpx;
font-weight: 500;
transition: all 0.2s;
diff --git a/components/card/mycard.vue b/components/card/mycard.vue
deleted file mode 100644
index fa39038..0000000
--- a/components/card/mycard.vue
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/components/gallery/AssetGallery.vue b/components/gallery/AssetGallery.vue
deleted file mode 100644
index 09e33a6..0000000
--- a/components/gallery/AssetGallery.vue
+++ /dev/null
@@ -1,295 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- VR
-
-
-
-
- ▶
-
-
-
- {{ index + 1 }}/{{ swiperList.length }}
-
-
-
-
-
-
-
- ×
-
-
-
-
-
- {{ item.label }}
- ({{ item.count }})
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/components/navbar/customNavbar.vue b/components/navbar/customNavbar.vue
index b7dc9f1..d0771d1 100644
--- a/components/navbar/customNavbar.vue
+++ b/components/navbar/customNavbar.vue
@@ -12,20 +12,18 @@
-
-
+
+
+
+
+
+
+
@@ -106,7 +104,7 @@ export default {
},
showHome: {
type: Boolean,
- default: false // 回首页按钮默认不显示
+ default: true // 回首页按钮默认不显示
}
},
data() {
@@ -155,15 +153,18 @@ export default {
},
onBack() {
- if (this.back) {
- this.back();
- } else {
+ const pages = getCurrentPages();
+ if (pages.length > 1) {
uni.navigateBack();
+ } else {
+ uni.switchTab({
+ url:'/pages/index/index'
+ })
}
},
goHome(){
- uni.reLaunch({
- url:'../index/index'
+ uni.switchTab({
+ url:'/pages/index/index'
})
},
onExtraIconClick(index) {
@@ -186,30 +187,41 @@ export default {
.nav-content {
display: flex;
align-items: center;
- justify-content: space-between;
+ position: relative;
height: 100%;
padding: 0 24rpx;
}
- .nav-left {
- width: 50rpx;
- display: flex;
- align-items: center;
- }
-
- .nav-title {
- flex: 1;
- text-align: center;
- font-size: 32rpx;
- }
-
- .nav-right {
- display: flex;
- align-items: center;
- .nav-btn {
- margin-left: 20rpx;
- }
- }
+.nav-left{
+ width: 120rpx;
+}
+.nav-left,
+.nav-right {
+ display: flex;
+ align-items: center;
+ z-index: 2;
+}
+.nav-title {
+ pointer-events: none;
+ position: absolute;
+ left: 50%;
+ transform: translateX(-50%);
+ max-width: 60%;
+ text-align: center;
+ font-size: 32rpx;
+ font-weight: 500;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ z-index: 1;
+}
+ // .nav-right {
+ // display: flex;
+ // align-items: center;
+ // .nav-btn {
+ // margin-left: 20rpx;
+ // }
+ // }
// 透明状态样式
&.transparent {
diff --git a/components/navbar/indexNavbar.vue b/components/navbar/indexNavbar.vue
index 60ece24..3dac966 100644
--- a/components/navbar/indexNavbar.vue
+++ b/components/navbar/indexNavbar.vue
@@ -87,11 +87,14 @@ export default {
},
methods: {
onBack() {
- if (this.back) {
- this.back();
- } else {
- uni.navigateBack();
- }
+ const pages = getCurrentPages();
+ if (pages > 1) {
+ uni.navigateBack();
+ } else {
+ uni.switchTab({
+ url:'/pages/index/index'
+ })
+ }
},
goHome(){
uni.reLaunch({
diff --git a/components/share/share.vue b/components/share/share.vue
index 6a2fec2..ff3662b 100644
--- a/components/share/share.vue
+++ b/components/share/share.vue
@@ -1,15 +1,29 @@
@@ -29,10 +43,55 @@
import QRCode from 'qrcode'
export default {
- name: 'share',
+ name: 'SharePopup',
props: {
- assetId: [String, Number]
+ /** 弹窗标题 */
+ title: {
+ type: String,
+ default: '分享'
+ },
+
+ /** 微信分享标题 */
+ shareTitle: {
+ type: String,
+ default: ''
+ },
+
+ /** 小程序页面路径 */
+ pagePath: {
+ type: String,
+ required: true
+ },
+
+ /** H5 页面路径 */
+ h5Path: {
+ type: String,
+ required: true
+ },
+
+ /** 分享参数(id / code 等) */
+ query: {
+ type: Object,
+ default: () => ({})
+ },
+
+ /** 小程序码接口 */
+ minicodeApi: {
+ type: String,
+ default: ''
+ },
+
+ /** H5 基础域名(可选) */
+ baseUrl: {
+ type: String,
+ default: ''
+ },
+ btnColor: {
+ type: String,
+ default: ''
+ }
},
+
data() {
return {
show: false,
@@ -40,70 +99,127 @@ export default {
qrcodeUrl: ''
}
},
+
+ computed: {
+ queryString() {
+ const query = this.query || {}
+ return Object.keys(query)
+ .filter(key => query[key] !== undefined && query[key] !== null)
+ .map(key => `${key}=${encodeURIComponent(query[key])}`)
+ .join('&')
+ }
+ },
+
methods: {
open() {
- console.log()
this.show = true
},
- shareToWeChat() {
- this.show = false
- // #ifdef MP-WEIXIN
- uni.showToast({ title: '请使用右上角“···”转发好友或群', icon: 'none' })
- uni.showShareMenu({
- withShareTicket: true,
- menus: ['shareAppMessage', 'shareTimeline']
- })
- // #endif
- // #ifdef H5
- uni.showToast({ title: '请在微信内使用原生分享功能', icon: 'none' })
- // #endif
- },
+ /** 复制网页链接 */
copyLink() {
this.show = false
- const shareUrl = `${window.location.origin}/#/pages/detail/assetsDetail?id=${this.assetId}`
+
+ let url = ''
+
+ // #ifdef H5
+ url = `${window.location.origin}/#/${this.h5Path}?${this.queryString}`
+ // #endif
+
+ // #ifndef H5
+ url = `${this.baseUrl}/#/${this.h5Path}?${this.queryString}`
+ // #endif
+
uni.setClipboardData({
- data: shareUrl,
+ data: url,
success: () => {
- uni.showToast({ title: '分享链接已复制', icon: 'success' })
+ uni.showToast({ title: '链接已复制', icon: 'success' })
}
})
},
+
+ /** 生成二维码 / 小程序码 */
async generateQrcode() {
this.show = false
- const shareUrl = `${window.location.origin}/#/pages/detail/assetsDetail?id=${this.assetId}`
this.showQrcode = true
- this.qrcodeUrl = await QRCode.toDataURL(shareUrl)
+ this.qrcodeUrl = ''
+
+ // ========== 小程序 ==========
+ // #ifdef MP-WEIXIN
+ if (!this.minicodeApi) {
+ uni.showToast({ title: '未配置小程序码接口', icon: 'none' })
+ this.showQrcode = false
+ return
+ }
+
+ const res = await uni.request({
+ url: this.minicodeApi,
+ method: 'POST',
+ data: {
+ page: this.pagePath,
+ scene: this.queryString
+ }
+ })
+
+ this.qrcodeUrl = res.data.url
+ // #endif
+
+ // ========== H5 / App ==========
+ // #ifndef MP-WEIXIN
+ let url = ''
+
+ // #ifdef H5
+ url = `${window.location.origin}/#/${this.h5Path}?${this.queryString}`
+ // #endif
+
+ // #ifndef H5
+ url = `${this.baseUrl}/#/${this.h5Path}?${this.queryString}`
+ // #endif
+
+ this.qrcodeUrl = await QRCode.toDataURL(url, {
+ width: 300,
+ margin: 2
+ })
+ // #endif
+ }
+ },
+
+ // #ifdef MP-WEIXIN
+ onShareAppMessage() {
+ return {
+ title: this.shareTitle || this.title,
+ path: `/${this.pagePath}?${this.queryString}`
}
}
+ // #endif
}
diff --git a/components/ucellitem/UCellItemPlus.vue b/components/ucellitem/UCellItemPlus.vue
deleted file mode 100644
index 1fa6af9..0000000
--- a/components/ucellitem/UCellItemPlus.vue
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ title }}
-
-
-
-
-
-
-
-
-
-
-
diff --git a/main.js b/main.js
index e375279..3253d8d 100644
--- a/main.js
+++ b/main.js
@@ -3,6 +3,7 @@ import App from './App'
import customNavbar from '@/components/navbar/customNavbar.vue'
import AuthLogin from "@/components/AuthPopup/AuthLogin.vue"
import PhoneSelect from "@/components/AuthPopup/PhoneSelect.vue"
+import { ellipsisText } from '@/common/utils/text';
Vue.config.productionTip = false
@@ -37,7 +38,13 @@ import httpInterceptor from '@/common/http.interceptor.js';
Vue.use(httpInterceptor, app);
// 封装自定义提示框
-import $mytip from 'common/utils/tip.js'
+import $mytip from '@/common/utils/tip.js'
+import config from "@/common/config.js"
+import { checkToken,getToken,getUserType } from '@/common/utils/auth.js'
Vue.prototype.$mytip = $mytip
-
+Vue.prototype.$ellipsis = ellipsisText
+Vue.prototype.$config = config
+Vue.prototype.$checkToken = checkToken
+Vue.prototype.$getToken = getToken
+Vue.prototype.$getUserType = getUserType
app.$mount()
diff --git a/manifest.json b/manifest.json
index ce8d401..fb6fc83 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,6 +1,6 @@
{
- "name" : "租房小程序",
- "appid" : "__UNI__2CDE30A",
+ "name" : "伍家国投",
+ "appid" : "__UNI__DA751C9",
"description" : "",
"versionName" : "1.0.1",
"versionCode" : 1,
@@ -112,7 +112,8 @@
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
- "appid" : "wx76702d2488f3d3f0",
+ "appid" : "wx1c9e1d0b916674dc",
+ "lazyCodeLoading" : "requiredComponents",
"setting" : {
"urlCheck" : false,
"minified" : true
diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json
index fcade5e..4c2f125 100644
--- a/node_modules/.package-lock.json
+++ b/node_modules/.package-lock.json
@@ -500,6 +500,11 @@
"node": ">=8"
}
},
+ "node_modules/jsencrypt": {
+ "version": "3.5.4",
+ "resolved": "https://registry.npmmirror.com/jsencrypt/-/jsencrypt-3.5.4.tgz",
+ "integrity": "sha512-kNjfYEMNASxrDGsmcSQh/rUTmcoRfSUkxnAz+MMywM8jtGu+fFEZ3nJjHM58zscVnwR0fYmG9sGkTDjqUdpiwA=="
+ },
"node_modules/locate-path": {
"version": "5.0.0",
"resolved": "https://registry.npmmirror.com/locate-path/-/locate-path-5.0.0.tgz",
@@ -801,6 +806,11 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/three": {
+ "version": "0.182.0",
+ "resolved": "https://registry.npmmirror.com/three/-/three-0.182.0.tgz",
+ "integrity": "sha512-GbHabT+Irv+ihI1/f5kIIsZ+Ef9Sl5A1Y7imvS5RQjWgtTPfPnZ43JmlYI7NtCRDK9zir20lQpfg8/9Yd02OvQ=="
+ },
"node_modules/urijs": {
"version": "1.19.11",
"resolved": "https://registry.npmmirror.com/urijs/-/urijs-1.19.11.tgz",
diff --git a/package-lock.json b/package-lock.json
index b6296ec..c128a00 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -16,7 +16,9 @@
"axios": "1.7.3",
"axios-miniprogram-adapter": "^0.3.5",
"date-fns": "3.6.0",
+ "jsencrypt": "^3.5.4",
"qrcode": "^1.5.4",
+ "three": "^0.182.0",
"vue": "2.6.14"
},
"devDependencies": {
@@ -854,6 +856,11 @@
"node": ">=8"
}
},
+ "node_modules/jsencrypt": {
+ "version": "3.5.4",
+ "resolved": "https://registry.npmmirror.com/jsencrypt/-/jsencrypt-3.5.4.tgz",
+ "integrity": "sha512-kNjfYEMNASxrDGsmcSQh/rUTmcoRfSUkxnAz+MMywM8jtGu+fFEZ3nJjHM58zscVnwR0fYmG9sGkTDjqUdpiwA=="
+ },
"node_modules/locate-path": {
"version": "5.0.0",
"resolved": "https://registry.npmmirror.com/locate-path/-/locate-path-5.0.0.tgz",
@@ -1155,6 +1162,11 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/three": {
+ "version": "0.182.0",
+ "resolved": "https://registry.npmmirror.com/three/-/three-0.182.0.tgz",
+ "integrity": "sha512-GbHabT+Irv+ihI1/f5kIIsZ+Ef9Sl5A1Y7imvS5RQjWgtTPfPnZ43JmlYI7NtCRDK9zir20lQpfg8/9Yd02OvQ=="
+ },
"node_modules/urijs": {
"version": "1.19.11",
"resolved": "https://registry.npmmirror.com/urijs/-/urijs-1.19.11.tgz",
diff --git a/package.json b/package.json
index f19d2f8..28fb3f6 100644
--- a/package.json
+++ b/package.json
@@ -17,7 +17,9 @@
"axios": "1.7.3",
"axios-miniprogram-adapter": "^0.3.5",
"date-fns": "3.6.0",
+ "jsencrypt": "^3.5.4",
"qrcode": "^1.5.4",
+ "three": "^0.182.0",
"vue": "2.6.14"
},
"devDependencies": {
diff --git a/pages/detail/assetsDetail.vue b/pages-assets/assets/assetsDetail.vue
similarity index 63%
rename from pages/detail/assetsDetail.vue
rename to pages-assets/assets/assetsDetail.vue
index 53cf72f..5ad0c5a 100644
--- a/pages/detail/assetsDetail.vue
+++ b/pages-assets/assets/assetsDetail.vue
@@ -14,42 +14,34 @@
-
-
+
- ¥1500/月
+ {{asset.rent || '未知'}}/月
地址:
- {{ asset.address }}
+ {{ asset.address || '未知'}}
-
+
-
@@ -60,27 +52,27 @@
编号
- {{ asset.code }}
+ {{ asset.code || '未知'}}
面积
- 105㎡
+ {{asset.area || '未知'}}㎡
类别
- {{ asset.category }}
+ {{ asset.category || '未知'}}
价值
- ¥{{ formatMoney(asset.value) }}
+ ¥{{ formatMoney((asset && asset.value) || 0) }}
权属
- {{ asset.owner }}
+ {{ asset.owner || '未知'}}
@@ -90,7 +82,7 @@
-
+
+
+
\ No newline at end of file
diff --git a/pages-assets/discharge/leaseCancelList.vue b/pages-assets/discharge/leaseCancelList.vue
new file mode 100644
index 0000000..d49003e
--- /dev/null
+++ b/pages-assets/discharge/leaseCancelList.vue
@@ -0,0 +1,255 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 申请时间:
+ {{item.applyTime}}
+
+
+ 退租资产:
+ {{item.dischargeItem}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/message/guestbook.vue b/pages-assets/fallback/fallback.vue
similarity index 51%
rename from pages/message/guestbook.vue
rename to pages-assets/fallback/fallback.vue
index d85b96e..366c733 100644
--- a/pages/message/guestbook.vue
+++ b/pages-assets/fallback/fallback.vue
@@ -2,12 +2,12 @@
+ :text-color="navbarStyle.textColor" :opacity="navbarStyle.opacity" :show-home="true" />
-
-
+
+
-
+
+
+
+
+
@@ -32,36 +39,18 @@
export default {
data() {
return {
- messageList: [{
- id: 1,
- status: 'processed',
- statusText: '已处理',
- content: '留言内容摘要留言内容摘要留言内容摘要留言内容摘要留言内容摘要留言内容摘要',
- time: '2024-02-02'
- },
- {
- id: 2,
- status: 'processing',
- statusText: '处理中',
- content: '留言内容摘要留言内容摘要留言内容摘要留言内容摘要留言内容摘要留言内容摘要',
- time: '2024-02-02'
- },
- {
- id: 3,
- status: 'pending',
- statusText: '待处理',
- content: '留言内容摘要留言内容摘要留言内容摘要留言内容摘要留言内容摘要留言内容摘要',
- time: '2024-02-02'
- }
- ],
+ showAddPopup: false,
+ newMessageContent: '',
+ flowList: [],
// 导航栏样式控制
navbarStyle: {
isTransparent: true,
bgColor: '#ffffff',
textColor: '#000000',
- opacity: 0,
- extraIcons: ['ellipsis', 'eye'] // 右侧额外图标
+ opacity: 0
},
+ loadStatus: 'loadmore',
+ isRefreshing: false,
// 滚动距离
scrollTop: 0
}
@@ -71,47 +60,120 @@
// 计算导航栏透明度和样式
this.updateNavbarStyle(e.scrollTop);
},
+ onShow() {
+ this.$checkToken(this.$getToken())
+ },
+ onLoad() {
+ this.fetchFallback();
+ },
methods: {
// 点击留言项跳转到详情页
navigateToDetail(item) {
uni.navigateTo({
- url: `/pages/detail/guestbookDetail?id=${item.id}`,
+ url: `/pages-assets/fallback/fallbackDetail?id=${item.id}`,
});
},
- addMessage() {
- // 新增留言逻辑
- uni.showToast({
- title: '新增留言',
- icon: 'none'
- });
+ fetchFallback() {
+ if (this.loadStatus !== 'loadmore') return;
+ this.loadStatus = 'loading';
+ let token = this.$getToken()
+ let url = '/fallback/queryPage'
+ this.$u.post(url, {
+ pageNo: this.pageNo,
+ pageSize: this.pageSize
+ }, {
+ WT: token
+ }).then(res => {
+ const rows = res.data.result || [];
+ console.log(rows)
+ if (this.pageNo === 1) this.flowList = [];
+ this.flowList = this.flowList.concat(rows)
+ if (rows.length < this.pageSize) {
+ this.loadStatus = 'nomore';
+ } else {
+ this.pageNo++;
+ this.loadStatus = 'loadmore';
+ }
+ }).catch(err => {
+ console.log("获取留言信息失败:", err)
+ this.loadStatus = 'loadmore';
+ })
+ },
+ loadMore() {
+ // 只有在 loadStatus 为 'loadmore' 时才触发
+ if (this.loadStatus !== 'loadmore') return;
+ this.fetchReserve()
+ },
+ goToSubmit() {
+ this.showAddPopup = true;
+ },
+ addFallback() {
+ const content = this.newMessageContent.trim();
+ if (!content) {
+ uni.showToast({
+ title: '请输入留言内容',
+ icon: 'none'
+ });
+ return;
+ }
+ const token = this.$getToken();
+ this.$u.post('/fallback/submit', {
+ content
+ }, {
+ WT: token
+ })
+ .then(res => {
+ uni.showToast({
+ title: '留言成功',
+ icon: 'success'
+ });
+ this.showAddPopup = false;
+ this.newMessageContent = '';
+ this.refresh();
+ })
+ .catch(err => {
+ console.error('新增留言失败:', err);
+ uni.showToast({
+ title: '留言失败',
+ icon: 'none'
+ });
+ this.showAddPopup = false;
+ });
+ },
+ refresh() {
+ this.isRefreshing = true;
+ setTimeout(() => {
+ this.isRefreshing = false;
+ }, 1000);
},
// 根据滚动距离更新导航栏样式
updateNavbarStyle(scrollTop) {
// 定义滚动阈值,超过此值导航栏变为不透明
const threshold = 200;
-
+
// 计算透明度
let opacity = scrollTop / threshold;
opacity = Math.min(opacity, 1);
opacity = Math.max(opacity, 0);
-
+
// 更新导航栏样式
this.navbarStyle.opacity = opacity;
-
+
if (opacity > 0.5) {
this.navbarStyle.isTransparent = false;
} else {
this.navbarStyle.isTransparent = true;
}
- },
+ }
}
+
}
\ No newline at end of file
diff --git a/pages/detail/guestbookDetail.vue b/pages-assets/fallback/fallbackDetail.vue
similarity index 80%
rename from pages/detail/guestbookDetail.vue
rename to pages-assets/fallback/fallbackDetail.vue
index cf2221d..4bc3ee2 100644
--- a/pages/detail/guestbookDetail.vue
+++ b/pages-assets/fallback/fallbackDetail.vue
@@ -9,11 +9,11 @@
- 反馈内容
+ {{messageDetail.title}}
- 反馈内容反馈内容反馈内容反馈内容反馈内容反馈内容反馈内容反馈内容反馈内容反馈内容反馈内容...
+ {{messageDetail.content}}
@@ -34,6 +34,7 @@
data() {
return {
// 导航栏样式控制
+ id: null,
navbarStyle: {
isTransparent: true,
bgColor: '#ffffff',
@@ -44,7 +45,7 @@
// 滚动距离
scrollTop: 0,
// 留言详情数据
- messageDetail: {}
+ messageDetail: null
}
},
onPageScroll(e) {
@@ -52,33 +53,26 @@
// 计算导航栏透明度和样式
this.updateNavbarStyle(e.scrollTop);
},
+ onShow(){
+ this.$checkToken(this.$getToken())
+ },
onLoad(options) {
// 从路由参数中获取留言ID
- this.messageId = options.id;
+ this.id = options.id;
// 调用接口获取留言详情
- // this.getGuestbookDetail();
+ this.getFallbackDetail();
},
methods: {
- // 调用接口获取留言详情
- getGuestbookDetail() {
- uni.request({
- url: '/guestbook/detail',
- method: 'GET',
- data: {
- id: this.messageId
- },
- success: (res) => {
- if (res.statusCode === 200) {
- // 成功获取留言详情,更新页面数据
- this.messageDetail = res.data;
- } else {
- uni.showToast({
- title: '获取留言详情失败',
- icon: 'none'
- });
- }
- }
- });
+ getFallbackDetail() {
+ let token = this.$getToken();
+ let url = `/fallback/detail?id=${this.id}`
+ this.$u.get(url,{}, {
+ WT: token
+ }).then(result => {
+ this.messageDetail = result.data;
+ }).catch(err => {
+ console.log("获取留言详情信息失败:", err)
+ })
},
// 根据滚动距离更新导航栏样式
updateNavbarStyle(scrollTop) {
@@ -106,7 +100,7 @@
diff --git a/pages-biz/face/faceAuth.vue b/pages-biz/face/faceAuth.vue
new file mode 100644
index 0000000..bd3175e
--- /dev/null
+++ b/pages-biz/face/faceAuth.vue
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
+ 加载中
+
+
+
+ 如未成功跳转,
+ 点击此处
+ 手动跳转
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/location/location.vue b/pages-biz/location/location.vue
similarity index 89%
rename from pages/location/location.vue
rename to pages-biz/location/location.vue
index 4137b49..605f484 100644
--- a/pages/location/location.vue
+++ b/pages-biz/location/location.vue
@@ -4,7 +4,7 @@
已选 :
-
+
{{vuex_city==''?'请选择城市':vuex_city}}
@@ -33,7 +33,7 @@
data() {
return {
locationCity:'',
- hotList:['杭州市','郑州市','北京市','上海市','广州市','深圳市']
+ hotList:['杭州市','郑州市','北京市','上海市','广州市','深圳市','武汉市']
}
},
onLoad() {
@@ -42,20 +42,30 @@
methods: {
clickCity(item){
this.$u.vuex('vuex_city', item);
- return uni.reLaunch({
- url:'../index/index'
- })
+ const pages = getCurrentPages();
+ if (pages.length > 1) {
+ uni.navigateBack();
+ } else {
+ uni.switchTab({
+ url:'/pages/index/index'
+ })
+ }
},
setLocation(){
this.$u.vuex('vuex_city', this.locationCity);
- return uni.reLaunch({
- url:'../index/index'
- })
+ const pages = getCurrentPages();
+ if (pages.length > 1) {
+ uni.navigateBack();
+ } else {
+ uni.switchTab({
+ url:'/pages/index/index'
+ })
+ }
},
findLocation(){
let that = this
uni.showLoading({title:"定位中....",mask:true})
- this.$u.get("/api/profile/getRealCity").then(obj => {
+ this.$u.get("/location/getRealCity").then(obj => {
let cityName = obj.msg
if(cityName){
this.locationCity = cityName
@@ -67,7 +77,7 @@
uni.hideLoading();
}else{
uni.request({
- // url:'https://pv.sohu.com/cityjson?ie=utf-8',
+ //获取真实IP
url:'https://tianqiapi.com/ip?version=v9&appid=23035354&appsecret=8YvlPNrz',
success(resp) {
let ip = resp.data.ip
@@ -155,7 +165,7 @@
}
}
.right{
- color: #2979ff;
+ color: #FF2F31;
font-weight: 600;
margin-right: 10rpx;
};
diff --git a/pages-biz/login/login.vue b/pages-biz/login/login.vue
new file mode 100644
index 0000000..ded43a3
--- /dev/null
+++ b/pages-biz/login/login.vue
@@ -0,0 +1,308 @@
+
+
+
+
+
+
+
+
+
+ 登录
+
+
+
+
+
+
+
+
+
+
+
+
+ 个人
+ 企业
+
+
+
+
+
+
+
+ 我已阅读并同意
+ 《用户协议》
+ 和
+ 《隐私政策》
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages-biz/message/message.vue b/pages-biz/message/message.vue
new file mode 100644
index 0000000..ad0d78b
--- /dev/null
+++ b/pages-biz/message/message.vue
@@ -0,0 +1,168 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ msg.title }}
+ {{ msg.desc }}
+
+
+
+ {{ msg.time }}
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/message/messageDetail.vue b/pages-biz/message/messageDetail.vue
similarity index 56%
rename from pages/message/messageDetail.vue
rename to pages-biz/message/messageDetail.vue
index 868e362..ebb5176 100644
--- a/pages/message/messageDetail.vue
+++ b/pages-biz/message/messageDetail.vue
@@ -17,17 +17,43 @@
export default {
data() {
return {
+ id:null,
title: '',
desc: ''
}
},
+ onShow() {
+ this.$checkToken(this.$getToken())
+ },
onLoad(e) {
- this.title = decodeURIComponent(e.title || '')
- this.desc = decodeURIComponent(e.desc || '')
+ this.id = e.id
+ this.getDetail()
},
methods: {
+ getDetail(){
+ this.$u.get(`/message/detail?id=${this.id}`,{},{
+ WT: this.$getToken()
+ }).then(res=>{
+ if(res.flag) {
+ this.title = res.data.title;
+ this.desc = res.data.messageContent;
+ }
+ })
+ },
+ read(){
+ this.$u.get(`/message/read?id=${this.id}`,{},{
+ WT: this.$getToken()
+ })
+ },
goBack() {
- uni.navigateBack()
+ const pages = getCurrentPages();
+ if (pages.length > 1) {
+ uni.navigateBack();
+ } else {
+ uni.switchTab({
+ url:'/pages/index/index'
+ })
+ }
}
}
}
diff --git a/pages-biz/myrent/myLease.vue b/pages-biz/myrent/myLease.vue
new file mode 100644
index 0000000..c05fb54
--- /dev/null
+++ b/pages-biz/myrent/myLease.vue
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/notice/notice.vue b/pages-biz/notice/notice.vue
similarity index 50%
rename from pages/notice/notice.vue
rename to pages-biz/notice/notice.vue
index c04e2f6..6634d96 100644
--- a/pages/notice/notice.vue
+++ b/pages-biz/notice/notice.vue
@@ -4,15 +4,15 @@
-
+
- {{ item.title }}
- {{ item.date }}
+ {{ item.noticeTitle }}
+ {{ item.createTime }}
- {{ item.content }}
+ {{ item.noticeContent }}
@@ -27,60 +27,51 @@
export default {
data() {
// 静态公告数据
- const staticNoticeList = [
- {
- id: 1,
- title: '关于开展2025年度招商工作的通知',
- date: '2025-01-15',
- content: '为进一步推进我市招商引资工作,优化营商环境,现就开展2025年度招商工作有关事项通知如下:一、工作目标;二、重点领域;三、保障措施...'
- },
- {
- id: 2,
- title: '2024年度招商成果通报',
- date: '2025-01-10',
- content: '2024年,我市招商引资工作取得显著成效,共引进各类项目120个,总投资达500亿元,现将具体成果通报如下:一、总体情况;二、主要特点;三、下一步计划...'
- },
- {
- id: 3,
- title: '关于举办2025年春季招商推介会的通知',
- date: '2025-01-05',
- content: '为搭建投资合作平台,展示我市投资环境和发展机遇,定于2025年3月15日举办春季招商推介会,诚邀各界企业家参会...'
- },
- {
- id: 4,
- title: '关于印发《市招商引资优惠政策实施细则》的通知',
- date: '2024-12-28',
- content: '为进一步规范招商引资优惠政策的实施,经市政府同意,现将《市招商引资优惠政策实施细则》印发给你们,请认真贯彻执行...'
- },
- {
- id: 5,
- title: '关于认定2024年度市重点招商引资项目的通知',
- date: '2024-12-20',
- content: '根据《市重点招商引资项目认定管理办法》,经评审,认定以下30个项目为2024年度市重点招商引资项目,现予以公布...'
- }
- ];
+ const staticNoticeList = [];
return {
- pageNum: 1,
- pageSize: 50,
- dataList: staticNoticeList,
+ pageNo: 1,
+ pageSize: 20,
+ flowList: [],
+ loadStatus: 'loadmore',
+ isRefreshing: false
};
},
onLoad() {
// 静态数据已在data中初始化,无需调用接口
- // this.getNoticecList();
+ this.getNoticecList();
},
methods: {
clickContent(item) {
- if (item.id) {
- this.$u.route('/pages/notice/noticeDetail', {
- id: item.id
+ if (item.noticeId) {
+ this.$u.route({
+ url: '/pages-biz/notice/noticeDetail',
+ params: {
+ id: item.noticeId
+ }
});
}
},
getNoticecList() {
- // 静态数据已在data中初始化,无需调用接口
- // 保留此方法以保持兼容性
- return;
+ if (this.loadStatus !== 'loadmore') return;
+ this.loadStatus = 'loading';
+ let url = "/notice/pageQuery";
+ this.$u.post(url, {
+ pageNo: this.pageNo,
+ pageSize: this.pageSize
+ }).then(res => {
+ const rows = res.data.result || [];
+ console.log(rows)
+ if (this.pageNo === 1) this.flowList = [];
+ this.flowList = this.flowList.concat(rows)
+ if (rows.length < this.pageSize) {
+ this.loadStatus = 'nomore';
+ } else {
+ this.pageNo++;
+ this.loadStatus = 'loadmore';
+ }
+ }).catch(err => {
+ console.log("获取招商公告失败:", err)
+ });
}
}
};
diff --git a/pages/notice/noticeDetail.vue b/pages-biz/notice/noticeDetail.vue
similarity index 67%
rename from pages/notice/noticeDetail.vue
rename to pages-biz/notice/noticeDetail.vue
index fd18c39..3c1b0e5 100644
--- a/pages/notice/noticeDetail.vue
+++ b/pages-biz/notice/noticeDetail.vue
@@ -14,18 +14,27 @@
export default {
data() {
return {
+ id:null,
title:'资讯',
content: ``
}
},
onLoad(option) {
- let id = option.id
- let url = "/api/notice/getNotice/"+id;
- this.$u.get(url).then(res => {
- this.title = res.data.noticeTitle
- this.content = res.data.noticeContent
- });
+ this.id = option.id
+ this.getDetail()
},
+ methods:{
+ getDetail(){
+ this.$u.get(`/notice/detail?id=${this.id}`,{},{
+ WT: this.$getToken()
+ }).then(res=>{
+ if(res.flag) {
+ this.title = res.data.noticeTitle;
+ this.content = res.data.noticeContent;
+ }
+ })
+ }
+ }
}
diff --git a/pages-biz/privacy/privacyPolicy.vue b/pages-biz/privacy/privacyPolicy.vue
new file mode 100644
index 0000000..bea4671
--- /dev/null
+++ b/pages-biz/privacy/privacyPolicy.vue
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+ 一、我们如何收集信息
+
+ 在您使用本应用过程中,我们可能会收集与您相关的必要信息,
+ 包括但不限于设备信息、日志信息以及您主动提供的信息。
+
+
+ 二、信息的使用方式
+
+ 我们收集的信息仅用于提供和优化服务、保障账号与系统安全、
+ 以及履行法律法规规定的义务。
+
+
+ 三、信息的存储与保护
+
+ 我们将采取合理的技术与管理措施,保护您的个人信息不被泄露、
+ 篡改或非法访问。
+
+
+ 四、信息的共享与披露
+
+ 未经您的明确同意,我们不会向第三方共享或披露您的个人信息,
+ 法律法规另有规定的除外。
+
+
+ 五、您的权利
+
+ 您有权依法查询、更正或删除您的个人信息,并可随时联系我们行使相关权利。
+
+
+ 六、政策变更
+
+ 本隐私政策如有更新,我们将以合理方式向您告知。
+
+
+
+
+
+
+
+
+
diff --git a/pages-biz/privacy/userAgreement.vue b/pages-biz/privacy/userAgreement.vue
new file mode 100644
index 0000000..ba079d5
--- /dev/null
+++ b/pages-biz/privacy/userAgreement.vue
@@ -0,0 +1,119 @@
+
+
+
+
+
+
+ 一、协议说明
+
+ 欢迎您使用本应用。请您在使用本应用前,认真阅读并充分理解本《用户协议》。
+ 一旦您开始使用本应用,即视为您已阅读、理解并同意本协议的全部内容。
+
+
+ 二、用户行为规范
+
+ 1. 用户应遵守中华人民共和国相关法律法规,不得利用本应用从事任何违法活动。
+
+
+ 2. 不得发布、传播违法、侵权、虚假、骚扰性或其他不当信息。
+
+
+ 3. 不得以任何形式干扰本应用的正常运行。
+
+
+ 三、服务变更与中断
+
+ 本应用有权根据业务发展需要,对服务内容进行调整、中断或终止,
+ 并尽可能提前向用户告知。
+
+
+ 四、免责声明
+
+ 因不可抗力或非本应用原因造成的服务中断或数据损失,本应用不承担责任。
+
+
+ 五、其他
+
+ 本协议的解释权及修改权归本应用所有。
+
+
+
+
+
+
+
+
+
diff --git a/pages-biz/profile/profile.vue b/pages-biz/profile/profile.vue
new file mode 100644
index 0000000..0885155
--- /dev/null
+++ b/pages-biz/profile/profile.vue
@@ -0,0 +1,180 @@
+
+
+
+
+
+
+
+
+ {{(cardNo == null ? orgNo : cardNo) || ''}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages-biz/profile/setting.vue b/pages-biz/profile/setting.vue
new file mode 100644
index 0000000..fd37f5a
--- /dev/null
+++ b/pages-biz/profile/setting.vue
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ 退出登录
+
+
+ Version {{vuex_version}}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/reserve/reserveRecords.vue b/pages-biz/reserve/reserveRecords.vue
similarity index 78%
rename from pages/reserve/reserveRecords.vue
rename to pages-biz/reserve/reserveRecords.vue
index 65f93a6..19c35d4 100644
--- a/pages/reserve/reserveRecords.vue
+++ b/pages-biz/reserve/reserveRecords.vue
@@ -2,7 +2,9 @@
-
+
-
+
@@ -45,7 +47,7 @@
管家:
- {{ item.managerName }}({{ item.managerPhone }})
+ {{ item.managerName || '未知'}}({{ item.managerPhone || '未知'}})
@@ -80,33 +82,18 @@
export default {
data() {
return {
- records: [
- {
- id: 1,
- date: '2025-11-10 09:00',
- status: 'pending',
- assetName: '天河公寓A栋301',
- assetAddress: '广州市天河区体育东路88号',
- managerName: '张管家',
- managerPhone: '13800138000',
- lat: 23.129,
- lng: 113.264
- },
- {
- id: 2,
- date: '2025-11-09 14:00',
- status: 'done',
- assetName: '越秀中心B座',
- assetAddress: '广州市越秀区中山五路12号',
- managerName: '李经理',
- managerPhone: '13688886666',
- lat: 23.133,
- lng: 113.278
- }
- ],
+ pageNo: 1,
+ pageSize:10,
+ flowList: [],
loadStatus: 'loadmore',
isRefreshing: false
- };
+ }
+ },
+ onLoad(options){
+ this.fetchReserve()
+ },
+ onShow() {
+ this.$checkToken(this.$getToken())
},
methods: {
statusText(status) {
@@ -121,6 +108,7 @@ export default {
},
formatDate(dateStr) {
// 格式化日期,例如:2025-11-10 周五 09:00
+ if(!dateStr){return '-'}
const date = new Date(dateStr);
const weekdays = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
const year = date.getFullYear();
@@ -132,6 +120,31 @@ export default {
return `${year}-${month}-${day} ${weekday} ${hours}:${minutes}`;
},
+ fetchReserve(){
+ if (this.loadStatus !== 'loadmore') return;
+ this.loadStatus = 'loading';
+ let url = '/reservate/queryPage'
+ this.$u.post(url, {
+ pageNo: this.pageNo,
+ pageSize: this.pageSize
+ },{
+ WT: this.$getToken()
+ }).then(res => {
+ const rows = res.data.result || [];
+ console.log(rows)
+ if (this.pageNo === 1) this.flowList = [];
+ this.flowList = this.flowList.concat(rows);
+ if (rows.length < this.pageSize) {
+ this.loadStatus = 'nomore';
+ } else {
+ this.pageNo++;
+ this.loadStatus = 'loadmore';
+ }
+ }).catch(err => {
+ console.log("获取预约记录失败:", err)
+ this.loadStatus = 'loadmore';
+ })
+ },
viewLocation(item) {
uni.openLocation({
latitude: item.lat,
@@ -145,10 +158,7 @@ export default {
uni.makePhoneCall({ phoneNumber: phone });
},
loadMore() {
- this.loadStatus = 'loading';
- setTimeout(() => {
- this.loadStatus = 'nomore';
- }, 1000);
+ this.fetchReserve()
},
refresh() {
this.isRefreshing = true;
@@ -162,13 +172,13 @@ export default {
diff --git a/pages/unpaid/unpaid.vue b/pages-biz/unpaid/unpaid.vue
similarity index 82%
rename from pages/unpaid/unpaid.vue
rename to pages-biz/unpaid/unpaid.vue
index c5b9c2d..a757862 100644
--- a/pages/unpaid/unpaid.vue
+++ b/pages-biz/unpaid/unpaid.vue
@@ -1,25 +1,25 @@
-
+
-
-
+
+
- {{ item.feeName }}
- 缴费截止:{{ item.dueDate }}
+ {{ $ellipsis(item.billName,27) }}
+ 缴费截止:{{ item.billPayEndDate }}
- {{ formatMoney(item.amount) }}
+ {{ formatMoney(item.billAmount) }}
@@ -38,8 +38,8 @@
已选 {{ selectedBills.length }} 项
合计:{{ formatMoney(sumAmount) }}
-
-
+
+