123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- Component({
- properties: {
- },
- data: {
- open: false
- },
- methods: {
- show(e) {
- if (e.length == 0) return wx.showToast({
- title: '该版本数据为空',
- icon: "none",
- mask: true
- })
- let list = [];
- e.forEach(v => {
- let index = list.findIndex(s => s.systemclient == v.systemclient)
- if (index == -1) {
- if (v.systemclient == "wechatsaletool") {
- list.push({
- name: "小程序",
- systemclient: "wechatsaletool",
- list: [v]
- })
- } else if (v.systemclient == "web") {
- list.push({
- name: "Web",
- systemclient: "web",
- list: [v]
- })
- } else {
- list.push({
- name: v.systemclient,
- systemclient: v.systemclient,
- list: [v]
- })
- }
- } else {
- list[index].list.push(v)
- }
- })
- this.setData({
- open: true,
- activeKey: 0,
- list
- })
- },
- onChange({
- detail
- }) {
- this.setData({
- activeKey: detail
- })
- },
- onClose() {
- this.setData({
- open: false,
- list: [],
- activeKey: 0,
- })
- }
- }
- })
|