日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

在微信小程序上,帮助中心界面实现类似手风琴案例

發布時間:2025/3/21 编程问答 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 在微信小程序上,帮助中心界面实现类似手风琴案例 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

在微信小程序上,幫助中心界面實現類似手風琴案例

wxml

<view class="container"><block wx:for="{{arrdata}}" wx:key="index"><view class="centent_title" data-index="{{index}}" bindtap="onOpen"><view class="title" >{{item.name}}?</view><image wx:if="{{item.isTrue==true}}" src="/public/orther_img/ic_down.png"></image><image wx:if="{{item.isTrue==false}}" src="/public/orther_img/ic_top.png"></image></view><view class="content_detail" wx:if="{{item.isTrue}}"><text>{{item.content}}</text></view></block> </view>

wxss

/**index.wxss**/ .container {width: 100%;height: 100%;background-color: #ffffff; } .centent_title{width: 100%;height: 80rpx;line-height: 80rpx;display: flex;justify-content: space-between;align-items: center;border-bottom: 2rpx solid #eeeeee; } .title{font-size: 24rpx;color: #999999;margin-left: 30rpx; } .centent_title image{width: 20rpx;height: 20rpx;margin-right: 30rpx; } .content_detail{padding: 20rpx;font-size: 24rpx;text-indent: 2em; }

js

const app = getApp() Page({/*** 頁面的初始數據*/data: {arrdata: [{id: 1,name: "如何下單",content:"點擊下單后,可以直接點擊加入購物車到購物車頁面,再直接點擊下單,微信支付付款即可;也可以直接點擊立即下單,微信支付付款即可",isTrue: false},{id: 2,name:"付款成功未結束訂單",content:"直接返回鍵回去看付款成功頁面,如付款成功頁面未顯示訂單,請聯系客服",isTrue: false},{id: 3,name: "為什么商品加入購物車了,購物車頁面卻看不到商品",content:"商品加入購物車了,購物車頁面卻看不到商品,可能商品點擊的時候未觸發按鈕,導致購物車頁面卻看不到商品,請重新進行一次下單操作",isTrue: false}],},onOpen(e) {this.selectedIndex = e.currentTarget.dataset.index;this.data.arrdata[this.selectedIndex].isTrue = !this.data.arrdata[this.selectedIndex].isTrue;this.setData({arrdata:this.data.arrdata})}, })

總結

以上是生活随笔為你收集整理的在微信小程序上,帮助中心界面实现类似手风琴案例的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。