修改小程序页面bug

main
jinna 2 years ago
parent 582fbbcfc0
commit 45f937927f
  1. 174
      pages/pages_zhentou/form/form.vue
  2. 2
      pages/pages_zhentou/homePage/homePage.vue
  3. 2
      pages/pages_zhentou/myPage/address.vue
  4. 2
      pages/pages_zhentou/order/checkOrder.vue
  5. 25
      pages/pages_zhentou/order/order.vue

@ -1,6 +1,6 @@
<template>
<view class="container">
<page-meta :root-font-size="fontsize+'px'"></page-meta> <!--html-->
<!-- <page-meta :root-font-size="fontsize+'px'"></page-meta> --> <!--html-->
<view class="content_box">
<view class="top_box">
<view class="title_box">
@ -10,35 +10,6 @@
<p class="turn_item prev" @click="handlePrev" v-if="currentNum > 1">上一页</p>
<p class="turn_item next" @click="handleNext" v-if="currentNum < orderNum">下一页</p>
</view>
<!-- <view class="form_item">
<view class="img_box" @click="handlePrev">
<image src="../../../static/image/form.png" mode=""></image>
<image src="../../../static/image/form_act.png" mode=""></image>
</view>
<view class="form_txt">
报名单{{currentNum}}
</view>
</view>
<view class="line_box"></view>
<view class="form_item">
<view class="img_box">
<image src="../../../static/image/form.png" mode=""></image>
<image src="../../../static/image/form_act.png" mode=""></image>
</view>
<view class="form_txt">
报名单{{currentNum}}
</view>
</view>
<view class="line_box"></view>
<view class="form_item">
<view class="img_box">
<image src="../../../static/image/form.png" mode=""></image>
<image src="../../../static/image/form_act.png" mode=""></image>
</view>
<view class="form_txt" @click="handleNext">
报名单{{currentNum}}
</view>
</view> -->
</view>
<view class="rele_content">
<view class="form_box">
@ -60,15 +31,15 @@
</view>
</view>
<view class="form_content">
<uni-forms ref="valiForm" :rules="rules" :model="valiFormData" labelWidth="180px"
<uni-forms ref="valiForm" :model="valiFormData" labelWidth="180px" validate-trigger="bind"
label-position="top">
<uni-forms-item label="姓名" required name="username" :label-style="{'font-size':'40rpx'}">
<uni-easyinput :disabled="isDisabled" v-model="valiFormData.username"
placeholder="请输入姓名" />
</uni-forms-item>
<uni-forms-item label="手机" required name="phone">
<uni-easyinput :disabled="isDisabled" v-model="valiFormData.phone"
placeholder="请输入手机" />
<uni-forms-item label="手机" required name="phone">
<uni-easyinput :disabled="isDisabled" v-model="valiFormData.phone"
placeholder="请输入手机" />
</uni-forms-item>
<!-- <uni-forms-item label="地址" required name="address">
<uni-data-picker v-model="valiFormData.city" :localdata="aCityData" popup-title="选择城市">
@ -106,8 +77,11 @@
<uni-forms-item label="颈肩宽度示意图">
<view class="wid_pre">
<img class="wid_img" :src="imgPrefix + 'jian.png'" alt="">
<uni-data-checkbox :disabled="isDisabled" v-model="valiFormData.width"
:localdata="widthData" />
<view class="img_tit">
颈肩宽度
</view>
<!-- <uni-data-checkbox :disabled="isDisabled" v-model="valiFormData.width"
:localdata="widthData" /> -->
</view>
</uni-forms-item>
<uni-forms-item label="颈长">
@ -118,7 +92,10 @@
<uni-forms-item label="颈长示意图">
<view class="hei_pre">
<img class="hei_img" :src="imgPrefix + 'length.jpg'" alt="">
<uni-data-checkbox v-model="valiFormData.length" :localdata="lengthData" />
<view class="img_tit">
颈椎长度
</view>
<!-- <uni-data-checkbox v-model="valiFormData.length" :localdata="lengthData" /> -->
</view>
</uni-forms-item>
<uni-forms-item label="年龄">
@ -179,13 +156,13 @@
<!-- <a href="#page_privacy_modal" data-toggle="modal">隐私协议</a> -->
<span>提交即授权该表单收集你的填写信息</span>
</view>
<view class="mask_box" v-if="isShowCode"></view>
<!-- <view class="mask_box" v-if="isShowCode"></view> -->
<view class="phone_box" @click="clickPhone" v-if="widthScreen <= 500">
<uni-icons type="phone" size="30" color="#2eaadd"></uni-icons>
</view>
<view class="code_box" v-if="isShowCode">
<view class="code_box" v-if="isShowCode" >
<span style="color: #333;font-size: 28rpx;margin-bottom: 12rpx;">扫码添加</span>
<img class="code_img" :src="imgPrefix + 'add.png'" alt="">
<image :show-menu-by-longpress="true" class="code_img" :src="imgPrefix + 'add.png'" alt=""></image>
</view>
<view class="link_box" v-if="widthScreen > 750" @click="isShowLink = !isShowLink">
<uni-icons type="phone" size="20" color="#2eaadd"></uni-icons>
@ -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; //192019.2html100px
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;
}
}
}

@ -1,7 +1,7 @@
<template>
<view>
<view class="img_box">
<image class="img" mode="widthFix" :src="bgSrc"></image>
<image :show-menu-by-longpress="true" class="img" mode="widthFix" :src="bgSrc"></image>
<!-- <img class="img" src="../../../static/image/bag.jpg" mode=""></img> -->
</view>
<view class="per_box">

@ -216,8 +216,6 @@
this.loadMore();
}
}
this.userInfo = JSON.parse(uni.getStorageSync('userInfo'));
// console.log(userInfo)
},
methods: {
//

@ -39,7 +39,7 @@
<view class="pay_box">
<p class="pay_txt">实付款</p>
<p class="mon_txt"><span style="font-size: 22rpx;"></span><span
style="font-size: 34rpx;">{{orderData.goodsPrice}}</span></p>
style="font-size: 34rpx;">{{orderData.totalPrice}}</span></p>
</view>
</view>
</view>

@ -46,7 +46,7 @@
<view class="pay_box">
<p class="pay_txt">实付款</p>
<p class="mon_txt"><span style="font-size: 22rpx;"></span><span
style="font-size: 34rpx;">699.0</span></p>
style="font-size: 34rpx;">{{item.totalPrice}}</span></p>
</view>
<view class="btn_box">
<p class="btn" v-if="item.status == 3 || item.status == 4" @click.stop="handleWuliu(item)">查看物流</p>
@ -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;
}
}

Loading…
Cancel
Save