WeChat Mini Programs: multiple view bindings with the same click event point all changed how to do?

how to change the status of the current icon when clicked

<view class="audiobox" wx:for="{{data}}">
<image  bindtap="audioPlay" src="{{playState}}" ></image>

js part

audioPlay(e) {

        this.setData({
            playState: "https://wxapp.xxx.cn/image/pause.png",
            autoplay: true
          })              
  }


add an dataset, to each view, such as: data-index, and then add the selected style


this is a code snippet I did earlier, based on the value of the current index. The implementation is the same as what was said above.
https://developers.weixin.qq.com/s/TqV4Onm27U3D


add a field to each piece of data data. The content is true or false to determine which picture to display or directly add a picture address field. Click to change the picture address of this data

< hr. When class= "answer" >

for cycle, give him each data-videoid= {{item.id}} on the corresponding view, and then get the corresponding id and then switch the status to him.


fortunately, there are only two switching states. And the picture is fixed, and there are no other methods. Now I use ternary judgment directly in src

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e8697d-46bce.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e8697d-46bce.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?