sub_pages/customer/self/history.vue
@@ -26,6 +26,7 @@
      },
      onLoad() {
         this.listApi = '/api/browse/history/list'
         this.page.size =30
         this.getList()
         this.$http.request('get', '/api/code/value', {
@@ -55,6 +56,23 @@
         })
      },
      methods: {
         async deleteExpired() {
            await this.$message.confirm('是否清空已失效的商品')
            this.$message.showLoading()
            const {
               code
            } = await this.$http.request('post', '/api/browse/history/clear', {
               data: {
               }
            })
            this.$message.hideLoading()
            if (code === 0) {
               this.refreshList()
            }
         },
         toDetail(item) {
            if (item.status == 'UP') {
@@ -179,6 +197,10 @@
               {{ query.levelStr || '级别' }}
               <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>
            </view>
            <view class="flex1" @click="deleteExpired()">
               一键清空已失效
               <!-- <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image> -->
            </view>
         </view>
      </view>