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

更新代码

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