index.wxml
<view class='btn_01'>
<image src="{
{favor_img}}" bindtap="dianzan" wx:if="{
{liked==1}}" mode="widthFix"></image>
<image src="{
{favor_img2}}" bindtap="dianzan" wx:else mode="widthFix"></image>
<view class='title'>{
{liked_num}}</view>
</view>
index.js
// 点赞
dianzan: function (event) {
var that = this;
// console.log(id);
// console.log(app.globalData.userInfo);
// 已经授权---执行点赞
console.log('点赞中获取number' + that.data.number);
var liked_num = that.data.liked_num;
// console.log("点击了同意授权");
var that = this
wx.request({
url: 'https://xxxxx/video/like',
data: {