Commit 7d7254be authored by 李俊赕's avatar 李俊赕

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

parents df0b5559 55de306d
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
url: '/pages/photo/list' + url: '/pages/photo/list' +
'?brandId=' + this.param.brandId + '?brandId=' + this.param.brandId +
'&brand=' + this.brandName + '&brand=' + this.brandName +
'&classifyId=' + this.param.systemId + '&classifyId=' + this.param.classifyId +
'&systemId=' + this.param.systemId, '&systemId=' + this.param.systemId,
}) })
} }
......
<template> <template>
<view class="backView"> <view class="backView">
<u-loading style="position: absolute;top: 50%;" :show="loading" size="36" mode="flower"></u-loading> <u-loading style="position: fixed;top: 50%;" :show="loading" size="36" mode="flower"></u-loading>
<view class="topView"> <view class="topView">
<view :class="['topItemView', {'active':activeTop===ikey}]" @click="handleTopItemChange(ikey,item)" v-for="(item,ikey) in dataList" :key="ikey"> <view :class="['topItemView', {'active':activeTop===ikey}]" @click="handleTopItemChange(ikey,item)" v-for="(item,ikey) in dataList" :key="ikey">
<text <text
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</view> </view>
<view class="rightImageView" v-if="item.imageList.length > 0 || item.images.length > 0"> <view class="rightImageView" v-if="item.imageList.length > 0 || item.images.length > 0">
<image class="rightImage" v-for="(image, index) in (item.imageList.length > 0 ? item.imageList : item.images)" :src="image" :key="image" <image class="rightImage" v-for="(image, index) in (item.imageList.length > 0 ? item.imageList : item.images)" :src="image" :key="image"
@click.stop="handleClickImage(item, index)" mode=""></image> @click.stop="handleClickImage(item, index)" mode="aspectFill"></image>
</view> </view>
</view> </view>
</template> </template>
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
}, },
methods: { methods: {
getListData: function() { getListData: function() {
this.loading = true this.loading = true
let that = this let that = this
this.$u.cloudApi.getGroupStandardV2({ this.$u.cloudApi.getGroupStandardV2({
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
'classify_id': this.classifyId, 'classify_id': this.classifyId,
'system_id': this.systemId, 'system_id': this.systemId,
'brand_id': this.brandId 'brand_id': this.brandId
}).then(res => { }).then(res => {
this.loading = false this.loading = false
if (res && res.result) { if (res && res.result) {
that.handleData(res.result) that.handleData(res.result)
...@@ -93,18 +93,19 @@ ...@@ -93,18 +93,19 @@
const globalData = getApp().globalData const globalData = getApp().globalData
globalData.photo.productList = result globalData.photo.productList = result
this.dataList = result this.dataList = result
let item = result[0] if (result.length > 0) {
console.log(result,item,'item') var item = result[0]
globalData.photo.waterSetting = item && item.userWatermark || null globalData.photo.waterSetting = item.userWatermark
this.rightList = item.list this.rightList = item.list
}
}, },
//顶部点击 //顶部点击
handleTopItemChange: function(ikey, item) { handleTopItemChange: function(ikey, item) {
this.activeTop = ikey this.activeTop = ikey
this.rightList = item.list this.rightList = item.list
const photo = getApp().globalData.photo const photo = getApp().globalData.photo
photo.topIndex = ikey photo.topIndex = ikey
photo.waterSetting = item.userWatermark photo.waterSetting = item.userWatermark
uni.pageScrollTo({ uni.pageScrollTo({
scrollTop: 0, scrollTop: 0,
...@@ -217,15 +218,15 @@ ...@@ -217,15 +218,15 @@
.rightContentView { .rightContentView {
display: flex; display: flex;
align-items: center; align-items: center;
width: 100%; width: 100%;
font-size: 30rpx; font-size: 30rpx;
color: #2272FF; color: #2272FF;
/* flex-direction: column; */ /* flex-direction: column; */
/* border-left: 2rpx solid #F3F3F3; */ /* border-left: 2rpx solid #F3F3F3; */
} }
.rightContentView.active { .rightContentView.active {
color: #666666; color: #666666;
border-color: #666666; border-color: #666666;
} }
.ph-list-item-arrow { .ph-list-item-arrow {
...@@ -277,12 +278,12 @@ ...@@ -277,12 +278,12 @@
justify-content: center; justify-content: center;
-webkit-flex: 1; -webkit-flex: 1;
flex: 1; flex: 1;
background-color: #FFFFFF; background-color: #FFFFFF;
color: #999999; color: #999999;
} }
.topItemView.active { .topItemView.active {
color: #2272FF; color: #2272FF;
} }
.topItemTitle { .topItemTitle {
......
<template> <template>
<view class="backView"> <view class="backView">
<u-loading style="position: absolute;top: 50%;" :show="loading" size="36" mode="flower"></u-loading> <u-loading style="position: fixed;top: 50%;" :show="loading" size="36" mode="flower"></u-loading>
<view class="itemView firstItem"> <view class="itemView firstItem">
<view class="itemTitleView"> <view class="itemTitleView">
<text class="itemTitle">保存原图</text> <text class="itemTitle">保存原图</text>
......
...@@ -25,7 +25,7 @@ exports.main = async (event, context) => { ...@@ -25,7 +25,7 @@ exports.main = async (event, context) => {
}) })
.done(), .done(),
as: 'imageList' as: 'imageList'
}).end() }).match({"classify_id": event.classify_id, "system_id": event.system_id, "brand_id": event.brand_id}).end()
const watermarkC = uniCloud.database().collection("user_watermark").field({'_id': false}) const watermarkC = uniCloud.database().collection("user_watermark").field({'_id': false})
let userWatermark = await watermarkC.where({ let userWatermark = await watermarkC.where({
user_id: user_id, user_id: user_id,
......
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