提交 6727fbbd authored 作者: Administrator's avatar Administrator

更新代码

上级 47837365
node_modules
node_modules
dist
\ No newline at end of file
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
"version": "0.0",
"configurations": [{
"app-plus" :
{
"launchtype" : "local"
},
"default" :
{
"launchtype" : "local"
},
"mp-weixin" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
}
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
"version": "0.0",
"configurations": [{
"app-plus" :
{
"launchtype" : "local"
},
"default" :
{
"launchtype" : "local"
},
"mp-weixin" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
}
FROM nginx
VOLUME /tmp
ENV LANG en_US.UTF-8
RUN echo "\
# gzip config\
gzip on;\
gzip_min_length 1k;\
gzip_comp_level 9;\
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;\
gzip_vary on;\
gzip_disable "MSIE [1-6]\.";\
server { \
listen 80; \
client_max_body_size 20m; \
#listen 443 ssl; \
#ssl on;\
#ssl_certificate /etc/nginx/ssl/7278703_blueelephant.es-erp.com.pem;\
#ssl_certificate_key /etc/nginx/ssl/7278703_blueelephant.es-erp.com.key;\
#ssl_session_timeout 5m;\
location /admin { \
proxy_pass http://msjf-customized; \
proxy_set_header Host msjf-customized; \
proxy_set_header X-Real-IP \$remote_addr; \
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; \
} \
location /wx { \
proxy_pass http://msjf-customized; \
proxy_set_header Host msjf-customized; \
proxy_set_header X-Real-IP \$remote_addr; \
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; \
} \
#解决Router(mode: 'history')模式下,刷新路由地址不能找到页面的问题 \
location / { \
root /var/www/html/; \
index index.html index.htm; \
if (!-e \$request_filename) { \
rewrite ^(.*)\$ /index.html?s=\$1 last; \
break; \
} \
} \
access_log /var/log/nginx/access.log ; \
} " > /etc/nginx/conf.d/default.conf \
&& mkdir -p /var/www \
&& mkdir -p /var/www/html
ADD dist/build/h5 /var/www/html/
EXPOSE 80
FROM nginx
VOLUME /tmp
ENV LANG en_US.UTF-8
RUN echo "\
# gzip config\
gzip on;\
gzip_min_length 1k;\
gzip_comp_level 9;\
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;\
gzip_vary on;\
gzip_disable "MSIE [1-6]\.";\
server { \
listen 80; \
client_max_body_size 20m; \
#listen 443 ssl; \
#ssl on;\
#ssl_certificate /etc/nginx/ssl/7278703_blueelephant.es-erp.com.pem;\
#ssl_certificate_key /etc/nginx/ssl/7278703_blueelephant.es-erp.com.key;\
#ssl_session_timeout 5m;\
location /admin { \
proxy_pass http://msjf-customized; \
proxy_set_header Host msjf-customized; \
proxy_set_header X-Real-IP \$remote_addr; \
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; \
} \
location /wx { \
proxy_pass http://msjf-customized; \
proxy_set_header Host msjf-customized; \
proxy_set_header X-Real-IP \$remote_addr; \
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; \
} \
#解决Router(mode: 'history')模式下,刷新路由地址不能找到页面的问题 \
location / { \
root /var/www/html/; \
index index.html index.htm; \
if (!-e \$request_filename) { \
rewrite ^(.*)\$ /index.html?s=\$1 last; \
break; \
} \
} \
access_log /var/log/nginx/access.log ; \
} " > /etc/nginx/conf.d/default.conf \
&& mkdir -p /var/www \
&& mkdir -p /var/www/html
ADD dist/build/h5 /var/www/html/
EXPOSE 80
# nodejs版本 16.14.0
version: '3'
services:
msjf-customized:
build:
context: ../
version: '3'
services:
msjf-customized:
build:
context: ../
image: dockerprivatestorage:80/msjf-customized
\ No newline at end of file
version: '3'
services:
msjf-customized:
image: 1ar8696937.iok.la:22594/msjf-customized
container_name: msjf-customized
ports:
- "81:80"
- "444:443"
environment:
- TZ=Asia/Shanghai
version: '3'
services:
msjf-customized:
image: 1ar8696937.iok.la:22594/msjf-customized
container_name: msjf-customized
ports:
- "81:80"
- "444:443"
environment:
- TZ=Asia/Shanghai
restart: always
\ No newline at end of file
cd ../
yarn install
yarn run build:h5
cd docker
docker-compose -f docker-compose-build.yml build
cd ../
yarn install
yarn run build:h5
cd docker
docker-compose -f docker-compose-build.yml build
docker-compose -f docker-compose-build.yml push
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<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>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<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>
</body>
</html>
{
"name": "uni-preset-vue",
"version": "0.0.0",
"scripts": {
"dev:app": "uni -p app",
"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: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"
},
"dependencies": {
"@dcloudio/uni-app": "3.0.0-alpha-3050320220729001",
"@dcloudio/uni-app-plus": "3.0.0-alpha-3050320220729001",
"@dcloudio/uni-components": "3.0.0-alpha-3050320220729001",
"@dcloudio/uni-h5": "3.0.0-alpha-3050320220729001",
"@dcloudio/uni-mp-alipay": "3.0.0-alpha-3050320220729001",
"@dcloudio/uni-mp-baidu": "3.0.0-alpha-3050320220729001",
"@dcloudio/uni-mp-kuaishou": "3.0.0-alpha-3050320220729001",
"@dcloudio/uni-mp-lark": "3.0.0-alpha-3050320220729001",
"@dcloudio/uni-mp-qq": "3.0.0-alpha-3050320220729001",
"@dcloudio/uni-mp-toutiao": "3.0.0-alpha-3050320220729001",
"@dcloudio/uni-mp-weixin": "3.0.0-alpha-3050320220729001",
"@dcloudio/uni-quickapp-webview": "3.0.0-alpha-3050320220729001",
"@rollup/plugin-alias": "^3.1.9",
"node-sass": "^7.0.1",
"sass": "^1.54.5",
"sass-loader": "^13.0.2",
"vue": "^3.2.37",
"vue-i18n": "^9.1.9"
},
"devDependencies": {
"@dcloudio/types": "^3.0.13",
"@dcloudio/uni-automator": "3.0.0-alpha-3050320220729001",
"@dcloudio/uni-cli-shared": "3.0.0-alpha-3050320220729001",
"@dcloudio/uni-stacktracey": "3.0.0-alpha-3050320220729001",
"@dcloudio/vite-plugin-uni": "3.0.0-alpha-3050320220729001",
"typescript": "^4.7.4",
"vite": "^2.9.14"
}
}
{
"name": "uni-preset-vue",
"version": "0.0.0",
"scripts": {
"dev:app": "uni -p app",
"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: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"
},
"dependencies": {
"@dcloudio/uni-app": "3.0.0-alpha-3050320220729001",
"@dcloudio/uni-app-plus": "3.0.0-alpha-3050320220729001",
"@dcloudio/uni-components": "3.0.0-alpha-3050320220729001",
"@dcloudio/uni-h5": "3.0.0-alpha-3050320220729001",
"@dcloudio/uni-mp-alipay": "3.0.0-alpha-3050320220729001",
"@dcloudio/uni-mp-baidu": "3.0.0-alpha-3050320220729001",
"@dcloudio/uni-mp-kuaishou": "3.0.0-alpha-3050320220729001",
"@dcloudio/uni-mp-lark": "3.0.0-alpha-3050320220729001",
"@dcloudio/uni-mp-qq": "3.0.0-alpha-3050320220729001",
"@dcloudio/uni-mp-toutiao": "3.0.0-alpha-3050320220729001",
"@dcloudio/uni-mp-weixin": "3.0.0-alpha-3050320220729001",
"@dcloudio/uni-quickapp-webview": "3.0.0-alpha-3050320220729001",
"@rollup/plugin-alias": "^3.1.9",
"node-sass": "^7.0.1",
"sass": "^1.54.5",
"sass-loader": "^13.0.2",
"vue": "^3.2.37",
"vue-i18n": "^9.1.9"
},
"devDependencies": {
"@dcloudio/types": "^3.0.13",
"@dcloudio/uni-automator": "3.0.0-alpha-3050320220729001",
"@dcloudio/uni-cli-shared": "3.0.0-alpha-3050320220729001",
"@dcloudio/uni-stacktracey": "3.0.0-alpha-3050320220729001",
"@dcloudio/vite-plugin-uni": "3.0.0-alpha-3050320220729001",
"typescript": "^4.7.4",
"vite": "^2.9.14"
}
}
<script setup lang="ts">
// import { onLaunch, onShow, onHide } from '@dcloudio/uni-app';
// onLaunch(() => {
// console.log('App Launch');
// });
// onShow(() => {
// console.log('App Show');
// });
// onHide(() => {
// console.log('App Hide');
// });
</script>
<style lang="scss">
@import url(common/scss/iconfont.scss);
</style>
<script setup lang="ts">
// import { onLaunch, onShow, onHide } from '@dcloudio/uni-app';
// onLaunch(() => {
// console.log('App Launch');
// });
// onShow(() => {
// console.log('App Show');
// });
// onHide(() => {
// console.log('App Hide');
// });
</script>
<style lang="scss">
@import url(common/scss/iconfont.scss);
</style>
@font-face {
font-family: 'iconfont'; /* Project id 3604159 */
src: url('https://at.alicdn.com/t/c/font_3604159_rbxjoznvkmj.woff2?t=1662358646339') format('woff2'),
url('https://at.alicdn.com/t/c/font_3604159_rbxjoznvkmj.woff?t=1662358646339') format('woff'),
url('https://at.alicdn.com/t/c/font_3604159_rbxjoznvkmj.ttf?t=1662358646339') format('truetype');
}
.iconfont {
font-family: 'iconfont' !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-jia:before {
content: '\e601';
}
.icon-icons03:before {
content: '\e69c';
}
.icon-shanchu:before {
content: '\ec7b';
}
.icon-xiangyou1:before {
content: '\e775';
}
.icon-shezhi:before {
content: '\e64b';
}
.icon-sousuo:before {
content: '\e600';
}
.icon-yanzhengmamima:before {
content: '\e6ba';
}
.icon-mima:before {
content: '\e620';
}
.icon-yanzhengyanzhengma:before {
content: '\e624';
}
.icon-jiahao2fill:before {
content: '\e728';
}
.icon-gouwuchetianjia:before {
content: '\e640';
}
.icon-taocan-suoxiao:before {
content: '\e8cd';
}
.icon-wode:before {
content: '\e70b';
}
.icon-dubanshixiang:before {
content: '\e618';
}
.icon-a-ziyuan16:before {
content: '\e66b';
}
@font-face {
font-family: 'iconfont'; /* Project id 3604159 */
src: url('https://at.alicdn.com/t/c/font_3604159_rbxjoznvkmj.woff2?t=1662358646339') format('woff2'),
url('https://at.alicdn.com/t/c/font_3604159_rbxjoznvkmj.woff?t=1662358646339') format('woff'),
url('https://at.alicdn.com/t/c/font_3604159_rbxjoznvkmj.ttf?t=1662358646339') format('truetype');
}
.iconfont {
font-family: 'iconfont' !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-jia:before {
content: '\e601';
}
.icon-icons03:before {
content: '\e69c';
}
.icon-shanchu:before {
content: '\ec7b';
}
.icon-xiangyou1:before {
content: '\e775';
}
.icon-shezhi:before {
content: '\e64b';
}
.icon-sousuo:before {
content: '\e600';
}
.icon-yanzhengmamima:before {
content: '\e6ba';
}
.icon-mima:before {
content: '\e620';
}
.icon-yanzhengyanzhengma:before {
content: '\e624';
}
.icon-jiahao2fill:before {
content: '\e728';
}
.icon-gouwuchetianjia:before {
content: '\e640';
}
.icon-taocan-suoxiao:before {
content: '\e8cd';
}
.icon-wode:before {
content: '\e70b';
}
.icon-dubanshixiang:before {
content: '\e618';
}
.icon-a-ziyuan16:before {
content: '\e66b';
}
<template>
<view style="margin-bottom: 20rpx;">
<view class="login-input">
<view :class="'iconfont ' + inputData.iconfont + ' login-icon'"></view>
<input
:type="inputData?.type"
:placeholder="inputData.placeholder"
:password="inputData?.password"
class="input-text"
v-model="inputData.inputValue"
@blur="handleValue"
/>
<text class="getcode" v-if="inputData.checkType === 'code'">获取验证码</text>
</view>
<text class="check" v-if="inputData.check">{{ inputData.checkContent }}</text>
</view>
</template>
<script setup lang="ts">
let props = defineProps({
inputData: Object
});
let emits = defineEmits(['hangleInput']);
let handleValue = (Value: any) => {
emits('hangleInput', Value.detail.value, props.inputData?.checkType);
};
</script>
<style lang="scss" scoped>
.login-input {
display: flex;
flex-direction: inherit;
border: 1px solid #ccc;
border-radius: 50rpx;
width: 560rpx;
height: 70rpx;
.login-icon {
line-height: 70rpx;
margin: 0 15rpx;
font-size: 42rpx;
color: #c7c7c7;
}
.input-text {
height: 100%;
line-height: 70rpx;
flex: 1 1 auto;
}
.getcode {
height: 100%;
width: 144rpx;
font-size: 24rpx;
color: #c7c7c7;
line-height: 70rpx;
}
}
.check {
font-size: 24rpx;
color: red;
margin: 0 0 10rpx 21rpx;
}
</style>
<template>
<view style="margin-bottom: 20rpx;">
<view class="login-input">
<view :class="'iconfont ' + inputData.iconfont + ' login-icon'"></view>
<input
:type="inputData?.type"
:placeholder="inputData.placeholder"
:password="inputData?.password"
class="input-text"
v-model="inputData.inputValue"
@blur="handleValue"
/>
<text class="getcode" v-if="inputData.checkType === 'code'">获取验证码</text>
</view>
<text class="check" v-if="inputData.check">{{ inputData.checkContent }}</text>
</view>
</template>
<script setup lang="ts">
let props = defineProps({
inputData: Object
});
let emits = defineEmits(['hangleInput']);
let handleValue = (Value: any) => {
emits('hangleInput', Value.detail.value, props.inputData?.checkType);
};
</script>
<style lang="scss" scoped>
.login-input {
display: flex;
flex-direction: inherit;
border: 1px solid #ccc;
border-radius: 50rpx;
width: 560rpx;
height: 70rpx;
.login-icon {
line-height: 70rpx;
margin: 0 15rpx;
font-size: 42rpx;
color: #c7c7c7;
}
.input-text {
height: 100%;
line-height: 70rpx;
flex: 1 1 auto;
}
.getcode {
height: 100%;
width: 144rpx;
font-size: 24rpx;
color: #c7c7c7;
line-height: 70rpx;
}
}
.check {
font-size: 24rpx;
color: red;
margin: 0 0 10rpx 21rpx;
}
</style>
/// <reference types="vite/client" />
declare module '*.vue' {
import { DefineComponent } from 'vue'
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
const component: DefineComponent<{}, {}, any>
export default component
}
/// <reference types="vite/client" />
declare module '*.vue' {
import { DefineComponent } from 'vue'
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
const component: DefineComponent<{}, {}, any>
export default component
}
import App from './App.vue'
import { createSSRApp } from 'vue'
export function createApp() {
const app = createSSRApp(App)
return {
app
}
}
import App from './App.vue'
import { createSSRApp } from 'vue'
export function createApp() {
const app = createSSRApp(App)
return {
app
}
}
{
"name" : "msjf-h5",
"appid" : "__UNI__3025CA1",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
"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" : {}
}
}
},
/* 快应用特有相关 */
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "wx927a7603ad45bdda",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "3",
"h5" : {
"router" : {
"base" : "./",
"mode" : "hash"
},
"template" : "msjf.h5.html",
"title" : "茅山玖坊"
}
}
{
"name" : "msjf-h5",
"appid" : "__UNI__3025CA1",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
"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" : {}
}
}
},
/* 快应用特有相关 */
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "wx927a7603ad45bdda",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "3",
"h5" : {
"router" : {
"base" : "./",
"mode" : "hash"
},
"template" : "msjf.h5.html",
"title" : "茅山玖坊"
}
}
{
"topWindow": {
"path": "pages/header/index.vue",
"style": {
"height": "60px"
}
},
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/homePage/homePage",
"style": {
"navigationBarTitleText": "",
"topWindow": false
}
}, {
"path": "pages/login/login",
"style": {
"navigationBarTitleText": "登录",
"topWindow": false
}
},
{
"path": "pages/login/pwd",
"style": {
"navigationBarTitleText": "设置密码",
"enablePullDownRefresh": false,
"topWindow": false
}
},
{
"path": "pages/customized/order",
"style": {
"navigationBarTitleText": "订单",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"onReachBottomDistance": 30
}
},
{
"path": "pages/customized/queryRecord",
"style": {
"navigationBarTitleText": "查询记录",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/customized/my",
"style": {
"navigationBarTitleText": "定制",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/customized/importExcel",
"style": {
"navigationBarTitleText": "导出Excel",
"enablePullDownRefresh": false,
"topWindow": false
}
},
{
"path": "pages/customized/queryPwd",
"style": {
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"topWindow": false
}
},
{
"path": "pages/customized/setting",
"style": {
"navigationBarTitleText": "设置",
"enablePullDownRefresh": false,
"topWindow": false
}
},
{
"path": "pages/customized/uploadImageVideo",
"style": {
"navigationBarTitleText": "上传定制",
"enablePullDownRefresh": false,
"topWindow": false
}
},
{
"path": "pages/customized/uploadPreview",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"topWindow": false
}
},
{
"path": "pages/customized/preview",
"style": {
"navigationBarTitleText": "预览",
"enablePullDownRefresh": false,
"topWindow": false
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"condition": { //模式配置,仅开发期间生效
"current": 0, //当前激活的模式(list 的索引项)
"list": [{
"name": "", //模式名称
"path": "pages/customized/my", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
}]
}
}
{
"topWindow": {
"path": "pages/header/index.vue",
"style": {
"height": "60px"
}
},
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/homePage/homePage",
"style": {
"navigationBarTitleText": "",
"topWindow": false
}
}, {
"path": "pages/login/login",
"style": {
"navigationBarTitleText": "登录",
"topWindow": false
}
},
{
"path": "pages/login/pwd",
"style": {
"navigationBarTitleText": "设置密码",
"enablePullDownRefresh": false,
"topWindow": false
}
},
{
"path": "pages/customized/order",
"style": {
"navigationBarTitleText": "订单",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"onReachBottomDistance": 30
}
},
{
"path": "pages/customized/queryRecord",
"style": {
"navigationBarTitleText": "查询记录",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/customized/my",
"style": {
"navigationBarTitleText": "定制",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/customized/importExcel",
"style": {
"navigationBarTitleText": "导出Excel",
"enablePullDownRefresh": false,
"topWindow": false
}
},
{
"path": "pages/customized/queryPwd",
"style": {
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"topWindow": false
}
},
{
"path": "pages/customized/setting",
"style": {
"navigationBarTitleText": "设置",
"enablePullDownRefresh": false,
"topWindow": false
}
},
{
"path": "pages/customized/uploadImageVideo",
"style": {
"navigationBarTitleText": "上传定制",
"enablePullDownRefresh": false,
"topWindow": false
}
},
{
"path": "pages/customized/uploadPreview",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"topWindow": false
}
},
{
"path": "pages/customized/preview",
"style": {
"navigationBarTitleText": "预览",
"enablePullDownRefresh": false,
"topWindow": false
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"condition": { //模式配置,仅开发期间生效
"current": 0, //当前激活的模式(list 的索引项)
"list": [{
"name": "", //模式名称
"path": "pages/customized/my", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
}]
}
}
<template>
<view class="ecl-container">
<picker @change="bindPickerChange" :value="index" :range="array">
<view class="bars">
<text>导出类型</text>
<view class="right">
<view class="uni-input">{{ array[index] }}</view>
<view class="iconfont icon-xiangyou1"></view>
</view>
</view>
</picker>
<uni-datetime-picker v-model="range" type="daterange" @change="changeDateTime" v-if="index == 0">
<view class="bars" @click="changPwd">
<text>选择时间</text>
<view class="right">
<view class="uni-input">{{ dateStr }}</view>
<view class="iconfont icon-xiangyou1"></view>
</view>
</view>
</uni-datetime-picker>
<view class="bars" @click="selectOrder" v-if="index == 0">
<text>选择订单</text>
<view class="iconfont icon-xiangyou1"></view>
</view>
</view>
<uni-popup ref="popup" type="bottom">
<scroll-view scroll-y class="popup-content">
<uni-search-bar :focus="true" v-model="searchValue" @cancel="clickCancel" placeholder="订单号" cancelButton="always" cancelText="搜索" />
<view class="content" v-for="(item, i) in list" :key="i">
<!-- <checkbox-group>
<label>
<checkbox value="cb" :checked="checkOrder" />
订单号:961973496748
</label>
</checkbox-group> -->
<checkbox-group @change="checkSelectItem($event, item)">
<label>
<checkbox :value="item.value" :checked="item.checked" />
{{ item.order }}
</label>
</checkbox-group>
<view class="divider" />
<view class="order-item" v-for="(list, i) in 5" :key="i">
<image src="/static/msjf-picture/msjf-17.jpg" mode="widthFix" style="width: 80rpx; margin-right: 20rpx"></image>
<view class="order-title">巷子浅大师版</view>
</view>
</view>
</scroll-view>
<view class="popup-footer">
<checkbox-group>
<label>
<checkbox value="cb" :checked="checkTrue" />
全选
</label>
</checkbox-group>
<view @click="clickConfirm">确定</view>
</view>
</uni-popup>
</template>
<script setup lang="ts">
import { ref } from 'vue';
let popup = ref();
let index = ref<any>(0);
let array = ref(['自定义导入', '导出全部']);
let startDate = ref();
let endDate = ref();
let range = ref();
let dateStr = ref();
let searchValue = ref();
// 全部选中
let checkTrue = ref();
let list = ref([
{
order: '订单号:961973496748',
value: '1',
checked: false
},
{
order: '订单号:145463121654',
value: '2',
checked: true
}
]);
let checkSelectItem = (e: any) => {
console.log(e.detail.value);
};
// 导出类型
let bindPickerChange = (e: any) => {
index.value = e.detail.value;
};
// 选择时间
let changeDateTime = (e: any) => {
let date1 = e[0];
let date2 = e[1];
dateStr.value = date1 + '至' + date2;
};
// 选择订单
let selectOrder = () => {
popup.value.open('bottom');
};
// 搜索订单
let clickCancel = (e: any) => {
console.log(e.value);
};
// 确定按钮
let clickConfirm = () => {
popup.value.close();
};
</script>
<style lang="scss" scoped>
.ecl-container {
min-height: 100vh;
background-color: #eceff6;
margin-top: 20rpx;
.bars {
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
height: 100rpx;
font-size: 28rpx;
background-color: #fff;
padding: 20rpx;
margin-bottom: 6rpx;
.right {
display: flex;
justify-content: space-between;
align-items: center;
.uni-input {
font-size: 24rpx;
color: #ccc;
margin-right: 10rpx;
}
}
}
}
.popup-content {
box-sizing: border-box;
background-color: #eceff6;
padding: 20rpx;
height: 80vh;
.content {
box-sizing: border-box;
width: 100%;
background-color: #fff;
padding: 40rpx;
border-radius: 10rpx;
margin-bottom: 20rpx;
.divider {
background: #ebedf0;
width: 100%;
height: 1rpx;
margin: 20rpx 0;
}
.order-item {
display: flex;
flex-direction: row;
margin-bottom: 10rpx;
}
}
}
.popup-footer {
position: fixed;
bottom: 0;
display: flex;
justify-content: space-between;
box-sizing: border-box;
background-color: #fff;
width: 100%;
height: 120rpx;
padding: 20rpx 40rpx 0 40rpx;
}
</style>
<template>
<view class="ecl-container">
<picker @change="bindPickerChange" :value="index" :range="array">
<view class="bars">
<text>导出类型</text>
<view class="right">
<view class="uni-input">{{ array[index] }}</view>
<view class="iconfont icon-xiangyou1"></view>
</view>
</view>
</picker>
<uni-datetime-picker v-model="range" type="daterange" @change="changeDateTime" v-if="index == 0">
<view class="bars" @click="changPwd">
<text>选择时间</text>
<view class="right">
<view class="uni-input">{{ dateStr }}</view>
<view class="iconfont icon-xiangyou1"></view>
</view>
</view>
</uni-datetime-picker>
<view class="bars" @click="selectOrder" v-if="index == 0">
<text>选择订单</text>
<view class="iconfont icon-xiangyou1"></view>
</view>
</view>
<uni-popup ref="popup" type="bottom">
<scroll-view scroll-y class="popup-content">
<uni-search-bar :focus="true" v-model="searchValue" @cancel="clickCancel" placeholder="订单号" cancelButton="always" cancelText="搜索" />
<view class="content" v-for="(item, i) in list" :key="i">
<!-- <checkbox-group>
<label>
<checkbox value="cb" :checked="checkOrder" />
订单号:961973496748
</label>
</checkbox-group> -->
<checkbox-group @change="checkSelectItem($event, item)">
<label>
<checkbox :value="item.value" :checked="item.checked" />
{{ item.order }}
</label>
</checkbox-group>
<view class="divider" />
<view class="order-item" v-for="(list, i) in 5" :key="i">
<image src="/static/msjf-picture/msjf-17.jpg" mode="widthFix" style="width: 80rpx; margin-right: 20rpx"></image>
<view class="order-title">巷子浅大师版</view>
</view>
</view>
</scroll-view>
<view class="popup-footer">
<checkbox-group>
<label>
<checkbox value="cb" :checked="checkTrue" />
全选
</label>
</checkbox-group>
<view @click="clickConfirm">确定</view>
</view>
</uni-popup>
</template>
<script setup lang="ts">
import { ref } from 'vue';
let popup = ref();
let index = ref<any>(0);
let array = ref(['自定义导入', '导出全部']);
let startDate = ref();
let endDate = ref();
let range = ref();
let dateStr = ref();
let searchValue = ref();
// 全部选中
let checkTrue = ref();
let list = ref([
{
order: '订单号:961973496748',
value: '1',
checked: false
},
{
order: '订单号:145463121654',
value: '2',
checked: true
}
]);
let checkSelectItem = (e: any) => {
console.log(e.detail.value);
};
// 导出类型
let bindPickerChange = (e: any) => {
index.value = e.detail.value;
};
// 选择时间
let changeDateTime = (e: any) => {
let date1 = e[0];
let date2 = e[1];
dateStr.value = date1 + '至' + date2;
};
// 选择订单
let selectOrder = () => {
popup.value.open('bottom');
};
// 搜索订单
let clickCancel = (e: any) => {
console.log(e.value);
};
// 确定按钮
let clickConfirm = () => {
popup.value.close();
};
</script>
<style lang="scss" scoped>
.ecl-container {
min-height: 100vh;
background-color: #eceff6;
margin-top: 20rpx;
.bars {
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
height: 100rpx;
font-size: 28rpx;
background-color: #fff;
padding: 20rpx;
margin-bottom: 6rpx;
.right {
display: flex;
justify-content: space-between;
align-items: center;
.uni-input {
font-size: 24rpx;
color: #ccc;
margin-right: 10rpx;
}
}
}
}
.popup-content {
box-sizing: border-box;
background-color: #eceff6;
padding: 20rpx;
height: 80vh;
.content {
box-sizing: border-box;
width: 100%;
background-color: #fff;
padding: 40rpx;
border-radius: 10rpx;
margin-bottom: 20rpx;
.divider {
background: #ebedf0;
width: 100%;
height: 1rpx;
margin: 20rpx 0;
}
.order-item {
display: flex;
flex-direction: row;
margin-bottom: 10rpx;
}
}
}
.popup-footer {
position: fixed;
bottom: 0;
display: flex;
justify-content: space-between;
box-sizing: border-box;
background-color: #fff;
width: 100%;
height: 120rpx;
padding: 20rpx 40rpx 0 40rpx;
}
</style>
<template>
<view class="status_bar"><!-- 这里是状态栏 --></view>
<headerVue :color2="color"></headerVue>
<view class="my-container">
<view class="herder">
<text></text>
<view class="iconfont icon-shezhi icon" @click="openSetting"></view>
</view>
<view class="detail">
<view>中国茅台镇</view>
<view>高端定制酱酒首选品牌</view>
<view class="smallsize-font">Maotai Town, China The preferred brand</view>
<view class="smallsize-font">of high-end customized sauce wine</view>
</view>
<view class="content">
<view class="top">
<image
src="../../static/msjf-picture/msjf-09.png"
mode="widthFix"
class="top-image"
></image>
<image
src="../../static/msjf-picture/msjf-10.png"
mode="widthFix"
class="bottom-image"
@click="currencyTemplate"
></image>
</view>
<view class="top">
<image
src="../../static/msjf-picture/msjf-11.png"
mode="widthFix"
class="top-image"
></image>
<image
src="../../static/msjf-picture/msjf-12.png"
mode="widthFix"
class="bottom-image"
@click="blankTemplate"
/>
</view>
</view>
<upload-preview style="margin-top: 60rpx;" @initHavePage="initHavePage"></upload-preview>
<view class="qr-code">
<text style="margin-right: 60rpx;">科 技 赋 能</text>
<image
src="../../static/msjf-picture/msjf-13.jpg"
mode="widthFix"
style="width: 144rpx;"
></image>
<text style="margin-left: 60rpx;">高 端 酱 酒</text>
</view>
</view>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { getHavePage, getPageComponent } from '@/services/api';
import headerVue from '@/pages/header/index.vue';
import uploadPreview from './uploadPreview.vue';
let color = ref('#a27443');
// 通用模板初始数据
let currencyPage = ref();
let openSetting = () => {
uni.navigateTo({
url: './setting',
});
};
// 通用
let currencyTemplate = async () => {
let res: any = await getPageComponent({ pageId: currencyPage.value[0].id });
console.log(res.data, '通用');
uni.navigateTo({
url: `./uploadImageVideo?type=${JSON.stringify('currency')}&currencyPage=${JSON.stringify(
res.data
)}&id=${currencyPage.value[0].id}`,
});
};
// 空白
let blankTemplate = () => {
uni.navigateTo({
url: `./uploadImageVideo?type=${JSON.stringify('blank')}`,
});
};
let initHavePage = async () => {
uni.showLoading({
title: '加载中...',
});
let res: any = await getHavePage();
if (res.data) {
uni.hideLoading();
}
currencyPage.value = res.data.currencyPage;
uni.$emit('previewData', { previewData: res.data });
};
uni.$on('updateData', function() {
initHavePage();
});
initHavePage();
</script>
<style lang="scss" scoped>
page {
background-color: #f2f2f2;
}
.status_bar {
height: var(--status-bar-height);
width: 100%;
}
.my-container {
padding: 20rpx 30rpx 10rpx 30rpx;
.herder {
display: flex;
justify-content: space-between;
font-size: 18px;
margin-bottom: 20rpx;
.icon-shezhi:before {
font-size: 18px;
}
}
.top {
position: relative;
.top-image {
width: 100%;
}
.bottom-image {
position: absolute;
left: 62%;
bottom: 13%;
width: 200rpx;
}
&:nth-child(1) {
margin-bottom: 20rpx;
}
}
.detail {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-bottom: 60rpx;
view {
color: rgb(211, 168, 130);
font-size: 32rpx;
font-weight: 600;
&:nth-child(3) {
margin-top: 20rpx;
text-align: right;
margin-left: 28%;
}
&:nth-child(4) {
margin-left: 24%;
}
}
.smallsize-font {
font-size: 12px;
font-weight: normal;
-webkit-transform-origin-x: 0;
-webkit-transform: scale(0.55);
}
}
.qr-code {
display: flex;
align-items: center;
justify-content: center;
flex-direction: row;
width: 100%;
height: 140rpx;
margin: 100rpx 0 50rpx 0;
}
}
.popup-content {
width: 100%;
height: 100vh;
.popup-upload {
height: 100rpx;
font-size: 36rpx;
line-height: 100rpx;
text-align: center;
border-bottom: 1px solid #ccc;
}
}
</style>
<template>
<view class="status_bar"><!-- 这里是状态栏 --></view>
<headerVue :color2="color"></headerVue>
<view class="my-container">
<view class="herder">
<text></text>
<view class="iconfont icon-shezhi icon" @click="openSetting"></view>
</view>
<view class="detail">
<view>中国茅台镇</view>
<view>高端定制酱酒首选品牌</view>
<view class="smallsize-font">Maotai Town, China The preferred brand</view>
<view class="smallsize-font">of high-end customized sauce wine</view>
</view>
<view class="content">
<view class="top">
<image
src="../../static/msjf-picture/msjf-09.png"
mode="widthFix"
class="top-image"
></image>
<image
src="../../static/msjf-picture/msjf-10.png"
mode="widthFix"
class="bottom-image"
@click="currencyTemplate"
></image>
</view>
<view class="top">
<image
src="../../static/msjf-picture/msjf-11.png"
mode="widthFix"
class="top-image"
></image>
<image
src="../../static/msjf-picture/msjf-12.png"
mode="widthFix"
class="bottom-image"
@click="blankTemplate"
/>
</view>
</view>
<upload-preview style="margin-top: 60rpx;" @initHavePage="initHavePage"></upload-preview>
<view class="qr-code">
<text style="margin-right: 60rpx;">科 技 赋 能</text>
<image
src="../../static/msjf-picture/msjf-13.jpg"
mode="widthFix"
style="width: 144rpx;"
></image>
<text style="margin-left: 60rpx;">高 端 酱 酒</text>
</view>
</view>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { getHavePage, getPageComponent } from '@/services/api';
import headerVue from '@/pages/header/index.vue';
import uploadPreview from './uploadPreview.vue';
let color = ref('#a27443');
// 通用模板初始数据
let currencyPage = ref();
let openSetting = () => {
uni.navigateTo({
url: './setting',
});
};
// 通用
let currencyTemplate = async () => {
let res: any = await getPageComponent({ pageId: currencyPage.value[0].id });
console.log(res.data, '通用');
uni.navigateTo({
url: `./uploadImageVideo?type=${JSON.stringify('currency')}&currencyPage=${JSON.stringify(
res.data
)}&id=${currencyPage.value[0].id}`,
});
};
// 空白
let blankTemplate = () => {
uni.navigateTo({
url: `./uploadImageVideo?type=${JSON.stringify('blank')}`,
});
};
let initHavePage = async () => {
uni.showLoading({
title: '加载中...',
});
let res: any = await getHavePage();
if (res.data) {
uni.hideLoading();
}
currencyPage.value = res.data.currencyPage;
uni.$emit('previewData', { previewData: res.data });
};
uni.$on('updateData', function() {
initHavePage();
});
initHavePage();
</script>
<style lang="scss" scoped>
page {
background-color: #f2f2f2;
}
.status_bar {
height: var(--status-bar-height);
width: 100%;
}
.my-container {
padding: 20rpx 30rpx 10rpx 30rpx;
.herder {
display: flex;
justify-content: space-between;
font-size: 18px;
margin-bottom: 20rpx;
.icon-shezhi:before {
font-size: 18px;
}
}
.top {
position: relative;
.top-image {
width: 100%;
}
.bottom-image {
position: absolute;
left: 62%;
bottom: 13%;
width: 200rpx;
}
&:nth-child(1) {
margin-bottom: 20rpx;
}
}
.detail {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-bottom: 60rpx;
view {
color: rgb(211, 168, 130);
font-size: 32rpx;
font-weight: 600;
&:nth-child(3) {
margin-top: 20rpx;
text-align: right;
margin-left: 28%;
}
&:nth-child(4) {
margin-left: 24%;
}
}
.smallsize-font {
font-size: 12px;
font-weight: normal;
-webkit-transform-origin-x: 0;
-webkit-transform: scale(0.55);
}
}
.qr-code {
display: flex;
align-items: center;
justify-content: center;
flex-direction: row;
width: 100%;
height: 140rpx;
margin: 100rpx 0 50rpx 0;
}
}
.popup-content {
width: 100%;
height: 100vh;
.popup-upload {
height: 100rpx;
font-size: 36rpx;
line-height: 100rpx;
text-align: center;
border-bottom: 1px solid #ccc;
}
}
</style>
<template>
<view class="pre-container">
<view class="pre-image" v-for="(item, i) in pageData" :key="i">
<image v-if="item.type == 'image/jpeg' || item.type == 'image/png'" :src="baseURL + downUrl + item.pageComponent" mode="widthFix" style="width: 100%;"></image>
<video v-else :src="baseURL + downUrl + item.pageComponent" object-fit="fill" class="pre-video" />
</view>
<view style="width: 100%; height: 40rpx;"></view>
</view>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import { baseURL } from '@/services/request';
let pageData = ref();
let downUrl = '/wx/storage/fetch/';
onLoad((options: any) => {
pageData.value = JSON.parse(options.pageData);
console.log(pageData.value);
});
</script>
<style lang="scss" scoped>
.pre-container {
box-sizing: border-box;
padding: 30rpx;
width: 100%;
height: 100vh;
.pre-image {
display: flex;
}
.pre-video {
width: 100%;
video {
width: 100%;
height: 0;
padding-bottom: 56.25%;
}
}
}
</style>
<template>
<view class="pre-container">
<view class="pre-image" v-for="(item, i) in pageData" :key="i">
<image v-if="item.type == 'image/jpeg' || item.type == 'image/png'" :src="baseURL + downUrl + item.pageComponent" mode="widthFix" style="width: 100%;"></image>
<video v-else :src="baseURL + downUrl + item.pageComponent" object-fit="fill" class="pre-video" />
</view>
<view style="width: 100%; height: 40rpx;"></view>
</view>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import { baseURL } from '@/services/request';
let pageData = ref();
let downUrl = '/wx/storage/fetch/';
onLoad((options: any) => {
pageData.value = JSON.parse(options.pageData);
console.log(pageData.value);
});
</script>
<style lang="scss" scoped>
.pre-container {
box-sizing: border-box;
padding: 30rpx;
width: 100%;
height: 100vh;
.pre-image {
display: flex;
}
.pre-video {
width: 100%;
video {
width: 100%;
height: 0;
padding-bottom: 56.25%;
}
}
}
</style>
<template>
<uni-nav-bar left-icon="left" @clickLeft="clickLeft">
<template #default>
<view class="default">
<view :class="navbar == '0' ? 'sn switch' : 'sn'" @click="navbarLeft">SN码</view>
<view :class="navbar != '0' ? 'jiesuo switch' : 'jiesuo'" @click="navbarRight">解锁密码</view>
</view>
</template>
</uni-nav-bar>
<view class="query-container">
<view class="bgc"><uni-search-bar :focus="true" cancelButton="always" v-model="searchValue" @cancel="cancel" @clear="clear"></uni-search-bar></view>
</view>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
let searchValue = ref();
let navbar = ref('0');
let cancel = () => {
let page = getCurrentPages();
console.log(page);
};
let navbarLeft = () => {
navbar.value = '0';
};
let navbarRight = () => {
navbar.value = '1';
};
let clear = () => {};
let clickLeft = () => {
uni.navigateBack();
};
</script>
<style lang="scss" scoped>
::v-deep .uni-navbar__header-container {
justify-content: center;
align-items: center;
}
.default {
display: flex;
justify-content: flex-start;
width: 260rpx;
height: 50rpx;
font-size: 24rpx;
border: 2rpx solid #cccccc;
border-radius: 20rpx;
color: #4875ea;
overflow: hidden;
.sn {
height: 100%;
width: 50%;
border-right: 2rpx solid #cccccc;
text-align: center;
line-height: 50rpx;
}
.jiesuo {
height: 100%;
width: 50%;
text-align: center;
line-height: 50rpx;
}
.switch {
background-color: #4875ea;
color: #fff;
}
}
.query-container {
min-height: 100vh;
background-color: #eceff6;
.bgc {
height: 120rpx;
background-color: #fff;
}
}
</style>
<template>
<uni-nav-bar left-icon="left" @clickLeft="clickLeft">
<template #default>
<view class="default">
<view :class="navbar == '0' ? 'sn switch' : 'sn'" @click="navbarLeft">SN码</view>
<view :class="navbar != '0' ? 'jiesuo switch' : 'jiesuo'" @click="navbarRight">解锁密码</view>
</view>
</template>
</uni-nav-bar>
<view class="query-container">
<view class="bgc"><uni-search-bar :focus="true" cancelButton="always" v-model="searchValue" @cancel="cancel" @clear="clear"></uni-search-bar></view>
</view>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
let searchValue = ref();
let navbar = ref('0');
let cancel = () => {
let page = getCurrentPages();
console.log(page);
};
let navbarLeft = () => {
navbar.value = '0';
};
let navbarRight = () => {
navbar.value = '1';
};
let clear = () => {};
let clickLeft = () => {
uni.navigateBack();
};
</script>
<style lang="scss" scoped>
::v-deep .uni-navbar__header-container {
justify-content: center;
align-items: center;
}
.default {
display: flex;
justify-content: flex-start;
width: 260rpx;
height: 50rpx;
font-size: 24rpx;
border: 2rpx solid #cccccc;
border-radius: 20rpx;
color: #4875ea;
overflow: hidden;
.sn {
height: 100%;
width: 50%;
border-right: 2rpx solid #cccccc;
text-align: center;
line-height: 50rpx;
}
.jiesuo {
height: 100%;
width: 50%;
text-align: center;
line-height: 50rpx;
}
.switch {
background-color: #4875ea;
color: #fff;
}
}
.query-container {
min-height: 100vh;
background-color: #eceff6;
.bgc {
height: 120rpx;
background-color: #fff;
}
}
</style>
<template>
<view class="setting-container">
<view class="bars" @click="changPwd">
<text>修改密码</text>
<view class="iconfont icon-xiangyou1"></view>
</view>
<view class="bars" @click="logOut">
<text>退出登录</text>
<view class="iconfont icon-xiangyou1"></view>
</view>
</view>
</template>
<script setup lang="ts">
let logOut = () => {
uni.navigateTo({
url: '/pages/login/login',
success() {
uni.clearStorage();
}
});
};
let changPwd = () => {
uni.navigateTo({
url: '/pages/login/pwd'
});
};
</script>
<style lang="scss" scoped>
.setting-container {
min-height: 100vh;
background-color: #eceff6;
padding-top: 20rpx;
.bars {
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
height: 100rpx;
font-size: 28rpx;
background-color: #fff;
padding: 20rpx;
margin-bottom: 6rpx;
}
}
</style>
<template>
<view class="setting-container">
<view class="bars" @click="changPwd">
<text>修改密码</text>
<view class="iconfont icon-xiangyou1"></view>
</view>
<view class="bars" @click="logOut">
<text>退出登录</text>
<view class="iconfont icon-xiangyou1"></view>
</view>
</view>
</template>
<script setup lang="ts">
let logOut = () => {
uni.navigateTo({
url: '/pages/login/login',
success() {
uni.clearStorage();
}
});
};
let changPwd = () => {
uni.navigateTo({
url: '/pages/login/pwd'
});
};
</script>
<style lang="scss" scoped>
.setting-container {
min-height: 100vh;
background-color: #eceff6;
padding-top: 20rpx;
.bars {
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
height: 100rpx;
font-size: 28rpx;
background-color: #fff;
padding: 20rpx;
margin-bottom: 6rpx;
}
}
</style>
<template>
<uni-section title="定制模板列表" type="line">
<view class="preview-container">
<view v-for="(item, index) in previewData" :key="item.id">
<view class="preview-list">
<view style="transform:scale(0.7)">
<radio-group><radio value="defValue" :checked="item.check" :disabled="item.check" @click="radioChange(item, index)" /></radio-group>
</view>
<view class="img"><image :src="baseURL + downUrl + item.cover" mode="aspectFill" class="preview-img" /></view>
<view class="preview-content">
<text>创建时间: {{ item.createTime }}</text>
<view class="options">
<view size="mini" @tap="preview(item.id)" class="box">预览</view>
<view @tap="preEdit(item.id)" class="box">编辑</view>
<view size="mini" @tap="preDelete(item.id)" class="box">删除</view>
</view>
</view>
</view>
<view v-if="index != previewData.length - 1" class="divider"></view>
</view>
</view>
</uni-section>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { onBackPress } from '@dcloudio/uni-app';
import { baseURL } from '@/services/request';
import { getPageComponent, deletePageComponent, customPageChecked } from '@/services/api';
let downUrl = '/wx/storage/fetch/';
let emits = defineEmits(['initHavePage']);
// 模板列表
let previewData = ref();
// 模板子列表数据
let pageData = ref();
let radioChange = (data: any, i: number) => {
if (data.check == true) return;
uni.showModal({
content: '确认设为默认?',
success(res) {
if (res.confirm) {
customPageChecked({ customPageId: data.id }).then((res: any) => {
if (res.data.errno == 0) {
emits('initHavePage');
}
});
} else {
location.reload();
}
}
});
};
// 删除模板列表
let preDelete = async (id: number) => {
uni.showModal({
cancelText: '取消',
confirmText: '确认',
content: '确认删除图片?',
success: async (res: any) => {
if (res.confirm) {
let data: any = await deletePageComponent({ id });
if (data.data.errno == 0) emits('initHavePage');
}
}
});
};
// 获取预览数据
let preview = async (id: number) => {
let res: any = await getPageComponent({ pageId: id });
if (res.statusCode == 200) {
pageData.value = res.data;
uni.navigateTo({
url: `./preview?pageData=${JSON.stringify(pageData.value)}`
});
}
};
// 编辑模板数据
let preEdit = async (id: number) => {
let res: any = await getPageComponent({ pageId: id });
if (res.statusCode == 200) {
pageData.value = res.data;
uni.navigateTo({
url: `./uploadImageVideo?pageData=${JSON.stringify(pageData.value)}&type=${JSON.stringify('edit')}&templateId=${JSON.stringify(id)}`
});
}
};
let initHavePage = async () => {
uni.$on('previewData', (data: any) => {
previewData.value = data.previewData.customPage;
for (let s in previewData.value) {
if (previewData.value[s].id == data.previewData.checkedId) previewData.value[s]['check'] = true;
else previewData.value[s]['check'] = false;
}
});
};
initHavePage();
onBackPress(() => {
uni.navigateBack({
delta: 0
});
});
</script>
<style lang="scss" scoped>
.preview-container {
padding: 10rpx;
border: 2px solid #dfdfdf;
.preview-list {
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: flex-start;
width: 100%;
height: 100px;
padding: 10rpx 0;
.img {
width: 130px;
height: 100%;
display: flex;
align-items: center;
// margin-right: 20rpx;
.preview-img {
width: 100%;
height: 100%;
margin-right: 100rpx;
border-radius: 10rpx;
}
}
.preview-content {
box-sizing: border-box;
display: flex;
flex-direction: column;
padding: 20rpx 0;
text {
font-size: 12px;
color: #ccc;
margin-bottom: 20%;
}
.options {
display: flex;
flex-direction: row;
align-items: flex-start;
.box {
width: 100rpx;
height: 40rpx;
text-align: center;
line-height: 42rpx;
// padding: 14rpx;
border: 1px solid #ccc;
border-radius: 7px;
margin-right: 10rpx;
}
}
}
}
.divider {
border: 0.5px solid #dfdfdf;
}
}
</style>
<template>
<uni-section title="定制模板列表" type="line">
<view class="preview-container">
<view v-for="(item, index) in previewData" :key="item.id">
<view class="preview-list">
<view style="transform:scale(0.7)">
<radio-group><radio value="defValue" :checked="item.check" :disabled="item.check" @click="radioChange(item, index)" /></radio-group>
</view>
<view class="img"><image :src="baseURL + downUrl + item.cover" mode="aspectFill" class="preview-img" /></view>
<view class="preview-content">
<text>创建时间: {{ item.createTime }}</text>
<view class="options">
<view size="mini" @tap="preview(item.id)" class="box">预览</view>
<view @tap="preEdit(item.id)" class="box">编辑</view>
<view size="mini" @tap="preDelete(item.id)" class="box">删除</view>
</view>
</view>
</view>
<view v-if="index != previewData.length - 1" class="divider"></view>
</view>
</view>
</uni-section>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { onBackPress } from '@dcloudio/uni-app';
import { baseURL } from '@/services/request';
import { getPageComponent, deletePageComponent, customPageChecked } from '@/services/api';
let downUrl = '/wx/storage/fetch/';
let emits = defineEmits(['initHavePage']);
// 模板列表
let previewData = ref();
// 模板子列表数据
let pageData = ref();
let radioChange = (data: any, i: number) => {
if (data.check == true) return;
uni.showModal({
content: '确认设为默认?',
success(res) {
if (res.confirm) {
customPageChecked({ customPageId: data.id }).then((res: any) => {
if (res.data.errno == 0) {
emits('initHavePage');
}
});
} else {
location.reload();
}
}
});
};
// 删除模板列表
let preDelete = async (id: number) => {
uni.showModal({
cancelText: '取消',
confirmText: '确认',
content: '确认删除图片?',
success: async (res: any) => {
if (res.confirm) {
let data: any = await deletePageComponent({ id });
if (data.data.errno == 0) emits('initHavePage');
}
}
});
};
// 获取预览数据
let preview = async (id: number) => {
let res: any = await getPageComponent({ pageId: id });
if (res.statusCode == 200) {
pageData.value = res.data;
uni.navigateTo({
url: `./preview?pageData=${JSON.stringify(pageData.value)}`
});
}
};
// 编辑模板数据
let preEdit = async (id: number) => {
let res: any = await getPageComponent({ pageId: id });
if (res.statusCode == 200) {
pageData.value = res.data;
uni.navigateTo({
url: `./uploadImageVideo?pageData=${JSON.stringify(pageData.value)}&type=${JSON.stringify('edit')}&templateId=${JSON.stringify(id)}`
});
}
};
let initHavePage = async () => {
uni.$on('previewData', (data: any) => {
previewData.value = data.previewData.customPage;
for (let s in previewData.value) {
if (previewData.value[s].id == data.previewData.checkedId) previewData.value[s]['check'] = true;
else previewData.value[s]['check'] = false;
}
});
};
initHavePage();
onBackPress(() => {
uni.navigateBack({
delta: 0
});
});
</script>
<style lang="scss" scoped>
.preview-container {
padding: 10rpx;
border: 2px solid #dfdfdf;
.preview-list {
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: flex-start;
width: 100%;
height: 100px;
padding: 10rpx 0;
.img {
width: 130px;
height: 100%;
display: flex;
align-items: center;
// margin-right: 20rpx;
.preview-img {
width: 100%;
height: 100%;
margin-right: 100rpx;
border-radius: 10rpx;
}
}
.preview-content {
box-sizing: border-box;
display: flex;
flex-direction: column;
padding: 20rpx 0;
text {
font-size: 12px;
color: #ccc;
margin-bottom: 20%;
}
.options {
display: flex;
flex-direction: row;
align-items: flex-start;
.box {
width: 100rpx;
height: 40rpx;
text-align: center;
line-height: 42rpx;
// padding: 14rpx;
border: 1px solid #ccc;
border-radius: 7px;
margin-right: 10rpx;
}
}
}
}
.divider {
border: 0.5px solid #dfdfdf;
}
}
</style>
<template>
<view class="header-container">
<navigator url="/pages/customized/order" :style="{ color: color }" class="order">订单</navigator>
<navigator url="/pages/customized/queryRecord" :style="{ color: color1 }" class="queryRecord">查询信息</navigator>
<navigator url="/pages/customized/my" :style="{ color: color2 }" class="my">定制</navigator>
<!-- <custom-tab-bar class="tab-bar-flex" direction="horizontal" :show-icon="false" :selected="current" @onTabItemTap="toSecondMenu" /> -->
</view>
</template>
<script setup lang="ts">
import { ref, watch } from 'vue';
let props = defineProps({
color: { type: String, default: '' },
color1: { type: String, default: '' },
color2: { type: String, default: '' }
});
</script>
<style lang="scss" scoped>
.header-container {
box-sizing: border-box;
width: 100%;
height: 100rpx;
display: flex;
justify-content: space-between;
padding: 30rpx;
background-color: #fff;
border-bottom: 1px solid #e8e8e8;
.order {
margin-left: 20rpx;
}
.hover {
color: red !important;
}
.queryrecord {
}
.my {
margin-right: 20rpx;
}
}
</style>
<template>
<view class="header-container">
<navigator url="/pages/customized/order" :style="{ color: color }" class="order">订单</navigator>
<navigator url="/pages/customized/queryRecord" :style="{ color: color1 }" class="queryRecord">查询信息</navigator>
<navigator url="/pages/customized/my" :style="{ color: color2 }" class="my">定制</navigator>
<!-- <custom-tab-bar class="tab-bar-flex" direction="horizontal" :show-icon="false" :selected="current" @onTabItemTap="toSecondMenu" /> -->
</view>
</template>
<script setup lang="ts">
import { ref, watch } from 'vue';
let props = defineProps({
color: { type: String, default: '' },
color1: { type: String, default: '' },
color2: { type: String, default: '' }
});
</script>
<style lang="scss" scoped>
.header-container {
box-sizing: border-box;
width: 100%;
height: 100rpx;
display: flex;
justify-content: space-between;
padding: 30rpx;
background-color: #fff;
border-bottom: 1px solid #e8e8e8;
.order {
margin-left: 20rpx;
}
.hover {
color: red !important;
}
.queryrecord {
}
.my {
margin-right: 20rpx;
}
}
</style>
<template>
<view class="content" :animation="animationData">
<image src="/static/msjf-picture/logo.png" mode="widthFix" style="width: 50%;"></image>
<view class="main"></view>
<text class="c-text">科 技 赋 能 高 端 定 制 酒</text>
</view>
<!-- <uni-transition class="content" >
<image src="/static/msjf-picture/msjf-08.jpg" mode="widthFix" style="width: 50%;"></image>
<view class="main"></view>
<text class="c-text">科 技 赋 能 高 端 定 制 酒</text>
</uni-transition> -->
</template>
<script setup lang="ts">
import { ref, reactive } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
let animationData = ref();
let userData = reactive({
sequenceCode: '',
userId: ''
});
onLoad(() => {
let animation = uni.createAnimation({
duration: 2000,
timingFunction: 'ease-out'
});
animation.scale(0.5, 0.5).step();
animationData.value = animation.export();
setTimeout(() => {
uni.redirectTo({
url: `/pages/login/login`
});
}, 2000);
});
</script>
<style>
page {
background-color: #fff;
}
.content {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
padding-top: 30%;
height: 100vh;
width: 100%;
box-sizing: border-box;
}
.main {
flex: 1;
}
.c-text {
flex-grow: 0.5;
color: #a36f54;
}
</style>
<template>
<view class="content" :animation="animationData">
<image src="/static/msjf-picture/logo.png" mode="widthFix" style="width: 50%;"></image>
<view class="main"></view>
<text class="c-text">科 技 赋 能 高 端 定 制 酒</text>
</view>
<!-- <uni-transition class="content" >
<image src="/static/msjf-picture/msjf-08.jpg" mode="widthFix" style="width: 50%;"></image>
<view class="main"></view>
<text class="c-text">科 技 赋 能 高 端 定 制 酒</text>
</uni-transition> -->
</template>
<script setup lang="ts">
import { ref, reactive } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
let animationData = ref();
let userData = reactive({
sequenceCode: '',
userId: ''
});
onLoad(() => {
let animation = uni.createAnimation({
duration: 2000,
timingFunction: 'ease-out'
});
animation.scale(0.5, 0.5).step();
animationData.value = animation.export();
setTimeout(() => {
uni.redirectTo({
url: `/pages/login/login`
});
}, 2000);
});
</script>
<style>
page {
background-color: #fff;
}
.content {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
padding-top: 30%;
height: 100vh;
width: 100%;
box-sizing: border-box;
}
.main {
flex: 1;
}
.c-text {
flex-grow: 0.5;
color: #a36f54;
}
</style>
<template>
<view class="content">
<image class="logo" src="/static/logo.png" />
<view class="text-area">
<text class="title">{{ title }}</text>
</view>
</view>
</template>
<script setup lang="ts">
import { ref } from 'vue'
const title = ref('Hello')
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
</style>
<template>
<view class="content">
<image class="logo" src="/static/logo.png" />
<view class="text-area">
<text class="title">{{ title }}</text>
</view>
</view>
</template>
<script setup lang="ts">
import { ref } from 'vue'
const title = ref('Hello')
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
</style>
<template>
<view class="login-container">
<image src="/static/msjf-picture/msjf-06.png" mode="scaleToFill" class="title-iamge"></image>
<text class="login-text">欢迎登陆</text>
<text class="login-text1">茅山玖坊高端定制酒</text>
<view class="login-form">
<input-login :inputData="inputData" @hangleInput="hangleInput" />
<input-login :inputData="inputData1" @hangleInput="hangleInput" />
</view>
<image src="/static/msjf-picture/msjf-07.png" mode="" class="next-step" @click="clickNextStep"></image>
<text class="footer-text">定制管理平台</text>
</view>
</template>
<script setup lang="ts">
import { reactive } from 'vue';
import { login } from '@/services/api';
import inputLogin from '@/components/inputLogin.vue';
let inputData = reactive({
inputValue: '' as any,
iconfont: 'icon-a-ziyuan16',
placeholder: '手机号码',
type: 'text',
checkType: 'phone',
check: false,
checkContent: '请输入有效手机号'
});
let inputData1 = reactive({
inputValue: '' as any,
iconfont: 'icon-mima',
placeholder: '密码',
type: 'password',
checkType: 'passWord',
check: false,
checkContent: '请输入密码'
});
let hangleInput = (Value: any, type: string) => {
if (type === 'phone') {
let reg = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
if (!reg.test(Value) || !Value) inputData.check = true;
else inputData.check = false;
} else {
if (!Value) inputData1.check = true;
else inputData1.check = false;
}
};
let clickNextStep = () => {
if (!inputData.inputValue || !inputData.inputValue) {
inputData.check = true;
inputData1.check = true;
return;
} else if (!inputData.check || !inputData1.check) {
initLogin(inputData.inputValue, inputData1.inputValue);
} else {
console.log('检验不通过');
}
};
let initLogin = async (mobile: number, password: string) => {
let res: any = await login({ mobile, password });
if (res.data.errno == 0) {
uni.setStorage({
key: 'token',
data: res.data.data.token,
success() {
uni.navigateTo({
url: '../customized/order',
success() {
uni.setStorage({
key: 'mobile',
data: inputData.inputValue
});
}
});
}
});
} else {
uni.showToast({
title: '手机号或密码错误',
icon: 'none',
duration: 2000
});
}
};
</script>
<style lang="scss" scoped>
.login-container {
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
.title-iamge {
width: 300rpx;
height: 240rpx;
}
.login-text {
margin-top: 10%;
font-weight: 700;
font-size: 40rpx;
color: #1d2b5f;
}
.login-text1 {
font-weight: 700;
font-size: 40rpx;
color: #1d2b5f;
margin-top: 10rpx 0 20% 0;
}
.login-form {
margin-top: 15%;
}
.next-step {
margin-top: 20rpx;
width: 245rpx;
height: 90rpx;
}
.footer-text {
margin-top: 40%;
display: block;
width: 100%;
color: #d79972;
font-size: 30rpx;
text-align: center;
align-self: flex-end;
}
}
</style>
<template>
<view class="login-container">
<image
src="/static/msjf-picture/msjf-06.png"
mode="scaleToFill"
class="title-iamge"
></image>
<text class="login-text">欢迎登陆</text>
<text class="login-text1">茅山玖坊高端定制酒</text>
<view class="login-form">
<input-login :inputData="inputData" @hangleInput="hangleInput" />
<input-login :inputData="inputData1" @hangleInput="hangleInput" />
</view>
<image
src="/static/msjf-picture/msjf-07.png"
mode=""
class="next-step"
@click="clickNextStep"
></image>
<text class="footer-text">定制管理平台</text>
</view>
</template>
<script setup lang="ts">
import { reactive } from "vue";
import { login } from "@/services/api";
import inputLogin from "@/components/inputLogin.vue";
let inputData = reactive({
inputValue: "" as any,
iconfont: "icon-a-ziyuan16",
placeholder: "手机号码",
type: "text",
checkType: "phone",
check: false,
checkContent: "请输入有效手机号",
});
let inputData1 = reactive({
inputValue: "" as any,
iconfont: "icon-mima",
placeholder: "密码",
type: "password",
checkType: "passWord",
check: false,
checkContent: "请输入密码",
});
let hangleInput = (Value: any, type: string) => {
if (type === "phone") {
let reg =
/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
if (!reg.test(Value) || !Value) inputData.check = true;
else inputData.check = false;
} else {
if (!Value) inputData1.check = true;
else inputData1.check = false;
}
};
let clickNextStep = () => {
if (!inputData.inputValue || !inputData.inputValue) {
inputData.check = true;
inputData1.check = true;
return;
} else if (!inputData.check || !inputData1.check) {
initLogin(inputData.inputValue, inputData1.inputValue);
} else {
console.log("检验不通过");
}
};
let initLogin = async (mobile: number, password: string) => {
let res: any = await login({ mobile, password });
if (res.data.errno == 0) {
uni.setStorage({
key: "token",
data: res.data.data.token,
success() {
uni.navigateTo({
url: "../customized/order",
success() {
uni.setStorage({
key: "mobile",
data: inputData.inputValue,
});
},
});
},
});
} else {
uni.showToast({
title: "手机号或密码错误",
icon: "none",
duration: 2000,
});
}
};
</script>
<style lang="scss" scoped>
.login-container {
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
.title-iamge {
width: 300rpx;
height: 240rpx;
}
.login-text {
margin-top: 10%;
font-weight: 700;
font-size: 40rpx;
color: #1d2b5f;
}
.login-text1 {
font-weight: 700;
font-size: 40rpx;
color: #1d2b5f;
margin-top: 10rpx 0 20% 0;
}
.login-form {
margin-top: 15%;
}
.next-step {
margin-top: 20rpx;
width: 245rpx;
height: 90rpx;
}
.footer-text {
margin-top: 40%;
display: block;
width: 100%;
color: #d79972;
font-size: 30rpx;
text-align: center;
align-self: flex-end;
}
}
</style>
<template>
<view class="login-container">
<image src="/static/msjf-picture/msjf-06.png" mode="scaleToFill" class="title-iamge"></image>
<text class="login-text">请设置用户密码</text>
<view class="login-form">
<input-login :inputData="inputData" @hangleInput="hangleInput" />
<input-login :inputData="inputData1" @hangleInput="hangleInput" />
</view>
<image src="/static/msjf-picture/msjf-08.png" mode="" class="next-step" @click="clickComplete"></image>
<text class="footer-text">定制管理平台</text>
</view>
</template>
<script setup lang="ts">
import { ref, reactive } from 'vue';
import { resetPwd } from '@/services/api';
import inputLogin from '../../components/inputLogin.vue';
let inputData = reactive({
inputValue: '',
iconfont: 'icon-mima',
placeholder: '请输入登录密码',
password: true,
type: 'text',
checkType: 'password',
check: false,
checkContent: '密码不为空,且不少于6位'
});
let inputData1 = reactive({
inputValue: '',
iconfont: 'icon-yanzhengyanzhengma',
placeholder: '再次输入登录密码',
password: true,
type: 'text',
checkType: 'nextPassword',
check: false,
checkContent: '两次密码不一致'
});
// input校验
let hangleInput = (Value: any, type: string) => {
if (type === 'password') {
if (Value.length < 5) inputData.check = true;
else inputData.check = false;
} else {
if (inputData.inputValue.length !== Value.length) {
inputData1.check = true;
} else if (inputData.inputValue !== Value) {
inputData1.check = true;
} else {
inputData1.check = false;
}
}
};
let clickComplete = async () => {
if (!inputData.inputValue) inputData.check = true;
else if (!inputData1.inputValue) {
inputData1.check = true;
inputData1.checkContent = '确认密码不为空';
} else if (inputData.check) inputData.check = true;
else if (inputData1.check) {
inputData1.check = true;
inputData1.checkContent = '两次密码不一致';
} else {
uni.getStorage({
key: 'mobile',
async success(e: any) {
let res: any = await resetPwd({ mobile: e.data, password: inputData1.inputValue });
if (res.data.errno == 0) {
uni.navigateTo({
url: '/pages/login/login',
success() {
uni.clearStorage();
}
});
}
}
});
}
};
</script>
<style lang="scss" scoped>
.login-container {
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
.title-iamge {
width: 300rpx;
height: 240rpx;
}
.login-text {
margin-top: 10%;
font-weight: 700;
font-size: 40rpx;
color: #1d2b5f;
}
.login-text1 {
font-weight: 700;
font-size: 40rpx;
color: #1d2b5f;
margin-top: 10rpx 0 20% 0;
}
.login-form {
margin-top: 15%;
}
.next-step {
margin-top: 20rpx;
width: 245rpx;
height: 90rpx;
}
.footer-text {
margin-top: 40%;
display: block;
width: 100%;
color: #d79972;
font-size: 30rpx;
text-align: center;
align-self: flex-end;
}
}
</style>
<template>
<view class="login-container">
<image src="/static/msjf-picture/msjf-06.png" mode="scaleToFill" class="title-iamge"></image>
<text class="login-text">请设置用户密码</text>
<view class="login-form">
<input-login :inputData="inputData" @hangleInput="hangleInput" />
<input-login :inputData="inputData1" @hangleInput="hangleInput" />
</view>
<image src="/static/msjf-picture/msjf-08.png" mode="" class="next-step" @click="clickComplete"></image>
<text class="footer-text">定制管理平台</text>
</view>
</template>
<script setup lang="ts">
import { ref, reactive } from 'vue';
import { resetPwd } from '@/services/api';
import inputLogin from '../../components/inputLogin.vue';
let inputData = reactive({
inputValue: '',
iconfont: 'icon-mima',
placeholder: '请输入登录密码',
password: true,
type: 'text',
checkType: 'password',
check: false,
checkContent: '密码不为空,且不少于6位'
});
let inputData1 = reactive({
inputValue: '',
iconfont: 'icon-yanzhengyanzhengma',
placeholder: '再次输入登录密码',
password: true,
type: 'text',
checkType: 'nextPassword',
check: false,
checkContent: '两次密码不一致'
});
// input校验
let hangleInput = (Value: any, type: string) => {
if (type === 'password') {
if (Value.length < 5) inputData.check = true;
else inputData.check = false;
} else {
if (inputData.inputValue.length !== Value.length) {
inputData1.check = true;
} else if (inputData.inputValue !== Value) {
inputData1.check = true;
} else {
inputData1.check = false;
}
}
};
let clickComplete = async () => {
if (!inputData.inputValue) inputData.check = true;
else if (!inputData1.inputValue) {
inputData1.check = true;
inputData1.checkContent = '确认密码不为空';
} else if (inputData.check) inputData.check = true;
else if (inputData1.check) {
inputData1.check = true;
inputData1.checkContent = '两次密码不一致';
} else {
uni.getStorage({
key: 'mobile',
async success(e: any) {
let res: any = await resetPwd({ mobile: e.data, password: inputData1.inputValue });
if (res.data.errno == 0) {
uni.navigateTo({
url: '/pages/login/login',
success() {
uni.clearStorage();
}
});
}
}
});
}
};
</script>
<style lang="scss" scoped>
.login-container {
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
.title-iamge {
width: 300rpx;
height: 240rpx;
}
.login-text {
margin-top: 10%;
font-weight: 700;
font-size: 40rpx;
color: #1d2b5f;
}
.login-text1 {
font-weight: 700;
font-size: 40rpx;
color: #1d2b5f;
margin-top: 10rpx 0 20% 0;
}
.login-form {
margin-top: 15%;
}
.next-step {
margin-top: 20rpx;
width: 245rpx;
height: 90rpx;
}
.footer-text {
margin-top: 40%;
display: block;
width: 100%;
color: #d79972;
font-size: 30rpx;
text-align: center;
align-self: flex-end;
}
}
</style>
import { request } from './request';
//登录接口
export let login = (data: object | any) => request('/wx/auth/login_by_mobile', 'POST', data);
// 修改密码
export let resetPwd = (data: any) => request('/wx/auth/reset_by_mobile', 'POST', data);
// 获取订单信息
export let getMSJFList = (data?: any) => request('/wx/order/MSJFList', 'GET', data);
// 保存定制文件
export let saveCustomPage = (data: any) => request('/wx/customPage/save', 'POST', data);
// 更新定制文件
export let updateCustomPage = (data: any) => request('/wx/customPage/update', 'POST', data);
export let templateAdd = (data: any) => request('/wx/customPage/templateAdd', 'POST', data);
// 获取用户拥有宣传页模板接口
export let getHavePage = () => request('/wx/customPage/getHavePage', 'GET');
// 查询模板
export let getPageComponent = (data: any) => request('/wx/customPage/getPageComponent', 'GET', data);
// 删除模板
export let deletePageComponent = (data: any) => request('/wx/customPage/delete', 'POST', data);
// 查询记录
export let searchSnInfo = (data: any) => request('/wx/orderSequence/searchRecordInfo', 'GET', data);
// 下载接口
export let downLoad = (imgUrl: string) => request('/wx/storage/download/' + imgUrl, 'GET');
// 单个图片上传
export let singleUpload = (data: any) => request('/wx/customPage/update', 'POST', data);
// 设置默认 http://127.0.0.1:8080/wx/customPage/checked
export let customPageChecked = (data: any) => request('/wx/customPage/checked', 'POST', data)
// 获取开瓶信息
export let getMSJFDetail = (data: any) => request('/wx/order/MSJFDetail', 'GET', data)
import { request } from './request';
//登录接口
export let login = (data: object | any) => request('/wx/auth/login_by_mobile', 'POST', data);
// 修改密码
export let resetPwd = (data: any) => request('/wx/auth/reset_by_mobile', 'POST', data);
// 获取订单信息
export let getMSJFList = (data?: any) => request('/wx/order/MSJFList', 'GET', data);
// 保存定制文件
export let saveCustomPage = (data: any) => request('/wx/customPage/save', 'POST', data);
// 更新定制文件
export let updateCustomPage = (data: any) => request('/wx/customPage/update', 'POST', data);
export let templateAdd = (data: any) => request('/wx/customPage/templateAdd', 'POST', data);
// 获取用户拥有宣传页模板接口
export let getHavePage = () => request('/wx/customPage/getHavePage', 'GET');
// 查询模板
export let getPageComponent = (data: any) => request('/wx/customPage/getPageComponent', 'GET', data);
// 删除模板
export let deletePageComponent = (data: any) => request('/wx/customPage/delete', 'POST', data);
// 查询记录
export let searchSnInfo = (data: any) => request('/wx/orderSequence/searchRecordInfo', 'GET', data);
// 下载接口
export let downLoad = (imgUrl: string) => request('/wx/storage/download/' + imgUrl, 'GET');
// 单个图片上传
export let singleUpload = (data: any) => request('/wx/customPage/update', 'POST', data);
// 设置默认 http://127.0.0.1:8080/wx/customPage/checked
export let customPageChecked = (data: any) => request('/wx/customPage/checked', 'POST', data)
// 获取开瓶信息
export let getMSJFDetail = (data: any) => request('/wx/order/MSJFDetail', 'GET', data)
//服务器接口地址
const baseURL: string = 'http://139.186.162.12';
//本地调试接口地址
// const baseURL: string = 'http://192.168.2.209:8080';
// 封装公共申请办法
function request(url: string, method: 'GET' | 'POST' | 'PUT' | 'DELETE', data?: object | any) {
return new Promise(function(resolve, reject) {
let header: any;
if (uni.getStorageSync('token') !== undefined && uni.getStorageSync('token') !== '') {
header = {
'content-type': 'application/json',
'X-Litemall-Token': uni.getStorageSync('token')
};
} else {
let pages = getCurrentPages();
let curRoute = pages[pages.length - 1].route;
if (curRoute != 'pages/login/login') {
uni.showToast({
icon: 'none',
title: '请重新登录',
success() {
uni.navigateTo({
url: '/pages/login/login'
});
}
});
}
}
uni.request({
url: baseURL + url,
method: method,
data: data,
header: header,
success(res: any) {
uni.hideLoading();
if (res.statusCode == 200) {
resolve(res);
} else {
//其余异样
uni.showToast({
title: res.data.errmsg,
icon: 'none'
});
reject(res);
}
},
fail(err) {
uni.hideLoading();
//申请失败
uni.showToast({
title: '连接服务器失败',
icon: 'none'
});
reject(err);
}
});
});
}
export { request, baseURL };
//服务器接口地址
const baseURL: string = 'http://139.186.162.12';
//本地调试接口地址
// const baseURL: string = 'http://192.168.2.209:8080';
// 封装公共申请办法
function request(url: string, method: 'GET' | 'POST' | 'PUT' | 'DELETE', data?: object | any) {
return new Promise(function(resolve, reject) {
let header: any;
if (uni.getStorageSync('token') !== undefined && uni.getStorageSync('token') !== '') {
header = {
'content-type': 'application/json',
'X-Litemall-Token': uni.getStorageSync('token')
};
} else {
let pages = getCurrentPages();
let curRoute = pages[pages.length - 1].route;
if (curRoute != 'pages/login/login') {
uni.showToast({
icon: 'none',
title: '请重新登录',
success() {
uni.navigateTo({
url: '/pages/login/login'
});
}
});
}
}
uni.request({
url: baseURL + url,
method: method,
data: data,
header: header,
success(res: any) {
uni.hideLoading();
if (res.statusCode == 200) {
resolve(res);
} else {
//其余异样
uni.showToast({
title: res.data.errmsg,
icon: 'none'
});
reject(res);
}
},
fail(err) {
uni.hideLoading();
//申请失败
uni.showToast({
title: '连接服务器失败',
icon: 'none'
});
reject(err);
}
});
});
}
export { request, baseURL };
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
$uni-color-primary: #007aff;
$uni-color-success: #4cd964;
$uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d;
/* 文字基本颜色 */
$uni-text-color:#333;//基本色
$uni-text-color-inverse:#fff;//反色
$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
$uni-text-color-placeholder: #808080;
$uni-text-color-disable:#c0c0c0;
/* 背景颜色 */
$uni-bg-color:#ffffff;
$uni-bg-color-grey:#f8f8f8;
$uni-bg-color-hover:#f1f1f1;//点击状态颜色
$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
/* 边框颜色 */
$uni-border-color:#c8c7cc;
/* 尺寸变量 */
/* 文字尺寸 */
$uni-font-size-sm:24rpx;
$uni-font-size-base:28rpx;
$uni-font-size-lg:32rpx;
/* 图片尺寸 */
$uni-img-size-sm:40rpx;
$uni-img-size-base:52rpx;
$uni-img-size-lg:80rpx;
/* Border Radius */
$uni-border-radius-sm: 4rpx;
$uni-border-radius-base: 6rpx;
$uni-border-radius-lg: 12rpx;
$uni-border-radius-circle: 50%;
/* 水平间距 */
$uni-spacing-row-sm: 10px;
$uni-spacing-row-base: 20rpx;
$uni-spacing-row-lg: 30rpx;
/* 垂直间距 */
$uni-spacing-col-sm: 8rpx;
$uni-spacing-col-base: 16rpx;
$uni-spacing-col-lg: 24rpx;
/* 透明度 */
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
/* 文章场景相关 */
$uni-color-title: #2C405A; // 文章标题颜色
$uni-font-size-title:40rpx;
$uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:36rpx;
$uni-color-paragraph: #3F536E; // 文章段落颜色
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
$uni-color-primary: #007aff;
$uni-color-success: #4cd964;
$uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d;
/* 文字基本颜色 */
$uni-text-color:#333;//基本色
$uni-text-color-inverse:#fff;//反色
$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
$uni-text-color-placeholder: #808080;
$uni-text-color-disable:#c0c0c0;
/* 背景颜色 */
$uni-bg-color:#ffffff;
$uni-bg-color-grey:#f8f8f8;
$uni-bg-color-hover:#f1f1f1;//点击状态颜色
$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
/* 边框颜色 */
$uni-border-color:#c8c7cc;
/* 尺寸变量 */
/* 文字尺寸 */
$uni-font-size-sm:24rpx;
$uni-font-size-base:28rpx;
$uni-font-size-lg:32rpx;
/* 图片尺寸 */
$uni-img-size-sm:40rpx;
$uni-img-size-base:52rpx;
$uni-img-size-lg:80rpx;
/* Border Radius */
$uni-border-radius-sm: 4rpx;
$uni-border-radius-base: 6rpx;
$uni-border-radius-lg: 12rpx;
$uni-border-radius-circle: 50%;
/* 水平间距 */
$uni-spacing-row-sm: 10px;
$uni-spacing-row-base: 20rpx;
$uni-spacing-row-lg: 30rpx;
/* 垂直间距 */
$uni-spacing-col-sm: 8rpx;
$uni-spacing-col-base: 16rpx;
$uni-spacing-col-lg: 24rpx;
/* 透明度 */
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
/* 文章场景相关 */
$uni-color-title: #2C405A; // 文章标题颜色
$uni-font-size-title:40rpx;
$uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:36rpx;
$uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:30rpx;
\ No newline at end of file
## 2.2.6(2022-06-30)
- 优化 组件样式,调整了组件图标大小、高度、颜色等,与uni-ui风格保持一致
## 2.2.5(2022-06-24)
- 修复 日历顶部年月及底部确认未国际化 bug
## 2.2.4(2022-03-31)
- 修复 Vue3 下动态赋值,单选类型未响应的 bug
## 2.2.3(2022-03-28)
- 修复 Vue3 下动态赋值未响应的 bug
## 2.2.2(2021-12-10)
- 修复 clear-icon 属性在小程序平台不生效的 bug
## 2.2.1(2021-12-10)
- 修复 日期范围选在小程序平台,必须多点击一次才能取消选中状态的 bug
## 2.2.0(2021-11-19)
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-datetime-picker](https://uniapp.dcloud.io/component/uniui/uni-datetime-picker)
## 2.1.5(2021-11-09)
- 新增 提供组件设计资源,组件样式调整
## 2.1.4(2021-09-10)
- 修复 hide-second 在移动端的 bug
- 修复 单选赋默认值时,赋值日期未高亮的 bug
- 修复 赋默认值时,移动端未正确显示时间的 bug
## 2.1.3(2021-09-09)
- 新增 hide-second 属性,支持只使用时分,隐藏秒
## 2.1.2(2021-09-03)
- 优化 取消选中时(范围选)直接开始下一次选择, 避免多点一次
- 优化 移动端支持清除按钮,同时支持通过 ref 调用组件的 clear 方法
- 优化 调整字号大小,美化日历界面
- 修复 因国际化导致的 placeholder 失效的 bug
## 2.1.1(2021-08-24)
- 新增 支持国际化
- 优化 范围选择器在 pc 端过宽的问题
## 2.1.0(2021-08-09)
- 新增 适配 vue3
## 2.0.19(2021-08-09)
- 新增 支持作为 uni-forms 子组件相关功能
- 修复 在 uni-forms 中使用时,选择时间报 NAN 错误的 bug
## 2.0.18(2021-08-05)
- 修复 type 属性动态赋值无效的 bug
- 修复 ‘确认’按钮被 tabbar 遮盖 bug
- 修复 组件未赋值时范围选左、右日历相同的 bug
## 2.0.17(2021-08-04)
- 修复 范围选未正确显示当前值的 bug
- 修复 h5 平台(移动端)报错 'cale' of undefined 的 bug
## 2.0.16(2021-07-21)
- 新增 return-type 属性支持返回 date 日期对象
## 2.0.15(2021-07-14)
- 修复 单选日期类型,初始赋值后不在当前日历的 bug
- 新增 clearIcon 属性,显示框的清空按钮可配置显示隐藏(仅 pc 有效)
- 优化 移动端移除显示框的清空按钮,无实际用途
## 2.0.14(2021-07-14)
- 修复 组件赋值为空,界面未更新的 bug
- 修复 start 和 end 不能动态赋值的 bug
- 修复 范围选类型,用户选择后再次选择右侧日历(结束日期)显示不正确的 bug
## 2.0.13(2021-07-08)
- 修复 范围选择不能动态赋值的 bug
## 2.0.12(2021-07-08)
- 修复 范围选择的初始时间在一个月内时,造成无法选择的bug
## 2.0.11(2021-07-08)
- 优化 弹出层在超出视窗边缘定位不准确的问题
## 2.0.10(2021-07-08)
- 修复 范围起始点样式的背景色与今日样式的字体前景色融合,导致日期字体看不清的 bug
- 优化 弹出层在超出视窗边缘被遮盖的问题
## 2.0.9(2021-07-07)
- 新增 maskClick 事件
- 修复 特殊情况日历 rpx 布局错误的 bug,rpx -> px
- 修复 范围选择时清空返回值不合理的bug,['', ''] -> []
## 2.0.8(2021-07-07)
- 新增 日期时间显示框支持插槽
## 2.0.7(2021-07-01)
- 优化 添加 uni-icons 依赖
## 2.0.6(2021-05-22)
- 修复 图标在小程序上不显示的 bug
- 优化 重命名引用组件,避免潜在组件命名冲突
## 2.0.5(2021-05-20)
- 优化 代码目录扁平化
## 2.0.4(2021-05-12)
- 新增 组件示例地址
## 2.0.3(2021-05-10)
- 修复 ios 下不识别 '-' 日期格式的 bug
- 优化 pc 下弹出层添加边框和阴影
## 2.0.2(2021-05-08)
- 修复 在 admin 中获取弹出层定位错误的bug
## 2.0.1(2021-05-08)
- 修复 type 属性向下兼容,默认值从 date 变更为 datetime
## 2.0.0(2021-04-30)
- 支持日历形式的日期+时间的范围选择
> 注意:此版本不向后兼容,不再支持单独时间选择(type=time)及相关的 hide-second 属性(时间选可使用内置组件 picker)
## 1.0.6(2021-03-18)
- 新增 hide-second 属性,时间支持仅选择时、分
- 修复 选择跟显示的日期不一样的 bug
- 修复 chang事件触发2次的 bug
- 修复 分、秒 end 范围错误的 bug
- 优化 更好的 nvue 适配
## 2.2.6(2022-06-30)
- 优化 组件样式,调整了组件图标大小、高度、颜色等,与uni-ui风格保持一致
## 2.2.5(2022-06-24)
- 修复 日历顶部年月及底部确认未国际化 bug
## 2.2.4(2022-03-31)
- 修复 Vue3 下动态赋值,单选类型未响应的 bug
## 2.2.3(2022-03-28)
- 修复 Vue3 下动态赋值未响应的 bug
## 2.2.2(2021-12-10)
- 修复 clear-icon 属性在小程序平台不生效的 bug
## 2.2.1(2021-12-10)
- 修复 日期范围选在小程序平台,必须多点击一次才能取消选中状态的 bug
## 2.2.0(2021-11-19)
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-datetime-picker](https://uniapp.dcloud.io/component/uniui/uni-datetime-picker)
## 2.1.5(2021-11-09)
- 新增 提供组件设计资源,组件样式调整
## 2.1.4(2021-09-10)
- 修复 hide-second 在移动端的 bug
- 修复 单选赋默认值时,赋值日期未高亮的 bug
- 修复 赋默认值时,移动端未正确显示时间的 bug
## 2.1.3(2021-09-09)
- 新增 hide-second 属性,支持只使用时分,隐藏秒
## 2.1.2(2021-09-03)
- 优化 取消选中时(范围选)直接开始下一次选择, 避免多点一次
- 优化 移动端支持清除按钮,同时支持通过 ref 调用组件的 clear 方法
- 优化 调整字号大小,美化日历界面
- 修复 因国际化导致的 placeholder 失效的 bug
## 2.1.1(2021-08-24)
- 新增 支持国际化
- 优化 范围选择器在 pc 端过宽的问题
## 2.1.0(2021-08-09)
- 新增 适配 vue3
## 2.0.19(2021-08-09)
- 新增 支持作为 uni-forms 子组件相关功能
- 修复 在 uni-forms 中使用时,选择时间报 NAN 错误的 bug
## 2.0.18(2021-08-05)
- 修复 type 属性动态赋值无效的 bug
- 修复 ‘确认’按钮被 tabbar 遮盖 bug
- 修复 组件未赋值时范围选左、右日历相同的 bug
## 2.0.17(2021-08-04)
- 修复 范围选未正确显示当前值的 bug
- 修复 h5 平台(移动端)报错 'cale' of undefined 的 bug
## 2.0.16(2021-07-21)
- 新增 return-type 属性支持返回 date 日期对象
## 2.0.15(2021-07-14)
- 修复 单选日期类型,初始赋值后不在当前日历的 bug
- 新增 clearIcon 属性,显示框的清空按钮可配置显示隐藏(仅 pc 有效)
- 优化 移动端移除显示框的清空按钮,无实际用途
## 2.0.14(2021-07-14)
- 修复 组件赋值为空,界面未更新的 bug
- 修复 start 和 end 不能动态赋值的 bug
- 修复 范围选类型,用户选择后再次选择右侧日历(结束日期)显示不正确的 bug
## 2.0.13(2021-07-08)
- 修复 范围选择不能动态赋值的 bug
## 2.0.12(2021-07-08)
- 修复 范围选择的初始时间在一个月内时,造成无法选择的bug
## 2.0.11(2021-07-08)
- 优化 弹出层在超出视窗边缘定位不准确的问题
## 2.0.10(2021-07-08)
- 修复 范围起始点样式的背景色与今日样式的字体前景色融合,导致日期字体看不清的 bug
- 优化 弹出层在超出视窗边缘被遮盖的问题
## 2.0.9(2021-07-07)
- 新增 maskClick 事件
- 修复 特殊情况日历 rpx 布局错误的 bug,rpx -> px
- 修复 范围选择时清空返回值不合理的bug,['', ''] -> []
## 2.0.8(2021-07-07)
- 新增 日期时间显示框支持插槽
## 2.0.7(2021-07-01)
- 优化 添加 uni-icons 依赖
## 2.0.6(2021-05-22)
- 修复 图标在小程序上不显示的 bug
- 优化 重命名引用组件,避免潜在组件命名冲突
## 2.0.5(2021-05-20)
- 优化 代码目录扁平化
## 2.0.4(2021-05-12)
- 新增 组件示例地址
## 2.0.3(2021-05-10)
- 修复 ios 下不识别 '-' 日期格式的 bug
- 优化 pc 下弹出层添加边框和阴影
## 2.0.2(2021-05-08)
- 修复 在 admin 中获取弹出层定位错误的bug
## 2.0.1(2021-05-08)
- 修复 type 属性向下兼容,默认值从 date 变更为 datetime
## 2.0.0(2021-04-30)
- 支持日历形式的日期+时间的范围选择
> 注意:此版本不向后兼容,不再支持单独时间选择(type=time)及相关的 hide-second 属性(时间选可使用内置组件 picker)
## 1.0.6(2021-03-18)
- 新增 hide-second 属性,时间支持仅选择时、分
- 修复 选择跟显示的日期不一样的 bug
- 修复 chang事件触发2次的 bug
- 修复 分、秒 end 范围错误的 bug
- 优化 更好的 nvue 适配
<template>
<view class="uni-calendar-item__weeks-box" :class="{
'uni-calendar-item--disable':weeks.disable,
'uni-calendar-item--before-checked-x':weeks.beforeMultiple,
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked-x':weeks.afterMultiple,
}" @click="choiceDate(weeks)" @mouseenter="handleMousemove(weeks)">
<view class="uni-calendar-item__weeks-box-item" :class="{
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && (calendar.userChecked || !checkHover),
'uni-calendar-item--checked-range-text': checkHover,
'uni-calendar-item--before-checked':weeks.beforeMultiple,
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked':weeks.afterMultiple,
'uni-calendar-item--disable':weeks.disable,
}">
<text v-if="selected&&weeks.extraInfo" class="uni-calendar-item__weeks-box-circle"></text>
<text class="uni-calendar-item__weeks-box-text uni-calendar-item__weeks-box-text-disable uni-calendar-item--checked-text">{{weeks.date}}</text>
</view>
<view :class="{'uni-calendar-item--isDay': weeks.isDay}"></view>
</view>
</template>
<script>
export default {
props: {
weeks: {
type: Object,
default () {
return {}
}
},
calendar: {
type: Object,
default: () => {
return {}
}
},
selected: {
type: Array,
default: () => {
return []
}
},
lunar: {
type: Boolean,
default: false
},
checkHover: {
type: Boolean,
default: false
}
},
methods: {
choiceDate(weeks) {
this.$emit('change', weeks)
},
handleMousemove(weeks) {
this.$emit('handleMouse', weeks)
}
}
}
</script>
<style lang="scss" >
.uni-calendar-item__weeks-box {
flex: 1;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
justify-content: center;
align-items: center;
margin: 1px 0;
position: relative;
}
.uni-calendar-item__weeks-box-text {
font-size: 14px;
// font-family: Lato-Bold, Lato;
font-weight: bold;
color: #455997;
}
.uni-calendar-item__weeks-lunar-text {
font-size: 12px;
color: #333;
}
.uni-calendar-item__weeks-box-item {
position: relative;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
justify-content: center;
align-items: center;
width: 40px;
height: 40px;
/* #ifdef H5 */
cursor: pointer;
/* #endif */
}
.uni-calendar-item__weeks-box-circle {
position: absolute;
top: 5px;
right: 5px;
width: 8px;
height: 8px;
border-radius: 8px;
background-color: #dd524d;
}
.uni-calendar-item__weeks-box .uni-calendar-item--disable {
// background-color: rgba(249, 249, 249, $uni-opacity-disabled);
cursor: default;
}
.uni-calendar-item--disable .uni-calendar-item__weeks-box-text-disable {
color: #D1D1D1;
}
.uni-calendar-item--isDay {
position: absolute;
top: 10px;
right: 17%;
background-color: #dd524d;
width:6px;
height: 6px;
border-radius: 50%;
}
.uni-calendar-item--extra {
color: #dd524d;
opacity: 0.8;
}
.uni-calendar-item__weeks-box .uni-calendar-item--checked {
background-color: #007aff;
border-radius: 50%;
box-sizing: border-box;
border: 3px solid #fff;
}
.uni-calendar-item--checked .uni-calendar-item--checked-text {
color: #fff;
}
.uni-calendar-item--multiple .uni-calendar-item--checked-range-text {
color: #333;
}
.uni-calendar-item--multiple {
background-color: #F6F7FC;
// color: #fff;
}
.uni-calendar-item--multiple .uni-calendar-item--before-checked,
.uni-calendar-item--multiple .uni-calendar-item--after-checked {
background-color: #409eff;
border-radius: 50%;
box-sizing: border-box;
border: 3px solid #F6F7FC;
}
.uni-calendar-item--before-checked .uni-calendar-item--checked-text,
.uni-calendar-item--after-checked .uni-calendar-item--checked-text {
color: #fff;
}
.uni-calendar-item--before-checked-x {
border-top-left-radius: 50px;
border-bottom-left-radius: 50px;
box-sizing: border-box;
background-color: #F6F7FC;
}
.uni-calendar-item--after-checked-x {
border-top-right-radius: 50px;
border-bottom-right-radius: 50px;
background-color: #F6F7FC;
}
</style>
<template>
<view class="uni-calendar-item__weeks-box" :class="{
'uni-calendar-item--disable':weeks.disable,
'uni-calendar-item--before-checked-x':weeks.beforeMultiple,
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked-x':weeks.afterMultiple,
}" @click="choiceDate(weeks)" @mouseenter="handleMousemove(weeks)">
<view class="uni-calendar-item__weeks-box-item" :class="{
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && (calendar.userChecked || !checkHover),
'uni-calendar-item--checked-range-text': checkHover,
'uni-calendar-item--before-checked':weeks.beforeMultiple,
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked':weeks.afterMultiple,
'uni-calendar-item--disable':weeks.disable,
}">
<text v-if="selected&&weeks.extraInfo" class="uni-calendar-item__weeks-box-circle"></text>
<text class="uni-calendar-item__weeks-box-text uni-calendar-item__weeks-box-text-disable uni-calendar-item--checked-text">{{weeks.date}}</text>
</view>
<view :class="{'uni-calendar-item--isDay': weeks.isDay}"></view>
</view>
</template>
<script>
export default {
props: {
weeks: {
type: Object,
default () {
return {}
}
},
calendar: {
type: Object,
default: () => {
return {}
}
},
selected: {
type: Array,
default: () => {
return []
}
},
lunar: {
type: Boolean,
default: false
},
checkHover: {
type: Boolean,
default: false
}
},
methods: {
choiceDate(weeks) {
this.$emit('change', weeks)
},
handleMousemove(weeks) {
this.$emit('handleMouse', weeks)
}
}
}
</script>
<style lang="scss" >
.uni-calendar-item__weeks-box {
flex: 1;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
justify-content: center;
align-items: center;
margin: 1px 0;
position: relative;
}
.uni-calendar-item__weeks-box-text {
font-size: 14px;
// font-family: Lato-Bold, Lato;
font-weight: bold;
color: #455997;
}
.uni-calendar-item__weeks-lunar-text {
font-size: 12px;
color: #333;
}
.uni-calendar-item__weeks-box-item {
position: relative;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
justify-content: center;
align-items: center;
width: 40px;
height: 40px;
/* #ifdef H5 */
cursor: pointer;
/* #endif */
}
.uni-calendar-item__weeks-box-circle {
position: absolute;
top: 5px;
right: 5px;
width: 8px;
height: 8px;
border-radius: 8px;
background-color: #dd524d;
}
.uni-calendar-item__weeks-box .uni-calendar-item--disable {
// background-color: rgba(249, 249, 249, $uni-opacity-disabled);
cursor: default;
}
.uni-calendar-item--disable .uni-calendar-item__weeks-box-text-disable {
color: #D1D1D1;
}
.uni-calendar-item--isDay {
position: absolute;
top: 10px;
right: 17%;
background-color: #dd524d;
width:6px;
height: 6px;
border-radius: 50%;
}
.uni-calendar-item--extra {
color: #dd524d;
opacity: 0.8;
}
.uni-calendar-item__weeks-box .uni-calendar-item--checked {
background-color: #007aff;
border-radius: 50%;
box-sizing: border-box;
border: 3px solid #fff;
}
.uni-calendar-item--checked .uni-calendar-item--checked-text {
color: #fff;
}
.uni-calendar-item--multiple .uni-calendar-item--checked-range-text {
color: #333;
}
.uni-calendar-item--multiple {
background-color: #F6F7FC;
// color: #fff;
}
.uni-calendar-item--multiple .uni-calendar-item--before-checked,
.uni-calendar-item--multiple .uni-calendar-item--after-checked {
background-color: #409eff;
border-radius: 50%;
box-sizing: border-box;
border: 3px solid #F6F7FC;
}
.uni-calendar-item--before-checked .uni-calendar-item--checked-text,
.uni-calendar-item--after-checked .uni-calendar-item--checked-text {
color: #fff;
}
.uni-calendar-item--before-checked-x {
border-top-left-radius: 50px;
border-bottom-left-radius: 50px;
box-sizing: border-box;
background-color: #F6F7FC;
}
.uni-calendar-item--after-checked-x {
border-top-right-radius: 50px;
border-bottom-right-radius: 50px;
background-color: #F6F7FC;
}
</style>
{
"uni-datetime-picker.selectDate": "select date",
"uni-datetime-picker.selectTime": "select time",
"uni-datetime-picker.selectDateTime": "select datetime",
"uni-datetime-picker.startDate": "start date",
"uni-datetime-picker.endDate": "end date",
"uni-datetime-picker.startTime": "start time",
"uni-datetime-picker.endTime": "end time",
"uni-datetime-picker.ok": "ok",
"uni-datetime-picker.clear": "clear",
"uni-datetime-picker.cancel": "cancel",
"uni-datetime-picker.year": "-",
"uni-datetime-picker.month": "",
"uni-calender.MON": "MON",
"uni-calender.TUE": "TUE",
"uni-calender.WED": "WED",
"uni-calender.THU": "THU",
"uni-calender.FRI": "FRI",
"uni-calender.SAT": "SAT",
"uni-calender.SUN": "SUN",
"uni-calender.confirm": "confirm"
}
{
"uni-datetime-picker.selectDate": "select date",
"uni-datetime-picker.selectTime": "select time",
"uni-datetime-picker.selectDateTime": "select datetime",
"uni-datetime-picker.startDate": "start date",
"uni-datetime-picker.endDate": "end date",
"uni-datetime-picker.startTime": "start time",
"uni-datetime-picker.endTime": "end time",
"uni-datetime-picker.ok": "ok",
"uni-datetime-picker.clear": "clear",
"uni-datetime-picker.cancel": "cancel",
"uni-datetime-picker.year": "-",
"uni-datetime-picker.month": "",
"uni-calender.MON": "MON",
"uni-calender.TUE": "TUE",
"uni-calender.WED": "WED",
"uni-calender.THU": "THU",
"uni-calender.FRI": "FRI",
"uni-calender.SAT": "SAT",
"uni-calender.SUN": "SUN",
"uni-calender.confirm": "confirm"
}
import en from './en.json'
import zhHans from './zh-Hans.json'
import zhHant from './zh-Hant.json'
export default {
en,
'zh-Hans': zhHans,
'zh-Hant': zhHant
}
import en from './en.json'
import zhHans from './zh-Hans.json'
import zhHant from './zh-Hant.json'
export default {
en,
'zh-Hans': zhHans,
'zh-Hant': zhHant
}
{
"uni-datetime-picker.selectDate": "选择日期",
"uni-datetime-picker.selectTime": "选择时间",
"uni-datetime-picker.selectDateTime": "选择日期时间",
"uni-datetime-picker.startDate": "开始日期",
"uni-datetime-picker.endDate": "结束日期",
"uni-datetime-picker.startTime": "开始时间",
"uni-datetime-picker.endTime": "结束时间",
"uni-datetime-picker.ok": "确定",
"uni-datetime-picker.clear": "清除",
"uni-datetime-picker.cancel": "取消",
"uni-datetime-picker.year": "年",
"uni-datetime-picker.month": "月",
"uni-calender.SUN": "日",
"uni-calender.MON": "一",
"uni-calender.TUE": "二",
"uni-calender.WED": "三",
"uni-calender.THU": "四",
"uni-calender.FRI": "五",
"uni-calender.SAT": "六",
"uni-calender.confirm": "确认"
{
"uni-datetime-picker.selectDate": "选择日期",
"uni-datetime-picker.selectTime": "选择时间",
"uni-datetime-picker.selectDateTime": "选择日期时间",
"uni-datetime-picker.startDate": "开始日期",
"uni-datetime-picker.endDate": "结束日期",
"uni-datetime-picker.startTime": "开始时间",
"uni-datetime-picker.endTime": "结束时间",
"uni-datetime-picker.ok": "确定",
"uni-datetime-picker.clear": "清除",
"uni-datetime-picker.cancel": "取消",
"uni-datetime-picker.year": "年",
"uni-datetime-picker.month": "月",
"uni-calender.SUN": "日",
"uni-calender.MON": "一",
"uni-calender.TUE": "二",
"uni-calender.WED": "三",
"uni-calender.THU": "四",
"uni-calender.FRI": "五",
"uni-calender.SAT": "六",
"uni-calender.confirm": "确认"
}
\ No newline at end of file
{
"uni-datetime-picker.selectDate": "選擇日期",
"uni-datetime-picker.selectTime": "選擇時間",
"uni-datetime-picker.selectDateTime": "選擇日期時間",
"uni-datetime-picker.startDate": "開始日期",
"uni-datetime-picker.endDate": "結束日期",
"uni-datetime-picker.startTime": "開始时间",
"uni-datetime-picker.endTime": "結束时间",
"uni-datetime-picker.ok": "確定",
"uni-datetime-picker.clear": "清除",
"uni-datetime-picker.cancel": "取消",
"uni-datetime-picker.year": "年",
"uni-datetime-picker.month": "月",
"uni-calender.SUN": "日",
"uni-calender.MON": "一",
"uni-calender.TUE": "二",
"uni-calender.WED": "三",
"uni-calender.THU": "四",
"uni-calender.FRI": "五",
"uni-calender.SAT": "六",
"uni-calender.confirm": "確認"
{
"uni-datetime-picker.selectDate": "選擇日期",
"uni-datetime-picker.selectTime": "選擇時間",
"uni-datetime-picker.selectDateTime": "選擇日期時間",
"uni-datetime-picker.startDate": "開始日期",
"uni-datetime-picker.endDate": "結束日期",
"uni-datetime-picker.startTime": "開始时间",
"uni-datetime-picker.endTime": "結束时间",
"uni-datetime-picker.ok": "確定",
"uni-datetime-picker.clear": "清除",
"uni-datetime-picker.cancel": "取消",
"uni-datetime-picker.year": "年",
"uni-datetime-picker.month": "月",
"uni-calender.SUN": "日",
"uni-calender.MON": "一",
"uni-calender.TUE": "二",
"uni-calender.WED": "三",
"uni-calender.THU": "四",
"uni-calender.FRI": "五",
"uni-calender.SAT": "六",
"uni-calender.confirm": "確認"
}
\ No newline at end of file
// #ifdef H5
export default {
name: 'Keypress',
props: {
disable: {
type: Boolean,
default: false
}
},
mounted () {
const keyNames = {
esc: ['Esc', 'Escape'],
tab: 'Tab',
enter: 'Enter',
space: [' ', 'Spacebar'],
up: ['Up', 'ArrowUp'],
left: ['Left', 'ArrowLeft'],
right: ['Right', 'ArrowRight'],
down: ['Down', 'ArrowDown'],
delete: ['Backspace', 'Delete', 'Del']
}
const listener = ($event) => {
if (this.disable) {
return
}
const keyName = Object.keys(keyNames).find(key => {
const keyName = $event.key
const value = keyNames[key]
return value === keyName || (Array.isArray(value) && value.includes(keyName))
})
if (keyName) {
// 避免和其他按键事件冲突
setTimeout(() => {
this.$emit(keyName, {})
}, 0)
}
}
document.addEventListener('keyup', listener)
this.$once('hook:beforeDestroy', () => {
document.removeEventListener('keyup', listener)
})
},
render: () => {}
}
// #ifdef H5
export default {
name: 'Keypress',
props: {
disable: {
type: Boolean,
default: false
}
},
mounted () {
const keyNames = {
esc: ['Esc', 'Escape'],
tab: 'Tab',
enter: 'Enter',
space: [' ', 'Spacebar'],
up: ['Up', 'ArrowUp'],
left: ['Left', 'ArrowLeft'],
right: ['Right', 'ArrowRight'],
down: ['Down', 'ArrowDown'],
delete: ['Backspace', 'Delete', 'Del']
}
const listener = ($event) => {
if (this.disable) {
return
}
const keyName = Object.keys(keyNames).find(key => {
const keyName = $event.key
const value = keyNames[key]
return value === keyName || (Array.isArray(value) && value.includes(keyName))
})
if (keyName) {
// 避免和其他按键事件冲突
setTimeout(() => {
this.$emit(keyName, {})
}, 0)
}
}
document.addEventListener('keyup', listener)
this.$once('hook:beforeDestroy', () => {
document.removeEventListener('keyup', listener)
})
},
render: () => {}
}
// #endif
\ No newline at end of file
{
"id": "uni-datetime-picker",
"displayName": "uni-datetime-picker 日期选择器",
"version": "2.2.6",
"description": "uni-datetime-picker 日期时间选择器,支持日历,支持范围选择",
"keywords": [
"uni-datetime-picker",
"uni-ui",
"uniui",
"日期时间选择器",
"日期时间"
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": ""
},
"directories": {
"example": "../../temps/example_temps"
},
"dcloudext": {
"category": [
"前端组件",
"通用组件"
],
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
},
"uni_modules": {
"dependencies": [
"uni-scss",
"uni-icons"
],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"App": {
"app-vue": "y",
"app-nvue": "n"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "y",
"IE": "y",
"Edge": "y",
"Firefox": "y",
"Safari": "y"
},
"小程序": {
"微信": "y",
"阿里": "y",
"百度": "y",
"字节跳动": "y",
"QQ": "y"
},
"快应用": {
"华为": "u",
"联盟": "u"
},
"Vue": {
"vue2": "y",
"vue3": "y"
}
}
}
}
}
{
"id": "uni-datetime-picker",
"displayName": "uni-datetime-picker 日期选择器",
"version": "2.2.6",
"description": "uni-datetime-picker 日期时间选择器,支持日历,支持范围选择",
"keywords": [
"uni-datetime-picker",
"uni-ui",
"uniui",
"日期时间选择器",
"日期时间"
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": ""
},
"directories": {
"example": "../../temps/example_temps"
},
"dcloudext": {
"category": [
"前端组件",
"通用组件"
],
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
},
"uni_modules": {
"dependencies": [
"uni-scss",
"uni-icons"
],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"App": {
"app-vue": "y",
"app-nvue": "n"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "y",
"IE": "y",
"Edge": "y",
"Firefox": "y",
"Safari": "y"
},
"小程序": {
"微信": "y",
"阿里": "y",
"百度": "y",
"字节跳动": "y",
"QQ": "y"
},
"快应用": {
"华为": "u",
"联盟": "u"
},
"Vue": {
"vue2": "y",
"vue3": "y"
}
}
}
}
}
> `重要通知:组件升级更新 2.0.0 后,支持日期+时间范围选择,组件 ui 将使用日历选择日期,ui 变化较大,同时支持 PC 和 移动端。此版本不向后兼容,不再支持单独的时间选择(type=time)及相关的 hide-second 属性(时间选可使用内置组件 picker)。若仍需使用旧版本,可在插件市场下载*非uni_modules版本*,旧版本将不再维护`
## DatetimePicker 时间选择器
> **组件名:uni-datetime-picker**
> 代码块: `uDatetimePicker`
该组件的优势是,支持**时间戳**输入和输出(起始时间、终止时间也支持时间戳),可**同时选择**日期和时间。
若只是需要单独选择日期和时间,不需要时间戳输入和输出,可使用原生的 picker 组件。
**_点击 picker 默认值规则:_**
- 若设置初始值 value, 会显示在 picker 显示框中
- 若无初始值 value,则初始值 value 为当前本地时间 Date.now(), 但不会显示在 picker 显示框中
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-datetime-picker)
> `重要通知:组件升级更新 2.0.0 后,支持日期+时间范围选择,组件 ui 将使用日历选择日期,ui 变化较大,同时支持 PC 和 移动端。此版本不向后兼容,不再支持单独的时间选择(type=time)及相关的 hide-second 属性(时间选可使用内置组件 picker)。若仍需使用旧版本,可在插件市场下载*非uni_modules版本*,旧版本将不再维护`
## DatetimePicker 时间选择器
> **组件名:uni-datetime-picker**
> 代码块: `uDatetimePicker`
该组件的优势是,支持**时间戳**输入和输出(起始时间、终止时间也支持时间戳),可**同时选择**日期和时间。
若只是需要单独选择日期和时间,不需要时间戳输入和输出,可使用原生的 picker 组件。
**_点击 picker 默认值规则:_**
- 若设置初始值 value, 会显示在 picker 显示框中
- 若无初始值 value,则初始值 value 为当前本地时间 Date.now(), 但不会显示在 picker 显示框中
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-datetime-picker)
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file
## 1.0.2(2022-07-04)
- 修复 在uni-forms下样式不生效的bug
## 1.0.1(2021-11-23)
- 修复 参数为对象的情况下,url在某些情况显示错误的bug
## 1.0.0(2021-11-19)
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-file-picker](https://uniapp.dcloud.io/component/uniui/uni-file-picker)
## 0.2.16(2021-11-08)
- 修复 传入空对象 ,显示错误的Bug
## 0.2.15(2021-08-30)
- 修复 return-type="object" 时且存在v-model时,无法删除文件的Bug
## 0.2.14(2021-08-23)
- 新增 参数中返回 fileID 字段
## 0.2.13(2021-08-23)
- 修复 腾讯云传入fileID 不能回显的bug
- 修复 选择图片后,不能放大的问题
## 0.2.12(2021-08-17)
- 修复 由于 0.2.11 版本引起的不能回显图片的Bug
## 0.2.11(2021-08-16)
- 新增 clearFiles(index) 方法,可以手动删除指定文件
- 修复 v-model 值设为 null 报错的Bug
## 0.2.10(2021-08-13)
- 修复 return-type="object" 时,无法删除文件的Bug
## 0.2.9(2021-08-03)
- 修复 auto-upload 属性失效的Bug
## 0.2.8(2021-07-31)
- 修复 fileExtname属性不指定值报错的Bug
## 0.2.7(2021-07-31)
- 修复 在某种场景下图片不回显的Bug
## 0.2.6(2021-07-30)
- 修复 return-type为object下,返回值不正确的Bug
## 0.2.5(2021-07-30)
- 修复(重要) H5 平台下如果和uni-forms组件一同使用导致页面卡死的问题
## 0.2.3(2021-07-28)
- 优化 调整示例代码
## 0.2.2(2021-07-27)
- 修复 vue3 下赋值错误的Bug
- 优化 h5平台下上传文件导致页面卡死的问题
## 0.2.0(2021-07-13)
- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
## 0.1.1(2021-07-02)
- 修复 sourceType 缺少默认值导致 ios 无法选择文件
## 0.1.0(2021-06-30)
- 优化 解耦与uniCloud的强绑定关系 ,如不绑定服务空间,默认autoUpload为false且不可更改
## 0.0.11(2021-06-30)
- 修复 由 0.0.10 版本引发的 returnType 属性失效的问题
## 0.0.10(2021-06-29)
- 优化 文件上传后进度条消失时机
## 0.0.9(2021-06-29)
- 修复 在uni-forms 中,删除文件 ,获取的值不对的Bug
## 0.0.8(2021-06-15)
- 修复 删除文件时无法触发 v-model 的Bug
## 0.0.7(2021-05-12)
- 新增 组件示例地址
## 0.0.6(2021-04-09)
- 修复 选择的文件非 file-extname 字段指定的扩展名报错的Bug
## 0.0.5(2021-04-09)
- 优化 更新组件示例
## 0.0.4(2021-04-09)
- 优化 file-extname 字段支持字符串写法,多个扩展名需要用逗号分隔
## 0.0.3(2021-02-05)
- 调整为uni_modules目录规范
- 修复 微信小程序不指定 fileExtname 属性选择失败的Bug
## 1.0.2(2022-07-04)
- 修复 在uni-forms下样式不生效的bug
## 1.0.1(2021-11-23)
- 修复 参数为对象的情况下,url在某些情况显示错误的bug
## 1.0.0(2021-11-19)
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-file-picker](https://uniapp.dcloud.io/component/uniui/uni-file-picker)
## 0.2.16(2021-11-08)
- 修复 传入空对象 ,显示错误的Bug
## 0.2.15(2021-08-30)
- 修复 return-type="object" 时且存在v-model时,无法删除文件的Bug
## 0.2.14(2021-08-23)
- 新增 参数中返回 fileID 字段
## 0.2.13(2021-08-23)
- 修复 腾讯云传入fileID 不能回显的bug
- 修复 选择图片后,不能放大的问题
## 0.2.12(2021-08-17)
- 修复 由于 0.2.11 版本引起的不能回显图片的Bug
## 0.2.11(2021-08-16)
- 新增 clearFiles(index) 方法,可以手动删除指定文件
- 修复 v-model 值设为 null 报错的Bug
## 0.2.10(2021-08-13)
- 修复 return-type="object" 时,无法删除文件的Bug
## 0.2.9(2021-08-03)
- 修复 auto-upload 属性失效的Bug
## 0.2.8(2021-07-31)
- 修复 fileExtname属性不指定值报错的Bug
## 0.2.7(2021-07-31)
- 修复 在某种场景下图片不回显的Bug
## 0.2.6(2021-07-30)
- 修复 return-type为object下,返回值不正确的Bug
## 0.2.5(2021-07-30)
- 修复(重要) H5 平台下如果和uni-forms组件一同使用导致页面卡死的问题
## 0.2.3(2021-07-28)
- 优化 调整示例代码
## 0.2.2(2021-07-27)
- 修复 vue3 下赋值错误的Bug
- 优化 h5平台下上传文件导致页面卡死的问题
## 0.2.0(2021-07-13)
- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
## 0.1.1(2021-07-02)
- 修复 sourceType 缺少默认值导致 ios 无法选择文件
## 0.1.0(2021-06-30)
- 优化 解耦与uniCloud的强绑定关系 ,如不绑定服务空间,默认autoUpload为false且不可更改
## 0.0.11(2021-06-30)
- 修复 由 0.0.10 版本引发的 returnType 属性失效的问题
## 0.0.10(2021-06-29)
- 优化 文件上传后进度条消失时机
## 0.0.9(2021-06-29)
- 修复 在uni-forms 中,删除文件 ,获取的值不对的Bug
## 0.0.8(2021-06-15)
- 修复 删除文件时无法触发 v-model 的Bug
## 0.0.7(2021-05-12)
- 新增 组件示例地址
## 0.0.6(2021-04-09)
- 修复 选择的文件非 file-extname 字段指定的扩展名报错的Bug
## 0.0.5(2021-04-09)
- 优化 更新组件示例
## 0.0.4(2021-04-09)
- 优化 file-extname 字段支持字符串写法,多个扩展名需要用逗号分隔
## 0.0.3(2021-02-05)
- 调整为uni_modules目录规范
- 修复 微信小程序不指定 fileExtname 属性选择失败的Bug
差异被折叠。
差异被折叠。
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论