Browse Source

feat: page-order(fill user info);

pull/2/head
Fox-33 1 month ago
parent
commit
86e6338656
26 changed files with 861 additions and 50 deletions
  1. +2
    -0
      api/fetch.js
  2. +12
    -3
      pages.json
  3. +0
    -3
      pages/index/index.vue
  4. +0
    -1
      pages_order/address/addressPopup.vue
  5. +9
    -9
      pages_order/comment/commentRecords.vue
  6. +4
    -1
      pages_order/order/orderConfirm/index.vue
  7. +3
    -3
      pages_order/order/orderDetail/index.vue
  8. +18
    -18
      pages_order/order/orderList/index.vue
  9. +2
    -2
      pages_order/order/userInfo/facialVerify.vue
  10. +268
    -0
      pages_order/order/userInfo/facialVerifyCustom.vue
  11. +242
    -0
      pages_order/order/userInfo/idUpload.vue
  12. +269
    -0
      pages_order/order/userInfo/infoFill.vue
  13. +9
    -9
      pages_order/product/productDetail.vue
  14. BIN
      pages_order/static/index/medicine-1.png
  15. BIN
      pages_order/static/index/medicine-2.png
  16. BIN
      pages_order/static/index/medicine-3.png
  17. BIN
      pages_order/static/order/camera-bg.png
  18. BIN
      pages_order/static/order/id-back-default.png
  19. BIN
      pages_order/static/order/id-front-default.png
  20. BIN
      pages_order/static/order/tag.png
  21. BIN
      pages_order/static/order/tips-1.png
  22. BIN
      pages_order/static/order/tips-2.png
  23. BIN
      pages_order/static/order/tips-3.png
  24. BIN
      pages_order/static/report/avatar.jpg
  25. BIN
      pages_order/static/report/avatar.png
  26. +23
    -1
      utils/utils.js

+ 2
- 0
api/fetch.js View File

@ -10,6 +10,8 @@ const fetch = (key, data = {}, transform = true, loadingTitle) => {
} }
if (res.code == 200) { if (res.code == 200) {
resolve(res.result) resolve(res.result)
} else {
reject(res)
} }
} }


+ 12
- 3
pages.json View File

@ -72,9 +72,6 @@
{ {
"path": "auth/wxUserInfo" "path": "auth/wxUserInfo"
}, },
{
"path": "auth/facialVerify"
},
{ {
"path": "report/test/intro" "path": "report/test/intro"
}, },
@ -102,6 +99,18 @@
{ {
"path": "product/productDetail" "path": "product/productDetail"
}, },
{
"path": "order/userInfo/infoFill"
},
{
"path": "order/userInfo/idUpload"
},
{
"path": "order/userInfo/facialVerify"
},
{
"path": "order/userInfo/facialVerifyCustom"
},
{ {
"path": "order/orderConfirm/index" "path": "order/orderConfirm/index"
}, },


+ 0
- 3
pages/index/index.vue View File

@ -73,9 +73,6 @@
}, },
onLoad() { onLoad() {
// todo: delete
// this.$utils.navigateTo('/pages_order/auth/facialVerify')
this.productSwiperList = [ this.productSwiperList = [
{ {
id: '001', id: '001',


+ 0
- 1
pages_order/address/addressPopup.vue View File

@ -39,7 +39,6 @@
<view v-else class="placeholder">选择省市区街道</view> <view v-else class="placeholder">选择省市区街道</view>
</view> </view>
</picker> </picker>
<!-- <formInput v-model="form.phone"></formInput> -->
</view> </view>
</uv-form-item> </uv-form-item>
</view> </view>


+ 9
- 9
pages_order/comment/commentRecords.vue View File

@ -100,9 +100,9 @@
createTime: '2023-04-18', createTime: '2023-04-18',
content: '包装很精致,性价比非常高,终于收到啦,期待效果,每日一包,超级方便,真的能坚持服用', content: '包装很精致,性价比非常高,终于收到啦,期待效果,每日一包,超级方便,真的能坚持服用',
images: [ images: [
'/pages_order/static/index/medicine-1.png',
'/pages_order/static/index/medicine-2.png',
'/pages_order/static/index/medicine-3.png',
'/pages_order/static/index/recommend-pic.png',
'/pages_order/static/index/recommend-pic.png',
'/pages_order/static/index/recommend-pic.png',
], ],
productServeScore: 5, productServeScore: 5,
questionExperienceScore: 4, questionExperienceScore: 4,
@ -116,9 +116,9 @@
createTime: '2023-04-18', createTime: '2023-04-18',
content: '包装很精致,性价比非常高,终于收到啦,期待效果,每日一包,超级方便,真的能坚持服用', content: '包装很精致,性价比非常高,终于收到啦,期待效果,每日一包,超级方便,真的能坚持服用',
images: [ images: [
'/pages_order/static/index/medicine-1.png',
'/pages_order/static/index/medicine-2.png',
'/pages_order/static/index/medicine-3.png',
'/pages_order/static/index/recommend-pic.png',
'/pages_order/static/index/recommend-pic.png',
'/pages_order/static/index/recommend-pic.png',
], ],
productServeScore: 5, productServeScore: 5,
questionExperienceScore: 4, questionExperienceScore: 4,
@ -132,9 +132,9 @@
createTime: '2023-04-18', createTime: '2023-04-18',
content: '包装很精致,性价比非常高,终于收到啦,期待效果,每日一包,超级方便,真的能坚持服用', content: '包装很精致,性价比非常高,终于收到啦,期待效果,每日一包,超级方便,真的能坚持服用',
images: [ images: [
'/pages_order/static/index/medicine-1.png',
'/pages_order/static/index/medicine-2.png',
'/pages_order/static/index/medicine-3.png',
'/pages_order/static/index/recommend-pic.png',
'/pages_order/static/index/recommend-pic.png',
'/pages_order/static/index/recommend-pic.png',
], ],
productServeScore: 5, productServeScore: 5,
questionExperienceScore: 4, questionExperienceScore: 4,


+ 4
- 1
pages_order/order/orderConfirm/index.vue View File

@ -95,7 +95,7 @@
return { return {
addressData: null, addressData: null,
orderData: null, orderData: null,
checkboxValue : []
checkboxValue : [],
} }
}, },
computed: { computed: {
@ -124,6 +124,9 @@
console.log('onLoad') console.log('onLoad')
console.log('payOrderProduct', this.payOrderProduct) console.log('payOrderProduct', this.payOrderProduct)
// todo: check include Overseas Product ?
this.$utils.navigateTo('/pages_order/order/userInfo/infoFill')
this.orderData = { this.orderData = {
id: '001', id: '001',
number: 'BH872381728321983929', number: 'BH872381728321983929',


+ 3
- 3
pages_order/order/orderDetail/index.vue View File

@ -215,7 +215,7 @@
productList: [ productList: [
{ {
id: '0011', id: '0011',
url: '/pages_order/static/index/medicine-1.png',
url: '/pages_order/static/index/recommend-pic.png',
name: '月度装定制营养包', name: '月度装定制营养包',
type: '保健品', type: '保健品',
content: '控糖精华萃 x30颗、膳食纤维 ×30颗', content: '控糖精华萃 x30颗、膳食纤维 ×30颗',
@ -226,7 +226,7 @@
}, },
{ {
id: '0012', id: '0012',
url: '/pages_order/static/index/medicine-2.png',
url: '/pages_order/static/index/recommend-pic.png',
name: '月度装定制营养包', name: '月度装定制营养包',
type: '保健品', type: '保健品',
content: '控糖精华萃 x30颗、膳食纤维 ×30颗', content: '控糖精华萃 x30颗、膳食纤维 ×30颗',
@ -237,7 +237,7 @@
}, },
{ {
id: '0013', id: '0013',
url: '/pages_order/static/index/medicine-3.png',
url: '/pages_order/static/index/recommend-pic.png',
name: '月度装定制营养包', name: '月度装定制营养包',
type: '保健品', type: '保健品',
content: '控糖精华萃 x30颗、膳食纤维 ×30颗', content: '控糖精华萃 x30颗、膳食纤维 ×30颗',


+ 18
- 18
pages_order/order/orderList/index.vue View File

@ -109,7 +109,7 @@
productList: [ productList: [
{ {
id: '0011', id: '0011',
url: '/pages_order/static/index/medicine-1.png',
url: '/pages_order/static/index/recommend-pic.png',
name: '月度装定制营养包', name: '月度装定制营养包',
type: '保健品', type: '保健品',
content: '控糖精华萃 x30颗、膳食纤维 ×30颗', content: '控糖精华萃 x30颗、膳食纤维 ×30颗',
@ -120,7 +120,7 @@
}, },
{ {
id: '0012', id: '0012',
url: '/pages_order/static/index/medicine-2.png',
url: '/pages_order/static/index/recommend-pic.png',
name: '月度装定制营养包', name: '月度装定制营养包',
type: '保健品', type: '保健品',
content: '控糖精华萃 x30颗、膳食纤维 ×30颗', content: '控糖精华萃 x30颗、膳食纤维 ×30颗',
@ -131,7 +131,7 @@
}, },
{ {
id: '0013', id: '0013',
url: '/pages_order/static/index/medicine-3.png',
url: '/pages_order/static/index/recommend-pic.png',
name: '月度装定制营养包', name: '月度装定制营养包',
type: '保健品', type: '保健品',
content: '控糖精华萃 x30颗、膳食纤维 ×30颗', content: '控糖精华萃 x30颗、膳食纤维 ×30颗',
@ -154,7 +154,7 @@
productList: [ productList: [
{ {
id: '0011', id: '0011',
url: '/pages_order/static/index/medicine-1.png',
url: '/pages_order/static/index/recommend-pic.png',
name: '月度装定制营养包', name: '月度装定制营养包',
type: '保健品', type: '保健品',
content: '控糖精华萃 x30颗、膳食纤维 ×30颗', content: '控糖精华萃 x30颗、膳食纤维 ×30颗',
@ -165,7 +165,7 @@
}, },
{ {
id: '0012', id: '0012',
url: '/pages_order/static/index/medicine-2.png',
url: '/pages_order/static/index/recommend-pic.png',
name: '月度装定制营养包', name: '月度装定制营养包',
type: '保健品', type: '保健品',
content: '控糖精华萃 x30颗、膳食纤维 ×30颗', content: '控糖精华萃 x30颗、膳食纤维 ×30颗',
@ -176,7 +176,7 @@
}, },
{ {
id: '0013', id: '0013',
url: '/pages_order/static/index/medicine-3.png',
url: '/pages_order/static/index/recommend-pic.png',
name: '月度装定制营养包', name: '月度装定制营养包',
type: '保健品', type: '保健品',
content: '控糖精华萃 x30颗、膳食纤维 ×30颗', content: '控糖精华萃 x30颗、膳食纤维 ×30颗',
@ -199,7 +199,7 @@
productList: [ productList: [
{ {
id: '0011', id: '0011',
url: '/pages_order/static/index/medicine-1.png',
url: '/pages_order/static/index/recommend-pic.png',
name: '月度装定制营养包', name: '月度装定制营养包',
type: '保健品', type: '保健品',
content: '控糖精华萃 x30颗、膳食纤维 ×30颗', content: '控糖精华萃 x30颗、膳食纤维 ×30颗',
@ -210,7 +210,7 @@
}, },
{ {
id: '0012', id: '0012',
url: '/pages_order/static/index/medicine-2.png',
url: '/pages_order/static/index/recommend-pic.png',
name: '月度装定制营养包', name: '月度装定制营养包',
type: '保健品', type: '保健品',
content: '控糖精华萃 x30颗、膳食纤维 ×30颗', content: '控糖精华萃 x30颗、膳食纤维 ×30颗',
@ -221,7 +221,7 @@
}, },
{ {
id: '0013', id: '0013',
url: '/pages_order/static/index/medicine-3.png',
url: '/pages_order/static/index/recommend-pic.png',
name: '月度装定制营养包', name: '月度装定制营养包',
type: '保健品', type: '保健品',
content: '控糖精华萃 x30颗、膳食纤维 ×30颗', content: '控糖精华萃 x30颗、膳食纤维 ×30颗',
@ -244,7 +244,7 @@
productList: [ productList: [
{ {
id: '0011', id: '0011',
url: '/pages_order/static/index/medicine-1.png',
url: '/pages_order/static/index/recommend-pic.png',
name: '月度装定制营养包', name: '月度装定制营养包',
type: '保健品', type: '保健品',
content: '控糖精华萃 x30颗、膳食纤维 ×30颗', content: '控糖精华萃 x30颗、膳食纤维 ×30颗',
@ -255,7 +255,7 @@
}, },
{ {
id: '0012', id: '0012',
url: '/pages_order/static/index/medicine-2.png',
url: '/pages_order/static/index/recommend-pic.png',
name: '月度装定制营养包', name: '月度装定制营养包',
type: '保健品', type: '保健品',
content: '控糖精华萃 x30颗、膳食纤维 ×30颗', content: '控糖精华萃 x30颗、膳食纤维 ×30颗',
@ -266,7 +266,7 @@
}, },
{ {
id: '0013', id: '0013',
url: '/pages_order/static/index/medicine-3.png',
url: '/pages_order/static/index/recommend-pic.png',
name: '月度装定制营养包', name: '月度装定制营养包',
type: '保健品', type: '保健品',
content: '控糖精华萃 x30颗、膳食纤维 ×30颗', content: '控糖精华萃 x30颗、膳食纤维 ×30颗',
@ -289,7 +289,7 @@
productList: [ productList: [
{ {
id: '0011', id: '0011',
url: '/pages_order/static/index/medicine-1.png',
url: '/pages_order/static/index/recommend-pic.png',
name: '月度装定制营养包', name: '月度装定制营养包',
type: '保健品', type: '保健品',
content: '控糖精华萃 x30颗、膳食纤维 ×30颗', content: '控糖精华萃 x30颗、膳食纤维 ×30颗',
@ -300,7 +300,7 @@
}, },
{ {
id: '0012', id: '0012',
url: '/pages_order/static/index/medicine-2.png',
url: '/pages_order/static/index/recommend-pic.png',
name: '月度装定制营养包', name: '月度装定制营养包',
type: '保健品', type: '保健品',
content: '控糖精华萃 x30颗、膳食纤维 ×30颗', content: '控糖精华萃 x30颗、膳食纤维 ×30颗',
@ -311,7 +311,7 @@
}, },
{ {
id: '0013', id: '0013',
url: '/pages_order/static/index/medicine-3.png',
url: '/pages_order/static/index/recommend-pic.png',
name: '月度装定制营养包', name: '月度装定制营养包',
type: '保健品', type: '保健品',
content: '控糖精华萃 x30颗、膳食纤维 ×30颗', content: '控糖精华萃 x30颗、膳食纤维 ×30颗',
@ -334,7 +334,7 @@
productList: [ productList: [
{ {
id: '0011', id: '0011',
url: '/pages_order/static/index/medicine-1.png',
url: '/pages_order/static/index/recommend-pic.png',
name: '月度装定制营养包', name: '月度装定制营养包',
type: '保健品', type: '保健品',
content: '控糖精华萃 x30颗、膳食纤维 ×30颗', content: '控糖精华萃 x30颗、膳食纤维 ×30颗',
@ -345,7 +345,7 @@
}, },
{ {
id: '0012', id: '0012',
url: '/pages_order/static/index/medicine-2.png',
url: '/pages_order/static/index/recommend-pic.png',
name: '月度装定制营养包', name: '月度装定制营养包',
type: '保健品', type: '保健品',
content: '控糖精华萃 x30颗、膳食纤维 ×30颗', content: '控糖精华萃 x30颗、膳食纤维 ×30颗',
@ -356,7 +356,7 @@
}, },
{ {
id: '0013', id: '0013',
url: '/pages_order/static/index/medicine-3.png',
url: '/pages_order/static/index/recommend-pic.png',
name: '月度装定制营养包', name: '月度装定制营养包',
type: '保健品', type: '保健品',
content: '控糖精华萃 x30颗、膳食纤维 ×30颗', content: '控糖精华萃 x30颗、膳食纤维 ×30颗',


pages_order/auth/facialVerify.vue → pages_order/order/userInfo/facialVerify.vue View File

@ -1,4 +1,4 @@
<<template>
<template>
<view> <view>
<button style="margin-top: 100px;" @click="onClick">人脸识别</button> <button style="margin-top: 100px;" @click="onClick">人脸识别</button>
</view> </view>
@ -36,4 +36,4 @@
<style> <style>
</style>>
</style>

+ 268
- 0
pages_order/order/userInfo/facialVerifyCustom.vue View File

@ -0,0 +1,268 @@
<template>
<view class="page__view">
<navbar title="人脸验证" leftClick @leftClick="$utils.navigateBack" color="#191919" bgColor="#FFFFFF" />
<view class="main">
<view class="card">
<view class="card-header">
<view>为保证本人操作请进行人脸验证</view>
<view class="card-desc">请保持正脸在取景框根据屏幕提示完成识别</view>
</view>
<view class="camera-box">
<!-- todo: check clear -->
<image class="camera-bg" src="@/pages_order/static/order/camera-bg.png" mode="scaleToFill" />
<template v-if="countdown">
<view class="camera-countdown">
<uv-count-down
:time="3 * 1000"
autoStart
@change="onCountDownChange"
@finish="onCountDownFinish"
>
<view class="camera-countdown-text">{{ timeData.seconds }}s</view>
</uv-count-down>
</view>
</template>
<template v-if="scanning">
<view class="flex camera-fg">
<view style="position: relative;">
<camera class="camera" device-position="front" flash="auto" @initdone="onCameraInited" @error="onCameraError"></camera>
<cover-image class="camera-tag" src="@/pages_order/static/order/tag.png"></cover-image>
</view>
</view>
</template>
<!-- todo: delete -->
<template v-else-if="src">
<view class="flex camera-fg">
<image class="camera" :src="src" mode="scaleToFill" />
</view>
</template>
</view>
<view class="flex tips">
<view class="flex flex-column tips-item">
<image class="tips-icon" src="@/pages_order/static/order/tips-1.png" mode="widthFix"></image>
<view class="tips-text">保持光线充足</view>
</view>
<view class="flex flex-column tips-item">
<image class="tips-icon" src="@/pages_order/static/order/tips-2.png" mode="widthFix"></image>
<view class="tips-text">脸在取景框内</view>
</view>
<view class="flex flex-column tips-item">
<image class="tips-icon" src="@/pages_order/static/order/tips-3.png" mode="widthFix"></image>
<view class="tips-text">面部正对平面</view>
</view>
</view>
</view>
</view>
<view class="bottom">
<button class="btn" @click="onVerify">开始识别</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
src: null,
scanning: false,
countdown: false,
timeData: {},
}
},
methods: {
onVerify() {
// todo
this.scanning = true
},
onCameraInited() {
this.countdown = true
},
onCountDownChange(e) {
this.timeData = e
},
onCountDownFinish() {
this.countdown = false
this.takePhoto()
},
takePhoto() {
const ctx = uni.createCameraContext();
ctx.takePhoto({
quality: 'high',
success: (res) => {
this.src = res.tempImagePath
this.scanning = false
// todo: fetch match
setTimeout(() => {
this.$utils.navigateBack()
}, 1500)
}
});
},
onCameraError(e) {
console.log(e.detail);
}
},
}
</script>
<style lang="scss" scoped>
.page__view {
width: 100vw;
min-height: 100vh;
background-color: $uni-bg-color;
position: relative;
/deep/ .nav-bar__view {
position: fixed;
top: 0;
left: 0;
}
}
.main {
padding: calc(var(--status-bar-height) + 144rpx) 32rpx 224rpx 32rpx;
}
.card {
padding: 32rpx;
background: #FAFAFF;
border: 2rpx solid #FFFFFF;
border-radius: 32rpx;
& + & {
margin-top: 40rpx;
}
&-header {
font-family: PingFang SC;
font-weight: 500;
font-size: 36rpx;
line-height: 1.4;
color: #252545;
margin-bottom: 48rpx;
}
&-desc {
margin-top: 4rpx;
font-family: PingFang SC;
font-weight: 400;
font-size: 26rpx;
line-height: 1.4;
color: #4E4E69;
}
}
.camera {
&-box {
width: 622rpx;
height: 678rpx;
position: relative;
}
&-bg {
width: 100%;
height: 100%;
}
&-countdown {
position: absolute;
top: 14rpx;
left: 50%;
transform: translateX(-50%);
&-text {
font-family: PingFang SC;
font-weight: 600;
font-size: 72rpx;
line-height: 1.4;
color: $uni-color;
}
}
&-fg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
& {
width: 310rpx;
height: 310rpx;
border-radius: 50%;
}
&-tag {
position: absolute;
left: 50%;
bottom: 0;
transform: translate(-50%, 60%);
width: 248rpx;
height: 160rpx;
}
}
.tips {
margin-top: 32rpx;
padding: 0 32rpx;
column-gap: 24rpx;
&-item {
flex: 1;
row-gap: 24rpx;
}
&-icon {
width: 72rpx;
height: auto;
}
&-text {
font-family: PingFang SC;
font-weight: 400;
font-size: 22rpx;
line-height: 1.4;
color: #989898;
}
}
.bottom {
position: fixed;
left: 0;
bottom: 0;
width: 100vw;
height: 200rpx;
padding: 24rpx 40rpx;
background: #FFFFFF;
box-sizing: border-box;
.btn {
width: 100%;
padding: 16rpx 0;
box-sizing: border-box;
font-family: PingFang SC;
font-weight: 500;
font-size: 36rpx;
line-height: 1;
color: #FFFFFF;
background-image: linear-gradient(to right, #4B348F, #845CFA);
border-radius: 41rpx;
}
}
</style>

+ 242
- 0
pages_order/order/userInfo/idUpload.vue View File

@ -0,0 +1,242 @@
<template>
<view class="page__view">
<navbar title="身份认证" leftClick @leftClick="$utils.navigateBack" color="#191919" bgColor="#FFFFFF" />
<view class="main">
<view class="card">
<view class="card-header">
<view>身份认证</view>
<view class="card-desc">信息仅用于身份认证平台将保障你的信息安全</view>
</view>
<view class="form">
<uv-form
ref="form"
:model="form"
:rules="rules"
errorType="toast"
>
<view class="form-item">
<uv-form-item prop="idFront" :customStyle="formItemStyle">
<view class="form-item-content">
<view class="upload" @click="onUpload('idFront')">
<image v-if="form.idFront" class="upload-img" :src="form.idFront" mode="scaleToFill" />
<view v-else class="flex upload-default">
<image class="upload-default-img" src="@/pages_order/static/order/id-front-default.png" mode="aspectFill" />
</view>
</view>
</view>
<view class="form-item-label">身份证国徽面点击上传</view>
</uv-form-item>
</view>
<view class="form-item">
<uv-form-item prop="idBack" :customStyle="formItemStyle">
<view class="form-item-content">
<view class="upload" @click="onUpload('idBack')">
<image v-if="form.idBack" class="upload-img" :src="form.idBack" mode="scaleToFill" />
<view v-else class="flex upload-default">
<image class="upload-default-img" src="@/pages_order/static/order/id-back-default.png" mode="aspectFill" />
</view>
</view>
</view>
<view class="form-item-label">身份证人像面点击上传</view>
</uv-form-item>
</view>
</uv-form>
</view>
</view>
</view>
<view class="bottom">
<button class="btn" @click="onConfirm">确认</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
form: {
idFront: null,
idBack: null,
},
rules: {
'idFront': {
type: 'string',
required: true,
message: '请上传身份证国徽面',
},
'idBack': {
type: 'string',
required: true,
message: '请上传身份证人像面',
},
},
formItemStyle: { padding: 0 },
}
},
methods: {
onUpload(key) {
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'], //
success: res => {
let avatarUrl = res.tempFilePaths[0] // cover
this.$Oss.ossUpload(avatarUrl)
.then(url => {
this.form[key] = url
})
}
});
},
async onConfirm() {
try {
const res = await this.$refs.form.validate()
console.log('onSave res', res)
// todo: save
// todo: check
// this.$utils.redirectTo(`/pages_order/order/userInfo/facialVerify`)
this.$utils.redirectTo('/pages_order/order/userInfo/facialVerifyCustom')
} catch (err) {
console.log('onSave err', err)
}
},
},
}
</script>
<style lang="scss" scoped>
.page__view {
width: 100vw;
min-height: 100vh;
background-color: $uni-bg-color;
position: relative;
/deep/ .nav-bar__view {
position: fixed;
top: 0;
left: 0;
}
}
.main {
padding: calc(var(--status-bar-height) + 144rpx) 32rpx 224rpx 32rpx;
}
.card {
padding: 32rpx;
background: #FAFAFF;
border: 2rpx solid #FFFFFF;
border-radius: 32rpx;
& + & {
margin-top: 40rpx;
}
&-header {
font-family: PingFang SC;
font-weight: 500;
font-size: 36rpx;
line-height: 1.4;
color: #252545;
margin-bottom: 48rpx;
}
&-desc {
margin-top: 4rpx;
font-family: PingFang SC;
font-weight: 400;
font-size: 26rpx;
line-height: 1.4;
color: #4E4E69;
}
}
.form {
padding: 8rpx 0 0 0;
&-item {
& + & {
margin-top: 48rpx;
}
&-label {
margin-top: 32rpx;
text-align: center;
font-family: PingFang SC;
font-weight: 400;
font-size: 30rpx;
line-height: 1.4;
color: #4E4E69;
}
}
}
.upload {
position: relative;
width: 100%;
height: 386rpx;
overflow: hidden;
border-radius: 32rpx;
box-shadow: -5rpx -5rpx 10rpx 0 #FFFFFF,
10rpx 10rpx 20rpx 0 #AAAACC80,
4rpx 4rpx 10rpx 0 #AAAACC40,
-2rpx -2rpx 5rpx 0 #FFFFFF;
&-img {
width: 100%;
height: 100%;
}
&-default {
width: 100%;
height: 100%;
background-image: linear-gradient(#FAFAFF, #F3F3F3);
&-img {
width: 240rpx;
height: 240rpx;
}
}
}
.bottom {
position: fixed;
left: 0;
bottom: 0;
width: 100vw;
height: 200rpx;
padding: 24rpx 40rpx;
background: #FFFFFF;
box-sizing: border-box;
.btn {
width: 100%;
padding: 16rpx 0;
box-sizing: border-box;
font-family: PingFang SC;
font-weight: 500;
font-size: 36rpx;
line-height: 1;
color: #FFFFFF;
background-image: linear-gradient(to right, #4B348F, #845CFA);
border-radius: 41rpx;
}
}
</style>

+ 269
- 0
pages_order/order/userInfo/infoFill.vue View File

@ -0,0 +1,269 @@
<template>
<view class="page__view">
<navbar title="填写个人信息" leftClick @leftClick="$utils.navigateBack" color="#191919" bgColor="#FFFFFF" />
<view class="main">
<view class="card">
<view class="card-header">申请信息</view>
<view class="form">
<uv-form
ref="form"
:model="form"
:rules="rules"
errorType="toast"
>
<view class="form-item">
<uv-form-item prop="name" :customStyle="formItemStyle">
<view class="form-item-label">联系人</view>
<view class="form-item-content">
<formInput v-model="form.name"></formInput>
</view>
</uv-form-item>
</view>
<view class="form-item">
<uv-form-item prop="phone" :customStyle="formItemStyle">
<view class="form-item-label">手机号</view>
<view class="form-item-content">
<formInput v-model="form.phone"></formInput>
</view>
</uv-form-item>
</view>
<view class="form-item">
<uv-form-item prop="phone" :customStyle="formItemStyle">
<view class="form-item-label">所在地区</view>
<view class="form-item-content">
<picker mode="region" @change="onAreaChange" :value="form.area">
<view class="flex region">
<view v-if="form.area">{{ form.area.join('') }}</view>
<view v-else class="placeholder">选择省市区街道</view>
</view>
</picker>
</view>
</uv-form-item>
</view>
<view class="form-item">
<uv-form-item prop="address" :customStyle="formItemStyle">
<view class="form-item-label">详细地址</view>
<view class="form-item-content">
<formInput v-model="form.address" placeholder="小区楼栋、门牌号、村等"></formInput>
</view>
</uv-form-item>
</view>
</uv-form>
</view>
</view>
</view>
<view class="bottom">
<button class="btn" @click="onConfirm">确认</button>
</view>
</view>
</template>
<script>
import { mapState } from 'vuex'
import util from '@/utils/utils.js'
import formInput from '@/pages_order/components/formInput.vue'
export default {
components: {
formInput,
},
data() {
return {
form: {
name: null,
phone: null,
area: null,
address: null,
},
rules: {
'name': {
type: 'string',
required: true,
message: '请输入联系人',
},
'phone': {
type: 'string',
required: true,
message: '请输入正确的手机号',
validator: (rule, value, callback) => {
return util.validatePhone(value)
},
},
'area': {
type: 'array',
required: true,
message: '请选择省市区',
},
'address': {
type: 'string',
required: true,
message: '请输入详细地址',
},
},
formItemStyle: { padding: 0 },
}
},
onReady() {
this.$refs.form.setRules(this.rules)
},
methods: {
onAreaChange(e) {
this.form.area = e.detail.value
},
async onConfirm() {
try {
const res = await this.$refs.form.validate()
console.log('onSave res', res)
// todo: save
this.$utils.redirectTo(`/pages_order/order/userInfo/idUpload`)
} catch (err) {
console.log('onSave err', err)
}
},
},
}
</script>
<style lang="scss" scoped>
.page__view {
width: 100vw;
min-height: 100vh;
background-color: $uni-bg-color;
position: relative;
/deep/ .nav-bar__view {
position: fixed;
top: 0;
left: 0;
}
}
.main {
padding: calc(var(--status-bar-height) + 144rpx) 32rpx 224rpx 32rpx;
}
.card {
padding: 32rpx;
background: #FAFAFF;
border: 2rpx solid #FFFFFF;
border-radius: 32rpx;
& + & {
margin-top: 40rpx;
}
&-header {
font-family: PingFang SC;
font-weight: 500;
font-size: 36rpx;
line-height: 1.4;
color: #252545;
margin-bottom: 32rpx;
}
}
.row {
justify-content: space-between;
font-family: PingFang SC;
font-weight: 400;
line-height: 1.4;
column-gap: 24rpx;
& + & {
margin-top: 32rpx;
}
&-label {
flex: none;
font-size: 26rpx;
color: #8B8B8B;
}
&-content {
font-size: 32rpx;
color: #181818;
}
}
.form {
padding: 8rpx 0 0 0;
&-item {
border-bottom: 2rpx solid #EEEEEE;
&:last-child {
border: none;
}
& + & {
margin-top: 40rpx;
}
&-label {
font-family: PingFang SC;
font-weight: 400;
font-size: 26rpx;
line-height: 1.4;
color: #181818;
}
&-content {
margin-top: 14rpx;
padding: 6rpx 0;
.placeholder {
color: #C6C6C6;
font-size: 32rpx;
font-weight: 400;
}
.region {
min-height: 44rpx;
justify-content: flex-start;
}
}
}
}
.bottom {
position: fixed;
left: 0;
bottom: 0;
width: 100vw;
height: 200rpx;
padding: 24rpx 40rpx;
background: #FFFFFF;
box-sizing: border-box;
.btn {
width: 100%;
padding: 16rpx 0;
box-sizing: border-box;
font-family: PingFang SC;
font-weight: 500;
font-size: 36rpx;
line-height: 1;
color: #FFFFFF;
background-image: linear-gradient(to right, #4B348F, #845CFA);
border-radius: 41rpx;
}
}
</style>

+ 9
- 9
pages_order/product/productDetail.vue View File

@ -139,9 +139,9 @@
createTime: '2023-04-18', createTime: '2023-04-18',
content: '包装很精致,性价比非常高,终于收到啦,期待效果,每日一包,超级方便,真的能坚持服用', content: '包装很精致,性价比非常高,终于收到啦,期待效果,每日一包,超级方便,真的能坚持服用',
images: [ images: [
'/pages_order/static/index/medicine-1.png',
'/pages_order/static/index/medicine-2.png',
'/pages_order/static/index/medicine-3.png',
'/pages_order/static/index/recommend-pic.png',
'/pages_order/static/index/recommend-pic.png',
'/pages_order/static/index/recommend-pic.png',
], ],
productServeScore: 5, productServeScore: 5,
questionExperienceScore: 4, questionExperienceScore: 4,
@ -155,9 +155,9 @@
createTime: '2023-04-18', createTime: '2023-04-18',
content: '包装很精致,性价比非常高,终于收到啦,期待效果,每日一包,超级方便,真的能坚持服用', content: '包装很精致,性价比非常高,终于收到啦,期待效果,每日一包,超级方便,真的能坚持服用',
images: [ images: [
'/pages_order/static/index/medicine-1.png',
'/pages_order/static/index/medicine-2.png',
'/pages_order/static/index/medicine-3.png',
'/pages_order/static/index/recommend-pic.png',
'/pages_order/static/index/recommend-pic.png',
'/pages_order/static/index/recommend-pic.png',
], ],
productServeScore: 5, productServeScore: 5,
questionExperienceScore: 4, questionExperienceScore: 4,
@ -171,9 +171,9 @@
createTime: '2023-04-18', createTime: '2023-04-18',
content: '包装很精致,性价比非常高,终于收到啦,期待效果,每日一包,超级方便,真的能坚持服用', content: '包装很精致,性价比非常高,终于收到啦,期待效果,每日一包,超级方便,真的能坚持服用',
images: [ images: [
'/pages_order/static/index/medicine-1.png',
'/pages_order/static/index/medicine-2.png',
'/pages_order/static/index/medicine-3.png',
'/pages_order/static/index/recommend-pic.png',
'/pages_order/static/index/recommend-pic.png',
'/pages_order/static/index/recommend-pic.png',
], ],
productServeScore: 5, productServeScore: 5,
questionExperienceScore: 4, questionExperienceScore: 4,


BIN
pages_order/static/index/medicine-1.png View File

Before After
Width: 49  |  Height: 40  |  Size: 2.4 KiB

BIN
pages_order/static/index/medicine-2.png View File

Before After
Width: 164  |  Height: 164  |  Size: 26 KiB

BIN
pages_order/static/index/medicine-3.png View File

Before After
Width: 164  |  Height: 164  |  Size: 32 KiB

BIN
pages_order/static/order/camera-bg.png View File

Before After
Width: 622  |  Height: 678  |  Size: 209 KiB

BIN
pages_order/static/order/id-back-default.png View File

Before After
Width: 361  |  Height: 361  |  Size: 4.3 KiB

BIN
pages_order/static/order/id-front-default.png View File

Before After
Width: 361  |  Height: 361  |  Size: 3.0 KiB

BIN
pages_order/static/order/tag.png View File

Before After
Width: 496  |  Height: 320  |  Size: 131 KiB

BIN
pages_order/static/order/tips-1.png View File

Before After
Width: 37  |  Height: 36  |  Size: 920 B

BIN
pages_order/static/order/tips-2.png View File

Before After
Width: 37  |  Height: 36  |  Size: 1.0 KiB

BIN
pages_order/static/order/tips-3.png View File

Before After
Width: 37  |  Height: 36  |  Size: 864 B

BIN
pages_order/static/report/avatar.jpg View File

Before After
Width: 88  |  Height: 88  |  Size: 2.7 KiB

BIN
pages_order/static/report/avatar.png View File

Before After
Width: 442  |  Height: 450  |  Size: 420 KiB

+ 23
- 1
utils/utils.js View File

@ -226,6 +226,27 @@ export const toLogin = function(){
} }
}() }()
export const validatePhone = (phone) => {
// let fixedLindReg = /(\d{3,4}-)?\d{7,8}$/g // 常见座机格式
let mobileReg = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/g // 中国大陆手机号
// if (fixedLindReg.test(phone)) {
// return true
// }
if (mobileReg.test(phone)) {
return true
}
uni.showToast({
title: '请填写正确手机号',
icon: "none"
})
return false
}
export default { export default {
toArray, toArray,
generateUUID, generateUUID,
@ -240,5 +261,6 @@ export default {
redirectTo, redirectTo,
copyText, copyText,
stringFormatHtml, stringFormatHtml,
toLogin
toLogin,
validatePhone,
} }

Loading…
Cancel
Save