liukangdong
2024-07-24 a63f26976652d1fc99de766a324c151501573d78
‘’
已修改17个文件
197 ■■■■ 文件已修改
wechat_staff/api/index.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/components/detailFooter/index.js 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/components/detailFooter/index.wxml 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/components/disCase/index.wxml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/components/disRealpic/index.wxml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/detailDis/case.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/detailDis/case.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/detailDis/product.js 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/detailDis/product.wxml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/detailDis/realpic.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/detailDis/realpic.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/fond.js 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/fond.less 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/fond.wxml 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/fond.wxss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/project.private.config.json 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/utils/config.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/api/index.js
@@ -256,6 +256,14 @@
    data
  })
}
// 获取内容分享海报
export const getContentShareImg = (data) => {
  return request({
    url: '/web/personnel/getContentShareImg',
    method: 'POST',
    data
  })
}
// 0元定制信息
export const saveFreeCustomizationApply = (data) => {
  return request({
wechat_staff/components/detailFooter/index.js
@@ -1,10 +1,11 @@
// components/detailFooter/index.js
import { getContentShareImg } from '../../api/index'
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    info: Object,
    path: String,
  },
  /**
@@ -21,6 +22,28 @@
    })
  },
  methods: {
    handleEnjoy() {
      const { info } = this.data
      this.triggerEvent('enjoy', {
        type: 'enjoy', flag: !info.isEnjoy
      })
    },
    handleCollec() {
      const { info } = this.data
      this.triggerEvent('enjoy', {
        type: 'collec', flag: !info.isCollection
      })
    },
    handleDown() {
      const { info, path } = this.data
      getContentShareImg({
        articleId: info.id,
        type: '1',
        pageUrl: path,
        imgurl: info.coverImage,
      })
    },
    openShare() {
      console.log('点击打开');
      this.setData({ showShare: true })
wechat_staff/components/detailFooter/index.wxml
@@ -2,15 +2,17 @@
  <view class="footer_wrap" style="padding-bottom: {{bottomLift}}px;">
    <view class="content">
      <view class="btns">
        <view class="item">
          <image src="../../static/icon/detail_nav_like_sel@2x.png"></image>
        <view bindtap="handleEnjoy" class="item">
          <image wx:if="{{ info.isEnjoy }}" src="../../static/icon/detail_nav_like_sel@2x.png"></image>
          <image wx:else src="../../static/icon/detail_nav_like@2x.png"></image>
          <text>喜欢</text>
        </view>
        <view class="item">
          <image src="../../static/icon/detail_nav_collected.png"></image>
        <view bindtap="handleCollec" class="item">
          <image wx:if="{{ info.isCollection }}" src="../../static/icon/detail_nav_collected.png"></image>
          <image wx:else src="../../static/icon/detail_nav_collect.png"></image>
          <text>收藏</text>
        </view>
        <view class="item">
        <view bindtap="handleDown" class="item">
          <image src="../../static/icon/detail_nav_download@2x.png"></image>
          <text>下载</text>
        </view>
@@ -19,7 +21,7 @@
    </view>
  </view>
  <!--  -->
  <view class="shade_modal" style="padding-bottom: {{bottomLift}}px;">
  <view wx:if="{{ showShare }}" class="shade_modal" style="padding-bottom: {{bottomLift}}px;">
    <view class="btns">
      <button open-type="share" class="item" bindtap="handleShare">
        <image src="../../static/icon/wechat.png"></image>
@@ -32,5 +34,5 @@
    </view>
    <view bindtap="onClose" class="cancel">取消</view>
  </view>
  <view class="shade" bindtap="onClose"></view>
  <view wx:if="{{ showShare }}" class="shade" bindtap="onClose"></view>
</view>
wechat_staff/components/disCase/index.wxml
@@ -44,9 +44,9 @@
          <view class="content">
            <view class="name">{{ item.title }}</view>
            <view class="info">
              <image wx:if="{{ !item.collection }}" data-code="like" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
              <image wx:if="{{ !item.isCollection }}" data-code="like" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
              <image wx:else data-code="like_cancel" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
              <text class="num {{item.collection ? 'primary' : ''}}">{{ item.collectCount }}</text>
              <text class="num {{item.isCollection ? 'primary' : ''}}">{{ item.collectCount }}</text>
              <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
              <text>{{ item.viewCount }}</text>
            </view>
wechat_staff/components/disRealpic/index.wxml
@@ -51,9 +51,9 @@
            <view class="name">{{ item.title }}</view>
          </view>
          <view class="info">
            <image wx:if="{{ !item.collection }}" data-code="like" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
            <image wx:if="{{ !item.isCollection }}" data-code="like" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
            <image wx:else data-code="like_cancel" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
            <text class="num {{item.collection ? 'primary' : ''}}">{{ item.collectCount }}</text>
            <text class="num {{item.isCollection ? 'primary' : ''}}">{{ item.collectCount }}</text>
            <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
            <text>{{ item.viewCount }}</text>
          </view>
wechat_staff/pages/detailDis/case.js
@@ -56,7 +56,7 @@
      actionType,
      id: this.data.info.id
    }).then(res => {
      info.collection = !info.collection
      info.isCollection = !info.isCollection
      this.setData({info})
      wx.showToast({
        title: actionType == 'collect' ? '收藏成功' : '取消收藏',
wechat_staff/pages/detailDis/case.wxml
@@ -26,7 +26,7 @@
  <view class="footer" style="padding-bottom: {{bottomLift}}px;">
    <view class="btns">
      <button class="item btn">
        <image data-code="collect_cancel" bindtap="handleAction" wx:if="{{ info.collection }}" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
        <image data-code="collect_cancel" bindtap="handleAction" wx:if="{{ info.isCollection }}" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
        <image wx:else data-code="collect" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
        <view class="name">收藏</view>
      </button>
wechat_staff/pages/detailDis/product.js
@@ -3,6 +3,7 @@
  getProductInfo,
  actionDo
} from '../../api/index'
import moment from "moment";
Page({
  /**
   * 页面的初始数据
@@ -33,6 +34,43 @@
      member
    })
  },
  //  组件事件
  handleEnjoy(e) {
    const enjoyList = wx.getStorageSync('enjoyList') || []
    const { type, flag } = e.detail
    console.log('type', type);
    console.log('flag', flag);
    const info = this.data.info
    if(type == 'enjoy'){
      // 点击了喜欢
      const index = enjoyList.findIndex( i => i.id === info.id )
      if(index === -1){
        info.isEnjoy = true
        this.setData({ info })
        enjoyList.push({
          ...info,
          joinType: 'product',
          timestamp: new Date().getTime()
        })
      }else{
        info.isEnjoy = false
        this.setData({ info })
        enjoyList.splice(index, 1)
      }
      wx.setStorageSync('enjoyList', enjoyList)
    }else{
      actionDo({
        id: info.id,
        actionType: flag ? 'collect' : 'collect_cancel'
      }).then(res => {
        info.isCollection = flag
        wx.showToast({title: flag ? '收藏成功' : '取消收藏'})
        this.setData({
          info
        })
      })
    }
  },
  handleAction(e) {
    const actionType = e.currentTarget.dataset.code
    const {
@@ -42,7 +80,7 @@
      actionType,
      id: this.data.info.id
    }).then(res => {
      info.collection = !info.collection
      info.isCollection = !info.isCollection
      this.setData({
        info
      })
@@ -51,12 +89,20 @@
      })
    })
  },
  onShareAppMessage() {
    console.log('用户点击了分享');
  },
  getDetail(id) {
    const enjoyList = wx.getStorageSync('enjoyList') || []
    getProductInfo({
      id
    }).then(res => {
      const index = enjoyList.findIndex( i => i.id === res.data.id )
      this.setData({
        info: res.data
        info: {
          ...res.data,
          isEnjoy: index > -1
        }
      })
      wx.setNavigationBarTitle({
        title: res.data.title
wechat_staff/pages/detailDis/product.wxml
@@ -1,14 +1,6 @@
<view class="main_app">
  <buoyClient showPurpose="1" />
  <detailFooter />
  <view class="user" wx:if="{{ false }}">
    <view class="avatar"></view>
    <view class="content">
      <view class="name">丁梓林</view>
      <view class="desc">导购|5年经验</view>
    </view>
    <view class="btn">联系TA</view>
  </view>
  <detailFooter bindenjoy="handleEnjoy" path="/pages/detailDis/product" info="{{info}}" />
  <!-- banner轮播 -->
  <swiper class="banner_swiper" circular indicator-dots autoplay style="height:{{bannerHeight}}rpx" duration>
    <block wx:for="{{ info.bannerImgList }}">
@@ -38,7 +30,7 @@
    </view>
  </view>
  <!-- 富文本 -->
  <view>
  <view wx:if="{{info.content}}">
    <mp-html content="{{info.content}}"></mp-html>
  </view>
  <view class="spaceList">
wechat_staff/pages/detailDis/realpic.js
@@ -35,7 +35,7 @@
      actionType,
      id: this.data.info.id
    }).then(res => {
      info.collection = !info.collection
      info.isCollection = !info.isCollection
      wx.showToast({
        title: actionType == 'collect' ? '收藏成功' : '取消收藏',
      })
wechat_staff/pages/detailDis/realpic.wxml
@@ -14,7 +14,7 @@
  <view class="footer" style="padding-bottom: {{bottomLift}}px;">
    <view class="btns">
      <button class="item btn">
        <image data-code="collect_cancel" bindtap="handleAction" wx:if="{{ info.collection }}" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
        <image data-code="collect_cancel" bindtap="handleAction" wx:if="{{ info.isCollection }}" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
        <image wx:else data-code="collect" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
        <view class="name">收藏</view>
      </button>
wechat_staff/pages/kefu/fond.js
@@ -1,11 +1,12 @@
// pages/kefu/fond.js
import moment from "moment";
Page({
  /**
   * 页面的初始数据
   */
  data: {
    bottomLift: 0
    bottomLift: 0,
    enjoyList: []
  },
  /**
@@ -16,11 +17,35 @@
    this.setData({
      bottomLift: app.bottomLift
    })
    this.initData()
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  initData() {
    let temp = []
    let enjoyList = wx.getStorageSync('enjoyList') || []
    enjoyList = enjoyList.sort((a,b)=>{
      return b.timestamp - a.timestamp
    })
    enjoyList.forEach(item  => {
      item.joinDate = moment(item.timestamp).format('YYYY年MM月DD日')
      item.joinTime = moment(item.timestamp).format('HH:mm')
      item.checked = false
      const index = temp.findIndex( i => i.joinDate === item.joinDate )
      if(index === -1){
        temp.push({
          joinDate: item.joinDate,
          list: [item]
        })
      }else{
        temp[index].list.push(item)
      }
    });
    this.setData({ enjoyList: temp })
    console.log('enjoyList', temp);
  },
  onReady() {
  },
wechat_staff/pages/kefu/fond.less
@@ -50,7 +50,6 @@
      border-radius: 8rpx;
      margin-left: 26rpx;
      margin-right: 20rpx;
      border: 1px solid;
    }
  }
}
wechat_staff/pages/kefu/fond.wxml
@@ -1,14 +1,14 @@
<view class="container">
  <view class="date_item">
    <view class="date">2024年07月10日</view>
  <view wx:for="{{ enjoyList }}" wx:for-item="day" class="date_item">
    <view class="date">{{ day.joinDate }}</view>
    <view class="list">
      <view class="line">
        <image class="icon" src="../../static/icon/ic_select_sel@2x.png" mode="widthFix"></image>
        <image class="icon" src="../../static/icon/ic_select@2x.png" mode="widthFix"></image>
        <image class="img" src=""></image>
      <view class="line" wx:for="{{ day.list }}" wx:for-item="item">
        <image wx:if="{{ item.check }}" class="icon" src="../../static/icon/ic_select_sel@2x.png" mode="widthFix"></image>
        <image wx:else class="icon" src="../../static/icon/ic_select@2x.png" mode="widthFix"></image>
        <image class="img" src="{{ item.coverImage }}" mode="aspectFill"></image>
        <view class="content">
          <view class="name">简约轻奢|万科公园里,已光为媒简约轻奢|万科公园里,已光为媒简约轻奢|万科公园里,已光为媒</view>
          <view class="time">18:00</view>
          <view class="name">{{ item.title }}</view>
          <view class="time">{{ item.joinTime }}</view>
        </view>
      </view>
    </view>
wechat_staff/pages/kefu/fond.wxss
@@ -50,7 +50,6 @@
  border-radius: 8rpx;
  margin-left: 26rpx;
  margin-right: 20rpx;
  border: 1px solid;
}
.footer {
  position: fixed;
wechat_staff/project.private.config.json
@@ -31,8 +31,8 @@
        },
        {
          "name": "",
          "pathName": "pages/promotion/index",
          "query": "",
          "pathName": "pages/detailDis/product",
          "query": "id=1813372914895843329",
          "launchMode": "default",
          "scene": null
        },
@@ -42,6 +42,13 @@
          "query": "",
          "launchMode": "default",
          "scene": null
        },
        {
          "name": "",
          "pathName": "pages/kefu/fond",
          "query": "",
          "launchMode": "default",
          "scene": null
        }
      ]
    }
wechat_staff/utils/config.js
@@ -1,7 +1,7 @@
// export const baseUrl = 'http://192.168.0.135:10027'
export const baseUrl = 'https://dmtest.ahapp.net/web_interface' // 本地
export const baseUrl = 'http://192.168.0.135:10027'
// export const baseUrl = 'https://dmtest.ahapp.net/web_interface' // 本地
// export const baseUrl = 'http://zbtest.ahapp.net/zbom_interface/jx/wechat/' //测试服务器
// export const imageUrl = 'https://osswebcdn.zbom.com/jiaxuan/images/'