diff --git a/components/diy_goodsGroup/diy_goodsGroup.js b/components/diy_goodsGroup/diy_goodsGroup.js index 93f9bf3..4cf2155 100644 --- a/components/diy_goodsGroup/diy_goodsGroup.js +++ b/components/diy_goodsGroup/diy_goodsGroup.js @@ -242,7 +242,7 @@ Component({ if (!user_id) user_id = 0; r_data.user_id = user_id; - await app.request.promiseGet("/api/weshop/goods/page?isnewwhere=1", { + await app.request.promiseGet("/api/weshop/goods/page", { data: r_data }).then(res => { th.data.loading = 0; @@ -471,7 +471,7 @@ Component({ prom_id = val.prom_id; - var prom_type = val.prom_type; //0普通商品 1秒杀 6拼单 2团购 4积分购 + var prom_type = item.prom_type; //0普通商品 1秒杀 6拼单 2团购 4积分购 var url = ""; @@ -518,7 +518,10 @@ Component({ var prom = null; if (res && res.data) prom = res.data.data; if (prom != null && prom.is_end == 0 && prom.end_time > now && (prom.start_time < now || (prom.show_time && prom.show_time < now))) { - item.prom_price = res.data.data.price; + item.prom_price = res.data.data.price; + console.log(res.data.data) + console.log('11111'); + if (res.data.data.user_price) item.prom_price = res.data.data.user_price; var vNum = res.data.data.virtual_num ? res.data.data.virtual_num : 0; var vNum1 = res.data.data.virtualNum ? res.data.data.virtualNum : 0; diff --git a/packageC/pages/presell/goodsInfo/goodsInfo.js b/packageC/pages/presell/goodsInfo/goodsInfo.js index d7feca2..d044818 100644 --- a/packageC/pages/presell/goodsInfo/goodsInfo.js +++ b/packageC/pages/presell/goodsInfo/goodsInfo.js @@ -589,7 +589,7 @@ Page({ } } } - + let length = fir_quan.length if (length <= 3) { arr = fir_quan @@ -3445,9 +3445,10 @@ Page({ tt(); return false; } - var img_url = ee.data.data.original_img; - //var img_url = ee.data.presellForm.share_img; - //img_url?img_url:ee.data.data.original_img; + + //var img_url = ee.data.data.original_img; + var img_url = ee.data.iurl+ee.data.presellForm.share_img; + img_url?img_url:ee.data.data.original_img; //获取商品是分享图信息 wx.getImageInfo({ diff --git a/packageE/pages/cart/cart2/cart2.js b/packageE/pages/cart/cart2/cart2.js index 5b53bb5..f4ee4c2 100644 --- a/packageE/pages/cart/cart2/cart2.js +++ b/packageE/pages/cart/cart2/cart2.js @@ -2189,7 +2189,7 @@ Page({ //--- 秒杀, 团购的时候,判断有没有订单优惠和包邮模板的叠加 --- if( [1,2,6].indexOf(item[jc].prom_type)>-1){ - if(!item[jc].is_order_yh){ + if(!item[jc].is_order_yh && !item[jc].whsle_id){ no_order_yh+=item[jc].goods_price * item[jc].goods_num; if(item[jc].quan_num) no_order_yh-=item[jc].quan_num; //券要把他补回去 @@ -2948,7 +2948,7 @@ Page({ var ord_prom = null; var is_ord_prom_post = 0; - if (condition > 0 && th.data.bn_is_order_yh) { + if (condition > 0 && th.data.bn_is_order_yh && !th.data.bn_goods.whsle_id) { await getApp().request.promiseGet("/api/weshop/promorder/getOrderPromotion", { data: { store_id: os.stoid, orderAmount: condition, user_id: getApp().globalData.user_id } }).then(res => { @@ -5502,7 +5502,7 @@ Page({ } } } - console.error('优惠活动1'); + //------------------- return getApp().request.promiseGet("/api/weshop/goods/getDiscount", { data: { @@ -5533,7 +5533,7 @@ Page({ //-- 看是不是有赠品 -- if (get_data.gift_id && parseInt(get_data.zp_mode) != 1 && get_data.zp_num * arr.bs <= get_data.limit_num - && get_data.zp_num * arr.bs <= get_data.gift_storecount + && get_data.zp_num * arr.bs <= get_data.gift_storecount && get_data.goodsinfo ) { arr.gift_id = get_data.gift_id; arr.gift_goods_id = get_data.goods_id; @@ -6016,6 +6016,9 @@ Page({ setexptype2: function (e) { + if(this.data.submit) return false; + this.setData({ submit: 1 }); + if(this.data.all_collocation_list){ var bn_coll= this.selectComponent('#bn_coll'); bn_coll.clear_sele(); @@ -6032,7 +6035,8 @@ Page({ setexptype_w2: function (e) { - + if(this.data.submit) return false; + this.setData({ submit: 1 }); for (let i = 0; i {{"数量:"+item.num}} - - - 已核销 - - - 未核销 - + + + 已核销 + + + 未核销 + diff --git a/pages/goods/goodsInfo/goodsInfo.wxml b/pages/goods/goodsInfo/goodsInfo.wxml index e9e1030..4f28081 100644 --- a/pages/goods/goodsInfo/goodsInfo.wxml +++ b/pages/goods/goodsInfo/goodsInfo.wxml @@ -88,7 +88,7 @@ {{djs.min}} - + {{djs.sec}} diff --git a/pages/goods/goodsList/goodsList.js b/pages/goods/goodsList/goodsList.js index 7dbbee3..dc63abb 100644 --- a/pages/goods/goodsList/goodsList.js +++ b/pages/goods/goodsList/goodsList.js @@ -291,10 +291,10 @@ Page({ if(!user_id) user_id=0; //不是商品分组的,不是默认排序的 - if(t.indexOf("group_id")==-1 ){ + // if(t.indexOf("group_id")==-1 ){ t += "&orderField=" + e.data.tabname; t += "&orderType=" + e.data.adname; - } + // } t +="&page=" + e.data.currentPage; wx.showLoading({}); @@ -498,8 +498,8 @@ Page({ go_url:function (e) { var url = e.currentTarget.dataset.url; - //var rq_data = JSON.stringify(this.data.rq_data); - //url += `&o=${rq_data}`; + var rq_data = JSON.stringify(this.data.rq_data); + url += `&o=${rq_data}`; // console.log('url!!!=======<<<<', url); getApp().goto(url); }, diff --git a/pages/goods/search/search.js b/pages/goods/search/search.js index cfaa24e..27e59dd 100644 --- a/pages/goods/search/search.js +++ b/pages/goods/search/search.js @@ -44,9 +44,23 @@ Page({ onLoad: function (t) { this.data.rq_data = t; + if (t.o) { this.data.rq_data.o = JSON.parse(t.o); }; + var req = t.o; + if(req.cat_id){ + var baseUrl= "/api/weshop/goods/page?isnewwhere=1&cat_id="+req.cat_id + this.setData({ baseUrl: baseUrl }); + } + if(req.nation_id){ + var baseUrl= "/api/weshop/goods/page?isnewwhere=1&nation_id="+req.nation_id + this.setData({ baseUrl: baseUrl }); + } + if(req.brand_id){ + var baseUrl= "/api/weshop/goods/page?isnewwhere=1&brand_id="+req.brand_id + this.setData({ baseUrl: baseUrl }); + } //接受有没有导购的参数 diff --git a/pages/index/index/index.js b/pages/index/index/index.js index 53bfc68..d0f064a 100644 --- a/pages/index/index/index.js +++ b/pages/index/index/index.js @@ -84,7 +84,7 @@ Page({ full_ad: null, //全屏广告 full_screen: 0, //全屏广告 is_ok_h5: 0, //判断要不要显示关注二维码 - + mb_banner:{},//首页广告 container: null, is_retail_price:0, }, @@ -669,6 +669,36 @@ Page({ }) let user_id = getApp().globalData.user_id; + //---首页广告------- + await getApp().request.promiseGet("/api/weshop/ad/page?pids=300,301,302,303,304&store_id=" + o.stoid, { + data: { + enabled: 1 + } + }).then(res => { + console.log('首页广告--------------------------'); + console.log(res); + if (res.data.code == 0 && res.data.data.pageData && res.data.data.pageData.length > 0) { + var a = res.data.data.pageData; + var obj = {}; + for (var i = 0; i < a.length; i++) { + var tt = { + 'ad_code': o.imghost + a[i].ad_code, + 'media_link': '', + 'ad_weapplink': a[i].ad_weapplink, + 'pid':a[i].pid + }; + // arr.push(tt); + obj[a[i].pid]=tt + } + if (a.length > 0) e.setData({ + mb_banner: obj, + }); + + wx.stopPullDownRefresh(); + } + }) + + //----拼单----- await getApp().request.promiseGet("/api/weshop/teamlist/pageteam/2", { data: { @@ -1092,6 +1122,11 @@ Page({ } }) }, + //广告跳转 + go_mb(e){ + let url=e.currentTarget.dataset.url + getApp().goto(url); + }, //跳转到分类 go_cate: function () { diff --git a/pages/index/index/index.wxss b/pages/index/index/index.wxss index 1172f86..3238b3f 100644 --- a/pages/index/index/index.wxss +++ b/pages/index/index/index.wxss @@ -1234,3 +1234,18 @@ page { align-items: center; justify-items: center; } +/* 商城首页 */ +.mb_box{ + width: 100%; +} +.mb_top,.mb_bottom{ + width: 100%; + display: flex; + +} +.mb_top .mb_top_item{ + width: 50%; +} +.mb_bottom>view{ + width: 50%; +} diff --git a/pages/user/assistance/task_assistance.js b/pages/user/assistance/task_assistance.js index ea05751..d219c76 100644 --- a/pages/user/assistance/task_assistance.js +++ b/pages/user/assistance/task_assistance.js @@ -47,7 +47,7 @@ Page({ is_user_list: 0,//我的任务点击加载更多的后 //*********************************************start钱 - canvasHidden: 0, //分享图片是否已经生成 + canvasHidden: 1, //分享图片是否已经生成 is_share: 0, //是否显示画布 shareImgPath: [], //生成的图片 screenWidth: "", //用户的屏幕宽度 @@ -83,6 +83,10 @@ Page({ btn_color:'', bg_color:'', font_color:'', + + //-- 屏幕实际的高度 -- + r_heght:'' + }, /** @@ -107,8 +111,9 @@ Page({ th.setData({taskid:options.taskid}) } - th.close(); + console.log('aaaa'); th.syinfo(); + th.close(); th.imageinfo(); }, @@ -743,13 +748,26 @@ Page({ }) }, syinfo: function () { + + console.log('bbb----------'); + var th = this; //获取用户设备信息,屏幕宽度 wx.getSystemInfo({ success: res => { + + + + var rpxR = 750 / res.screenWidth; + var r_height=res.windowHeight*rpxR; + + console.log(r_height,'11111') + th.setData({ - screenWidth: res.screenWidth + screenWidth: res.screenWidth, + r_heght:r_height }) + } }) }, @@ -761,6 +779,7 @@ Page({ var th = this; if (th.data.is_generate) return; th.data.is_generate = 1; + th.setData({canvasHidden:0}); var scene = this.data.is_user_task.id; ///二微码 @@ -782,7 +801,9 @@ Page({ var iurl = th.data.iurl; //图片地址前缀 const ctx = wx.createCanvasContext('share_id'); //绘图上下文 - var unit = th.data.screenWidth / 750 * 1.35; + var unit = th.data.screenWidth / 750 * (750/445); + + var numsize = 20 * unit; //几人助力字体大小 var head_list_img = th.data.head_pic_arr; var num = th.data.head_pic_arr.length; //已有几位好友助力 @@ -800,7 +821,7 @@ Page({ var left = 74 * unit; //助力人头像跟左边的距离 var spacing = 12 * unit; //助力人图片间距 var images = th.data.images; - ctx.drawImage(images[0], 0, 0, 445 * unit, 700 * unit); //分享的背景图片 + ctx.drawImage(images[0], 0, 0, 445 * unit, 1200 * th.data.screenWidth / 750); //分享的背景图片 ctx.drawImage(images[1], 37 * unit, 185 * unit, 370 * unit, 377 * unit); //分享的背景图片 console.log(111); @@ -926,14 +947,15 @@ Page({ // success: function (res) { //把画板内容绘制成图片,并回调 画板图片路径 ctx.draw(false, function () { + setTimeout(function () { wx.canvasToTempFilePath({ x: 0, y: 0, - width: 300, - height: 500, - destWidth: 400 * 2, - destHeight: 720 * 2, + width: 750, + height: 1200, + destWidth:1.2* 750 * 750 / th.data.screenWidth, + destHeight:1.2 *1200* 750 / th.data.screenWidth, canvasId: 'share_id', success: function (res) { wx.hideLoading(); @@ -945,7 +967,6 @@ Page({ canvasHidden: 1, is_share: 1, is_generate: 0, - canvasHidden: 1 }) if (!res.tempFilePath) { wx.showModal({ @@ -991,17 +1012,7 @@ Page({ is_share: 0 }) }, - syinfo: function () { - var th = this; - //获取用户设备信息,屏幕宽度 - wx.getSystemInfo({ - success: res => { - th.setData({ - screenWidth: res.screenWidth - }) - } - }) - }, + //把固定的图片加载到本地 imageinfo: async function () { diff --git a/pages/user/assistance/task_assistance.wxml b/pages/user/assistance/task_assistance.wxml index d98965e..2568c34 100644 --- a/pages/user/assistance/task_assistance.wxml +++ b/pages/user/assistance/task_assistance.wxml @@ -178,16 +178,21 @@ - + + + + + + diff --git a/pages/user/userqy/userqy.js b/pages/user/userqy/userqy.js index 90bc7ca..3317023 100644 --- a/pages/user/userqy/userqy.js +++ b/pages/user/userqy/userqy.js @@ -1,5 +1,6 @@ var e = getApp(),os = e.globalData.setting; var utils = require('../../../utils/util.js'); +var ut = require('../../../utils/util.js'); var regeneratorRuntime = require('../../../utils/runtime.js'); Page({