Commit 73d1ad2b authored by Mac's avatar Mac

颜色修改

parent 4468ec30
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
<view class="gardenCon" v-for="(item1,index1) in item.List" :key="index1" id="img"> <view class="gardenCon" v-for="(item1,index1) in item.List" :key="index1" id="img">
<image :src="item1.Img" mode="aspectFill" <image :src="item1.Img" mode="aspectFill"
style="width: 100%;height:100%;border-radius: 24rpx 24rpx 0 0;"></image> style="width: 100%;height:100%;border-radius: 24rpx 24rpx 0 0;"></image>
<view class="gardenTextBox" :style="{'background':`linear-gradient(to bottom, rgb(255,255,255,0.3), ${item1.bgcolor})` }"> <view class="gardenTextBox" :style="{'background':`linear-gradient(to bottom,rgb(255,255,255,0) 0% ,${item1.bgcolor} , ${item1.bgcolor2}) ` }">
<view class="gardenTitle one_line"> <view class="gardenTitle one_line">
{{item1.Title}} {{item1.Title}}
</view> </view>
...@@ -200,6 +200,7 @@ ...@@ -200,6 +200,7 @@
console.log(v) console.log(v)
// item.bgcolor = v; // item.bgcolor = v;
data.pageData.LearningGardenList[v.y].List[v.index].bgcolor = v.formatres; data.pageData.LearningGardenList[v.y].List[v.index].bgcolor = v.formatres;
data.pageData.LearningGardenList[v.y].List[v.index].bgcolor2 = v.formatres2;
}) })
}) })
...@@ -212,7 +213,8 @@ ...@@ -212,7 +213,8 @@
async getColor(src,index,y) { async getColor(src,index,y) {
let res = await getImageColor('myCanvas', 'img', src) let res = await getImageColor('myCanvas', 'img', src)
let obj={} let obj={}
obj.formatres = `rgba(${res.r},${res.g},${res.b},1)` obj.formatres = `rgba(${res.r},${res.g},${res.b},0.4)`
obj.formatres2 = `rgba(${res.r},${res.g},${res.b},1)`
obj.index = index obj.index = index
obj.y = y obj.y = y
// console.log(168, formatres) // console.log(168, formatres)
......
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