diff --git a/App.vue b/App.vue index 5676699..6b69387 100644 --- a/App.vue +++ b/App.vue @@ -19,4 +19,149 @@ .page{ padding-top: var(--window-top); } + /* 水平垂直居中 */ + .flex-center{ + display: flex; + align-items: center; + justify-content: center; + } + + /* 水平居左,垂直居中 间距 20rpx */ + .flex-start{ + display: flex; + align-items: center; + justify-content: start; + gap: 20rpx; + } + + /* 垂直居中 */ + .flex-col{ + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 20rpx; + } + /* 垂直居左 */ + .flex-start-col{ + display: flex; + flex-direction: column; + align-items: start; + justify-content: center; + gap: 40rpx; + } + + /* 两段对齐 */ + .flex-sb{ + display: flex; + align-items: center; + width: 100%; + justify-content: space-between; + } + + /* 两段对齐 */ + .flex-sa{ + display: flex; + align-items: center; + width: 100%; + justify-content: space-around; + } + + /* 字体加粗 */ + .font-bold{ + font-weight: bold; + letter-spacing: 2rpx; + } + /* 上边距 */ + .mt-60{ + margin-top: 60rpx; + } + .mt-40{ + margin-top: 40rpx; + } + .dline{ + border: 1px solid #f1f1f1; + width: 100%; + } + + .btn-def{ + width: 30%; + border: none; + outline: none; + font-size: 28rpx; + } + + .btn-suc{ + width: 30%; + border: none; + outline: none; + font-size: 28rpx; + } + + .mt-40{ + margin-top: 40rpx; + } + + .mb-60{ + margin-bottom: 60rpx; + } + + .home{ + background-image: url('static/image/home/home-background.png'); + background-size: cover; + background-repeat: no-repeat; + background-position: center; + width: 100%; + height: 100vh; + overflow: hidden; + } + + .content{ + display: flex; + flex-direction: column; + align-items: center; + padding-top: 31vh; + } + + .mian-btn{ + border: 4rpx solid #e6bf7f; + padding: 16rpx 66rpx; + border-radius: 66rpx; + margin-top: 30rpx; + color: #e6bf7f; + } + + .active{ + background-color: #e6bf7f; + color: white; + } + + .second-color{ + color: #d2d2d2; + margin-top: 20rpx; + font-size: 26rpx; + } + + .btn2{ + border: 4rpx solid #ecb864; + display: flex; + align-items: center; + justify-content: center; + padding: 16rpx 200rpx; + color: #ecb864; + border-radius: 10rpx; + } + + + .btn3{ + border: 4rpx solid #ecb864; + display: flex; + align-items: center; + justify-content: center; + padding: 16rpx 100rpx; + color: #ecb864; + border-radius: 10rpx; + } diff --git a/components/home/greetComponents.vue b/components/home/greetComponents.vue new file mode 100644 index 0000000..b556a96 --- /dev/null +++ b/components/home/greetComponents.vue @@ -0,0 +1,49 @@ + + + + + \ No newline at end of file diff --git a/package.json b/package.json index 136edbc..c6ede65 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,9 @@ "author": "", "license": "ISC", "dependencies": { + "@dcloudio/uni-ui": "^1.5.6", "ali-oss": "^6.21.0", - "dayjs": "^1.11.12" + "dayjs": "^1.11.12", + "sass": "^1.79.3" } } diff --git a/pages.json b/pages.json index 546cf73..e063b4c 100644 --- a/pages.json +++ b/pages.json @@ -1,25 +1,134 @@ { - "pages": [{ - "path": "pages/index/index", - "style": { - "navigationBarTitleText": "" + "pages": [ + { + "path" : "pages/index/home", + "style" : + { + "navigationBarTitleText" : "" + } + }, + { + "path" : "pages/index/area", + "style" : + { + "navigationBarTitleText" : "" + } + }, + { + "path" : "pages/index/checkAge", + "style" : + { + "navigationBarTitleText" : "" + } + }, + { + "path" : "pages/index/fillIn", + "style" : + { + "navigationBarTitleText" : "" + } + }, + { + "path" : "pages/index/greet", + "style" : + { + "navigationBarTitleText" : "" + } + }, + { + "path" : "pages/index/greetP1", + "style" : + { + "navigationBarTitleText" : "" + } + }, + { + "path" : "pages/index/greetP2", + "style" : + { + "navigationBarTitleText" : "" + } + }, + { + "path" : "pages/index/greetP3", + "style" : + { + "navigationBarTitleText" : "" + } + }, + { + "path" : "pages/index/greetP4", + "style" : + { + "navigationBarTitleText" : "" } }, { - "path": "pages/index/order", - "style": { - "navigationBarTitleText": "" + "path" : "pages/index/greetP5", + "style" : + { + "navigationBarTitleText" : "" } }, { - "path": "pages/index/center", - "style": { - "navigationBarTitleText": "" + "path" : "pages/index/appointment", + "style" : + { + "navigationBarTitleText" : "" + } + }, + { + "path" : "pages/index/back", + "style" : + { + "navigationBarTitleText" : "" + } + }, + { + "path" : "pages/index/viewDetail", + "style" : + { + "navigationBarTitleText" : "" + } + }, + { + "path" : "pages/index/reschedule", + "style" : + { + "navigationBarTitleText" : "" + } + }, + { + "path" : "pages/index/cancle", + "style" : + { + "navigationBarTitleText" : "" + } + }, + { + "path" : "pages/index/start", + "style" : + { + "navigationBarTitleText" : "" + } + }, + { + "path" : "pages/index/comment", + "style" : + { + "navigationBarTitleText" : "" + } + }, + { + "path" : "pages/index/selectAppointment", + "style" : + { + "navigationBarTitleText" : "" } } ], "preloadRule": { - "pages/index/index": { + "pages/index/home": { "network": "all", "packages": ["pages_order"] } @@ -52,12 +161,19 @@ }, { "path": "auth/loginAndRegisterAndForgetPassword" + }, + { + "path" : "auth/takePhoto", + "style" : + { + "navigationBarTitleText" : "" + } } ] }], "globalStyle": { "navigationBarTextStyle": "black", - "navigationBarTitleText": "酒店桌布", + "navigationBarTitleText": "答题小程序", "navigationBarBackgroundColor": "#F8F8F8", "backgroundColor": "#F8F8F8", "navigationStyle": "custom" diff --git a/pages/index/appointment.vue b/pages/index/appointment.vue new file mode 100644 index 0000000..512eba7 --- /dev/null +++ b/pages/index/appointment.vue @@ -0,0 +1,60 @@ + + + + + \ No newline at end of file diff --git a/pages/index/area.vue b/pages/index/area.vue new file mode 100644 index 0000000..4567e80 --- /dev/null +++ b/pages/index/area.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/pages/index/back.vue b/pages/index/back.vue new file mode 100644 index 0000000..65ecea9 --- /dev/null +++ b/pages/index/back.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/pages/index/cancle.vue b/pages/index/cancle.vue new file mode 100644 index 0000000..989cefd --- /dev/null +++ b/pages/index/cancle.vue @@ -0,0 +1,33 @@ + + + + + \ No newline at end of file diff --git a/pages/index/checkAge.vue b/pages/index/checkAge.vue new file mode 100644 index 0000000..fde6de5 --- /dev/null +++ b/pages/index/checkAge.vue @@ -0,0 +1,89 @@ + + + + + \ No newline at end of file diff --git a/pages/index/comment.vue b/pages/index/comment.vue new file mode 100644 index 0000000..e50c91b --- /dev/null +++ b/pages/index/comment.vue @@ -0,0 +1,32 @@ + + + + + \ No newline at end of file diff --git a/pages/index/fillIn.vue b/pages/index/fillIn.vue new file mode 100644 index 0000000..9c1bd6c --- /dev/null +++ b/pages/index/fillIn.vue @@ -0,0 +1,91 @@ + + + + + \ No newline at end of file diff --git a/pages/index/greet.vue b/pages/index/greet.vue new file mode 100644 index 0000000..4ff591f --- /dev/null +++ b/pages/index/greet.vue @@ -0,0 +1,40 @@ + + + + + \ No newline at end of file diff --git a/pages/index/greetP1.vue b/pages/index/greetP1.vue new file mode 100644 index 0000000..8fd6ee5 --- /dev/null +++ b/pages/index/greetP1.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/pages/index/greetP2.vue b/pages/index/greetP2.vue new file mode 100644 index 0000000..18f4d1b --- /dev/null +++ b/pages/index/greetP2.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/pages/index/greetP3.vue b/pages/index/greetP3.vue new file mode 100644 index 0000000..a0f02a2 --- /dev/null +++ b/pages/index/greetP3.vue @@ -0,0 +1,35 @@ + + + + + \ No newline at end of file diff --git a/pages/index/greetP4.vue b/pages/index/greetP4.vue new file mode 100644 index 0000000..3ac1e46 --- /dev/null +++ b/pages/index/greetP4.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/pages/index/greetP5.vue b/pages/index/greetP5.vue new file mode 100644 index 0000000..9f2f872 --- /dev/null +++ b/pages/index/greetP5.vue @@ -0,0 +1,37 @@ + + + + + diff --git a/pages/index/home.vue b/pages/index/home.vue new file mode 100644 index 0000000..2372563 --- /dev/null +++ b/pages/index/home.vue @@ -0,0 +1,66 @@ + + + + + diff --git a/pages/index/reschedule.vue b/pages/index/reschedule.vue new file mode 100644 index 0000000..e94d4c7 --- /dev/null +++ b/pages/index/reschedule.vue @@ -0,0 +1,38 @@ + + + + + \ No newline at end of file diff --git a/pages/index/selectAppointment.vue b/pages/index/selectAppointment.vue new file mode 100644 index 0000000..be39ca1 --- /dev/null +++ b/pages/index/selectAppointment.vue @@ -0,0 +1,249 @@ + + + + + \ No newline at end of file diff --git a/pages/index/start.vue b/pages/index/start.vue new file mode 100644 index 0000000..13911b0 --- /dev/null +++ b/pages/index/start.vue @@ -0,0 +1,36 @@ + + + + + \ No newline at end of file diff --git a/pages/index/viewDetail.vue b/pages/index/viewDetail.vue new file mode 100644 index 0000000..864230f --- /dev/null +++ b/pages/index/viewDetail.vue @@ -0,0 +1,37 @@ + + + + + \ No newline at end of file diff --git a/pages_order/auth/loginAndRegisterAndForgetPassword.vue b/pages_order/auth/loginAndRegisterAndForgetPassword.vue index a9fbf75..cfaaa3a 100644 --- a/pages_order/auth/loginAndRegisterAndForgetPassword.vue +++ b/pages_order/auth/loginAndRegisterAndForgetPassword.vue @@ -198,7 +198,7 @@ // uni.$uv.toast('倒计时结束'); }, start() { - // uni.$uv.toast('倒计时开始'); + // uni.`$uv.toast('倒计时开始'); } } } diff --git a/pages_order/auth/takePhoto.vue b/pages_order/auth/takePhoto.vue new file mode 100644 index 0000000..12945ca --- /dev/null +++ b/pages_order/auth/takePhoto.vue @@ -0,0 +1,172 @@ + + + + + + \ No newline at end of file diff --git a/pages_order/auth/wxLogin.vue b/pages_order/auth/wxLogin.vue index ed985d7..8678652 100644 --- a/pages_order/auth/wxLogin.vue +++ b/pages_order/auth/wxLogin.vue @@ -1,153 +1,256 @@ + \ No newline at end of file diff --git a/pages_order/auth/wxUserInfo.vue b/pages_order/auth/wxUserInfo.vue index f72f89c..0396755 100644 --- a/pages_order/auth/wxUserInfo.vue +++ b/pages_order/auth/wxUserInfo.vue @@ -1,13 +1,17 @@ @@ -39,15 +81,29 @@ export default { data() { return { + show:false, userInfo: { headImage: '', nickName: '', + userName: '可可', + avatar: '../static/logo.png' } }; }, onShow() {}, computed: {}, methods: { + open() { + this.$refs.popup.open(); + }, + close() { + this.$refs.popup.close(); + }, + queryInfo() { + this.userInfo.nickName = this.userInfo.userName; + this.userInfo.headImage = this.userInfo.avatar; + this.close(); + }, onChooseAvatar(res) { let self = this self.$Oss.ossUpload(res.target.avatarUrl) @@ -55,34 +111,38 @@ self.userInfo.headImage = url }) }, - submit() { + chooseavatar() { let self = this - - uni.createSelectorQuery().in(this) - .select("#nickName") - .fields({ - properties: ["value"], + uni.chooseImage({ + count: 1, + sourceType: ['album'], + success: function(res) { + self.userInfo.headImage = res.tempFiles[0].path; + self.userInfo.avatar = res.tempFiles[0].path; + self.close(); + } + }); + }, + changeName(value){ + this.userInfo.nickName = value.detail.value; + this.userInfo.userName = value.detail.value; + }, + takePhoto() { + uni.navigateTo({ + url:'/pages_order/auth/takePhoto' + }) + }, + submit() { + if (this.userInfo.nickName && this.userInfo.headImage) { + uni.navigateTo({ + url: '/pages_order/auth/wxLogin' }) - .exec((res) => { - const nickName = res?.[0]?.value - self.userInfo.nickName = nickName - - if (self.$utils.verificationAll(self.userInfo, { - headImage: '请选择头像', - nickName: '请填写昵称', - })) { - return - } - - self.$api('infoUpdateInfo', self.userInfo, res => { - if (res.code == 200) { - uni.switchTab({ - url:'/pages/index/index' - }) - } - }) + } else { + uni.showToast({ + title: '您的头像和用户名不能为空', + icon: 'none' }) - + } }, } } @@ -96,9 +156,21 @@ align-items: center; height: 80vh; + .logo { + height: 160rpx; + width: 160rpx; + background-color: #e5c28b; + border-radius: 15rpx; + } + .title { - line-height: 45rpx; - font-weight: 900; + margin-top: 25rpx; + font-weight: bolder; + } + + .contents { + margin-top: 35rpx; + font-size: 28rpx; } .line { @@ -106,17 +178,29 @@ justify-content: space-between; align-items: center; width: 80%; + border-top: 1px solid #00000023; border-bottom: 1px solid #00000023; padding: 30rpx 0; margin: 0 auto; } + .line-2 { + border-top: none; + padding: 45rpx 0; + } + .chooseAvatar { width: 100%; padding: 0; margin: 0; margin-top: 10vh; border: none; + outline: none; + } + + .chooseAvatar:after { + border: none; + outline: none; } .btn { @@ -126,8 +210,25 @@ width: 80%; padding: 20rpx 0; text-align: center; - border-radius: 15rpx; + border-radius: 100rpx; margin-top: 10vh; + outline: none; + } + + .btn:active { + background-color: #e5c28b; + } + + .circle-logo { + width: 50rpx; + height: 50rpx; + background-color: #e5c28b; + border-radius: 50%; + } + + .avatar { + width: 90rpx; + height: 90rpx; } } \ No newline at end of file diff --git a/pages_order/static/auth/check.svg b/pages_order/static/auth/check.svg new file mode 100644 index 0000000..552e01e --- /dev/null +++ b/pages_order/static/auth/check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/pages_order/static/auth/info.svg b/pages_order/static/auth/info.svg new file mode 100644 index 0000000..4b4ed89 --- /dev/null +++ b/pages_order/static/auth/info.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/pages_order/static/logo.png b/pages_order/static/logo.png new file mode 100644 index 0000000..b5771e2 Binary files /dev/null and b/pages_order/static/logo.png differ diff --git a/project.config.json b/project.config.json new file mode 100644 index 0000000..9ac7dd5 --- /dev/null +++ b/project.config.json @@ -0,0 +1,30 @@ +{ + "appid": "wx75654b529ae6a8ea", + "compileType": "miniprogram", + "miniprogramRoot": "unpackage/dist/dev/mp-weixin/", + "libVersion": "3.5.8", + "packOptions": { + "ignore": [], + "include": [] + }, + "setting": { + "coverView": true, + "es6": true, + "postcss": true, + "minified": true, + "enhance": true, + "showShadowRootInWxmlPanel": true, + "packNpmRelationList": [], + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" + } + }, + "condition": {}, + "editorSetting": { + "tabIndent": "insertSpaces", + "tabSize": 2 + }, + "srcMiniprogramRoot": "unpackage/dist/dev/mp-weixin/" +} \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json new file mode 100644 index 0000000..e0971dc --- /dev/null +++ b/project.private.config.json @@ -0,0 +1,7 @@ +{ + "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", + "projectname": "drink-answer-wechat-uniapp-24-9-2", + "setting": { + "compileHotReLoad": true + } +} \ No newline at end of file diff --git a/static/image/home/btn.png b/static/image/home/btn.png new file mode 100644 index 0000000..343ef6b Binary files /dev/null and b/static/image/home/btn.png differ diff --git a/static/image/home/home-background.png b/static/image/home/home-background.png new file mode 100644 index 0000000..915c981 Binary files /dev/null and b/static/image/home/home-background.png differ diff --git a/uni.scss b/uni.scss index 6e2d4c6..b1bc837 100644 --- a/uni.scss +++ b/uni.scss @@ -19,6 +19,7 @@ $uni-color-primary: #007aff; $uni-color-success: #4cd964; $uni-color-warning: #f0ad4e; $uni-color-error: #dd524d; +$uni-color-login-btn: #00bf61; /* 文字基本颜色 */ $uni-text-color:#333;//基本色 diff --git a/utils/index.js b/utils/index.js index b40f098..3532db2 100644 --- a/utils/index.js +++ b/utils/index.js @@ -1,4 +1,3 @@ - import Vue from 'vue' import util from './utils.js'