@ -0,0 +1,16 @@
|
||||
{
|
||||
"version" : "1.0",
|
||||
"configurations" : [
|
||||
{
|
||||
"playground" : "standard",
|
||||
"type" : "uni-app:app-android"
|
||||
},
|
||||
{
|
||||
"app-plus" :
|
||||
{
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"type" : "uniCloud"
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"eggHelper.serverPort": 35684
|
||||
}
|
@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<script>
|
||||
var coverSupport =
|
||||
'CSS' in window &&
|
||||
typeof CSS.supports === 'function' &&
|
||||
(CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
|
||||
document.write(
|
||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||
(coverSupport ? ', viewport-fit=cover' : '') +
|
||||
'" />',
|
||||
)
|
||||
|
||||
</script>
|
||||
<title></title>
|
||||
<!--preload-links-->
|
||||
<!--app-context-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app">
|
||||
<!--app-html-->
|
||||
</div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
//
|
||||
<script>
|
||||
// var _hmt = _hmt || []
|
||||
// ;(function () {
|
||||
// var hm = document.createElement('script')
|
||||
// hm.src = 'https://hm.baidu.com/hm.js?47837f06b6f8cf8ba80165ca9a80711'
|
||||
// var s = document.getElementsByTagName('script')[0]
|
||||
// s.parentNode.insertBefore(hm, s)
|
||||
// })()
|
||||
//
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -0,0 +1,94 @@
|
||||
{
|
||||
"name": "uni-app-personal",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"dev:app": "uni -p app",
|
||||
"dev:app-android": "uni -p app-android",
|
||||
"dev:app-ios": "uni -p app-ios",
|
||||
"dev:custom": "uni -p",
|
||||
"dev:h5": "uni",
|
||||
"dev:h5:ssr": "uni --ssr",
|
||||
"dev:mp-alipay": "uni -p mp-alipay",
|
||||
"dev:mp-baidu": "uni -p mp-baidu",
|
||||
"dev:mp-kuaishou": "uni -p mp-kuaishou",
|
||||
"dev:mp-lark": "uni -p mp-lark",
|
||||
"dev:mp-qq": "uni -p mp-qq",
|
||||
"dev:mp-toutiao": "uni -p mp-toutiao",
|
||||
"dev:mp-weixin": "uni -p mp-weixin",
|
||||
"dev:quickapp-webview": "uni -p quickapp-webview",
|
||||
"dev:quickapp-webview-huawei": "uni -p quickapp-webview-huawei",
|
||||
"dev:quickapp-webview-union": "uni -p quickapp-webview-union",
|
||||
"build:app": "uni build -p app",
|
||||
"build:app-android": "uni build -p app-android",
|
||||
"build:app-ios": "uni build -p app-ios",
|
||||
"build:custom": "uni build -p",
|
||||
"build:h5": "uni build",
|
||||
"build:h5:ssr": "uni build --ssr",
|
||||
"build:mp-alipay": "uni build -p mp-alipay",
|
||||
"build:mp-baidu": "uni build -p mp-baidu",
|
||||
"build:mp-kuaishou": "uni build -p mp-kuaishou",
|
||||
"build:mp-lark": "uni build -p mp-lark",
|
||||
"build:mp-qq": "uni build -p mp-qq",
|
||||
"build:mp-toutiao": "uni build -p mp-toutiao",
|
||||
"build:mp-weixin": "uni build -p mp-weixin",
|
||||
"build:quickapp-webview": "uni build -p quickapp-webview",
|
||||
"build:quickapp-webview-huawei": "uni build -p quickapp-webview-huawei",
|
||||
"build:quickapp-webview-union": "uni build -p quickapp-webview-union",
|
||||
"tsc": "vue-tsc --noEmit --skipLibCheck",
|
||||
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
||||
"prepare": "husky install",
|
||||
"lint-staged": "lint-staged"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{js,ts,vue}": [
|
||||
"eslint --fix"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@dcloudio/uni-app": "3.0.0-3090920231225001",
|
||||
"@dcloudio/uni-app-plus": "3.0.0-3090920231225001",
|
||||
"@dcloudio/uni-components": "3.0.0-3090920231225001",
|
||||
"@dcloudio/uni-h5": "3.0.0-3090920231225001",
|
||||
"@dcloudio/uni-mp-alipay": "3.0.0-3090920231225001",
|
||||
"@dcloudio/uni-mp-baidu": "3.0.0-3090920231225001",
|
||||
"@dcloudio/uni-mp-jd": "3.0.0-3090920231225001",
|
||||
"@dcloudio/uni-mp-kuaishou": "3.0.0-3090920231225001",
|
||||
"@dcloudio/uni-mp-lark": "3.0.0-3090920231225001",
|
||||
"@dcloudio/uni-mp-qq": "3.0.0-3090920231225001",
|
||||
"@dcloudio/uni-mp-toutiao": "3.0.0-3090920231225001",
|
||||
"@dcloudio/uni-mp-weixin": "3.0.0-3090920231225001",
|
||||
"@dcloudio/uni-mp-xhs": "3.0.0-3090920231225001",
|
||||
"@dcloudio/uni-quickapp-webview": "3.0.0-3090920231225001",
|
||||
"@dcloudio/uni-ui": "^1.4.28",
|
||||
"pinia": "2.0.27",
|
||||
"pinia-plugin-persistedstate": "^3.2.0",
|
||||
"vue": "3.4.21",
|
||||
"vue-i18n": "9.10.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@dcloudio/types": "3.4.8",
|
||||
"@dcloudio/uni-automator": "3.0.0-3090920231225001",
|
||||
"@dcloudio/uni-cli-shared": "3.0.0-3090920231225001",
|
||||
"@dcloudio/uni-stacktracey": "3.0.0-3090920231225001",
|
||||
"@dcloudio/uni-vue-devtools": "3.0.0-alpha-3080220230511001",
|
||||
"@dcloudio/vite-plugin-uni": "3.0.0-3090920231225001",
|
||||
"@rushstack/eslint-patch": "^1.1.4",
|
||||
"@types/node": "^18.11.9",
|
||||
"@uni-helper/uni-app-types": "^0.5.12",
|
||||
"@uni-helper/uni-ui-types": "^0.5.11",
|
||||
"@vue/eslint-config-prettier": "^7.0.0",
|
||||
"@vue/eslint-config-typescript": "^11.0.0",
|
||||
"@vue/runtime-core": "3.4.21",
|
||||
"@vue/tsconfig": "^0.4.0",
|
||||
"eslint": "^8.22.0",
|
||||
"eslint-plugin-vue": "^9.3.0",
|
||||
"husky": "^8.0.0",
|
||||
"lint-staged": "^13.0.3",
|
||||
"miniprogram-api-typings": "^3.12.0",
|
||||
"prettier": "^2.7.1",
|
||||
"sass": "^1.56.1",
|
||||
"typescript": "^5.1.6",
|
||||
"vite": "4.0.3",
|
||||
"vue-tsc": "^1.8.8"
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
{
|
||||
"appid": "wxa29fe397274614b5",
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "3.3.0",
|
||||
"packOptions": {
|
||||
"ignore": [],
|
||||
"include": []
|
||||
},
|
||||
"setting": {
|
||||
"coverView": true,
|
||||
"es6": true,
|
||||
"postcss": true,
|
||||
"minified": true,
|
||||
"enhance": true,
|
||||
"showShadowRootInWxmlPanel": true,
|
||||
"packNpmRelationList": [],
|
||||
"babelSetting": {
|
||||
"ignore": [],
|
||||
"disablePlugins": [],
|
||||
"outputPath": ""
|
||||
}
|
||||
},
|
||||
"condition": {},
|
||||
"editorSetting": {
|
||||
"tabIndent": "insertSpaces",
|
||||
"tabSize": 4
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
<!--
|
||||
* @Author: 王文杰
|
||||
* @Date: 2024-01-04 12:54:56
|
||||
* @LastEditors: 王文杰
|
||||
* @LastEditTime: 2024-03-26 14:34:58
|
||||
* @FilePath: /app-nx-personal/src/App.vue
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
-->
|
||||
<script setup lang="ts">
|
||||
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app'
|
||||
import { updateManager } from '@/utils/index'
|
||||
onLaunch(() => {
|
||||
console.log('App Launch')
|
||||
updateManager()
|
||||
})
|
||||
onShow(() => {
|
||||
console.log('App Show')
|
||||
})
|
||||
onHide(() => {
|
||||
console.log('App Hide')
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
// 字体图标
|
||||
@import '@/styles/fonts.scss';
|
||||
@import '@/styles/base.scss';
|
||||
</style>
|
@ -0,0 +1,152 @@
|
||||
<script setup lang="ts">
|
||||
// import { getHomeGoodsGuessLikeAPI } from '@/services/home'
|
||||
import type { PageParams } from '@/types/global'
|
||||
import type { GuessItem } from '@/types/home'
|
||||
import { onMounted, ref } from 'vue'
|
||||
|
||||
// 分页参数
|
||||
const pageParams: Required<PageParams> = {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
// 猜你喜欢的列表
|
||||
const guessList = ref<GuessItem[]>([])
|
||||
// 已结束标记
|
||||
const finish = ref(false)
|
||||
// 获取猜你喜欢数据
|
||||
const getHomeGoodsGuessLikeData = async () => {
|
||||
// 退出分页判断
|
||||
if (finish.value === true) {
|
||||
return uni.showToast({ icon: 'none', title: '没有更多数据~' })
|
||||
}
|
||||
// const res = await getHomeGoodsGuessLikeAPI(pageParams)
|
||||
// guessList.value = res.result.items
|
||||
// 数组追加
|
||||
guessList.value.push(...res.result.items)
|
||||
// 分页条件
|
||||
if (pageParams.page < res.result.pages) {
|
||||
// 页码累加
|
||||
pageParams.page++
|
||||
} else {
|
||||
finish.value = true
|
||||
}
|
||||
}
|
||||
// 重置数据
|
||||
const resetData = () => {
|
||||
pageParams.page = 1
|
||||
guessList.value = []
|
||||
finish.value = false
|
||||
}
|
||||
// 组件挂载完毕
|
||||
onMounted(() => {
|
||||
getHomeGoodsGuessLikeData()
|
||||
})
|
||||
// 暴露方法
|
||||
defineExpose({
|
||||
resetData,
|
||||
getMore: getHomeGoodsGuessLikeData,
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- 猜你喜欢 -->
|
||||
<view class="caption">
|
||||
<text class="text">猜你喜欢</text>
|
||||
</view>
|
||||
<view class="guess">
|
||||
<navigator
|
||||
class="guess-item"
|
||||
v-for="item in guessList"
|
||||
:key="item.id"
|
||||
:url="`/pages/goods/goods?id=${item.id}`"
|
||||
>
|
||||
<image class="image" mode="aspectFill" :src="item.picture"></image>
|
||||
<view class="name"> {{ item.name }} </view>
|
||||
<view class="price">
|
||||
<text class="small">¥</text>
|
||||
<text>{{ item.price }}</text>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="loading-text">
|
||||
{{ finish ? '没有更多数据~' : '正在加载...' }}
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
:host {
|
||||
display: block;
|
||||
}
|
||||
/* 分类标题 */
|
||||
.caption {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
line-height: 1;
|
||||
padding: 36rpx 0 40rpx;
|
||||
font-size: 32rpx;
|
||||
color: #262626;
|
||||
.text {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 0 28rpx 0 30rpx;
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
content: '';
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
background-image: url(@/static/images/bubble.png);
|
||||
background-size: contain;
|
||||
margin: 0 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 猜你喜欢 */
|
||||
.guess {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
padding: 0 20rpx;
|
||||
.guess-item {
|
||||
width: 345rpx;
|
||||
padding: 24rpx 20rpx 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 10rpx;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
}
|
||||
.image {
|
||||
width: 304rpx;
|
||||
height: 304rpx;
|
||||
}
|
||||
.name {
|
||||
height: 75rpx;
|
||||
margin: 10rpx 0;
|
||||
font-size: 26rpx;
|
||||
color: #262626;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
.price {
|
||||
line-height: 1;
|
||||
padding-top: 4rpx;
|
||||
color: #cf4444;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.small {
|
||||
font-size: 80%;
|
||||
}
|
||||
}
|
||||
// 加载提示文字
|
||||
.loading-text {
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,40 @@
|
||||
<script setup lang="ts">
|
||||
import type { BannerItem } from '@/types/home'
|
||||
import { ref } from 'vue'
|
||||
|
||||
const activeIndex = ref(0)
|
||||
|
||||
// 当 swiper 下标发生变化时触发
|
||||
const onChange: UniHelper.SwiperOnChange = (ev) => {
|
||||
activeIndex.value = ev.detail.current
|
||||
}
|
||||
// 定义 props 接收
|
||||
defineProps<{
|
||||
list: BannerItem[]
|
||||
}>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="carousel">
|
||||
<swiper :circular="true" :autoplay="false" :interval="3000" @change="onChange">
|
||||
<swiper-item v-for="item in list" :key="item.id">
|
||||
<navigator url="/pages/index/index" hover-class="none" class="navigator">
|
||||
<image mode="aspectFill" class="image" :src="item.imgUrl"></image>
|
||||
</navigator>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<!-- 指示点 -->
|
||||
<view class="indicator">
|
||||
<text
|
||||
v-for="(item, index) in list"
|
||||
:key="item.id"
|
||||
class="dot"
|
||||
:class="{ active: index === activeIndex }"
|
||||
></text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
@import './styles/XtxSwiper.scss';
|
||||
</style>
|
@ -0,0 +1,31 @@
|
||||
/* 轮播图 */
|
||||
.carousel {
|
||||
height: 280rpx;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transform: translateY(0);
|
||||
background-color: #efefef;
|
||||
.indicator {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 16rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
.dot {
|
||||
width: 30rpx;
|
||||
height: 6rpx;
|
||||
margin: 0 8rpx;
|
||||
border-radius: 6rpx;
|
||||
background-color: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
.active {
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
.navigator,
|
||||
.image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
import type { XtxGuessInstance } from '@/types/components'
|
||||
import { ref } from 'vue'
|
||||
|
||||
/**
|
||||
* 猜你喜欢组合式函数
|
||||
*/
|
||||
export const useGuessList = () => {
|
||||
// 获取猜你喜欢组件实例
|
||||
const guessRef = ref<XtxGuessInstance>()
|
||||
|
||||
// 滚动触底事件
|
||||
const onScrolltolower = () => {
|
||||
guessRef.value?.getMore()
|
||||
}
|
||||
|
||||
// 返回 ref 和事件处理函数
|
||||
return {
|
||||
guessRef,
|
||||
onScrolltolower,
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
/// <reference types="vite/client" />
|
||||
declare module '*.vue' {
|
||||
//@ts-ignore
|
||||
import { DefineComponent } from 'vue'
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
||||
const component: DefineComponent<{}, {}, any>
|
||||
export default component
|
||||
}
|
@ -0,0 +1,923 @@
|
||||
/*
|
||||
* @Author: 王文杰
|
||||
* @Date: 2019-03-05 14:39:24
|
||||
* @LastEditors: 王文杰
|
||||
* @LastEditTime: 2024-01-30 16:59:47
|
||||
* @FilePath: /app-nx-recycle/src/libs/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.min.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
var ERROR_CONF = {
|
||||
KEY_ERR: 311,
|
||||
KEY_ERR_MSG: 'key格式错误',
|
||||
PARAM_ERR: 310,
|
||||
PARAM_ERR_MSG: '请求参数信息有误',
|
||||
SYSTEM_ERR: 600,
|
||||
SYSTEM_ERR_MSG: '系统错误',
|
||||
WX_ERR_CODE: 1000,
|
||||
WX_OK_CODE: 200,
|
||||
}
|
||||
var BASE_URL = 'https://apis.map.qq.com/ws/'
|
||||
var URL_SEARCH = BASE_URL + 'place/v1/search'
|
||||
var URL_SUGGESTION = BASE_URL + 'place/v1/suggestion'
|
||||
var URL_GET_GEOCODER = BASE_URL + 'geocoder/v1/'
|
||||
var URL_CITY_LIST = BASE_URL + 'district/v1/list'
|
||||
var URL_AREA_LIST = BASE_URL + 'district/v1/getchildren'
|
||||
var URL_DISTANCE = BASE_URL + 'distance/v1/'
|
||||
var URL_DIRECTION = BASE_URL + 'direction/v1/'
|
||||
var MODE = { driving: 'driving', transit: 'transit' }
|
||||
var EARTH_RADIUS = 6378136.49
|
||||
var Utils = {
|
||||
safeAdd(x, y) {
|
||||
var lsw = (x & 0xffff) + (y & 0xffff)
|
||||
var msw = (x >> 16) + (y >> 16) + (lsw >> 16)
|
||||
return (msw << 16) | (lsw & 0xffff)
|
||||
},
|
||||
bitRotateLeft(num, cnt) {
|
||||
return (num << cnt) | (num >>> (32 - cnt))
|
||||
},
|
||||
md5cmn(q, a, b, x, s, t) {
|
||||
return this.safeAdd(
|
||||
this.bitRotateLeft(this.safeAdd(this.safeAdd(a, q), this.safeAdd(x, t)), s),
|
||||
b,
|
||||
)
|
||||
},
|
||||
md5ff(a, b, c, d, x, s, t) {
|
||||
return this.md5cmn((b & c) | (~b & d), a, b, x, s, t)
|
||||
},
|
||||
md5gg(a, b, c, d, x, s, t) {
|
||||
return this.md5cmn((b & d) | (c & ~d), a, b, x, s, t)
|
||||
},
|
||||
md5hh(a, b, c, d, x, s, t) {
|
||||
return this.md5cmn(b ^ c ^ d, a, b, x, s, t)
|
||||
},
|
||||
md5ii(a, b, c, d, x, s, t) {
|
||||
return this.md5cmn(c ^ (b | ~d), a, b, x, s, t)
|
||||
},
|
||||
binlMD5(x, len) {
|
||||
x[len >> 5] |= 0x80 << len % 32
|
||||
x[(((len + 64) >>> 9) << 4) + 14] = len
|
||||
var i
|
||||
var olda
|
||||
var oldb
|
||||
var oldc
|
||||
var oldd
|
||||
var a = 1732584193
|
||||
var b = -271733879
|
||||
var c = -1732584194
|
||||
var d = 271733878
|
||||
for (i = 0; i < x.length; i += 16) {
|
||||
olda = a
|
||||
oldb = b
|
||||
oldc = c
|
||||
oldd = d
|
||||
a = this.md5ff(a, b, c, d, x[i], 7, -680876936)
|
||||
d = this.md5ff(d, a, b, c, x[i + 1], 12, -389564586)
|
||||
c = this.md5ff(c, d, a, b, x[i + 2], 17, 606105819)
|
||||
b = this.md5ff(b, c, d, a, x[i + 3], 22, -1044525330)
|
||||
a = this.md5ff(a, b, c, d, x[i + 4], 7, -176418897)
|
||||
d = this.md5ff(d, a, b, c, x[i + 5], 12, 1200080426)
|
||||
c = this.md5ff(c, d, a, b, x[i + 6], 17, -1473231341)
|
||||
b = this.md5ff(b, c, d, a, x[i + 7], 22, -45705983)
|
||||
a = this.md5ff(a, b, c, d, x[i + 8], 7, 1770035416)
|
||||
d = this.md5ff(d, a, b, c, x[i + 9], 12, -1958414417)
|
||||
c = this.md5ff(c, d, a, b, x[i + 10], 17, -42063)
|
||||
b = this.md5ff(b, c, d, a, x[i + 11], 22, -1990404162)
|
||||
a = this.md5ff(a, b, c, d, x[i + 12], 7, 1804603682)
|
||||
d = this.md5ff(d, a, b, c, x[i + 13], 12, -40341101)
|
||||
c = this.md5ff(c, d, a, b, x[i + 14], 17, -1502002290)
|
||||
b = this.md5ff(b, c, d, a, x[i + 15], 22, 1236535329)
|
||||
a = this.md5gg(a, b, c, d, x[i + 1], 5, -165796510)
|
||||
d = this.md5gg(d, a, b, c, x[i + 6], 9, -1069501632)
|
||||
c = this.md5gg(c, d, a, b, x[i + 11], 14, 643717713)
|
||||
b = this.md5gg(b, c, d, a, x[i], 20, -373897302)
|
||||
a = this.md5gg(a, b, c, d, x[i + 5], 5, -701558691)
|
||||
d = this.md5gg(d, a, b, c, x[i + 10], 9, 38016083)
|
||||
c = this.md5gg(c, d, a, b, x[i + 15], 14, -660478335)
|
||||
b = this.md5gg(b, c, d, a, x[i + 4], 20, -405537848)
|
||||
a = this.md5gg(a, b, c, d, x[i + 9], 5, 568446438)
|
||||
d = this.md5gg(d, a, b, c, x[i + 14], 9, -1019803690)
|
||||
c = this.md5gg(c, d, a, b, x[i + 3], 14, -187363961)
|
||||
b = this.md5gg(b, c, d, a, x[i + 8], 20, 1163531501)
|
||||
a = this.md5gg(a, b, c, d, x[i + 13], 5, -1444681467)
|
||||
d = this.md5gg(d, a, b, c, x[i + 2], 9, -51403784)
|
||||
c = this.md5gg(c, d, a, b, x[i + 7], 14, 1735328473)
|
||||
b = this.md5gg(b, c, d, a, x[i + 12], 20, -1926607734)
|
||||
a = this.md5hh(a, b, c, d, x[i + 5], 4, -378558)
|
||||
d = this.md5hh(d, a, b, c, x[i + 8], 11, -2022574463)
|
||||
c = this.md5hh(c, d, a, b, x[i + 11], 16, 1839030562)
|
||||
b = this.md5hh(b, c, d, a, x[i + 14], 23, -35309556)
|
||||
a = this.md5hh(a, b, c, d, x[i + 1], 4, -1530992060)
|
||||
d = this.md5hh(d, a, b, c, x[i + 4], 11, 1272893353)
|
||||
c = this.md5hh(c, d, a, b, x[i + 7], 16, -155497632)
|
||||
b = this.md5hh(b, c, d, a, x[i + 10], 23, -1094730640)
|
||||
a = this.md5hh(a, b, c, d, x[i + 13], 4, 681279174)
|
||||
d = this.md5hh(d, a, b, c, x[i], 11, -358537222)
|
||||
c = this.md5hh(c, d, a, b, x[i + 3], 16, -722521979)
|
||||
b = this.md5hh(b, c, d, a, x[i + 6], 23, 76029189)
|
||||
a = this.md5hh(a, b, c, d, x[i + 9], 4, -640364487)
|
||||
d = this.md5hh(d, a, b, c, x[i + 12], 11, -421815835)
|
||||
c = this.md5hh(c, d, a, b, x[i + 15], 16, 530742520)
|
||||
b = this.md5hh(b, c, d, a, x[i + 2], 23, -995338651)
|
||||
a = this.md5ii(a, b, c, d, x[i], 6, -198630844)
|
||||
d = this.md5ii(d, a, b, c, x[i + 7], 10, 1126891415)
|
||||
c = this.md5ii(c, d, a, b, x[i + 14], 15, -1416354905)
|
||||
b = this.md5ii(b, c, d, a, x[i + 5], 21, -57434055)
|
||||
a = this.md5ii(a, b, c, d, x[i + 12], 6, 1700485571)
|
||||
d = this.md5ii(d, a, b, c, x[i + 3], 10, -1894986606)
|
||||
c = this.md5ii(c, d, a, b, x[i + 10], 15, -1051523)
|
||||
b = this.md5ii(b, c, d, a, x[i + 1], 21, -2054922799)
|
||||
a = this.md5ii(a, b, c, d, x[i + 8], 6, 1873313359)
|
||||
d = this.md5ii(d, a, b, c, x[i + 15], 10, -30611744)
|
||||
c = this.md5ii(c, d, a, b, x[i + 6], 15, -1560198380)
|
||||
b = this.md5ii(b, c, d, a, x[i + 13], 21, 1309151649)
|
||||
a = this.md5ii(a, b, c, d, x[i + 4], 6, -145523070)
|
||||
d = this.md5ii(d, a, b, c, x[i + 11], 10, -1120210379)
|
||||
c = this.md5ii(c, d, a, b, x[i + 2], 15, 718787259)
|
||||
b = this.md5ii(b, c, d, a, x[i + 9], 21, -343485551)
|
||||
a = this.safeAdd(a, olda)
|
||||
b = this.safeAdd(b, oldb)
|
||||
c = this.safeAdd(c, oldc)
|
||||
d = this.safeAdd(d, oldd)
|
||||
}
|
||||
return [a, b, c, d]
|
||||
},
|
||||
binl2rstr(input) {
|
||||
var i
|
||||
var output = ''
|
||||
var length32 = input.length * 32
|
||||
for (i = 0; i < length32; i += 8) {
|
||||
output += String.fromCharCode((input[i >> 5] >>> i % 32) & 0xff)
|
||||
}
|
||||
return output
|
||||
},
|
||||
rstr2binl(input) {
|
||||
var i
|
||||
var output = []
|
||||
output[(input.length >> 2) - 1] = undefined
|
||||
for (i = 0; i < output.length; i += 1) {
|
||||
output[i] = 0
|
||||
}
|
||||
var length8 = input.length * 8
|
||||
for (i = 0; i < length8; i += 8) {
|
||||
output[i >> 5] |= (input.charCodeAt(i / 8) & 0xff) << i % 32
|
||||
}
|
||||
return output
|
||||
},
|
||||
rstrMD5(s) {
|
||||
return this.binl2rstr(this.binlMD5(this.rstr2binl(s), s.length * 8))
|
||||
},
|
||||
rstrHMACMD5(key, data) {
|
||||
var i
|
||||
var bkey = this.rstr2binl(key)
|
||||
var ipad = []
|
||||
var opad = []
|
||||
var hash
|
||||
ipad[15] = opad[15] = undefined
|
||||
if (bkey.length > 16) {
|
||||
bkey = this.binlMD5(bkey, key.length * 8)
|
||||
}
|
||||
for (i = 0; i < 16; i += 1) {
|
||||
ipad[i] = bkey[i] ^ 0x36363636
|
||||
opad[i] = bkey[i] ^ 0x5c5c5c5c
|
||||
}
|
||||
hash = this.binlMD5(ipad.concat(this.rstr2binl(data)), 512 + data.length * 8)
|
||||
return this.binl2rstr(this.binlMD5(opad.concat(hash), 512 + 128))
|
||||
},
|
||||
rstr2hex(input) {
|
||||
var hexTab = '0123456789abcdef'
|
||||
var output = ''
|
||||
var x
|
||||
var i
|
||||
for (i = 0; i < input.length; i += 1) {
|
||||
x = input.charCodeAt(i)
|
||||
output += hexTab.charAt((x >>> 4) & 0x0f) + hexTab.charAt(x & 0x0f)
|
||||
}
|
||||
return output
|
||||
},
|
||||
str2rstrUTF8(input) {
|
||||
return unescape(encodeURIComponent(input))
|
||||
},
|
||||
rawMD5(s) {
|
||||
return this.rstrMD5(this.str2rstrUTF8(s))
|
||||
},
|
||||
hexMD5(s) {
|
||||
return this.rstr2hex(this.rawMD5(s))
|
||||
},
|
||||
rawHMACMD5(k, d) {
|
||||
return this.rstrHMACMD5(this.str2rstrUTF8(k), str2rstrUTF8(d))
|
||||
},
|
||||
hexHMACMD5(k, d) {
|
||||
return this.rstr2hex(this.rawHMACMD5(k, d))
|
||||
},
|
||||
md5(string, key, raw) {
|
||||
if (!key) {
|
||||
if (!raw) {
|
||||
return this.hexMD5(string)
|
||||
}
|
||||
return this.rawMD5(string)
|
||||
}
|
||||
if (!raw) {
|
||||
return this.hexHMACMD5(key, string)
|
||||
}
|
||||
return this.rawHMACMD5(key, string)
|
||||
},
|
||||
getSig(requestParam, sk, feature, mode) {
|
||||
var sig = null
|
||||
var requestArr = []
|
||||
Object.keys(requestParam)
|
||||
.sort()
|
||||
.forEach(function (key) {
|
||||
requestArr.push(key + '=' + requestParam[key])
|
||||
})
|
||||
if (feature == 'search') {
|
||||
sig = '/ws/place/v1/search?' + requestArr.join('&') + sk
|
||||
}
|
||||
if (feature == 'suggest') {
|
||||
sig = '/ws/place/v1/suggestion?' + requestArr.join('&') + sk
|
||||
}
|
||||
if (feature == 'reverseGeocoder') {
|
||||
sig = '/ws/geocoder/v1/?' + requestArr.join('&') + sk
|
||||
}
|
||||
if (feature == 'geocoder') {
|
||||
sig = '/ws/geocoder/v1/?' + requestArr.join('&') + sk
|
||||
}
|
||||
if (feature == 'getCityList') {
|
||||
sig = '/ws/district/v1/list?' + requestArr.join('&') + sk
|
||||
}
|
||||
if (feature == 'getDistrictByCityId') {
|
||||
sig = '/ws/district/v1/getchildren?' + requestArr.join('&') + sk
|
||||
}
|
||||
if (feature == 'calculateDistance') {
|
||||
sig = '/ws/distance/v1/?' + requestArr.join('&') + sk
|
||||
}
|
||||
if (feature == 'direction') {
|
||||
sig = '/ws/direction/v1/' + mode + '?' + requestArr.join('&') + sk
|
||||
}
|
||||
sig = this.md5(sig)
|
||||
return sig
|
||||
},
|
||||
location2query(data) {
|
||||
if (typeof data == 'string') {
|
||||
return data
|
||||
}
|
||||
var query = ''
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var d = data[i]
|
||||
if (query) {
|
||||
query += ';'
|
||||
}
|
||||
if (d.location) {
|
||||
query = query + d.location.lat + ',' + d.location.lng
|
||||
}
|
||||
if (d.latitude && d.longitude) {
|
||||
query = query + d.latitude + ',' + d.longitude
|
||||
}
|
||||
}
|
||||
return query
|
||||
},
|
||||
rad(d) {
|
||||
return (d * Math.PI) / 180.0
|
||||
},
|
||||
getEndLocation(location) {
|
||||
var to = location.split(';')
|
||||
var endLocation = []
|
||||
for (var i = 0; i < to.length; i++) {
|
||||
endLocation.push({
|
||||
lat: parseFloat(to[i].split(',')[0]),
|
||||
lng: parseFloat(to[i].split(',')[1]),
|
||||
})
|
||||
}
|
||||
return endLocation
|
||||
},
|
||||
getDistance(latFrom, lngFrom, latTo, lngTo) {
|
||||
var radLatFrom = this.rad(latFrom)
|
||||
var radLatTo = this.rad(latTo)
|
||||
var a = radLatFrom - radLatTo
|
||||
var b = this.rad(lngFrom) - this.rad(lngTo)
|
||||
var distance =
|
||||
2 *
|
||||
Math.asin(
|
||||
Math.sqrt(
|
||||
Math.pow(Math.sin(a / 2), 2) +
|
||||
Math.cos(radLatFrom) * Math.cos(radLatTo) * Math.pow(Math.sin(b / 2), 2),
|
||||
),
|
||||
)
|
||||
distance = distance * EARTH_RADIUS
|
||||
distance = Math.round(distance * 10000) / 10000
|
||||
return parseFloat(distance.toFixed(0))
|
||||
},
|
||||
getWXLocation(success, fail, complete) {
|
||||
wx.getLocation({ type: 'gcj02', success: success, fail: fail, complete: complete })
|
||||
},
|
||||
getLocationParam(location) {
|
||||
if (typeof location == 'string') {
|
||||
var locationArr = location.split(',')
|
||||
if (locationArr.length === 2) {
|
||||
location = { latitude: location.split(',')[0], longitude: location.split(',')[1] }
|
||||
} else {
|
||||
location = {}
|
||||
}
|
||||
}
|
||||
return location
|
||||
},
|
||||
polyfillParam(param) {
|
||||
param.success = param.success || function () {}
|
||||
param.fail = param.fail || function () {}
|
||||
param.complete = param.complete || function () {}
|
||||
},
|
||||
checkParamKeyEmpty(param, key) {
|
||||
if (!param[key]) {
|
||||
var errconf = this.buildErrorConfig(
|
||||
ERROR_CONF.PARAM_ERR,
|
||||
ERROR_CONF.PARAM_ERR_MSG + key + '参数格式有误',
|
||||
)
|
||||
param.fail(errconf)
|
||||
param.complete(errconf)
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
checkKeyword(param) {
|
||||
return !this.checkParamKeyEmpty(param, 'keyword')
|
||||
},
|
||||
checkLocation(param) {
|
||||
var location = this.getLocationParam(param.location)
|
||||
if (!location || !location.latitude || !location.longitude) {
|
||||
var errconf = this.buildErrorConfig(
|
||||
ERROR_CONF.PARAM_ERR,
|
||||
ERROR_CONF.PARAM_ERR_MSG + ' location参数格式有误',
|
||||
)
|
||||
param.fail(errconf)
|
||||
param.complete(errconf)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
buildErrorConfig(errCode, errMsg) {
|
||||
return { status: errCode, message: errMsg }
|
||||
},
|
||||
handleData(param, data, feature) {
|
||||
if (feature == 'search') {
|
||||
var searchResult = data.data
|
||||
var searchSimplify = []
|
||||
for (var i = 0; i < searchResult.length; i++) {
|
||||
searchSimplify.push({
|
||||
id: searchResult[i].id || null,
|
||||
title: searchResult[i].title || null,
|
||||
latitude: (searchResult[i].location && searchResult[i].location.lat) || null,
|
||||
longitude: (searchResult[i].location && searchResult[i].location.lng) || null,
|
||||
address: searchResult[i].address || null,
|
||||
category: searchResult[i].category || null,
|
||||
tel: searchResult[i].tel || null,
|
||||
adcode: (searchResult[i].ad_info && searchResult[i].ad_info.adcode) || null,
|
||||
city: (searchResult[i].ad_info && searchResult[i].ad_info.city) || null,
|
||||
district: (searchResult[i].ad_info && searchResult[i].ad_info.district) || null,
|
||||
province: (searchResult[i].ad_info && searchResult[i].ad_info.province) || null,
|
||||
})
|
||||
}
|
||||
param.success(data, { searchResult: searchResult, searchSimplify: searchSimplify })
|
||||
} else if (feature == 'suggest') {
|
||||
var suggestResult = data.data
|
||||
var suggestSimplify = []
|
||||
for (var i = 0; i < suggestResult.length; i++) {
|
||||
suggestSimplify.push({
|
||||
adcode: suggestResult[i].adcode || null,
|
||||
address: suggestResult[i].address || null,
|
||||
category: suggestResult[i].category || null,
|
||||
city: suggestResult[i].city || null,
|
||||
district: suggestResult[i].district || null,
|
||||
id: suggestResult[i].id || null,
|
||||
latitude: (suggestResult[i].location && suggestResult[i].location.lat) || null,
|
||||
longitude: (suggestResult[i].location && suggestResult[i].location.lng) || null,
|
||||
province: suggestResult[i].province || null,
|
||||
title: suggestResult[i].title || null,
|
||||
type: suggestResult[i].type || null,
|
||||
})
|
||||
}
|
||||
param.success(data, { suggestResult: suggestResult, suggestSimplify: suggestSimplify })
|
||||
} else if (feature == 'reverseGeocoder') {
|
||||
var reverseGeocoderResult = data.result
|
||||
var reverseGeocoderSimplify = {
|
||||
address: reverseGeocoderResult.address || null,
|
||||
latitude: (reverseGeocoderResult.location && reverseGeocoderResult.location.lat) || null,
|
||||
longitude: (reverseGeocoderResult.location && reverseGeocoderResult.location.lng) || null,
|
||||
adcode: (reverseGeocoderResult.ad_info && reverseGeocoderResult.ad_info.adcode) || null,
|
||||
city:
|
||||
(reverseGeocoderResult.address_component &&
|
||||
reverseGeocoderResult.address_component.city) ||
|
||||
null,
|
||||
district:
|
||||
(reverseGeocoderResult.address_component &&
|
||||
reverseGeocoderResult.address_component.district) ||
|
||||
null,
|
||||
nation:
|
||||
(reverseGeocoderResult.address_component &&
|
||||
reverseGeocoderResult.address_component.nation) ||
|
||||
null,
|
||||
province:
|
||||
(reverseGeocoderResult.address_component &&
|
||||
reverseGeocoderResult.address_component.province) ||
|
||||
null,
|
||||
street:
|
||||
(reverseGeocoderResult.address_component &&
|
||||
reverseGeocoderResult.address_component.street) ||
|
||||
null,
|
||||
street_number:
|
||||
(reverseGeocoderResult.address_component &&
|
||||
reverseGeocoderResult.address_component.street_number) ||
|
||||
null,
|
||||
recommend:
|
||||
(reverseGeocoderResult.formatted_addresses &&
|
||||
reverseGeocoderResult.formatted_addresses.recommend) ||
|
||||
null,
|
||||
rough:
|
||||
(reverseGeocoderResult.formatted_addresses &&
|
||||
reverseGeocoderResult.formatted_addresses.rough) ||
|
||||
null,
|
||||
}
|
||||
if (reverseGeocoderResult.pois) {
|
||||
var pois = reverseGeocoderResult.pois
|
||||
var poisSimplify = []
|
||||
for (var i = 0; i < pois.length; i++) {
|
||||
poisSimplify.push({
|
||||
id: pois[i].id || null,
|
||||
title: pois[i].title || null,
|
||||
latitude: (pois[i].location && pois[i].location.lat) || null,
|
||||
longitude: (pois[i].location && pois[i].location.lng) || null,
|
||||
address: pois[i].address || null,
|
||||
category: pois[i].category || null,
|
||||
adcode: (pois[i].ad_info && pois[i].ad_info.adcode) || null,
|
||||
city: (pois[i].ad_info && pois[i].ad_info.city) || null,
|
||||
district: (pois[i].ad_info && pois[i].ad_info.district) || null,
|
||||
province: (pois[i].ad_info && pois[i].ad_info.province) || null,
|
||||
})
|
||||
}
|
||||
param.success(data, {
|
||||
reverseGeocoderResult: reverseGeocoderResult,
|
||||
reverseGeocoderSimplify: reverseGeocoderSimplify,
|
||||
pois: pois,
|
||||
poisSimplify: poisSimplify,
|
||||
})
|
||||
} else {
|
||||
param.success(data, {
|
||||
reverseGeocoderResult: reverseGeocoderResult,
|
||||
reverseGeocoderSimplify: reverseGeocoderSimplify,
|
||||
})
|
||||
}
|
||||
} else if (feature == 'geocoder') {
|
||||
var geocoderResult = data.result
|
||||
var geocoderSimplify = {
|
||||
title: geocoderResult.title || null,
|
||||
latitude: (geocoderResult.location && geocoderResult.location.lat) || null,
|
||||
longitude: (geocoderResult.location && geocoderResult.location.lng) || null,
|
||||
adcode: (geocoderResult.ad_info && geocoderResult.ad_info.adcode) || null,
|
||||
province:
|
||||
(geocoderResult.address_components && geocoderResult.address_components.province) || null,
|
||||
city: (geocoderResult.address_components && geocoderResult.address_components.city) || null,
|
||||
district:
|
||||
(geocoderResult.address_components && geocoderResult.address_components.district) || null,
|
||||
street:
|
||||
(geocoderResult.address_components && geocoderResult.address_components.street) || null,
|
||||
street_number:
|
||||
(geocoderResult.address_components && geocoderResult.address_components.street_number) ||
|
||||
null,
|
||||
level: geocoderResult.level || null,
|
||||
}
|
||||
param.success(data, { geocoderResult: geocoderResult, geocoderSimplify: geocoderSimplify })
|
||||
} else if (feature == 'getCityList') {
|
||||
var provinceResult = data.result[0]
|
||||
var cityResult = data.result[1]
|
||||
var districtResult = data.result[2]
|
||||
param.success(data, {
|
||||
provinceResult: provinceResult,
|
||||
cityResult: cityResult,
|
||||
districtResult: districtResult,
|
||||
})
|
||||
} else if (feature == 'getDistrictByCityId') {
|
||||
var districtByCity = data.result[0]
|
||||
param.success(data, districtByCity)
|
||||
} else if (feature == 'calculateDistance') {
|
||||
var calculateDistanceResult = data.result.elements
|
||||
var distance = []
|
||||
for (var i = 0; i < calculateDistanceResult.length; i++) {
|
||||
distance.push(calculateDistanceResult[i].distance)
|
||||
}
|
||||
param.success(data, { calculateDistanceResult: calculateDistanceResult, distance: distance })
|
||||
} else if (feature == 'direction') {
|
||||
var direction = data.result.routes
|
||||
param.success(data, direction)
|
||||
} else {
|
||||
param.success(data)
|
||||
}
|
||||
},
|
||||
buildWxRequestConfig(param, options, feature) {
|
||||
var that = this
|
||||
options.header = { 'content-type': 'application/json' }
|
||||
options.method = 'GET'
|
||||
options.success = function (res) {
|
||||
var data = res.data
|
||||
if (data.status === 0) {
|
||||
that.handleData(param, data, feature)
|
||||
} else {
|
||||
param.fail(data)
|
||||
}
|
||||
}
|
||||
options.fail = function (res) {
|
||||
res.statusCode = ERROR_CONF.WX_ERR_CODE
|
||||
param.fail(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg))
|
||||
}
|
||||
options.complete = function (res) {
|
||||
var statusCode = +res.statusCode
|
||||
switch (statusCode) {
|
||||
case ERROR_CONF.WX_ERR_CODE: {
|
||||
param.complete(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg))
|
||||
break
|
||||
}
|
||||
case ERROR_CONF.WX_OK_CODE: {
|
||||
var data = res.data
|
||||
if (data.status === 0) {
|
||||
param.complete(data)
|
||||
} else {
|
||||
param.complete(that.buildErrorConfig(data.status, data.message))
|
||||
}
|
||||
break
|
||||
}
|
||||
default: {
|
||||
param.complete(that.buildErrorConfig(ERROR_CONF.SYSTEM_ERR, ERROR_CONF.SYSTEM_ERR_MSG))
|
||||
}
|
||||
}
|
||||
}
|
||||
return options
|
||||
},
|
||||
locationProcess(param, locationsuccess, locationfail, locationcomplete) {
|
||||
var that = this
|
||||
locationfail =
|
||||
locationfail ||
|
||||
function (res) {
|
||||
res.statusCode = ERROR_CONF.WX_ERR_CODE
|
||||
param.fail(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg))
|
||||
}
|
||||
locationcomplete =
|
||||
locationcomplete ||
|
||||
function (res) {
|
||||
if (res.statusCode == ERROR_CONF.WX_ERR_CODE) {
|
||||
param.complete(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg))
|
||||
}
|
||||
}
|
||||
if (!param.location) {
|
||||
that.getWXLocation(locationsuccess, locationfail, locationcomplete)
|
||||
} else if (that.checkLocation(param)) {
|
||||
var location = Utils.getLocationParam(param.location)
|
||||
locationsuccess(location)
|
||||
}
|
||||
},
|
||||
}
|
||||
class QQMapWX {
|
||||
constructor(options) {
|
||||
if (!options.key) {
|
||||
throw Error('key值不能为空')
|
||||
}
|
||||
this.key = options.key
|
||||
}
|
||||
search(options) {
|
||||
var that = this
|
||||
options = options || {}
|
||||
Utils.polyfillParam(options)
|
||||
if (!Utils.checkKeyword(options)) {
|
||||
return
|
||||
}
|
||||
var requestParam = {
|
||||
keyword: options.keyword,
|
||||
orderby: options.orderby || '_distance',
|
||||
page_size: options.page_size || 10,
|
||||
page_index: options.page_index || 1,
|
||||
output: 'json',
|
||||
key: that.key,
|
||||
}
|
||||
if (options.address_format) {
|
||||
requestParam.address_format = options.address_format
|
||||
}
|
||||
if (options.filter) {
|
||||
requestParam.filter = options.filter
|
||||
}
|
||||
var distance = options.distance || '1000'
|
||||
var auto_extend = options.auto_extend || 1
|
||||
var region = null
|
||||
var rectangle = null
|
||||
if (options.region) {
|
||||
region = options.region
|
||||
}
|
||||
if (options.rectangle) {
|
||||
rectangle = options.rectangle
|
||||
}
|
||||
var locationsuccess = function (result) {
|
||||
if (region && !rectangle) {
|
||||
requestParam.boundary =
|
||||
'region(' +
|
||||
region +
|
||||
',' +
|
||||
auto_extend +
|
||||
',' +
|
||||
result.latitude +
|
||||
',' +
|
||||
result.longitude +
|
||||
')'
|
||||
if (options.sig) {
|
||||
requestParam.sig = Utils.getSig(requestParam, options.sig, 'search')
|
||||
}
|
||||
} else if (rectangle && !region) {
|
||||
requestParam.boundary = 'rectangle(' + rectangle + ')'
|
||||
if (options.sig) {
|
||||
requestParam.sig = Utils.getSig(requestParam, options.sig, 'search')
|
||||
}
|
||||
} else {
|
||||
requestParam.boundary =
|
||||
'nearby(' +
|
||||
result.latitude +
|
||||
',' +
|
||||
result.longitude +
|
||||
',' +
|
||||
distance +
|
||||
',' +
|
||||
auto_extend +
|
||||
')'
|
||||
if (options.sig) {
|
||||
requestParam.sig = Utils.getSig(requestParam, options.sig, 'search')
|
||||
}
|
||||
}
|
||||
wx.request(
|
||||
Utils.buildWxRequestConfig(options, { url: URL_SEARCH, data: requestParam }, 'search'),
|
||||
)
|
||||
}
|
||||
Utils.locationProcess(options, locationsuccess)
|
||||
}
|
||||
getSuggestion(options) {
|
||||
var that = this
|
||||
options = options || {}
|
||||
Utils.polyfillParam(options)
|
||||
if (!Utils.checkKeyword(options)) {
|
||||
return
|
||||
}
|
||||
var requestParam = {
|
||||
keyword: options.keyword,
|
||||
region: options.region || '全国',
|
||||
region_fix: options.region_fix || 0,
|
||||
policy: options.policy || 0,
|
||||
page_size: options.page_size || 10,
|
||||
page_index: options.page_index || 1,
|
||||
get_subpois: options.get_subpois || 0,
|
||||
output: 'json',
|
||||
key: that.key,
|
||||
}
|
||||
if (options.address_format) {
|
||||
requestParam.address_format = options.address_format
|
||||
}
|
||||
if (options.filter) {
|
||||
requestParam.filter = options.filter
|
||||
}
|
||||
if (options.location) {
|
||||
var locationsuccess = function (result) {
|
||||
requestParam.location = result.latitude + ',' + result.longitude
|
||||
if (options.sig) {
|
||||
requestParam.sig = Utils.getSig(requestParam, options.sig, 'suggest')
|
||||
}
|
||||
wx.request(
|
||||
Utils.buildWxRequestConfig(
|
||||
options,
|
||||
{ url: URL_SUGGESTION, data: requestParam },
|
||||
'suggest',
|
||||
),
|
||||
)
|
||||
}
|
||||
Utils.locationProcess(options, locationsuccess)
|
||||
} else {
|
||||
if (options.sig) {
|
||||
requestParam.sig = Utils.getSig(requestParam, options.sig, 'suggest')
|
||||
}
|
||||
wx.request(
|
||||
Utils.buildWxRequestConfig(options, { url: URL_SUGGESTION, data: requestParam }, 'suggest'),
|
||||
)
|
||||
}
|
||||
}
|
||||
reverseGeocoder(options) {
|
||||
var that = this
|
||||
options = options || {}
|
||||
Utils.polyfillParam(options)
|
||||
var requestParam = {
|
||||
coord_type: options.coord_type || 5,
|
||||
get_poi: options.get_poi || 0,
|
||||
output: 'json',
|
||||
key: that.key,
|
||||
}
|
||||
if (options.poi_options) {
|
||||
requestParam.poi_options = options.poi_options
|
||||
}
|
||||
var locationsuccess = function (result) {
|
||||
requestParam.location = result.latitude + ',' + result.longitude
|
||||
if (options.sig) {
|
||||
requestParam.sig = Utils.getSig(requestParam, options.sig, 'reverseGeocoder')
|
||||
}
|
||||
wx.request(
|
||||
Utils.buildWxRequestConfig(
|
||||
options,
|
||||
{ url: URL_GET_GEOCODER, data: requestParam },
|
||||
'reverseGeocoder',
|
||||
),
|
||||
)
|
||||
}
|
||||
Utils.locationProcess(options, locationsuccess)
|
||||
}
|
||||
geocoder(options) {
|
||||
var that = this
|
||||
options = options || {}
|
||||
Utils.polyfillParam(options)
|
||||
if (Utils.checkParamKeyEmpty(options, 'address')) {
|
||||
return
|
||||
}
|
||||
var requestParam = { address: options.address, output: 'json', key: that.key }
|
||||
if (options.region) {
|
||||
requestParam.region = options.region
|
||||
}
|
||||
if (options.sig) {
|
||||
requestParam.sig = Utils.getSig(requestParam, options.sig, 'geocoder')
|
||||
}
|
||||
wx.request(
|
||||
Utils.buildWxRequestConfig(
|
||||
options,
|
||||
{ url: URL_GET_GEOCODER, data: requestParam },
|
||||
'geocoder',
|
||||
),
|
||||
)
|
||||
}
|
||||
getCityList(options) {
|
||||
var that = this
|
||||
options = options || {}
|
||||
Utils.polyfillParam(options)
|
||||
var requestParam = { output: 'json', key: that.key }
|
||||
if (options.sig) {
|
||||
requestParam.sig = Utils.getSig(requestParam, options.sig, 'getCityList')
|
||||
}
|
||||
wx.request(
|
||||
Utils.buildWxRequestConfig(
|
||||
options,
|
||||
{ url: URL_CITY_LIST, data: requestParam },
|
||||
'getCityList',
|
||||
),
|
||||
)
|
||||
}
|
||||
getDistrictByCityId(options) {
|
||||
var that = this
|
||||
options = options || {}
|
||||
Utils.polyfillParam(options)
|
||||
if (Utils.checkParamKeyEmpty(options, 'id')) {
|
||||
return
|
||||
}
|
||||
var requestParam = { id: options.id || '', output: 'json', key: that.key }
|
||||
if (options.sig) {
|
||||
requestParam.sig = Utils.getSig(requestParam, options.sig, 'getDistrictByCityId')
|
||||
}
|
||||
wx.request(
|
||||
Utils.buildWxRequestConfig(
|
||||
options,
|
||||
{ url: URL_AREA_LIST, data: requestParam },
|
||||
'getDistrictByCityId',
|
||||
),
|
||||
)
|
||||
}
|
||||
calculateDistance(options) {
|
||||
var that = this
|
||||
options = options || {}
|
||||
Utils.polyfillParam(options)
|
||||
if (Utils.checkParamKeyEmpty(options, 'to')) {
|
||||
return
|
||||
}
|
||||
var requestParam = {
|
||||
mode: options.mode || 'walking',
|
||||
to: Utils.location2query(options.to),
|
||||
output: 'json',
|
||||
key: that.key,
|
||||
}
|
||||
if (options.from) {
|
||||
options.location = options.from
|
||||
}
|
||||
if (requestParam.mode == 'straight') {
|
||||
var locationsuccess = function (result) {
|
||||
var locationTo = Utils.getEndLocation(requestParam.to)
|
||||
var data = { message: 'query ok', result: { elements: [] }, status: 0 }
|
||||
for (var i = 0; i < locationTo.length; i++) {
|
||||
data.result.elements.push({
|
||||
distance: Utils.getDistance(
|
||||
result.latitude,
|
||||
result.longitude,
|
||||
locationTo[i].lat,
|
||||
locationTo[i].lng,
|
||||
),
|
||||
duration: 0,
|
||||
from: { lat: result.latitude, lng: result.longitude },
|
||||
to: { lat: locationTo[i].lat, lng: locationTo[i].lng },
|
||||
})
|
||||
}
|
||||
var calculateResult = data.result.elements
|
||||
var distanceResult = []
|
||||
for (var i = 0; i < calculateResult.length; i++) {
|
||||
distanceResult.push(calculateResult[i].distance)
|
||||
}
|
||||
return options.success(data, {
|
||||
calculateResult: calculateResult,
|
||||
distanceResult: distanceResult,
|
||||
})
|
||||
}
|
||||
Utils.locationProcess(options, locationsuccess)
|
||||
} else {
|
||||
var locationsuccess = function (result) {
|
||||
requestParam.from = result.latitude + ',' + result.longitude
|
||||
if (options.sig) {
|
||||
requestParam.sig = Utils.getSig(requestParam, options.sig, 'calculateDistance')
|
||||
}
|
||||
wx.request(
|
||||
Utils.buildWxRequestConfig(
|
||||
options,
|
||||
{ url: URL_DISTANCE, data: requestParam },
|
||||
'calculateDistance',
|
||||
),
|
||||
)
|
||||
}
|
||||
Utils.locationProcess(options, locationsuccess)
|
||||
}
|
||||
}
|
||||
direction(options) {
|
||||
var that = this
|
||||
options = options || {}
|
||||
Utils.polyfillParam(options)
|
||||
if (Utils.checkParamKeyEmpty(options, 'to')) {
|
||||
return
|
||||
}
|
||||
var requestParam = { output: 'json', key: that.key }
|
||||
if (typeof options.to == 'string') {
|
||||
requestParam.to = options.to
|
||||
} else {
|
||||
requestParam.to = options.to.latitude + ',' + options.to.longitude
|
||||
}
|
||||
var SET_URL_DIRECTION = null
|
||||
options.mode = options.mode || MODE.driving
|
||||
SET_URL_DIRECTION = URL_DIRECTION + options.mode
|
||||
if (options.from) {
|
||||
options.location = options.from
|
||||
}
|
||||
if (options.mode == MODE.driving) {
|
||||
if (options.from_poi) {
|
||||
requestParam.from_poi = options.from_poi
|
||||
}
|
||||
if (options.heading) {
|
||||
requestParam.heading = options.heading
|
||||
}
|
||||
if (options.speed) {
|
||||
requestParam.speed = options.speed
|
||||
}
|
||||
if (options.accuracy) {
|
||||
requestParam.accuracy = options.accuracy
|
||||
}
|
||||
if (options.road_type) {
|
||||
requestParam.road_type = options.road_type
|
||||
}
|
||||
if (options.to_poi) {
|
||||
requestParam.to_poi = options.to_poi
|
||||
}
|
||||
if (options.from_track) {
|
||||
requestParam.from_track = options.from_track
|
||||
}
|
||||
if (options.waypoints) {
|
||||
requestParam.waypoints = options.waypoints
|
||||
}
|
||||
if (options.policy) {
|
||||
requestParam.policy = options.policy
|
||||
}
|
||||
if (options.plate_number) {
|
||||
requestParam.plate_number = options.plate_number
|
||||
}
|
||||
}
|
||||
if (options.mode == MODE.transit) {
|
||||
if (options.departure_time) {
|
||||
requestParam.departure_time = options.departure_time
|
||||
}
|
||||
if (options.policy) {
|
||||
requestParam.policy = options.policy
|
||||
}
|
||||
}
|
||||
var locationsuccess = function (result) {
|
||||
requestParam.from = result.latitude + ',' + result.longitude
|
||||
if (options.sig) {
|
||||
requestParam.sig = Utils.getSig(requestParam, options.sig, 'direction', options.mode)
|
||||
}
|
||||
wx.request(
|
||||
Utils.buildWxRequestConfig(
|
||||
options,
|
||||
{ url: SET_URL_DIRECTION, data: requestParam },
|
||||
'direction',
|
||||
),
|
||||
)
|
||||
}
|
||||
Utils.locationProcess(options, locationsuccess)
|
||||
}
|
||||
}
|
||||
export default QQMapWX
|
@ -0,0 +1,19 @@
|
||||
import { createSSRApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
|
||||
// 导入 pinia 实例
|
||||
import pinia from './stores'
|
||||
|
||||
|
||||
export function createApp() {
|
||||
// 创建 vue 实例
|
||||
const app = createSSRApp(App)
|
||||
|
||||
// 使用 pinia
|
||||
app.use(pinia)
|
||||
|
||||
|
||||
return {
|
||||
app,
|
||||
}
|
||||
}
|
@ -0,0 +1,131 @@
|
||||
{
|
||||
"name" : "合力机械小程序",
|
||||
"appid" : "__UNI__F93316F",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
// 忽略版本检查提示框
|
||||
"compatible" : {
|
||||
"ignoreVersion" : true
|
||||
},
|
||||
"usingComponents" : true,
|
||||
"nvueStyleCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules" : {},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
/* android打包配置 */
|
||||
"android" : {
|
||||
"permissions" : [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<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\"/>"
|
||||
]
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {
|
||||
"dSYMs" : false
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {
|
||||
"ad" : {}
|
||||
},
|
||||
"icons" : {
|
||||
"android" : {
|
||||
"hdpi" : "unpackage/res/icons/72x72.png",
|
||||
"xhdpi" : "unpackage/res/icons/96x96.png",
|
||||
"xxhdpi" : "unpackage/res/icons/144x144.png",
|
||||
"xxxhdpi" : "unpackage/res/icons/192x192.png"
|
||||
},
|
||||
"ios" : {
|
||||
"appstore" : "unpackage/res/icons/1024x1024.png",
|
||||
"ipad" : {
|
||||
"app" : "unpackage/res/icons/76x76.png",
|
||||
"app@2x" : "unpackage/res/icons/152x152.png",
|
||||
"notification" : "unpackage/res/icons/20x20.png",
|
||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||
"proapp@2x" : "unpackage/res/icons/167x167.png",
|
||||
"settings" : "unpackage/res/icons/29x29.png",
|
||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||
"spotlight" : "unpackage/res/icons/40x40.png",
|
||||
"spotlight@2x" : "unpackage/res/icons/80x80.png"
|
||||
},
|
||||
"iphone" : {
|
||||
"app@2x" : "unpackage/res/icons/120x120.png",
|
||||
"app@3x" : "unpackage/res/icons/180x180.png",
|
||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||
"notification@3x" : "unpackage/res/icons/60x60.png",
|
||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||
"settings@3x" : "unpackage/res/icons/87x87.png",
|
||||
"spotlight@2x" : "unpackage/res/icons/80x80.png",
|
||||
"spotlight@3x" : "unpackage/res/icons/120x120.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"splashscreen" : {
|
||||
"androidStyle" : "default"
|
||||
}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
"quickapp" : {},
|
||||
/* 网页端特有配置 */
|
||||
"h5" : {
|
||||
"router" : {
|
||||
// 路由基础路径。默认为 /
|
||||
"base" : "./"
|
||||
}
|
||||
},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "wxa29fe397274614b5",
|
||||
"setting" : {
|
||||
"minified" : true,
|
||||
"urlCheck" : true,
|
||||
"es6" : true,
|
||||
"postcss" : true
|
||||
},
|
||||
// 启用组件按需注入
|
||||
"lazyCodeLoading" : "requiredComponents",
|
||||
"usingComponents" : true,
|
||||
"uniStatistics" : {
|
||||
"enable" : true
|
||||
}
|
||||
},
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-baidu" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-toutiao" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
},
|
||||
"vueVersion" : "3",
|
||||
"fallbackLocale" : "zh-Hans"
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
<!--
|
||||
* @Author: 王文杰
|
||||
* @Date: 2024-03-04 14:13:16
|
||||
* @LastEditors: jevononlie 728254585@qq.com
|
||||
* @LastEditTime: 2024-04-18 14:48:48
|
||||
* @FilePath: /app-nx-personal/src/pages/index/components/CategoryPanel.vue
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
-->
|
||||
<script setup lang="ts">
|
||||
import type { CategoryItem } from '@/types/home'
|
||||
|
||||
// 定义 props 接收数据
|
||||
defineProps<{
|
||||
list: Object[]
|
||||
}>()
|
||||
|
||||
const handleToBooking = (item: Object) => {
|
||||
if (item.auth) {
|
||||
const path = item.path
|
||||
const url = `/pages/${path}/${path}`
|
||||
uni.navigateTo({
|
||||
url,
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="category">
|
||||
<template v-if="list.length">
|
||||
<view class="category-item" hover-class="none" v-for="item in list" :key="item.path"
|
||||
@click="handleToBooking(item)">
|
||||
<image v-if="item.auth" class="icon" :src="item.imgUrl" mode="scaleToFill"></image>
|
||||
<image v-else class="icon" :src="item.defaultImgUrl" mode="scaleToFill"></image>
|
||||
</view>
|
||||
</template>
|
||||
<view v-else class="empty-data">
|
||||
<image class="icon" src="/static/images/home-empty.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
@import '../styles/category.scss';
|
||||
</style>
|
@ -0,0 +1,93 @@
|
||||
<!--
|
||||
* @Author: 王文杰
|
||||
* @Date: 2024-03-04 14:13:16
|
||||
* @LastEditors: jevononlie 728254585@qq.com
|
||||
* @LastEditTime: 2024-04-16 15:14:30
|
||||
* @FilePath: /app-nx-personal/src/pages/index/components/CustomNavbar.vue
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
-->
|
||||
<script setup lang="ts">
|
||||
// 获取屏幕边界到安全区域距离
|
||||
const { safeAreaInsets } = uni.getSystemInfoSync()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="navbar" :style="{ paddingTop: safeAreaInsets!.top + 10 + 'px' }">
|
||||
<!-- logo文字 -->
|
||||
<view class="logo">
|
||||
<image class="logo-image" src="/static/images/logo.png" mode="'aspectFit'"></image>
|
||||
<!-- <view class="logo-text">
|
||||
<view class="logo-title">杭州合立</view>
|
||||
<view class="logo-desc">HANGZHOU HRLI</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- 搜索条 -->
|
||||
<!-- <view class="search">
|
||||
<text class="icon-search">搜索商品</text>
|
||||
<text class="icon-scan"></text>
|
||||
</view> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/* 自定义导航条 */
|
||||
.navbar {
|
||||
background-size: cover;
|
||||
background: #E8EEF5;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-top: 20px;
|
||||
.logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 64rpx;
|
||||
padding-left: 30rpx;
|
||||
padding-bottom: 10rpx;
|
||||
.logo-image {
|
||||
width: 214rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
.logo-text {
|
||||
flex: 1;
|
||||
line-height: 28rpx;
|
||||
color: #3D3D3D;
|
||||
margin: 2rpx 0 0 20rpx;
|
||||
padding-left: 20rpx;
|
||||
// border-left: 1rpx solid #fff;
|
||||
font-size: 26rpx;
|
||||
.logo-title {
|
||||
font-size: 28rpx;
|
||||
color: #3D3D3D;
|
||||
font-weight: 600;
|
||||
}
|
||||
.logo-desc {
|
||||
font-size: 16rpx;
|
||||
color: #3D3D3D;
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.search {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 10rpx 0 26rpx;
|
||||
height: 64rpx;
|
||||
margin: 16rpx 20rpx;
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
border-radius: 32rpx;
|
||||
background-color: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
.icon-search {
|
||||
&::before {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
.icon-scan {
|
||||
font-size: 30rpx;
|
||||
padding: 15rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,19 @@
|
||||
<script setup lang="ts">
|
||||
//
|
||||
</script>
|
||||
<template>
|
||||
<view class="copy-right">Copyright ©上海长江云息数字科技有限公司,All Rights Reserved. 专注工业信息化-供应链解决方案</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
.copy-right {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: 50rpx;
|
||||
width: 600rpx;
|
||||
transform: translate(-50%, -50%);
|
||||
text-align: center;
|
||||
color: #B3BEC9;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,98 @@
|
||||
<script setup lang="ts">
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||
import { useLoginStore } from '@/stores/modules/login'
|
||||
import { computed, ref, reactive } from 'vue'
|
||||
import CustomNavbar from './components/CustomNavbar.vue'
|
||||
import CategoryPanel from './components/CategoryPanel.vue'
|
||||
import footRight from './components/footRight.vue'
|
||||
import PageSkeleton from './components/PageSkeleton.vue'
|
||||
import { getHomeCategoryAPI } from '@/services/home'
|
||||
// 获取前台分类数据
|
||||
const categoryList = ref([
|
||||
{
|
||||
path: 'unqualifiedNotification',
|
||||
name: '品质异常通知',
|
||||
auth: false,
|
||||
imgUrl: '/static/images/unqualifiedNotification.png',
|
||||
defaultImgUrl: '/static/images/unqualifiedNotification-default.png',
|
||||
},
|
||||
{
|
||||
path: 'productionReport',
|
||||
name: '生产报工',
|
||||
auth: false,
|
||||
imgUrl: '/static/images/productionReport.png',
|
||||
defaultImgUrl: '/static/images/productionReport-default.png',
|
||||
}
|
||||
])
|
||||
const loginStore = useLoginStore()
|
||||
const isLogin = computed(() => {
|
||||
const accessToken = loginStore.userInfo?.accessToken
|
||||
const storage_token = uni.getStorageSync('storage_userInfo')?.accessToken
|
||||
return !!accessToken || !!storage_token
|
||||
})
|
||||
// 是否加载中标记
|
||||
const isLoading = ref(false)
|
||||
// 页面加载
|
||||
onShow(async() => {
|
||||
if (isLogin.value) {
|
||||
await getHomeCategory()
|
||||
} else {
|
||||
categoryList.value.forEach((e) => {
|
||||
e.auth = true
|
||||
})
|
||||
}
|
||||
})
|
||||
const getHomeCategory = async () => {
|
||||
isLoading.value = true
|
||||
const params = {}
|
||||
const data = await getHomeCategoryAPI(params)
|
||||
const menus = data?.menus.find((e) => e.path == '/applet')?.children || []
|
||||
if (menus.length) {
|
||||
const arr = []
|
||||
categoryList.value.forEach((e) => {
|
||||
const target = menus.find((q) => q.path == e.path)
|
||||
e.auth = !!target
|
||||
})
|
||||
}
|
||||
if (loginStore.userInfo.userId) {
|
||||
const obj = {
|
||||
...loginStore.userInfo,
|
||||
nickname: data.user.nickname
|
||||
}
|
||||
loginStore.setInfo(obj)
|
||||
}
|
||||
isLoading.value = false
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<view class="viewport">
|
||||
<template v-if="isLoading">
|
||||
<PageSkeleton />
|
||||
</template>
|
||||
<template v-else>
|
||||
<CustomNavbar />
|
||||
<view class="cont">
|
||||
<CategoryPanel :list="categoryList" />
|
||||
<footRight />
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background-color: #F8FAFD;
|
||||
}
|
||||
|
||||
.viewport {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
margin-bottom: 300rpx;
|
||||
.cont {
|
||||
//margin: 100rpx 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -0,0 +1,30 @@
|
||||
.category {
|
||||
padding: 32rpx 0rpx;
|
||||
margin: 16rpx;
|
||||
border-radius: 4rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.category-item {
|
||||
border-radius: 16rpx;
|
||||
margin: 12rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0px 3px 12px 0px rgba(63, 112, 157, 0.5);
|
||||
width: 45%;
|
||||
.icon {
|
||||
width: 330rpx;
|
||||
height: 240rpx;
|
||||
}
|
||||
}
|
||||
.empty-data {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
width: 480rpx;
|
||||
height: 528rpx;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
.category {
|
||||
padding: 32rpx 0rpx;
|
||||
margin: 16rpx;
|
||||
border-radius: 4rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.category .category-item {
|
||||
border-radius: 16rpx;
|
||||
margin: 12rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0px 3px 12px 0px rgba(63, 112, 157, 0.5);
|
||||
width: 45%;
|
||||
}
|
||||
|
||||
.category .category-item .icon {
|
||||
width: 330rpx;
|
||||
height: 240rpx;
|
||||
}
|
||||
|
||||
.category .empty-data {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
width: 480rpx;
|
||||
height: 528rpx;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
@ -0,0 +1,238 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, computed } from 'vue'
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
import { useLoginStore } from '@/stores/modules/login'
|
||||
import { getUserInfoAPI } from '@/services/my'
|
||||
import { postLogoutAPI } from '@/services/login'
|
||||
import CustomNavbar from '../index/components/CustomNavbar.vue'
|
||||
// 获取屏幕边界到安全区域距离
|
||||
const { safeAreaInsets } = uni.getSystemInfoSync()
|
||||
|
||||
const userStore = useLoginStore()
|
||||
const isLogin= computed(() => {
|
||||
const accessToken = userStore.userInfo?.accessToken
|
||||
const storage_token = uni.getStorageSync('login').userInfo?.accessToken
|
||||
return accessToken || storage_token
|
||||
})
|
||||
|
||||
const handleEdit = () => {
|
||||
uni.navigateTo({ url: '/pages/password/password' })
|
||||
}
|
||||
const handleLogut = async () => {
|
||||
const params = {}
|
||||
const data = await postLogoutAPI(params)
|
||||
userStore.clearInfo()
|
||||
uni.clearStorage()
|
||||
uni.navigateTo({ url: '/pages/login/login' })
|
||||
}
|
||||
onShow(async () => {
|
||||
await getUserInfoData()
|
||||
})
|
||||
const isLoading = ref(false)
|
||||
let userInfo = ref({})
|
||||
const getUserInfoData = async () => {
|
||||
isLoading.value = true
|
||||
const userId = userStore.userInfo.userId
|
||||
const params = {
|
||||
id: userId,
|
||||
}
|
||||
const data = await getUserInfoAPI(params)
|
||||
console.log(data)
|
||||
const str = data.mobile || ''
|
||||
data.mobile = str.substr(0, 3) + '****' + str.substr(7)
|
||||
data.avatar = data.avatar || '/static/images/my.avatar.png'
|
||||
userInfo.value = data
|
||||
isLoading.value = false
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="viewport">
|
||||
<!-- 自定义导航栏 -->
|
||||
<CustomNavbar />
|
||||
<view class="profile">
|
||||
<view class="overview" v-if="isLogin">
|
||||
<navigator url="/pagesMember/profile/profile" hover-class="none">
|
||||
<image class="avatar" :src="userInfo.avatar" mode="aspectFill"></image>
|
||||
</navigator>
|
||||
<view class="meta">
|
||||
<view class="nickname">
|
||||
{{ userInfo.nickname }}
|
||||
</view>
|
||||
<view class="mobile">
|
||||
{{ userInfo.mobile }}
|
||||
</view>
|
||||
<!-- <navigator class="extra" url="/pagesMember/profile/profile" hover-class="none">
|
||||
<text class="update">更新头像昵称</text>
|
||||
</navigator> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="overview" v-else>
|
||||
<navigator url="/pages/login/login" hover-class="none">
|
||||
<image class="avatar gray" mode="aspectFill" src="/static/images/my.avatar.png"></image>
|
||||
</navigator>
|
||||
<view class="meta">
|
||||
<navigator url="/pages/login/login" hover-class="none" class="nickname">
|
||||
未登录
|
||||
</navigator>
|
||||
<view class="extra">
|
||||
<text class="tips">点击登录账号</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="empty">
|
||||
<image class="icon" src="/static/images/my-empty.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="action" v-if="isLogin">
|
||||
<view class="edit" @click="handleEdit">修改密码</view>
|
||||
<view class="logout" @click="handleLogut">退出登录</view>
|
||||
</view>
|
||||
<view class="foot">
|
||||
<view class="copy-right">Copyright ©上海长江云息数字科技有限公司,All Rights Reserved. 专注工业信息化-供应链解决方案</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background: #F8FAFD;
|
||||
}
|
||||
|
||||
.viewport {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* 用户信息 */
|
||||
.profile {
|
||||
position: relative;
|
||||
padding-top: 50rpx;
|
||||
|
||||
.overview {
|
||||
display: flex;
|
||||
height: 120rpx;
|
||||
padding: 0 36rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.gray {
|
||||
filter: grayscale(100%);
|
||||
}
|
||||
|
||||
.meta {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
line-height: 30rpx;
|
||||
padding: 16rpx 0;
|
||||
margin-left: 20rpx;
|
||||
|
||||
.nickname,
|
||||
.mobile {
|
||||
max-width: 280rpx;
|
||||
margin-bottom: 16rpx;
|
||||
font-size: 30rpx;
|
||||
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: #0D0D26;
|
||||
}
|
||||
|
||||
.extra {
|
||||
display: flex;
|
||||
font-size: 20rpx;
|
||||
color: #95969D;
|
||||
}
|
||||
}
|
||||
|
||||
.tips {
|
||||
font-size: 22rpx;
|
||||
}
|
||||
|
||||
.update {
|
||||
padding: 3rpx 10rpx 1rpx;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
border: 1rpx solid rgba(255, 255, 255, 0.8);
|
||||
margin-right: 10rpx;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
|
||||
.settings {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 40rpx;
|
||||
font-size: 30rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.empty {
|
||||
margin: 40rpx 0;
|
||||
width: 750rpx;
|
||||
height: 538rpx;
|
||||
|
||||
.icon {}
|
||||
}
|
||||
|
||||
.action {
|
||||
.edit {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: linear-gradient(157deg, #2EACE6 -3%, #356899 90%);
|
||||
box-shadow: 0px 3px 12px 0px rgba(63, 112, 157, 0.5);
|
||||
color: #fff;
|
||||
padding: 20rpx 40rpx;
|
||||
border: 2rpx solid #356899;
|
||||
width: 400rpx;
|
||||
margin: 0 auto;
|
||||
border-radius: 10rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.logout {
|
||||
width: 400rpx;
|
||||
margin: 30rpx auto;
|
||||
border-radius: 10rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #356899;
|
||||
padding: 20rpx 40rpx;
|
||||
border: 2rpx solid #356899;
|
||||
font-weight: 600;
|
||||
box-shadow: 0px 3px 12px 0px rgba(63, 112, 157, 0.5);
|
||||
}
|
||||
}
|
||||
.foot {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: 20rpx;
|
||||
width: 600rpx;
|
||||
transform: translate(-50%, 0%);
|
||||
text-align: center;
|
||||
color: #B3BEC9;
|
||||
font-size: 20rpx;
|
||||
.copy-right {
|
||||
text-align: center;
|
||||
color: #B3BEC9;
|
||||
font-size: 20rpx;
|
||||
margin: 30rpx 0rpx 60rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,23 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
const url = ref('')
|
||||
|
||||
onLoad((options) => {
|
||||
url.value = options.url
|
||||
})
|
||||
</script>
|
||||
<template>
|
||||
<view class="viewport">
|
||||
<web-view :src="url"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
<style lang="scss">
|
||||
page {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.viewport {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,151 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import dataItem from './components/dataItem.vue'
|
||||
// 定义 porps
|
||||
const props = defineProps<{
|
||||
state: string
|
||||
}>()
|
||||
// tabs 数据
|
||||
const orderTabs = ref([
|
||||
{ orderState: '0,1', title: '未完成', isRender: false },
|
||||
{ orderState: '2', title: '已完成', isRender: false },
|
||||
])
|
||||
// 高亮下标
|
||||
const activeIndex = ref(0)
|
||||
const handleIndexChange = (index: any) => {
|
||||
orderTabs.value.forEach((e) => {
|
||||
e.isRender = false
|
||||
})
|
||||
activeIndex.value = index
|
||||
orderTabs.value[index].isRender = true
|
||||
}
|
||||
onLoad(async (options) => {
|
||||
if (options.state) {
|
||||
// 高亮下标
|
||||
orderTabs.value.forEach((e, index) => {
|
||||
e.isRender = e.orderState == options.state
|
||||
if (e.isRender) {
|
||||
activeIndex.value = index
|
||||
}
|
||||
})
|
||||
} else {
|
||||
orderTabs.value.forEach((e, index) => {
|
||||
e.isRender = e.orderState == '0,1'
|
||||
if (e.isRender) {
|
||||
activeIndex.value = index
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="viewport">
|
||||
<view class="tabs">
|
||||
<text class="item" :class="{ active: activeIndex == index }" v-for="(item, index) in orderTabs" :key="item.title"
|
||||
@tap="handleIndexChange(index)">
|
||||
{{ item.title }}
|
||||
</text>
|
||||
<!-- 游标 -->
|
||||
<view class="cursor" :style="{ left: activeIndex ? '65%' : '14%' }"></view>
|
||||
</view>
|
||||
<!-- 滑动容器 -->
|
||||
<swiper class="swiper" :current="activeIndex" @change="handleIndexChange($event.detail.current)">
|
||||
<!-- 滑动项 -->
|
||||
<swiper-item v-for="item in orderTabs" :key="item.title">
|
||||
<dataItem v-if="item.isRender" :order-state="item.orderState" />
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.viewport {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
// background-color: #3775F6;
|
||||
.navbar {
|
||||
width: 750rpx;
|
||||
color: #000;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 9;
|
||||
/* background-color: #f8f8f8; */
|
||||
background-color: #3775f6;
|
||||
|
||||
.wrap {
|
||||
position: relative;
|
||||
background-color: #3775f6;
|
||||
|
||||
.title {
|
||||
height: 44px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
/* color: #000; */
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.back {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
height: 44px;
|
||||
width: 44px;
|
||||
font-size: 44rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
/* color: #000; */
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tabs {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
line-height: 60rpx;
|
||||
position: relative;
|
||||
z-index: 9;
|
||||
width: 100%;
|
||||
|
||||
.item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
padding: 20rpx;
|
||||
font-size: 28rpx;
|
||||
color: #1D2129;
|
||||
|
||||
&.active {
|
||||
color: #356899;
|
||||
}
|
||||
}
|
||||
|
||||
.cursor {
|
||||
position: absolute;
|
||||
left: 13%;
|
||||
bottom: 0;
|
||||
width: 20%;
|
||||
height: 6rpx;
|
||||
padding: 0 50rpx;
|
||||
background-color: #356899;
|
||||
/* 过渡效果 */
|
||||
transition: all 0.4s;
|
||||
}
|
||||
}
|
||||
|
||||
// swiper
|
||||
.swiper {
|
||||
background-color: #f7f7f8;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,188 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import dataItem from './components/dataItem.vue'
|
||||
import detailPanel from './components/detailPanel.vue'
|
||||
const childRef = ref(null);
|
||||
// tabs 数据
|
||||
const orderTabs = ref([
|
||||
{ orderState: '0', title: '近三个月', isRender: false },
|
||||
{ orderState: '1', title: '三个月前', isRender: false },
|
||||
])
|
||||
// 高亮下标
|
||||
const activeIndex = ref(0)
|
||||
const handleIndexChange = (index: any) => {
|
||||
orderTabs.value.forEach((e) => {
|
||||
e.isRender = false
|
||||
})
|
||||
activeIndex.value = index
|
||||
orderTabs.value[index].isRender = true
|
||||
}
|
||||
onLoad(async (options) => {
|
||||
if (options.state) {
|
||||
// 高亮下标
|
||||
orderTabs.value.forEach((e, index) => {
|
||||
e.isRender = e.orderState == options.state
|
||||
if (e.isRender) {
|
||||
activeIndex.value = index
|
||||
}
|
||||
})
|
||||
} else {
|
||||
orderTabs.value.forEach((e, index) => {
|
||||
e.isRender = e.orderState == '0'
|
||||
if (e.isRender) {
|
||||
activeIndex.value = index
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
const btnTop = ref(100)
|
||||
const btnLeft = ref(20)
|
||||
const startX = ref(0)
|
||||
const startY = ref(0)
|
||||
|
||||
const isShowPop = ref(false)
|
||||
// 新增
|
||||
const handleAdd = () => {
|
||||
popup.value?.open()
|
||||
isShowPop.value = true
|
||||
}
|
||||
// uni-ui 弹出层组件 ref
|
||||
const popup = ref<{
|
||||
open: (type?: UniHelper.UniPopupType) => void
|
||||
close: () => void
|
||||
}>()
|
||||
const handlePopClose = (flag) => {
|
||||
popup.value?.close()
|
||||
isShowPop.value = false
|
||||
flag && childRef.value[0].updateData()
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="viewport">
|
||||
<view class="tabs">
|
||||
<text class="item" :class="{ active: activeIndex == index }" v-for="(item, index) in orderTabs" :key="item.title"
|
||||
@tap="handleIndexChange(index)">
|
||||
{{ item.title }}
|
||||
</text>
|
||||
<!-- 游标 -->
|
||||
<view class="cursor" :style="{ left: activeIndex ? '65%' : '14%' }"></view>
|
||||
</view>
|
||||
<!-- 滑动容器 -->
|
||||
<swiper class="swiper" :current="activeIndex" @change="handleIndexChange($event.detail.current)">
|
||||
<!-- 滑动项 -->
|
||||
<swiper-item v-for="item in orderTabs" :key="item.title">
|
||||
<dataItem ref="childRef" v-if="item.isRender" :order-state="item.orderState" />
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="float-btn" :style="{bottom: btnTop + 'px', right: btnLeft + 'px'}" @click="handleAdd">
|
||||
<image class="add" src="/static/images/unqualifiedNotification-add.png" mode="scaleToFill" />
|
||||
</view>
|
||||
<!-- uni-ui 弹出层 -->
|
||||
<uni-popup ref="popup" :mask-click="false" type="bottom" background-color="#fff">
|
||||
<detailPanel v-if="isShowPop" @close="handlePopClose" />
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.viewport {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: reactive;
|
||||
|
||||
// background-color: #3775F6;
|
||||
.navbar {
|
||||
width: 750rpx;
|
||||
color: #000;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 9;
|
||||
/* background-color: #f8f8f8; */
|
||||
background-color: #3775f6;
|
||||
|
||||
.wrap {
|
||||
position: relative;
|
||||
background-color: #3775f6;
|
||||
|
||||
.title {
|
||||
height: 44px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
/* color: #000; */
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.back {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
height: 44px;
|
||||
width: 44px;
|
||||
font-size: 44rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
/* color: #000; */
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tabs {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
line-height: 60rpx;
|
||||
position: relative;
|
||||
z-index: 9;
|
||||
width: 100%;
|
||||
|
||||
.item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
padding: 20rpx;
|
||||
font-size: 28rpx;
|
||||
color: #1D2129;
|
||||
|
||||
&.active {
|
||||
color: #356899;
|
||||
}
|
||||
}
|
||||
|
||||
.cursor {
|
||||
position: absolute;
|
||||
left: 13%;
|
||||
bottom: 0;
|
||||
width: 20%;
|
||||
height: 6rpx;
|
||||
padding: 0 50rpx;
|
||||
background-color: #356899;
|
||||
/* 过渡效果 */
|
||||
transition: all 0.4s;
|
||||
}
|
||||
}
|
||||
|
||||
// swiper
|
||||
.swiper {
|
||||
background-color: #f7f7f8;
|
||||
}
|
||||
.float-btn {
|
||||
position: absolute;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
.add {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,11 @@
|
||||
/*
|
||||
* @Author: 王文杰
|
||||
* @Date: 2024-01-04 12:54:56
|
||||
* @LastEditors: jevononlie 728254585@qq.com
|
||||
* @LastEditTime: 2024-05-09 13:20:50
|
||||
* @FilePath: /hl-app/src/services/constants.ts
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
// export const serviceDomain = 'https://nxhs.cjyx.cc'
|
||||
export const serviceDomain = 'http://192.168.0.72:9021'
|
||||
|
@ -0,0 +1,19 @@
|
||||
/*
|
||||
* @Author: 王文杰
|
||||
* @Date: 2024-01-04 12:54:56
|
||||
* @LastEditors: 王文杰
|
||||
* @LastEditTime: 2024-03-19 17:27:47
|
||||
* @FilePath: /app-nx-personal/src/services/home.ts
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
import type { PageParams, PageResult } from '@/types/global'
|
||||
import type { BannerItem, CategoryItem, GuessItem, HotItem } from '@/types/home'
|
||||
import { http } from '@/utils/http'
|
||||
|
||||
|
||||
export const getHomeCategoryAPI = () => {
|
||||
return http<CategoryItem[]>({
|
||||
method: 'GET',
|
||||
url: '/system/auth/get-permission-info',
|
||||
})
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
/*
|
||||
* @Author: 王文杰
|
||||
* @Date: 2024-03-04 14:13:16
|
||||
* @LastEditors: 王文杰
|
||||
* @LastEditTime: 2024-03-26 09:35:18
|
||||
* @FilePath: /hl-app/src/services/login.ts
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
|
||||
|
||||
import type { LoginResult } from '@/types/login'
|
||||
import { http } from '@/utils/http'
|
||||
|
||||
type LoginWxMinParams = {
|
||||
code: string
|
||||
encryptedData?: string
|
||||
iv?: string
|
||||
}
|
||||
/**
|
||||
* 小程序登录
|
||||
* @param data 请求参数
|
||||
*/
|
||||
export const postLoginWxMinAPI = (data: LoginWxMinParams) => {
|
||||
return http<LoginResult>({
|
||||
method: 'POST',
|
||||
url: '/common/shlogin',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
type LoginParams = {
|
||||
username: string
|
||||
password: string
|
||||
}
|
||||
/**
|
||||
* 传统登录-用户名+密码
|
||||
* @param data 请求参数
|
||||
*/
|
||||
export const postLoginAPI = (data: LoginParams) => {
|
||||
return http<LoginResult>({
|
||||
method: 'POST',
|
||||
url: '/system/auth/login',
|
||||
data,
|
||||
})
|
||||
}
|
||||
// 获得全部字典数据列表
|
||||
export const getDictAPI = (data: any) => {
|
||||
return http<LoginResult>({
|
||||
method: 'GET',
|
||||
url: '/system/dict-data/simple-list',
|
||||
data,
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 退出登录
|
||||
*/
|
||||
export const postLogoutAPI = (data: Object) => {
|
||||
return http<any>({
|
||||
method: 'POST',
|
||||
url: '/system/auth/logout',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export const getAuthAPI = () => {
|
||||
return http<any>({
|
||||
method: 'GET',
|
||||
url: '/system/auth/get-permission-info',
|
||||
})
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* @Author: 王文杰
|
||||
* @Date: 2024-03-20 13:30:51
|
||||
* @LastEditors: 王文杰
|
||||
* @LastEditTime: 2024-03-20 17:58:26
|
||||
* @FilePath: /hl-app/src/services/my.ts
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
import { http } from '@/utils/http'
|
||||
export const getUserInfoAPI = (data: any) => {
|
||||
return http<any[]>({
|
||||
method: 'GET',
|
||||
url: '/system/user/get',
|
||||
data,
|
||||
})
|
||||
}
|
||||
export const putUpdatePasswordAPI = (data: any) => {
|
||||
return http<any[]>({
|
||||
method: 'PUT',
|
||||
url: '/system/user/profile/update-password',
|
||||
data,
|
||||
})
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* @Author: 王文杰
|
||||
* @Date: 2024-01-04 12:54:56
|
||||
* @LastEditors: 王文杰
|
||||
* @LastEditTime: 2024-03-07 15:49:32
|
||||
* @FilePath: /app-nx-personal/src/services/profile.ts
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
import type { ProfileDetail, ProfileParams } from '@/types/member'
|
||||
import { http } from '@/utils/http'
|
||||
|
||||
/**
|
||||
* 获取个人信息
|
||||
*/
|
||||
export const getMemberProfileAPI = () => {
|
||||
return http<ProfileDetail>({
|
||||
method: 'GET',
|
||||
url: '/client/info',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改个人信息
|
||||
* @param data 请求体参数
|
||||
*/
|
||||
export const postMemberProfileAPI = (data: ProfileParams) => {
|
||||
return http<ProfileDetail>({
|
||||
method: 'POST',
|
||||
url: '/client/update',
|
||||
data,
|
||||
})
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
/*
|
||||
* @Author: 王文杰
|
||||
* @Date: 2024-01-04 12:54:56
|
||||
* @LastEditors: jevononlie 728254585@qq.com
|
||||
* @LastEditTime: 2024-05-09 14:53:49
|
||||
* @FilePath: /app-nx-personal/src/services/home.ts
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
import { http } from '@/utils/http'
|
||||
|
||||
|
||||
// 异常通知单分页查询
|
||||
export const getNotificationPageAPI = (data: Object) => {
|
||||
return http<any[]>({
|
||||
method: 'GET',
|
||||
url: '/biz/unqualified-notification/page',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 获取生产车间分页
|
||||
export const getWorkshopsPageAPI = (data: Object) => {
|
||||
return http<any[]>({
|
||||
method: 'GET',
|
||||
url: '/biz/app/workshops',
|
||||
data,
|
||||
})
|
||||
}
|
||||
// 获取工序分页
|
||||
export const getProcedurePageAPI = (data: Object) => {
|
||||
return http<any[]>({
|
||||
method: 'GET',
|
||||
url: '/biz/procedure/page',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 获取用户分页
|
||||
export const getUserPageAPI = (data: Object) => {
|
||||
return http<any[]>({
|
||||
method: 'GET',
|
||||
url: '/system/user/page',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 创建品质异常通知单审核
|
||||
export const postAddAPI = (data: Object) => {
|
||||
return http<any[]>({
|
||||
method: 'POST',
|
||||
url: '/biz/unqualified-notification/create',
|
||||
data,
|
||||
})
|
||||
}
|
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 145 KiB |
After Width: | Height: | Size: 212 KiB |
After Width: | Height: | Size: 71 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 8.9 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 8.9 KiB |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 9.1 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 3.0 KiB |
@ -0,0 +1,18 @@
|
||||
/*
|
||||
* @Author: 王文杰
|
||||
* @Date: 2024-03-04 14:13:16
|
||||
* @LastEditors: 王文杰
|
||||
* @LastEditTime: 2024-03-26 14:35:40
|
||||
* @FilePath: /hl-app/src/stores/index.ts
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
import { createPinia } from 'pinia'
|
||||
import persist from 'pinia-plugin-persistedstate'
|
||||
|
||||
// 创建 pinia 实例
|
||||
const pinia = createPinia()
|
||||
// 使用持久化存储插件
|
||||
pinia.use(persist)
|
||||
|
||||
// 默认导出,给 main.ts 使用
|
||||
export default pinia
|
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* @Author: 王文杰
|
||||
* @Date: 2024-01-04 12:54:56
|
||||
* @LastEditors: jevononlie 728254585@qq.com
|
||||
* @LastEditTime: 2024-04-09 18:09:07
|
||||
* @FilePath: /app-nx-recycle/src/stores/modules/member.ts
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
import type { LoginResult } from '@/types/login'
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref, computed } from 'vue'
|
||||
// 定义 Store
|
||||
export const useLoginStore = defineStore('login', () => {
|
||||
// 会员信息
|
||||
const userInfo = ref({})
|
||||
const dictInfo = ref([])
|
||||
|
||||
// 保存会员信息,登录时使用
|
||||
const setInfo = (val: Object) => {
|
||||
userInfo.value = val
|
||||
}
|
||||
|
||||
// 清理会员信息,退出时使用
|
||||
const clearInfo = () => {
|
||||
userInfo.value = undefined
|
||||
}
|
||||
|
||||
// 保存枚举
|
||||
const setDict = (val: any) => {
|
||||
dictInfo.value = val
|
||||
}
|
||||
|
||||
// 清理枚举
|
||||
const clearDict = () => {
|
||||
dictInfo.value = []
|
||||
}
|
||||
return {
|
||||
userInfo,
|
||||
dictInfo,
|
||||
setInfo,
|
||||
clearInfo,
|
||||
setDict,
|
||||
clearDict,
|
||||
}
|
||||
},{
|
||||
persist: {
|
||||
storage: {
|
||||
getItem(key) {
|
||||
return uni.getStorageSync(key)
|
||||
},
|
||||
setItem(key, value) {
|
||||
uni.setStorageSync(key, value)
|
||||
},
|
||||
}
|
||||
}
|
||||
})
|
@ -0,0 +1,32 @@
|
||||
view,
|
||||
navigator,
|
||||
input,
|
||||
scroll-view {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
button::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
swiper,
|
||||
scroll-view {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
// 两行省略
|
||||
.ellipsis {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
view,
|
||||
navigator,
|
||||
input,
|
||||
scroll-view {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
button::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
swiper,
|
||||
scroll-view {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.ellipsis {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
@ -0,0 +1,147 @@
|
||||
@font-face {
|
||||
font-family: 'erabbit';
|
||||
src: url('https://at.alicdn.com/t/c/font_4009193_lnbhmo3yos.woff?t=1681201348304') format('woff'),
|
||||
url('https://at.alicdn.com/t/c/font_4009193_lnbhmo3yos.ttf?t=1681201348304') format('truetype'),
|
||||
url('https://at.alicdn.com/t/c/font_4009193_lnbhmo3yos.svg?t=1681201348304#erabbit')
|
||||
format('svg');
|
||||
}
|
||||
|
||||
[class^='icon-'],
|
||||
[class*=' icon-'] {
|
||||
font-family: 'erabbit' !important;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-mail:before {
|
||||
content: '\e644';
|
||||
}
|
||||
|
||||
.icon-weixin:before {
|
||||
content: '\e620';
|
||||
}
|
||||
|
||||
.icon-phone:before {
|
||||
content: '\e618';
|
||||
}
|
||||
|
||||
.icon-camera-plus:before {
|
||||
content: '\e636';
|
||||
}
|
||||
|
||||
.icon-close:before {
|
||||
content: '\e6e1';
|
||||
}
|
||||
|
||||
.icon-help:before {
|
||||
content: '\e617';
|
||||
}
|
||||
|
||||
.icon-cart:before {
|
||||
content: '\e6d1';
|
||||
}
|
||||
|
||||
.icon-settings:before {
|
||||
content: '\e6cf';
|
||||
}
|
||||
|
||||
.icon-clock:before {
|
||||
content: '\e609';
|
||||
}
|
||||
|
||||
.icon-delete:before {
|
||||
content: '\e6ce';
|
||||
}
|
||||
|
||||
.icon-checked:before {
|
||||
content: '\e6cc';
|
||||
}
|
||||
|
||||
.icon-ring:before {
|
||||
content: '\e6cd';
|
||||
}
|
||||
|
||||
.icon-locate:before {
|
||||
content: '\e6cb';
|
||||
}
|
||||
|
||||
.icon-mark:before {
|
||||
content: '\e6ca';
|
||||
}
|
||||
|
||||
.icon-check:before {
|
||||
content: '\e6c9';
|
||||
}
|
||||
|
||||
.icon-handset:before {
|
||||
content: '\e6c8';
|
||||
}
|
||||
|
||||
.icon-gift:before {
|
||||
content: '\e6c7';
|
||||
}
|
||||
|
||||
.icon-currency:before {
|
||||
content: '\e6c6';
|
||||
}
|
||||
|
||||
.icon-comment:before {
|
||||
content: '\e6c5';
|
||||
}
|
||||
|
||||
.icon-caret:before {
|
||||
content: '\e6c3';
|
||||
}
|
||||
|
||||
.icon-right:before {
|
||||
content: '\e6c2';
|
||||
}
|
||||
|
||||
.icon-left:before {
|
||||
content: '\e6c1';
|
||||
}
|
||||
|
||||
.icon-down:before {
|
||||
content: '\e6c0';
|
||||
}
|
||||
|
||||
.icon-up:before {
|
||||
content: '\e6bf';
|
||||
}
|
||||
|
||||
.icon-sort:before {
|
||||
content: '\e616';
|
||||
}
|
||||
|
||||
.icon-clear:before {
|
||||
content: '\e6be';
|
||||
}
|
||||
|
||||
.icon-user:before {
|
||||
content: '\e6bb';
|
||||
}
|
||||
|
||||
.icon-scan:before {
|
||||
content: '\e6bc';
|
||||
}
|
||||
|
||||
.icon-search:before {
|
||||
content: '\e632';
|
||||
}
|
||||
|
||||
.icon-preview:before {
|
||||
content: '\e61d';
|
||||
}
|
||||
|
||||
.icon-heart:before {
|
||||
content: '\e647';
|
||||
}
|
||||
|
||||
.icon-filter:before {
|
||||
content: '\e629';
|
||||
}
|
||||
|
||||
.icon-home:before {
|
||||
content: '\e8b9';
|
||||
}
|
@ -0,0 +1,144 @@
|
||||
@font-face {
|
||||
font-family: 'erabbit';
|
||||
src: url("https://at.alicdn.com/t/c/font_4009193_lnbhmo3yos.woff?t=1681201348304") format("woff"), url("https://at.alicdn.com/t/c/font_4009193_lnbhmo3yos.ttf?t=1681201348304") format("truetype"), url("https://at.alicdn.com/t/c/font_4009193_lnbhmo3yos.svg?t=1681201348304#erabbit") format("svg");
|
||||
}
|
||||
|
||||
[class^='icon-'],
|
||||
[class*=' icon-'] {
|
||||
font-family: 'erabbit' !important;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-mail:before {
|
||||
content: '\e644';
|
||||
}
|
||||
|
||||
.icon-weixin:before {
|
||||
content: '\e620';
|
||||
}
|
||||
|
||||
.icon-phone:before {
|
||||
content: '\e618';
|
||||
}
|
||||
|
||||
.icon-camera-plus:before {
|
||||
content: '\e636';
|
||||
}
|
||||
|
||||
.icon-close:before {
|
||||
content: '\e6e1';
|
||||
}
|
||||
|
||||
.icon-help:before {
|
||||
content: '\e617';
|
||||
}
|
||||
|
||||
.icon-cart:before {
|
||||
content: '\e6d1';
|
||||
}
|
||||
|
||||
.icon-settings:before {
|
||||
content: '\e6cf';
|
||||
}
|
||||
|
||||
.icon-clock:before {
|
||||
content: '\e609';
|
||||
}
|
||||
|
||||
.icon-delete:before {
|
||||
content: '\e6ce';
|
||||
}
|
||||
|
||||
.icon-checked:before {
|
||||
content: '\e6cc';
|
||||
}
|
||||
|
||||
.icon-ring:before {
|
||||
content: '\e6cd';
|
||||
}
|
||||
|
||||
.icon-locate:before {
|
||||
content: '\e6cb';
|
||||
}
|
||||
|
||||
.icon-mark:before {
|
||||
content: '\e6ca';
|
||||
}
|
||||
|
||||
.icon-check:before {
|
||||
content: '\e6c9';
|
||||
}
|
||||
|
||||
.icon-handset:before {
|
||||
content: '\e6c8';
|
||||
}
|
||||
|
||||
.icon-gift:before {
|
||||
content: '\e6c7';
|
||||
}
|
||||
|
||||
.icon-currency:before {
|
||||
content: '\e6c6';
|
||||
}
|
||||
|
||||
.icon-comment:before {
|
||||
content: '\e6c5';
|
||||
}
|
||||
|
||||
.icon-caret:before {
|
||||
content: '\e6c3';
|
||||
}
|
||||
|
||||
.icon-right:before {
|
||||
content: '\e6c2';
|
||||
}
|
||||
|
||||
.icon-left:before {
|
||||
content: '\e6c1';
|
||||
}
|
||||
|
||||
.icon-down:before {
|
||||
content: '\e6c0';
|
||||
}
|
||||
|
||||
.icon-up:before {
|
||||
content: '\e6bf';
|
||||
}
|
||||
|
||||
.icon-sort:before {
|
||||
content: '\e616';
|
||||
}
|
||||
|
||||
.icon-clear:before {
|
||||
content: '\e6be';
|
||||
}
|
||||
|
||||
.icon-user:before {
|
||||
content: '\e6bb';
|
||||
}
|
||||
|
||||
.icon-scan:before {
|
||||
content: '\e6bc';
|
||||
}
|
||||
|
||||
.icon-search:before {
|
||||
content: '\e632';
|
||||
}
|
||||
|
||||
.icon-preview:before {
|
||||
content: '\e61d';
|
||||
}
|
||||
|
||||
.icon-heart:before {
|
||||
content: '\e647';
|
||||
}
|
||||
|
||||
.icon-filter:before {
|
||||
content: '\e629';
|
||||
}
|
||||
|
||||
.icon-home:before {
|
||||
content: '\e8b9';
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
import type { GoodsItem } from './global'
|
||||
|
||||
/** 一级分类项 */
|
||||
export type CategoryTopItem = {
|
||||
/** 二级分类集合[ 二级分类项 ] */
|
||||
children: CategoryChildItem[]
|
||||
/** 一级分类id */
|
||||
id: string
|
||||
/** 一级分类图片集[ 一级分类图片项 ] */
|
||||
imageBanners: string[]
|
||||
/** 一级分类名称 */
|
||||
name: string
|
||||
/** 一级分类图片 */
|
||||
picture: string
|
||||
}
|
||||
|
||||
/** 二级分类项 */
|
||||
export type CategoryChildItem = {
|
||||
/** 商品集合[ 商品项 ] */
|
||||
goods: GoodsItem[]
|
||||
/** 二级分类id */
|
||||
id: string
|
||||
/** 二级分类名称 */
|
||||
name: string
|
||||
/** 二级分类图片 */
|
||||
picture: string
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
import XtxSwiper from '@/components/XtxSwiper.vue'
|
||||
import XtxGuess from '@/components/XtxGuess.vue'
|
||||
|
||||
declare module 'vue' {
|
||||
export interface GlobalComponents {
|
||||
XtxSwiper: typeof XtxSwiper
|
||||
XtxGuess: typeof XtxGuess
|
||||
}
|
||||
}
|
||||
|
||||
// 组件实例类型
|
||||
export type XtxGuessInstance = InstanceType<typeof XtxGuess>
|
||||
export type XtxSwiperInstance = InstanceType<typeof XtxSwiper>
|
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* @Author: 王文杰
|
||||
* @Date: 2024-01-04 12:54:56
|
||||
* @LastEditors: 王文杰
|
||||
* @LastEditTime: 2024-02-22 17:00:35
|
||||
* @FilePath: /app-nx-recycle/src/types/global.d.ts
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
/** 通用分页结果类型 */
|
||||
export type PageResult<T> = {
|
||||
/** 列表数据 */
|
||||
list: T[]
|
||||
pages: string,
|
||||
}
|
||||
|
||||
/** 通用分页参数类型 */
|
||||
export type PageParams = {
|
||||
/** 页码:默认值为 1 */
|
||||
pageNo?: number
|
||||
/** 页大小:默认值为 10 */
|
||||
pageSize?: number,
|
||||
}
|
||||
|
||||
/** 通用商品类型 */
|
||||
export type GoodsItem = {
|
||||
/** 商品描述 */
|
||||
desc: string
|
||||
/** 商品折扣 */
|
||||
discount: number
|
||||
/** id */
|
||||
id: string
|
||||
/** 商品名称 */
|
||||
name: string
|
||||
/** 商品已下单数量 */
|
||||
orderNum: number
|
||||
/** 商品图片 */
|
||||
picture: string
|
||||
/** 商品价格 */
|
||||
price: number
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
import type { AddressItem } from './address'
|
||||
import type { GoodsItem } from './global'
|
||||
|
||||
/** 商品信息 */
|
||||
export type GoodsResult = {
|
||||
/** id */
|
||||
id: string
|
||||
/** 商品名称 */
|
||||
name: string
|
||||
/** 商品描述 */
|
||||
desc: string
|
||||
/** 当前价格 */
|
||||
price: number
|
||||
/** 原价 */
|
||||
oldPrice: number
|
||||
/** 商品详情: 包含详情属性 + 详情图片 */
|
||||
details: Details
|
||||
/** 主图图片集合[ 主图图片链接 ] */
|
||||
mainPictures: string[]
|
||||
/** 同类商品[ 商品信息 ] */
|
||||
similarProducts: GoodsItem[]
|
||||
/** sku集合[ sku信息 ] */
|
||||
skus: SkuItem[]
|
||||
/** 可选规格集合备注[ 可选规格信息 ] */
|
||||
specs: SpecItem[]
|
||||
/** 用户地址列表[ 地址信息 ] */
|
||||
userAddresses: AddressItem[]
|
||||
}
|
||||
|
||||
/** 商品详情: 包含详情属性 + 详情图片 */
|
||||
export type Details = {
|
||||
/** 商品属性集合[ 属性信息 ] */
|
||||
properties: DetailsPropertyItem[]
|
||||
/** 商品详情图片集合[ 图片链接 ] */
|
||||
pictures: string[]
|
||||
}
|
||||
|
||||
/** 属性信息 */
|
||||
export type DetailsPropertyItem = {
|
||||
/** 属性名称 */
|
||||
name: string
|
||||
/** 属性值 */
|
||||
value: string
|
||||
}
|
||||
|
||||
/** sku信息 */
|
||||
export type SkuItem = {
|
||||
/** sku id */
|
||||
id: string
|
||||
/** sku 库存 */
|
||||
inventory: number
|
||||
/** sku 原价 */
|
||||
oldPrice: number
|
||||
/** sku 图片 */
|
||||
picture: string
|
||||
/** sku 当前价 */
|
||||
price: number
|
||||
/** sku 编码 */
|
||||
skuCode: string
|
||||
/** 规格集合[ 规格信息 ] */
|
||||
specs: SkuSpecItem[]
|
||||
}
|
||||
|
||||
/** 规格信息 */
|
||||
export type SkuSpecItem = {
|
||||
/** 规格名称 */
|
||||
name: string
|
||||
/** 可选值名称 */
|
||||
valueName: string
|
||||
}
|
||||
|
||||
/** 可选规格信息 */
|
||||
export type SpecItem = {
|
||||
/** 规格名称 */
|
||||
name: string
|
||||
/** 可选值集合[ 可选值信息 ] */
|
||||
values: SpecValueItem[]
|
||||
}
|
||||
|
||||
/** 可选值信息 */
|
||||
export type SpecValueItem = {
|
||||
/** 是否可售 */
|
||||
available: boolean
|
||||
/** 可选值备注 */
|
||||
desc: string
|
||||
/** 可选值名称 */
|
||||
name: string
|
||||
/** 可选值图片链接 */
|
||||
picture: string
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
import type { GoodsItem } from './global'
|
||||
|
||||
/** 首页-广告区域数据类型 */
|
||||
export type BannerItem = {
|
||||
/** 跳转链接 */
|
||||
hrefUrl: string
|
||||
/** id */
|
||||
id: string
|
||||
/** 图片链接 */
|
||||
imgUrl: string
|
||||
/** 跳转类型 */
|
||||
type: number
|
||||
}
|
||||
|
||||
/** 首页-前台类目数据类型 */
|
||||
export type CategoryItem = {
|
||||
/** 图标路径 */
|
||||
icon: string
|
||||
/** id */
|
||||
id: string
|
||||
/** 分类名称 */
|
||||
name: string
|
||||
}
|
||||
|
||||
/** 首页-热门推荐数据类型 */
|
||||
export type HotItem = {
|
||||
/** 说明 */
|
||||
alt: string
|
||||
/** id */
|
||||
id: string
|
||||
/** 图片集合[ 图片路径 ] */
|
||||
pictures: string[]
|
||||
/** 跳转地址 */
|
||||
target: string
|
||||
/** 标题 */
|
||||
title: string
|
||||
/** 推荐类型 */
|
||||
type: string
|
||||
}
|
||||
|
||||
/** 猜你喜欢-商品类型 */
|
||||
export type GuessItem = GoodsItem
|
@ -0,0 +1,23 @@
|
||||
import type { PageResult, GoodsItem } from './global'
|
||||
|
||||
/** 热门推荐-子类选项 */
|
||||
export type SubTypeItem = {
|
||||
/** 子类id */
|
||||
id: string
|
||||
/** 子类标题 */
|
||||
title: string
|
||||
/** 子类对应的商品集合 */
|
||||
goodsItems: PageResult<GoodsItem>
|
||||
}
|
||||
|
||||
/** 热门推荐 */
|
||||
export type HotResult = {
|
||||
/** id信息 */
|
||||
id: string
|
||||
/** 活动图片 */
|
||||
bannerPicture: string
|
||||
/** 活动标题 */
|
||||
title: string
|
||||
/** 子类选项 */
|
||||
subTypes: SubTypeItem[]
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
/*
|
||||
* @Author: 王文杰
|
||||
* @Date: 2024-03-19 16:49:52
|
||||
* @LastEditors: 王文杰
|
||||
* @LastEditTime: 2024-03-19 17:14:46
|
||||
* @FilePath: /hl-app/src/types/login.ts
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
|
||||
/** 登录信息 */
|
||||
export type LoginResult = {
|
||||
/** 用户ID */
|
||||
// code: number
|
||||
// data: Object
|
||||
// /** 昵称 */
|
||||
// msg?: string
|
||||
accessToken: string
|
||||
expiresTime: number
|
||||
refreshToken: string
|
||||
userId: number
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
|
||||
/** 通用的用户信息 */
|
||||
type BaseProfile = {
|
||||
/** 用户ID */
|
||||
id: number
|
||||
/** 头像 */
|
||||
avatar: string
|
||||
/** 账户名 */
|
||||
account: string
|
||||
/** 昵称 */
|
||||
nickname?: string
|
||||
}
|
||||
|
||||
/** 小程序登录 登录用户信息 */
|
||||
export type LoginResult = {
|
||||
id: string
|
||||
openid: string
|
||||
phone: string
|
||||
/** 登录凭证 */
|
||||
token: string
|
||||
userType: Object
|
||||
username: string
|
||||
}
|
||||
|
||||
/** 个人信息 用户详情信息 */
|
||||
export type ProfileDetail = BaseProfile & {
|
||||
/** 性别 */
|
||||
gender?: Gender
|
||||
/** 生日 */
|
||||
birthday?: string
|
||||
/** 省市区 */
|
||||
fullLocation?: string
|
||||
/** 职业 */
|
||||
profession?: string
|
||||
}
|
||||
/** 性别 */
|
||||
export type Gender = '女' | '男'
|
||||
|
||||
/** 个人信息 修改请求体参数 */
|
||||
export type ProfileParams = Pick<
|
||||
ProfileDetail,
|
||||
'nickname' | 'gender' | 'birthday' | 'profession'
|
||||
> & {
|
||||
/** 省份编码 */
|
||||
provinceCode?: string
|
||||
/** 城市编码 */
|
||||
cityCode?: string
|
||||
/** 区/县编码 */
|
||||
countyCode?: string
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
# lin-select
|
||||
|
||||
## **使用说明**
|
||||
|
||||
### **==注意:需要依赖 [uni-easyinput](https://ext.dcloud.net.cn/plugin?name=uni-easyinput) ,请先导入[uni-easyinput](https://ext.dcloud.net.cn/plugin?name=uni-easyinput)后再使用;==**
|
||||
|
||||
```html
|
||||
//将插件导入到Hubilder之后,直接通过标签使用<lin-select />
|
||||
<template>
|
||||
<!-- 普通用法 -->
|
||||
|
||||
<lin-select
|
||||
:list="productList1"
|
||||
value-key="value"
|
||||
name-key="name"
|
||||
max-height="180"
|
||||
placeholder="请输入商品名称"
|
||||
@input="input2"
|
||||
v-model="mytext1"
|
||||
@confirm="confirm"
|
||||
/>
|
||||
|
||||
<!-- 远程加载数据 -->
|
||||
<lin-select
|
||||
:list="productList2"
|
||||
:loading="loading"
|
||||
loading-text="数据加载中"
|
||||
value-key="value"
|
||||
name-key="name"
|
||||
max-height="180"
|
||||
placeholder="请输入商品名称"
|
||||
@input="input2"
|
||||
v-model="mytext2"
|
||||
/>
|
||||
</template>
|
||||
```
|
||||
|
||||
```javascript
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
mytext1: 1,
|
||||
mytext2: '',
|
||||
productList1: [{ "name": "特选痩肉", value: 0 }, { "name": "特选键子肉", value: 1 }, { "name": "特选梅肉", value: 2 }],
|
||||
productList2: [],
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
confirm(val) {
|
||||
console.log(val, 'confirm')
|
||||
},
|
||||
|
||||
input1(val) {
|
||||
console.log(val, 666)
|
||||
},
|
||||
|
||||
// 远程加载数据
|
||||
input2(val) {
|
||||
setTimeout(() => {
|
||||
this.productList2 = [
|
||||
{ "name": "远程加载分割猪肉及附件", value: 0 },
|
||||
{ "name": "远程加载良种白条猪肉", value: 1 },
|
||||
{ "name": "远程加载土猪白条猪肉", value: 2 }
|
||||
]
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
```
|
||||
|
||||
# **Props**
|
||||
|
||||
| 参数 | 说明 | 类型 | 是否必填 |
|
||||
| :----------- | :---------------- | :--------------- | :------- |
|
||||
| list | 数据源数组 | Array | 必填 |
|
||||
| value-key | 取值的 key | string | 必填 |
|
||||
| name-key | 显示的 key | string | 必填 |
|
||||
| max-height | 列表最大高度 | string \| number | 否 |
|
||||
| @input | 输入框 input 事件 | function | 否 |
|
||||
| @confirm | 点击选项事件 | function | 否 |
|
||||
| v-model | 绑定的字段 | - | 否 |
|
||||
| loading | 是否正在加载 | Boolean | 否 |
|
||||
| loading-text | 远程加载中的文案 | string | 否 |
|
||||
|
||||
## **联系作者**
|
||||
|
||||
如使用上有问题可以留言或者联系我哈,我会一直更新的;
|