Commit a19e666da45dbc34c3a8767307501f28dc1ef83f
Merge branch 'dev_oa_lu6' into dev
Showing
11 changed files
with
261 additions
and
31 deletions
components/diy_video/diy_video.wxml
packageA/pages/profile/profile.js
| ... | ... | @@ -77,7 +77,7 @@ Page({ |
| 77 | 77 | lat: null, //维度 |
| 78 | 78 | lon: null, //经度 |
| 79 | 79 | loading: 0, |
| 80 | - | |
| 80 | + oldBirtthDayLength:0, //生日日期个数 | |
| 81 | 81 | }, |
| 82 | 82 | //通过路径跳转到其他页面 |
| 83 | 83 | goto: function (e) { |
| ... | ... | @@ -1126,20 +1126,81 @@ Page({ |
| 1126 | 1126 | let address = this.getInput(e); |
| 1127 | 1127 | this.data.address = address; |
| 1128 | 1128 | }, |
| 1129 | - | |
| 1129 | + //获取生日 | |
| 1130 | + getbind(e) { | |
| 1131 | + console.log("获取生日222222222"); | |
| 1132 | + console.log(e); | |
| 1133 | + let b = this.getInput(e); | |
| 1134 | + let length = b.length; | |
| 1135 | + let oldBirtthDayLength=this.data.oldBirtthDayLength | |
| 1136 | + if (length > oldBirtthDayLength) { | |
| 1137 | + if (b.length==4) { | |
| 1138 | + b+='-' | |
| 1139 | + } | |
| 1140 | + if (b.length==7) { | |
| 1141 | + b+='-' | |
| 1142 | + } | |
| 1143 | + // if (b.length==6 && b[5] >1) { | |
| 1144 | + // console.log(b[5]); | |
| 1145 | + | |
| 1146 | + // } | |
| 1147 | + } | |
| 1148 | + this.setData({ | |
| 1149 | + datet: b, | |
| 1150 | + oldBirtthDayLength:length, | |
| 1151 | + }); | |
| 1152 | + }, | |
| 1130 | 1153 | //获取生日 |
| 1131 | 1154 | bindChange: function (e) { |
| 1155 | + console.log("获取生日11111111"); | |
| 1156 | + console.log(e); | |
| 1132 | 1157 | let strBirthday = e.detail.value; |
| 1133 | 1158 | let age = this.verifyBirthday(strBirthday); |
| 1134 | 1159 | |
| 1135 | 1160 | if (age <= 10) { |
| 1136 | 1161 | app.my_warnning("会员年龄不能小于10岁(含10岁)", 0, this); |
| 1162 | + this.setData({ | |
| 1163 | + datet: '', | |
| 1164 | + }); | |
| 1137 | 1165 | } else if (age >= 70) { |
| 1138 | 1166 | app.my_warnning("会员年龄不能超过70岁(含70岁)", 0, this); |
| 1139 | - } else { | |
| 1140 | 1167 | this.setData({ |
| 1141 | - datet: e.detail.value, | |
| 1142 | - }); | |
| 1168 | + datet: '', | |
| 1169 | + }); | |
| 1170 | + } else { | |
| 1171 | + let value = e.detail.value | |
| 1172 | + | |
| 1173 | + if (value.length==8) { | |
| 1174 | + value+='01' | |
| 1175 | + } | |
| 1176 | + if (value.length==7) { | |
| 1177 | + value+='-01' | |
| 1178 | + } | |
| 1179 | + if (value.length==9) { | |
| 1180 | + let ov=value[value.length-1] | |
| 1181 | + let nv=value.slice(0,-1) | |
| 1182 | + if (ov==0) { | |
| 1183 | + nv+='01' | |
| 1184 | + }else{ | |
| 1185 | + nv+='0'+ov | |
| 1186 | + } | |
| 1187 | + value=nv | |
| 1188 | + } | |
| 1189 | + // let reg= /^(\d{4})-(\d{2})-(\d{2})$/; | |
| 1190 | + let reg= /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/ | |
| 1191 | + console.log('日期验证'); | |
| 1192 | + console.log(value); | |
| 1193 | + console.log(reg.test(value)); | |
| 1194 | + if (reg.test(value)) { | |
| 1195 | + this.setData({ | |
| 1196 | + datet: value, | |
| 1197 | + }); | |
| 1198 | + }else{ | |
| 1199 | + app.my_warnning("出生日期格式不对", 0, this); | |
| 1200 | + this.setData({ | |
| 1201 | + datet: '', | |
| 1202 | + }); | |
| 1203 | + } | |
| 1143 | 1204 | } |
| 1144 | 1205 | |
| 1145 | 1206 | }, | ... | ... |
packageA/pages/profile/profile.wxml
| ... | ... | @@ -90,14 +90,16 @@ |
| 90 | 90 | <view class="shrink0">出生日期:</view> |
| 91 | 91 | <view class="flex fs28 Birth pdl20 jc_fe"> |
| 92 | 92 | <view class="user-txt-right pdl20 flex ai-center"> |
| 93 | - <checkbox-group bindchange="isLunar"> | |
| 93 | + <input bindinput="getbind" bindblur="bindChange" maxlength="10" type="number" value="{{datet}}" class="user-txt-right pdl20 f1 t-r" placeholder="请输入出生日期"></input> | |
| 94 | + <picker class="pdl20" bindchange='bindChange' mode="date" start="{{year-70}}-1-1" end="{{year}}-12-31"> | |
| 95 | + <!-- <view class="flex ai-center">{{datet?datet:"请选择时间"}}<view class="angle">∟</view></view> --> | |
| 96 | + <image src="{{iurl}}/miniapp/images/calendar.png" style="width: 40rpx;height: 40rpx;"></image> | |
| 97 | + </picker> | |
| 98 | + <checkbox-group bindchange="isLunar" class="pdl20"> | |
| 94 | 99 | <label class="flex ai-center"> |
| 95 | 100 | <checkbox value="{{isLunar}}" checked="{{isLunar}}"/>农历 |
| 96 | 101 | </label> |
| 97 | 102 | </checkbox-group> |
| 98 | - <picker class="pdl20" bindchange='bindChange' mode="date" start="{{year-70}}-1-1" end="{{year}}-12-31"> | |
| 99 | - <view class="flex ai-center">{{datet?datet:"请选择时间"}}<view class="angle">∟</view></view> | |
| 100 | - </picker> | |
| 101 | 103 | |
| 102 | 104 | |
| 103 | 105 | </view> | ... | ... |
packageE/pages/cart/cart2/cart2.js
| ... | ... | @@ -5,7 +5,7 @@ var regeneratorRuntime = require('../../../../utils/runtime.js'); |
| 5 | 5 | var util_pay = require("../../../../utils/pay.js"); |
| 6 | 6 | var zh_calc = require("zh_calculate.js"); |
| 7 | 7 | var ladder_calc = require("ladder_calculate.js"); |
| 8 | -// 防抖函数用定时器 | |
| 8 | +// 防抖函数用定时器 | |
| 9 | 9 | let timer; |
| 10 | 10 | Page({ |
| 11 | 11 | data: { |
| ... | ... | @@ -137,6 +137,7 @@ Page({ |
| 137 | 137 | show_duo_gift: 0, |
| 138 | 138 | send_gf: {}, //多赠品的计算 |
| 139 | 139 | send_lb: {}, |
| 140 | + month_lb: {}, //每月礼包数据 | |
| 140 | 141 | dis_config: null, |
| 141 | 142 | bn_use_commission: 0, //是不是使用佣金 |
| 142 | 143 | cart_use_commission: 0, |
| ... | ... | @@ -198,6 +199,7 @@ Page({ |
| 198 | 199 | is_by: {}, |
| 199 | 200 | send_gf: {}, |
| 200 | 201 | send_lb: {}, |
| 202 | + month_lb: {}, | |
| 201 | 203 | }) |
| 202 | 204 | }, |
| 203 | 205 | |
| ... | ... | @@ -1831,6 +1833,7 @@ Page({ |
| 1831 | 1833 | }, |
| 1832 | 1834 | |
| 1833 | 1835 | calc_per: async function (c_arr) { |
| 1836 | + | |
| 1834 | 1837 | var send_gf = {}; |
| 1835 | 1838 | var duo_zp_num_arr = {}; |
| 1836 | 1839 | var th = this; |
| ... | ... | @@ -1856,7 +1859,7 @@ Page({ |
| 1856 | 1859 | for (var ii in ob) { |
| 1857 | 1860 | var item_map = ob[ii]; |
| 1858 | 1861 | if (item_map.bs == undefined || item_map.bs == null) { |
| 1859 | - //等待,获取一下优惠活动的信息 | |
| 1862 | + //等待,获取一下优惠活动的信息 | |
| 1860 | 1863 | await getApp().request.promiseGet("/api/weshop/goods/getDiscount", { |
| 1861 | 1864 | data: { |
| 1862 | 1865 | price: parseFloat(item_map.price).toFixed(2), prom_id: item_map.prom_id, |
| ... | ... | @@ -1875,7 +1878,9 @@ Page({ |
| 1875 | 1878 | item_map.s_coupon_num = get_data.coupon_num; |
| 1876 | 1879 | item_map.lbtitle = get_data.lbtitle; |
| 1877 | 1880 | item_map.zxlbtitle = get_data.zxlbtitle; |
| 1878 | - | |
| 1881 | + //每月礼包 | |
| 1882 | + item_map.monthlbtitle = get_data.monthlbtitle; | |
| 1883 | + //------end------- | |
| 1879 | 1884 | if (get_data.gift_id && parseInt(get_data.zp_mode) != 1 |
| 1880 | 1885 | && get_data.zp_num * item_map.bs <= get_data.limit_num |
| 1881 | 1886 | && get_data.zp_num * item_map.bs <= get_data.gift_storecount |
| ... | ... | @@ -1901,6 +1906,10 @@ Page({ |
| 1901 | 1906 | //专享礼包 |
| 1902 | 1907 | item_map.zx_libao = get_data.zxlibao; |
| 1903 | 1908 | item_map.zx_lb_num = get_data.zxlb_num; |
| 1909 | + //每月礼包 | |
| 1910 | + item_map.monthlibao = get_data.monthlibao; | |
| 1911 | + item_map.monthlb_num = get_data.monthlb_num; | |
| 1912 | + //------end------- | |
| 1904 | 1913 | |
| 1905 | 1914 | if (parseInt(get_data.zp_mode) == 1) { |
| 1906 | 1915 | if (!send_gf[pickid]) send_gf[pickid] = []; |
| ... | ... | @@ -2043,11 +2052,22 @@ Page({ |
| 2043 | 2052 | cart_item.g_zxlb_num.push({ 'l_id': item_map.zx_libao, "num": item_map.zx_lb_num, 'zxlbtitle': item_map.zxlbtitle }) |
| 2044 | 2053 | } |
| 2045 | 2054 | } |
| 2055 | + //每月礼包 | |
| 2056 | + if (item_map.monthlibao) { | |
| 2057 | + if (!cart_item.monthlibao) { | |
| 2058 | + cart_item.monthlibao = item_map.monthlibao + ""; | |
| 2059 | + cart_item.g_monthlb_num = [{ 'month_id': item_map.monthlibao, "monthnum": item_map.monthlb_num, 'monthlbtitle': item_map.monthlbtitle }]; | |
| 2060 | + } else { | |
| 2061 | + cart_item.monthlibao += "," + item_map.monthlibao; | |
| 2062 | + cart_item.g_monthlb_num.push({ 'month_id': item_map.monthlibao, "monthnum": item_map.monthlb_num, 'monthlbtitle': item_map.monthlbtitle }) | |
| 2063 | + } | |
| 2064 | + } | |
| 2065 | + //------------end-------- | |
| 2046 | 2066 | } |
| 2047 | 2067 | } |
| 2048 | 2068 | } |
| 2049 | 2069 | |
| 2050 | - | |
| 2070 | + | |
| 2051 | 2071 | var arr = Object.keys(send_gf); |
| 2052 | 2072 | var arr2 = Object.keys(th.data.send_gf); |
| 2053 | 2073 | if (arr2.length > 0) return false; |
| ... | ... | @@ -2062,10 +2082,12 @@ Page({ |
| 2062 | 2082 | |
| 2063 | 2083 | |
| 2064 | 2084 | calclate_lbNum(r_data) { |
| 2065 | - | |
| 2085 | + | |
| 2066 | 2086 | if(!r_data) return false; |
| 2067 | 2087 | |
| 2068 | 2088 | let send_lb = this.data.send_lb; |
| 2089 | + let month_lb = this.data.month_lb; | |
| 2090 | + | |
| 2069 | 2091 | //g_lb_num我的礼包 g_zxlb_num专享礼包 |
| 2070 | 2092 | r_data.forEach(r_d => { |
| 2071 | 2093 | let arr = []; |
| ... | ... | @@ -2112,9 +2134,35 @@ Page({ |
| 2112 | 2134 | send_lb[r_d.pickup_id] = arr; |
| 2113 | 2135 | } |
| 2114 | 2136 | } |
| 2137 | + //每月礼包 | |
| 2138 | + let monthArr=[] | |
| 2139 | + if (r_d.g_monthlb_num) { | |
| 2140 | + let g_lb = r_d.g_monthlb_num; | |
| 2141 | + for (let i = 0; i < g_lb.length; i++) { | |
| 2142 | + let item = g_lb[i]; | |
| 2143 | + let new_lb = g_lb.filter(lb => { | |
| 2144 | + return item.month_id === lb.month_id; | |
| 2145 | + }); | |
| 2146 | + if (new_lb.length == 1) { | |
| 2147 | + monthArr.push(item); | |
| 2148 | + } else { | |
| 2149 | + item.num = new_lb.reduce((pre, next) => { | |
| 2150 | + return pre + next.num; | |
| 2151 | + }, 0); | |
| 2152 | + monthArr.push(item); | |
| 2153 | + g_lb = g_lb.filter(ii => { | |
| 2154 | + return ii.month_id !== item.month_id; | |
| 2155 | + }); | |
| 2156 | + } | |
| 2157 | + month_lb[r_d.pickup_id] = monthArr; | |
| 2158 | + } | |
| 2159 | + } | |
| 2160 | + //-----end-------- | |
| 2161 | + | |
| 2115 | 2162 | }) |
| 2116 | 2163 | this.setData({ |
| 2117 | 2164 | send_lb, |
| 2165 | + month_lb | |
| 2118 | 2166 | }) |
| 2119 | 2167 | |
| 2120 | 2168 | }, |
| ... | ... | @@ -3633,6 +3681,15 @@ Page({ |
| 3633 | 3681 | ob = JSON.stringify(ob); |
| 3634 | 3682 | th.setData({ [l_txt]: good.zx_libao, [l_txt1]: ob }); |
| 3635 | 3683 | } |
| 3684 | + //每月礼包 | |
| 3685 | + if (good.month_libao) { | |
| 3686 | + var l_txt = "formData.give_monthlb_id"; | |
| 3687 | + //这个是json格式的 | |
| 3688 | + var l_txt1 = "formData.g_monthlb_num"; | |
| 3689 | + var ob = [{ "num": good.month_lb_num, "l_id": good.month_libao }]; | |
| 3690 | + ob = JSON.stringify(ob); | |
| 3691 | + th.setData({ [l_txt]: good.month_libao, [l_txt1]: ob }); | |
| 3692 | + } | |
| 3636 | 3693 | |
| 3637 | 3694 | wx.hideLoading(); |
| 3638 | 3695 | |
| ... | ... | @@ -3918,6 +3975,12 @@ Page({ |
| 3918 | 3975 | order_prom_list.give_zxlb_id = th.data.formData.give_zxlb_id; |
| 3919 | 3976 | order_prom_list.g_zxlb_num = th.data.formData.g_zxlb_num; |
| 3920 | 3977 | } |
| 3978 | + //--- 每月礼包 --- | |
| 3979 | + if (th.data.formData.give_monthlb_id > 0) { | |
| 3980 | + order_prom_list.give_monthlb_id = th.data.formData.give_monthlb_id; | |
| 3981 | + order_prom_list.g_monthlb_num = th.data.formData.g_monthlb_num; | |
| 3982 | + // order_prom_list.g_monthlb_num = [{ "num": good.month_lb_num, "l_id": th.data.formData.month_libao_id }]; | |
| 3983 | + } | |
| 3921 | 3984 | |
| 3922 | 3985 | item.order_prom_list = order_prom_list; |
| 3923 | 3986 | |
| ... | ... | @@ -4243,6 +4306,23 @@ Page({ |
| 4243 | 4306 | order_prom_list.g_zxlb_num = JSON.stringify(t_item.g_zxlb_num); |
| 4244 | 4307 | } |
| 4245 | 4308 | |
| 4309 | + //-- 送每月礼包的时候 -- | |
| 4310 | + if (t_item.monthlibao) { | |
| 4311 | + order_prom_list.give_monthlb_id = t_item.monthlibao; | |
| 4312 | + let marr=[]; | |
| 4313 | + if (t_item.g_monthlb_num && t_item.g_monthlb_num.length>0) { | |
| 4314 | + t_item.g_monthlb_num.map(ite=>{ | |
| 4315 | + let obj={ | |
| 4316 | + num:ite.monthnum, | |
| 4317 | + l_id:ite.month_id, | |
| 4318 | + monthlbtitle:ite.monthlbtitle | |
| 4319 | + } | |
| 4320 | + marr.push(obj) | |
| 4321 | + }) | |
| 4322 | + } | |
| 4323 | + order_prom_list.g_monthlb_num = JSON.stringify(marr); | |
| 4324 | + } | |
| 4325 | + | |
| 4246 | 4326 | if (Object.keys(order_prom_list).length > 0) { |
| 4247 | 4327 | if (order_prom_list.discount_amount) |
| 4248 | 4328 | order_prom_list.discount_amount = parseFloat(order_prom_list.discount_amount).toFixed(2); |
| ... | ... | @@ -4569,10 +4649,10 @@ Page({ |
| 4569 | 4649 | }) |
| 4570 | 4650 | // pdata.keyid = th.data.bn_goods.keyid |
| 4571 | 4651 | } |
| 4572 | - | |
| 4652 | + // debugger | |
| 4573 | 4653 | var str = JSON.stringify(pdata); |
| 4574 | 4654 | console.log(str,'aaaaaaaaaaaaaaa'); |
| 4575 | - //return false; | |
| 4655 | + // return false; | |
| 4576 | 4656 | |
| 4577 | 4657 | wx.showLoading({ title: "加载中" }); |
| 4578 | 4658 | th.setData({ submit: 1, }) |
| ... | ... | @@ -5853,6 +5933,7 @@ Page({ |
| 5853 | 5933 | } |
| 5854 | 5934 | }).then(res => { |
| 5855 | 5935 | if (res.data.code == 0) { |
| 5936 | + | |
| 5856 | 5937 | var get_data = res.data.data; |
| 5857 | 5938 | arr.is_bz = prom.is_bz; //是不是倍增 |
| 5858 | 5939 | arr.is_xz_yh = arr.is_xz_yh ? arr.is_xz_yh : prom.is_xz_yh; //是不是优惠 |
| ... | ... | @@ -5890,6 +5971,11 @@ Page({ |
| 5890 | 5971 | arr.zxlbtitle = get_data.zxlbtitle; |
| 5891 | 5972 | arr.zx_libao = get_data.zxlibao; |
| 5892 | 5973 | arr.zx_lb_num = get_data.zxlb_num; |
| 5974 | + //立即购买,每月礼包 | |
| 5975 | + arr.monthlbtitle = get_data.monthlbtitle; | |
| 5976 | + arr.month_libao = get_data.monthlibao; | |
| 5977 | + arr.month_lb_num = get_data.monthlb_num; | |
| 5978 | + //----end------- | |
| 5893 | 5979 | |
| 5894 | 5980 | arr.prom_id = prom_id; |
| 5895 | 5981 | |
| ... | ... | @@ -6087,6 +6173,7 @@ Page({ |
| 6087 | 6173 | check_is_youhui: function (r_data, pick_id) { |
| 6088 | 6174 | let send_lb = this.data.send_lb; |
| 6089 | 6175 | let lodash = null; |
| 6176 | + | |
| 6090 | 6177 | r_data.forEach(item => { |
| 6091 | 6178 | if (send_lb[pick_id]) { |
| 6092 | 6179 | for (let i = 0; i < send_lb[pick_id].length; i++) { |
| ... | ... | @@ -6226,10 +6313,14 @@ Page({ |
| 6226 | 6313 | let id = e.currentTarget.dataset.id; // 获取礼包id |
| 6227 | 6314 | let flag = e.currentTarget.dataset.flag; |
| 6228 | 6315 | let url = ''; |
| 6229 | - if (flag == 1) { // flag =1 控制跳转到专享礼包 | |
| 6230 | - url = `/pages/giftpack/giftpacklist/giftpacklist?lbId=${id}&flag=1`; | |
| 6231 | - } else { | |
| 6316 | + | |
| 6317 | + if (flag == 2) { // flag =2 控制跳转到每月礼包 | |
| 6318 | + // url = `/pages/giftpack/giftpacklist/giftpacklist?lbId=${id}&flag=1`; | |
| 6319 | + url = `/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo?isBuy=1&id=${id}&is_act=1`; | |
| 6320 | + }else if (flag == 1) { | |
| 6232 | 6321 | url = `/packageA/pages/myGiftDetails/myGiftDetails?btn=0&index=0&id=${id}`; // btn=0 控制跳转到的页面不显示按钮 |
| 6322 | + } else { | |
| 6323 | + url = `/pages/giftpack/giftpacklist/giftpacklist?lbId=${id}&flag=1`; | |
| 6233 | 6324 | }; |
| 6234 | 6325 | // console.log('myurl', url); |
| 6235 | 6326 | getApp().goto(url); | ... | ... |
packageE/pages/cart/cart2/cart2.wxml
| ... | ... | @@ -209,7 +209,7 @@ |
| 209 | 209 | <!-- 有送礼包 --> |
| 210 | 210 | <view wx:if="{{send_lb[item.pickup_id]}}"> |
| 211 | 211 | <block wx:for="{{send_lb[item.pickup_id]}}" wx:key="id" wx:for-item="send"> |
| 212 | - <view class="coupon-mes flex jc_sb" style="margin: 10rpx 0; padding-right: 35rpx" data-id="{{send.id}}" data-flag="{{send.flag}}" bindtap="viewLbDetails"> | |
| 212 | + <view class="coupon-mes flex jc_sb" style="margin: 10rpx 0; padding-right: 35rpx" data-id="{{send.l_id}}" data-flag="{{send.flag}}" bindtap="viewLbDetails"> | |
| 213 | 213 | <view class="flex ai_c"> |
| 214 | 214 | <view class="circle1">赠</view>{{send.zxlbtitle?send.zxlbtitle:send.lbtitle}} |
| 215 | 215 | <!-- <view class="circle1" wx:if="{{item.zxlb_id>0}}">赠</view>{{item.zxlbtitle}} --> |
| ... | ... | @@ -220,6 +220,20 @@ |
| 220 | 220 | </view> |
| 221 | 221 | </block> |
| 222 | 222 | </view> |
| 223 | + <!-- 每月礼包 --> | |
| 224 | + <view wx:if="{{month_lb[item.pickup_id]}}"> | |
| 225 | + <block wx:for="{{month_lb[item.pickup_id]}}" wx:key="id" wx:for-item="send"> | |
| 226 | + <view class="coupon-mes flex jc_sb" style="margin: 10rpx 0; padding-right: 35rpx" data-id="{{send.month_id}}" data-flag="2" bindtap="viewLbDetails"> | |
| 227 | + <view class="flex ai_c"> | |
| 228 | + <view class="circle1">赠</view>{{send.monthlbtitle}} | |
| 229 | + <!-- <view class="circle1" wx:if="{{item.zxlb_id>0}}">赠</view>{{item.zxlbtitle}} --> | |
| 230 | + </view> | |
| 231 | + <view class="flex ai_c"> | |
| 232 | + x{{send.monthnum}}<text class="bg_jj"></text> | |
| 233 | + </view> | |
| 234 | + </view> | |
| 235 | + </block> | |
| 236 | + </view> | |
| 223 | 237 | <!-- 赠品的显示 --> |
| 224 | 238 | <view wx:if="{{send_gf[item.pickup_id]}}"> |
| 225 | 239 | <block wx:for="{{send_gf[item.pickup_id]}}" wx:for-item="iter"> |
| ... | ... | @@ -416,7 +430,7 @@ |
| 416 | 430 | |
| 417 | 431 | <!-- 有送礼包 --> |
| 418 | 432 | <view wx:if="{{bn_goods.s_libao}}"> |
| 419 | - <view class="coupon-mes flex jc_sb" style="margin: 10rpx 0; padding-right: 35rpx" data-id="{{bn_goods.s_libao}}" bindtap="viewLbDetails"> | |
| 433 | + <view class="coupon-mes flex jc_sb" style="margin: 10rpx 0; padding-right: 35rpx" data-id="{{bn_goods.s_libao}}" data-flag="1" bindtap="viewLbDetails"> | |
| 420 | 434 | <view class="flex ai_c"> |
| 421 | 435 | <view class="circle1">赠</view>{{bn_goods.lbtitle}} |
| 422 | 436 | <!-- <view class="circle1" wx:if="{{item.zxlb_id>0}}">赠</view>{{item.zxlbtitle}} --> |
| ... | ... | @@ -428,7 +442,7 @@ |
| 428 | 442 | </view> |
| 429 | 443 | <!-- 有送专享礼包 --> |
| 430 | 444 | <view wx:if="{{bn_goods.zx_libao}}"> |
| 431 | - <view class="coupon-mes flex jc_sb" style="margin: 10rpx 0; padding-right: 35rpx" data-id="{{bn_goods.zx_libao}}" data-flag="1" bindtap="viewLbDetails"> | |
| 445 | + <view class="coupon-mes flex jc_sb" style="margin: 10rpx 0; padding-right: 35rpx" data-id="{{bn_goods.zx_libao}}" bindtap="viewLbDetails"> | |
| 432 | 446 | <view class="flex ai_c"> |
| 433 | 447 | <view class="circle1">赠</view>{{bn_goods.zxlbtitle}} |
| 434 | 448 | <!-- <view class="circle1" wx:if="{{item.zxlb_id>0}}">赠</view>{{item.zxlbtitle}} --> |
| ... | ... | @@ -438,6 +452,18 @@ |
| 438 | 452 | </view> |
| 439 | 453 | </view> |
| 440 | 454 | </view> |
| 455 | + <!-- 有送每月礼包 --> | |
| 456 | + <view wx:if="{{bn_goods.month_libao}}"> | |
| 457 | + <view class="coupon-mes flex jc_sb" style="margin: 10rpx 0; padding-right: 35rpx" data-id="{{bn_goods.month_libao}}" data-flag="2" bindtap="viewLbDetails"> | |
| 458 | + <view class="flex ai_c"> | |
| 459 | + <view class="circle1">赠</view>{{bn_goods.monthlbtitle}} | |
| 460 | + <!-- <view class="circle1" wx:if="{{item.zxlb_id>0}}">赠</view>{{item.zxlbtitle}} --> | |
| 461 | + </view> | |
| 462 | + <view class="flex ai_c"> | |
| 463 | + x{{bn_goods.month_lb_num}}<text class="bg_jj"></text> | |
| 464 | + </view> | |
| 465 | + </view> | |
| 466 | + </view> | |
| 441 | 467 | |
| 442 | 468 | |
| 443 | 469 | <!-- 赠品的显示 --> | ... | ... |
packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.js
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js
| ... | ... | @@ -214,6 +214,43 @@ Page({ |
| 214 | 214 | url: '/packageE/pages/togoin/togoin', |
| 215 | 215 | }) |
| 216 | 216 | }, |
| 217 | + getListInfo: function (e) { | |
| 218 | + var th = this; | |
| 219 | + getApp().request.get(`/api/weshop/marketing/marketingMonthgiftbagForm/get/${a.stoid}/${th.data.params.id}`, { | |
| 220 | + isShowLoading: true, | |
| 221 | + data: { | |
| 222 | + // store_id: a.stoid, //商家ID | |
| 223 | + // user_id: d.user_id, //用户ID | |
| 224 | + // page: 1, | |
| 225 | + // pageSize: 10, | |
| 226 | + // is_end:0, | |
| 227 | + // timetype:1, | |
| 228 | + // id:th.data.params.id | |
| 229 | + }, | |
| 230 | + success: function (res) { | |
| 231 | + if (res.data.code == 0) { | |
| 232 | + // th.data.curpage++; | |
| 233 | + // var arr1 = th.data.wareCard; | |
| 234 | + let obj = res.data.data; | |
| 235 | + let monthgiftbag={ | |
| 236 | + remark:obj.remark, | |
| 237 | + cover_img:obj.imageurl, | |
| 238 | + giftTitle:obj.act_name, | |
| 239 | + lbPrice:obj.oldPrice | |
| 240 | + } | |
| 241 | + let remark=monthgiftbag.remark.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"') | |
| 242 | + monthgiftbag.remark=remark | |
| 243 | + th.setData({ | |
| 244 | + monthgiftbag: monthgiftbag, | |
| 245 | + }) | |
| 246 | + }else { | |
| 247 | + getApp().my_warnning("获取活动失败", 0, th); | |
| 248 | + } | |
| 249 | + | |
| 250 | + } | |
| 251 | + }) | |
| 252 | + | |
| 253 | + }, | |
| 217 | 254 | getList: function (e) { |
| 218 | 255 | var th = this; |
| 219 | 256 | getApp().request.get('/api/weshop/marketing/marketingMonthgiftbagForm/page', { |
| ... | ... | @@ -367,7 +404,11 @@ Page({ |
| 367 | 404 | getApp().goto('/packageE/pages/togoin/togoin'); |
| 368 | 405 | return false; |
| 369 | 406 | } |
| 370 | - this.getList(); | |
| 407 | + if (th.data.params && th.data.params.is_act) { | |
| 408 | + this.getListInfo() | |
| 409 | + }else{ | |
| 410 | + this.getList(); | |
| 411 | + } | |
| 371 | 412 | }) |
| 372 | 413 | |
| 373 | 414 | setTimeout(()=>{ | ... | ... |
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.wxml
| ... | ... | @@ -149,7 +149,7 @@ |
| 149 | 149 | |
| 150 | 150 | <view class="foot_empty data-v-3a5b7e36"></view> |
| 151 | 151 | |
| 152 | - <block wx:if="{{flag != 1}}"> | |
| 152 | + <block wx:if="{{flag != 1 && (params && !params.is_act)}}"> | |
| 153 | 153 | <block wx:if="{{getUserID && monthgiftbag.giftTitle}}"> |
| 154 | 154 | <block wx:if="{{isStart==1}}"> |
| 155 | 155 | <view class="foot_button data-v-3a5b7e36"> |
| ... | ... | @@ -229,7 +229,9 @@ |
| 229 | 229 | <!-- 弹出框扫描 --> |
| 230 | 230 | <qr_code id="qc_com"></qr_code> |
| 231 | 231 | <!-- 制作一个圆球导航 --> |
| 232 | -<nav_b id="nav_b"></nav_b> | |
| 232 | +<block wx:if="{{!params || (params && params.is_act !=1)}}"> | |
| 233 | + <nav_b id="nav_b" ></nav_b> | |
| 234 | +</block> | |
| 233 | 235 | |
| 234 | 236 | <include src="../public/buy_com.wxml"></include> |
| 235 | 237 | <canvas canvas-id='share' style='width:750rpx;height:1217rpx;background-color:white;' wx:if="{{!canvasHidden}}"></canvas> | ... | ... |
pages/cart/cart/cart.wxml
| ... | ... | @@ -139,6 +139,7 @@ |
| 139 | 139 | <text wx:if="{{item.content.is_gift==1}}">送赠品|</text> |
| 140 | 140 | <text wx:if="{{item.content.is_libao==1}}">送礼包|</text> |
| 141 | 141 | <text wx:if="{{item.content.is_zxlibao==1}}">送专享礼包|</text> |
| 142 | + <text wx:if="{{item.content.is_monthgiftbag==1}}">送每月礼包|</text> | |
| 142 | 143 | <text></text> |
| 143 | 144 | </view> |
| 144 | 145 | <view class="co-red" data-prom_id="{{item.prom_id}}" bindtap="go_cou_dang">去凑单></view> | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
| ... | ... | @@ -481,7 +481,7 @@ Page({ |
| 481 | 481 | appoint_pick_keyid: json_d.appoint_pick_keyid |
| 482 | 482 | |
| 483 | 483 | }); |
| 484 | - | |
| 484 | + | |
| 485 | 485 | //------几人评价------- |
| 486 | 486 | //n.init(th, "", "comments"); |
| 487 | 487 | |
| ... | ... | @@ -3680,7 +3680,7 @@ Page({ |
| 3680 | 3680 | th.setData({ |
| 3681 | 3681 | all_pick_list: e.data.data.pageData |
| 3682 | 3682 | }); |
| 3683 | - | |
| 3683 | + | |
| 3684 | 3684 | //--获取线下库存,而且不是新的门店规则, 同时是普通购买的时候,或者同时不能是活动,秒杀,拼团,积分购-- |
| 3685 | 3685 | if (!getApp().is_virtual(th.data.sele_g) && th.data.sales_rules >= 2 && !th.data.is_newsales_rules && !th.data.sele_g.whsle_id && ([1,2,4,6,8,9].indexOf(th.data.prom_type)==-1 || is_normal == 1)) { |
| 3686 | 3686 | setTimeout(function () { |
| ... | ... | @@ -7972,7 +7972,10 @@ Page({ |
| 7972 | 7972 | let id = e.currentTarget.dataset.id; // 获取礼包id |
| 7973 | 7973 | let flag = e.currentTarget.dataset.flag; |
| 7974 | 7974 | let url = ''; |
| 7975 | - if (flag == 1) { // flag =1 控制跳转到专享礼包 | |
| 7975 | + if (flag == 2) { // flag =1 控制跳转到专享礼包 | |
| 7976 | + url = `/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo?isBuy=1&id=${id}&is_act=1`; | |
| 7977 | + // url = `/pages/giftpack/giftpacklist/giftpacklist?lbId=${id}&flag=1`; | |
| 7978 | + } else if (flag == 1) { // flag =1 控制跳转到专享礼包 | |
| 7976 | 7979 | url = `/pages/giftpack/giftpacklist/giftpacklist?lbId=${id}&flag=1`; |
| 7977 | 7980 | } else { |
| 7978 | 7981 | url = `/packageA/pages/myGiftDetails/myGiftDetails?btn=0&index=0&id=${id}`; // btn=0 控制跳转到的页面不显示按钮 | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxml
| ... | ... | @@ -3,7 +3,7 @@ |
| 3 | 3 | <wxs module="g_filters" src="g_filter.wxs"></wxs> |
| 4 | 4 | <wxs module="tool" src="filter.wxs"></wxs> |
| 5 | 5 | |
| 6 | -<!-- 商品内容区域,普通商品,秒杀,拼团 --> | |
| 6 | +<!-- 商品内容区域,普通商品,秒杀,拼团 --> | |
| 7 | 7 | <block wx:if="{{isshow}}"> |
| 8 | 8 | <view class="container"> |
| 9 | 9 | <!-- 拼单规则规则 --> |
| ... | ... | @@ -535,6 +535,7 @@ |
| 535 | 535 | |
| 536 | 536 | <view class="tick ellipsis-1x lh2 details pdr40" wx:if="{{item.lb_id>0}}" data-id="{{item.lb_id}}" bindtap="viewLbDetails">送{{item.lbtitle}}</view> |
| 537 | 537 | <view class="tick ellipsis-1x lh2 details pdr40" wx:if="{{item.zxlb_id>0}}" data-id="{{item.zxlb_id}}" data-flag="1" bindtap="viewLbDetails">送{{item.zxlbtitle}}</view> |
| 538 | + <view class="tick ellipsis-1x lh2 details pdr40" wx:if="{{item.monthgiftbag_id>0}}" data-id="{{item.monthgiftbag_id}}" data-flag="2" bindtap="viewLbDetails">送{{item.monthgiftbag_title}}</view> | |
| 538 | 539 | </view> |
| 539 | 540 | </view> |
| 540 | 541 | </view> |
| ... | ... | @@ -1368,6 +1369,7 @@ |
| 1368 | 1369 | <text wx:if="{{hui_condition.gift_id}}">,送赠品</text> |
| 1369 | 1370 | <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text> |
| 1370 | 1371 | <text wx:if="{{hui_condition.zxlb_id>0}}">,送专享礼包</text> |
| 1372 | + <text wx:if="{{hui_condition.monthgiftbag_id>0}}">,送每月礼包</text> | |
| 1371 | 1373 | </view> |
| 1372 | 1374 | </view> |
| 1373 | 1375 | <view class="spec-cart-btns"> | ... | ... |