点赞功能

This commit is contained in:
cc_zbp 2023-06-01 16:38:35 +08:00
parent 87092eb46f
commit 2adf635cb1
7 changed files with 703 additions and 656 deletions

View File

@ -9,8 +9,8 @@ let httpApiThree
// 网络接口修改此字符 小程序域名要求https
// let httpApi = 'http://192.168.31.110:8324' // 测试
if (process.env.NODE_ENV === "development") {
// httpApi = "https://crmeb-test.shop.lihaink.cn"
httpApi = "http://192.168.0.109:8325"
httpApi = "https://crmeb-test.shop.lihaink.cn"
// httpApi = "http://192.168.0.109:8325"
// #ifdef MP-WEIXIN
httpApiTwo = "http://cms.com"
httpApiThree = 'http://ceshi-oa.lihaink.cn'

View File

@ -36,7 +36,8 @@
<text class="text">提现管理</text>
</view>
<view class="examine" @click="navigator(`/pages/nongKe/teach_video/teach_video`)">
<image class="icon_img" :src="`${prefix}txgl.png`" mode="aspectFill">
<image class="icon_img" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/spjs.png"
mode="aspectFill">
</image>
<text class="text">视频教学</text>
</view>

View File

@ -167,8 +167,14 @@
graphicStartApi(item.community_id, {
status: status
}).then(res => {
Toast(res.message)
this.getGoods()
if (item.relevance_id) {
item.count_start--;
item.count_start = item.count_start == 0 ? 0 : item.count_start
item.relevance_id = false
} else {
item.count_start++;
item.relevance_id = true
}
})
},
dianji() {

View File

@ -2,8 +2,7 @@
<view class="select_warehouse">
<view class="wrapper flex_a_c_j_sb">
<block v-for="item in goodsData" :key="item.name">
<view class="select_item" @click="navigato(item.type)"
:style="{'background-image': `url(${item.src})`}">
<view class="select_item" @click="navigato(item.type)" :style="{'background-image': `url(${item.src})`}">
<view class="title">{{ item.name }}</view>
<view class="iconfont icon-jiantou"></view>
</view>
@ -48,11 +47,9 @@
<u-popup :show="searchGoodsShow" @close="searchGoodsClose" :round="18" mode="center">
<view class="search_goods_box">
<input type="text" v-model="searchGoodsName" class="searchGoods" placeholder="请输入商品名称">
<view class="edit_goods_btn">
<u-button type="error" text="取消" class="edit_btn" @click="searchGoodsShow=false">
</u-button>
<u-button type="primary" text="搜索" class="edit_btn" @click="searchGoodsClose">
</u-button>
<view class="search_goods_btn">
<view class="cancel edit_btn" @click="searchGoodsShow=false">取消</view>
<view class="search edit_btn" @click="searchGoodsClose">搜索</view>
</view>
</view>
</u-popup>
@ -301,14 +298,27 @@
margin: 21.05rpx 0;
}
.edit_goods_btn {
.search_goods_btn {
margin-top: 28.07rpx;
display: flex;
justify-content: space-between;
.edit_btn {
color: #fff;
border-radius: 8px;
text-align: center;
line-height: 70.18rpx;
height: 70.18rpx;
width: 210.53rpx;
}
.cancel {
background-color: $u-error;
}
.search {
background-color: $u-primary;
}
}
}

View File

@ -467,6 +467,21 @@
},
onReady() {},
methods: {
giveStart(item) {
let status = item.relevance_id ? 0 : 1
graphicStartApi(item.community_id, {
status: status
}).then(res => {
if (item.relevance_id) {
item.count_start--;
item.count_start = item.count_start == 0 ? 0 : item.count_start
item.relevance_id = false
} else {
item.count_start++;
item.relevance_id = true
}
})
},
gogogo(item) {
this.videoID = item.community_id
this.navTap(1)

View File

@ -422,6 +422,21 @@
},
onReady: function() {},
methods: {
giveStart(item) {
let status = item.relevance_id ? 0 : 1
graphicStartApi(item.community_id, {
status: status
}).then(res => {
if (item.relevance_id) {
item.count_start--;
item.count_start = item.count_start == 0 ? 0 : item.count_start
item.relevance_id = false
} else {
item.count_start++;
item.relevance_id = true
}
})
},
//#ifdef MP
videoShare(item) {
if (item && item.status == 1) {

View File

@ -53,10 +53,10 @@
class="g_img"></image>
<view class="g_name">{{item.author}}</view>
</view>
<view class="nice_box" @click.stop="giveStart(item)">
<!-- <view class="nice_box" @click.stop="giveStart(item)">
<text class="iconfont" :class="item.relevance_id ? 'icon-shoucang1' : 'icon-dianzan'"></text>
<text class="collect">{{item.count_start}}</text>
</view>
</view> -->
</view>
</view>
</view>