From 45f937927f502eb6b26b7f53c725a0e9224832a0 Mon Sep 17 00:00:00 2001
From: jinna
Date: Fri, 25 Aug 2023 11:53:01 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B0=8F=E7=A8=8B=E5=BA=8F?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/pages_zhentou/form/form.vue | 174 ++++++++++++++++------
pages/pages_zhentou/homePage/homePage.vue | 2 +-
pages/pages_zhentou/myPage/address.vue | 2 -
pages/pages_zhentou/order/checkOrder.vue | 2 +-
pages/pages_zhentou/order/order.vue | 25 ++--
5 files changed, 144 insertions(+), 61 deletions(-)
diff --git a/pages/pages_zhentou/form/form.vue b/pages/pages_zhentou/form/form.vue
index 152946e..5bea8ce 100644
--- a/pages/pages_zhentou/form/form.vue
+++ b/pages/pages_zhentou/form/form.vue
@@ -1,6 +1,6 @@
-
+
@@ -10,35 +10,6 @@
上一页
下一页
-
@@ -60,15 +31,15 @@
-
-
-
+
+
@@ -118,7 +92,10 @@
-
+
+ 颈椎长度
+
+
@@ -179,13 +156,13 @@
提交即授权该表单收集你的填写信息
-
+
-
+
扫码添加
-
+
@@ -268,13 +245,35 @@
rules: [{
required: true,
errorMessage: '身高不能为空'
- }]
+ },
+ {
+ validateFunction: function(rule, value, data, callback) {
+ const moblie = /^(0{1}|[1-9]\d{0,3}|.{0})$/;
+ if (!moblie.test(value)) {
+ callback('请填写正确的身高');
+ } else {
+ return true;
+ }
+ }
+ }
+ ]
},
weight: {
rules: [{
required: true,
errorMessage: '体重不能为空'
- }]
+ },
+ {
+ validateFunction: function(rule, value, data, callback) {
+ const moblie = /^(0(\.\d{1}){0,1}|[1-8]\d{1,3}(\.\d{1}){0,1}|9\d{1,2}(\.\d{1}){0,1}|999(\.0){0,1}|.{0})$/;
+ if (!moblie.test(value)) {
+ callback('请填写正确的体重');
+ } else {
+ return true;
+ }
+ }
+ }
+ ]
},
pillowHardness: {
rules: [{
@@ -398,6 +397,9 @@
}
},
onShow() {},
+ onReady(){
+ this.$refs.valiForm.setRules(this.rules)
+ },
onLoad(options) {
// let srceenNunber=15; //因设计图是1920所有把设计图分为19.2份,所以html字体大小为100px
let that = this;
@@ -430,7 +432,7 @@
this.orderNo = options.orderNo
this.orderNum = options.orderNum
this.pageFrom = options.pageFrom
- this.valiFormData.phone = JSON.parse(uni.getStorageSync('userInfo')).phone ;
+
// if(options.pageFrom == 'order'){
// this.phoneNumber = options.phone
// // this.getInfo()
@@ -439,6 +441,30 @@
// this.getCurrentArea('北京市')
},
methods: {
+ //长按识别二维码
+ previewImage(e) {
+ console.log(e)
+ uni.previewImage({
+ // 需要预览的图片链接列表。若无需预览,可以注释urls
+ urls: 'http://47.104.224.41:9000/etriphome/appresource/image/add.png',
+ // 为当前显示图片的链接/索引值
+ current: 'http://47.104.224.41:9000/etriphome/appresource/image/add.png',
+ // 图片指示器样式
+ indicator: 'default',
+ // 是否可循环预览
+ loop: false,
+ // 长按图片显示操作菜单,如不填默认为保存相册
+ longPressActions: {
+ // itemList: [this.l('发送给朋友'), this.l]
+ },
+ success: res => {
+ console.log('previewImage res', res);
+ },
+ fail: err => {
+ console.log('previewImage err', err);
+ }
+ });
+ },
// 根据订单号获取已填写的订单信息
getOrderInfo(type) {
uni.request({
@@ -452,6 +478,25 @@
console.log(res)
if (res.data.code == 200) {
this.orderData = res.data.data;
+ if(this.orderData.length == 0){
+ this.valiFormData = {
+ phone:JSON.parse(uni.getStorageSync('userInfo')).phone,
+ }
+ }else{
+ this.valiFormData = this.orderData[this.orderData.length - 1]
+ this.valiFormData.neckShoulderWidth = this.valiFormData
+ .neckShoulderWidth == -1 ? '' : this.valiFormData.neckShoulderWidth;
+ this.valiFormData.neckLength = this.valiFormData.neckLength == -1 ? '' :
+ this.valiFormData.neckLength;
+ this.valiFormData.ageRange = this.valiFormData.ageRange == -1 ? '' : this
+ .valiFormData.ageRange;
+ this.valiFormData.sleepLength = this.valiFormData.sleepLength == -1 ? '' :
+ this.valiFormData.sleepLength;
+ this.valiFormData.cervicalVertebra = this.valiFormData.cervicalVertebra ==
+ -1 ? '' : this.valiFormData.cervicalVertebra;
+ this.valiFormData.otherNeed = this.valiFormData.otherNeed == -1 ? '' : this
+ .valiFormData.otherNeed;
+ }
if (type == 'save') {
if (this.orderData.length == this.orderNum) {
if (this.pageFrom == 'order') {
@@ -896,16 +941,24 @@
.content_box {
width: 690rpx;
/* max-width: 700px; */
- height: 80%;
+ height: 71%;
+ overflow: auto;
background-color: #fff;
margin: 0 auto;
margin-top: 2%;
border-radius: 24rpx;
padding: 30rpx 0;
+ padding-top: 180rpx;
.top_box {
width: 690rpx;
margin: 0 auto;
+ position: absolute;
+ top: 16rpx;
+ z-index: 100;
+ background: #fff;
+ border-radius: 24rpx 24rpx 0 0;
+ padding-top: 20rpx;
// background: #fff;
// display: flex;
// align-items: center;
@@ -977,10 +1030,10 @@
.rele_content {
width: 100%;
- height: 80%;
+ height: 100%;
margin: 0 auto;
position: relative;
- overflow: auto;
+ // overflow: auto;
}
@@ -994,6 +1047,7 @@
display: flex;
align-items: center;
justify-content: center;
+ background: #fff
}
@@ -1037,6 +1091,7 @@
.code_img {
width: 200rpx;
+ height: 200rpx;
}
}
@@ -1175,9 +1230,22 @@
.wid_img {
width: 100%;
+ height: 316rpx;
border-top-left-radius: 16rpx;
border-top-right-radius: 16rpx;
}
+ .img_tit{
+ width: 306rpx;
+ height: 94rpx;
+ background: #fff;
+ border-radius: 0 0 16rpx 16rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ color: #333;
+ font-size: 28rpx;
+ border: 1px solid #eaeaea;
+ }
::v-deep.checklist-box {
width: 306rpx;
@@ -1197,9 +1265,22 @@
.hei_img {
width: 100%;
+ height: 316rpx;
border-top-left-radius: 16rpx;
border-top-right-radius: 16rpx;
}
+ .img_tit{
+ width: 306rpx;
+ height: 94rpx;
+ background: #fff;
+ border-radius: 0 0 16rpx 16rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ color: #333;
+ font-size: 28rpx;
+ border: 1px solid #eaeaea;
+ }
::v-deep.checklist-box {
width: 306rpx;
@@ -1307,6 +1388,7 @@
.code_img {
width: 200rpx;
+ height: 200rpx;
}
}
}
diff --git a/pages/pages_zhentou/homePage/homePage.vue b/pages/pages_zhentou/homePage/homePage.vue
index 88096ba..372a6d4 100644
--- a/pages/pages_zhentou/homePage/homePage.vue
+++ b/pages/pages_zhentou/homePage/homePage.vue
@@ -1,7 +1,7 @@
-
+
diff --git a/pages/pages_zhentou/myPage/address.vue b/pages/pages_zhentou/myPage/address.vue
index 74a55d8..a0dfae1 100644
--- a/pages/pages_zhentou/myPage/address.vue
+++ b/pages/pages_zhentou/myPage/address.vue
@@ -216,8 +216,6 @@
this.loadMore();
}
}
- this.userInfo = JSON.parse(uni.getStorageSync('userInfo'));
- // console.log(userInfo)
},
methods: {
// 保存地址
diff --git a/pages/pages_zhentou/order/checkOrder.vue b/pages/pages_zhentou/order/checkOrder.vue
index b53c721..970c9e9 100644
--- a/pages/pages_zhentou/order/checkOrder.vue
+++ b/pages/pages_zhentou/order/checkOrder.vue
@@ -39,7 +39,7 @@
实付款
¥{{orderData.goodsPrice}}
+ style="font-size: 34rpx;">{{orderData.totalPrice}}
diff --git a/pages/pages_zhentou/order/order.vue b/pages/pages_zhentou/order/order.vue
index 143acd3..4c235d4 100644
--- a/pages/pages_zhentou/order/order.vue
+++ b/pages/pages_zhentou/order/order.vue
@@ -46,7 +46,7 @@
实付款
¥699.0
+ style="font-size: 34rpx;">{{item.totalPrice}}
查看物流
@@ -87,10 +87,13 @@
let userInfo = uni.getStorageSync('userInfo');
if (userInfo) {
this.userInfo = JSON.parse(userInfo);
- this.hasMore = true;
- this.current = 0;
- this.orderData= []
- this.loadMore();
+ if(this.userInfo.phone){
+ this.hasMore = true;
+ this.current = 0;
+ this.orderData= []
+ this.loadMore();
+ }
+
}
},
onLoad() {
@@ -482,8 +485,8 @@
height: 160rpx;
.img_box {
- width: 100%;
- height: 100%;
+ width: 160rpx;
+ height: 160rpx;
}
}
@@ -521,8 +524,8 @@
.image {
- width: 100%;
- height: 100%;
+ width: 40rpx;
+ height: 40rpx;
}
}
@@ -537,8 +540,8 @@
height: 40rpx;
.image {
- width: 100%;
- height: 100%;
+ width: 40rpx;
+ height: 40rpx;
}
}