ll
liukangdong
2024-08-15 ebc6e7ee67f13e7aa311e737dfcb4c5caed112ee
ll
已修改8个文件
144 ■■■■ 文件已修改
wechat_jiaxuan/pages/auth/auth.js 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/detailDis/case.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/detailDis/product.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/detailDis/realpic.js 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/api/index.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/download/index.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/select.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/promotion/index.js 93 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/auth/auth.js
@@ -9,6 +9,7 @@
   */
  data: {
    agreementFalg: false,
    tempPath: '',
    primary: '',
    bottomLift: 0,
@@ -75,10 +76,9 @@
          phone: res.data
        }).then((res) => {
          if (res.code == 200) {
            const tempPath = wx.getStorageSync('tempPath') || ''
            const { tempPath } = this.data
            wx.setStorageSync('member', res.data)
            if (tempPath) {
              wx.setStorageSync('tempPath', '')
              if (tempPath == '/pages/webView/index') {
                wx.navigateTo({
                  url: '/pages/webView/index',
@@ -129,23 +129,22 @@
  },
  onLoad(options) {
    var app = getApp().globalData
    this.setData({
      primary: app.primary
    })
    this.initData()
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
    const tempPath = wx.getStorageSync('tempPath') || ''
    this.setData({tempPath})
    setTimeout(() => {
      wx.setStorageSync('tempPath', '')
    })
  },
wechat_jiaxuan/pages/detailDis/case.js
@@ -82,9 +82,15 @@
      info
    } = this.data
    console.log('点击了分享')
    if(info.users && info.users.id){
    return {
      path: '/pages/detailDis/case?id=' + info.id + '&userId=' + info.users.id
    }
    }else{
      return {
        path: '/pages/detailDis/case?id=' + info.id
      }
    }
  },
  handleAction(e) {
    const actionType = e.currentTarget.dataset.code
wechat_jiaxuan/pages/detailDis/product.js
@@ -167,9 +167,15 @@
  onShareAppMessage: function () {
    let { info } = this.data
    console.log('点击了分享')
    if(info.users && info.users.id){
    return {
      path: '/pages/detailDis/product?id=' + info.id + '&userId=' + info.users.id
    }
    }else{
      return {
        path: '/pages/detailDis/product?id=' + info.id
      }
    }
  },
  onClose() {
    this.setData({
wechat_jiaxuan/pages/detailDis/realpic.js
@@ -149,13 +149,6 @@
    //   this.setData({showShare: false})
    // })
  },
  // onShareAppMessage: function () {
  //   // let { productDetail, userInfo } = this.data
  //   return {
  //     title: productDetail.title,
  //     path: '/pages/index/index?id=' + productDetail.id + '&shareuserid=' + userInfo.id + '&type=0'
  //   }
  // },
  onClose() {
    this.setData({
      showShare: false
@@ -214,8 +207,14 @@
      info
    } = this.data
    console.log('点击了分享')
    if(info.users && info.users.id){
    return {
      path: '/pages/detailDis/realpic?id=' + info.id + '&userId=' + info.users.id
    }
    }else{
      return {
        path: '/pages/detailDis/realpic?id=' + info.id
      }
    }
  },
})
wechat_staff/api/index.js
@@ -82,7 +82,8 @@
export const saveShareRecord = (data) => {
  return request({
    url: '/web/customer/saveShareRecord?id='+data,
    data
    data,
    loading: '0'
  })
}
// 产品视频
wechat_staff/pages/download/index.js
@@ -121,6 +121,10 @@
                }
              },
              fail(err) { 
                item.paddingStatus = 4
                that.setData({
                  downloadList
                })
                wx.showToast({
                  title: '图片下载失败',icon: 'none'
                })
wechat_staff/pages/kefu/select.js
@@ -41,7 +41,7 @@
      customer
    } = this.data
    const enjoyList = wx.getStorageSync('enjoyList') || []
    if (!customer.customerId) return wx.showToast({
    if (!customer.platSourceId) return wx.showToast({
      title: '请先选择要关联的客户',
      icon: 'none'
    })
wechat_staff/pages/promotion/index.js
@@ -1,4 +1,7 @@
import { newsPage,saveShareRecord } from '../../api/index'
import {
  newsPage,
  saveShareRecord
} from '../../api/index'
import moment from "moment";
Page({
@@ -19,20 +22,28 @@
    this.getList()
  },
  getList() {
    newsPage({capacity:this.data.capacity,
    newsPage({
        capacity: this.data.capacity,
      page:this.data.page,
      model:{type:0}})
        model: {
          type: 0
        }
      })
      .then(res =>{
        wx.stopPullDownRefresh()
        if(this.data.page ==1){
          this.setData({list:[]})
          this.setData({
            list: []
          })
        }
        if(this.data.page == res.data.page){ 
          res.data.records.forEach(element => { 
            element.createDate = moment(element.createDate).format("yyyy/MM/DD")  
          })
          this.setData({list: [...this.data.list, ...res.data.records || []],
            total:res.data.total})
          this.setData({
            list: [...this.data.list, ...res.data.records || []],
            total: res.data.total
          })
        }          
        console.log(this.data)
    }) 
@@ -49,9 +60,15 @@
  },
  onReachBottom() {
    console.log('触底事件');
    const { total, list, page } = this.data
    const {
      total,
      list,
      page
    } = this.data
    if(total > list.length){
      this.setData({ page: page + 1 })
      this.setData({
        page: page + 1
      })
      this.getList()
    }else{
      wx.showToast({
@@ -83,8 +100,10 @@
  downloadImageFileDo(files,title){
    wx.showLoading({
      title: '正在下载',
      mask: true
    })
   let temp = 0;
    let count = 0;
    if(files.length){
      for(let i = 0;i<files.length;i++){        
        let filePath = wx.env.USER_DATA_PATH + '/' + new Date().valueOf()+i + '.jpg'  ;
@@ -98,9 +117,11 @@
              filePath: tempFp,
              success(result) {
                temp ++;
                console.log(result)
                count++;
                if (count == files.length) {
                  wx.hideLoading()
                }
                if(temp == files.length){
                    wx.hideLoading();
                    wx.setClipboardData({
                      data:  title,
                      success: function (res) {
@@ -114,25 +135,42 @@
                      }
                    })
                } 
              }, fail(err) {
              },
              fail(err) {
                count++;
                if (count == files.length) {
                  wx.hideLoading()
                }
                wx.showToast({
                  title: '图片下载失败哦'
                })
              }
            })
          } , fail(err) {
          },
          fail(err) {
            count++;
            if (count == files.length) {
              wx.hideLoading()
            }
            wx.showToast({
              title: '图片下载失败哦'
            })
          }
        })
      } 
    }else{
      wx.showToast({
        title: '该资讯暂无可分享的图片或视频',
        icon: 'none'
      })
    } 
  },
  downloadVideoFileDo(files,title){
    wx.showLoading({
      title: '正在下载',
      mask: true
    }) 
    let count = 0;
    if(files.length){  
      let filePath = wx.env.USER_DATA_PATH + '/' + new Date().valueOf() + '0.mp4';
      wx.downloadFile({
@@ -144,8 +182,10 @@
          wx.saveVideoToPhotosAlbum({
            filePath: tempFp,
            success(result) { 
              console.log(result)
                  wx.hideLoading();
              count++;
              if (count == files.length) {
                wx.hideLoading()
              }
                  wx.setClipboardData({
                    data:  title,
                    success: function (res) {
@@ -158,13 +198,32 @@
                      })
                    }
                }) 
            }, fail(err) {
            },
            fail(err) {
              count++;
              if (count == files.length) {
                wx.hideLoading()
              }
              wx.showToast({
                title: '视频下载失败哦'
              })
            }
          })
        },
        fail(err) {
          count++;
          if (count == files.length) {
            wx.hideLoading()
        } 
          wx.showToast({
            title: '视频下载失败哦'
          })
        }
      })
    }else{
      wx.showToast({
        title: '该资讯暂无可分享的图片或视频',
        icon: 'none'
      }) 
    } 
  },
@@ -187,7 +246,9 @@
   */
  onPullDownRefresh() {
    console.log('下拉刷新')  
    this.setData({ page: 1 })
    this.setData({
      page: 1
    })
    this.getList() 
  },