Browse Source

修改

master
453530270@qq.com 2 years ago
parent
commit
2017abbc67
  1. 4
      pages/home.vue
  2. 16
      pages/paySuccess/paySuccess.vue
  3. 163
      pages/verfiy/index.vue

4
pages/home.vue

@ -213,8 +213,10 @@
showError("请登录后再操作",this.gotologin())
}
},
gotologin(){
this.$navTo("pages/login/loginsms")
this.$navTo("pages/login/index")
},
//

16
pages/paySuccess/paySuccess.vue

@ -6,7 +6,7 @@
</view>
<view class="icon_area">
<image src="../../static/pay/success.png" mode="" class="success_icon"></image>
<view class="success_txt">支付成功</view>
<view class="success_txt">支付完毕</view>
</view>
<view class="content_area">
<view class="">
@ -16,15 +16,15 @@
<view class="">
<view class="s_title">1.应用下载</view>
<view class="down_area">
<view class="down_item">
<view class="down_item" @click="zwdz()">
<view class="left_icon"></view>
<view class="down_link">国家文化专网网络应用入口</view>
<view class="right_icon" @click="zwdz()"></view>
<view class="right_icon"></view>
</view>
<view class="down_item">
<view class="down_item" @click="downapp()">
<view class="left_icon"></view>
<view class="down_link">手机绑定关联程序</view>
<view class="right_icon" @click="downapp()"></view>
<view class="right_icon" ></view>
</view>
</view>
<view class="s_title">2.输入设备安装码</view>
@ -33,7 +33,7 @@
</view>
<view class="s_title">3.交易中心账号绑定</view>
<view class="">
<input type="text" v-model="account" placeholder="默认为注册手机号" placeholder-style="color: #B7B7B7;" class="input_box">
<input type="text" v-model="account" placeholder="默认为注册手机号" maxlength="11" placeholder-style="color: #B7B7B7;" class="input_box">
</view>
</view>
</view>
@ -77,7 +77,7 @@
const tdd = dev.substring(2,-1).toUpperCase()+Date.now()
this.installationCode = tdd
this.account = this.userInfo.mobile
// this.account = this.userInfo.mobile
},
init(){
@ -110,7 +110,7 @@
.then(result => {
// console.log(result)
app.userInfo = result.data.userInfo
app.account = result.data.userInfo.mobile
// app.account = result.data.userInfo.mobile
resolve(app.userInfo)
})
.catch(err => {

163
pages/verfiy/index.vue

@ -6,12 +6,26 @@
</view>
<view class="form-group">
<view class="form-item">
<input type="text" v-model="rname" class="form-item--input" placeholder="请输入手机号持有人姓名"/>
<input type="text" v-model="rname" class="form-item--input" @focus="fcevt()" placeholder="请输入手机号持有人姓名"/>
</view>
<view class="form-item">
<input type="text" v-model="rid" maxlength="18" class="form-item--input" placeholder="请输入手机号持有人身份证号"/>
<input type="text" v-model="rid" maxlength="18" class="form-item--input" @focus="fcevt()" placeholder="请输入手机号持有人身份证号"/>
</view>
<!-- 图片列表 -->
<view class="image-list">
<view class="image-preview">
<text class="image-delete iconfont icon-shanchu" @click="deleteImage(index, imageIndex)"></text>
<image class="image" mode="aspectFill" ></image>
</view>
<view class="image-picker" >
<text class="choose-icon iconfont icon-camera"></text>
<text class="choose-text">上传图片</text>
</view>
</view>
</view>
<view class="gtbtnzone">
@ -21,16 +35,22 @@
</template>
<script>
import * as UploadApi from '@/api/upload'
import * as Verify from '@/utils/verify'
import store from '@/store'
//
const maxImageLength = 2
export default {
data() {
return {
//
rname:"方哲宇",
rname:"",
//
rid:"440923195801215174",
rid:"",
//
imageList: [],
}
},
methods: {
@ -43,7 +63,7 @@
this.$navTo("pages/verfiy/choosedev");
}
},
//todo
formValidationName(str){
if(Verify.isEmpty(str)){
@ -64,8 +84,67 @@
return false
}
return true
},
},
//
chooseImage(index) {
const app = this
const oldImageList = app.imageList
//
uni.chooseImage({
count: maxImageLength - oldImageList.length,
sizeType: ['original', 'compressed'], //
sourceType: ['album', 'camera'], //
success({ tempFiles }) {
// tempFiles = [{path:'xxx', size:100}]
app.imageList = oldImageList.concat(tempFiles)
}
});
},
//
deleteImage(index, imageIndex) {
this.imageList.splice(imageIndex, 1)
},
//
getImagesLength() {
const { formData } = this
let imagesLength = 0
formData.forEach(item => {
if (item.content.trim()) {
imagesLength += item.imageList.length
}
})
return imagesLength
},
//
uploadFile() {
const app = this
const { formData } = app
//
const files = []
formData.forEach((item, index) => {
if (item.content.trim() && item.imageList.length) {
const images = item.imageList.map(image => image)
files.push({ formDataIndex: index, images })
}
})
//
return new Promise((resolve, reject) => {
Promise.all(files.map((file, index) => {
return new Promise((resolve, reject) => {
UploadApi.image(file.images)
.then(fileIds => {
app.uploaded = fileIds
resolve(fileIds)
})
.catch(reject)
})
}))
.then(resolve, reject)
})
}
}
}
</script>
@ -113,6 +192,76 @@
height: 100%;
background-color: #F8F8F8;
}
.image-list {
padding: 0 20rpx;
margin-top: 20rpx;
margin-bottom: -20rpx;
&:after {
clear: both;
content: " ";
display: table;
}
.image {
display: block;
width: 100%;
height: 100%;
}
.image-picker,
.image-preview {
width: 184rpx;
height: 184rpx;
margin-right: 30rpx;
margin-bottom: 30rpx;
float: left;
&:nth-child(3n+0) {
margin-right: 0;
}
}
.image-picker {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border: 1rpx dashed #ccc;
color: #ccc;
.choose-icon {
font-size: 48rpx;
margin-bottom: 6rpx;
}
.choose-text {
font-size: 24rpx;
}
}
.image-preview {
position: relative;
.image-delete {
position: absolute;
top: -15rpx;
right: -15rpx;
height: 42rpx;
width: 42rpx;
line-height: 42rpx;
background: rgba(0, 0, 0, 0.64);
border-radius: 50%;
color: #fff;
font-weight: bolder;
font-size: 22rpx;
z-index: 10;
text-align: center;
}
}
}
}
}

Loading…
Cancel
Save