From a6fe86c65c62fc136424ebdefd9df0dee4ac0dc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=81=86=E5=90=AC?= Date: Wed, 24 Oct 2018 18:02:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=9B=AE=E5=BD=95application?= =?UTF-8?q?/routine/view/crmebN/pages/product-pinke?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../view/crmebN/pages/product-pinke/index.js | 276 ------------------ .../crmebN/pages/product-pinke/index.json | 3 - .../crmebN/pages/product-pinke/index.wxml | 122 -------- .../crmebN/pages/product-pinke/index.wxss | 73 ----- 4 files changed, 474 deletions(-) delete mode 100644 application/routine/view/crmebN/pages/product-pinke/index.js delete mode 100644 application/routine/view/crmebN/pages/product-pinke/index.json delete mode 100644 application/routine/view/crmebN/pages/product-pinke/index.wxml delete mode 100644 application/routine/view/crmebN/pages/product-pinke/index.wxss diff --git a/application/routine/view/crmebN/pages/product-pinke/index.js b/application/routine/view/crmebN/pages/product-pinke/index.js deleted file mode 100644 index 247ceccf..00000000 --- a/application/routine/view/crmebN/pages/product-pinke/index.js +++ /dev/null @@ -1,276 +0,0 @@ -// pages/product-con/index.js -var app = getApp(); -var wxh = require('../../utils/wxh.js'); -var WxParse = require('../../wxParse/wxParse.js'); -Page({ - /** - * 页面的初始数据 - */ - data: { - url: app.globalData.urlImages, - num: 1, - description:"", - minusStatus: 'disabled', - storeInfo: [], - replyCount:0, - reply:[], - pinking:[], - pindAll:[], - indicatorDots: true,//是否显示面板指示点; - autoplay: true,//是否自动播放; - interval: 3000,//动画间隔的时间; - duration: 500,//动画播放的时长; - indicatorColor: "rgba(51, 51, 51, .3)", - indicatorActivecolor: "#ffffff", - show :false, - combinationId:0, - collect:false,//收藏 - CartCount:0,//购物车数量 - prostatus:false, - timeer: '', - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options){ - app.setBarColor(); - if (options.id){ - this.setData({ - combinationId: options.id - }) - this.getCombinationDetail(); - }else{ - wx.showToast({ - title: '参数错误', - icon: 'none', - duration: 1000, - }) - setTimeout(function(){ - wx.navigateTo({ - url: '/pages/pink-list/index', - }) - },1200) - } - }, - setTime: function () {//到期时间戳 - var that = this; - var newTime = new Date().getTime() / 1000; - var endTimeList = that.data.pinking; - var countDownArr = []; - for (var i in endTimeList) { - var endTime = endTimeList[i].stop_time; - var obj = []; - if (endTime - newTime > 0) { - var time = endTime - newTime; - var day = parseInt(time / (60 * 60 * 24)); - var hou = parseInt(time % (60 * 60 * 24) / 3600); - var min = parseInt(time % (60 * 60 * 24) % 3600 / 60); - var sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); - hou = parseInt(hou) + parseInt(day * 24); - obj = { - day: that.timeFormat(day), - hou: that.timeFormat(hou), - min: that.timeFormat(min), - sec: that.timeFormat(sec) - } - } else { - obj = { - day: '00', - hou: '00', - min: '00', - sec: '00' - } - that.getList(); - } - endTimeList[i].time = obj; - } - that.setData({ - pinking: endTimeList - }) - var timeer = setTimeout(that.setTime, 1000); - that.setData({ - timeer: timeer - }) - }, - timeFormat(param) {//小于10的格式化函数 - return param < 10 ? '0' + param : param; - }, - getCombinationDetail:function(){ - var that = this; - if (!that.data.combinationId){ - wx.showToast({ - title: '参数错误', - icon: 'none', - duration: 1000, - }) - setTimeout(function () { - wx.navigateTo({ - url: '/pages/pink-list/index', - }) - }, 1200) - } - wx.request({ - url: app.globalData.url + '/routine/auth_api/combination_detail?uid=' + app.globalData.uid, - data: { - id: that.data.combinationId - }, - method: 'GET', - dataType: 'json', - success: function(res) { - if(res.data.code == 200){ - that.setData({ - storeInfo: res.data.data.storeInfo, - description: res.data.data.storeInfo.description, - replyCount: res.data.data.replyCount, - reply: res.data.data.reply, - pinking: res.data.data.pink, - pindAll: res.data.data.pindAll, - collect:res.data.data.storeInfo.userCollect - }) - } - that.setTime(); - WxParse.wxParse('description', 'html', that.data.description, that, 0); - } - }) - }, - showList: function(){ - this.setData({ - show:true - }) - }, - close: function(){ - this.setData({ - show: false - }) - }, - goPink:function(e){ - console.log(e); - var pinkId = e.currentTarget.dataset.id; - wx.navigateTo({ - url: '/pages/join-pink/index?id=' + pinkId, - }) - }, - parameterShow: function(e){ - var that = this; - var pinkId = e.detail.value.pinkId; - wx.request({ - url: app.globalData.url + '/routine/auth_api/get_form_id?uid=' + app.globalData.uid, - method: 'GET', - data: { - formId: e.detail.formId - }, - success: function (res) { } - }) - wx.request({ - url: app.globalData.url + '/routine/auth_api/now_buy?uid=' + app.globalData.uid, - method: 'GET', - data: { - productId: that.data.storeInfo.product_id, - cartNum: that.data.num, - uniqueId: '', - combinationId: that.data.combinationId, - secKillId: 0 - }, - success: function (res) { - if (res.data.code == 200) { - if (pinkId) { - wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候) - url: '/pages/order-confirm/order-confirm?id=' + res.data.data.cartId + '&pinkId=' + pinkId - }) - } else { - wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候) - url: '/pages/order-confirm/order-confirm?id=' + res.data.data.cartId - }) - } - } else { - wx.showToast({ - title: res.data.msg, - icon: 'none', - duration: 2000 - }) - } - } - }) - }, - modelbg:function(e){ - this.setData({ - prostatus: false - }) - }, - bindMinus: function () { - var that = this; - wxh.carmin(that) - }, - bindPlus: function () { - var that = this; - wxh.carjia(that); - }, - setCollect: function () { - if (this.data.collect) this.unCollectProduct(); - else this.collectProduct(); - }, - unCollectProduct: function () { - var that = this; - wx.request({ - url: app.globalData.url + '/routine/auth_api/uncollect_product?uid=' + app.globalData.uid, - method: 'GET', - data: { - productId: that.data.combinationId, - category:'pink_product' - }, - success: function (res) { - wx.showToast({ - title: '取消收藏成功', - icon: 'success', - duration: 1500, - }) - that.setData({ - collect: false, - }) - } - }) - }, - collectProduct: function () { - var that = this; - wx.request({ - url: app.globalData.url + '/routine/auth_api/collect_product?uid=' + app.globalData.uid, - method: 'GET', - data: { - productId: that.data.combinationId, - category: 'pink_product' - }, - success: function (res) { - wx.showToast({ - title: '收藏成功', - icon: 'success', - duration: 1500, - }) - that.setData({ - collect: true, - }) - } - }) - }, - getCar: function () { - wx.switchTab({ - url: '/pages/buycar/buycar' - }); - }, - getCartCount: function () { - var that = this; - var header = { - 'content-type': 'application/x-www-form-urlencoded', - }; - wx.request({ - url: app.globalData.url + '/routine/auth_api/get_cart_num?uid=' + app.globalData.uid, - method: 'POST', - header: header, - success: function (res) { - that.setData({ - CartCount: res.data.data - }) - } - }) - }, -}) \ No newline at end of file diff --git a/application/routine/view/crmebN/pages/product-pinke/index.json b/application/routine/view/crmebN/pages/product-pinke/index.json deleted file mode 100644 index 74dabfff..00000000 --- a/application/routine/view/crmebN/pages/product-pinke/index.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "navigationBarTitleText": "拼团产品详情" -} \ No newline at end of file diff --git a/application/routine/view/crmebN/pages/product-pinke/index.wxml b/application/routine/view/crmebN/pages/product-pinke/index.wxml deleted file mode 100644 index e23a124d..00000000 --- a/application/routine/view/crmebN/pages/product-pinke/index.wxml +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - - - {{storeInfo.title}} - - - {{storeInfo.price}} - ¥{{storeInfo.product_price}} - - - - - - - {{pinking.length}}人在拼单,可直接参与 - 查看更多 - - - - - - - {{item.nickname}} - - - - 还差{{item.count}}人拼成 - 剩余{{item.time.hou}}:{{item.time.min}}:{{item.time.sec}} - -
- - -
- -
-
-
-
-
- - - - - 评价 - - - - 宝贝评价({{replyCount}}) - - - {{reply.comment}} - {{reply.add_time}} {{reply.suk}} - - 查看全部评价 - - - - - - - 详情 - - - -