Commit 2ce6b814 authored by 罗超's avatar 罗超

2

parent 7e495175
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
color: #4C50E7;" @click="jumpGarden(item.Id)">查看更多</text> color: #4C50E7;" @click="jumpGarden(item.Id)">查看更多</text>
</view> </view>
<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" :id="'img'+index1"
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,${item1.bgcolor},${item1.bgcolor1} , ${item1.bgcolor2})` }"> <view class="gardenTextBox" :style="{'background':`linear-gradient(to bottom,${item1.bgcolor},${item1.bgcolor1} , ${item1.bgcolor2})` }">
<view class="gardenTitle one_line"> <view class="gardenTitle one_line">
...@@ -207,7 +207,8 @@ ...@@ -207,7 +207,8 @@
}) })
}, },
async getColor(src,index,y) { async getColor(src,index,y) {
let res = await getImageColor('myCanvas', 'img', src) let res = await getImageColor('myCanvas', 'img'+index, src)
console.log(index,res)
let obj={} let obj={}
obj.formatres = `rgba(${res.r},${res.g},${res.b},0.01)` obj.formatres = `rgba(${res.r},${res.g},${res.b},0.01)`
obj.formatres1 = `rgba(${res.r},${res.g},${res.b},0.6)` obj.formatres1 = `rgba(${res.r},${res.g},${res.b},0.6)`
......
...@@ -114,13 +114,14 @@ ...@@ -114,13 +114,14 @@
if(options.ChapterId&&options.CourseId&&options.PrevChapterId){ if(options.ChapterId&&options.CourseId&&options.PrevChapterId){
this.getData() this.getData()
} }
const userInfo = uni.getStorageSync('userinfo'); const userInfo = uni.getStorageSync('userInfo');
this.readMsg.Stu_Account_Id = userInfo.AccountId??0 this.readMsg.Stu_Account_Id = userInfo.Id??0
this.readMsg.CourseId = options.CourseId??0 this.readMsg.CourseId = options.CourseId??0
this.readMsg.ChapterId = options.ChapterId??0 this.readMsg.ChapterId = options.ChapterId??0
this.reviewMsg.Stu_Account_Id = userInfo.AccountId??0 this.reviewMsg.Stu_Account_Id = userInfo.Id??0
this.reviewMsg.CourseId = options.CourseId??0 this.reviewMsg.CourseId = options.CourseId??0
this.reviewMsg.ChapterId = options.ChapterId??0 this.reviewMsg.ChapterId = options.ChapterId??0
console.log(124,userInfo.Id)
}, },
} }
</script> </script>
......
...@@ -222,7 +222,6 @@ export let isLogin = () => { ...@@ -222,7 +222,6 @@ export let isLogin = () => {
} }
} }
export let getImageColor = async (canvasID, imgID, imgSrc) => { export let getImageColor = async (canvasID, imgID, imgSrc) => {
let res = { let res = {
r: 1, r: 1,
g: 1, g: 1,
......
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