Browse Source

上传

master
前端-胡立永 3 months ago
parent
commit
dc9e241d64
63 changed files with 893 additions and 1137 deletions
  1. +42
    -16
      App.vue
  2. +57
    -7
      api/api.js
  3. +2
    -3
      api/http.js
  4. +11
    -10
      components/home/greetComponents.vue
  5. +3
    -3
      config.js
  6. +1
    -1
      manifest.json
  7. +7
    -65
      pages.json
  8. +78
    -0
      pages/index/article.vue
  9. +0
    -420
      pages/index/center.vue
  10. +0
    -40
      pages/index/greet.vue
  11. +195
    -26
      pages/index/home.vue
  12. +30
    -385
      pages/index/index.vue
  13. +74
    -0
      pages/index/reservationSuccess.vue
  14. +25
    -13
      pages_order/auth/wxLogin.vue
  15. +24
    -15
      pages_order/auth/wxUserInfo.vue
  16. +156
    -59
      pages_order/info/appoint.vue
  17. +1
    -1
      pages_order/info/appointDate.vue
  18. +6
    -1
      pages_order/info/chooseArea.vue
  19. +53
    -14
      pages_order/info/fillInfo.vue
  20. +24
    -9
      pages_order/info/greet.vue
  21. +6
    -3
      pages_order/info/infoPages.vue
  22. +8
    -3
      pages_order/info/isAdult.vue
  23. +0
    -0
      pages_order/static/info/a.png
  24. BIN
      static/image/bg/1.png
  25. BIN
      static/image/bg/2.png
  26. BIN
      static/image/bg/3.png
  27. BIN
      static/image/bg/4.png
  28. BIN
      static/image/cart/1.png
  29. BIN
      static/image/cart/2.png
  30. BIN
      static/image/center/1.png
  31. BIN
      static/image/center/10.png
  32. +0
    -1
      static/image/center/11.svg
  33. BIN
      static/image/center/2.png
  34. BIN
      static/image/center/3.png
  35. BIN
      static/image/center/4.png
  36. BIN
      static/image/center/5.png
  37. BIN
      static/image/center/6.png
  38. BIN
      static/image/center/7.png
  39. BIN
      static/image/center/8.png
  40. BIN
      static/image/center/9.png
  41. BIN
      static/image/home/0.png
  42. BIN
      static/image/home/1.png
  43. BIN
      static/image/home/2.png
  44. BIN
      static/image/home/3.png
  45. BIN
      static/image/home/address-icon.png
  46. BIN
      static/image/home/arrow-icon.png
  47. BIN
      static/image/home/search-icon.png
  48. BIN
      static/image/product/favorable.png
  49. BIN
      static/image/tabbar/cart-a.png
  50. BIN
      static/image/tabbar/cart.png
  51. BIN
      static/image/tabbar/category-a.png
  52. BIN
      static/image/tabbar/category.png
  53. BIN
      static/image/tabbar/center-a.png
  54. BIN
      static/image/tabbar/center.png
  55. BIN
      static/image/tabbar/home-a.png
  56. BIN
      static/image/tabbar/home.png
  57. BIN
      static/image/tabbar/order-a.png
  58. BIN
      static/image/tabbar/order.png
  59. +57
    -15
      store/store.js
  60. +1
    -1
      uni.scss
  61. +0
    -10
      utils/oss-upload/oss/index.js
  62. +1
    -1
      utils/oss-upload/oss/web.js
  63. +31
    -15
      utils/utils.js

+ 42
- 16
App.vue View File

@ -2,13 +2,16 @@
export default {
onLaunch: function() {},
onShow: function() {
// this.$store.commit('initConfig')
this.$store.commit('initConfig')
this.$store.commit('getBanner')
this.$store.commit('getArticleList')
this.$store.commit('getProblemList')
},
onHide: function() {}
}
</script>
<style>
<style lang="scss">
/*每个页面公共css */
body {
background-color: #f7f7f7;
@ -22,14 +25,23 @@
.page {
padding-top: var(--window-top);
}
.logo {
width: 120rpx;
height: 120rpx;
border-radius: 10rpx;
background-color: #e6c38b;
.page-bg{
height: calc(100vh - 120rpx);
width: 100vw;
position: absolute;
top: 0;
left: 0;
padding-top: 120rpx;
}
// .logo {
// width: 120rpx;
// height: 120rpx;
// border-radius: 10rpx;
// background-color: $uni-color;
// }
img {
width: 100%;
height: 100%;
@ -73,7 +85,7 @@
flex-direction: column;
align-items: start;
justify-content: center;
gap: 40rpx;
gap: 20rpx;
}
/* 两段对齐 */
@ -112,7 +124,21 @@
display: flex;
flex-direction: column;
align-items: center;
padding-top: 30vh;
padding-top: 480rpx;
position: relative;
}
.content_now{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
position: fixed;
top: 46%;
transform: translate(0, -50%);
padding: 0 70rpx;
box-sizing: border-box;
width: 100%;
}
.mian-btn {
@ -130,27 +156,27 @@
.second-color {
color: #d2d2d2;
margin-top: 20rpx;
margin-top: 40rpx;
font-size: 26rpx;
}
.btn2 {
border: 4rpx solid #ecb864;
border: 4rpx solid $uni-color;
display: flex;
align-items: center;
justify-content: center;
padding: 16rpx 200rpx;
color: #ecb864;
color: $uni-color;
border-radius: 10rpx;
}
.btn3 {
border: 4rpx solid #ecb864;
border: 4rpx solid $uni-color;
display: flex;
align-items: center;
justify-content: center;
padding: 16rpx 100rpx;
color: #ecb864;
color: $uni-color;
border-radius: 10rpx;
}
@ -167,7 +193,7 @@
}
.mt-20 {
margin-top: 20vh;
margin-top: 340rpx;
}
.content-text {


+ 57
- 7
api/api.js View File

@ -1,4 +1,5 @@
import http from './http.js'
import utils from '../utils/utils.js'
const config = {
// 示例
@ -7,25 +8,76 @@ const config = {
// limit : 1000
// },
getConfig : {url : '/api/getConfig', method : 'GET', limit : 500},
getConfig : {url : '/applet_index/commonConfig', method : 'GET', limit : 500},
// 微信登录接口
wxLogin: {
url: '/login/login',
method: 'POST',
url: '/login_common/appletLogin',
method: 'GET',
limit : 500,
showLoading : true,
},
// 获取个人信息接口
getInfo: {
url: '/info_common/getInfo',
method: 'GET',
limit : 500,
showLoading : true,
},
// 修改个人信息接口
updateInfo: {
url: '/info/updateInfo',
url: '/info_common/updateInfo',
method: 'POST',
auth: true,
limit : 500,
showLoading : true,
},
//首页-出现问题列表接口
problemList: {
url: '/applet_index/problemList',
method: 'GET',
},
//首页-文章列表接口
articleList: {
url: '/applet_index/articleList',
method: 'GET',
},
//首页-轮播图接口
bannerList: {
url: '/applet_index/bannerList',
method: 'GET',
},
//提交问答记录
submitLog: {
url: '/applet_post/submitLog',
method: 'POST',
limit : 1000,
showLoading : true,
auth: true,
},
//提交问答记录
submit: {
url: '/applet_post/submit',
method: 'POST',
limit : 1000,
showLoading : true,
auth: true,
},
//查询我的问答记录
queryMyLog: {
url: '/applet_post/queryMyLog',
method: 'GET',
auth: true,
showLoading : true,
},
}
@ -60,9 +112,7 @@ export function api(key, data, callback, loadingTitle){
//必须登录
if (req.auth) {
if (!uni.getStorageSync('token')) {
uni.navigateTo({
url: '/pages/login/mobile'
})
utils.toLogin()
console.error('需要登录')
return
}


+ 2
- 3
api/http.js View File

@ -1,5 +1,6 @@
import Vue from 'vue'
import utils from '../utils/utils.js'
function http(uri, data, callback, method = 'GET', showLoading, title) {
@ -29,9 +30,7 @@ function http(uri, data, callback, method = 'GET', showLoading, title) {
res.data.message == '操作失败,用户不存在!'){
uni.removeStorageSync('token')
console.error('登录过期');
uni.navigateTo({
url: '/pages_order/auth/wxLogin'
})
utils.toLogin()
}
if(res.statusCode == 200 && res.data.code != 200){


+ 11
- 10
components/home/greetComponents.vue View File

@ -3,7 +3,8 @@
<view class="content" :class="btn[0]==='下一页'?'mt-25':'mt-30'">
<span v-show="btn[0]==='下一页'" style="margin-bottom: 10rpx; font-size: 28rpx;">作为一位</span>
<span style="color: #c7a87c;">{{title}}</span>
<span v-for="(item,index) in textList" :key="index" style="margin-top: 15rpx;">
<span v-for="(item,index) in textList" :key="index"
style="margin-top: 15rpx;">
{{item}}
</span>
<view class="flex-col query" style="gap: 0rpx;" v-show="btn.length>0">
@ -37,13 +38,13 @@
<style lang="scss" scoped>
.query{
position: absolute;
bottom: -25vh;
}
.mt-25{
padding-top: 25vh;
}
.mt-30{
padding-top: 30vh;
}
position: absolute;
bottom: -25vh;
}
.mt-25{
padding-top: 25vh;
}
.mt-30{
padding-top: 30vh;
}
</style>

+ 3
- 3
config.js View File

@ -7,16 +7,16 @@ import uvUI from '@/uni_modules/uv-ui-tools'
Vue.use(uvUI);
// 当前环境
const type = 'dev'
const type = 'prod'
// 环境配置
const config = {
dev : {
baseUrl : 'http://www.gcosc.fun:82',
baseUrl : 'http://h5.xzaiyp.top/answer-api',
},
prod : {
baseUrl : 'http://xxx.xxx.xxx/xxx',
baseUrl : 'https://admin.geniusjourneyclub.com/answer-api',
}
}


+ 1
- 1
manifest.json View File

@ -52,7 +52,7 @@
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "wxe7ae8cbe1673834c",
"appid" : "wxd83c5228fffa1b58",
"setting" : {
"urlCheck" : false
},


+ 7
- 65
pages.json View File

@ -1,27 +1,19 @@
{
"pages": [{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": ""
}
},
"pages": [
{
"path": "pages/index/order",
"path": "pages/index/index",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/index/center",
"path": "pages/index/home",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/index/home",
"style": {
"navigationBarTitleText": ""
}
"path": "pages/index/article"
}
],
"preloadRule": {
@ -32,24 +24,7 @@
},
"subPackages": [{
"root": "pages_order",
"pages": [{
"path": "order/orderDetail"
},
{
"path": "mine/purse"
},
{
"path": "mine/runningWater"
},
{
"path": "mine/address"
},
{
"path": "product/productDetail"
},
{
"path": "order/refundsOrExchange"
},
"pages": [
{
"path": "auth/wxLogin"
},
@ -57,43 +32,10 @@
"path": "auth/wxUserInfo"
},
{
"path": "auth/loginAndRegisterAndForgetPassword"
},
{
"path": "info/chooseArea"
},
{
"path": "info/isAdult"
},
{
"path": "info/fillInfo"
},
{
"path": "info/greet"
},
{
"path": "info/startTest"
},
{
"path": "info/infoPages"
},
{
"path": "info/appointDate"
},
{
"path" : "info/feedback"
},
{
"path" : "info/start"
},
{
"path" : "info/experience"
},
{
"path" : "info/comment"
"path" : "info/appoint"
},
{
"path" : "info/appoint"
"path" : "info/fillInfo"
}
]
}],


+ 78
- 0
pages/index/article.vue View File

@ -0,0 +1,78 @@
<template>
<view class="home">
<image src="/static/image/bg/1.png"
class="page-bg"
mode="aspectFill"></image>
<view class="content_now">
<view class="article">
<uv-parse :content="articleList[index].details"></uv-parse>
</view>
</view>
<view class="an">
<view class="btn2"
@click="next">
下一页
</view>
<text class="second-color">{{ configList.bg_title }}</text>
</view>
</view>
</template>
<script>
import { mapState } from 'vuex'
export default {
computed : {
...mapState(['articleList', 'configList']),
},
data() {
return {
index : 0,
}
},
methods: {
next(){
if(this.index == this.articleList.length - 1){
this.$store.commit('getQueryMyLog')
// uni.navigateTo({
// url: '/pages/index/home'
// })
}else{
this.index++
}
},
}
}
</script>
<style lang="scss" scoped>
.article{
width: 600rpx;
font-size: 28rpx;
line-height: 50rpx;
}
.an{
position: fixed;
bottom: 330rpx;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
}
.second-color{
margin-top: 20rpx;
}
.btn2 {
border: 4rpx solid $uni-color;
display: flex;
align-items: center;
justify-content: center;
padding: 16rpx 200rpx;
color: $uni-color;
border-radius: 10rpx;
}
</style>

+ 0
- 420
pages/index/center.vue View File

@ -1,420 +0,0 @@
<template>
<view class="page">
<navbar title="个人中心" />
<view class="head">
<view class="headImage">
<image src="" mode=""></image>
</view>
<view class="info">
<view class="name">
倾心.
</view>
<!-- <view class="vip">
VIP1
</view> -->
<view class="tips">
今天是您来的的第32天
</view>
</view>
<view class="headBtn" @click="headBtn">
角色切换
</view>
<view class="setting">
<uv-icon name="setting" size="40rpx"></uv-icon>
</view>
</view>
<!-- 水洗店 -->
<view class="userShop" v-if="userShop">
<userShopCommission />
<view class="userList">
<view class="title">
我的用户
</view>
<view class="list">
<view class="item" v-for="(item, index) in 20" :key="index">
<view class="name">
客户王生
</view>
<view class="num">
剩余水洗布198
</view>
</view>
</view>
</view>
</view>
<!-- 酒店 -->
<view class="user" v-else>
<view class="line">
<view class="item">
<view class="image">
<image src="/static/image/center/1.png" mode=""></image>
</view>
<view class="">
余额3000
</view>
</view>
<view class="item">
<view class="image">
<image src="/static/image/center/4.png" mode=""></image>
</view>
<view class="">
押金30000
</view>
</view>
</view>
<view class="line grid">
<view class="title">
常用功能
</view>
<uv-grid :col="4" :border="false">
<uv-grid-item @click="$utils.navigateTo('/pages_order/mine/address')">
<image class="image" src="/static/image/center/7.png" mode=""></image>
<text class="grid-text">地址管理</text>
</uv-grid-item>
<uv-grid-item @click="$utils.redirectTo('/index/order')">
<image class="image" src="/static/image/center/8.png" mode=""></image>
<text class="grid-text">订单管理</text>
</uv-grid-item>
<uv-grid-item @click="$utils.navigateTo('/pages_order/order/refundsOrExchange?index='+0)">
<image class="image" src="/static/image/center/5.png" mode=""></image>
<text class="grid-text">换货</text>
</uv-grid-item>
<uv-grid-item @click="$utils.navigateTo('/pages_order/order/refundsOrExchange?index='+1)">
<image class="image" src="/static/image/center/7.png" mode=""></image>
<text class="grid-text">退货</text>
</uv-grid-item>
</uv-grid>
</view>
<view class="line grid">
<uv-grid :col="4" :border="false">
<uv-grid-item @click="contactUs">
<image class="image" src="/static/image/center/9.png" mode=""></image>
<text class="grid-text">联系客服</text>
</uv-grid-item>
<uv-grid-item>
<image class="image" src="/static/image/center/6.png" mode=""></image>
<text class="grid-text">我的租赁</text>
</uv-grid-item>
<uv-grid-item @click="$utils.redirectTo('/index/cart')">
<image class="image" src="/static/image/center/7.png" mode=""></image>
<text class="grid-text">租赁车</text>
</uv-grid-item>
<uv-grid-item
@click="$utils.navigateTo('/pages_order/auth/loginAndRegisterAndForgetPassword?index='+2)">
<image class="image" src="/static/image/center/7.png" mode=""></image>
<text class="grid-text">申请成为水洗店</text>
</uv-grid-item>
</uv-grid>
</view>
</view>
<!-- 联系客服弹框 -->
<uv-overlay :show="show" @click="show = false">
<view class="warp">
<view class="rect" @tap.stop>
<view class="title">联系客服</view>
<view class="center">确定拨打客服电话?</view>
<view class="bottom">
<view>
<uv-button type="info" shape="circle" text="取消" :custom-style="customStyle1"
@click="cancle"></uv-button>
</view>
<view>
<uv-button type="info" shape="circle" text="确定" :custom-style="customStyle2"
@click="confirm"></uv-button>
</view>
</view>
</view>
</view>
</uv-overlay>
<tabber select="4" />
</view>
</template>
<script>
import tabber from '@/components/base/tabbar.vue'
import {
mapGetters
} from 'vuex'
import userShopCommission from '@/components/userShop/userShopCommission.vue'
export default {
components: {
tabber,
userShopCommission,
},
computed: {
...mapGetters(['userShop']),
customStyle1() {
return {
height: '60rpx',
background: '#FFF',
color: '#000000',
fontSize: '36rpx',
borderRadius: '40rpx', //
// nvue
'border-top-right-radius': '40rpx',
'border-bottom-left-radius': '40rpx',
'border-bottom-right-radius': '40rpx',
'width': '150rpx',
}
},
customStyle2() {
return {
height: '60rpx',
background: '#fd5100',
color: '#FFF',
fontSize: '34px',
borderRadius: '40rpx', //
// nvue
'border-top-right-radius': '40rpx',
'border-bottom-left-radius': '40rpx',
'border-bottom-right-radius': '40rpx',
'width': '150rpx',
}
}
},
data() {
return {
show: false,
}
},
methods: {
headBtn() {
let self = this
uni.showModal({
title: '演示切换角色之后的效果',
success(res) {
if (res.confirm) {
self.$store.state.shop = !self.$store.state.shop
}
}
})
},
//
contactUs() {
this.show = true
},
confirm() {
this.show = false
},
cancle() {
this.show = false
},
}
}
</script>
<style scoped lang="scss">
.page {
.warp {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.rect {
width: 600rpx;
height: 300rpx;
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
.title {
padding: 10rpx 0 0 15rpx;
background-color: #fd5100;
color: #FFF;
text-align: left;
width: 100%;
height: 18%;
font-size: 36rpx;
}
.center {
height: 40%;
display: flex;
justify-content: center;
align-items: center;
font-size: 36rpx;
}
.bottom {
display: flex;
justify-content: center;
gap: 50rpx;
}
}
}
image {
width: 100%;
height: 100%;
}
.head {
display: flex;
background-color: #fff;
padding: 40rpx 20rpx;
align-items: center;
position: relative;
.headImage {
width: 120rpx;
height: 120rpx;
background-image: url(/static/image/center/3.png);
background-size: 100% 100%;
overflow: hidden;
border-radius: 50%;
margin-right: 40rpx;
}
.info {
font-size: 28rpx;
.vip {
background-color: #FCCC92;
color: #FA6239;
width: 100rpx;
display: flex;
justify-content: center;
align-items: center;
height: 40rpx;
border-radius: 20rpx;
margin-top: 20rpx;
}
.name {
font-size: 32rpx;
}
.tips {
font-size: 26rpx;
color: #ABABAB;
}
}
.headBtn {
margin-left: auto;
padding: 15rpx 20rpx;
background-color: $uni-color;
color: #fff;
border-radius: 20rpx;
margin-top: 50rpx;
}
.setting {
position: absolute;
right: 50rpx;
top: 50rpx;
}
}
.userShop {
.userList {
.title {
font-size: 32rpx;
font-weight: 900;
padding: 20rpx;
}
.list {
display: flex;
flex-wrap: wrap;
.item {
width: 270rpx;
margin: 20rpx;
display: flex;
flex-direction: column;
padding: 40rpx 30rpx;
background-color: #fff;
border-radius: 30rpx;
line-height: 60rpx;
.name {}
.num {
color: $uni-color;
font-weight: 600;
font-size: 28rpx;
}
}
}
}
}
.user {
.line {
display: flex;
background-color: #fff;
margin-top: 20rpx;
padding: 20rpx 0;
.item {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
padding: 20rpx 0;
&:nth-child(1) {
border-right: 1px solid #00000013;
}
.image {
width: 100rpx;
height: 70rpx;
margin-right: 20rpx;
}
}
}
.grid {
flex-direction: column;
font-size: 26rpx;
padding: 20rpx;
.title {
margin-bottom: 30rpx;
font-size: 28rpx;
font-weight: 600;
}
.image {
width: 70rpx;
height: 70rpx;
margin-bottom: 10rpx;
}
text {
text-align: center;
width: 120rpx;
}
}
}
</style>

+ 0
- 40
pages/index/greet.vue View File

@ -1,40 +0,0 @@
<template>
<view class="home">
<view class="content" style="padding-top: 35vh;">
<span>欢迎</span>
<span style="font-size: 80rpx; margin: 20rpx 0;">Christine</span>
<view class="flex-col" style="gap: 5rpx; margin-top: 40rpx;">
<span>来到百富门的世界</span>
<span>品味传承与创新交织的威士忌艺术</span>
<span>开启您的专属品鉴之旅</span>
</view>
<view style="margin-top: 6vh;" @click="query">
<view class="btn2">
点击进入
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
query(){
uni.navigateTo({
url:'/pages/index/greetP1'
})
}
}
}
</script>
<style lang="scss" scoped>
</style>

+ 195
- 26
pages/index/home.vue View File

@ -1,37 +1,154 @@
<template>
<view class="home">
<view class="content">
<span class="font-bold mb-60">您是否有品鉴威士忌的习惯?</span>
<view class="mian-btn" :class="{active:isActive === 'yes'}" @click="setActive('yes')"></view>
<view class="mian-btn" :class="{active:isActive === 'no'}" @click="setActive('no')"></view>
<view class="b-btn mt-60">
<view class="pre-btn">
<image src="/static/image/bg/1.png"
class="page-bg"
mode="aspectFill"></image>
<!-- next1 -->
<view class="content_now" v-if="stop == 1">
<view class=""
v-if="probleme[index]"
v-html="$utils.stringFormatHtml(probleme[index].title)">
</view>
<!-- <view class="mian-btn"
:class="{active:isActive === '是'}"
@click="setActive('是')"></view>
<view class="mian-btn"
:class="{active:isActive === '否'}"
@click="setActive('否')"></view> -->
<view class="mian-btn"
v-for="(item, index) in probleme[index] && probleme[index].danan && probleme[index].danan.split(',')"
:class="{active:isActive === item}"
:key="index"
@click="setActive(item)">{{ item }}</view>
</view>
<!-- next2 -->
<view class="content_now" v-if="stop == 2">
<text class="font-bold mb-60">请选择您所在的区域</text>
<view class="">
<picker
mode="region"
:value="date"
class="u-w-440"
@change="bindTimeChange">
<view class="region">
<view class="">
{{ address.province}}
</view>
<view class="">
{{ address.city}}
</view>
<view class="">
{{ address.district}}
</view>
</view>
</picker>
</view>
</view>
<view class="an">
<!-- <view style="display: flex;width: 600rpx;"
v-if="stop == 1">
<view class="next-btn"
v-if="index > 0"
@click="index--">
上一题
</view>
<view class="next-btn" @click="next">
<view class="next-btn"
@click="next">
下一题
</view>
</view> -->
<view class="next-btn"
v-if="stop == 1"
@click="next">
下一题
</view>
<view class="next-btn"
v-if="stop == 2"
@click="next">
提交
</view>
<text class="second-color">欢快无限饮&nbsp;&nbsp;饮酒有限度</text>
<text class="second-color">{{ configList.bg_title }}</text>
</view>
</view>
</template>
<script>
import { mapState } from 'vuex'
export default {
data() {
return {
isActive:null
isActive : null,
stop : 1,
index : 0,
address : {
province : '',
city : '',
district : '',
}
}
},
computed : {
...mapState(['problemList', 'configList', 'queryMyLog']),
probleme(){
let ids = []
for(let i = 0;i < this.queryMyLog.length;i++){
ids.push(this.queryMyLog[i].topId)
}
return this.problemList.filter(n => {
return !ids.includes(n.id)
})
},
},
onLoad() {
if(this.probleme.length == 0){
this.stop++
}
let address = uni.getStorageSync('user_address')
if(address){
this.address = JSON.parse(address)
}
},
onShow() {
},
methods: {
setActive(value){
this.isActive = value
},
next(){
if(this.isActive!==null){
uni.navigateTo({
url:'/pages_order/info/chooseArea'
this['next' + this.stop]()
},
next1(){
if(this.isActive){
this.$api('submitLog', {
topId : this.probleme[this.index].id,
context : this.isActive,
}, res => {
this.isActive = null
if(this.index == this.probleme.length - 1){
this.stop = 2
}else{
this.index++
}
})
}else{
uni.showToast({
@ -39,17 +156,57 @@
icon: 'none'
})
}
}
},
next2(){
// this.stop = 3
if(!this.address.province){
uni.showToast({
title:'请选择地址后进行下一题',
icon: 'none'
})
return
}
uni.redirectTo({
url: '/pages_order/info/fillInfo'
})
},
//
bindTimeChange(e) {
this.address.province = e.detail.value[0];
this.address.city = e.detail.value[1];
this.address.district = e.detail.value[2];
this.address.provinceName = e.detail.value[0] + e.detail.value[1] + e.detail.value[2];
uni.setStorageSync('user_address', JSON.stringify(this.address))
},
}
}
</script>
<style lang="scss" scoped>
.region{
display: flex;
align-items: center;
&>view{
width: 140rpx;
height: 50rpx;
border-radius: 10rpx;
border: 1px solid #e6bf7f;
margin: 0 10rpx;
line-height: 50rpx;
text-align: center;
}
}
.b-btn{
width: 86%;
display: flex;
justify-content: space-between;
padding-top: 20vh;
justify-content: center;
padding-top: 130rpx;
.pre-btn{
border: 4rpx solid #f1e0c6;
@ -57,17 +214,29 @@
border-radius: 66rpx;
color: #e6bf7f;
}
}
.next-btn{
background-image: url('../../static/image/home/btn.png');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
width: 40vw;
display: flex;
align-items: center;
justify-content: center;
color: white;
}
.next-btn{
background-image: url('../../static/image/home/btn.png');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
width: 280rpx;
display: flex;
align-items: center;
justify-content: center;
color: white;
padding: 16rpx 90rpx;
}
.an{
position: fixed;
bottom: 300rpx;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
}
</style>

+ 30
- 385
pages/index/index.vue View File

@ -1,412 +1,57 @@
<template>
<view class="page">
<navbar/>
<view class="search">
<view @click="showSelectArea" class="left-area">
<image src="@/static/image/home/address-icon.png"></image>
<view class="area">{{ area }}</view>
<image src="@/static/image/home/arrow-icon.png" mode="aspectFit"></image>
<view class="parting-line">|</view>
</view>
<view class="center-area">
<image
style="margin-right: 20rpx;"
src="@/static/image/home/search-icon.png"></image>
<input v-model="queryParams.title"
placeholder="桌布租赁" />
</view>
<!-- <view class="right-area">
<view @click="searchAddress" class="search-button">
搜索
</view>
</view> -->
<view class="home">
<image src="/static/image/bg/2.png"
class="page-bg"
mode="aspectFill"></image>
</view>
<view class="swipe">
<uv-swiper
:list="bannerList"
indicator
height="320rpx"
keyName="url"></uv-swiper>
<view class="swipe" style="padding-top: 310rpx;">
<uv-swiper :list="bannerList"
keyName="image"
height="300rpx"></uv-swiper>
</view>
<!-- 水洗店 -->
<view class="userShop"
v-if="userShop">
<view class="list">
<view class="item"
v-for="(item, index) in 4"
:key="index">
<view class="">
<view class="">
我的客户
</view>
<view class="num">
{{ 30 }}
</view>
</view>
<view class="">
<image :src="`/static/image/home/${index}.png`" mode=""></image>
</view>
</view>
<view class="content" style="padding-top: 20rpx;">
<text>欢迎</text>
<text style="font-size: 80rpx; margin: 10rpx 0;">Christine</text>
<view class="flex-col" style="gap: 5rpx; margin-top: 20rpx;">
<text>来到百富门的世界</text>
<text>品味传承与创新交织的威士忌艺术</text>
<text>开启您的专属品鉴之旅</text>
</view>
</view>
<!-- 酒店 -->
<view class="user"
v-else>
<uv-notice-bar
fontSize="28rpx"
:text="text"></uv-notice-bar>
<view class="shop">
<image
class="image"
src="https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg"
mode=""></image>
<view class="shopInfo">
<view class="title">
HOUS水洗店
</view>
<view class="tags">
<view class="tag">
桌布水洗
</view>
<view class="tag">
桌布租赁
</view>
</view>
<view class="time">
9:00-18:00
</view>
<view class="address">
长沙市天心区桂花坪街道231号
</view>
</view>
<view class="btns">
<view class="btn"
@click="$utils.navigateTo('/pages_order/auth/wxUserInfo')">
我要水洗
</view>
<view style="margin-top: 40rpx;" @click="query">
<view class="btn2">
点击进入
</view>
<view class="tips">
关联门店主信门店
</view>
</view>
<view class="productList">
<productList/>
</view>
</view>
<!-- <selectArea ref="selectArea" @close="closeAreaPro" @select="selectArea"></selectArea> -->
<PrivacyAgreementPoup/>
<tabber select="0"/>
</view>
</template>
<script>
import PrivacyAgreementPoup from '@/components/config/PrivacyAgreementPoup.vue'
import Position from '@/utils/position.js'
import tabber from '@/components/base/tabbar.vue'
import productList from '@/components/user/productList.vue'
import { mapGetters } from 'vuex'
// import selectArea from '../../components/selectArea.vue';
import { mapState } from 'vuex'
export default {
components : {
tabber,
productList,
PrivacyAgreementPoup,
},
data() {
return {
area: '长沙',
text : '长沙市刘师傅在服务过程中客户投诉“服务过程中有不文明的行为”.....',
queryParams: {
pageNo: 1,
pageSize: 10,
title: ''
},
bannerList: [
{
url: 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
},
{
url: 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
},
{
url: 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
},
],
productList: [],
}
},
computed : {
...mapGetters(['userShop']),
...mapState(['bannerList']),
},
onShow() {
},
methods: {
//
showSelectArea() {
// this.$refs.selectArea.open()
},
//
searchAddress() {
Position.getLocation(res => {
Position.selectAddress(res.longitude, res.latitude, success => {
let address = this.extractProvinceAndCity(success)
this.queryParams.title = address.city
})
query(){
uni.navigateTo({
// url: '/pages_order/info/infoPages'
url: '/pages/index/article'
})
},
//()
extractProvinceAndCity(res) { //()
if (!res.address && res.name) { //
return {
province: '',
city: res.name
};
}
if (res.address) { //
// 使
const regex = /(?<province>[\u4e00-\u9fa5]+?省)(?<city>[\u4e00-\u9fa5]+?(?:市|自治州|盟|地区))/;
const match = res.address.match(regex);
if (match) { //
return {
province: match.groups.province,
city: match.groups.city
};
}
}
return { //
province: '',
city: ''
}
},
}
}
</script>
<style scoped lang="scss">
.search {
height: 82rpx;
width: 710rpx;
background: #FFFFFF;
margin: 20rpx auto;
border-radius: 41rpx;
box-sizing: border-box;
padding: 0 15rpx;
display: flex;
align-items: center;
// justify-content: space-between;
.left-area,
.center-area {
display: flex;
align-items: center;
}
.left-area {
max-width: 160rpx;
image {
flex-shrink: 0;
width: 26rpx;
height: 26rpx;
}
.area {
font-size: 24rpx;
display: -webkit-box;
-webkit-line-clamp: 2;
/* 限制显示两行 */
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
color: #292929;
}
.parting-line {
flex-shrink: 0;
font-size: 26rpx;
color: #ccc;
margin: 0rpx 5rpx;
}
}
.center-area {
display: flex;
flex-wrap: nowrap;
align-items: center;
width: calc(100% - 290rpx);
margin-left: 30rpx;
image {
width: 26rpx;
height: 26rpx;
}
.van-field {
background-color: transparent;
box-sizing: border-box;
height: 82rpx;
line-height: 82rpx;
width: calc(100% - 30rpx);
padding: 0rpx 10rpx 0rpx 0rpx;
input {
height: 82rpx;
font-size: 60rpx;
}
}
}
.right-area {
.search-button {
background: #60BDA2;
height: 60rpx;
width: 130rpx;
font-size: 26rpx;
border-radius: 35rpx;
color: white;
display: flex;
align-items: center;
justify-content: center;
}
}
}
.swipe{
overflow: hidden;
border-radius: 20rpx;
margin: 20rpx;
}
.page{
& /deep/ .uv-icon__icon{
font-size: 30rpx !important;
}
//
.userShop{
.list{
display: flex;
flex-wrap: wrap;
.item{
display: flex;
justify-content: center;
align-items: center;
width: 330rpx;
margin: 20rpx;
padding: 30rpx 0;
color: #FFFFFF;
line-height: 50rpx;
border-radius: 20rpx;
font-size: 28rpx;
.num{
font-size: 38rpx;
font-weight: 900;
}
image{
width: 110rpx;
height: 110rpx;
margin-left: 20rpx;
}
&:nth-child(1){
background: #F07A77;
}
&:nth-child(2){
background: #F48B4E;
}
&:nth-child(3){
background: #6487E1;
}
&:nth-child(4){
background: #61B7E6;
}
}
}
}
//
.user{
padding: 20rpx;
.shop{
position: relative;
display: flex;
align-items: center;
justify-content: center;
background-color: #fff;
margin-top: 20rpx;
border-radius: 20rpx;
padding: 20rpx;
overflow: hidden;
.image{
width: 180rpx;
height: 180rpx;
margin-right: 20rpx;
border-radius: 20rpx;
}
.shopInfo{
font-size: 22rpx;
.title{
font-size: 30rpx;
}
.tags{
display: flex;
.tag{
padding: 4rpx 6rpx;
border: 1rpx solid #FFAC6E;
color: #FFAC6E;
margin-right: 10rpx;
margin-top: 10rpx;
font-size: 18rpx;
}
}
.time{
margin-top: 10rpx;
display: flex;
}
.address{
margin-top: 10rpx;
display: flex;
}
}
.btns{
margin-left: auto;
display: flex;
align-items: center;
justify-content: center;
.btn{
background-color: $uni-color;
color: #fff;
box-shadow: 0 0 5rpx 5rpx #FFAC6E;
padding: 10rpx 20rpx;
flex-shrink: 0;
border-radius: 35rpx;
}
}
.tips{
position: absolute;
top: 0;
right: 0;
font-size: 24rpx;
color: #FFAC6E;
background-color: #FEF5EE;
padding: 10rpx 20rpx;
border-radius: 10rpx;
}
}
}
}
</style>
<style lang="scss" scoped>
</style>

+ 74
- 0
pages/index/reservationSuccess.vue View File

@ -0,0 +1,74 @@
<template>
<view class="home">
<image src="/static/image/bg/1.png"
class="page-bg"
mode="aspectFill"></image>
<view class="content_now">
<view class="article">
<uv-parse :content="configList[key]"></uv-parse>
</view>
</view>
<view class="an">
<view class="btn2"
@click="next">
下一页
</view>
<text class="second-color">{{ configList.bg_title }}</text>
</view>
</view>
</template>
<script>
import { mapState } from 'vuex'
export default {
computed : {
...mapState(['configList']),
},
data() {
return {
index : 0,
key : '',
}
},
onLoad(args) {
this.key = args.key || 'cancel_value'
},
methods: {
next(){
},
}
}
</script>
<style lang="scss" scoped>
.article{
width: 600rpx;
font-size: 28rpx;
}
.an{
position: fixed;
bottom: 330rpx;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
}
.second-color{
margin-top: 20rpx;
}
.btn2 {
border: 4rpx solid $uni-color;
display: flex;
align-items: center;
justify-content: center;
padding: 16rpx 200rpx;
color: $uni-color;
border-radius: 10rpx;
}
</style>

+ 25
- 13
pages_order/auth/wxLogin.vue View File

@ -1,11 +1,11 @@
<template>
<view class="login">
<uv-navbar leftText="注册" @leftClick="leftClick" class="background"></uv-navbar>
<view class="logo">
<!-- <image src="/static/image/login/logo.png" mode=""></image> -->
<image :src="configList.logo_image" mode="aspectFill"
class="logo"></image>
</view>
<view class="title">
答题小程序
{{ configList.logo_name }}
</view>
<view class="btn mt" @click="wxLogin">
<view class="icon">
@ -61,6 +61,7 @@
</template>
<script>
import { mapState } from 'vuex'
import configPopup from '@/components/config/configPopup.vue';
export default {
name: 'Login',
@ -69,6 +70,15 @@
checkboxValue: []
}
},
computed : {
...mapState(['configList']),
customStyle() {
return {
background: '#f1f1f1',
color: '#00bf61'
}
},
},
methods: {
wxLogin() {
if (!this.checkboxValue.length) {
@ -78,9 +88,14 @@
})
}
this.open()
// this.open()
this.$store.commit('login')
// this.$store.commit('login')
// uni.navigateTo({
// url:'/pages/index/home'
// })
},
leftClick() {
uni.navigateBack({
@ -102,19 +117,16 @@
url:'/pages/index/home'
})
}
},
computed: {
customStyle() {
return {
background: '#f1f1f1',
color: '#00bf61'
}
}
}
}
</script>
<style scoped lang="scss">
.logo {
width: 120rpx;
height: 120rpx;
border-radius: 10rpx;
}
.login {
display: flex;
justify-content: center;


+ 24
- 15
pages_order/auth/wxUserInfo.vue View File

@ -4,7 +4,7 @@
<img src="" alt="" />
</view>
<view class="title">
答题小程序
{{ configList.logo_name }}
</view>
<view class="">
申请获取你的头像昵称
@ -40,6 +40,7 @@
</template>
<script>
import { mapState } from 'vuex'
export default {
data() {
return {
@ -50,7 +51,9 @@
};
},
onShow() {},
computed: {},
computed : {
...mapState(['configList']),
},
methods: {
onChooseAvatar(res) {
let self = this
@ -71,22 +74,21 @@
const nickName = res?.[0]?.value
self.userInfo.nickName = nickName
//
uni.navigateTo({
url: 'wxLogin'
})
// if (self.$utils.verificationAll(self.userInfo, {
// headImage: '',
// nickName: '',
// })) {
// return
// }
if (self.$utils.verificationAll(self.userInfo, {
headImage: '请选择头像',
nickName: '请填写昵称',
})) {
return
}
self.$api('infoUpdateInfo', self.userInfo, res => {
self.$api('updateInfo', {
nickName : self.userInfo.nickName,
avatarUrl : self.userInfo.headImage,
}, res => {
if (res.code == 200) {
uni.switchTab({
url: '/pages/index/index'
uni.reLaunch({
url: '/pages/index/home'
})
}
})
@ -98,6 +100,13 @@
</script>
<style lang="scss" scoped>
.logo {
width: 120rpx;
height: 120rpx;
border-radius: 10rpx;
}
.login {
display: flex;
flex-direction: column;


+ 156
- 59
pages_order/info/appoint.vue View File

@ -1,122 +1,219 @@
<template>
<view class="home">
<view class="content" style="padding-top: 15vh;">
<view class="flex-col mt-40" style="width: 90vw; padding: 20rpx 0; gap: 10rpx; border-radius: 12rpx; border: 2rpx solid #07c060;">
<span style="font-size: 28rpx;">请选择您方便的时间</span>
<span style="font-size: 28rpx;">我们将根据您的日程为您安排上门威士忌品鉴服务</span>
<span style="font-size: 28rpx;">确保您能在舒适的环境中尽享专属体验</span>
<image src="/static/image/bg/1.png"
class="page-bg"
mode="aspectFill"></image>
<view class="content_now">
<view class="flex-col" style="width: 600rpx; padding: 20rpx 0; gap: 10rpx; border-radius: 12rpx; border: 2rpx solid #ecb864;">
<span style="font-size: 25rpx;">请选择您方便的时间</span>
<span style="font-size: 25rpx;">我们将根据您的日程为您安排上门威士忌品鉴服务</span>
<span style="font-size: 25rpx;">确保您能在舒适的环境中尽享专属体验</span>
</view>
<span class="font-bold" style="margin-top: 5vh;">预约信息</span>
<view class="" style="width: 90vw;">
<view class="flex-sb mt-40">
<span class="font-bold" style="margin-top: 10rpx;">预约信息</span>
<view class="" style="width: 600rpx;">
<view class="flex-sb" style="margin-top: 10rpx;"
@click="$refs.datetimePicker.open()">
<view class="date">
{{year}}
<img src="../static/info/下拉.png" style="width: 25rpx; height: 25rpx;"/>
{{ $dayjs(date).format('YYYY') }}
<img src="../static/info/a.png" style="width: 25rpx; height: 25rpx;"/>
</view>
<view class="date">
{{date}}
<img src="../static/info/下拉.png" style="width: 25rpx; height: 25rpx;"/>
{{ $dayjs(date).format('MM-DD') }}
<img src="../static/info/a.png" style="width: 25rpx; height: 25rpx;"/>
</view>
<view class="date">
{{time}}
<img src="../static/info/下拉.png" style="width: 25rpx; height: 25rpx;"/>
{{ $dayjs(date).format('HH:mm') }}
<img src="../static/info/a.png" style="width: 25rpx; height: 25rpx;"/>
</view>
</view>
<view class="flex-start-col mt-40">
<view class="flex-start-col" style="margin-top: 10rpx;">
<view class="flex-center" style="align-items: flex-end;">
<view class="flex-start-col" style="gap: 10rpx;">
<span>姓名:</span>
<input v-model="username" type="text" class="input" style="width: 20vw;"></input>
<input v-model="form.username" type="text" class="input" style="width: 20vw;"></input>
</view>
<span style="margin-left: 20rpx; color: #dddddc; font-size: 26rpx;">(最开始填写的直接导入)</span>
<!-- <span style="margin-left: 20rpx; color: #dddddc; font-size: 26rpx;">(最开始填写的直接导入)</span> -->
</view>
<view class="flex-center" style="align-items: flex-end;">
<view class="flex-start-col" style="gap: 10rpx;">
<span>联系电话:</span>
<input v-model="phone" type="tel" class="input"></input>
<input v-model="form.phone" type="tel" class="input"></input>
</view>
<span style="margin-left: 20rpx; color: #dddddc; font-size: 26rpx;">(最开始填写的直接导入)</span>
<!-- <span style="margin-left: 20rpx; color: #dddddc; font-size: 26rpx;">(最开始填写的直接导入)</span> -->
</view>
<view class="flex-center">
<view class="flex-start-col" style="gap: 10rpx; width: 80vw;">
<span>详细地址:</span>
<input v-model="address" type="text" class="input" style="width: 100%; height: 60rpx;"></input>
<span>地址: {{ addressCity }}</span>
<input v-model="address.address" placeholder="请输入详情地址" type="text" class="input" style="width: 100%; height: 60rpx;"></input>
</view>
</view>
</view>
</view>
<view class="flex-col query" style="gap: 0rpx;">
<view class="flex-center" style="gap: 30rpx;">
<view class="btn2" style="padding: 16rpx 80rpx;" @click="pre">
返回
</view>
<view class="btn2" style="padding: 16rpx 80rpx;" @click="next">
确定 / 提交
</view>
</view>
<view class="an">
<view class="flex-center" style="gap: 30rpx;">
<view class="btn2" style="padding: 16rpx 80rpx;" @click="pre">
返回
</view>
<view class="btn2" style="padding: 16rpx 80rpx;" @click="submit">
<!-- 确定 / 提交 -->
预约
</view>
<text class="second-color">欢快无限饮&nbsp;&nbsp;饮酒有限度</text>
</view>
<text class="second-color">{{ configList.bg_title }}</text>
</view>
<uv-datetime-picker
ref="datetimePicker"
v-model="date"
mode="datetime"
:minDate="new Date().getTime()"
@confirm="confirm">
</uv-datetime-picker>
</view>
</template>
<script>
import { mapState } from 'vuex'
export default {
data() {
return {
year: '2024年',
date: '9月20日',
time: '08:00',
firstName: '张',
lastName: '里于',
gender: '',
phone: '',
message: ''
// year: '2024',
// date: '920',
// time: '0800',
// firstName: '',
// lastName: '',
// gender: '',
// phone: '',
// message: '',
date : new Date().getTime(),
address : {
province : '',
city : '',
district : '',
address : '',
},
form : {
username:'',
phone:'',
},
}
},
computed : {
addressCity(){
return this.address.province +
this.address.city +
this.address.district
},
...mapState(['problemList', 'configList', 'queryMyLog']),
},
onLoad() {
if(uni.getStorageSync('user_address')){
this.address = JSON.parse(uni.getStorageSync('user_address'))
}
if(uni.getStorageSync('user_phone')){
this.form = JSON.parse(uni.getStorageSync('user_phone'))
}
},
methods: {
next() {
uni.navigateTo({
url: '/pages_order/info/start'
})
// uni.navigate
},
pre(){
uni.navigateBack({
delta:1
// uni.navigateBack({
// delta:1
// })
uni.reLaunch({
url: '/pages/index/index'
})
}
},
confirm(e){
this.date = e.value
},
submit(){
if(this.$utils.verificationAll(this.form, {
username : '请输入姓名',
phone : '请输入电话号码',
})){
return
}
if(this.$utils.verificationPhone(this.form.phone)){
uni.showToast({
title: '请输入正确的手机号',
icon: 'none',
})
return
}
if(this.$utils.verificationAll(this.address, {
address : '请输入详情地址',
})){
return
}
uni.setStorageSync('user_address', this.address)
this.$api('submit', {
...this.address,
...this.form,
name : this.form.username,
area : this.address.district,
yearValue : this.$dayjs(this.date).format('YYYY'),
monthDay : this.$dayjs(this.date).format('MM-DD'),
dayTime : this.$dayjs(this.date).format('HH:mm'),
}, res => {
if(res.code == 200){
uni.showToast({
title: '预约成功',
icon: 'none'
})
setTimeout(uni.reLaunch, 1000, {
url : '/pages/index/index'
})
}
})
},
},
}
</script>
<style lang="scss" scoped>
.query {
position: relative;
bottom: -5vh;
.home{
font-size: 28rpx;
}
.an{
position: fixed;
bottom: 300rpx;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
}
.date {
border: 2rpx solid $uni-color;
padding: 14rpx 30rpx;
padding: 10rpx 30rpx;
border-radius: 12rpx;
}
.main-color{
flex-wrap: nowrap;
color: $uni-color;
}
.input{
border: 2rpx solid #FD5100;
border-radius: 10rpx;
padding: 10rpx;
}
.area{
border: 2rpx solid #FD5100;
border: 2rpx solid $uni-color;
border-radius: 10rpx;
padding: 10rpx;
width: 100%;
height: 120rpx;
padding: 4rpx 10rpx;
}
</style>

+ 1
- 1
pages_order/info/appointDate.vue View File

@ -31,7 +31,7 @@
<view class="flex-center">
<view class="flex-center" style="position: relative;" @click="checkGender">
<span class="main-color">先生</span>
<img src="../static/info/下拉.png" alt="" style="width: 40rpx; height: 40rpx;" />
<img src="../static/info/a.png" alt="" style="width: 40rpx; height: 40rpx;" />
</view>
<view class="flex-col select" id="select" ref="check">
<span class="main-color">先生</span>


+ 6
- 1
pages_order/info/chooseArea.vue View File

@ -1,5 +1,10 @@
<template>
<view class="home">
<image src="/static/image/bg/1.png"
class="page-bg"
mode=""></image>
<view class="content">
<span class="font-bold mb-60">请选择您所在的区域</span>
<view class="flex-col query" style="gap: 0rpx;">
@ -21,7 +26,7 @@
},
methods: {
next() {
uni.navigateTo({
uni.redirectTo({
url: '/pages_order/info/isAdult'
})
}


+ 53
- 14
pages_order/info/fillInfo.vue View File

@ -1,59 +1,98 @@
<template>
<view class="home">
<view class="content" style="padding-top: 25vh;">
<image src="/static/image/bg/1.png"
class="page-bg"
mode="aspectFill"></image>
<view class="content_now">
<span class="font-bold">为了给您提供更个性化的服务</span>
<span class="font-bold">请您填写以下基本信息</span>
<view class="flex-col mt-40">
<view class="flex-center">
<view class="flex-center">
<span style="margin-right: 30rpx;">您的姓名:</span>
<input class="inputStyle" v-model="username" type="text" />
<input class="inputStyle" v-model="form.username" type="text" />
</view>
<view class="flex-center">
<span style="margin-right: 30rpx;">手机号码:</span>
<input class="inputStyle" v-model="phone" type="number" />
<input class="inputStyle" v-model="form.phone" type="number" />
</view>
</view>
</view>
<view class="an">
<view style="margin-top: 15vh;" @click="query">
<view class="btn2">
确认
</view>
</view>
<view class="flex-col query" style="gap: 0rpx;">
<text class="second-color">欢快无限饮&nbsp;&nbsp;饮酒有限度</text>
<text class="second-color">{{ configList.bg_title }}</text>
</view>
</view>
</view>
</template>
<script>
import { mapState } from 'vuex'
export default {
data() {
return {
username:'',
phone:''
form : {
username:'',
phone:''
}
}
},
computed : {
...mapState(['problemList', 'configList', 'queryMyLog']),
},
onLoad() {
if(uni.getStorageSync('user_phone')){
this.form = JSON.parse(uni.getStorageSync('user_phone'))
}
},
methods: {
query(){
if(!this.username && !this.phone){
if(!this.form.username && !this.form.phone){
uni.showToast({
title:'您的姓名和手机号都不能为空哦~',
icon: 'none'
})
}else{
uni.navigateTo({
url:'/pages_order/info/greet'
return
}
if(this.$utils.verificationPhone(this.form.phone)){
uni.showToast({
title: '请输入正确的手机号',
icon: 'none',
})
return
}
uni.setStorageSync('user_phone', JSON.stringify(this.form))
uni.navigateTo({
url:'/pages_order/info/appoint'
})
}
}
}
</script>
<style lang="scss" scoped>
.query {
position: relative;
bottom: -15vh;
.an{
position: fixed;
bottom: 300rpx;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
}
.b-btn {


+ 24
- 9
pages_order/info/greet.vue View File

@ -1,14 +1,26 @@
<template>
<view class="home">
<view class="content" style="padding-top: 30vh;">
<span>欢迎</span>
<span style="font-size: 80rpx; margin: 20rpx 0;">Christine</span>
<image src="/static/image/bg/2.png"
class="page-bg"
mode=""></image>
<view class="swipe" style="padding-top: 320rpx;">
<uv-swiper :list="list"
height="300rpx"></uv-swiper>
</view>
<view class="content" style="padding-top: 40rpx;
background-color: #fff;">
<text>欢迎</text>
<text style="font-size: 80rpx; margin: 20rpx 0;">Christine</text>
<view class="flex-col" style="gap: 5rpx; margin-top: 40rpx;">
<span>来到百富门的世界</span>
<span>品味传承与创新交织的威士忌艺术</span>
<span>开启您的专属品鉴之旅</span>
<text>来到百富门的世界</text>
<text>品味传承与创新交织的威士忌艺术</text>
<text>开启您的专属品鉴之旅</text>
</view>
<view style="margin-top: 6vh;" @click="query">
<view style="margin-top: 40rpx;" @click="query">
<view class="btn2">
点击进入
</view>
@ -21,11 +33,14 @@
export default {
data() {
return {
list: [
'https://cdn.uviewui.com/uview/swiper/swiper1.png',
'https://cdn.uviewui.com/uview/swiper/swiper2.png',
'https://cdn.uviewui.com/uview/swiper/swiper3.png',
],
}
},
methods: {
query(){
uni.navigateTo({
url: '/pages_order/info/infoPages'


+ 6
- 3
pages_order/info/infoPages.vue View File

@ -1,6 +1,11 @@
<template>
<view class="home">
<view class="content" style="padding-top: 20vh;">
<image src="/static/image/bg/1.png"
class="page-bg"
mode=""></image>
<view class="content" style="padding-top: 450rpx">
<span v-show="btn==='下一页'" style="margin-bottom: 10rpx; font-size: 28rpx;">作为一位</span>
<span v-show="btn==='下一页'" style="color: #c7a87c;">{{title1}}</span>
<span v-for="(item,index) in textList1" :key="index" class="content-text">
@ -170,7 +175,5 @@
<style lang="scss" scoped>
.query {
position: relative;
top: 30vh;
}
</style>

+ 8
- 3
pages_order/info/isAdult.vue View File

@ -1,6 +1,12 @@
<template>
<view class="home">
<view class="content" style="padding-top: 25vh;">
<image src="/static/image/bg/1.png"
class="page-bg"
mode=""></image>
<view class="content" style="padding-top: 450rpx;">
<span class="font-bold">Genius Journey Club</span>
<text style="margin-top: 20rpx; font-size: 28rpx; color: #878787;">欢迎您的到来</text>
<text style="margin-top: 30rpx; font-size: 28rpx; color: #878787;">使用小程序请确认您已满18周岁</text>
@ -41,7 +47,7 @@
},
start() {
if (this.isActive && this.isCheck) {
uni.navigateTo({
uni.redirectTo({
url:'/pages_order/info/fillInfo'
})
} else {
@ -58,7 +64,6 @@
<style lang="scss" scoped>
.query {
position: relative;
bottom: -15vh;
}
.b-btn {


pages_order/static/info/下拉.png → pages_order/static/info/a.png View File


BIN
static/image/bg/1.png View File

Before After
Width: 750  |  Height: 1624  |  Size: 258 KiB

BIN
static/image/bg/2.png View File

Before After
Width: 1125  |  Height: 2436  |  Size: 287 KiB

BIN
static/image/bg/3.png View File

Before After
Width: 750  |  Height: 223  |  Size: 34 KiB

BIN
static/image/bg/4.png View File

Before After
Width: 750  |  Height: 325  |  Size: 65 KiB

BIN
static/image/cart/1.png View File

Before After
Width: 36  |  Height: 36  |  Size: 1.9 KiB

BIN
static/image/cart/2.png View File

Before After
Width: 72  |  Height: 72  |  Size: 5.4 KiB

BIN
static/image/center/1.png View File

Before After
Width: 51  |  Height: 49  |  Size: 1.2 KiB

BIN
static/image/center/10.png View File

Before After
Width: 355  |  Height: 158  |  Size: 45 KiB

+ 0
- 1
static/image/center/11.svg View File

@ -1 +0,0 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1726157567630" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6220" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M513.536 628.6336c101.6832 0 280.8832 38.7072 310.8864 193.7408 77.5168-77.5168 124.928-185.9584 124.928-305.0496 0-241.152-194.6624-435.8144-435.8144-435.8144S77.7216 277.0944 77.7216 517.2224c0 119.0912 47.4112 227.6352 124.928 306.0736 30.0032-154.9312 209.2032-194.6624 310.8864-194.6624z m0-439.7056c112.3328 0 204.3904 91.0336 204.3904 204.3904 0 112.3328-91.0336 204.3904-204.3904 204.3904a203.776 203.776 0 0 1-204.3904-204.3904c0.1024-112.4352 92.0576-204.3904 204.3904-204.3904z m0 0" fill="#cdcdcd" p-id="6221"></path><path d="M515.4816 1006.8992c-65.8432 0-129.8432-12.9024-189.952-38.4-58.1632-24.576-110.2848-59.8016-155.136-104.5504A485.56032 485.56032 0 0 1 65.8432 708.8128c-25.6-60.2112-38.5024-124.1088-38.5024-189.952 0-65.8432 12.9024-129.8432 38.4-189.952 24.576-58.1632 59.8016-110.2848 104.5504-155.136 44.8512-44.8512 96.9728-79.9744 155.136-104.5504C385.6384 43.6224 449.536 30.72 515.4816 30.72c65.8432 0 129.8432 12.9024 189.952 38.4 58.1632 24.576 110.2848 59.8016 155.136 104.5504 44.8512 44.8512 79.9744 96.9728 104.5504 155.136C990.6176 389.0176 1003.52 452.9152 1003.52 518.8608c0 65.8432-12.9024 129.8432-38.4 189.952-24.576 58.1632-59.8016 110.2848-104.5504 155.136a485.56032 485.56032 0 0 1-155.136 104.5504 484.39296 484.39296 0 0 1-189.952 38.4z m0-936.8576c-60.6208 0-119.3984 11.8784-174.6944 35.2256a447.76448 447.76448 0 0 0-142.6432 96.1536A444.42624 444.42624 0 0 0 101.9904 344.064a446.70976 446.70976 0 0 0-35.2256 174.6944c0 60.6208 11.8784 119.3984 35.2256 174.6944 22.6304 53.4528 54.9888 101.4784 96.1536 142.6432 41.1648 41.2672 89.1904 73.6256 142.6432 96.1536 55.296 23.3472 114.0736 35.2256 174.6944 35.2256 60.6208 0 119.3984-11.8784 174.6944-35.2256 53.4528-22.6304 101.4784-54.9888 142.6432-96.1536 41.2672-41.1648 73.6256-89.1904 96.1536-142.6432 23.3472-55.296 35.2256-114.0736 35.2256-174.6944 0-60.6208-11.8784-119.3984-35.2256-174.6944a447.76448 447.76448 0 0 0-96.1536-142.6432 444.42624 444.42624 0 0 0-142.6432-96.1536 447.44704 447.44704 0 0 0-174.6944-35.2256z m0 0" fill="#cdcdcd" p-id="6222"></path></svg>

BIN
static/image/center/2.png View File

Before After
Width: 112  |  Height: 126  |  Size: 6.1 KiB

BIN
static/image/center/3.png View File

Before After
Width: 120  |  Height: 120  |  Size: 5.9 KiB

BIN
static/image/center/4.png View File

Before After
Width: 52  |  Height: 49  |  Size: 1.7 KiB

BIN
static/image/center/5.png View File

Before After
Width: 64  |  Height: 64  |  Size: 2.8 KiB

BIN
static/image/center/6.png View File

Before After
Width: 63  |  Height: 50  |  Size: 2.1 KiB

BIN
static/image/center/7.png View File

Before After
Width: 64  |  Height: 64  |  Size: 2.4 KiB

BIN
static/image/center/8.png View File

Before After
Width: 64  |  Height: 64  |  Size: 2.5 KiB

BIN
static/image/center/9.png View File

Before After
Width: 56  |  Height: 48  |  Size: 2.1 KiB

BIN
static/image/home/0.png View File

Before After
Width: 116  |  Height: 118  |  Size: 14 KiB

BIN
static/image/home/1.png View File

Before After
Width: 117  |  Height: 117  |  Size: 13 KiB

BIN
static/image/home/2.png View File

Before After
Width: 114  |  Height: 114  |  Size: 12 KiB

BIN
static/image/home/3.png View File

Before After
Width: 114  |  Height: 114  |  Size: 11 KiB

BIN
static/image/home/address-icon.png View File

Before After
Width: 38  |  Height: 38  |  Size: 1.4 KiB

BIN
static/image/home/arrow-icon.png View File

Before After
Width: 39  |  Height: 39  |  Size: 296 B

BIN
static/image/home/search-icon.png View File

Before After
Width: 38  |  Height: 38  |  Size: 1.8 KiB

BIN
static/image/product/favorable.png View File

Before After
Width: 60  |  Height: 15  |  Size: 282 B

BIN
static/image/tabbar/cart-a.png View File

Before After
Width: 40  |  Height: 40  |  Size: 958 B

BIN
static/image/tabbar/cart.png View File

Before After
Width: 40  |  Height: 40  |  Size: 953 B

BIN
static/image/tabbar/category-a.png View File

Before After
Width: 40  |  Height: 40  |  Size: 1.1 KiB

BIN
static/image/tabbar/category.png View File

Before After
Width: 40  |  Height: 40  |  Size: 1.2 KiB

BIN
static/image/tabbar/center-a.png View File

Before After
Width: 40  |  Height: 40  |  Size: 915 B

BIN
static/image/tabbar/center.png View File

Before After
Width: 40  |  Height: 40  |  Size: 937 B

BIN
static/image/tabbar/home-a.png View File

Before After
Width: 47  |  Height: 43  |  Size: 2.2 KiB

BIN
static/image/tabbar/home.png View File

Before After
Width: 47  |  Height: 43  |  Size: 2.2 KiB

BIN
static/image/tabbar/order-a.png View File

Before After
Width: 40  |  Height: 40  |  Size: 691 B

BIN
static/image/tabbar/order.png View File

Before After
Width: 40  |  Height: 40  |  Size: 736 B

+ 57
- 15
store/store.js View File

@ -8,28 +8,35 @@ import api from '@/api/api.js'
//Vuex.Store 构造器选项
const store = new Vuex.Store({
state: {
configList: [], //配置列表
configList: {}, //配置列表
userInfo : {}, //用户信息
bannerList : [],//轮播图
articleList : [],//文章列表
problemList : [],//问题列表
queryMyLog : [],//我的答题记录
},
getters: {
},
mutations: {
// 初始化配置
initConfig(state){
// api('getConfig', res => {
// if(res.code == 200){
// state.configList = res.result
// }
// })
let config = ['getPrivacyPolicy', 'getUserAgreement']
config.forEach(k => {
api(k, res => {
if (res.code == 200) {
state.configList[k] = res.result
}
})
api('getConfig', res => {
if(res.code == 200){
// state.configList = res.result
res.result.forEach(n => {
state.configList[n.keyName] = n.keyContent
})
}
})
// let config = ['getPrivacyPolicy', 'getUserAgreement']
// config.forEach(k => {
// api(k, res => {
// if (res.code == 200) {
// state.configList[k] = res.result
// }
// })
// })
},
login(state){
uni.showLoading({
@ -66,12 +73,47 @@ const store = new Vuex.Store({
})
},
getUserInfo(state){
api('infoGetInfo', res => {
api('getInfo', res => {
if(res.code == 200){
state.userInfo = res.result
}
})
},
// 获取轮播图
getBanner(state){
api('bannerList', res => {
if(res.code == 200){
state.bannerList = res.result
}
})
},
// 获取文章列表
getArticleList(state){
api('articleList', res => {
if(res.code == 200){
state.articleList = res.result
}
})
},
// 获取问题列表
getProblemList(state){
api('problemList', res => {
if(res.code == 200){
state.problemList = res.result
}
})
},
// 查询我的答题记录
getQueryMyLog(state){
api('queryMyLog', res => {
if(res.code == 200){
state.queryMyLog = res.result
uni.navigateTo({
url: '/pages/index/home'
})
}
})
},
},
actions: {},
})


+ 1
- 1
uni.scss View File

@ -12,7 +12,7 @@
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量同时无需 import 这个文件
*/
/* 颜色变量 */
$uni-color: #FD5100;
$uni-color: #ecb864;
/* 行为相关颜色 */
$uni-color-primary: #007aff;


+ 0
- 10
utils/oss-upload/oss/index.js View File

@ -2,10 +2,6 @@
* 阿里云OSS工具类
*/
import OSSConfig from "@/utils/oss-upload/oss/OSSConfig.js"
//支持web端
import {
uploadFileToOSS
} from '@/utils/oss-upload/oss/web.js'
import ossConfig from '@/config.js'
/**
@ -93,9 +89,6 @@ export function ossUploadImage({
count: 1,
sizeType,
success(res) {
// #ifdef H5
return uploadFileToOSS(res.tempFiles[0]).then(success).catch(fail)
// #endif
ossUpload(res.tempFilePaths[0], key, folder).then(success).catch(fail)
},
fail
@ -123,9 +116,6 @@ export function ossUploadVideo({
maxDuration,
camera,
success(res) {
// #ifdef H5
return uploadFileToOSS(res.tempFile).then(success).catch(fail)
// #endif
ossUpload(res.tempFilePath, key, folder).then(success).catch(fail)
},
fail


+ 1
- 1
utils/oss-upload/oss/web.js View File

@ -1,5 +1,5 @@
// 此方法适用于web
import OSS from "ali-oss"
// import OSS from "ali-oss"
import config from '@/config.js'
/**


+ 31
- 15
utils/utils.js View File

@ -36,39 +36,34 @@ function generateLightRandomColor() {
function verificationAll(data, msg){
let Msgs = {
default : msg || '表单数据未填写'
}
if(typeof msg == 'object'){
Msgs = {
default : '表单数据未填写',
...msg,
}
if (!msg){
console.log(msg);
return false
}
if (!data){
uni.showToast({
title: Msgs.default,
title: '表单数据未填写',
icon: "none"
})
return true
}
for (let key in data) {
if (!data[key] || data[key] === "") {
for (let key in msg) {
if (!data[key]) {
uni.showToast({
title: (Msgs[key] || Msgs.default),
title: msg[key],
icon: "none"
})
return true
}
}
return false
}
//验证手机号是否合法
function verificationPhone(phone){
if(!/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(phone)){
if(!/^1\d{10}$/.test(phone)){
return false
}
return true
@ -137,6 +132,25 @@ export function redirectTo(...args){
uni.redirectTo(params(...args))
}
// 将字符串中的文本格式化html
export function stringFormatHtml(str){
return str && str.replace(/\n/gi, '<br>')
.replace(/ /gi, ' ')
}
export const toLogin = function(){
let time = 0
return () => {
if(new Date().getTime() - time < 1000){
return
}
time = new Date().getTime()
uni.navigateTo({
url: '/pages_order/auth/wxLogin'
})
}
}()
export default {
toArray,
generateUUID,
@ -149,4 +163,6 @@ export default {
navigateTo,
navigateBack,
redirectTo,
stringFormatHtml,
toLogin,
}

Loading…
Cancel
Save