Commit 2ee929a1 authored by 李俊赕's avatar 李俊赕

Merge branch 'dev-photo-v2' of https://git.banshouhui.com/heyinchen/take_order into dev-photo-v2

parents 3de3fa98 63474fe0
......@@ -100,11 +100,11 @@
}
if(e && e.current_count){
this.done_count = Math.max(e.current_count - 1, 0)
this.done_count = e.current_count
}
if(e && e.current_count){
this.current_count = e.current_count
this.current_count = Math.max(e.current_count - 1, 0)
}
if(e && e.images){
......
......@@ -11,7 +11,7 @@
<view class="right-view-title">拍照项有:</view>
<template v-for="(item,ikey) in rightList">
<view class="rightItemView" @click="rightItemClick(item,ikey)" :key="ikey">
<view class="['rightContentView', item.images.length > 0 ? 'gray666Color' : 'rightTitle']">
<view :class="['rightContentView', item.images.length > 0 ? 'gray666Color' : 'rightTitle']">
<text class="ph-lst-item-index">{{ ikey + 1 }}</text>
<text class="">{{item.name}} ({{item.image_count}}张)</text>
<image class="ph-list-item-arrow" src="/static/photo/arrow.png"></image>
......@@ -100,18 +100,6 @@
const globalData = getApp().globalData
globalData.photo.productList = res.result
this.dataList = res.result
this.dataList.forEach(item => {
item.list.forEach(subItem => {
subItem.isClicked = false
})
})
console.log('添加 新字段 后的数组:')
console.log(this.dataList)
var item = res.result[0]
this.rightList = item.list
},
......@@ -128,42 +116,46 @@
// 点击图片
handleClickImage(item, image, index) {
uni.navigateTo({
url: '/pages/photo/detail' +
'?current_image=' + image +
'&image_count=' + item.image_count +
'&current_count=' + (index + 1) +
'&images=' + JSON.stringify(item.images) +
'&title=' + item.name,
// uni.navigateTo({
// url: '/pages/photo/detail' +
// '?current_image=' + image +
// '&image_count=' + item.images.length +
// '&current_count=' + (index + 1) +
// '&images=' + JSON.stringify(item.images) +
// '&title=' + item.name,
// })
uni.previewImage({
urls: item.images,
current:index
})
},
//右侧点击
rightItemClick: function(item, ikey) {
console.log(item,'item')
const photo = getApp().globalData.photo
photo.currentItem = item
uni.navigateTo({
url:'/pages/photo/take'
})
// // for (let i = 0; i < this.rightList.length; i++) {
// // var subItem = this.rightList[i]
// // if(i == ikey){
// // subItem.isClicked = true
// // }
// // }
// // item.clickable = true
// for (let i = 0; i < this.rightList.length; i++) {
// var subItem = this.rightList[i]
// if(i == ikey){
// subItem.isClicked = true
// }
// }
// item.clickable = true
// this.$set(this.rightList[ikey],'clickable',true)
// var current_image = item.images[0]
// var current_count = 1
// uni.navigateTo({
// url:'/pages/photo/detail'
// +'?current_image=' + current_image
// +'&image_count=' + item.image_count
// +'&current_count=' + current_count
// +'&images=' + JSON.stringify(item.images)
// +'&title=' + item.name,
// url:'/pages/photo/standard'
// // +'?current_image=' + current_image
// // +'&image_count=' + item.image_count
// // +'&current_count=' + current_count
// // +'&images=' + JSON.stringify(item.images)
// // +'&title=' + item.name,
// })
console.log(item,'item')
const photo = getApp().globalData.photo
photo.currentItem = item
uni.navigateTo({
url:'/pages/photo/take'
})
},
......@@ -181,6 +173,7 @@
display: flex;
flex-direction: column;
align-items: center;
height: 100%;
}
.centerBackView {
......@@ -215,8 +208,8 @@
width: 100%;
display: flex;
flex-direction: column;
margin-top: 100rpx;
margin-bottom: 50rpx;
padding-top: 100rpx;
padding-bottom: 50rpx;
}
.right-view-title {
......@@ -356,4 +349,4 @@
color: #666666;
border-color: #666666;
}
</style>
</style>
......@@ -5,7 +5,7 @@
<swiper :current="elCurrent" @change="change" @animationfinish="animationfinish" :interval="interval" :circular="circular" :duration="duration" :autoplay="autoplay"
:previous-margin="effect3d ? effect3dPreviousMargin + 'rpx' : '0'" :next-margin="effect3d ? effect3dPreviousMargin + 'rpx' : '0'"
:style="{
height: height + 'rpx'
height: heightString
}">
<swiper-item class="u-swiper-item" v-for="(item, index) in list" :key="index">
<view class="u-list-image-wrap" @tap.stop.prevent="listClick(index)" :class="[uCurrent != index ? 'u-list-scale' : '']" :style="{
......@@ -207,6 +207,9 @@
// 因为uni的swiper组件的current参数只接受Number类型,这里做一个转换
elCurrent() {
return Number(this.current);
},
heightString() {
return typeof this.height === 'number' && this.height !== 0 ? (this.height + 'rpx') : this.height
}
},
methods: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment