Commit 6b87614f95378018ea1cb7aca78132c2ca25d0cd
Merge branch 'dev' into 'test'
Dev See merge request !228
Showing
68 changed files
with
5193 additions
and
573 deletions
app.js
| @@ -323,12 +323,35 @@ App({ | @@ -323,12 +323,35 @@ App({ | ||
| 323 | } | 323 | } |
| 324 | //---如果会员没有设置默认门店,同时也没有再注册的时候选择门店-- | 324 | //---如果会员没有设置默认门店,同时也没有再注册的时候选择门店-- |
| 325 | if(pick_id==0) return func(null); | 325 | if(pick_id==0) return func(null); |
| 326 | - //获取用户注册时候的门店 | 326 | + //获取用户注册时候的门店,这个门店不能关闭,同时这个门店的分类不能关闭 |
| 327 | th.request.get("/api/weshop/pickup/get/"+os.stoid+"/"+pick_id,{ | 327 | th.request.get("/api/weshop/pickup/get/"+os.stoid+"/"+pick_id,{ |
| 328 | data:{}, | 328 | data:{}, |
| 329 | success:function (res) { | 329 | success:function (res) { |
| 330 | - th.globalData.pk_store=res.data.data; | ||
| 331 | - func(th.globalData.pk_store); | 330 | + th.globalData.pk_store=null; |
| 331 | + if(res.data.code==0 && res.data.data && res.data.data.isstop==0){ | ||
| 332 | + if(res.data.data.category_id){ | ||
| 333 | + th.request.get( "/api/weshop/storagecategory/get/"+os.stoid+"/"+res.data.data.category_id, { | ||
| 334 | + data: {}, | ||
| 335 | + success: function (ee) { | ||
| 336 | + if(ee.data.code==0 && ee.data.data ){ | ||
| 337 | + if(ee.data.data.is_show==1){ | ||
| 338 | + th.globalData.pk_store = res.data.data; | ||
| 339 | + func(th.globalData.pk_store); | ||
| 340 | + }else{ | ||
| 341 | + func(null); | ||
| 342 | + } | ||
| 343 | + }else{ | ||
| 344 | + func(null); | ||
| 345 | + } | ||
| 346 | + } | ||
| 347 | + }) | ||
| 348 | + }else{ | ||
| 349 | + th.globalData.pk_store = res.data.data; | ||
| 350 | + func(th.globalData.pk_store); | ||
| 351 | + } | ||
| 352 | + }else{ | ||
| 353 | + func(null); | ||
| 354 | + } | ||
| 332 | } | 355 | } |
| 333 | }) | 356 | }) |
| 334 | }else{ | 357 | }else{ |
| @@ -336,7 +359,6 @@ App({ | @@ -336,7 +359,6 @@ App({ | ||
| 336 | } | 359 | } |
| 337 | }) | 360 | }) |
| 338 | 361 | ||
| 339 | - | ||
| 340 | }, | 362 | }, |
| 341 | 363 | ||
| 342 | //-------获取购物车数量---------- | 364 | //-------获取购物车数量---------- |
app.json
| 1 | { | 1 | { |
| 2 | - "pages": [ | 2 | + "pages": [ |
| 3 | "pages/index/index/index", | 3 | "pages/index/index/index", |
| 4 | + "pages/giftpack/birthdaygift/birthdaygift", | ||
| 5 | + "pages/user/comment/comment", | ||
| 6 | + "pages/giftpack/evaluategift/evaluategift", | ||
| 7 | + "pages/giftpack/newvipgift/newvipgift", | ||
| 8 | + "pages/giftpack/payment/payment", | ||
| 9 | + "pages/giftpack/buygiftpack/giftpackbuy", | ||
| 10 | + "pages/giftpack/giftpacklist/giftpacklist", | ||
| 11 | + "pages/giftpack/mygiftpack/mygiftpack", | ||
| 4 | "pages/goods/categoryList/categoryList", | 12 | "pages/goods/categoryList/categoryList", |
| 5 | "pages/cart/cart/cart", | 13 | "pages/cart/cart/cart", |
| 6 | "pages/cart/cart2/cart2", | 14 | "pages/cart/cart2/cart2", |
| @@ -17,7 +25,6 @@ | @@ -17,7 +25,6 @@ | ||
| 17 | "pages/user/address_list/address_list", | 25 | "pages/user/address_list/address_list", |
| 18 | "pages/user/userinfo/userinfo", | 26 | "pages/user/userinfo/userinfo", |
| 19 | "pages/user/account/account", | 27 | "pages/user/account/account", |
| 20 | - "pages/user/comment/comment", | ||
| 21 | "pages/user/return_goods_list/return_goods_list", | 28 | "pages/user/return_goods_list/return_goods_list", |
| 22 | "pages/user/userinfo_edit/userinfo_edit", | 29 | "pages/user/userinfo_edit/userinfo_edit", |
| 23 | "pages/user/collect_list/collect_list", | 30 | "pages/user/collect_list/collect_list", |
| @@ -77,8 +84,9 @@ | @@ -77,8 +84,9 @@ | ||
| 77 | "pages/user/my_service/tment_eval", | 84 | "pages/user/my_service/tment_eval", |
| 78 | "pages/user/my_service/tment_order_list", | 85 | "pages/user/my_service/tment_order_list", |
| 79 | "pages/user/my_service/beauty_deta", | 86 | "pages/user/my_service/beauty_deta", |
| 80 | - | ||
| 81 | - "pages/user/labels/labels" | 87 | + "pages/user/labels/labels", |
| 88 | + "pages/user/view_comment/view_comment", | ||
| 89 | + "pages/user/assistance/assistance", | ||
| 82 | ], | 90 | ], |
| 83 | "permission": { | 91 | "permission": { |
| 84 | "scope.userLocation": { | 92 | "scope.userLocation": { |
components/nav_b/nav_b.js
| 1 | -var t = getApp(), os = t.globalData.setting; | 1 | +var t = getApp(), |
| 2 | + os = t.globalData.setting; | ||
| 2 | Component({ | 3 | Component({ |
| 3 | - properties: { | ||
| 4 | - }, | 4 | + properties: {}, |
| 5 | data: { | 5 | data: { |
| 6 | isopen: 0, | 6 | isopen: 0, |
| 7 | iurl: os.imghost, | 7 | iurl: os.imghost, |
| 8 | - nav_left:"首页",//导航左边 | ||
| 9 | - nav_center:"预约",//导航中间 | ||
| 10 | - nav_right: "我的",//导航右边 | ||
| 11 | - nav_left_url: "/pages/index/index/index",//导航左边地址 | ||
| 12 | - nav_center_url:"/pages/user/my_service/tment_order_list",//导航中间地址 | ||
| 13 | - nav_right_url:"/pages/user/index/index",//导航右边地址 | 8 | + nav_left: "首页", //导航左边 |
| 9 | + nav_center: "预约", //导航中间 | ||
| 10 | + nav_right: "我的", //导航右边 | ||
| 11 | + nav_left_url: "/pages/index/index/index", //导航左边地址 | ||
| 12 | + nav_center_url: "/pages/user/my_service/tment_order_list", //导航中间地址 | ||
| 13 | + nav_right_url: "/pages/user/index/index", //导航右边地址 | ||
| 14 | }, | 14 | }, |
| 15 | 15 | ||
| 16 | - ready: function () { | ||
| 17 | - }, | 16 | + ready: function() {}, |
| 18 | methods: { | 17 | methods: { |
| 19 | //--点击打开事件-- | 18 | //--点击打开事件-- |
| 20 | - open_box: function () { | ||
| 21 | - this.setData({ isopen: 1 }); | 19 | + open_box: function() { |
| 20 | + this.setData({ | ||
| 21 | + isopen: 1 | ||
| 22 | + }); | ||
| 23 | + }, | ||
| 24 | + set_name: function(name,url) { | ||
| 25 | + var th = this; | ||
| 26 | + th.setData({ | ||
| 27 | + nav_center:name, | ||
| 28 | + nav_center_url:url | ||
| 29 | + }) | ||
| 22 | }, | 30 | }, |
| 23 | //--关闭事件-- | 31 | //--关闭事件-- |
| 24 | - close_box: function () { | ||
| 25 | - this.setData({ isopen: 0 }); | 32 | + close_box: function() { |
| 33 | + this.setData({ | ||
| 34 | + isopen: 0 | ||
| 35 | + }); | ||
| 26 | }, | 36 | }, |
| 27 | //--跳转-- | 37 | //--跳转-- |
| 28 | - goto: function (e) { | 38 | + goto: function(e) { |
| 29 | var url = e.currentTarget.dataset.url; | 39 | var url = e.currentTarget.dataset.url; |
| 30 | getApp().goto(url); | 40 | getApp().goto(url); |
| 31 | this.close_box(); | 41 | this.close_box(); |
pages/giftpack/birthdaygift/birthdaygift.js
0 → 100644
| 1 | +var i = require("../../../utils/util.js") | ||
| 2 | +var e = getApp(), | ||
| 3 | + a = e.globalData.setting, | ||
| 4 | + os = a, | ||
| 5 | + t = e.request, | ||
| 6 | + d = e.globalData; | ||
| 7 | +Page({ | ||
| 8 | + data: { | ||
| 9 | + url: a.url, //接口网址 | ||
| 10 | + iurl: a.imghost, //图片前缀网址 | ||
| 11 | + itemShow: false, //项目栏目是否显示 | ||
| 12 | + cardShow: false, //代金券栏目是否显示 | ||
| 13 | + packShow: false, //福利栏目是否显示 | ||
| 14 | + textShow: false, //规则是否显示 | ||
| 15 | + integralShow: true, //积分领取是否显示 | ||
| 16 | + growUpShow: true, //成长值领取是否显示 | ||
| 17 | + itemButton: '', | ||
| 18 | + cardButton: '', | ||
| 19 | + getActId: '', | ||
| 20 | + getActType: '', | ||
| 21 | + giftID: '', | ||
| 22 | + receiveState: '一键全部领取', | ||
| 23 | + textTitle: '', | ||
| 24 | + getUrl: '', | ||
| 25 | + noShow: false, | ||
| 26 | + cards: [], //礼包内容--礼券 | ||
| 27 | + itemWare: [], //礼包内容--服务项目 | ||
| 28 | + integralTitle: "", | ||
| 29 | + growUpTitle: "", | ||
| 30 | + is_sub: 0, //是否重复领取 | ||
| 31 | + }, | ||
| 32 | + GetList: function () { | ||
| 33 | + var th = this; | ||
| 34 | + var url = "/api/weshop/marketing/giftbag/bound/get"; | ||
| 35 | + getApp().request.promiseGet(url, { | ||
| 36 | + data: { | ||
| 37 | + "actId": th.data.getActId, //活动id | ||
| 38 | + "actType":4, //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销 | ||
| 39 | + "giftBagId": th.data.giftID, //礼包ID | ||
| 40 | + "storeId": a.stoid, //商家ID | ||
| 41 | + "userId": d.user_id //用户ID | ||
| 42 | + } | ||
| 43 | + }).then(res => { | ||
| 44 | + if (res.data.code == 0) { | ||
| 45 | + if (res.data.data.lbCoupons.length > 0 && res.data.data.lbCoupons!=null) { | ||
| 46 | + //礼包内容--礼券 | ||
| 47 | + th.setData({ | ||
| 48 | + cardShow: true, | ||
| 49 | + cards: res.data.data.lbCoupons | ||
| 50 | + }) | ||
| 51 | + } | ||
| 52 | + if (res.data.data.lbSM.length > 0 && res.data.data.lbSM!=nll) { | ||
| 53 | + //礼包内容--服务项目 | ||
| 54 | + th.setData({ | ||
| 55 | + itemShow: true, | ||
| 56 | + itemWare: res.data.data.lbSM | ||
| 57 | + }) | ||
| 58 | + } | ||
| 59 | + //礼包积分 | ||
| 60 | + if (res.data.data.lbIntegral <= 0) { | ||
| 61 | + if (res.data.data.lbGrowthValue <= 0) { | ||
| 62 | + th.setData({ | ||
| 63 | + packShow: false | ||
| 64 | + }) | ||
| 65 | + } else { | ||
| 66 | + th.setData({ | ||
| 67 | + packShow: false, | ||
| 68 | + integralShow: false, | ||
| 69 | + growUpShow: true | ||
| 70 | + }) | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + } else { | ||
| 74 | + if (res.data.data.lbGrowthValue > 0) { | ||
| 75 | + th.setData({ | ||
| 76 | + packShow: true | ||
| 77 | + }) | ||
| 78 | + } else { | ||
| 79 | + th.setData({ | ||
| 80 | + packShow: true, | ||
| 81 | + integralShow: true, | ||
| 82 | + growUpShow: false | ||
| 83 | + }) | ||
| 84 | + } | ||
| 85 | + } | ||
| 86 | + th.setData({ | ||
| 87 | + integralTitle: '价值' + res.data.data.lbIntegral + '积分', | ||
| 88 | + growUpTitle: '价值' + res.data.data.lbGrowthValue + '成长值' | ||
| 89 | + }) | ||
| 90 | + if (res.data.data.receiveState == 0) { | ||
| 91 | + th.setData({ | ||
| 92 | + receiveState: '一键全部领取' | ||
| 93 | + }) | ||
| 94 | + } else { | ||
| 95 | + th.setData({ | ||
| 96 | + receiveState: '已领取' | ||
| 97 | + }) | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + if (res.data.data.actIntro != '') { | ||
| 101 | + th.setData({ | ||
| 102 | + textShow: true, | ||
| 103 | + textTitle: res.data.data.actIntro | ||
| 104 | + }) | ||
| 105 | + } | ||
| 106 | + } else { | ||
| 107 | + getApp().my_warnning(res.data.msg, 0, th); | ||
| 108 | + return false; | ||
| 109 | + } | ||
| 110 | + }) | ||
| 111 | + }, | ||
| 112 | + | ||
| 113 | + onLoad: function onLoad(options) { | ||
| 114 | + var th = this; | ||
| 115 | + th.setData({ | ||
| 116 | + getActId: options.actId, | ||
| 117 | + giftID: options.giftBagId | ||
| 118 | + }) | ||
| 119 | + th.GetList(); | ||
| 120 | + }, | ||
| 121 | + onShow: function onShow() { | ||
| 122 | + var th = this; | ||
| 123 | + var textTitle = th.data.textTitle.replace(/<p><img/gi, "<p class='img'><img"); | ||
| 124 | + th.setData({ | ||
| 125 | + textTitle: textTitle | ||
| 126 | + }) | ||
| 127 | + }, | ||
| 128 | + GetReceive: function () { | ||
| 129 | + var th = this; | ||
| 130 | + if (th.data.receiveState == '已领取') { | ||
| 131 | + return false; | ||
| 132 | + } | ||
| 133 | + var is_sub = th.data.is_sub; //判断是否重复提交 | ||
| 134 | + if (is_sub == 0) { | ||
| 135 | + th.setData({ | ||
| 136 | + is_sub: 1 | ||
| 137 | + }) | ||
| 138 | + | ||
| 139 | + var json = { | ||
| 140 | + "actId": th.data.getActId, //活动Id | ||
| 141 | + "actType": 4, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | ||
| 142 | + "giftBagId": th.data.giftID, //礼包Id | ||
| 143 | + "storeId": a.stoid, //商家Id | ||
| 144 | + "userId": d.user_id //用户ID | ||
| 145 | + }; | ||
| 146 | + var data = JSON.stringify(json); | ||
| 147 | + var url = th.data.url + "/api/weshop/marketing/free/receive/gift/record/insert"; | ||
| 148 | + wx.request({ | ||
| 149 | + url: url, | ||
| 150 | + data: data, | ||
| 151 | + method: 'post', | ||
| 152 | + header: { | ||
| 153 | + 'content-type': 'application/json' | ||
| 154 | + }, // 设置请求的 header | ||
| 155 | + success: function (res) { | ||
| 156 | + th.setData({ | ||
| 157 | + is_sub: 0 | ||
| 158 | + }) | ||
| 159 | + if (res.data.code == 0) { | ||
| 160 | + th.setData({ | ||
| 161 | + receiveState: '已领取' | ||
| 162 | + }) | ||
| 163 | + getApp().my_warnning("领取成功", 1, th); | ||
| 164 | + } else { | ||
| 165 | + getApp().my_warnning("系统繁忙,请稍后再试", 0, th); | ||
| 166 | + } | ||
| 167 | + } | ||
| 168 | + }) | ||
| 169 | + } | ||
| 170 | + }, | ||
| 171 | + //界面跳转 | ||
| 172 | + goto: function (e) { | ||
| 173 | + var url = e.currentTarget.dataset.url; | ||
| 174 | + getApp().goto(url); | ||
| 175 | + }, | ||
| 176 | + //图片失败,默认图片 | ||
| 177 | + bind_bnerr1: function (e) { | ||
| 178 | + var th = this; | ||
| 179 | + var _errImg = e.target.dataset.errorimg; | ||
| 180 | + var _Img = e.target.dataset.img; | ||
| 181 | + if (_Img != undefined) { | ||
| 182 | + var _errObj = {}; | ||
| 183 | + _errObj[_errImg] = "/miniapp/images/giftbag/gift02.png"; | ||
| 184 | + th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | ||
| 185 | + } | ||
| 186 | + }, | ||
| 187 | +}); | ||
| 0 | \ No newline at end of file | 188 | \ No newline at end of file |
pages/giftpack/birthdaygift/birthdaygift.json
0 → 100644
pages/giftpack/birthdaygift/birthdaygift.wxml
0 → 100644
| 1 | +<view> | ||
| 2 | + <view class="image_box"> | ||
| 3 | + <image src="{{iurl+'/miniapp/images/giftbag/birth00.png'}}" lazy-load="true"></image> | ||
| 4 | + </view> | ||
| 5 | + <block wx:if="{{itemShow}}"> | ||
| 6 | + <view class="top"> | ||
| 7 | + <view class="top_box"> | ||
| 8 | + <view class="top_box_text"> | ||
| 9 | + <text>______</text> | ||
| 10 | + </view> | ||
| 11 | + <view class="top_box_text"> | ||
| 12 | + <text>新人专享\n你的美丽我来缔造</text> | ||
| 13 | + </view> | ||
| 14 | + <view class="top_box_text"> | ||
| 15 | + <text >______</text> | ||
| 16 | + </view> | ||
| 17 | + </view> | ||
| 18 | + <block wx:for="{{itemWare}}" wx:for-item="item" wx:for-index="index" wx:key="index"> | ||
| 19 | + <view class="top_item "> | ||
| 20 | + <block wx:if="{{item.lbType==3}}"> | ||
| 21 | + <view class="top_item_img"> | ||
| 22 | + <image src="{{item.fromImage=='' || item.fromImage==null?iurl+'/miniapp/images/giftbag/gift02.png':iurl+item.fromImage}}" lazy-load="true" data-errorimg="itemWare[{{index}}].fromImage" binderror="bind_bnerr1" data-img="{{item.fromImage}}"></image> | ||
| 23 | + </view> | ||
| 24 | + </block> | ||
| 25 | + <block wx:if="{{item.lbType==1}}"> | ||
| 26 | + <view class="top_item_img "> | ||
| 27 | + <image src="{{item.fromImage==''?iurl+'/miniapp/images/giftbag/empty.jpg':iurl+item.fromImage}}" lazy-load="true"></image> | ||
| 28 | + </view> | ||
| 29 | + </block> | ||
| 30 | + <view class="top_item_center "> | ||
| 31 | + <view class="top_item_center_title"> | ||
| 32 | + <block wx:if="{{item.lbType==1}}"> | ||
| 33 | + <text>免费领取</text> | ||
| 34 | + </block> | ||
| 35 | + <block wx:if="{{item.lbType==3}}"> | ||
| 36 | + <text>{{item.fromName}}</text> | ||
| 37 | + </block> | ||
| 38 | + </view> | ||
| 39 | + <view class="top_item_center_ramke "> | ||
| 40 | + <block wx:if="{{item.lbType==1}}"> | ||
| 41 | + <text>{{item.fromName}}</text> | ||
| 42 | + </block> | ||
| 43 | + <block wx:if="{{item.lbType==3}}"> | ||
| 44 | + <text >{{"新人可免费享受专业"+item.fromName+",可以享受"+item.num+"次。"}}</text> | ||
| 45 | + </block> | ||
| 46 | + </view> | ||
| 47 | + </view> | ||
| 48 | + </view> | ||
| 49 | + </block> | ||
| 50 | + </view> | ||
| 51 | + </block> | ||
| 52 | + <block wx:if="{{itemShow}}"> | ||
| 53 | + <view > | ||
| 54 | + <image style="width:10px;height:47px;float:left;top:-38px;left:55px;" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image> | ||
| 55 | + <image style="width:10px;height:47px;float:right;top:-38px;right:55px;" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image> | ||
| 56 | + </view> | ||
| 57 | + </block> | ||
| 58 | + <block wx:if="{{cardShow}}"> | ||
| 59 | + <view > | ||
| 60 | + <view class="top "> | ||
| 61 | + <view class="top_box "> | ||
| 62 | + <view class="top_box_text "> | ||
| 63 | + <text >———</text> | ||
| 64 | + </view> | ||
| 65 | + <view class="top_box_text "> | ||
| 66 | + <text >新人专享优惠券</text> | ||
| 67 | + </view> | ||
| 68 | + <view class="top_box_text "> | ||
| 69 | + <text >———</text> | ||
| 70 | + </view> | ||
| 71 | + </view> | ||
| 72 | + <block wx:for="{{cards}}" wx:for-item="item" wx:for-index="index" wx:key="index"> | ||
| 73 | + <view class="top_card "> | ||
| 74 | + <view class="{{item.useObjectType==1?'top_card_box img1':item.useObjectType==2?'top_card_box img2':'top_card_box img3'}}"> | ||
| 75 | + <!-- class="{{['',item.useObjectType==1?'top_card_box img1':item.useObjectType==2?'top_card_box img2':'top_card_box img3']}}" --> | ||
| 76 | + <view class="top_card_tite_box "> | ||
| 77 | + <block wx:if="{{item.useObjectType==0}}"> | ||
| 78 | + <view class="top_card_tite_a">全场通用</view> | ||
| 79 | + </block> | ||
| 80 | + <block wx:if="{{item.useObjectType==1}}"> | ||
| 81 | + <view class="top_card_tite_b">品牌限定</view> | ||
| 82 | + </block> | ||
| 83 | + <block wx:if="{{item.useObjectType==2}}"> | ||
| 84 | + <view class="top_card_tite_c">品类限定</view> | ||
| 85 | + </block> | ||
| 86 | + <block wx:if="{{item.useObjectType==11}}"> | ||
| 87 | + <view class="top_card_tite_a">用途限定</view> | ||
| 88 | + </block> | ||
| 89 | + <block wx:if="{{item.useObjectType==12}}"> | ||
| 90 | + <view class="top_card_tite_a">分类限定</view> | ||
| 91 | + </block> | ||
| 92 | + </view> | ||
| 93 | + <view class="top_card_counte ">{{item.sum+"元券"}}</view> | ||
| 94 | + <view class="top_card_remak ">{{"满"+item.buySum+"元可以用"}}</view> | ||
| 95 | + </view> | ||
| 96 | + </view> | ||
| 97 | + </block> | ||
| 98 | + </view> | ||
| 99 | + </view> | ||
| 100 | + </block> | ||
| 101 | + <block wx:if="{{cardShow}}"> | ||
| 102 | + <view> | ||
| 103 | + <view> | ||
| 104 | + <image style="width:10px;height:47px;float:left;top:-38px;left:55px;" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image> | ||
| 105 | + <image style="width:10px;height:47px;float:right;top:-38px;right:55px;" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image> | ||
| 106 | + </view> | ||
| 107 | + </view> | ||
| 108 | + </block> | ||
| 109 | + <block wx:if="{{packShow}}"> | ||
| 110 | + <view > | ||
| 111 | + <view class="top "> | ||
| 112 | + <view class="top_box "> | ||
| 113 | + <view class="top_box_text "> | ||
| 114 | + <text >———</text> | ||
| 115 | + </view> | ||
| 116 | + <view class="top_box_text "> | ||
| 117 | + <text >新人专享福利</text> | ||
| 118 | + </view> | ||
| 119 | + <view class="top_box_text "> | ||
| 120 | + <text >———</text> | ||
| 121 | + </view> | ||
| 122 | + </view> | ||
| 123 | + <block wx:if="{{integralShow}}"> | ||
| 124 | + <view> | ||
| 125 | + <view class="top_box_image "> | ||
| 126 | + <image src="{{iurl+'/miniapp/images/giftbag/vip06.jpg'}}" lazy-load="true"></image> | ||
| 127 | + <button>{{integralTitle}}</button> | ||
| 128 | + </view> | ||
| 129 | + </view> | ||
| 130 | + </block> | ||
| 131 | + <block wx:if="{{growUpShow}}"> | ||
| 132 | + <view > | ||
| 133 | + <view class="top_box_image fs36"> | ||
| 134 | + <image src="{{iurl+'/miniapp/images/giftbag/vip07.jpg'}}" lazy-load="true"></image> | ||
| 135 | + <button>{{growUpTitle}}</button> | ||
| 136 | + </view> | ||
| 137 | + </view> | ||
| 138 | + </block> | ||
| 139 | + </view> | ||
| 140 | + </view> | ||
| 141 | + </block> | ||
| 142 | + <block wx:if="{{textShow}}"> | ||
| 143 | + <view class="foot_box"> | ||
| 144 | + <view class="foot_box_title fs36"> | ||
| 145 | + <text>活动规则:</text> | ||
| 146 | + </view> | ||
| 147 | + <view class="foot_box_text"> | ||
| 148 | + <rich-text nodes="{{textTitle}}"></rich-text> | ||
| 149 | + </view> | ||
| 150 | + </view> | ||
| 151 | + </block> | ||
| 152 | + <view class="button_box"> | ||
| 153 | + <view > | ||
| 154 | + <button class="button" bindtap="goto" data-url="/pages/index/index/index">进入商城购物</button> | ||
| 155 | + </view> | ||
| 156 | + <view class="button_text "> | ||
| 157 | + <text >本活动最终解释权归公司所有,如果有问题请联系客服</text> | ||
| 158 | + </view> | ||
| 159 | + </view> | ||
| 160 | + <view class="foot_empty "></view> | ||
| 161 | + <view class="foot_button"> | ||
| 162 | + <view class="{{receiveState=='已领取'?'foot_button_notbuy':'foot_button_buy'}}" bindtap="GetReceive"> | ||
| 163 | + <text>{{receiveState}}</text> | ||
| 164 | + </view> | ||
| 165 | + </view> | ||
| 166 | +</view> | ||
| 167 | +<!-- 引入提示组件 --> | ||
| 168 | +<warn id="warn"></warn> | ||
| 169 | +<my_confirm id="my_confirm"></my_confirm> | ||
| 0 | \ No newline at end of file | 170 | \ No newline at end of file |
pages/giftpack/birthdaygift/birthdaygift.wxss
0 → 100644
| 1 | +@charset "UTF-8"; | ||
| 2 | +/* Author XGQ | ||
| 3 | + * 2019-10-27 | ||
| 4 | + */ | ||
| 5 | +.image_box { | ||
| 6 | + -webkit-box-pack: center; | ||
| 7 | + -webkit-justify-content: center; | ||
| 8 | + justify-content: center; | ||
| 9 | +} | ||
| 10 | +.image_box image { | ||
| 11 | + width: 100%; | ||
| 12 | + height: 690rpx; | ||
| 13 | +} | ||
| 14 | +.top { | ||
| 15 | + margin: -20rpx 28rpx 45rpx 28rpx; | ||
| 16 | + padding: 10rpx 10rpx 70rpx 10rpx; | ||
| 17 | + background-color: #FFFFFF; | ||
| 18 | + border-radius: 0rpx 0rpx 15rpx 15rpx; | ||
| 19 | +} | ||
| 20 | +.top_box { | ||
| 21 | + display: -webkit-box; | ||
| 22 | + display: -webkit-flex; | ||
| 23 | + display: flex; | ||
| 24 | + text-align: center; | ||
| 25 | + -webkit-box-pack: center; | ||
| 26 | + -webkit-justify-content: center; | ||
| 27 | + justify-content: center; | ||
| 28 | +} | ||
| 29 | +.top_box_text { | ||
| 30 | + -webkit-box-pack: center; | ||
| 31 | + -webkit-justify-content: center; | ||
| 32 | + justify-content: center; | ||
| 33 | + margin: 50rpx 15rpx 20rpx 15rpx; | ||
| 34 | +} | ||
| 35 | +.top_box_text text { | ||
| 36 | + color: #FB6451; | ||
| 37 | + font-size: 40rpx; | ||
| 38 | +} | ||
| 39 | +.top_item { | ||
| 40 | + display: -webkit-box; | ||
| 41 | + display: -webkit-flex; | ||
| 42 | + display: flex; | ||
| 43 | + width: 100%; | ||
| 44 | + margin: 60rpx 0 0 0; | ||
| 45 | +} | ||
| 46 | +.top_item_img { | ||
| 47 | + float: left; | ||
| 48 | + width: 28%; | ||
| 49 | + margin: 0rpx 10rpx 0rpx 20rpx; | ||
| 50 | +} | ||
| 51 | +.top_item_img image { | ||
| 52 | + width: 150rpx; | ||
| 53 | + height: 150rpx; | ||
| 54 | + border-radius: 50%; | ||
| 55 | + border: #F96865 solid 3rpx; | ||
| 56 | +} | ||
| 57 | +.top_item_center { | ||
| 58 | + float: left; | ||
| 59 | + width: 50%; | ||
| 60 | +} | ||
| 61 | +.top_item_center_title { | ||
| 62 | + font-size: 35rpx; | ||
| 63 | + color: #FB6451; | ||
| 64 | + -webkit-box-pack: start; | ||
| 65 | + -webkit-justify-content: flex-start; | ||
| 66 | + justify-content: flex-start; | ||
| 67 | + padding: 0 10rpx 15rpx 0rpx; | ||
| 68 | + word-break: break-all; | ||
| 69 | + /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/ | ||
| 70 | + text-overflow: ellipsis; | ||
| 71 | + display: -webkit-box; | ||
| 72 | + /** 对象作为伸缩盒子模型显示 **/ | ||
| 73 | + -webkit-box-orient: vertical; | ||
| 74 | + /** 设置或检索伸缩盒对象的子元素的排列方式 **/ | ||
| 75 | + -webkit-line-clamp: 2; | ||
| 76 | + /** 显示的行数 **/ | ||
| 77 | + overflow: hidden; | ||
| 78 | + /** 隐藏超出的内容 **/ | ||
| 79 | +} | ||
| 80 | +.top_item_center_ramke { | ||
| 81 | + font-size: 25rpx; | ||
| 82 | + -webkit-box-pack: start; | ||
| 83 | + -webkit-justify-content: flex-start; | ||
| 84 | + justify-content: flex-start; | ||
| 85 | + line-height: 35rpx; | ||
| 86 | + letter-spacing: 0.5rpx; | ||
| 87 | + word-break: break-all; | ||
| 88 | + /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/ | ||
| 89 | + text-overflow: ellipsis; | ||
| 90 | + display: -webkit-box; | ||
| 91 | + /** 对象作为伸缩盒子模型显示 **/ | ||
| 92 | + -webkit-box-orient: vertical; | ||
| 93 | + /** 设置或检索伸缩盒对象的子元素的排列方式 **/ | ||
| 94 | + -webkit-line-clamp: 2; | ||
| 95 | + /** 显示的行数 **/ | ||
| 96 | + overflow: hidden; | ||
| 97 | + /** 隐藏超出的内容 **/ | ||
| 98 | +} | ||
| 99 | +.top_item_button { | ||
| 100 | + float: right; | ||
| 101 | + width: 22%; | ||
| 102 | + padding: 65rpx 20rpx 0 1rpx; | ||
| 103 | +} | ||
| 104 | +.top_item_button button { | ||
| 105 | + font-size: 25rpx; | ||
| 106 | + background: #fd6969; | ||
| 107 | + color: #FFFFFF; | ||
| 108 | + border-radius: 50rpx; | ||
| 109 | + height: 45rpx; | ||
| 110 | + line-height: 45rpx; | ||
| 111 | +} | ||
| 112 | +.top_card { | ||
| 113 | + width: calc(50% - 30rpx); | ||
| 114 | + display: inline-block; | ||
| 115 | + margin: 15rpx; | ||
| 116 | +} | ||
| 117 | +.top_card_box { | ||
| 118 | + background-size: cover; | ||
| 119 | + background-position: center; | ||
| 120 | + background-repeat: no-repeat; | ||
| 121 | + border-radius: 20rpx; | ||
| 122 | + height: 250rpx; | ||
| 123 | + margin: 5rpx; | ||
| 124 | +} | ||
| 125 | +.img1 { | ||
| 126 | + background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip01.png); | ||
| 127 | +} | ||
| 128 | +.img2 { | ||
| 129 | + background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip02.png); | ||
| 130 | +} | ||
| 131 | +.img3 { | ||
| 132 | + background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip03.png); | ||
| 133 | +} | ||
| 134 | +.top_card_tite_box { | ||
| 135 | + width: 100%; | ||
| 136 | + display: -webkit-box; | ||
| 137 | + display: -webkit-flex; | ||
| 138 | + display: flex; | ||
| 139 | + -webkit-box-pack: end; | ||
| 140 | + -webkit-justify-content: flex-end; | ||
| 141 | + justify-content: flex-end; | ||
| 142 | +} | ||
| 143 | +.top_card_tite_a { | ||
| 144 | + padding: 5rpx 25rpx 5rpx 25rpx; | ||
| 145 | + line-height: 29rpx; | ||
| 146 | + font-size: 25rpx; | ||
| 147 | + color: #FFFFFF; | ||
| 148 | + background: #ffa7c0; | ||
| 149 | + border-radius: 0rpx 20rpx 0rpx 6rpx; | ||
| 150 | +} | ||
| 151 | +.top_card_tite_b { | ||
| 152 | + padding: 5rpx 25rpx 5rpx 25rpx; | ||
| 153 | + line-height: 29rpx; | ||
| 154 | + font-size: 25rpx; | ||
| 155 | + color: #FFFFFF; | ||
| 156 | + background: #50dfdb; | ||
| 157 | + border-radius: 0rpx 20rpx 0rpx 6rpx; | ||
| 158 | +} | ||
| 159 | +.top_card_tite_c { | ||
| 160 | + padding: 5rpx 25rpx 5rpx 25rpx; | ||
| 161 | + line-height: 29rpx; | ||
| 162 | + font-size: 25rpx; | ||
| 163 | + color: #FFFFFF; | ||
| 164 | + background: #92cbff; | ||
| 165 | + border-radius: 0rpx 20rpx 0rpx 6rpx; | ||
| 166 | +} | ||
| 167 | +.top_card_tite_d { | ||
| 168 | + padding: 5rpx 25rpx 5rpx 25rpx; | ||
| 169 | + line-height: 29rpx; | ||
| 170 | + font-size: 25rpx; | ||
| 171 | + color: #FFFFFF; | ||
| 172 | + border-radius: 0rpx 20rpx 0rpx 6rpx; | ||
| 173 | +} | ||
| 174 | +.top_card_counte { | ||
| 175 | + padding: 40rpx 20rpx 0 0; | ||
| 176 | + text-align: center; | ||
| 177 | + display: -webkit-box; | ||
| 178 | + display: -webkit-flex; | ||
| 179 | + display: flex; | ||
| 180 | + -webkit-box-pack: center; | ||
| 181 | + -webkit-justify-content: center; | ||
| 182 | + justify-content: center; | ||
| 183 | + -webkit-box-align: center; | ||
| 184 | + -webkit-align-items: center; | ||
| 185 | + align-items: center; | ||
| 186 | + color: #FFFFFF; | ||
| 187 | + font-size: 40rpx; | ||
| 188 | +} | ||
| 189 | +.top_card_remak { | ||
| 190 | + padding: 20rpx 0 40rpx 0; | ||
| 191 | + text-align: center; | ||
| 192 | + display: -webkit-box; | ||
| 193 | + display: -webkit-flex; | ||
| 194 | + display: flex; | ||
| 195 | + -webkit-box-pack: center; | ||
| 196 | + -webkit-justify-content: center; | ||
| 197 | + justify-content: center; | ||
| 198 | + -webkit-box-align: center; | ||
| 199 | + -webkit-align-items: center; | ||
| 200 | + align-items: center; | ||
| 201 | + font-size: 20rpx; | ||
| 202 | + color: #FFFFFF; | ||
| 203 | +} | ||
| 204 | +.top_card_button_a button { | ||
| 205 | + margin: 0 85rpx; | ||
| 206 | + background: #ffa6bc; | ||
| 207 | + border-radius: 50rpx; | ||
| 208 | + line-height: 40rpx; | ||
| 209 | + height: 40rpx; | ||
| 210 | + color: white; | ||
| 211 | + font-size: 25rpx; | ||
| 212 | +} | ||
| 213 | +.top_card_button_b button { | ||
| 214 | + margin: 0 85rpx; | ||
| 215 | + background: #50dfdb; | ||
| 216 | + border-radius: 50rpx; | ||
| 217 | + line-height: 40rpx; | ||
| 218 | + height: 40rpx; | ||
| 219 | + color: white; | ||
| 220 | + font-size: 25rpx; | ||
| 221 | +} | ||
| 222 | +.top_card_button_c button { | ||
| 223 | + margin: 0 85rpx; | ||
| 224 | + background: #75bcfc; | ||
| 225 | + border-radius: 50rpx; | ||
| 226 | + line-height: 40rpx; | ||
| 227 | + height: 40rpx; | ||
| 228 | + color: white; | ||
| 229 | + font-size: 25rpx; | ||
| 230 | +} | ||
| 231 | +.top_card_button_d button { | ||
| 232 | + margin: 0 85rpx; | ||
| 233 | + border-radius: 50rpx; | ||
| 234 | + line-height: 40rpx; | ||
| 235 | + height: 40rpx; | ||
| 236 | + color: white; | ||
| 237 | + font-size: 25rpx; | ||
| 238 | +} | ||
| 239 | +.top_box_image { | ||
| 240 | + padding: 20rpx 20rpx 20rpx 20rpx; | ||
| 241 | +} | ||
| 242 | +.top_box_image image { | ||
| 243 | + height: 216rpx; | ||
| 244 | + width: 100%; | ||
| 245 | +} | ||
| 246 | +.top_box_image button { | ||
| 247 | + margin: 15rpx 95rpx 0rpx 95rpx; | ||
| 248 | + background: #fe6a6a; | ||
| 249 | + border-radius: 50rpx; | ||
| 250 | + line-height: 60rpx; | ||
| 251 | + height: 60rpx; | ||
| 252 | + color: white; | ||
| 253 | + font-size: 30rpx; | ||
| 254 | +} | ||
| 255 | +.foot_box { | ||
| 256 | + margin: 0 30rpx 40rpx 30rpx; | ||
| 257 | + background: #FFFFFF; | ||
| 258 | + border-radius: 20rpx; | ||
| 259 | +} | ||
| 260 | +.foot_box_title { | ||
| 261 | + font-size: 43rpx; | ||
| 262 | + color: #000000; | ||
| 263 | + padding: 20rpx 30rpx 20rpx 30rpx; | ||
| 264 | +} | ||
| 265 | +.foot_box_text { | ||
| 266 | + font-size: 30rpx; | ||
| 267 | + color: #000000; | ||
| 268 | + line-height: 48rpx; | ||
| 269 | + padding: 20rpx 35rpx 50rpx 30rpx; | ||
| 270 | +} | ||
| 271 | +.button_box { | ||
| 272 | + margin: 50rpx 50rpx 50rpx 50rpx; | ||
| 273 | + text-align: center; | ||
| 274 | +} | ||
| 275 | +.button { | ||
| 276 | + margin: 0 30rpx; | ||
| 277 | + background: #61d3dd; | ||
| 278 | + border-radius: 50rpx; | ||
| 279 | + line-height: 80rpx; | ||
| 280 | + height: 80rpx; | ||
| 281 | + color: white; | ||
| 282 | + font-size: 35rpx; | ||
| 283 | +} | ||
| 284 | +.button_text { | ||
| 285 | + padding-top: 20rpx; | ||
| 286 | + font-size: 20rpx; | ||
| 287 | + color: white; | ||
| 288 | + height: 100rpx; | ||
| 289 | +} | ||
| 290 | +.foot_empty { | ||
| 291 | + height: 90rpx; | ||
| 292 | +} | ||
| 293 | +.foot_button { | ||
| 294 | + display: -webkit-box; | ||
| 295 | + display: -webkit-flex; | ||
| 296 | + display: flex; | ||
| 297 | + margin: 20rpx 0rpx 0rpx 0rpx; | ||
| 298 | + padding: 25rpx 0rpx; | ||
| 299 | + background: #FFFFFF; | ||
| 300 | + text-align: center; | ||
| 301 | + -webkit-box-pack: center; | ||
| 302 | + -webkit-justify-content: center; | ||
| 303 | + justify-content: center; | ||
| 304 | + position: fixed; | ||
| 305 | + bottom: 0; | ||
| 306 | + left: 0; | ||
| 307 | + width: 100%; | ||
| 308 | +} | ||
| 309 | +.foot_button_buy { | ||
| 310 | + background: #e4010c; | ||
| 311 | + color: #FFFFFF; | ||
| 312 | + width: 400rpx; | ||
| 313 | + height: 70rpx; | ||
| 314 | + font-size: 28rpx; | ||
| 315 | + line-height: 70rpx; | ||
| 316 | + border-radius: 40rpx; | ||
| 317 | +} | ||
| 318 | +.foot_button_notbuy{ | ||
| 319 | + background: #999999; | ||
| 320 | + color: #FFFFFF; | ||
| 321 | + width: 400rpx; | ||
| 322 | + height: 70rpx; | ||
| 323 | + font-size: 28rpx; | ||
| 324 | + line-height: 70rpx; | ||
| 325 | + border-radius: 30rpx 30rpx 30rpx 30rpx; | ||
| 326 | +} | ||
| 327 | +page { | ||
| 328 | + background-color: #9be0e5; | ||
| 329 | +} | ||
| 330 | +button::after { | ||
| 331 | + border: none; | ||
| 332 | +} | ||
| 333 | +.foot_box_text ._img { | ||
| 334 | + width: 100%; | ||
| 335 | +} | ||
| 336 | +.foot_box_text .img { | ||
| 337 | + line-height: 0; | ||
| 338 | +} | ||
| 339 | + |
pages/giftpack/buygiftpack/giftpackbuy.js
| @@ -11,8 +11,8 @@ Page({ | @@ -11,8 +11,8 @@ Page({ | ||
| 11 | getStorageID: '', | 11 | getStorageID: '', |
| 12 | getUserID: '', | 12 | getUserID: '', |
| 13 | wareCard: [], | 13 | wareCard: [], |
| 14 | - page: 0, | ||
| 15 | - pageSize: 10, | 14 | + // page: 0, |
| 15 | + // pageSize: 10, | ||
| 16 | isEmpty: false, | 16 | isEmpty: false, |
| 17 | loadingType: 0, //定义加载方式 0---contentdown 1---contentrefresh 2---contentnomore | 17 | loadingType: 0, //定义加载方式 0---contentdown 1---contentrefresh 2---contentnomore |
| 18 | contentText: { | 18 | contentText: { |
| @@ -23,7 +23,7 @@ Page({ | @@ -23,7 +23,7 @@ Page({ | ||
| 23 | ismore: 0, //数据是否全部加载完成 | 23 | ismore: 0, //数据是否全部加载完成 |
| 24 | is_read: 0, //是否查询过我的礼包接口 | 24 | is_read: 0, //是否查询过我的礼包接口 |
| 25 | curpage: 1, //当前分页数 | 25 | curpage: 1, //当前分页数 |
| 26 | - pageSize: 3, //页大小 | 26 | + pageSize: 10, //页大小 |
| 27 | total: 0, //总数量 | 27 | total: 0, //总数量 |
| 28 | }, | 28 | }, |
| 29 | onLoad: function(options) { | 29 | onLoad: function(options) { |
| @@ -51,6 +51,9 @@ Page({ | @@ -51,6 +51,9 @@ Page({ | ||
| 51 | var th = this; | 51 | var th = this; |
| 52 | var id = e.currentTarget.dataset.id; //活动id | 52 | var id = e.currentTarget.dataset.id; //活动id |
| 53 | var my_confirm = th.selectComponent("#my_confirm"); //组件的id | 53 | var my_confirm = th.selectComponent("#my_confirm"); //组件的id |
| 54 | + var order_sn = e.currentTarget.dataset.order_sn; //订单号 | ||
| 55 | + var money = e.currentTarget.dataset.money; //支付金额 | ||
| 56 | + | ||
| 54 | my_confirm.open( | 57 | my_confirm.open( |
| 55 | "是否确定购买该礼包", | 58 | "是否确定购买该礼包", |
| 56 | "取消", | 59 | "取消", |
| @@ -64,7 +67,7 @@ Page({ | @@ -64,7 +67,7 @@ Page({ | ||
| 64 | "actId": '', //活动Id | 67 | "actId": '', //活动Id |
| 65 | "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | 68 | "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 |
| 66 | "buyType": '2', //1=积分兑换 2=余额购买 | 69 | "buyType": '2', //1=积分兑换 2=余额购买 |
| 67 | - "lbId": id, //礼包Id | 70 | + "giftBagId": id, //礼包Id |
| 68 | "storeId": that.getStorageID, //商家Id | 71 | "storeId": that.getStorageID, //商家Id |
| 69 | "userId": that.getUserID, //用户ID | 72 | "userId": that.getUserID, //用户ID |
| 70 | "buyFrom": 2 | 73 | "buyFrom": 2 |
| @@ -80,19 +83,19 @@ Page({ | @@ -80,19 +83,19 @@ Page({ | ||
| 80 | }, // 设置请求的 header | 83 | }, // 设置请求的 header |
| 81 | success: function(res) { | 84 | success: function(res) { |
| 82 | if (res.data.code == 0) { | 85 | if (res.data.code == 0) { |
| 83 | - res = res.data.data; | 86 | + var order_sn = res.data.data.orderSn; |
| 87 | + res = res.data.data.result; | ||
| 88 | + var url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + order_sn; | ||
| 84 | wx.requestPayment({ | 89 | wx.requestPayment({ |
| 85 | timeStamp: String(res.timeStamp), | 90 | timeStamp: String(res.timeStamp), |
| 86 | nonceStr: res.nonceStr, | 91 | nonceStr: res.nonceStr, |
| 87 | package: res.packageValue, | 92 | package: res.packageValue, |
| 88 | signType: res.signType, | 93 | signType: res.signType, |
| 89 | paySign: res.paySign, | 94 | paySign: res.paySign, |
| 90 | - success: function(n) { | ||
| 91 | - | 95 | + success: function(res) { |
| 96 | + getApp().goto(url); | ||
| 92 | }, | 97 | }, |
| 93 | - fail: function(n) { | ||
| 94 | - | ||
| 95 | - } | 98 | + fail: function(res) {} |
| 96 | }); | 99 | }); |
| 97 | } else { | 100 | } else { |
| 98 | getApp().my_warnning(res.data.msg, 0, th); | 101 | getApp().my_warnning(res.data.msg, 0, th); |
| @@ -125,7 +128,7 @@ Page({ | @@ -125,7 +128,7 @@ Page({ | ||
| 125 | "actId": '', //活动Id | 128 | "actId": '', //活动Id |
| 126 | "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | 129 | "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 |
| 127 | "buyType": '1', //1=积分兑换 2=余额购买 | 130 | "buyType": '1', //1=积分兑换 2=余额购买 |
| 128 | - "lbId": id, //礼包Id | 131 | + "giftBagId": id, //礼包Id |
| 129 | "storeId": that.getStorageID, //商家Id | 132 | "storeId": that.getStorageID, //商家Id |
| 130 | "userId": that.getUserID //用户ID | 133 | "userId": that.getUserID //用户ID |
| 131 | }; | 134 | }; |
| @@ -196,9 +199,8 @@ Page({ | @@ -196,9 +199,8 @@ Page({ | ||
| 196 | navigateTo: function(e) { | 199 | navigateTo: function(e) { |
| 197 | var th = this; | 200 | var th = this; |
| 198 | var url = e.currentTarget.dataset.url; | 201 | var url = e.currentTarget.dataset.url; |
| 199 | - wx.navigateTo({ | ||
| 200 | - url: url, | ||
| 201 | - }) | 202 | + getApp().goto(url); |
| 203 | + | ||
| 202 | }, | 204 | }, |
| 203 | //下拉事件 | 205 | //下拉事件 |
| 204 | onReachBottom: function() { | 206 | onReachBottom: function() { |
| @@ -210,5 +212,16 @@ Page({ | @@ -210,5 +212,16 @@ Page({ | ||
| 210 | }) | 212 | }) |
| 211 | th.getList(); | 213 | th.getList(); |
| 212 | }, | 214 | }, |
| 213 | - | 215 | + //图片失败,默认图片 |
| 216 | + bind_bnerr2: function(e) { | ||
| 217 | + var _errImg = e.target.dataset.errorimg; | ||
| 218 | + var _errObj = {}; | ||
| 219 | + _errObj[_errImg] = "/public/images/empty.jpg"; | ||
| 220 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | ||
| 221 | + }, | ||
| 222 | + goto: function(e) { | ||
| 223 | + var th = this; | ||
| 224 | + var url = e.currentTarget.dataset.url; | ||
| 225 | + getApp().goto(url); | ||
| 226 | + } | ||
| 214 | }) | 227 | }) |
| 215 | \ No newline at end of file | 228 | \ No newline at end of file |
pages/giftpack/buygiftpack/giftpackbuy.json
| 1 | { | 1 | { |
| 2 | "navigationBarTitleText": "礼包列表", | 2 | "navigationBarTitleText": "礼包列表", |
| 3 | - "navigationStyle": "custom", | ||
| 4 | - "enablePullDownRefresh": false, | ||
| 5 | "usingComponents": { | 3 | "usingComponents": { |
| 6 | "warn": "/components/long_warn/long_warn", | 4 | "warn": "/components/long_warn/long_warn", |
| 7 | "my_confirm": "/components/my_confirm/my_confirm" | 5 | "my_confirm": "/components/my_confirm/my_confirm" |
pages/giftpack/buygiftpack/giftpackbuy.wxml
| 1 | <view class="top_img"> | 1 | <view class="top_img"> |
| 2 | <view class="top_img"> | 2 | <view class="top_img"> |
| 3 | - <image src="{{iurl+'/miniapp/images/giftbag/gift00.jpg'}}" lazy-load="true"></image> | 3 | + <image src="{{iurl+'/miniapp/images/giftbag/gift00.jpg?v=2019'}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image> |
| 4 | </view> | 4 | </view> |
| 5 | <view class="top_title"> | 5 | <view class="top_title"> |
| 6 | <view class="top_title_box"> | 6 | <view class="top_title_box"> |
| @@ -13,13 +13,13 @@ | @@ -13,13 +13,13 @@ | ||
| 13 | </view> | 13 | </view> |
| 14 | <block wx:for="{{wareCard}}" wx:for-item="items" wx:for-index="index" wx:key="index"> | 14 | <block wx:for="{{wareCard}}" wx:for-item="items" wx:for-index="index" wx:key="index"> |
| 15 | <view class="content_box"> | 15 | <view class="content_box"> |
| 16 | - <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=1&lbId={{items.lbId}}&orderSn={{items.orderSn}}"> | 16 | + <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=1&lbId={{items.lbId}}&orderSn=''"> |
| 17 | <view class="content_box_img"> | 17 | <view class="content_box_img"> |
| 18 | - <image src="{{iurl+items.lbUrl}}" lazy-load="true"></image> | 18 | + <image src="{{iurl+items.lbUrl}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image> |
| 19 | </view> | 19 | </view> |
| 20 | <view class="content_box_title"> | 20 | <view class="content_box_title"> |
| 21 | <view class="content_ware_title"> | 21 | <view class="content_ware_title"> |
| 22 | - <text bindtap="__e">{{items.giftTitle}}</text> | 22 | + <text>{{items.giftTitle}}</text> |
| 23 | </view> | 23 | </view> |
| 24 | <view class="content_ware_type flex"> | 24 | <view class="content_ware_type flex"> |
| 25 | <block wx:if="{{items.payMoney>0}}"> | 25 | <block wx:if="{{items.payMoney>0}}"> |
| @@ -48,15 +48,29 @@ | @@ -48,15 +48,29 @@ | ||
| 48 | <text>{{"已售:"+items.giftQty+"件"}}</text> | 48 | <text>{{"已售:"+items.giftQty+"件"}}</text> |
| 49 | </view> | 49 | </view> |
| 50 | <view class="flex-vertical"> | 50 | <view class="flex-vertical"> |
| 51 | - <block wx:if="{{items.payMoney>0}}"> | ||
| 52 | - <view class="box_button_buy" bindtap="GetBuyPrice" data-id="{{items.lbId}}"> | ||
| 53 | - <button>立即购买</button> | ||
| 54 | - </view> | 51 | + <block wx:if="{{items.payMoney>0 && items.payIntegral>0}}"> |
| 52 | + <block wx:if="{{items.payMoney>0}}"> | ||
| 53 | + <view class="flex" bindtap="GetBuyPrice" data-id="{{items.lbId}}" data-money="{{items.payMoney}}"> | ||
| 54 | + <button class="box_button_dui">立即购买</button> | ||
| 55 | + </view> | ||
| 56 | + </block> | ||
| 57 | + <block wx:if="{{items.payIntegral>0}}"> | ||
| 58 | + <view class="flex" bindtap="GetBuyIntegral" data-id="{{items.lbId}}"> | ||
| 59 | + <button class="box_button_dui box_button_buy">立即兑换</button> | ||
| 60 | + </view> | ||
| 61 | + </block> | ||
| 55 | </block> | 62 | </block> |
| 56 | - <block wx:if="{{items.payIntegral>0}}"> | ||
| 57 | - <view class="box_button_dui" bindtap="GetBuyIntegral" data-id="{{items.lbId}}"> | ||
| 58 | - <button>立即兑换</button> | ||
| 59 | - </view> | 63 | + <block wx:else> |
| 64 | + <block wx:if="{{items.payMoney>0}}"> | ||
| 65 | + <view class="flex" bindtap="GetBuyPrice" data-id="{{items.lbId}}" data-money="{{items.payMoney}}"> | ||
| 66 | + <button class="box_button_dui box_button_buy">立即购买</button> | ||
| 67 | + </view> | ||
| 68 | + </block> | ||
| 69 | + <block wx:if="{{items.payIntegral>0}}"> | ||
| 70 | + <view class="flex" bindtap="GetBuyIntegral" data-id="{{items.lbId}}"> | ||
| 71 | + <button class="box_button_dui box_button_buy">立即兑换</button> | ||
| 72 | + </view> | ||
| 73 | + </block> | ||
| 60 | </block> | 74 | </block> |
| 61 | </view> | 75 | </view> |
| 62 | </view> | 76 | </view> |
| @@ -71,7 +85,7 @@ | @@ -71,7 +85,7 @@ | ||
| 71 | <text>当前暂无礼包</text> | 85 | <text>当前暂无礼包</text> |
| 72 | </view> | 86 | </view> |
| 73 | <view class="foot_empty_button"> | 87 | <view class="foot_empty_button"> |
| 74 | - <text bindtap="__e">去获取</text> | 88 | + <text bindtap="goto" data-url="/pages/index/index/index">回到首页</text> |
| 75 | </view> | 89 | </view> |
| 76 | </view> | 90 | </view> |
| 77 | </block> | 91 | </block> |
pages/giftpack/buygiftpack/giftpackbuy.wxss
| @@ -16,7 +16,7 @@ page { | @@ -16,7 +16,7 @@ page { | ||
| 16 | 16 | ||
| 17 | .top_img image { | 17 | .top_img image { |
| 18 | width: 100%; | 18 | width: 100%; |
| 19 | - height: 660rpx; | 19 | + |
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | .top_title { | 22 | .top_title { |
| @@ -150,16 +150,12 @@ page { | @@ -150,16 +150,12 @@ page { | ||
| 150 | line-height: 110rpx; | 150 | line-height: 110rpx; |
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | -.box_button_remark { | ||
| 154 | - | ||
| 155 | -} | ||
| 156 | - | ||
| 157 | .box_button_remark text { | 153 | .box_button_remark text { |
| 158 | font-size: 28rpx; | 154 | font-size: 28rpx; |
| 159 | color: #b9b5b5; | 155 | color: #b9b5b5; |
| 160 | } | 156 | } |
| 161 | 157 | ||
| 162 | -.box_button_buy button { | 158 | +.box_button_dui { |
| 163 | display: inline-block; | 159 | display: inline-block; |
| 164 | width: 160rpx; | 160 | width: 160rpx; |
| 165 | height: 50rpx; | 161 | height: 50rpx; |
| @@ -167,17 +163,14 @@ page { | @@ -167,17 +163,14 @@ page { | ||
| 167 | background: #fff; | 163 | background: #fff; |
| 168 | color: #000; | 164 | color: #000; |
| 169 | line-height: 50rpx; | 165 | line-height: 50rpx; |
| 166 | + margin-left: 20rpx; | ||
| 167 | + border-radius: 10rpx; | ||
| 170 | } | 168 | } |
| 171 | 169 | ||
| 172 | -.box_button_dui button { | ||
| 173 | - display: inline-block; | ||
| 174 | - width: 160rpx; | ||
| 175 | - height: 50rpx; | ||
| 176 | - font-size: 20rpx; | 170 | +.box_button_buy { |
| 177 | background: #d41c34; | 171 | background: #d41c34; |
| 178 | color: #fff; | 172 | color: #fff; |
| 179 | - line-height: 50rpx; | ||
| 180 | - margin-left: 20rpx; | 173 | + border-radius: 10rpx; |
| 181 | } | 174 | } |
| 182 | 175 | ||
| 183 | .foot_box { | 176 | .foot_box { |
pages/giftpack/evaluategift/evaluategift.js
0 → 100644
| 1 | +var i = require("../../../utils/util.js") | ||
| 2 | +var e = getApp(), | ||
| 3 | + a = e.globalData.setting, | ||
| 4 | + os = a, | ||
| 5 | + t = e.request, | ||
| 6 | + d = e.globalData; | ||
| 7 | +Page({ | ||
| 8 | + data: { | ||
| 9 | + url: a.url, //接口网址 | ||
| 10 | + iurl: a.imghost, //图片前缀网址 | ||
| 11 | + itemShow: false, //项目栏目是否显示 | ||
| 12 | + cardShow: false, //代金券栏目是否显示 | ||
| 13 | + packShow: false, //福利栏目是否显示 | ||
| 14 | + textShow: false, //规则是否显示 | ||
| 15 | + integralShow: true, //积分领取是否显示 | ||
| 16 | + growUpShow: true, //成长值领取是否显示 | ||
| 17 | + itemButton: '', | ||
| 18 | + cardButton: '', | ||
| 19 | + getActId: '', | ||
| 20 | + getActType: '', | ||
| 21 | + giftBagId: '', | ||
| 22 | + receiveState: '一键全部领取', | ||
| 23 | + textTitle: '', | ||
| 24 | + getUrl: '', | ||
| 25 | + noShow: false, | ||
| 26 | + cards: [], //礼包内容--礼券 | ||
| 27 | + itemWare: [], //礼包内容--服务项目 | ||
| 28 | + integralTitle: "", | ||
| 29 | + growUpTitle: "", | ||
| 30 | + is_sub: 0, //是否重复领取 | ||
| 31 | + orderNumber: "", //订单号 | ||
| 32 | + orderGoodsId: "", //商品id | ||
| 33 | + orderType:1, | ||
| 34 | + }, | ||
| 35 | + GetList: function() { | ||
| 36 | + var th = this; | ||
| 37 | + var url = "/api/weshop/marketing/giftbag/bound/get"; | ||
| 38 | + getApp().request.promiseGet(url, { | ||
| 39 | + data: { | ||
| 40 | + "actId": th.data.getActId, //活动Id | ||
| 41 | + "actType": 2, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | ||
| 42 | + "storeId": a.stoid, //商家Id | ||
| 43 | + "userId": d.user_id, //用户ID | ||
| 44 | + "orderNumber": th.data.orderNumber, | ||
| 45 | + "orderType": th.data.orderType, | ||
| 46 | + "orderGoodsId": th.data.orderGoodsId, | ||
| 47 | + "gifbagid": th.data.giftBagId | ||
| 48 | + } | ||
| 49 | + }).then(res => { | ||
| 50 | + if (res.data.code == 0) { | ||
| 51 | + if (res.data.data.lbCoupons.length > 0 && res.data.data.lbCoupons != null) { | ||
| 52 | + //礼包内容--礼券 | ||
| 53 | + th.setData({ | ||
| 54 | + cardShow: true, | ||
| 55 | + cards: res.data.data.lbCoupons | ||
| 56 | + }) | ||
| 57 | + } | ||
| 58 | + if (res.data.data.lbSM.length > 0 && res.data.data.lbSM != null) { | ||
| 59 | + //礼包内容--服务项目 | ||
| 60 | + th.setData({ | ||
| 61 | + itemShow: true, | ||
| 62 | + itemWare: res.data.data.lbSM | ||
| 63 | + }) | ||
| 64 | + } | ||
| 65 | + //礼包积分 | ||
| 66 | + if (res.data.data.lbIntegral <= 0) { | ||
| 67 | + if (res.data.data.lbGrowthValue <= 0) { | ||
| 68 | + th.setData({ | ||
| 69 | + packShow: false | ||
| 70 | + }) | ||
| 71 | + } else { | ||
| 72 | + th.setData({ | ||
| 73 | + packShow: false, | ||
| 74 | + integralShow: false, | ||
| 75 | + growUpShow: true | ||
| 76 | + }) | ||
| 77 | + } | ||
| 78 | + | ||
| 79 | + } else { | ||
| 80 | + if (res.data.data.lbGrowthValue > 0) { | ||
| 81 | + th.setData({ | ||
| 82 | + packShow: true | ||
| 83 | + }) | ||
| 84 | + } else { | ||
| 85 | + th.setData({ | ||
| 86 | + packShow: true, | ||
| 87 | + integralShow: true, | ||
| 88 | + growUpShow: false | ||
| 89 | + }) | ||
| 90 | + } | ||
| 91 | + } | ||
| 92 | + th.setData({ | ||
| 93 | + integralTitle: '价值' + res.data.data.lbIntegral + '积分', | ||
| 94 | + growUpTitle: '价值' + res.data.data.lbGrowthValue + '成长值' | ||
| 95 | + }) | ||
| 96 | + if (res.data.data.receiveState == 0) { | ||
| 97 | + th.setData({ | ||
| 98 | + receiveState: '一键全部领取' | ||
| 99 | + }) | ||
| 100 | + } else { | ||
| 101 | + th.setData({ | ||
| 102 | + receiveState: '已领取' | ||
| 103 | + }) | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + if (res.data.data.actIntro != '') { | ||
| 107 | + th.setData({ | ||
| 108 | + textShow: true, | ||
| 109 | + textTitle: res.data.data.actIntro | ||
| 110 | + }) | ||
| 111 | + } | ||
| 112 | + } else { | ||
| 113 | + getApp().my_warnning(res.data.msg, 0, th); | ||
| 114 | + return false; | ||
| 115 | + } | ||
| 116 | + }) | ||
| 117 | + }, | ||
| 118 | + onLoad: function(options) { | ||
| 119 | + var th = this; | ||
| 120 | + th.setData({ | ||
| 121 | + getActId: options.actId, | ||
| 122 | + orderNumber: options.orderNumber, | ||
| 123 | + orderGoodsId: options.orderGoodsId, | ||
| 124 | + giftBagId: options.giftBagId | ||
| 125 | + }) | ||
| 126 | + | ||
| 127 | + var orderType = options.orderType; | ||
| 128 | + if (orderType) { | ||
| 129 | + th.setData({ orderType: orderType}) | ||
| 130 | + } | ||
| 131 | + | ||
| 132 | + | ||
| 133 | + th.GetList(); | ||
| 134 | + }, | ||
| 135 | + onShow: function() { | ||
| 136 | + var th = this; | ||
| 137 | + var textTitle = th.data.textTitle.replace(/<p><img/gi, "<p class='img'><img"); | ||
| 138 | + th.setData({ | ||
| 139 | + textTitle: textTitle | ||
| 140 | + }) | ||
| 141 | + }, | ||
| 142 | + GetReceive: function() { | ||
| 143 | + var th = this; | ||
| 144 | + if (th.data.receiveState == '已领取') { | ||
| 145 | + return false; | ||
| 146 | + } | ||
| 147 | + var is_sub = th.data.is_sub; //判断是否重复提交 | ||
| 148 | + if (is_sub == 0) { | ||
| 149 | + th.setData({ | ||
| 150 | + is_sub: 1 | ||
| 151 | + }) | ||
| 152 | + | ||
| 153 | + var json = { | ||
| 154 | + "actId": th.data.getActId, //活动Id | ||
| 155 | + "actType": 2, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | ||
| 156 | + "storeId": a.stoid, //商家Id | ||
| 157 | + "userId": d.user_id, //用户ID | ||
| 158 | + "orderNumber": th.data.orderNumber, | ||
| 159 | + "orderType": th.data.orderType, | ||
| 160 | + "orderGoodsId": th.data.orderGoodsId, | ||
| 161 | + "giftBagId": th.data.giftBagId | ||
| 162 | + }; | ||
| 163 | + var data = JSON.stringify(json); | ||
| 164 | + var url = th.data.url + "/api/weshop/marketing/free/receive/gift/record/insert"; | ||
| 165 | + wx.request({ | ||
| 166 | + url: url, | ||
| 167 | + data: data, | ||
| 168 | + method: 'post', | ||
| 169 | + header: { | ||
| 170 | + 'content-type': 'application/json' | ||
| 171 | + }, // 设置请求的 header | ||
| 172 | + success: function(res) { | ||
| 173 | + th.setData({ | ||
| 174 | + is_sub: 0 | ||
| 175 | + }) | ||
| 176 | + if (res.data.code == 0) { | ||
| 177 | + th.setData({ | ||
| 178 | + receiveState: '已领取' | ||
| 179 | + }) | ||
| 180 | + getApp().my_warnning("领取成功", 1, th); | ||
| 181 | + } else { | ||
| 182 | + getApp().my_warnning(res.data.msg, 0, th); | ||
| 183 | + } | ||
| 184 | + } | ||
| 185 | + }) | ||
| 186 | + } | ||
| 187 | + }, | ||
| 188 | + //界面跳转 | ||
| 189 | + goto: function(e) { | ||
| 190 | + var url = e.currentTarget.dataset.url; | ||
| 191 | + getApp().goto(url); | ||
| 192 | + }, | ||
| 193 | + //图片失败,默认图片 | ||
| 194 | + bind_bnerr1: function(e) { | ||
| 195 | + var th = this; | ||
| 196 | + var _errImg = e.target.dataset.errorimg; | ||
| 197 | + var _Img = e.target.dataset.img; | ||
| 198 | + if (_Img != undefined) { | ||
| 199 | + var _errObj = {}; | ||
| 200 | + _errObj[_errImg] = "/miniapp/images/giftbag/gift02.png"; | ||
| 201 | + th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | ||
| 202 | + } | ||
| 203 | + }, | ||
| 204 | +}); | ||
| 0 | \ No newline at end of file | 205 | \ No newline at end of file |
pages/giftpack/evaluategift/evaluategift.json
0 → 100644
pages/giftpack/evaluategift/evaluategift.wxml
0 → 100644
| 1 | +<view> | ||
| 2 | + <view class="image_box"> | ||
| 3 | + <image src="{{iurl+'miniapp/images/giftbag/eval00.png'}}" lazy-load="true"></image> | ||
| 4 | + </view> | ||
| 5 | + <block wx:if="{{itemShow}}"> | ||
| 6 | + <view class="top"> | ||
| 7 | + <view class="top_box"> | ||
| 8 | + <view class="top_box_text"> | ||
| 9 | + <text>______</text> | ||
| 10 | + </view> | ||
| 11 | + <view class="top_box_text"> | ||
| 12 | + <text>新人专享\n你的美丽我来缔造</text> | ||
| 13 | + </view> | ||
| 14 | + <view class="top_box_text"> | ||
| 15 | + <text >______</text> | ||
| 16 | + </view> | ||
| 17 | + </view> | ||
| 18 | + <block wx:for="{{itemWare}}" wx:for-item="item" wx:for-index="index" wx:key="index"> | ||
| 19 | + <view class="top_item "> | ||
| 20 | + <block wx:if="{{item.lbType==3}}"> | ||
| 21 | + <view class="top_item_img"> | ||
| 22 | + <image src="{{item.fromImage=='' || item.fromImage==null?iurl+'/miniapp/images/giftbag/gift02.png':iurl+item.fromImage}}" lazy-load="true" data-errorimg="itemWare[{{index}}].fromImage" binderror="bind_bnerr1" data-img="{{item.fromImage}}"></image> | ||
| 23 | + </view> | ||
| 24 | + </block> | ||
| 25 | + <block wx:if="{{item.lbType==1}}"> | ||
| 26 | + <view class="top_item_img "> | ||
| 27 | + <image src="{{item.fromImage==''?iurl+'/miniapp/images/giftbag/empty.jpg':iurl+item.fromImage}}" lazy-load="true"></image> | ||
| 28 | + </view> | ||
| 29 | + </block> | ||
| 30 | + <view class="top_item_center "> | ||
| 31 | + <view class="top_item_center_title"> | ||
| 32 | + <block wx:if="{{item.lbType==1}}"> | ||
| 33 | + <text>免费领取</text> | ||
| 34 | + </block> | ||
| 35 | + <block wx:if="{{item.lbType==3}}"> | ||
| 36 | + <text>{{item.fromName}}</text> | ||
| 37 | + </block> | ||
| 38 | + </view> | ||
| 39 | + <view class="top_item_center_ramke "> | ||
| 40 | + <block wx:if="{{item.lbType==1}}"> | ||
| 41 | + <text>{{item.fromName}}</text> | ||
| 42 | + </block> | ||
| 43 | + <block wx:if="{{item.lbType==3}}"> | ||
| 44 | + <text >{{"新人可免费享受专业"+item.fromName+",可以享受"+item.num+"次。"}}</text> | ||
| 45 | + </block> | ||
| 46 | + </view> | ||
| 47 | + </view> | ||
| 48 | + </view> | ||
| 49 | + </block> | ||
| 50 | + </view> | ||
| 51 | + </block> | ||
| 52 | + <block wx:if="{{itemShow}}"> | ||
| 53 | + <view > | ||
| 54 | + <image style="width:10px;height:47px;float:left;top:-38px;left:55px;" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image> | ||
| 55 | + <image style="width:10px;height:47px;float:right;top:-38px;right:55px;" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image> | ||
| 56 | + </view> | ||
| 57 | + </block> | ||
| 58 | + <block wx:if="{{cardShow}}"> | ||
| 59 | + <view> | ||
| 60 | + <view class="top"> | ||
| 61 | + <view class="top_box "> | ||
| 62 | + <view class="top_box_text "> | ||
| 63 | + <text >———</text> | ||
| 64 | + </view> | ||
| 65 | + <view class="top_box_text "> | ||
| 66 | + <text >新人专享优惠券</text> | ||
| 67 | + </view> | ||
| 68 | + <view class="top_box_text "> | ||
| 69 | + <text >———</text> | ||
| 70 | + </view> | ||
| 71 | + </view> | ||
| 72 | + <block wx:for="{{cards}}" wx:for-item="item" wx:for-index="index" wx:key="index"> | ||
| 73 | + <view class="top_card "> | ||
| 74 | + <view class="{{item.useObjectType==1?'top_card_box img1':item.useObjectType==2?'top_card_box img2':'top_card_box img3'}}"> | ||
| 75 | + <view class="top_card_tite_box "> | ||
| 76 | + <block wx:if="{{item.useObjectType==0}}"> | ||
| 77 | + <view class="top_card_tite_a">全场通用</view> | ||
| 78 | + </block> | ||
| 79 | + <block wx:if="{{item.useObjectType==1}}"> | ||
| 80 | + <view class="top_card_tite_b">品牌限定</view> | ||
| 81 | + </block> | ||
| 82 | + <block wx:if="{{item.useObjectType==2}}"> | ||
| 83 | + <view class="top_card_tite_c">品类限定</view> | ||
| 84 | + </block> | ||
| 85 | + <block wx:if="{{item.useObjectType==11}}"> | ||
| 86 | + <view class="top_card_tite_a">用途限定</view> | ||
| 87 | + </block> | ||
| 88 | + <block wx:if="{{item.useObjectType==12}}"> | ||
| 89 | + <view class="top_card_tite_a">分类限定</view> | ||
| 90 | + </block> | ||
| 91 | + </view> | ||
| 92 | + <view class="top_card_counte ">{{item.sum+"元券"}}</view> | ||
| 93 | + <view class="top_card_remak ">{{"满"+item.buySum+"元可以用"}}</view> | ||
| 94 | + </view> | ||
| 95 | + </view> | ||
| 96 | + </block> | ||
| 97 | + </view> | ||
| 98 | + </view> | ||
| 99 | + </block> | ||
| 100 | + <block wx:if="{{cardShow}}"> | ||
| 101 | + <view> | ||
| 102 | + <view> | ||
| 103 | + <image style="width:10px;height:47px;float:left;top:-38px;left:55px;" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image> | ||
| 104 | + <image style="width:10px;height:47px;float:right;top:-38px;right:55px;" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image> | ||
| 105 | + </view> | ||
| 106 | + </view> | ||
| 107 | + </block> | ||
| 108 | + <block wx:if="{{packShow}}"> | ||
| 109 | + <view > | ||
| 110 | + <view class="top "> | ||
| 111 | + <view class="top_box "> | ||
| 112 | + <view class="top_box_text "> | ||
| 113 | + <text >———</text> | ||
| 114 | + </view> | ||
| 115 | + <view class="top_box_text "> | ||
| 116 | + <text >新人专享福利</text> | ||
| 117 | + </view> | ||
| 118 | + <view class="top_box_text "> | ||
| 119 | + <text >———</text> | ||
| 120 | + </view> | ||
| 121 | + </view> | ||
| 122 | + <block wx:if="{{integralShow}}"> | ||
| 123 | + <view> | ||
| 124 | + <view class="top_box_image "> | ||
| 125 | + <image src="{{iurl+'/miniapp/images/giftbag/vip06.jpg'}}" lazy-load="true"></image> | ||
| 126 | + <button>{{integralTitle}}</button> | ||
| 127 | + </view> | ||
| 128 | + </view> | ||
| 129 | + </block> | ||
| 130 | + <block wx:if="{{growUpShow}}"> | ||
| 131 | + <view > | ||
| 132 | + <view class="top_box_image fs36"> | ||
| 133 | + <image src="{{iurl+'/miniapp/images/giftbag/vip07.jpg'}}" lazy-load="true"></image> | ||
| 134 | + <button>{{growUpTitle}}</button> | ||
| 135 | + </view> | ||
| 136 | + </view> | ||
| 137 | + </block> | ||
| 138 | + </view> | ||
| 139 | + </view> | ||
| 140 | + </block> | ||
| 141 | + <block wx:if="{{textShow}}"> | ||
| 142 | + <view class="foot_box"> | ||
| 143 | + <view class="foot_box_title fs36"> | ||
| 144 | + <text>活动规则:</text> | ||
| 145 | + </view> | ||
| 146 | + <view class="foot_box_text"> | ||
| 147 | + <rich-text nodes="{{textTitle}}"></rich-text> | ||
| 148 | + </view> | ||
| 149 | + </view> | ||
| 150 | + </block> | ||
| 151 | + <view class="button_box"> | ||
| 152 | + <view > | ||
| 153 | + <button class="button" bindtap="goto" data-url="/pages/index/index/index">进入商城购物</button> | ||
| 154 | + </view> | ||
| 155 | + <view class="button_text "> | ||
| 156 | + <text >本活动最终解释权归公司所有,如果有问题请联系客服</text> | ||
| 157 | + </view> | ||
| 158 | + </view> | ||
| 159 | + <view class="foot_empty "></view> | ||
| 160 | + <view class="foot_button"> | ||
| 161 | + <view class="{{receiveState=='已领取'?'foot_button_notbuy':'foot_button_buy'}}" bindtap="GetReceive"> | ||
| 162 | + <text>{{receiveState}}</text> | ||
| 163 | + </view> | ||
| 164 | + </view> | ||
| 165 | +</view> | ||
| 166 | +<!-- 引入提示组件 --> | ||
| 167 | +<warn id="warn"></warn> | ||
| 168 | +<my_confirm id="my_confirm"></my_confirm> | ||
| 0 | \ No newline at end of file | 169 | \ No newline at end of file |
pages/giftpack/evaluategift/evaluategift.wxss
0 → 100644
| 1 | +@charset "UTF-8"; | ||
| 2 | + | ||
| 3 | +/* Author XGQ | ||
| 4 | + * 2019-10-27 | ||
| 5 | + */ | ||
| 6 | + | ||
| 7 | +.image_box { | ||
| 8 | + -webkit-box-pack: center; | ||
| 9 | + -webkit-justify-content: center; | ||
| 10 | + justify-content: center; | ||
| 11 | +} | ||
| 12 | + | ||
| 13 | +.image_box image { | ||
| 14 | + width: 100%; | ||
| 15 | + height: 690rpx; | ||
| 16 | +} | ||
| 17 | + | ||
| 18 | +.top { | ||
| 19 | + margin: -20rpx 28rpx 45rpx 28rpx; | ||
| 20 | + padding: 10rpx 10rpx 70rpx 10rpx; | ||
| 21 | + background-color: #fff; | ||
| 22 | + border-radius: 0rpx 0rpx 15rpx 15rpx; | ||
| 23 | +} | ||
| 24 | + | ||
| 25 | +.top_box { | ||
| 26 | + display: -webkit-box; | ||
| 27 | + display: -webkit-flex; | ||
| 28 | + display: flex; | ||
| 29 | + text-align: center; | ||
| 30 | + -webkit-box-pack: center; | ||
| 31 | + -webkit-justify-content: center; | ||
| 32 | + justify-content: center; | ||
| 33 | +} | ||
| 34 | + | ||
| 35 | +.top_box_text { | ||
| 36 | + -webkit-box-pack: center; | ||
| 37 | + -webkit-justify-content: center; | ||
| 38 | + justify-content: center; | ||
| 39 | + margin: 50rpx 15rpx 20rpx 15rpx; | ||
| 40 | +} | ||
| 41 | + | ||
| 42 | +.top_box_text text { | ||
| 43 | + color: rgb(71, 132, 239); | ||
| 44 | + font-size: 40rpx; | ||
| 45 | +} | ||
| 46 | + | ||
| 47 | +.top_item { | ||
| 48 | + display: -webkit-box; | ||
| 49 | + display: -webkit-flex; | ||
| 50 | + display: flex; | ||
| 51 | + width: 100%; | ||
| 52 | + margin: 60rpx 0 0 0; | ||
| 53 | +} | ||
| 54 | + | ||
| 55 | +.top_item_img { | ||
| 56 | + float: left; | ||
| 57 | + width: 28%; | ||
| 58 | + margin: 0rpx 10rpx 0rpx 20rpx; | ||
| 59 | +} | ||
| 60 | + | ||
| 61 | +.top_item_img image { | ||
| 62 | + width: 150rpx; | ||
| 63 | + height: 150rpx; | ||
| 64 | + border-radius: 50%; | ||
| 65 | + border: #f96865 solid 3rpx; | ||
| 66 | +} | ||
| 67 | + | ||
| 68 | +.top_item_center { | ||
| 69 | + float: left; | ||
| 70 | + width: 50%; | ||
| 71 | +} | ||
| 72 | + | ||
| 73 | +.top_item_center_title { | ||
| 74 | + font-size: 35rpx; | ||
| 75 | + color: rgb(71, 132, 239); | ||
| 76 | + -webkit-box-pack: start; | ||
| 77 | + -webkit-justify-content: flex-start; | ||
| 78 | + justify-content: flex-start; | ||
| 79 | + padding: 0 10rpx 15rpx 0rpx; | ||
| 80 | + word-break: break-all; | ||
| 81 | + text-overflow: ellipsis; | ||
| 82 | + display: -webkit-box; | ||
| 83 | + -webkit-box-orient: vertical; | ||
| 84 | + -webkit-line-clamp: 2; | ||
| 85 | + overflow: hidden; | ||
| 86 | +} | ||
| 87 | + | ||
| 88 | +.top_item_center_ramke { | ||
| 89 | + font-size: 25rpx; | ||
| 90 | + -webkit-box-pack: start; | ||
| 91 | + -webkit-justify-content: flex-start; | ||
| 92 | + justify-content: flex-start; | ||
| 93 | + line-height: 35rpx; | ||
| 94 | + letter-spacing: 0.5rpx; | ||
| 95 | + word-break: break-all; | ||
| 96 | + /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/ | ||
| 97 | + text-overflow: ellipsis; | ||
| 98 | + display: -webkit-box; | ||
| 99 | + /** 对象作为伸缩盒子模型显示 **/ | ||
| 100 | + -webkit-box-orient: vertical; | ||
| 101 | + /** 设置或检索伸缩盒对象的子元素的排列方式 **/ | ||
| 102 | + -webkit-line-clamp: 2; | ||
| 103 | + /** 显示的行数 **/ | ||
| 104 | + overflow: hidden; | ||
| 105 | + /** 隐藏超出的内容 **/ | ||
| 106 | +} | ||
| 107 | + | ||
| 108 | +.top_item_button { | ||
| 109 | + float: right; | ||
| 110 | + width: 22%; | ||
| 111 | + padding: 65rpx 20rpx 0 1rpx; | ||
| 112 | +} | ||
| 113 | + | ||
| 114 | +.top_item_button button { | ||
| 115 | + font-size: 25rpx; | ||
| 116 | + background: #fd6969; | ||
| 117 | + color: #fff; | ||
| 118 | + border-radius: 50rpx; | ||
| 119 | + height: 45rpx; | ||
| 120 | + line-height: 45rpx; | ||
| 121 | +} | ||
| 122 | + | ||
| 123 | +.top_card { | ||
| 124 | + width: calc(50% - 30rpx); | ||
| 125 | + display: inline-block; | ||
| 126 | + margin: 15rpx; | ||
| 127 | +} | ||
| 128 | + | ||
| 129 | +.top_card_box { | ||
| 130 | + background-size: cover; | ||
| 131 | + background-position: center; | ||
| 132 | + background-repeat: no-repeat; | ||
| 133 | + border-radius: 20rpx; | ||
| 134 | + height: 250rpx; | ||
| 135 | + margin: 5rpx; | ||
| 136 | +} | ||
| 137 | + | ||
| 138 | +.img1 { | ||
| 139 | + background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip01.png); | ||
| 140 | +} | ||
| 141 | + | ||
| 142 | +.img2 { | ||
| 143 | + background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip02.png); | ||
| 144 | +} | ||
| 145 | + | ||
| 146 | +.img3 { | ||
| 147 | + background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip03.png); | ||
| 148 | +} | ||
| 149 | + | ||
| 150 | +.top_card_tite_box { | ||
| 151 | + width: 100%; | ||
| 152 | + display: -webkit-box; | ||
| 153 | + display: -webkit-flex; | ||
| 154 | + display: flex; | ||
| 155 | + -webkit-box-pack: end; | ||
| 156 | + -webkit-justify-content: flex-end; | ||
| 157 | + justify-content: flex-end; | ||
| 158 | +} | ||
| 159 | + | ||
| 160 | +.top_card_tite_a { | ||
| 161 | + padding: 5rpx 25rpx 5rpx 25rpx; | ||
| 162 | + line-height: 29rpx; | ||
| 163 | + font-size: 25rpx; | ||
| 164 | + color: #fff; | ||
| 165 | + background: #ffa7c0; | ||
| 166 | + border-radius: 0rpx 20rpx 0rpx 6rpx; | ||
| 167 | +} | ||
| 168 | + | ||
| 169 | +.top_card_tite_b { | ||
| 170 | + padding: 5rpx 25rpx 5rpx 25rpx; | ||
| 171 | + line-height: 29rpx; | ||
| 172 | + font-size: 25rpx; | ||
| 173 | + color: #fff; | ||
| 174 | + background: #50dfdb; | ||
| 175 | + border-radius: 0rpx 20rpx 0rpx 6rpx; | ||
| 176 | +} | ||
| 177 | + | ||
| 178 | +.top_card_tite_c { | ||
| 179 | + padding: 5rpx 25rpx 5rpx 25rpx; | ||
| 180 | + line-height: 29rpx; | ||
| 181 | + font-size: 25rpx; | ||
| 182 | + color: #fff; | ||
| 183 | + background: #92cbff; | ||
| 184 | + border-radius: 0rpx 20rpx 0rpx 6rpx; | ||
| 185 | +} | ||
| 186 | + | ||
| 187 | +.top_card_tite_d { | ||
| 188 | + padding: 5rpx 25rpx 5rpx 25rpx; | ||
| 189 | + line-height: 29rpx; | ||
| 190 | + font-size: 25rpx; | ||
| 191 | + color: #fff; | ||
| 192 | + border-radius: 0rpx 20rpx 0rpx 6rpx; | ||
| 193 | +} | ||
| 194 | + | ||
| 195 | +.top_card_counte { | ||
| 196 | + padding: 40rpx 20rpx 0 0; | ||
| 197 | + text-align: center; | ||
| 198 | + display: -webkit-box; | ||
| 199 | + display: -webkit-flex; | ||
| 200 | + display: flex; | ||
| 201 | + -webkit-box-pack: center; | ||
| 202 | + -webkit-justify-content: center; | ||
| 203 | + justify-content: center; | ||
| 204 | + -webkit-box-align: center; | ||
| 205 | + -webkit-align-items: center; | ||
| 206 | + align-items: center; | ||
| 207 | + color: #fff; | ||
| 208 | + font-size: 40rpx; | ||
| 209 | +} | ||
| 210 | + | ||
| 211 | +.top_card_remak { | ||
| 212 | + padding: 20rpx 0 40rpx 0; | ||
| 213 | + text-align: center; | ||
| 214 | + display: -webkit-box; | ||
| 215 | + display: -webkit-flex; | ||
| 216 | + display: flex; | ||
| 217 | + -webkit-box-pack: center; | ||
| 218 | + -webkit-justify-content: center; | ||
| 219 | + justify-content: center; | ||
| 220 | + -webkit-box-align: center; | ||
| 221 | + -webkit-align-items: center; | ||
| 222 | + align-items: center; | ||
| 223 | + font-size: 20rpx; | ||
| 224 | + color: #fff; | ||
| 225 | +} | ||
| 226 | + | ||
| 227 | +.top_card_button_a button { | ||
| 228 | + margin: 0 85rpx; | ||
| 229 | + background: #ffa6bc; | ||
| 230 | + border-radius: 50rpx; | ||
| 231 | + line-height: 40rpx; | ||
| 232 | + height: 40rpx; | ||
| 233 | + color: white; | ||
| 234 | + font-size: 25rpx; | ||
| 235 | +} | ||
| 236 | + | ||
| 237 | +.top_card_button_b button { | ||
| 238 | + margin: 0 85rpx; | ||
| 239 | + background: #50dfdb; | ||
| 240 | + border-radius: 50rpx; | ||
| 241 | + line-height: 40rpx; | ||
| 242 | + height: 40rpx; | ||
| 243 | + color: white; | ||
| 244 | + font-size: 25rpx; | ||
| 245 | +} | ||
| 246 | + | ||
| 247 | +.top_card_button_c button { | ||
| 248 | + margin: 0 85rpx; | ||
| 249 | + background: #75bcfc; | ||
| 250 | + border-radius: 50rpx; | ||
| 251 | + line-height: 40rpx; | ||
| 252 | + height: 40rpx; | ||
| 253 | + color: white; | ||
| 254 | + font-size: 25rpx; | ||
| 255 | +} | ||
| 256 | + | ||
| 257 | +.top_card_button_d button { | ||
| 258 | + margin: 0 85rpx; | ||
| 259 | + border-radius: 50rpx; | ||
| 260 | + line-height: 40rpx; | ||
| 261 | + height: 40rpx; | ||
| 262 | + color: white; | ||
| 263 | + font-size: 25rpx; | ||
| 264 | +} | ||
| 265 | + | ||
| 266 | +.top_box_image { | ||
| 267 | + padding: 20rpx 20rpx 20rpx 20rpx; | ||
| 268 | +} | ||
| 269 | + | ||
| 270 | +.top_box_image image { | ||
| 271 | + height: 216rpx; | ||
| 272 | + width: 100%; | ||
| 273 | +} | ||
| 274 | + | ||
| 275 | +.top_box_image button { | ||
| 276 | + margin: 15rpx 95rpx 0rpx 95rpx; | ||
| 277 | + background: #fe6a6a; | ||
| 278 | + border-radius: 50rpx; | ||
| 279 | + line-height: 60rpx; | ||
| 280 | + height: 60rpx; | ||
| 281 | + color: white; | ||
| 282 | + font-size: 30rpx; | ||
| 283 | +} | ||
| 284 | + | ||
| 285 | +.foot_box { | ||
| 286 | + margin: 0 30rpx 40rpx 30rpx; | ||
| 287 | + /* background: #FFFFFF; */ | ||
| 288 | + border-radius: 20rpx; | ||
| 289 | + color: rgb(255, 255, 255); | ||
| 290 | +} | ||
| 291 | + | ||
| 292 | +.foot_box_title { | ||
| 293 | + /* color: #000000; */ | ||
| 294 | + padding: 20rpx 30rpx 20rpx 30rpx; | ||
| 295 | +} | ||
| 296 | + | ||
| 297 | +.foot_box_text { | ||
| 298 | + font-size: 30rpx; | ||
| 299 | + /* color: #000000; */ | ||
| 300 | + line-height: 48rpx; | ||
| 301 | + padding: 20rpx 35rpx 50rpx 30rpx; | ||
| 302 | +} | ||
| 303 | + | ||
| 304 | +.button_box { | ||
| 305 | + margin: 50rpx 50rpx 50rpx 50rpx; | ||
| 306 | + text-align: center; | ||
| 307 | +} | ||
| 308 | + | ||
| 309 | +.button { | ||
| 310 | + margin: 0 30rpx; | ||
| 311 | + background: rgb(93, 147, 245); | ||
| 312 | + border-radius: 50rpx; | ||
| 313 | + line-height: 80rpx; | ||
| 314 | + height: 80rpx; | ||
| 315 | + color: rgb(255, 255, 255); | ||
| 316 | + font-size: 35rpx; | ||
| 317 | +} | ||
| 318 | + | ||
| 319 | +.button_text { | ||
| 320 | + padding-top: 20rpx; | ||
| 321 | + font-size: 22rpx; | ||
| 322 | + color: white; | ||
| 323 | + height: 100rpx; | ||
| 324 | +} | ||
| 325 | + | ||
| 326 | +.foot_empty { | ||
| 327 | + height: 90rpx; | ||
| 328 | +} | ||
| 329 | + | ||
| 330 | +.foot_button { | ||
| 331 | + display: -webkit-box; | ||
| 332 | + display: -webkit-flex; | ||
| 333 | + display: flex; | ||
| 334 | + margin: 20rpx 0rpx 0rpx 0rpx; | ||
| 335 | + padding: 25rpx 0rpx; | ||
| 336 | + background: #fff; | ||
| 337 | + text-align: center; | ||
| 338 | + -webkit-box-pack: center; | ||
| 339 | + -webkit-justify-content: center; | ||
| 340 | + justify-content: center; | ||
| 341 | + position: fixed; | ||
| 342 | + bottom: 0; | ||
| 343 | + left: 0; | ||
| 344 | + width: 100%; | ||
| 345 | +} | ||
| 346 | + | ||
| 347 | +.foot_button_buy { | ||
| 348 | + background: #e4010c; | ||
| 349 | + color: #fff; | ||
| 350 | + width: 400rpx; | ||
| 351 | + height: 70rpx; | ||
| 352 | + font-size: 28rpx; | ||
| 353 | + line-height: 70rpx; | ||
| 354 | + border-radius: 40rpx; | ||
| 355 | +} | ||
| 356 | + | ||
| 357 | +.foot_button_notbuy { | ||
| 358 | + background: #999; | ||
| 359 | + color: #fff; | ||
| 360 | + width: 400rpx; | ||
| 361 | + height: 70rpx; | ||
| 362 | + font-size: 28rpx; | ||
| 363 | + line-height: 70rpx; | ||
| 364 | + border-radius: 40rpx; | ||
| 365 | +} | ||
| 366 | + | ||
| 367 | +page { | ||
| 368 | + background-color: rgb(71, 132, 239); | ||
| 369 | +} | ||
| 370 | + | ||
| 371 | +button::after { | ||
| 372 | + border: none; | ||
| 373 | +} | ||
| 374 | + | ||
| 375 | +.foot_box_text ._img { | ||
| 376 | + width: 100%; | ||
| 377 | +} | ||
| 378 | + | ||
| 379 | +.foot_box_text .img { | ||
| 380 | + line-height: 0; | ||
| 381 | +} |
pages/giftpack/giftpacklist/giftpacklist.js
| @@ -3,6 +3,8 @@ var e = getApp(), | @@ -3,6 +3,8 @@ var e = getApp(), | ||
| 3 | os = a, | 3 | os = a, |
| 4 | t = e.request, | 4 | t = e.request, |
| 5 | d = e.globalData; | 5 | d = e.globalData; |
| 6 | +var ut = require("../../../utils/util.js"); | ||
| 7 | + | ||
| 6 | Page({ | 8 | Page({ |
| 7 | data: { | 9 | data: { |
| 8 | url: a.url, //接口网址 | 10 | url: a.url, //接口网址 |
| @@ -22,7 +24,9 @@ Page({ | @@ -22,7 +24,9 @@ Page({ | ||
| 22 | getUrl: '', | 24 | getUrl: '', |
| 23 | wareCard: [], | 25 | wareCard: [], |
| 24 | orderSn: "", //订单编号 | 26 | orderSn: "", //订单编号 |
| 25 | - lbId:"" | 27 | + lbId: "", |
| 28 | + code: "", //核销码 | ||
| 29 | + c_state:"0", //判断是否已经使用, 0正常 1已使用 2已过期 | ||
| 26 | }, | 30 | }, |
| 27 | onLoad: function(options) { | 31 | onLoad: function(options) { |
| 28 | var th = this; | 32 | var th = this; |
| @@ -41,19 +45,12 @@ Page({ | @@ -41,19 +45,12 @@ Page({ | ||
| 41 | th.setData({ | 45 | th.setData({ |
| 42 | giftRemark: th.data.giftRemark.replace(/<p><img/gi, "<p class='img'><img") | 46 | giftRemark: th.data.giftRemark.replace(/<p><img/gi, "<p class='img'><img") |
| 43 | }) | 47 | }) |
| 48 | + th.close(); | ||
| 44 | }, | 49 | }, |
| 45 | onShow: function() { | 50 | onShow: function() { |
| 46 | - // var th = this; | ||
| 47 | - // if (th.data.isBuy == 0) { | ||
| 48 | - // th.GetMyGiftList(); | ||
| 49 | - // } else { | ||
| 50 | - // th.GetBuyGiftList(); | ||
| 51 | - // } | ||
| 52 | - // th.setData({ | ||
| 53 | - // giftRemark: th.data.giftRemark.replace(/<p><img/gi, "<p class='img'><img") | ||
| 54 | - // }) | 51 | + |
| 55 | }, | 52 | }, |
| 56 | - GetBuyPrice: function (e) { | 53 | + GetBuyPrice: function(e) { |
| 57 | var that = this.data; | 54 | var that = this.data; |
| 58 | var th = this; | 55 | var th = this; |
| 59 | // var id = e.currentTarget.dataset.id;//活动id | 56 | // var id = e.currentTarget.dataset.id;//活动id |
| @@ -62,10 +59,10 @@ Page({ | @@ -62,10 +59,10 @@ Page({ | ||
| 62 | "是否确定购买该礼包", | 59 | "是否确定购买该礼包", |
| 63 | "取消", | 60 | "取消", |
| 64 | "确定", | 61 | "确定", |
| 65 | - function () { | 62 | + function() { |
| 66 | my_confirm.open_cancel(0); | 63 | my_confirm.open_cancel(0); |
| 67 | }, | 64 | }, |
| 68 | - function () { | 65 | + function() { |
| 69 | my_confirm.open_cancel(0); | 66 | my_confirm.open_cancel(0); |
| 70 | var json = { | 67 | var json = { |
| 71 | "actId": '', //活动Id | 68 | "actId": '', //活动Id |
| @@ -85,7 +82,7 @@ Page({ | @@ -85,7 +82,7 @@ Page({ | ||
| 85 | header: { | 82 | header: { |
| 86 | 'content-type': 'application/json' | 83 | 'content-type': 'application/json' |
| 87 | }, // 设置请求的 header | 84 | }, // 设置请求的 header |
| 88 | - success: function (res) { | 85 | + success: function(res) { |
| 89 | if (res.data.code == 0) { | 86 | if (res.data.code == 0) { |
| 90 | res = res.data.data; | 87 | res = res.data.data; |
| 91 | wx.requestPayment({ | 88 | wx.requestPayment({ |
| @@ -94,10 +91,10 @@ Page({ | @@ -94,10 +91,10 @@ Page({ | ||
| 94 | package: res.packageValue, | 91 | package: res.packageValue, |
| 95 | signType: res.signType, | 92 | signType: res.signType, |
| 96 | paySign: res.paySign, | 93 | paySign: res.paySign, |
| 97 | - success: function (n) { | 94 | + success: function(n) { |
| 98 | 95 | ||
| 99 | }, | 96 | }, |
| 100 | - fail: function (n) { | 97 | + fail: function(n) { |
| 101 | 98 | ||
| 102 | } | 99 | } |
| 103 | }); | 100 | }); |
| @@ -114,7 +111,7 @@ Page({ | @@ -114,7 +111,7 @@ Page({ | ||
| 114 | 111 | ||
| 115 | 112 | ||
| 116 | }, | 113 | }, |
| 117 | - GetBuyIntegral: function (e) { | 114 | + GetBuyIntegral: function(e) { |
| 118 | var that = this.data; | 115 | var that = this.data; |
| 119 | var th = this; | 116 | var th = this; |
| 120 | // var id = e.currentTarget.dataset.id;//活动id | 117 | // var id = e.currentTarget.dataset.id;//活动id |
| @@ -123,10 +120,10 @@ Page({ | @@ -123,10 +120,10 @@ Page({ | ||
| 123 | "是否确定兑换该礼包", | 120 | "是否确定兑换该礼包", |
| 124 | "取消", | 121 | "取消", |
| 125 | "确定", | 122 | "确定", |
| 126 | - function () { | 123 | + function() { |
| 127 | my_confirm.open_cancel(0); | 124 | my_confirm.open_cancel(0); |
| 128 | }, | 125 | }, |
| 129 | - function () { | 126 | + function() { |
| 130 | my_confirm.open_cancel(0); | 127 | my_confirm.open_cancel(0); |
| 131 | var json = { | 128 | var json = { |
| 132 | "actId": '', //活动Id | 129 | "actId": '', //活动Id |
| @@ -145,7 +142,7 @@ Page({ | @@ -145,7 +142,7 @@ Page({ | ||
| 145 | header: { | 142 | header: { |
| 146 | 'content-type': 'application/json' | 143 | 'content-type': 'application/json' |
| 147 | }, // 设置请求的 header | 144 | }, // 设置请求的 header |
| 148 | - success: function (res) { | 145 | + success: function(res) { |
| 149 | if (res.data.code == 0) { | 146 | if (res.data.code == 0) { |
| 150 | getApp().my_warnning("兑换成功!", 1, th); | 147 | getApp().my_warnning("兑换成功!", 1, th); |
| 151 | } else { | 148 | } else { |
| @@ -182,6 +179,16 @@ Page({ | @@ -182,6 +179,16 @@ Page({ | ||
| 182 | giftRemark: res.data.data.giftRemark | 179 | giftRemark: res.data.data.giftRemark |
| 183 | }) | 180 | }) |
| 184 | } | 181 | } |
| 182 | + | ||
| 183 | + //---获取日期的时间戳--- | ||
| 184 | + var t_endtime=res.data.data.endTime; | ||
| 185 | + t_endtime = t_endtime.replace(/-/g,'/'); | ||
| 186 | + var t_date = new Date(t_endtime)/1000; | ||
| 187 | + var t_now=ut.gettimestamp(); | ||
| 188 | + | ||
| 189 | + if(res.data.data.goodsUseState) th.setData({c_state:1}) | ||
| 190 | + else if(t_date<=t_now) | ||
| 191 | + th.setData({c_state:2}) | ||
| 185 | 192 | ||
| 186 | th.setData({ | 193 | th.setData({ |
| 187 | giftDate: res.data.data.endTime, | 194 | giftDate: res.data.data.endTime, |
| @@ -236,7 +243,7 @@ Page({ | @@ -236,7 +243,7 @@ Page({ | ||
| 236 | giftPrice: res.data.data.payMoney, | 243 | giftPrice: res.data.data.payMoney, |
| 237 | giftType: res.data.data.actType, | 244 | giftType: res.data.data.actType, |
| 238 | actTitle: res.data.data.actTitle, | 245 | actTitle: res.data.data.actTitle, |
| 239 | - wareCard: res.data.data.wareCard, | 246 | + wareCard: res.data.data.wareCard |
| 240 | }) | 247 | }) |
| 241 | } else { | 248 | } else { |
| 242 | getApp().my_warnning("系统繁忙,请稍后再试", 0, _this2); | 249 | getApp().my_warnning("系统繁忙,请稍后再试", 0, _this2); |
| @@ -246,22 +253,66 @@ Page({ | @@ -246,22 +253,66 @@ Page({ | ||
| 246 | }); | 253 | }); |
| 247 | 254 | ||
| 248 | }, | 255 | }, |
| 249 | - GetQrCode: function() { | ||
| 250 | - //不销毁调整 | ||
| 251 | - uni.navigateTo({ | ||
| 252 | - url: '/pages/mygiftpack/QrCode?number=' + this.getGiftID | ||
| 253 | - }); | ||
| 254 | - | 256 | + //显示核销码 |
| 257 | + code_show: function(e) { | ||
| 258 | + var th = this; | ||
| 259 | + //--获取成功的时候-- | ||
| 260 | + var no = th.data.code; | ||
| 261 | + var qc_com = th.selectComponent("#qc_com"); //组件的id | ||
| 262 | + var obj = { | ||
| 263 | + val: no, | ||
| 264 | + content: "请将二维码展示给核销员,收货更快捷" | ||
| 265 | + }; | ||
| 266 | + qc_com.open(obj) | ||
| 255 | }, | 267 | }, |
| 256 | - GetWebHttp: function(type) { | 268 | + //获取核销码 |
| 269 | + getcode: function() { | ||
| 270 | + var th = this; | ||
| 271 | + var orderSn = th.data.orderSn; //订单号 | ||
| 272 | + var json = { | ||
| 273 | + "storeId": a.stoid, | ||
| 274 | + "orderSn": orderSn | ||
| 275 | + }; | ||
| 276 | + var data = JSON.stringify(json); | ||
| 277 | + var url = th.data.url + "/api/weshop/marketing/gift/goods/verify/code/get"; //预约接口地址 | ||
| 278 | + wx.request({ | ||
| 279 | + url: url, | ||
| 280 | + data: data, | ||
| 281 | + method: 'put', | ||
| 282 | + header: { | ||
| 283 | + 'content-type': 'application/json' | ||
| 284 | + }, // 设置请求的 header | ||
| 285 | + success: function(res) { | ||
| 286 | + if (res.data.code == 0) { | ||
| 287 | + th.setData({ | ||
| 288 | + code: res.data.data | ||
| 289 | + }) | ||
| 290 | + th.code_show(); | ||
| 291 | + } else { | ||
| 292 | + getApp().my_warnning(res.data.msg, 0, th); | ||
| 293 | + } | ||
| 294 | + } | ||
| 295 | + }) | ||
| 296 | + }, | ||
| 297 | + //界面跳转 | ||
| 298 | + goto: function(e) { | ||
| 299 | + var th = this; | ||
| 300 | + var url = e.currentTarget.dataset.url; | ||
| 301 | + getApp().goto(url); | ||
| 302 | + }, | ||
| 303 | + //图片失败,默认图片 | ||
| 304 | + bind_bnerr2: function (e) { | ||
| 305 | + var _errImg = e.target.dataset.errorimg; | ||
| 306 | + var _errObj = {}; | ||
| 307 | + _errObj[_errImg] = "/public/images/empty.jpg"; | ||
| 308 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | ||
| 257 | 309 | ||
| 258 | - if (type == 0) { | ||
| 259 | - this.getUrl = this.$GetInfo.HtmlHttp + '/index.php/Mobile/User/coupon/stoid/' + this.getStorageID + '/user_id/' + this.getUserID + '.html'; | ||
| 260 | - } | ||
| 261 | - if (type == 1) { | ||
| 262 | - this.getUrl = this.$GetInfo.HtmlHttp + '/index.php/Mobile/Yyservice/service_items_list/stoid/' + this.getStorageID + '/user_id/' + this.getUserID + '.html'; | ||
| 263 | - } | ||
| 264 | - window.location.href = this.getUrl; | 310 | + }, |
| 311 | + //关闭导航 | ||
| 312 | + close: function () { | ||
| 313 | + var th = this; | ||
| 314 | + var nav_b = th.selectComponent("#nav_b"); //组件的id | ||
| 315 | + nav_b.close_box(); | ||
| 316 | + nav_b.set_name("礼包", "/pages/giftpack/buygiftpack/giftpackbuy"); | ||
| 265 | } | 317 | } |
| 266 | - | ||
| 267 | }); | 318 | }); |
| 268 | \ No newline at end of file | 319 | \ No newline at end of file |
pages/giftpack/giftpacklist/giftpacklist.json
| 1 | { | 1 | { |
| 2 | "navigationBarTitleText": "礼包详情", | 2 | "navigationBarTitleText": "礼包详情", |
| 3 | - "navigationStyle": "custom", | ||
| 4 | "usingComponents": { | 3 | "usingComponents": { |
| 5 | "warn": "/components/long_warn/long_warn", | 4 | "warn": "/components/long_warn/long_warn", |
| 6 | - "my_confirm": "/components/my_confirm/my_confirm" | 5 | + "my_confirm": "/components/my_confirm/my_confirm", |
| 6 | + "qr_code": "/components/qr_code/qr_code", | ||
| 7 | + "nav_b": "/components/nav_b/nav_b" | ||
| 7 | } | 8 | } |
| 8 | } | 9 | } |
| 9 | \ No newline at end of file | 10 | \ No newline at end of file |
pages/giftpack/giftpacklist/giftpacklist.wxml
| 1 | <view class="box data-v-3a5b7e36"> | 1 | <view class="box data-v-3a5b7e36"> |
| 2 | <view class="box_top data-v-3a5b7e36"> | 2 | <view class="box_top data-v-3a5b7e36"> |
| 3 | - <image src="{{giftImage}}" class="data-v-3a5b7e36" lazy-load="true"></image> | 3 | + <image src="{{giftImage}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="giftImage"></image> |
| 4 | </view> | 4 | </view> |
| 5 | <view class="box_title data-v-3a5b7e36"> | 5 | <view class="box_title data-v-3a5b7e36"> |
| 6 | <view class="top_title data-v-3a5b7e36"> | 6 | <view class="top_title data-v-3a5b7e36"> |
| @@ -40,19 +40,19 @@ | @@ -40,19 +40,19 @@ | ||
| 40 | <view class="box_ware_box data-v-3a5b7e36"> | 40 | <view class="box_ware_box data-v-3a5b7e36"> |
| 41 | <view class="box_ware_img data-v-3a5b7e36"> | 41 | <view class="box_ware_img data-v-3a5b7e36"> |
| 42 | <block wx:if="{{item.lbType==1}}"> | 42 | <block wx:if="{{item.lbType==1}}"> |
| 43 | - <image src="{{item.wareImage==''?iurl+'/miniapp/images/giftbag/gift01.png':iurl+item.wareImage}}" class="data-v-3a5b7e36" lazy-load="true"></image> | 43 | + <image src="{{item.wareImage==''?iurl+'/miniapp/images/giftbag/gift01.png':iurl+item.wareImage}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image> |
| 44 | </block> | 44 | </block> |
| 45 | <block wx:if="{{item.lbType==2}}"> | 45 | <block wx:if="{{item.lbType==2}}"> |
| 46 | - <image src="{{iurl+'/miniapp/images/giftbag/gift05.png'}}" class="data-v-3a5b7e36" lazy-load="true"></image> | 46 | + <image src="{{iurl+'/miniapp/images/giftbag/gift05.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image> |
| 47 | </block> | 47 | </block> |
| 48 | <block wx:if="{{item.lbType==3}}"> | 48 | <block wx:if="{{item.lbType==3}}"> |
| 49 | - <image src="{{iurl+'/miniapp/images/giftbag/gift02.png'}}" class="data-v-3a5b7e36" lazy-load="true"></image> | 49 | + <image src="{{iurl+'/miniapp/images/giftbag/gift02.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image> |
| 50 | </block> | 50 | </block> |
| 51 | <block wx:if="{{item.lbType==4}}"> | 51 | <block wx:if="{{item.lbType==4}}"> |
| 52 | - <image src="{{iurl+'/miniapp/images/giftbag/gift03.png'}}" class="data-v-3a5b7e36" lazy-load="true"></image> | 52 | + <image src="{{iurl+'/miniapp/images/giftbag/gift03.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image> |
| 53 | </block> | 53 | </block> |
| 54 | <block wx:if="{{item.lbType==5}}"> | 54 | <block wx:if="{{item.lbType==5}}"> |
| 55 | - <image src="{{iurl+'/miniapp/images/giftbag/gift04.png'}}" class="data-v-3a5b7e36" lazy-load="true"></image> | 55 | + <image src="{{iurl+'/miniapp/images/giftbag/gift04.png'}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].wareImage"></image> |
| 56 | </block> | 56 | </block> |
| 57 | </view> | 57 | </view> |
| 58 | <view class="box_ware_item data-v-3a5b7e36"> | 58 | <view class="box_ware_item data-v-3a5b7e36"> |
| @@ -67,16 +67,16 @@ | @@ -67,16 +67,16 @@ | ||
| 67 | </view> | 67 | </view> |
| 68 | <view class="box_ware_code data-v-3a5b7e36"> | 68 | <view class="box_ware_code data-v-3a5b7e36"> |
| 69 | <block wx:if="{{isBuy==0&item.lbType==1}}"> | 69 | <block wx:if="{{isBuy==0&item.lbType==1}}"> |
| 70 | - <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" lazy-load="true" bindtap="__e" class="data-v-3a5b7e36"></image> | 70 | + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" lazy-load="true" bindtap="getcode" class="data-v-3a5b7e36"></image> |
| 71 | </block> | 71 | </block> |
| 72 | <block wx:if="{{isBuy==0&item.lbType==2}}"> | 72 | <block wx:if="{{isBuy==0&item.lbType==2}}"> |
| 73 | - <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" bindtap="__e" class="data-v-3a5b7e36" lazy-load="true"></image> | ||
| 74 | - </block> | 73 | + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" class="data-v-3a5b7e36" lazy-load="true" data-url="/pages/user/coupons/coupons" bindtap="goto"></image> |
| 74 | + </block> | ||
| 75 | <block wx:if="{{isBuy==0&item.lbType==3}}"> | 75 | <block wx:if="{{isBuy==0&item.lbType==3}}"> |
| 76 | - <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" bindtap="__e" class="data-v-3a5b7e36" lazy-load="true"></image> | 76 | + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" class="data-v-3a5b7e36" lazy-load="true" data-url="/pages/user/my_service/i_service" bindtap="goto"></image> |
| 77 | </block> | 77 | </block> |
| 78 | <block wx:if="{{isBuy==0&item.lbType>3}}"> | 78 | <block wx:if="{{isBuy==0&item.lbType>3}}"> |
| 79 | - <text class="data-v-3a5b7e36">已自动到账</text> | 79 | + <text class="data-v-3a5b7e36">奖励已发放</text> |
| 80 | </block> | 80 | </block> |
| 81 | </view> | 81 | </view> |
| 82 | </view> | 82 | </view> |
| @@ -95,35 +95,47 @@ | @@ -95,35 +95,47 @@ | ||
| 95 | <block wx:if="{{isBuy==1}}"> | 95 | <block wx:if="{{isBuy==1}}"> |
| 96 | <view class="foot_button data-v-3a5b7e36"> | 96 | <view class="foot_button data-v-3a5b7e36"> |
| 97 | <block wx:if="{{giftPrice>0&&giftIntegral>0}}"> | 97 | <block wx:if="{{giftPrice>0&&giftIntegral>0}}"> |
| 98 | - <view class="foot_button_left data-v-3a5b7e36"> | ||
| 99 | - <text bindtap="GetBuyPrice" class="data-v-3a5b7e36" data-id="{{lbId}}">立即购买</text> | 98 | + <view class="foot_button_left data-v-3a5b7e36" data-id="{{lbId}}" bindtap="GetBuyPrice"> |
| 99 | + <text class="data-v-3a5b7e36">立即购买</text> | ||
| 100 | </view> | 100 | </view> |
| 101 | </block> | 101 | </block> |
| 102 | <block wx:if="{{giftPrice>0 && giftIntegral>0}}"> | 102 | <block wx:if="{{giftPrice>0 && giftIntegral>0}}"> |
| 103 | - <view class="foot_button_right data-v-3a5b7e36"> | ||
| 104 | - <text bindtap="GetBuyIntegral" class="data-v-3a5b7e36" data-id="{{lbId}}">立即兑换</text> | 103 | + <view class="foot_button_right data-v-3a5b7e36" bindtap="GetBuyIntegral" data-id="{{lbId}}"> |
| 104 | + <text class="data-v-3a5b7e36">立即兑换</text> | ||
| 105 | </view> | 105 | </view> |
| 106 | </block> | 106 | </block> |
| 107 | <block wx:if="{{giftPrice>0 && giftIntegral<=0}}"> | 107 | <block wx:if="{{giftPrice>0 && giftIntegral<=0}}"> |
| 108 | - <view class="foot_button_buy data-v-3a5b7e36"> | ||
| 109 | - <text bindtap="GetBuyPrice" class="data-v-3a5b7e36" data-id="{{lbId}}">立即购买</text> | 108 | + <view class="foot_button_buy data-v-3a5b7e36" bindtap="GetBuyPrice" data-id="{{lbId}}"> |
| 109 | + <text class="data-v-3a5b7e36">立即购买</text> | ||
| 110 | </view> | 110 | </view> |
| 111 | </block> | 111 | </block> |
| 112 | <block wx:if="{{giftPrice<=0 && giftIntegral>0}}"> | 112 | <block wx:if="{{giftPrice<=0 && giftIntegral>0}}"> |
| 113 | - <view class="foot_button_intalge data-v-3a5b7e36"> | ||
| 114 | - <text bindtap="GetBuyIntegral" class="data-v-3a5b7e36" data-id="{{lbId}}">立即兑换</text> | 113 | + <view class="foot_button_intalge data-v-3a5b7e36" bindtap="GetBuyIntegral" data-id="{{lbId}}"> |
| 114 | + <text class="data-v-3a5b7e36">立即兑换</text> | ||
| 115 | </view> | 115 | </view> |
| 116 | </block> | 116 | </block> |
| 117 | </view> | 117 | </view> |
| 118 | </block> | 118 | </block> |
| 119 | <block wx:if="{{isBuy==0}}"> | 119 | <block wx:if="{{isBuy==0}}"> |
| 120 | <view class="foot_button data-v-3a5b7e36"> | 120 | <view class="foot_button data-v-3a5b7e36"> |
| 121 | - <view class="foot_button_buy data-v-3a5b7e36"> | ||
| 122 | - <text bindtap="__e" class="data-v-3a5b7e36">立即使用</text> | 121 | + <view wx:if="{{c_state==0}}" class="foot_button_buy data-v-3a5b7e36" bindtap="getcode"> |
| 122 | + <text class="data-v-3a5b7e36">立即使用</text> | ||
| 123 | + </view> | ||
| 124 | + <view wx:if="{{c_state==1}}" class="foot_button_buy data-v-3a5b7e36 overdue" > | ||
| 125 | + <text class="data-v-3a5b7e36">商品已使用</text> | ||
| 123 | </view> | 126 | </view> |
| 127 | + <view wx:if="{{c_state==2}}" class="foot_button_buy data-v-3a5b7e36 overdue" > | ||
| 128 | + <text class="data-v-3a5b7e36">商品已过期</text> | ||
| 129 | + </view> | ||
| 130 | + | ||
| 131 | + | ||
| 124 | </view> | 132 | </view> |
| 125 | </block> | 133 | </block> |
| 126 | </view> | 134 | </view> |
| 127 | <!-- 引入提示组件 --> | 135 | <!-- 引入提示组件 --> |
| 128 | <warn id="warn"></warn> | 136 | <warn id="warn"></warn> |
| 129 | -<my_confirm id="my_confirm"></my_confirm> | ||
| 130 | \ No newline at end of file | 137 | \ No newline at end of file |
| 138 | +<my_confirm id="my_confirm"></my_confirm> | ||
| 139 | +<!-- 弹出框扫描 --> | ||
| 140 | +<qr_code id="qc_com"></qr_code> | ||
| 141 | +<!-- 制作一个圆球导航 --> | ||
| 142 | +<nav_b id="nav_b"></nav_b> | ||
| 131 | \ No newline at end of file | 143 | \ No newline at end of file |
pages/giftpack/giftpacklist/giftpacklist.wxss
| 1 | - | ||
| 2 | @charset "UTF-8"; | 1 | @charset "UTF-8"; |
| 2 | + | ||
| 3 | /* Author XGQ | 3 | /* Author XGQ |
| 4 | * 2019-12-12 | 4 | * 2019-12-12 |
| 5 | */ | 5 | */ |
| 6 | + | ||
| 6 | .box.data-v-3a5b7e36 { | 7 | .box.data-v-3a5b7e36 { |
| 7 | - -webkit-align-content: center; | ||
| 8 | - align-content: center; | 8 | + -webkit-align-content: center; |
| 9 | + align-content: center; | ||
| 10 | + background-color: #e85f93; | ||
| 9 | } | 11 | } |
| 12 | + | ||
| 10 | .box_top.data-v-3a5b7e36 { | 13 | .box_top.data-v-3a5b7e36 { |
| 11 | - width: 100%; | 14 | + width: 100%; |
| 12 | } | 15 | } |
| 16 | + | ||
| 13 | .box_top image.data-v-3a5b7e36 { | 17 | .box_top image.data-v-3a5b7e36 { |
| 14 | - width: 100%; | ||
| 15 | - height: 540rpx; | 18 | + width: 100%; |
| 19 | + max-height: 540rpx; | ||
| 16 | } | 20 | } |
| 21 | + | ||
| 17 | .box_title.data-v-3a5b7e36 { | 22 | .box_title.data-v-3a5b7e36 { |
| 18 | - margin: 10rpx 20rpx 20rpx 20rpx; | ||
| 19 | - padding: 35rpx; | ||
| 20 | - background-color: #FFFFFF; | ||
| 21 | - border-radius: 20rpx; | 23 | + margin: 10rpx 20rpx 20rpx 20rpx; |
| 24 | + padding: 35rpx; | ||
| 25 | + background-color: #fff; | ||
| 26 | + border-radius: 40rpx; | ||
| 22 | } | 27 | } |
| 28 | + | ||
| 23 | .top_title.data-v-3a5b7e36 { | 29 | .top_title.data-v-3a5b7e36 { |
| 24 | - font-size: 30rpx; | ||
| 25 | - margin-bottom: 10rpx; | 30 | + font-size: 30rpx; |
| 31 | + margin-bottom: 10rpx; | ||
| 26 | } | 32 | } |
| 33 | + | ||
| 27 | .top_time.data-v-3a5b7e36 { | 34 | .top_time.data-v-3a5b7e36 { |
| 28 | - font-size: 27rpx; | ||
| 29 | - color: #B9B5B5; | 35 | + font-size: 27rpx; |
| 36 | + color: #b9b5b5; | ||
| 30 | } | 37 | } |
| 38 | + | ||
| 31 | .top_price.data-v-3a5b7e36 { | 39 | .top_price.data-v-3a5b7e36 { |
| 32 | - font-size: 35rpx; | ||
| 33 | - color: #D61B30; | ||
| 34 | - margin-top: 30rpx; | ||
| 35 | - margin-bottom: 5rpx; | 40 | + font-size: 35rpx; |
| 41 | + color: #d61b30; | ||
| 42 | + margin-top: 30rpx; | ||
| 43 | + margin-bottom: 5rpx; | ||
| 36 | } | 44 | } |
| 45 | + | ||
| 37 | .top_foot.data-v-3a5b7e36 { | 46 | .top_foot.data-v-3a5b7e36 { |
| 38 | - display: -webkit-box; | ||
| 39 | - display: -webkit-flex; | ||
| 40 | - display: flex; | 47 | + display: -webkit-box; |
| 48 | + display: -webkit-flex; | ||
| 49 | + display: flex; | ||
| 41 | } | 50 | } |
| 51 | + | ||
| 42 | .top_foot_price.data-v-3a5b7e36 { | 52 | .top_foot_price.data-v-3a5b7e36 { |
| 43 | - font-size: 22rpx; | ||
| 44 | - color: #B9B5B5; | ||
| 45 | - width: 50%; | ||
| 46 | - text-decoration: line-through; | 53 | + font-size: 22rpx; |
| 54 | + color: #b9b5b5; | ||
| 55 | + width: 50%; | ||
| 56 | + text-decoration: line-through; | ||
| 47 | } | 57 | } |
| 58 | + | ||
| 48 | .top_foot_qty.data-v-3a5b7e36 { | 59 | .top_foot_qty.data-v-3a5b7e36 { |
| 49 | - font-size: 22rpx; | ||
| 50 | - color: #B9B5B5; | ||
| 51 | - width: 50%; | ||
| 52 | - -webkit-align-content: flex-end; | ||
| 53 | - align-content: flex-end; | ||
| 54 | - text-align: right; | 60 | + font-size: 22rpx; |
| 61 | + color: #b9b5b5; | ||
| 62 | + width: 50%; | ||
| 63 | + -webkit-align-content: flex-end; | ||
| 64 | + align-content: flex-end; | ||
| 65 | + text-align: right; | ||
| 55 | } | 66 | } |
| 67 | + | ||
| 56 | .box_ware.data-v-3a5b7e36 { | 68 | .box_ware.data-v-3a5b7e36 { |
| 57 | - margin: 10rpx 20rpx 20rpx 20rpx; | ||
| 58 | - padding: 35rpx; | ||
| 59 | - background-color: #FFFFFF; | ||
| 60 | - border-radius: 20rpx; | 69 | + margin: 10rpx 20rpx 20rpx 20rpx; |
| 70 | + padding: 35rpx; | ||
| 71 | + background-color: #fff; | ||
| 72 | + border-radius: 40rpx; | ||
| 61 | } | 73 | } |
| 74 | + | ||
| 62 | .box_ware_title.data-v-3a5b7e36 { | 75 | .box_ware_title.data-v-3a5b7e36 { |
| 63 | - font-size: 35rpx; | ||
| 64 | - margin: 5rpx 0rpx 30rpx 0rpx; | 76 | + font-size: 35rpx; |
| 77 | + margin: 5rpx 0rpx 30rpx 0rpx; | ||
| 65 | } | 78 | } |
| 79 | + | ||
| 66 | .box_ware_box.data-v-3a5b7e36 { | 80 | .box_ware_box.data-v-3a5b7e36 { |
| 67 | - display: -webkit-box; | ||
| 68 | - display: -webkit-flex; | ||
| 69 | - display: flex; | ||
| 70 | - margin: 10rpx 0rpx 25rpx 0rpx; | 81 | + display: -webkit-box; |
| 82 | + display: -webkit-flex; | ||
| 83 | + display: flex; | ||
| 84 | + margin: 10rpx 0rpx 25rpx 0rpx; | ||
| 71 | } | 85 | } |
| 72 | -.box_ware_img.data-v-3a5b7e36 { | 86 | + |
| 87 | +/* .box_ware_img.data-v-3a5b7e36 { | ||
| 73 | width: 30%; | 88 | width: 30%; |
| 74 | height: 180rpx; | 89 | height: 180rpx; |
| 75 | border: #999999 solid 1rpx; | 90 | border: #999999 solid 1rpx; |
| 76 | -} | 91 | +} */ |
| 92 | + | ||
| 77 | .box_ware_img image.data-v-3a5b7e36 { | 93 | .box_ware_img image.data-v-3a5b7e36 { |
| 78 | - width: 100%; | ||
| 79 | - height: 100%; | 94 | + /* width: 185rpx; |
| 95 | + height: 190rpx; *//* background-color: rgba(138, 138, 138, 0.63); */ | ||
| 96 | + border: 2rpx solid #999; | ||
| 97 | + width: 120rpx; | ||
| 98 | + height: 120rpx; | ||
| 80 | } | 99 | } |
| 100 | + | ||
| 81 | .box_ware_item.data-v-3a5b7e36 { | 101 | .box_ware_item.data-v-3a5b7e36 { |
| 82 | - width: 70%; | ||
| 83 | - margin-left: 25rpx; | ||
| 84 | - position: relative; | 102 | + width: 70%; |
| 103 | + margin-left: 25rpx; | ||
| 104 | + position: relative; | ||
| 85 | } | 105 | } |
| 106 | + | ||
| 86 | .box_ware_item_title.data-v-3a5b7e36 { | 107 | .box_ware_item_title.data-v-3a5b7e36 { |
| 87 | - font-size: 30rpx; | ||
| 88 | - word-break: break-all; | ||
| 89 | - text-overflow: ellipsis; | ||
| 90 | - display: -webkit-box; | ||
| 91 | - -webkit-box-orient: vertical; | ||
| 92 | - -webkit-line-clamp: 2; | ||
| 93 | - overflow: hidden; | 108 | + font-size: 24rpx; |
| 109 | + word-break: break-all; | ||
| 110 | + text-overflow: ellipsis; | ||
| 111 | + display: -webkit-box; | ||
| 112 | + -webkit-box-orient: vertical; | ||
| 113 | + -webkit-line-clamp: 2; | ||
| 114 | + overflow: hidden; | ||
| 94 | } | 115 | } |
| 116 | + | ||
| 95 | .box_ware_count.data-v-3a5b7e36 { | 117 | .box_ware_count.data-v-3a5b7e36 { |
| 96 | - display: -webkit-box; | ||
| 97 | - display: -webkit-flex; | ||
| 98 | - display: flex; | 118 | + display: -webkit-box; |
| 119 | + display: -webkit-flex; | ||
| 120 | + display: flex; | ||
| 99 | } | 121 | } |
| 122 | + | ||
| 100 | .box_ware_item_price.data-v-3a5b7e36 { | 123 | .box_ware_item_price.data-v-3a5b7e36 { |
| 101 | - font-size: 25rpx; | ||
| 102 | - color: #B9B5B5; | ||
| 103 | - position: absolute; | ||
| 104 | - bottom: 60rpx; | ||
| 105 | - left: 0; | 124 | + font-size: 25rpx; |
| 125 | + color: #b9b5b5; | ||
| 126 | + position: absolute; | ||
| 127 | + bottom: 60rpx; | ||
| 128 | + left: 0; | ||
| 106 | } | 129 | } |
| 130 | + | ||
| 107 | .box_ware_item_qty.data-v-3a5b7e36 { | 131 | .box_ware_item_qty.data-v-3a5b7e36 { |
| 108 | - font-size: 25rpx; | ||
| 109 | - position: absolute; | ||
| 110 | - bottom: 15rpx; | ||
| 111 | - left: 0; | 132 | + font-size: 22rpx; |
| 133 | + position: absolute; | ||
| 134 | + bottom: 15rpx; | ||
| 135 | + left: 0; | ||
| 112 | } | 136 | } |
| 137 | + | ||
| 113 | .box_ware_code.data-v-3a5b7e36 { | 138 | .box_ware_code.data-v-3a5b7e36 { |
| 114 | - position: absolute; | ||
| 115 | - bottom: 10rpx; | ||
| 116 | - right: 10rpx; | 139 | + position: absolute; |
| 140 | + right: 10rpx; | ||
| 141 | + bottom: 10rpx; | ||
| 117 | } | 142 | } |
| 143 | + | ||
| 118 | .box_ware_code image.data-v-3a5b7e36 { | 144 | .box_ware_code image.data-v-3a5b7e36 { |
| 119 | - width: 60rpx; | ||
| 120 | - height: 60rpx; | 145 | + width: 50rpx; |
| 146 | + height: 50rpx; | ||
| 121 | } | 147 | } |
| 148 | + | ||
| 122 | .box_ware_code text.data-v-3a5b7e36 { | 149 | .box_ware_code text.data-v-3a5b7e36 { |
| 123 | - font-size: 20rpx; | 150 | + font-size: 20rpx; |
| 124 | } | 151 | } |
| 152 | + | ||
| 125 | .foot_box.data-v-3a5b7e36 { | 153 | .foot_box.data-v-3a5b7e36 { |
| 126 | - margin: 10rpx 20rpx 50rpx 20rpx; | ||
| 127 | - padding: 35rpx; | ||
| 128 | - background-color: #FFFFFF; | ||
| 129 | - border-radius: 20rpx; | 154 | + margin: 10rpx 20rpx 50rpx 20rpx; |
| 155 | + padding: 35rpx; | ||
| 156 | + background-color: #fff; | ||
| 157 | + border-radius: 40rpx; | ||
| 130 | } | 158 | } |
| 159 | + | ||
| 131 | .foot_box_title.data-v-3a5b7e36 { | 160 | .foot_box_title.data-v-3a5b7e36 { |
| 132 | - font-size: 35rpx; | ||
| 133 | - margin-bottom: 30rpx; | 161 | + font-size: 35rpx; |
| 162 | + margin-bottom: 30rpx; | ||
| 134 | } | 163 | } |
| 164 | + | ||
| 135 | .foot_box_remark.data-v-3a5b7e36 { | 165 | .foot_box_remark.data-v-3a5b7e36 { |
| 136 | - font-size: 27rpx; | ||
| 137 | - line-height: 40rpx; | 166 | + font-size: 27rpx; |
| 167 | + line-height: 40rpx; | ||
| 138 | } | 168 | } |
| 169 | + | ||
| 139 | .foot_empty.data-v-3a5b7e36 { | 170 | .foot_empty.data-v-3a5b7e36 { |
| 140 | - height: 90rpx; | 171 | + height: 90rpx; |
| 141 | } | 172 | } |
| 173 | + | ||
| 142 | .foot_button.data-v-3a5b7e36 { | 174 | .foot_button.data-v-3a5b7e36 { |
| 143 | - display: -webkit-box; | ||
| 144 | - display: -webkit-flex; | ||
| 145 | - display: flex; | ||
| 146 | - margin: 20rpx 0rpx 0rpx 0rpx; | ||
| 147 | - padding: 25rpx 0rpx; | ||
| 148 | - background: #FFFFFF; | ||
| 149 | - text-align: center; | ||
| 150 | - -webkit-box-pack: center; | ||
| 151 | - -webkit-justify-content: center; | ||
| 152 | - justify-content: center; | ||
| 153 | - position: fixed; | ||
| 154 | - bottom: 0; | ||
| 155 | - left: 0; | ||
| 156 | - width: 100%; | 175 | + display: -webkit-box; |
| 176 | + display: -webkit-flex; | ||
| 177 | + display: flex; | ||
| 178 | + margin: 20rpx 0rpx 0rpx 0rpx; | ||
| 179 | + padding: 25rpx 0rpx; | ||
| 180 | + background: #fff; | ||
| 181 | + text-align: center; | ||
| 182 | + -webkit-box-pack: center; | ||
| 183 | + -webkit-justify-content: center; | ||
| 184 | + justify-content: center; | ||
| 185 | + position: fixed; | ||
| 186 | + bottom: 0; | ||
| 187 | + left: 0; | ||
| 188 | + width: 100%; | ||
| 157 | } | 189 | } |
| 190 | + | ||
| 158 | .foot_button_left.data-v-3a5b7e36 { | 191 | .foot_button_left.data-v-3a5b7e36 { |
| 159 | - background: #e4010c; | ||
| 160 | - color: #FFFFFF; | ||
| 161 | - width: 250rpx; | ||
| 162 | - height: 70rpx; | ||
| 163 | - font-size: 28rpx; | ||
| 164 | - line-height: 70rpx; | ||
| 165 | - border-radius: 30rpx 0rpx 0rpx 30rpx; | 192 | + background: #e4010c; |
| 193 | + color: #fff; | ||
| 194 | + width: 250rpx; | ||
| 195 | + height: 70rpx; | ||
| 196 | + font-size: 28rpx; | ||
| 197 | + line-height: 70rpx; | ||
| 198 | + border-radius: 40rpx; | ||
| 166 | } | 199 | } |
| 200 | + | ||
| 167 | .foot_button_right.data-v-3a5b7e36 { | 201 | .foot_button_right.data-v-3a5b7e36 { |
| 168 | - background: #ffbb42; | ||
| 169 | - color: #FFFFFF; | ||
| 170 | - width: 250rpx; | ||
| 171 | - height: 70rpx; | ||
| 172 | - font-size: 28rpx; | ||
| 173 | - line-height: 70rpx; | ||
| 174 | - border-radius: 0rpx 30rpx 30rpx 0rpx; | 202 | + background: #ffbb42; |
| 203 | + color: #fff; | ||
| 204 | + width: 250rpx; | ||
| 205 | + height: 70rpx; | ||
| 206 | + font-size: 28rpx; | ||
| 207 | + line-height: 70rpx; | ||
| 208 | + border-radius: 40rpx; | ||
| 175 | } | 209 | } |
| 210 | + | ||
| 176 | .foot_button_buy.data-v-3a5b7e36 { | 211 | .foot_button_buy.data-v-3a5b7e36 { |
| 177 | - background: #e4010c; | ||
| 178 | - color: #FFFFFF; | ||
| 179 | - width: 400rpx; | ||
| 180 | - height: 70rpx; | ||
| 181 | - font-size: 28rpx; | ||
| 182 | - line-height: 70rpx; | ||
| 183 | - border-radius: 30rpx 30rpx 30rpx 30rpx; | 212 | + background: #e4010c; |
| 213 | + color: #fff; | ||
| 214 | + width: 400rpx; | ||
| 215 | + height: 70rpx; | ||
| 216 | + font-size: 28rpx; | ||
| 217 | + line-height: 70rpx; | ||
| 218 | + border-radius: 40rpx; | ||
| 184 | } | 219 | } |
| 220 | + | ||
| 185 | .foot_button_intalge.data-v-3a5b7e36 { | 221 | .foot_button_intalge.data-v-3a5b7e36 { |
| 186 | - background: #ffbb42; | ||
| 187 | - color: #FFFFFF; | ||
| 188 | - width: 400rpx; | ||
| 189 | - height: 70rpx; | ||
| 190 | - font-size: 28rpx; | ||
| 191 | - line-height: 70rpx; | ||
| 192 | - border-radius: 30rpx 30rpx 30rpx 30rpx; | 222 | + background: #ffbb42; |
| 223 | + color: #fff; | ||
| 224 | + width: 400rpx; | ||
| 225 | + height: 70rpx; | ||
| 226 | + font-size: 28rpx; | ||
| 227 | + line-height: 70rpx; | ||
| 228 | + border-radius: 40rpx; | ||
| 193 | } | 229 | } |
| 230 | + | ||
| 194 | page.data-v-3a5b7e36 { | 231 | page.data-v-3a5b7e36 { |
| 195 | background-color: #e85f93; | 232 | background-color: #e85f93; |
| 196 | } | 233 | } |
| 234 | + | ||
| 197 | .foot_box_remark.data-v-3a5b7e36 ._img { | 235 | .foot_box_remark.data-v-3a5b7e36 ._img { |
| 198 | width: 100%; | 236 | width: 100%; |
| 199 | } | 237 | } |
| 238 | + | ||
| 200 | .foot_box_remark.data-v-3a5b7e36 .img { | 239 | .foot_box_remark.data-v-3a5b7e36 .img { |
| 201 | line-height: 0; | 240 | line-height: 0; |
| 202 | } | 241 | } |
| 203 | - | 242 | +.overdue.data-v-3a5b7e36{ |
| 243 | + background-color: rgb(153,153,153); | ||
| 244 | +} | ||
| 204 | \ No newline at end of file | 245 | \ No newline at end of file |
pages/giftpack/mygiftpack/mygiftpack.js
| @@ -11,8 +11,8 @@ Page({ | @@ -11,8 +11,8 @@ Page({ | ||
| 11 | getStorageID: '', | 11 | getStorageID: '', |
| 12 | getUserID: '', | 12 | getUserID: '', |
| 13 | wareCard: [], | 13 | wareCard: [], |
| 14 | - pages: 0, | ||
| 15 | - pageSize: 10, | 14 | + // pages: 0, |
| 15 | + // pageSize: 10, | ||
| 16 | isEmpty: false, | 16 | isEmpty: false, |
| 17 | loadingType: 0, //定义加载方式 0---contentdown 1---contentrefresh 2---contentnomore | 17 | loadingType: 0, //定义加载方式 0---contentdown 1---contentrefresh 2---contentnomore |
| 18 | contentText: { | 18 | contentText: { |
| @@ -23,7 +23,7 @@ Page({ | @@ -23,7 +23,7 @@ Page({ | ||
| 23 | ismore:0,//数据是否全部加载完成 | 23 | ismore:0,//数据是否全部加载完成 |
| 24 | is_read:0,//是否查询过我的礼包接口 | 24 | is_read:0,//是否查询过我的礼包接口 |
| 25 | curpage: 1, //当前分页数 | 25 | curpage: 1, //当前分页数 |
| 26 | - pageSize: 3, //页大小 | 26 | + pageSize: 10, //页大小 |
| 27 | total: 0, //总数量 | 27 | total: 0, //总数量 |
| 28 | }, | 28 | }, |
| 29 | 29 | ||
| @@ -34,8 +34,6 @@ Page({ | @@ -34,8 +34,6 @@ Page({ | ||
| 34 | th.setData({ | 34 | th.setData({ |
| 35 | getStorageID: a.stoid, | 35 | getStorageID: a.stoid, |
| 36 | getUserID: d.user_id, | 36 | getUserID: d.user_id, |
| 37 | - pages: 1, | ||
| 38 | - pageSize: 3, | ||
| 39 | loadingType: 0, | 37 | loadingType: 0, |
| 40 | getDate: i.formatTime(new Date().getTime()) | 38 | getDate: i.formatTime(new Date().getTime()) |
| 41 | }) | 39 | }) |
| @@ -169,9 +167,7 @@ Page({ | @@ -169,9 +167,7 @@ Page({ | ||
| 169 | navigateTo: function (e) { | 167 | navigateTo: function (e) { |
| 170 | var th = this; | 168 | var th = this; |
| 171 | var url = e.currentTarget.dataset.url; | 169 | var url = e.currentTarget.dataset.url; |
| 172 | - wx.navigateTo({ | ||
| 173 | - url: url, | ||
| 174 | - }) | 170 | + getApp().goto(url); |
| 175 | }, | 171 | }, |
| 176 | //下拉事件 | 172 | //下拉事件 |
| 177 | onReachBottom: function () { | 173 | onReachBottom: function () { |
| @@ -183,5 +179,13 @@ Page({ | @@ -183,5 +179,13 @@ Page({ | ||
| 183 | }) | 179 | }) |
| 184 | th.getList(); | 180 | th.getList(); |
| 185 | }, | 181 | }, |
| 182 | + //图片失败,默认图片 | ||
| 183 | + bind_bnerr2: function (e) { | ||
| 184 | + var _errImg = e.target.dataset.errorimg; | ||
| 185 | + var _errObj = {}; | ||
| 186 | + _errObj[_errImg] = "/public/images/empty.jpg"; | ||
| 187 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | ||
| 188 | + | ||
| 189 | + }, | ||
| 186 | 190 | ||
| 187 | }); | 191 | }); |
| 188 | \ No newline at end of file | 192 | \ No newline at end of file |
pages/giftpack/mygiftpack/mygiftpack.wxml
| 1 | <view class="top_img"> | 1 | <view class="top_img"> |
| 2 | <view class="top_img"> | 2 | <view class="top_img"> |
| 3 | <!-- <image src="{{$GetInfo.imgHttp+'/miniapp/images/giftbag/gift00.jpg'}}"></image> --> | 3 | <!-- <image src="{{$GetInfo.imgHttp+'/miniapp/images/giftbag/gift00.jpg'}}"></image> --> |
| 4 | - <image src="{{iurl+'/miniapp/images/giftbag/gift00.jpg'}}" lazy-load="true"></image> | 4 | + <image src="{{iurl+'/miniapp/images/giftbag/gift00.jpg?v=2019'}}" lazy-load="true"></image> |
| 5 | </view> | 5 | </view> |
| 6 | <view class="top_title"> | 6 | <view class="top_title"> |
| 7 | <view class="top_title_box"> | 7 | <view class="top_title_box"> |
| @@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
| 17 | <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&orderSn={{item.orderSn}}"> | 17 | <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&orderSn={{item.orderSn}}"> |
| 18 | <view class="content_box_img"> | 18 | <view class="content_box_img"> |
| 19 | <!-- <image src="{{$GetInfo.imgHttp+item.$orig.lbUrl}}"></image> --> | 19 | <!-- <image src="{{$GetInfo.imgHttp+item.$orig.lbUrl}}"></image> --> |
| 20 | - <image src="{{iurl+item.lbUrl}}" lazy-load="true"></image> | 20 | + <image src="{{iurl+item.lbUrl}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image> |
| 21 | <block wx:if="{{item.actType!=0}}"> | 21 | <block wx:if="{{item.actType!=0}}"> |
| 22 | <view class="{{[item.actType==1?'content_box_img_title content_box_img_ground1':item.actType==2?'content_box_img_title content_box_img_ground2':item.actType==4?'content_box_img_title content_box_img_ground3':'content_box_img_title content_box_img_ground4']}}"> | 22 | <view class="{{[item.actType==1?'content_box_img_title content_box_img_ground1':item.actType==2?'content_box_img_title content_box_img_ground2':item.actType==4?'content_box_img_title content_box_img_ground3':'content_box_img_title content_box_img_ground4']}}"> |
| 23 | <image src="{{iurl+'/miniapp/images/giftbag/gift01.png'}}" lazy-load="true"></image> | 23 | <image src="{{iurl+'/miniapp/images/giftbag/gift01.png'}}" lazy-load="true"></image> |
| @@ -42,7 +42,7 @@ | @@ -42,7 +42,7 @@ | ||
| 42 | </view> | 42 | </view> |
| 43 | <view class="content_box_title"> | 43 | <view class="content_box_title"> |
| 44 | <view class="content_ware_title"> | 44 | <view class="content_ware_title"> |
| 45 | - <text bindtap="__e">{{item.giftTitle}}</text> | 45 | + <text>{{item.giftTitle}}</text> |
| 46 | </view> | 46 | </view> |
| 47 | <view class="content_ware_type"> | 47 | <view class="content_ware_type"> |
| 48 | <block wx:if="{{item.actType==0&item.payMoney>0}}"> | 48 | <block wx:if="{{item.actType==0&item.payMoney>0}}"> |
| @@ -94,14 +94,11 @@ | @@ -94,14 +94,11 @@ | ||
| 94 | <text>当前暂无礼包</text> | 94 | <text>当前暂无礼包</text> |
| 95 | </view> | 95 | </view> |
| 96 | <view class="foot_empty_button"> | 96 | <view class="foot_empty_button"> |
| 97 | - <text bindtap="__e">去获取</text> | 97 | + <text bindtap="navigateTo" data-url="/pages/giftpack/buygiftpack/giftpackbuy">去获取</text> |
| 98 | </view> | 98 | </view> |
| 99 | </view> | 99 | </view> |
| 100 | </block> | 100 | </block> |
| 101 | <block wx:if="{{ismore}}"> | 101 | <block wx:if="{{ismore}}"> |
| 102 | - <!-- <view class="foot_box"> | ||
| 103 | - <text>———— 到底了 ————</text> | ||
| 104 | - </view> --> | ||
| 105 | <!-- 加载完毕并且数据大于=页大小 --> | 102 | <!-- 加载完毕并且数据大于=页大小 --> |
| 106 | <view class="After_all flex-center" wx:if="{{ismore && wareCard.length>=3}}"> | 103 | <view class="After_all flex-center" wx:if="{{ismore && wareCard.length>=3}}"> |
| 107 | <view class="Line"></view> | 104 | <view class="Line"></view> |
pages/giftpack/mygiftpack/mygiftpack.wxss
| @@ -12,7 +12,6 @@ | @@ -12,7 +12,6 @@ | ||
| 12 | 12 | ||
| 13 | .top_img image { | 13 | .top_img image { |
| 14 | width: 100%; | 14 | width: 100%; |
| 15 | - height: 660rpx; | ||
| 16 | } | 15 | } |
| 17 | 16 | ||
| 18 | .top_title { | 17 | .top_title { |
| @@ -236,7 +235,7 @@ | @@ -236,7 +235,7 @@ | ||
| 236 | } | 235 | } |
| 237 | 236 | ||
| 238 | page { | 237 | page { |
| 239 | - background-color: #fb7454; | 238 | + background-color: rgb(250, 120, 88); |
| 240 | } | 239 | } |
| 241 | .After_all { | 240 | .After_all { |
| 242 | height: 80rpx; | 241 | height: 80rpx; |
pages/giftpack/newvipgift/newvipgift.js
0 → 100644
| 1 | +var i = require("../../../utils/util.js") | ||
| 2 | +var e = getApp(), | ||
| 3 | + a = e.globalData.setting, | ||
| 4 | + os = a, | ||
| 5 | + t = e.request, | ||
| 6 | + d = e.globalData; | ||
| 7 | +Page({ | ||
| 8 | + data: { | ||
| 9 | + url: a.url, //接口网址 | ||
| 10 | + iurl: a.imghost, //图片前缀网址 | ||
| 11 | + itemShow: false, //项目栏目是否显示 | ||
| 12 | + cardShow: false, //代金券栏目是否显示 | ||
| 13 | + packShow: false, //福利栏目是否显示 | ||
| 14 | + textShow: false, //规则是否显示 | ||
| 15 | + integralShow: true, //积分领取是否显示 | ||
| 16 | + growUpShow: true, //成长值领取是否显示 | ||
| 17 | + itemButton: '', | ||
| 18 | + cardButton: '', | ||
| 19 | + getActId: '', | ||
| 20 | + getActType: '', | ||
| 21 | + giftID: '', | ||
| 22 | + receiveState: '一键全部领取', | ||
| 23 | + textTitle: '', | ||
| 24 | + getUrl: '', | ||
| 25 | + noShow: false, | ||
| 26 | + cards: [], //礼包内容--礼券 | ||
| 27 | + itemWare: [], //礼包内容--服务项目 | ||
| 28 | + integralTitle: "", | ||
| 29 | + growUpTitle: "", | ||
| 30 | + is_sub: 0, //是否重复领取 | ||
| 31 | + }, | ||
| 32 | + GetList: function() { | ||
| 33 | + var th = this; | ||
| 34 | + var url = "/api/weshop/marketing/giftbag/bound/get"; | ||
| 35 | + getApp().request.promiseGet(url, { | ||
| 36 | + data: { | ||
| 37 | + "actId": th.data.getActId, //活动id | ||
| 38 | + "actType":1, //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销 | ||
| 39 | + "giftBagId": th.data.giftID, //礼包ID | ||
| 40 | + "storeId": a.stoid, //商家ID | ||
| 41 | + "userId": d.user_id //用户ID | ||
| 42 | + } | ||
| 43 | + }).then(res => { | ||
| 44 | + if (res.data.code == 0) { | ||
| 45 | + if (res.data.data.lbCoupons != null && res.data.data.lbCoupons.length>0) { | ||
| 46 | + //礼包内容--礼券 | ||
| 47 | + th.setData({ | ||
| 48 | + cardShow: true, | ||
| 49 | + cards: res.data.data.lbCoupons | ||
| 50 | + }) | ||
| 51 | + } | ||
| 52 | + if (res.data.data.lbSM != null && res.data.data.lbSM.length>0) { | ||
| 53 | + //礼包内容--服务项目 | ||
| 54 | + th.setData({ | ||
| 55 | + itemShow: true, | ||
| 56 | + itemWare: res.data.data.lbSM | ||
| 57 | + }) | ||
| 58 | + } | ||
| 59 | + //礼包积分 | ||
| 60 | + if (res.data.data.lbIntegral <= 0) { | ||
| 61 | + if (res.data.data.lbGrowthValue <= 0) { | ||
| 62 | + th.setData({ | ||
| 63 | + packShow: false | ||
| 64 | + }) | ||
| 65 | + } else { | ||
| 66 | + th.setData({ | ||
| 67 | + packShow: false, | ||
| 68 | + integralShow: false, | ||
| 69 | + growUpShow: true | ||
| 70 | + }) | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + } else { | ||
| 74 | + if (res.data.data.lbGrowthValue > 0) { | ||
| 75 | + th.setData({ | ||
| 76 | + packShow: true | ||
| 77 | + }) | ||
| 78 | + } else { | ||
| 79 | + th.setData({ | ||
| 80 | + packShow: true, | ||
| 81 | + integralShow: true, | ||
| 82 | + growUpShow: false | ||
| 83 | + }) | ||
| 84 | + } | ||
| 85 | + } | ||
| 86 | + th.setData({ | ||
| 87 | + integralTitle: '价值' + res.data.data.lbIntegral + '积分', | ||
| 88 | + growUpTitle: '价值' + res.data.data.lbGrowthValue + '成长值' | ||
| 89 | + }) | ||
| 90 | + if (res.data.data.receiveState == 0) { | ||
| 91 | + th.setData({ | ||
| 92 | + receiveState: '一键全部领取' | ||
| 93 | + }) | ||
| 94 | + } else { | ||
| 95 | + th.setData({ | ||
| 96 | + receiveState: '已领取' | ||
| 97 | + }) | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + if (res.data.data.actIntro != '') { | ||
| 101 | + th.setData({ | ||
| 102 | + textShow: true, | ||
| 103 | + textTitle: res.data.data.actIntro | ||
| 104 | + }) | ||
| 105 | + } | ||
| 106 | + } else { | ||
| 107 | + getApp().my_warnning(res.data.msg, 0, th); | ||
| 108 | + return false; | ||
| 109 | + } | ||
| 110 | + }) | ||
| 111 | + }, | ||
| 112 | + | ||
| 113 | + onLoad: function(options) { | ||
| 114 | + var th = this; | ||
| 115 | + th.setData({ | ||
| 116 | + getActId: options.actId, | ||
| 117 | + giftID: options.giftBagId | ||
| 118 | + }) | ||
| 119 | + th.GetList(); | ||
| 120 | + }, | ||
| 121 | + onShow: function() { | ||
| 122 | + var th = this; | ||
| 123 | + var textTitle = th.data.textTitle.replace(/<img/gi, '<img style="max-width:100%;height:auto;float:left;display:block" '); | ||
| 124 | + th.setData({ | ||
| 125 | + textTitle: textTitle | ||
| 126 | + }) | ||
| 127 | + }, | ||
| 128 | + GetReceive: function() { | ||
| 129 | + var th = this; | ||
| 130 | + if (th.data.receiveState == '已领取') { | ||
| 131 | + return false; | ||
| 132 | + } | ||
| 133 | + var is_sub = th.data.is_sub; //判断是否重复提交 | ||
| 134 | + if (is_sub == 0) { | ||
| 135 | + th.setData({ | ||
| 136 | + is_sub: 1 | ||
| 137 | + }) | ||
| 138 | + | ||
| 139 | + var json = { | ||
| 140 | + "actId": th.data.getActId, //活动Id | ||
| 141 | + "actType": 1, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 | ||
| 142 | + "giftBagId": th.data.giftID, //礼包Id | ||
| 143 | + "storeId": a.stoid, //商家Id | ||
| 144 | + "userId": d.user_id //用户ID | ||
| 145 | + }; | ||
| 146 | + var data = JSON.stringify(json); | ||
| 147 | + var url = th.data.url + "/api/weshop/marketing/free/receive/gift/record/insert"; | ||
| 148 | + wx.request({ | ||
| 149 | + url: url, | ||
| 150 | + data: data, | ||
| 151 | + method: 'post', | ||
| 152 | + header: { | ||
| 153 | + 'content-type': 'application/json' | ||
| 154 | + }, // 设置请求的 header | ||
| 155 | + success: function(res) { | ||
| 156 | + th.setData({ | ||
| 157 | + is_sub: 0 | ||
| 158 | + }) | ||
| 159 | + if (res.data.code == 0) { | ||
| 160 | + th.setData({ | ||
| 161 | + receiveState: '已领取' | ||
| 162 | + }) | ||
| 163 | + getApp().my_warnning("领取成功", 1, th); | ||
| 164 | + } else { | ||
| 165 | + getApp().my_warnning("系统繁忙,请稍后再试", 0, th); | ||
| 166 | + } | ||
| 167 | + } | ||
| 168 | + }) | ||
| 169 | + } | ||
| 170 | + }, | ||
| 171 | + //界面跳转 | ||
| 172 | + goto:function(e){ | ||
| 173 | + var url = e.currentTarget.dataset.url; | ||
| 174 | + getApp().goto(url); | ||
| 175 | + }, | ||
| 176 | + //图片失败,默认图片 | ||
| 177 | + bind_bnerr1: function (e) { | ||
| 178 | + var th = this; | ||
| 179 | + var _errImg = e.target.dataset.errorimg; | ||
| 180 | + var _Img = e.target.dataset.img; | ||
| 181 | + if (_Img != undefined) { | ||
| 182 | + var _errObj = {}; | ||
| 183 | + _errObj[_errImg] = "/miniapp/images/giftbag/gift02.png"; | ||
| 184 | + th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | ||
| 185 | + } | ||
| 186 | + }, | ||
| 187 | +}); | ||
| 0 | \ No newline at end of file | 188 | \ No newline at end of file |
pages/giftpack/newvipgift/newvipgift.json
0 → 100644
pages/giftpack/newvipgift/newvipgift.wxml
0 → 100644
| 1 | +<view> | ||
| 2 | + <view class="image_box"> | ||
| 3 | + <image src="{{iurl+'/miniapp/images/giftbag/vip00.png'}}" lazy-load="true"></image> | ||
| 4 | + </view> | ||
| 5 | + <block wx:if="{{itemShow}}"> | ||
| 6 | + <view class="top rel"> | ||
| 7 | + <view class="top_box"> | ||
| 8 | + <view class="top_box_text"> | ||
| 9 | + <text>______</text> | ||
| 10 | + </view> | ||
| 11 | + <view class="top_box_text"> | ||
| 12 | + <text>新人专享\n你的美丽我来缔造</text> | ||
| 13 | + </view> | ||
| 14 | + <view class="top_box_text"> | ||
| 15 | + <text>______</text> | ||
| 16 | + </view> | ||
| 17 | + </view> | ||
| 18 | + <block wx:for="{{itemWare}}" wx:for-item="item" wx:for-index="index" wx:key="index"> | ||
| 19 | + <view class="top_item "> | ||
| 20 | + <block wx:if="{{item.lbType==3}}"> | ||
| 21 | + <view class="top_item_img"> | ||
| 22 | + <image src="{{item.fromImage=='' || item.fromImage==null?iurl+'/miniapp/images/giftbag/gift02.png':iurl+item.fromImage}}" lazy-load="true" data-errorimg="itemWare[{{index}}].fromImage" binderror="bind_bnerr1" data-img="{{item.fromImage}}"></image> | ||
| 23 | + </view> | ||
| 24 | + </block> | ||
| 25 | + <block wx:if="{{item.lbType==1}}"> | ||
| 26 | + <view class="top_item_img "> | ||
| 27 | + <image src="{{item.fromImage==''?iurl+'/miniapp/images/giftbag/empty.jpg':iurl+item.fromImage}}" lazy-load="true"></image> | ||
| 28 | + </view> | ||
| 29 | + </block> | ||
| 30 | + <view class="top_item_center "> | ||
| 31 | + <view class="top_item_center_title"> | ||
| 32 | + <block wx:if="{{item.lbType==1}}"> | ||
| 33 | + <text>免费领取</text> | ||
| 34 | + </block> | ||
| 35 | + <block wx:if="{{item.lbType==3}}"> | ||
| 36 | + <text>{{item.fromName}}</text> | ||
| 37 | + </block> | ||
| 38 | + </view> | ||
| 39 | + <view class="top_item_center_ramke "> | ||
| 40 | + <block wx:if="{{item.lbType==1}}"> | ||
| 41 | + <text>{{item.fromName}}</text> | ||
| 42 | + </block> | ||
| 43 | + <block wx:if="{{item.lbType==3}}"> | ||
| 44 | + <text>{{"新人可免费享受专业"+item.fromName+",可以享受"+item.num+"次。"}}</text> | ||
| 45 | + </block> | ||
| 46 | + <view class="num flex-level-right fs26"> | ||
| 47 | + <view>数量:</view> | ||
| 48 | + <view>{{item.num}}</view> | ||
| 49 | + </view> | ||
| 50 | + </view> | ||
| 51 | + </view> | ||
| 52 | + </view> | ||
| 53 | + </block> | ||
| 54 | + <block wx:if="{{itemShow}}"> | ||
| 55 | + <view class="vips"> | ||
| 56 | + <image class="lvip abs" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image> | ||
| 57 | + <image class="rvip abs" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image> | ||
| 58 | + </view> | ||
| 59 | + </block> | ||
| 60 | + </view> | ||
| 61 | + </block> | ||
| 62 | + <block wx:if="{{cardShow}}"> | ||
| 63 | + <view> | ||
| 64 | + <view class="top rel"> | ||
| 65 | + <view class="top_box "> | ||
| 66 | + <view class="top_box_text "> | ||
| 67 | + <text>———</text> | ||
| 68 | + </view> | ||
| 69 | + <view class="top_box_text "> | ||
| 70 | + <text>新人专享优惠券</text> | ||
| 71 | + </view> | ||
| 72 | + <view class="top_box_text "> | ||
| 73 | + <text>———</text> | ||
| 74 | + </view> | ||
| 75 | + </view> | ||
| 76 | + <block wx:for="{{cards}}" wx:for-item="item" wx:for-index="index" wx:key="index"> | ||
| 77 | + <view class="top_card "> | ||
| 78 | + <view class="{{item.useObjectType==1?'top_card_box img1':item.useObjectType==2?'top_card_box img2':'top_card_box img3'}}"> | ||
| 79 | + <!-- class="{{['',item.useObjectType==1?'top_card_box img1':item.useObjectType==2?'top_card_box img2':'top_card_box img3']}}" --> | ||
| 80 | + <view class="top_card_tite_box "> | ||
| 81 | + <block wx:if="{{item.useObjectType==0}}"> | ||
| 82 | + <view class="top_card_tite_a">全场通用</view> | ||
| 83 | + </block> | ||
| 84 | + <block wx:if="{{item.useObjectType==1}}"> | ||
| 85 | + <view class="top_card_tite_b">品牌限定</view> | ||
| 86 | + </block> | ||
| 87 | + <block wx:if="{{item.useObjectType==2}}"> | ||
| 88 | + <view class="top_card_tite_c">品类限定</view> | ||
| 89 | + </block> | ||
| 90 | + <block wx:if="{{item.useObjectType==11}}"> | ||
| 91 | + <view class="top_card_tite_a">用途限定</view> | ||
| 92 | + </block> | ||
| 93 | + <block wx:if="{{item.useObjectType==12}}"> | ||
| 94 | + <view class="top_card_tite_a">分类限定</view> | ||
| 95 | + </block> | ||
| 96 | + </view> | ||
| 97 | + <view class="top_card_counte ">{{item.sum+"元券"}}</view> | ||
| 98 | + <view class="top_card_remak ">{{"满"+item.buySum+"元可以用"}}</view> | ||
| 99 | + </view> | ||
| 100 | + </view> | ||
| 101 | + </block> | ||
| 102 | + <block wx:if="{{packShow}}"> | ||
| 103 | + <view class="vips"> | ||
| 104 | + <image class="lvip abs" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image> | ||
| 105 | + <image class="rvip abs" src="{{iurl+'/miniapp/images/giftbag/vip05.png'}}" lazy-load="true"></image> | ||
| 106 | + </view> | ||
| 107 | + </block> | ||
| 108 | + </view> | ||
| 109 | + </view> | ||
| 110 | + </block> | ||
| 111 | + <block wx:if="{{packShow}}"> | ||
| 112 | + <view> | ||
| 113 | + <view class="top "> | ||
| 114 | + <view class="top_box "> | ||
| 115 | + <view class="top_box_text "> | ||
| 116 | + <text>———</text> | ||
| 117 | + </view> | ||
| 118 | + <view class="top_box_text "> | ||
| 119 | + <text>新人专享福利</text> | ||
| 120 | + </view> | ||
| 121 | + <view class="top_box_text "> | ||
| 122 | + <text>———</text> | ||
| 123 | + </view> | ||
| 124 | + </view> | ||
| 125 | + <block wx:if="{{integralShow}}"> | ||
| 126 | + <view> | ||
| 127 | + <view class="top_box_image "> | ||
| 128 | + <image src="{{iurl+'/miniapp/images/giftbag/vip06.jpg'}}" lazy-load="true"></image> | ||
| 129 | + <button>{{integralTitle}}</button> | ||
| 130 | + </view> | ||
| 131 | + </view> | ||
| 132 | + </block> | ||
| 133 | + <block wx:if="{{growUpShow}}"> | ||
| 134 | + <view> | ||
| 135 | + <view class="top_box_image fs36"> | ||
| 136 | + <image src="{{iurl+'/miniapp/images/giftbag/vip07.jpg'}}" lazy-load="true"></image> | ||
| 137 | + <button>{{growUpTitle}}</button> | ||
| 138 | + </view> | ||
| 139 | + </view> | ||
| 140 | + </block> | ||
| 141 | + </view> | ||
| 142 | + </view> | ||
| 143 | + </block> | ||
| 144 | + <block wx:if="{{textShow}}"> | ||
| 145 | + <view class="foot_box"> | ||
| 146 | + <view class="foot_box_title fs36"> | ||
| 147 | + <text>活动规则:</text> | ||
| 148 | + </view> | ||
| 149 | + <view class="foot_box_text"> | ||
| 150 | + <rich-text nodes="{{textTitle}}"></rich-text> | ||
| 151 | + </view> | ||
| 152 | + </view> | ||
| 153 | + </block> | ||
| 154 | + <view class="button_box"> | ||
| 155 | + <view> | ||
| 156 | + <button class="button" bindtap="goto" data-url="/pages/index/index/index">进入商城购物</button> | ||
| 157 | + </view> | ||
| 158 | + <view class="button_text "> | ||
| 159 | + <text>本活动最终解释权归公司所有,如果有问题请联系客服</text> | ||
| 160 | + </view> | ||
| 161 | + </view> | ||
| 162 | + <view class="foot_empty "></view> | ||
| 163 | + <view class="foot_button"> | ||
| 164 | + <view class="{{receiveState=='已领取'?'foot_button_notbuy':'foot_button_buy'}}" bindtap="GetReceive"> | ||
| 165 | + <text>{{receiveState}}</text> | ||
| 166 | + </view> | ||
| 167 | + </view> | ||
| 168 | +</view> | ||
| 169 | +<!-- 引入提示组件 --> | ||
| 170 | +<warn id="warn"></warn> | ||
| 171 | +<my_confirm id="my_confirm"></my_confirm> | ||
| 0 | \ No newline at end of file | 172 | \ No newline at end of file |
pages/giftpack/newvipgift/newvipgift.wxss
0 → 100644
| 1 | +@charset "UTF-8"; | ||
| 2 | + | ||
| 3 | +/* Author XGQ | ||
| 4 | + * 2019-10-27 | ||
| 5 | + */ | ||
| 6 | + | ||
| 7 | +.image_box { | ||
| 8 | + -webkit-box-pack: center; | ||
| 9 | + -webkit-justify-content: center; | ||
| 10 | + justify-content: center; | ||
| 11 | +} | ||
| 12 | + | ||
| 13 | +.image_box image { | ||
| 14 | + width: 100%; | ||
| 15 | + height: 690rpx; | ||
| 16 | +} | ||
| 17 | + | ||
| 18 | +.top { | ||
| 19 | + margin: -20rpx 28rpx 45rpx 28rpx; | ||
| 20 | + padding: 10rpx 10rpx 70rpx 10rpx; | ||
| 21 | + background-color: #fff; | ||
| 22 | + border-radius: 0rpx 0rpx 15rpx 15rpx; | ||
| 23 | +} | ||
| 24 | + | ||
| 25 | +.top_box { | ||
| 26 | + display: -webkit-box; | ||
| 27 | + display: -webkit-flex; | ||
| 28 | + display: flex; | ||
| 29 | + text-align: center; | ||
| 30 | + -webkit-box-pack: center; | ||
| 31 | + -webkit-justify-content: center; | ||
| 32 | + justify-content: center; | ||
| 33 | +} | ||
| 34 | + | ||
| 35 | +.top_box_text { | ||
| 36 | + -webkit-box-pack: center; | ||
| 37 | + -webkit-justify-content: center; | ||
| 38 | + justify-content: center; | ||
| 39 | + margin: 50rpx 15rpx 20rpx 15rpx; | ||
| 40 | +} | ||
| 41 | + | ||
| 42 | +.top_box_text text { | ||
| 43 | + color: #fb6451; | ||
| 44 | + font-size: 40rpx; | ||
| 45 | +} | ||
| 46 | + | ||
| 47 | +.top_item { | ||
| 48 | + display: -webkit-box; | ||
| 49 | + display: -webkit-flex; | ||
| 50 | + display: flex; | ||
| 51 | + width: 100%; | ||
| 52 | + margin: 60rpx 0 0 0; | ||
| 53 | +} | ||
| 54 | + | ||
| 55 | +.top_item_img { | ||
| 56 | + float: left; | ||
| 57 | + width: 28%; | ||
| 58 | + margin: 0rpx 10rpx 0rpx 20rpx; | ||
| 59 | +} | ||
| 60 | + | ||
| 61 | +.top_item_img image { | ||
| 62 | + width: 150rpx; | ||
| 63 | + height: 150rpx; | ||
| 64 | + border-radius: 50%; | ||
| 65 | + border: #f96865 solid 3rpx; | ||
| 66 | +} | ||
| 67 | + | ||
| 68 | +.top_item_center { | ||
| 69 | + float: left; | ||
| 70 | + width: 50%; | ||
| 71 | +} | ||
| 72 | + | ||
| 73 | +.top_item_center_title { | ||
| 74 | + font-size: 35rpx; | ||
| 75 | + color: #fb6451; | ||
| 76 | + -webkit-box-pack: start; | ||
| 77 | + -webkit-justify-content: flex-start; | ||
| 78 | + justify-content: flex-start; | ||
| 79 | + padding: 0 10rpx 15rpx 0rpx; | ||
| 80 | + word-break: break-all; | ||
| 81 | + /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/ | ||
| 82 | + text-overflow: ellipsis; | ||
| 83 | + display: -webkit-box; | ||
| 84 | + /** 对象作为伸缩盒子模型显示 **/ | ||
| 85 | + -webkit-box-orient: vertical; | ||
| 86 | + /** 设置或检索伸缩盒对象的子元素的排列方式 **/ | ||
| 87 | + -webkit-line-clamp: 2; | ||
| 88 | + /** 显示的行数 **/ | ||
| 89 | + overflow: hidden; | ||
| 90 | + /** 隐藏超出的内容 **/ | ||
| 91 | +} | ||
| 92 | + | ||
| 93 | +.top_item_center_ramke { | ||
| 94 | + font-size: 25rpx; | ||
| 95 | + -webkit-box-pack: start; | ||
| 96 | + -webkit-justify-content: flex-start; | ||
| 97 | + justify-content: flex-start; | ||
| 98 | + line-height: 35rpx; | ||
| 99 | + letter-spacing: 0.5rpx; | ||
| 100 | + word-break: break-all; | ||
| 101 | + /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/ | ||
| 102 | + text-overflow: ellipsis; | ||
| 103 | + display: -webkit-box; | ||
| 104 | + /** 对象作为伸缩盒子模型显示 **/ | ||
| 105 | + -webkit-box-orient: vertical; | ||
| 106 | + /** 设置或检索伸缩盒对象的子元素的排列方式 **/ | ||
| 107 | + -webkit-line-clamp: 2; | ||
| 108 | + /** 显示的行数 **/ | ||
| 109 | + overflow: hidden; | ||
| 110 | + /** 隐藏超出的内容 **/ | ||
| 111 | +} | ||
| 112 | + | ||
| 113 | +.top_item_button { | ||
| 114 | + float: right; | ||
| 115 | + width: 22%; | ||
| 116 | + padding: 65rpx 20rpx 0 1rpx; | ||
| 117 | +} | ||
| 118 | + | ||
| 119 | +.top_item_button button { | ||
| 120 | + font-size: 25rpx; | ||
| 121 | + background: #fd6969; | ||
| 122 | + color: #fff; | ||
| 123 | + border-radius: 50rpx; | ||
| 124 | + height: 45rpx; | ||
| 125 | + line-height: 45rpx; | ||
| 126 | +} | ||
| 127 | + | ||
| 128 | +.top_card { | ||
| 129 | + width: calc(50% - 30rpx); | ||
| 130 | + display: inline-block; | ||
| 131 | + margin: 15rpx; | ||
| 132 | +} | ||
| 133 | + | ||
| 134 | +.top_card_box { | ||
| 135 | + background-size: cover; | ||
| 136 | + background-position: center; | ||
| 137 | + background-repeat: no-repeat; | ||
| 138 | + border-radius: 20rpx; | ||
| 139 | + height: 250rpx; | ||
| 140 | + margin: 5rpx; | ||
| 141 | +} | ||
| 142 | + | ||
| 143 | +.img1 { | ||
| 144 | + background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip01.png); | ||
| 145 | +} | ||
| 146 | + | ||
| 147 | +.img2 { | ||
| 148 | + background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip02.png); | ||
| 149 | +} | ||
| 150 | + | ||
| 151 | +.img3 { | ||
| 152 | + background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip03.png); | ||
| 153 | +} | ||
| 154 | + | ||
| 155 | +.top_card_tite_box { | ||
| 156 | + width: 100%; | ||
| 157 | + display: -webkit-box; | ||
| 158 | + display: -webkit-flex; | ||
| 159 | + display: flex; | ||
| 160 | + -webkit-box-pack: end; | ||
| 161 | + -webkit-justify-content: flex-end; | ||
| 162 | + justify-content: flex-end; | ||
| 163 | +} | ||
| 164 | + | ||
| 165 | +.top_card_tite_a { | ||
| 166 | + padding: 5rpx 25rpx 5rpx 25rpx; | ||
| 167 | + line-height: 29rpx; | ||
| 168 | + font-size: 25rpx; | ||
| 169 | + color: #fff; | ||
| 170 | + background: #ffa7c0; | ||
| 171 | + border-radius: 0rpx 20rpx 0rpx 6rpx; | ||
| 172 | +} | ||
| 173 | + | ||
| 174 | +.top_card_tite_b { | ||
| 175 | + padding: 5rpx 25rpx 5rpx 25rpx; | ||
| 176 | + line-height: 29rpx; | ||
| 177 | + font-size: 25rpx; | ||
| 178 | + color: #fff; | ||
| 179 | + background: #50dfdb; | ||
| 180 | + border-radius: 0rpx 20rpx 0rpx 6rpx; | ||
| 181 | +} | ||
| 182 | + | ||
| 183 | +.top_card_tite_c { | ||
| 184 | + padding: 5rpx 25rpx 5rpx 25rpx; | ||
| 185 | + line-height: 29rpx; | ||
| 186 | + font-size: 25rpx; | ||
| 187 | + color: #fff; | ||
| 188 | + background: #92cbff; | ||
| 189 | + border-radius: 0rpx 20rpx 0rpx 6rpx; | ||
| 190 | +} | ||
| 191 | + | ||
| 192 | +.top_card_tite_d { | ||
| 193 | + padding: 5rpx 25rpx 5rpx 25rpx; | ||
| 194 | + line-height: 29rpx; | ||
| 195 | + font-size: 25rpx; | ||
| 196 | + color: #fff; | ||
| 197 | + border-radius: 0rpx 20rpx 0rpx 6rpx; | ||
| 198 | +} | ||
| 199 | + | ||
| 200 | +.top_card_counte { | ||
| 201 | + padding: 40rpx 20rpx 0 0; | ||
| 202 | + text-align: center; | ||
| 203 | + display: -webkit-box; | ||
| 204 | + display: -webkit-flex; | ||
| 205 | + display: flex; | ||
| 206 | + -webkit-box-pack: center; | ||
| 207 | + -webkit-justify-content: center; | ||
| 208 | + justify-content: center; | ||
| 209 | + -webkit-box-align: center; | ||
| 210 | + -webkit-align-items: center; | ||
| 211 | + align-items: center; | ||
| 212 | + color: #fff; | ||
| 213 | + font-size: 40rpx; | ||
| 214 | +} | ||
| 215 | + | ||
| 216 | +.top_card_remak { | ||
| 217 | + padding: 20rpx 0 40rpx 0; | ||
| 218 | + text-align: center; | ||
| 219 | + display: -webkit-box; | ||
| 220 | + display: -webkit-flex; | ||
| 221 | + display: flex; | ||
| 222 | + -webkit-box-pack: center; | ||
| 223 | + -webkit-justify-content: center; | ||
| 224 | + justify-content: center; | ||
| 225 | + -webkit-box-align: center; | ||
| 226 | + -webkit-align-items: center; | ||
| 227 | + align-items: center; | ||
| 228 | + font-size: 20rpx; | ||
| 229 | + color: #fff; | ||
| 230 | +} | ||
| 231 | + | ||
| 232 | +.top_card_button_a button { | ||
| 233 | + margin: 0 85rpx; | ||
| 234 | + background: #ffa6bc; | ||
| 235 | + border-radius: 50rpx; | ||
| 236 | + line-height: 40rpx; | ||
| 237 | + height: 40rpx; | ||
| 238 | + color: white; | ||
| 239 | + font-size: 25rpx; | ||
| 240 | +} | ||
| 241 | + | ||
| 242 | +.top_card_button_b button { | ||
| 243 | + margin: 0 85rpx; | ||
| 244 | + background: #50dfdb; | ||
| 245 | + border-radius: 50rpx; | ||
| 246 | + line-height: 40rpx; | ||
| 247 | + height: 40rpx; | ||
| 248 | + color: white; | ||
| 249 | + font-size: 25rpx; | ||
| 250 | +} | ||
| 251 | + | ||
| 252 | +.top_card_button_c button { | ||
| 253 | + margin: 0 85rpx; | ||
| 254 | + background: #75bcfc; | ||
| 255 | + border-radius: 50rpx; | ||
| 256 | + line-height: 40rpx; | ||
| 257 | + height: 40rpx; | ||
| 258 | + color: white; | ||
| 259 | + font-size: 25rpx; | ||
| 260 | +} | ||
| 261 | + | ||
| 262 | +.top_card_button_d button { | ||
| 263 | + margin: 0 85rpx; | ||
| 264 | + border-radius: 50rpx; | ||
| 265 | + line-height: 40rpx; | ||
| 266 | + height: 40rpx; | ||
| 267 | + color: white; | ||
| 268 | + font-size: 25rpx; | ||
| 269 | +} | ||
| 270 | + | ||
| 271 | +.top_box_image { | ||
| 272 | + padding: 20rpx 20rpx 20rpx 20rpx; | ||
| 273 | +} | ||
| 274 | + | ||
| 275 | +.top_box_image image { | ||
| 276 | + height: 216rpx; | ||
| 277 | + width: 100%; | ||
| 278 | +} | ||
| 279 | + | ||
| 280 | +.top_box_image button { | ||
| 281 | + margin: 15rpx 95rpx 0rpx 95rpx; | ||
| 282 | + background: #fe6a6a; | ||
| 283 | + border-radius: 50rpx; | ||
| 284 | + line-height: 60rpx; | ||
| 285 | + height: 60rpx; | ||
| 286 | + color: white; | ||
| 287 | + font-size: 30rpx; | ||
| 288 | +} | ||
| 289 | + | ||
| 290 | +.foot_box { | ||
| 291 | + margin: 0 30rpx 40rpx 30rpx; | ||
| 292 | + background: #fff; | ||
| 293 | + border-radius: 20rpx; | ||
| 294 | +} | ||
| 295 | + | ||
| 296 | +.foot_box_title { | ||
| 297 | + color: #000; | ||
| 298 | + padding: 20rpx 30rpx 20rpx 30rpx; | ||
| 299 | +} | ||
| 300 | + | ||
| 301 | +.foot_box_text { | ||
| 302 | + font-size: 30rpx; | ||
| 303 | + color: #000; | ||
| 304 | + line-height: 48rpx; | ||
| 305 | + padding: 20rpx 35rpx 50rpx 30rpx; | ||
| 306 | +} | ||
| 307 | + | ||
| 308 | +.button_box { | ||
| 309 | + margin: 50rpx 50rpx 50rpx 50rpx; | ||
| 310 | + text-align: center; | ||
| 311 | +} | ||
| 312 | + | ||
| 313 | +.button { | ||
| 314 | + margin: 0 30rpx; | ||
| 315 | + background: #ff9a8c; | ||
| 316 | + border-radius: 50rpx; | ||
| 317 | + line-height: 80rpx; | ||
| 318 | + height: 80rpx; | ||
| 319 | + color: white; | ||
| 320 | + font-size: 35rpx; | ||
| 321 | +} | ||
| 322 | + | ||
| 323 | +.button_text { | ||
| 324 | + padding-top: 20rpx; | ||
| 325 | + font-size: 20rpx; | ||
| 326 | + color: white; | ||
| 327 | + height: 100rpx; | ||
| 328 | +} | ||
| 329 | + | ||
| 330 | +.foot_empty { | ||
| 331 | + height: 90rpx; | ||
| 332 | +} | ||
| 333 | + | ||
| 334 | +.foot_button { | ||
| 335 | + display: -webkit-box; | ||
| 336 | + display: -webkit-flex; | ||
| 337 | + display: flex; | ||
| 338 | + margin: 20rpx 0rpx 0rpx 0rpx; | ||
| 339 | + padding: 25rpx 0rpx; | ||
| 340 | + background: #fff; | ||
| 341 | + text-align: center; | ||
| 342 | + -webkit-box-pack: center; | ||
| 343 | + -webkit-justify-content: center; | ||
| 344 | + justify-content: center; | ||
| 345 | + position: fixed; | ||
| 346 | + bottom: 0; | ||
| 347 | + left: 0; | ||
| 348 | + width: 100%; | ||
| 349 | +} | ||
| 350 | + | ||
| 351 | +.foot_button_buy { | ||
| 352 | + background: #e4010c; | ||
| 353 | + color: #fff; | ||
| 354 | + width: 400rpx; | ||
| 355 | + height: 70rpx; | ||
| 356 | + font-size: 28rpx; | ||
| 357 | + line-height: 70rpx; | ||
| 358 | + border-radius: 40rpx; | ||
| 359 | +} | ||
| 360 | + | ||
| 361 | +.foot_button_notbuy { | ||
| 362 | + background: #999; | ||
| 363 | + color: #fff; | ||
| 364 | + width: 400rpx; | ||
| 365 | + height: 70rpx; | ||
| 366 | + font-size: 28rpx; | ||
| 367 | + line-height: 70rpx; | ||
| 368 | + border-radius: 40rpx; | ||
| 369 | +} | ||
| 370 | + | ||
| 371 | +page { | ||
| 372 | + background-color: #fb6451; | ||
| 373 | +} | ||
| 374 | + | ||
| 375 | +button::after { | ||
| 376 | + border: none; | ||
| 377 | +} | ||
| 378 | + | ||
| 379 | +.foot_box_text ._img { | ||
| 380 | + width: 100%; | ||
| 381 | +} | ||
| 382 | + | ||
| 383 | +.foot_box_text .img { | ||
| 384 | + line-height: 0; | ||
| 385 | +} | ||
| 386 | + | ||
| 387 | +.image { | ||
| 388 | + width: 400rpx; | ||
| 389 | + height: 200rpx; | ||
| 390 | +} | ||
| 391 | + | ||
| 392 | +.num { | ||
| 393 | + color: #fb6451; | ||
| 394 | +} | ||
| 395 | + | ||
| 396 | +.lvip { | ||
| 397 | + left: 30rpx; | ||
| 398 | + bottom: -58rpx; | ||
| 399 | + width: 20rpx; | ||
| 400 | + height: 90rpx; | ||
| 401 | + z-index: 5; | ||
| 402 | +} | ||
| 403 | + | ||
| 404 | +.rvip { | ||
| 405 | + right: 30rpx; | ||
| 406 | + bottom: -58rpx; | ||
| 407 | + width: 20rpx; | ||
| 408 | + height: 90rpx; | ||
| 409 | + z-index: 5; | ||
| 410 | +} |
pages/giftpack/payment/payment.js
0 → 100644
| 1 | +var e = getApp(); | ||
| 2 | +var regeneratorRuntime = require('../../../utils/runtime.js'); | ||
| 3 | +Page({ | ||
| 4 | + /** | ||
| 5 | + * 页面的初始数据 | ||
| 6 | + */ | ||
| 7 | + data: { | ||
| 8 | + url: e.globalData.setting.imghost, | ||
| 9 | + resourceUrl: e.globalData.setting.resourceUrl, | ||
| 10 | + iurl: e.globalData.setting.imghost, | ||
| 11 | + allmoney: 0, | ||
| 12 | + order_sn: "", | ||
| 13 | + }, | ||
| 14 | + | ||
| 15 | + /** | ||
| 16 | + * 生命周期函数--监听页面加载 | ||
| 17 | + */ | ||
| 18 | + onLoad: function (options) { | ||
| 19 | + wx.setNavigationBarTitle({ | ||
| 20 | + title: '支付成功', | ||
| 21 | + }); | ||
| 22 | + var money = parseFloat(options.money), order_sn = options.order_sn; | ||
| 23 | + this.setData({allmoney:money,order_sn:order_sn}) | ||
| 24 | + }, | ||
| 25 | + | ||
| 26 | + goto: function () { | ||
| 27 | + var url = '/pages/index/index/index'; | ||
| 28 | + getApp().goto(url) | ||
| 29 | + }, | ||
| 30 | +}) | ||
| 0 | \ No newline at end of file | 31 | \ No newline at end of file |
pages/giftpack/payment/payment.json
0 → 100644
pages/giftpack/payment/payment.wxml
0 → 100644
| 1 | +<wxs module="filters" src="../../../utils/filter.wxs"></wxs> | ||
| 2 | +<view> | ||
| 3 | + <!-- 支付成功提示 --> | ||
| 4 | + <view class="payradio"> | ||
| 5 | + <!-- 提示框 --> | ||
| 6 | + <view class="Success_box flex-center"> | ||
| 7 | + <view> | ||
| 8 | + <view class="flex-center"> | ||
| 9 | + <image src="{{url}}miniapp/images/pay/paysuccess.png"></image> | ||
| 10 | + </view> | ||
| 11 | + <view class="Success_box_title fs32">订单支付成功!</view> | ||
| 12 | + </view> | ||
| 13 | + </view> | ||
| 14 | + | ||
| 15 | + <!-- 支付信息 --> | ||
| 16 | + <view class="payitem_max fs28"> | ||
| 17 | + <!-- 订单编号 --> | ||
| 18 | + <view class="payitem flex"> | ||
| 19 | + <view>订单编号 :</view> | ||
| 20 | + <text selectable="true">{{order_sn}}</text> | ||
| 21 | + </view> | ||
| 22 | + | ||
| 23 | + <!-- 实付金额 --> | ||
| 24 | + <view class="payitem flex"> | ||
| 25 | + <view>实付金额 :</view> | ||
| 26 | + <!-- {{filters.toFix()}} --> | ||
| 27 | + <view class="pay_money">{{filters.toFix(allmoney,2)}}元</view> | ||
| 28 | + </view> | ||
| 29 | + | ||
| 30 | + <!-- 支付方式 --> | ||
| 31 | + <view class="payitem flex" wx:if="type==1"> | ||
| 32 | + <view>支付方式 :</view> | ||
| 33 | + <view>微信支付</view> | ||
| 34 | + </view> | ||
| 35 | + </view> | ||
| 36 | + </view> | ||
| 37 | + <view class="flex-level"> | ||
| 38 | + <view class="line"></view> | ||
| 39 | + </view> | ||
| 40 | + | ||
| 41 | + <!-- 跳转链接 --> | ||
| 42 | + <view> | ||
| 43 | + <!-- 链接 --> | ||
| 44 | + <view class="fs32"> | ||
| 45 | + <view class="flex-center"> | ||
| 46 | + <navigator class="pay_order flex-center" url="/pages/giftpack/mygiftpack/mygiftpack"> | ||
| 47 | + <view>我的礼包</view> | ||
| 48 | + </navigator> | ||
| 49 | + </view> | ||
| 50 | + <view class="flex-center"> | ||
| 51 | + <navigator class="pay_home flex-center" bindtap="goto"> | ||
| 52 | + <view>回到首页</view> | ||
| 53 | + </navigator> | ||
| 54 | + </view> | ||
| 55 | + </view> | ||
| 56 | + </view> | ||
| 57 | +</view> | ||
| 0 | \ No newline at end of file | 58 | \ No newline at end of file |
pages/giftpack/payment/payment.wxss
0 → 100644
| 1 | +page { | ||
| 2 | + border-top: 2rpx solid rgb(245, 245, 245); | ||
| 3 | +} | ||
| 4 | +.line { | ||
| 5 | + border-top: 2rpx solid rgb(245, 245, 245); | ||
| 6 | + width: 700rpx; | ||
| 7 | +} | ||
| 8 | + | ||
| 9 | +.payradio .Success_box { | ||
| 10 | + padding-top: 45rpx; | ||
| 11 | + padding-bottom: 45rpx; | ||
| 12 | +} | ||
| 13 | + | ||
| 14 | +.payradio .Success_box .Success_box_title { | ||
| 15 | + margin-top: 45rpx; | ||
| 16 | + color: rgb(8, 8, 8); | ||
| 17 | +} | ||
| 18 | + | ||
| 19 | +.payradio image { | ||
| 20 | + width: 140rpx; | ||
| 21 | + height: 140rpx; | ||
| 22 | + display: flex; | ||
| 23 | +} | ||
| 24 | + | ||
| 25 | +.payitem_max { | ||
| 26 | + padding: 0rpx 55rpx; | ||
| 27 | + color: rgb(104, 104, 104); | ||
| 28 | + padding-bottom: 30rpx; | ||
| 29 | +} | ||
| 30 | + | ||
| 31 | +.payitem_max .payitem { | ||
| 32 | + margin-top: 30rpx; | ||
| 33 | +} | ||
| 34 | + | ||
| 35 | +.payitem_max .payitem .pay_nam { | ||
| 36 | + width: 200rpx; | ||
| 37 | +} | ||
| 38 | + | ||
| 39 | +.payitem_max .payitem view { | ||
| 40 | + margin-right: 50rpx; | ||
| 41 | +} | ||
| 42 | +.pay_money{ | ||
| 43 | + color: rgb(219, 27, 52); | ||
| 44 | +} | ||
| 45 | + | ||
| 46 | +.pay_User { | ||
| 47 | + padding-left: 55rpx; | ||
| 48 | + color: rgb(104, 104, 104); | ||
| 49 | +} | ||
| 50 | + | ||
| 51 | +.pay_User .payitem { | ||
| 52 | + margin-top: 30rpx; | ||
| 53 | +} | ||
| 54 | + | ||
| 55 | +.pay_User .payitem .pay_Receiving { | ||
| 56 | + width: 128rpx; | ||
| 57 | + margin-right: 50rpx; | ||
| 58 | +} | ||
| 59 | + | ||
| 60 | +.pay_User .payitem .pay_name { | ||
| 61 | + margin-right: 38rpx; | ||
| 62 | + max-width: 250rpx; | ||
| 63 | +} | ||
| 64 | + | ||
| 65 | +.pay_order { | ||
| 66 | + margin-top: 115rpx; | ||
| 67 | + color: rgb(104, 104, 104); | ||
| 68 | + width: 560rpx; | ||
| 69 | + height: 62rpx; | ||
| 70 | + border-radius: 30rpx; | ||
| 71 | + border: 3rpx solid rgb(209, 209, 209); | ||
| 72 | +} | ||
| 73 | + | ||
| 74 | +.pay_home { | ||
| 75 | + margin-top: 35rpx; | ||
| 76 | + color: rgb(255, 255, 255); | ||
| 77 | + width: 566rpx; | ||
| 78 | + height: 68rpx; | ||
| 79 | + border-radius: 30rpx; | ||
| 80 | + background-color: rgb(219, 27, 52); | ||
| 81 | +} | ||
| 82 | +.address{ | ||
| 83 | + width: 470rpx; | ||
| 84 | +} | ||
| 0 | \ No newline at end of file | 85 | \ No newline at end of file |
pages/goods/goodsInfo/goodsInfo.js
| @@ -1335,6 +1335,12 @@ Page({ | @@ -1335,6 +1335,12 @@ Page({ | ||
| 1335 | }).then(res => { | 1335 | }).then(res => { |
| 1336 | var e = res; | 1336 | var e = res; |
| 1337 | if (e.data.code == 0) { | 1337 | if (e.data.code == 0) { |
| 1338 | + | ||
| 1339 | + //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 | ||
| 1340 | + if(dd.lat && !th.data.def_pick_store){ | ||
| 1341 | + th.setData({def_pick_store:e.data.data.pageData[0]}); | ||
| 1342 | + } | ||
| 1343 | + | ||
| 1338 | //-- 如果有默认选择门店的时候,要把默认门店放在第一位 -- | 1344 | //-- 如果有默认选择门店的时候,要把默认门店放在第一位 -- |
| 1339 | if (th.data.def_pick_store) { | 1345 | if (th.data.def_pick_store) { |
| 1340 | for (var k = 0; k < e.data.data.pageData.length; k++) { | 1346 | for (var k = 0; k < e.data.data.pageData.length; k++) { |
| @@ -1348,7 +1354,7 @@ Page({ | @@ -1348,7 +1354,7 @@ Page({ | ||
| 1348 | 1354 | ||
| 1349 | //单总量超出5个的时候 | 1355 | //单总量超出5个的时候 |
| 1350 | if (e.data.data.total > 5) { | 1356 | if (e.data.data.total > 5) { |
| 1351 | - i.get("/api/weshop/storagecategory/page", { | 1357 | + i.get("/api/weshop/storagecategory/page", { |
| 1352 | data: { | 1358 | data: { |
| 1353 | store_id: o.stoid, | 1359 | store_id: o.stoid, |
| 1354 | is_show: 1, | 1360 | is_show: 1, |
| @@ -1356,7 +1362,7 @@ Page({ | @@ -1356,7 +1362,7 @@ Page({ | ||
| 1356 | }, | 1362 | }, |
| 1357 | success: function(ee) { | 1363 | success: function(ee) { |
| 1358 | if (ee.data.code == 0) { | 1364 | if (ee.data.code == 0) { |
| 1359 | - if (ee.data.data.pageData.length > 0) { | 1365 | + if (ee.data.data && ee.data.data.pageData && ee.data.data.pageData.length > 0) { |
| 1360 | var def_arr = new Array(); | 1366 | var def_arr = new Array(); |
| 1361 | var ishas = 0; | 1367 | var ishas = 0; |
| 1362 | //-- 开始就看5个门店 -- | 1368 | //-- 开始就看5个门店 -- |
| @@ -1443,16 +1449,25 @@ Page({ | @@ -1443,16 +1449,25 @@ Page({ | ||
| 1443 | }); | 1449 | }); |
| 1444 | 1450 | ||
| 1445 | } else { | 1451 | } else { |
| 1446 | - th.setData({ | ||
| 1447 | - is_show_sto_cat: -1, | ||
| 1448 | - only_pk: e.data.data.pageData | ||
| 1449 | - }); | 1452 | + th.setData({ |
| 1453 | + is_show_sto_cat: -1, | ||
| 1454 | + only_pk: e.data.data.pageData | ||
| 1455 | + }); | ||
| 1456 | + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ | ||
| 1457 | + if (!th.data.def_pick_store) { | ||
| 1458 | + th.setData({def_pick_store:e.data.data.pageData[0]}) | ||
| 1459 | + } | ||
| 1450 | } | 1460 | } |
| 1451 | } else { | 1461 | } else { |
| 1452 | th.setData({ | 1462 | th.setData({ |
| 1453 | is_show_sto_cat: -1, | 1463 | is_show_sto_cat: -1, |
| 1454 | only_pk: e.data.data.pageData | 1464 | only_pk: e.data.data.pageData |
| 1455 | }); | 1465 | }); |
| 1466 | + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ | ||
| 1467 | + if (!th.data.def_pick_store) { | ||
| 1468 | + th.setData({def_pick_store:e.data.data.pageData[0]}) | ||
| 1469 | + } | ||
| 1470 | + | ||
| 1456 | } | 1471 | } |
| 1457 | } | 1472 | } |
| 1458 | }); | 1473 | }); |
| @@ -1461,6 +1476,10 @@ Page({ | @@ -1461,6 +1476,10 @@ Page({ | ||
| 1461 | is_show_sto_cat: 0, | 1476 | is_show_sto_cat: 0, |
| 1462 | only_pk: e.data.data.pageData | 1477 | only_pk: e.data.data.pageData |
| 1463 | }); | 1478 | }); |
| 1479 | + //-----如果没有默认门店,要取第一个门店作为默认店------ | ||
| 1480 | + if (!th.data.def_pick_store) { | ||
| 1481 | + th.setData({def_pick_store:e.data.data.pageData[0]}) | ||
| 1482 | + } | ||
| 1464 | } | 1483 | } |
| 1465 | } | 1484 | } |
| 1466 | }) | 1485 | }) |
pages/index/index/index.js
| 1 | -var e = function (e) { | 1 | +var e = function(e) { |
| 2 | return e && e.__esModule ? e : { | 2 | return e && e.__esModule ? e : { |
| 3 | - default: e | 3 | + default: e |
| 4 | }; | 4 | }; |
| 5 | - }(require("../../../utils/LoadMore.js")), t = getApp(), a = t.request, o = t.globalData.setting, os = o, | ||
| 6 | - i = require("../../../utils/util.js"), ut = i, s = require("../../../utils/common.js"), n = new e.default(); | 5 | + }(require("../../../utils/LoadMore.js")), |
| 6 | + t = getApp(), | ||
| 7 | + a = t.request, | ||
| 8 | + o = t.globalData.setting, | ||
| 9 | + os = o, | ||
| 10 | + i = require("../../../utils/util.js"), | ||
| 11 | + ut = i, | ||
| 12 | + s = require("../../../utils/common.js"), | ||
| 13 | + n = new e.default(); | ||
| 7 | var regeneratorRuntime = require('../../../utils/runtime.js'); | 14 | var regeneratorRuntime = require('../../../utils/runtime.js'); |
| 8 | var api = require('../../../api/api.js'); | 15 | var api = require('../../../api/api.js'); |
| 9 | var d = getApp().globalData; | 16 | var d = getApp().globalData; |
| 10 | - | 17 | + |
| 11 | Page({ | 18 | Page({ |
| 12 | data: { | 19 | data: { |
| 13 | url: o.imghost, | 20 | url: o.imghost, |
| 14 | - swiperimage: ["/miniapp/images/title.png"],//,"/miniapp/images/newpeople/newpeople.png" | 21 | + swiperimage: [{ |
| 22 | + image: "/miniapp/images/title.png", | ||
| 23 | + nav_url: 0 | ||
| 24 | + }], | ||
| 15 | resourceUrl: o.resourceUrl, | 25 | resourceUrl: o.resourceUrl, |
| 16 | logo: o.appLogo, | 26 | logo: o.appLogo, |
| 17 | homeData: null, | 27 | homeData: null, |
| @@ -32,69 +42,74 @@ Page({ | @@ -32,69 +42,74 @@ Page({ | ||
| 32 | banner: null, | 42 | banner: null, |
| 33 | 43 | ||
| 34 | appdata: null, | 44 | appdata: null, |
| 35 | - saleGoods: null,//秒杀数据 | ||
| 36 | - pindGoods: null,//拼单数据 | ||
| 37 | - newGoods:null,//新商品 | ||
| 38 | - hotGoods:null,//hot商品 | 45 | + saleGoods: null, //秒杀数据 |
| 46 | + pindGoods: null, //拼单数据 | ||
| 47 | + newGoods: null, //新商品 | ||
| 48 | + hotGoods: null, //hot商品 | ||
| 39 | //----控制是是否显示计时器--- | 49 | //----控制是是否显示计时器--- |
| 40 | - is_timer:1, | ||
| 41 | - ishow:0, | 50 | + is_timer: 1, |
| 51 | + ishow: 0, | ||
| 42 | //是不是显示自定义模板 | 52 | //是不是显示自定义模板 |
| 43 | - isTemplate:0, | ||
| 44 | - template_arr:null, | ||
| 45 | - bgcolor_t:'', | ||
| 46 | - | ||
| 47 | - banner_index:0, | ||
| 48 | - flash_index:0, | ||
| 49 | - pt_index:0, | ||
| 50 | - | ||
| 51 | - pt_timer_item:null, | ||
| 52 | - pt_timer_arr:null, | ||
| 53 | - pt_timer:null, | ||
| 54 | - pt_timer_active:0, | 53 | + isTemplate: 0, |
| 54 | + template_arr: null, | ||
| 55 | + bgcolor_t: '', | ||
| 56 | + | ||
| 57 | + banner_index: 0, | ||
| 58 | + flash_index: 0, | ||
| 59 | + pt_index: 0, | ||
| 60 | + | ||
| 61 | + pt_timer_item: null, | ||
| 62 | + pt_timer_arr: null, | ||
| 63 | + pt_timer: null, | ||
| 64 | + pt_timer_active: 0, | ||
| 55 | //看下商家是否开通会员权益 | 65 | //看下商家是否开通会员权益 |
| 56 | - is_boot:0, | ||
| 57 | - gd_category:null, | ||
| 58 | - is_no_more:0, | ||
| 59 | - max_sw_height:0, //banner的最大高度 | ||
| 60 | - is_disgraceful:0,//是否显示新人广告 | 66 | + is_boot: 0, |
| 67 | + gd_category: null, | ||
| 68 | + is_no_more: 0, | ||
| 69 | + max_sw_height: 0, //banner的最大高度 | ||
| 70 | + is_disgraceful: 0, //是否显示新人广告 | ||
| 71 | + new_image: "", //新人有礼弹窗图片 | ||
| 72 | + new_nav: "", //新人页面跳转地址 | ||
| 61 | }, | 73 | }, |
| 62 | 74 | ||
| 63 | - onLoad: function () { | 75 | + onLoad: function() { |
| 64 | var th = this; | 76 | var th = this; |
| 65 | - // n.init(th, "", "recommend"); | ||
| 66 | 77 | ||
| 67 | //看一下商家是否开通了权益 | 78 | //看一下商家是否开通了权益 |
| 68 | //--初始化是否有打勾-- | 79 | //--初始化是否有打勾-- |
| 69 | getApp().request.promiseGet("/api/weshop/users/grade/vip/init/get", { | 80 | getApp().request.promiseGet("/api/weshop/users/grade/vip/init/get", { |
| 70 | - data: { storeId: os.stoid } | 81 | + data: { |
| 82 | + storeId: os.stoid | ||
| 83 | + } | ||
| 71 | }).then(res => { | 84 | }).then(res => { |
| 72 | if (res.data.data) { | 85 | if (res.data.data) { |
| 73 | var is_init = res.data.data.isBool; | 86 | var is_init = res.data.data.isBool; |
| 74 | - th.setData({ is_boot: is_init }); | 87 | + th.setData({ |
| 88 | + is_boot: is_init | ||
| 89 | + }); | ||
| 75 | } | 90 | } |
| 76 | }) | 91 | }) |
| 77 | th.is_new(); | 92 | th.is_new(); |
| 93 | + // th.is_festival(); | ||
| 78 | 94 | ||
| 79 | }, | 95 | }, |
| 80 | //关闭新用户领取广告 | 96 | //关闭新用户领取广告 |
| 81 | - close_disgraceful:function(){ | 97 | + close_disgraceful: function() { |
| 82 | var th = this; | 98 | var th = this; |
| 83 | - th.setData({ | ||
| 84 | - is_disgraceful:0 | ||
| 85 | - }) | 99 | + th.setData({ |
| 100 | + is_disgraceful: 0 | ||
| 101 | + }) | ||
| 86 | }, | 102 | }, |
| 87 | async onShow() { | 103 | async onShow() { |
| 88 | var th = this; | 104 | var th = this; |
| 89 | - if(getApp().globalData.user_id) getApp().requestCardNum(); | 105 | + if (getApp().globalData.user_id) getApp().requestCardNum(); |
| 90 | await this.init_load(); | 106 | await this.init_load(); |
| 91 | //显示的时候要开启计时器 | 107 | //显示的时候要开启计时器 |
| 92 | this.data.is_timer = 1; | 108 | this.data.is_timer = 1; |
| 93 | //如果是自定义模板 | 109 | //如果是自定义模板 |
| 94 | if (this.data.isTemplate) { | 110 | if (this.data.isTemplate) { |
| 95 | //---先获取会员--- | 111 | //---先获取会员--- |
| 96 | - t.getUserFir(function () { | ||
| 97 | - }); | 112 | + t.getUserFir(function() {}); |
| 98 | } else { | 113 | } else { |
| 99 | await this.init_fir(); | 114 | await this.init_fir(); |
| 100 | } | 115 | } |
| @@ -109,7 +124,9 @@ Page({ | @@ -109,7 +124,9 @@ Page({ | ||
| 109 | if (th.data.pt_timer_arr && th.data.pt_timer_arr.length > 0) { | 124 | if (th.data.pt_timer_arr && th.data.pt_timer_arr.length > 0) { |
| 110 | for (var i in th.data.pt_timer_arr) { | 125 | for (var i in th.data.pt_timer_arr) { |
| 111 | var p_item = th.data.pt_timer_arr[i]; | 126 | var p_item = th.data.pt_timer_arr[i]; |
| 112 | - await getApp().request.promiseGet("/api/weshop/users/get/" + os.stoid + "/" + p_item.user_id, {1: 1}).then(res => { | 127 | + await getApp().request.promiseGet("/api/weshop/users/get/" + os.stoid + "/" + p_item.user_id, { |
| 128 | + 1: 1 | ||
| 129 | + }).then(res => { | ||
| 113 | th.data.pt_timer_arr[i].head_pic = res.data.data.head_pic; | 130 | th.data.pt_timer_arr[i].head_pic = res.data.data.head_pic; |
| 114 | th.data.pt_timer_arr[i].nickname = res.data.data.nickname; | 131 | th.data.pt_timer_arr[i].nickname = res.data.data.nickname; |
| 115 | }) | 132 | }) |
| @@ -119,51 +136,61 @@ Page({ | @@ -119,51 +136,61 @@ Page({ | ||
| 119 | 136 | ||
| 120 | //---处理正在6个分类---- | 137 | //---处理正在6个分类---- |
| 121 | await getApp().request.promiseGet("/api/weshop/goodscategory/page", { | 138 | await getApp().request.promiseGet("/api/weshop/goodscategory/page", { |
| 122 | - data: {store_id: os.stoid, pageSize: 5,is_show:1} | 139 | + data: { |
| 140 | + store_id: os.stoid, | ||
| 141 | + pageSize: 5, | ||
| 142 | + is_show: 1 | ||
| 143 | + } | ||
| 123 | }).then(res => { | 144 | }).then(res => { |
| 124 | - if(res.data.data) { | ||
| 125 | - var gd_category = res.data.data.pageData; | ||
| 126 | - | ||
| 127 | - th.setData({gd_category: gd_category}); | 145 | + if (res.data.data) { |
| 146 | + var gd_category = res.data.data.pageData; | ||
| 147 | + | ||
| 148 | + th.setData({ | ||
| 149 | + gd_category: gd_category | ||
| 150 | + }); | ||
| 128 | } | 151 | } |
| 129 | }) | 152 | }) |
| 130 | }, | 153 | }, |
| 131 | - | 154 | + |
| 132 | //当隐藏的时候就关闭计时器 | 155 | //当隐藏的时候就关闭计时器 |
| 133 | - onHide:function(){ | ||
| 134 | - this.data.is_timer=0; | 156 | + onHide: function() { |
| 157 | + this.data.is_timer = 0; | ||
| 135 | clearInterval(this.data.pt_timer) | 158 | clearInterval(this.data.pt_timer) |
| 136 | }, | 159 | }, |
| 137 | 160 | ||
| 138 | //同步初始加载 | 161 | //同步初始加载 |
| 139 | - async init_load(){ | ||
| 140 | - var th=this; | ||
| 141 | - await getApp().get_isbuy(); | ||
| 142 | - this.setappdata(getApp().globalData.wxapp_buy_obj); | ||
| 143 | - await getApp().getConfig_ays(); | ||
| 144 | - | ||
| 145 | - //因为营销版本的功能包含了自定义模板的功能,是同时的 | ||
| 146 | - //读取全局是否有弄自定义模板 | ||
| 147 | - await api.get_template_fir(o.stoid).then(res=>{ | ||
| 148 | - var data=res.data.data; | ||
| 149 | - if(data.length>0){ | ||
| 150 | - var temp_data=data[0]; | ||
| 151 | - var t_arr=JSON.parse(temp_data.json_str); | ||
| 152 | - th.setData({ template_arr: t_arr, isTemplate: 1, bgcolor_t: temp_data.bkcolor}); | ||
| 153 | - } | ||
| 154 | - }) | ||
| 155 | - | ||
| 156 | - | ||
| 157 | - //--首页的问题-- | ||
| 158 | - if(getApp().globalData.config && getApp().globalData.config.store_name!=undefined && getApp().globalData.config.store_name!=null ){ | ||
| 159 | - wx.setNavigationBarTitle({ | ||
| 160 | - title: getApp().globalData.config.store_name, | ||
| 161 | - }); | ||
| 162 | - }else{ | ||
| 163 | - wx.setNavigationBarTitle({ | ||
| 164 | - title: getApp().globalData.setting.appName, | ||
| 165 | - }); | 162 | + async init_load() { |
| 163 | + var th = this; | ||
| 164 | + await getApp().get_isbuy(); | ||
| 165 | + this.setappdata(getApp().globalData.wxapp_buy_obj); | ||
| 166 | + await getApp().getConfig_ays(); | ||
| 167 | + | ||
| 168 | + //因为营销版本的功能包含了自定义模板的功能,是同时的 | ||
| 169 | + //读取全局是否有弄自定义模板 | ||
| 170 | + await api.get_template_fir(o.stoid).then(res => { | ||
| 171 | + var data = res.data.data; | ||
| 172 | + if (data.length > 0) { | ||
| 173 | + var temp_data = data[0]; | ||
| 174 | + var t_arr = JSON.parse(temp_data.json_str); | ||
| 175 | + th.setData({ | ||
| 176 | + template_arr: t_arr, | ||
| 177 | + isTemplate: 1, | ||
| 178 | + bgcolor_t: temp_data.bkcolor | ||
| 179 | + }); | ||
| 166 | } | 180 | } |
| 181 | + }) | ||
| 182 | + | ||
| 183 | + | ||
| 184 | + //--首页的问题-- | ||
| 185 | + if (getApp().globalData.config && getApp().globalData.config.store_name != undefined && getApp().globalData.config.store_name != null) { | ||
| 186 | + wx.setNavigationBarTitle({ | ||
| 187 | + title: getApp().globalData.config.store_name, | ||
| 188 | + }); | ||
| 189 | + } else { | ||
| 190 | + wx.setNavigationBarTitle({ | ||
| 191 | + title: getApp().globalData.setting.appName, | ||
| 192 | + }); | ||
| 193 | + } | ||
| 167 | }, | 194 | }, |
| 168 | 195 | ||
| 169 | //---读取数据内容--- | 196 | //---读取数据内容--- |
| @@ -172,16 +199,23 @@ Page({ | @@ -172,16 +199,23 @@ Page({ | ||
| 172 | //----广告---- | 199 | //----广告---- |
| 173 | var e = this; | 200 | var e = this; |
| 174 | await getApp().request.promiseGet("/api/weshop/ad/list?pid=2&store_id=" + o.stoid, { | 201 | await getApp().request.promiseGet("/api/weshop/ad/list?pid=2&store_id=" + o.stoid, { |
| 175 | - data:{enabled:1} | ||
| 176 | - }).then(res=>{ | 202 | + data: { |
| 203 | + enabled: 1 | ||
| 204 | + } | ||
| 205 | + }).then(res => { | ||
| 177 | var a = res.data.data; | 206 | var a = res.data.data; |
| 178 | var arr = new Array(); | 207 | var arr = new Array(); |
| 179 | for (var i = 0; i < a.length; i++) { | 208 | for (var i = 0; i < a.length; i++) { |
| 180 | - var tt = { 'ad_code': o.imghost + a[i].ad_code, 'media_link': '' }; | 209 | + var tt = { |
| 210 | + 'ad_code': o.imghost + a[i].ad_code, | ||
| 211 | + 'media_link': '' | ||
| 212 | + }; | ||
| 181 | arr.push(tt); | 213 | arr.push(tt); |
| 182 | } | 214 | } |
| 183 | - if (arr.length>0) e.setData({ banner: arr, }); | ||
| 184 | - | 215 | + if (arr.length > 0) e.setData({ |
| 216 | + banner: arr, | ||
| 217 | + }); | ||
| 218 | + | ||
| 185 | wx.stopPullDownRefresh(); | 219 | wx.stopPullDownRefresh(); |
| 186 | }) | 220 | }) |
| 187 | 221 | ||
| @@ -202,20 +236,20 @@ Page({ | @@ -202,20 +236,20 @@ Page({ | ||
| 202 | flash_data = e.data.data.pageData; | 236 | flash_data = e.data.data.pageData; |
| 203 | if (flash_data == null || flash_data.length <= 0) return false; | 237 | if (flash_data == null || flash_data.length <= 0) return false; |
| 204 | 238 | ||
| 205 | - | 239 | + |
| 206 | //当前时间戳 | 240 | //当前时间戳 |
| 207 | var nt = ut.gettimestamp(); | 241 | var nt = ut.gettimestamp(); |
| 208 | 242 | ||
| 209 | - flash_data.forEach(function (val,ind) { | ||
| 210 | - if(val.start_time>nt) flash_data[ind].status=0; | ||
| 211 | - else if(val.end_time>nt) flash_data[ind].status=1; | ||
| 212 | - if(val.buy_num>=val.goods_num) flash_data[ind].status=2; | 243 | + flash_data.forEach(function(val, ind) { |
| 244 | + if (val.start_time > nt) flash_data[ind].status = 0; | ||
| 245 | + else if (val.end_time > nt) flash_data[ind].status = 1; | ||
| 246 | + if (val.buy_num >= val.goods_num) flash_data[ind].status = 2; | ||
| 213 | }); | 247 | }); |
| 214 | 248 | ||
| 215 | var arr = new Array(); | 249 | var arr = new Array(); |
| 216 | //--三个三个一组--- | 250 | //--三个三个一组--- |
| 217 | - for(var i=0;i< flash_data.length;i+=3){ | ||
| 218 | - arr.push(flash_data.slice(i,i+3)); | 251 | + for (var i = 0; i < flash_data.length; i += 3) { |
| 252 | + arr.push(flash_data.slice(i, i + 3)); | ||
| 219 | } | 253 | } |
| 220 | th.setData({ | 254 | th.setData({ |
| 221 | saleGoods: arr | 255 | saleGoods: arr |
| @@ -236,35 +270,35 @@ Page({ | @@ -236,35 +270,35 @@ Page({ | ||
| 236 | var e = res; | 270 | var e = res; |
| 237 | if (e.data.code == 0) { | 271 | if (e.data.code == 0) { |
| 238 | var pd_data = e.data.data.pageData; | 272 | var pd_data = e.data.data.pageData; |
| 239 | - | 273 | + |
| 240 | if (pd_data.length == 0) return; | 274 | if (pd_data.length == 0) return; |
| 241 | - | 275 | + |
| 242 | //获取当前 | 276 | //获取当前 |
| 243 | var nt = ut.gettimestamp(); | 277 | var nt = ut.gettimestamp(); |
| 244 | - pd_data.forEach(function (val,ind) { | ||
| 245 | - if(val.start_time>nt) pd_data[ind].status=0; | ||
| 246 | - else if(val.end_time>nt) pd_data[ind].status=1; | ||
| 247 | - if(val.buy_num>=val.goods_num) pd_data[ind].status=2; | 278 | + pd_data.forEach(function(val, ind) { |
| 279 | + if (val.start_time > nt) pd_data[ind].status = 0; | ||
| 280 | + else if (val.end_time > nt) pd_data[ind].status = 1; | ||
| 281 | + if (val.buy_num >= val.goods_num) pd_data[ind].status = 2; | ||
| 248 | }); | 282 | }); |
| 249 | - | ||
| 250 | - //获取当前时间,比较拼团中还在未开始 | 283 | + |
| 284 | + //获取当前时间,比较拼团中还在未开始 | ||
| 251 | var timestamp = new Date().getTime(); | 285 | var timestamp = new Date().getTime(); |
| 252 | var is_team_tepy; | 286 | var is_team_tepy; |
| 253 | - for (var j = 0; j < pd_data.length;j++ ){ | 287 | + for (var j = 0; j < pd_data.length; j++) { |
| 254 | pd_data[j].is_team_tepy = 1; | 288 | pd_data[j].is_team_tepy = 1; |
| 255 | - if (timestamp<pd_data[j].start_time*1000){ | 289 | + if (timestamp < pd_data[j].start_time * 1000) { |
| 256 | var is_team_tepy; | 290 | var is_team_tepy; |
| 257 | pd_data[j].is_team_tepy = 0; | 291 | pd_data[j].is_team_tepy = 0; |
| 258 | - } | 292 | + } |
| 259 | } | 293 | } |
| 260 | - | 294 | + |
| 261 | var arr = new Array(); | 295 | var arr = new Array(); |
| 262 | //--2个2个一组--- | 296 | //--2个2个一组--- |
| 263 | - for(var i=0;i< pd_data.length;i+=2){ | ||
| 264 | - | ||
| 265 | - arr.push(pd_data.slice(i,i+2)); | 297 | + for (var i = 0; i < pd_data.length; i += 2) { |
| 298 | + | ||
| 299 | + arr.push(pd_data.slice(i, i + 2)); | ||
| 266 | } | 300 | } |
| 267 | - | 301 | + |
| 268 | th.setData({ | 302 | th.setData({ |
| 269 | pindGoods: arr | 303 | pindGoods: arr |
| 270 | }); | 304 | }); |
| @@ -275,7 +309,13 @@ Page({ | @@ -275,7 +309,13 @@ Page({ | ||
| 275 | //------新品------- | 309 | //------新品------- |
| 276 | await getApp().request.promiseGet("/api/weshop/goods/page?page=1", { | 310 | await getApp().request.promiseGet("/api/weshop/goods/page?page=1", { |
| 277 | data: { | 311 | data: { |
| 278 | - is_mainshow: 1, isonsale: 1, is_on_sale: 1, store_id: o.stoid, pageSize: 9,is_new:1,orderField:"sort" | 312 | + is_mainshow: 1, |
| 313 | + isonsale: 1, | ||
| 314 | + is_on_sale: 1, | ||
| 315 | + store_id: o.stoid, | ||
| 316 | + pageSize: 9, | ||
| 317 | + is_new: 1, | ||
| 318 | + orderField: "sort" | ||
| 279 | } | 319 | } |
| 280 | }).then(res => { | 320 | }).then(res => { |
| 281 | var e = res; | 321 | var e = res; |
| @@ -283,8 +323,8 @@ Page({ | @@ -283,8 +323,8 @@ Page({ | ||
| 283 | var new_data = e.data.data.pageData; | 323 | var new_data = e.data.data.pageData; |
| 284 | var arr = new Array(); | 324 | var arr = new Array(); |
| 285 | //--三个三个一组--- | 325 | //--三个三个一组--- |
| 286 | - for(var i=0;i< new_data.length;i+=3){ | ||
| 287 | - arr.push(new_data.slice(i,i+3)); | 326 | + for (var i = 0; i < new_data.length; i += 3) { |
| 327 | + arr.push(new_data.slice(i, i + 3)); | ||
| 288 | } | 328 | } |
| 289 | th.setData({ | 329 | th.setData({ |
| 290 | newGoods: arr, | 330 | newGoods: arr, |
| @@ -295,7 +335,13 @@ Page({ | @@ -295,7 +335,13 @@ Page({ | ||
| 295 | //------热卖------- | 335 | //------热卖------- |
| 296 | await getApp().request.promiseGet("/api/weshop/goods/page?page=1", { | 336 | await getApp().request.promiseGet("/api/weshop/goods/page?page=1", { |
| 297 | data: { | 337 | data: { |
| 298 | - is_mainshow: 1, isonsale: 1, is_on_sale: 1, store_id: o.stoid, pageSize: 9,is_hot:1,orderField:"sort" | 338 | + is_mainshow: 1, |
| 339 | + isonsale: 1, | ||
| 340 | + is_on_sale: 1, | ||
| 341 | + store_id: o.stoid, | ||
| 342 | + pageSize: 9, | ||
| 343 | + is_hot: 1, | ||
| 344 | + orderField: "sort" | ||
| 299 | } | 345 | } |
| 300 | }).then(res => { | 346 | }).then(res => { |
| 301 | var e = res; | 347 | var e = res; |
| @@ -303,8 +349,8 @@ Page({ | @@ -303,8 +349,8 @@ Page({ | ||
| 303 | var new_data = e.data.data.pageData; | 349 | var new_data = e.data.data.pageData; |
| 304 | var arr = new Array(); | 350 | var arr = new Array(); |
| 305 | //--三个三个一组--- | 351 | //--三个三个一组--- |
| 306 | - for(var i=0;i< new_data.length;i+=3){ | ||
| 307 | - arr.push(new_data.slice(i,i+3)); | 352 | + for (var i = 0; i < new_data.length; i += 3) { |
| 353 | + arr.push(new_data.slice(i, i + 3)); | ||
| 308 | } | 354 | } |
| 309 | th.setData({ | 355 | th.setData({ |
| 310 | hotGoods: arr, | 356 | hotGoods: arr, |
| @@ -313,18 +359,22 @@ Page({ | @@ -313,18 +359,22 @@ Page({ | ||
| 313 | }) | 359 | }) |
| 314 | //---调用信息--- | 360 | //---调用信息--- |
| 315 | // this.requestRecommend(); | 361 | // this.requestRecommend(); |
| 316 | - this.setData({ishow:1}); | 362 | + this.setData({ |
| 363 | + ishow: 1 | ||
| 364 | + }); | ||
| 317 | //---先获取会员--- | 365 | //---先获取会员--- |
| 318 | - t.getUserFir(function () { | 366 | + t.getUserFir(function() { |
| 319 | 367 | ||
| 320 | }); | 368 | }); |
| 321 | var goods_list = this.selectComponent("#goods_list"); //组件的id | 369 | var goods_list = this.selectComponent("#goods_list"); //组件的id |
| 322 | goods_list.init(); | 370 | goods_list.init(); |
| 323 | - setTimeout(function () { goods_list.get_list();},300) | 371 | + setTimeout(function() { |
| 372 | + goods_list.get_list(); | ||
| 373 | + }, 300) | ||
| 324 | }, | 374 | }, |
| 325 | 375 | ||
| 326 | //--判断小程序是否过期-- | 376 | //--判断小程序是否过期-- |
| 327 | - setappdata: function (t) { | 377 | + setappdata: function(t) { |
| 328 | if (t.isout == 1) | 378 | if (t.isout == 1) |
| 329 | wx.navigateTo({ | 379 | wx.navigateTo({ |
| 330 | url: "/pages/error/error?msg=小程序已经过期", | 380 | url: "/pages/error/error?msg=小程序已经过期", |
| @@ -335,40 +385,42 @@ Page({ | @@ -335,40 +385,42 @@ Page({ | ||
| 335 | }); | 385 | }); |
| 336 | }, | 386 | }, |
| 337 | //---加载更多是靠这个函数---- | 387 | //---加载更多是靠这个函数---- |
| 338 | - onReachBottom: function () { | 388 | + onReachBottom: function() { |
| 339 | var goods_list = this.selectComponent("#goods_list"); //组件的id | 389 | var goods_list = this.selectComponent("#goods_list"); //组件的id |
| 340 | - if(goods_list) goods_list.get_list(); | 390 | + if (goods_list) goods_list.get_list(); |
| 341 | }, | 391 | }, |
| 342 | 392 | ||
| 343 | 393 | ||
| 344 | 394 | ||
| 345 | - onPullDownRefresh: function (e) { | 395 | + onPullDownRefresh: function(e) { |
| 346 | this.data.recommend = null, this.data.currentPage = 1, n.resetConfig(), this.requestHomePage(), | 396 | this.data.recommend = null, this.data.currentPage = 1, n.resetConfig(), this.requestHomePage(), |
| 347 | this.requestRecommend(); | 397 | this.requestRecommend(); |
| 348 | }, | 398 | }, |
| 349 | - onUnload: function () { | 399 | + onUnload: function() { |
| 350 | this.destroyActivityTimer(); | 400 | this.destroyActivityTimer(); |
| 351 | }, | 401 | }, |
| 352 | - setCountTime: function (e) { | 402 | + setCountTime: function(e) { |
| 353 | e.diffTime || (e.diffTime = new Date().getTime() - 1e3 * e.server_time), this.setData({ | 403 | e.diffTime || (e.diffTime = new Date().getTime() - 1e3 * e.server_time), this.setData({ |
| 354 | "sale.diffTime": e.diffTime | 404 | "sale.diffTime": e.diffTime |
| 355 | }), this.setData({ | 405 | }), this.setData({ |
| 356 | "sale.good": e.flash_sale_goods[0] | 406 | "sale.good": e.flash_sale_goods[0] |
| 357 | }), this.destroyActivityTimer(), this.createActivityTimer(); | 407 | }), this.destroyActivityTimer(), this.createActivityTimer(); |
| 358 | }, | 408 | }, |
| 359 | - createActivityTimer: function () { | ||
| 360 | - var e = this.data.sale, t = this; | ||
| 361 | - this.data.timer = setInterval(function () { | ||
| 362 | - var a = 1e3 * e.good.end_time - new Date().getTime() + e.diffTime, o = i.transTime(a); | 409 | + createActivityTimer: function() { |
| 410 | + var e = this.data.sale, | ||
| 411 | + t = this; | ||
| 412 | + this.data.timer = setInterval(function() { | ||
| 413 | + var a = 1e3 * e.good.end_time - new Date().getTime() + e.diffTime, | ||
| 414 | + o = i.transTime(a); | ||
| 363 | a <= 0 ? t.requestHomePage() : t.setData({ | 415 | a <= 0 ? t.requestHomePage() : t.setData({ |
| 364 | "sale.countTime": o | 416 | "sale.countTime": o |
| 365 | }); | 417 | }); |
| 366 | }, 1e3); | 418 | }, 1e3); |
| 367 | }, | 419 | }, |
| 368 | - destroyActivityTimer: function () { | 420 | + destroyActivityTimer: function() { |
| 369 | this.data.timer && (clearInterval(this.data.timer), this.data.timer = null); | 421 | this.data.timer && (clearInterval(this.data.timer), this.data.timer = null); |
| 370 | }, | 422 | }, |
| 371 | - onPageScroll: function (e) { | 423 | + onPageScroll: function(e) { |
| 372 | this.setData({ | 424 | this.setData({ |
| 373 | scrollTop: e.scrollTop | 425 | scrollTop: e.scrollTop |
| 374 | }); | 426 | }); |
| @@ -384,34 +436,34 @@ Page({ | @@ -384,34 +436,34 @@ Page({ | ||
| 384 | }));--*/ | 436 | }));--*/ |
| 385 | 437 | ||
| 386 | }, | 438 | }, |
| 387 | - jumpSearch: function () { | 439 | + jumpSearch: function() { |
| 388 | wx.navigateTo({ | 440 | wx.navigateTo({ |
| 389 | url: "/pages/goods/search/search" | 441 | url: "/pages/goods/search/search" |
| 390 | }); | 442 | }); |
| 391 | }, | 443 | }, |
| 392 | - onShareAppMessage: function (e) { | 444 | + onShareAppMessage: function(e) { |
| 393 | return o.share; | 445 | return o.share; |
| 394 | }, | 446 | }, |
| 395 | 447 | ||
| 396 | //图片失败,默认图片 | 448 | //图片失败,默认图片 |
| 397 | - bind_bnerr: function (e) { | 449 | + bind_bnerr: function(e) { |
| 398 | var _errImg = e.target.dataset.errorimg; | 450 | var _errImg = e.target.dataset.errorimg; |
| 399 | var _errObj = {}; | 451 | var _errObj = {}; |
| 400 | - _errObj[_errImg] = this.data.url+ "/miniapp/images/del/logo.jpg"; | 452 | + _errObj[_errImg] = this.data.url + "/miniapp/images/del/logo.jpg"; |
| 401 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | 453 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; |
| 402 | }, | 454 | }, |
| 403 | 455 | ||
| 404 | //图片失败,默认图片 | 456 | //图片失败,默认图片 |
| 405 | - bind_bnerr2: function (e) { | 457 | + bind_bnerr2: function(e) { |
| 406 | var _errImg = e.target.dataset.errorimg; | 458 | var _errImg = e.target.dataset.errorimg; |
| 407 | var _errurl = e.target.dataset.url; | 459 | var _errurl = e.target.dataset.url; |
| 408 | - var _errObj = {}; | ||
| 409 | - _errObj[_errImg] = "/miniapp/images/default_g_img.gif"; | ||
| 410 | - this.setData(_errObj); //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | ||
| 411 | - | 460 | + var _errObj = {}; |
| 461 | + _errObj[_errImg] = "/miniapp/images/default_g_img.gif"; | ||
| 462 | + this.setData(_errObj); //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | ||
| 463 | + | ||
| 412 | }, | 464 | }, |
| 413 | -//图片失败,默认图片 | ||
| 414 | - bind_bnerr3: function (e) { | 465 | + //图片失败,默认图片 |
| 466 | + bind_bnerr3: function(e) { | ||
| 415 | var _errImg = e.target.dataset.errorimg; | 467 | var _errImg = e.target.dataset.errorimg; |
| 416 | var _Img = e.target.dataset.img; | 468 | var _Img = e.target.dataset.img; |
| 417 | if (_Img != undefined) { | 469 | if (_Img != undefined) { |
| @@ -430,7 +482,7 @@ Page({ | @@ -430,7 +482,7 @@ Page({ | ||
| 430 | 482 | ||
| 431 | //----秒杀倒计时函数----- | 483 | //----秒杀倒计时函数----- |
| 432 | countDown() { | 484 | countDown() { |
| 433 | - if(!this.data.is_timer) return false; | 485 | + if (!this.data.is_timer) return false; |
| 434 | var th = this; | 486 | var th = this; |
| 435 | // 获取当前时间,同时得到活动结束时间数组 | 487 | // 获取当前时间,同时得到活动结束时间数组 |
| 436 | var newTime = ut.gettimestamp(); | 488 | var newTime = ut.gettimestamp(); |
| @@ -479,7 +531,7 @@ Page({ | @@ -479,7 +531,7 @@ Page({ | ||
| 479 | 531 | ||
| 480 | //----拼单倒计时函数----- | 532 | //----拼单倒计时函数----- |
| 481 | countDown2() { | 533 | countDown2() { |
| 482 | - if(!this.data.is_timer) return false; | 534 | + if (!this.data.is_timer) return false; |
| 483 | 535 | ||
| 484 | var th = this; | 536 | var th = this; |
| 485 | // 获取当前时间,同时得到活动结束时间数组 | 537 | // 获取当前时间,同时得到活动结束时间数组 |
| @@ -529,123 +581,179 @@ Page({ | @@ -529,123 +581,179 @@ Page({ | ||
| 529 | setTimeout(th.countDown2, 1000); | 581 | setTimeout(th.countDown2, 1000); |
| 530 | }, | 582 | }, |
| 531 | 583 | ||
| 532 | - bannerSwiperChange:function (e) { | ||
| 533 | - var index=e.detail.current; | ||
| 534 | - this.setData({banner_index:index}); | 584 | + bannerSwiperChange: function(e) { |
| 585 | + var index = e.detail.current; | ||
| 586 | + this.setData({ | ||
| 587 | + banner_index: index | ||
| 588 | + }); | ||
| 535 | }, | 589 | }, |
| 536 | - flashSwiperChange:function (e) { | ||
| 537 | - var index=e.detail.current; | ||
| 538 | - this.setData({flash_index:index}); | 590 | + flashSwiperChange: function(e) { |
| 591 | + var index = e.detail.current; | ||
| 592 | + this.setData({ | ||
| 593 | + flash_index: index | ||
| 594 | + }); | ||
| 539 | }, | 595 | }, |
| 540 | - ptSwiperChange:function (e) { | ||
| 541 | - var index=e.detail.current; | ||
| 542 | - this.setData({pt_index:index}); | 596 | + ptSwiperChange: function(e) { |
| 597 | + var index = e.detail.current; | ||
| 598 | + this.setData({ | ||
| 599 | + pt_index: index | ||
| 600 | + }); | ||
| 543 | }, | 601 | }, |
| 544 | 602 | ||
| 545 | Interval_pt() { | 603 | Interval_pt() { |
| 546 | - var th=this; | ||
| 547 | - this.data.pt_timer=setInterval(function () { | ||
| 548 | - var item=ut.get_rand_item(th.data.pt_timer_arr); | ||
| 549 | - th.setData({pt_timer_active:1,pt_timer_item:item}); | ||
| 550 | - setTimeout(function () { | ||
| 551 | - th.setData({pt_timer_active:0}); | ||
| 552 | - },1500) | ||
| 553 | - },4000); | 604 | + var th = this; |
| 605 | + this.data.pt_timer = setInterval(function() { | ||
| 606 | + var item = ut.get_rand_item(th.data.pt_timer_arr); | ||
| 607 | + th.setData({ | ||
| 608 | + pt_timer_active: 1, | ||
| 609 | + pt_timer_item: item | ||
| 610 | + }); | ||
| 611 | + setTimeout(function() { | ||
| 612 | + th.setData({ | ||
| 613 | + pt_timer_active: 0 | ||
| 614 | + }); | ||
| 615 | + }, 1500) | ||
| 616 | + }, 4000); | ||
| 554 | }, | 617 | }, |
| 555 | 618 | ||
| 556 | 619 | ||
| 557 | //---扫一扫的函数--- | 620 | //---扫一扫的函数--- |
| 558 | - getScancode: function () { | 621 | + getScancode: function() { |
| 559 | var _this = this; | 622 | var _this = this; |
| 560 | // 允许从相机和相册扫码 | 623 | // 允许从相机和相册扫码 |
| 561 | wx.scanCode({ | 624 | wx.scanCode({ |
| 562 | success: (res) => { | 625 | success: (res) => { |
| 563 | - var result = res.result; | ||
| 564 | - wx.navigateTo({ | ||
| 565 | - url: "/pages/goods/search/search?s_key="+result, | ||
| 566 | - }); | 626 | + var result = res.result; |
| 627 | + wx.navigateTo({ | ||
| 628 | + url: "/pages/goods/search/search?s_key=" + result, | ||
| 629 | + }); | ||
| 567 | } | 630 | } |
| 568 | }) | 631 | }) |
| 569 | }, | 632 | }, |
| 570 | 633 | ||
| 571 | //跳转到分类 | 634 | //跳转到分类 |
| 572 | - go_cate:function(){ | 635 | + go_cate: function() { |
| 573 | getApp().goto("/pages/goods/categoryList/categoryList"); | 636 | getApp().goto("/pages/goods/categoryList/categoryList"); |
| 574 | }, | 637 | }, |
| 575 | 638 | ||
| 576 | - go_url:function(e){ | ||
| 577 | - var url=e.currentTarget.dataset.url; | ||
| 578 | - getApp().goto(url); | 639 | + go_url: function(e) { |
| 640 | + var url = e.currentTarget.dataset.url; | ||
| 641 | + getApp().goto(url); | ||
| 579 | }, | 642 | }, |
| 580 | 643 | ||
| 581 | - bind_bnerr_icon:function (e) { | 644 | + bind_bnerr_icon: function(e) { |
| 582 | var def = "/miniapp/images/no_cate_def.png"; | 645 | var def = "/miniapp/images/no_cate_def.png"; |
| 583 | var _err = e.currentTarget.dataset.err; | 646 | var _err = e.currentTarget.dataset.err; |
| 584 | - var ob={}; | ||
| 585 | - ob[_err]=def; | 647 | + var ob = {}; |
| 648 | + ob[_err] = def; | ||
| 586 | this.setData(ob); | 649 | this.setData(ob); |
| 587 | }, | 650 | }, |
| 588 | 651 | ||
| 589 | //跳转到分类的商品列表 | 652 | //跳转到分类的商品列表 |
| 590 | - go_cate2: function (t) { | 653 | + go_cate2: function(t) { |
| 591 | var cid = t.currentTarget.dataset.cid; | 654 | var cid = t.currentTarget.dataset.cid; |
| 592 | var pid = t.currentTarget.dataset.pid; | 655 | var pid = t.currentTarget.dataset.pid; |
| 593 | var lurl = "/pages/goods/goodsList/goodsList?cat_id=" + cid + "&pid=" + pid; | 656 | var lurl = "/pages/goods/goodsList/goodsList?cat_id=" + cid + "&pid=" + pid; |
| 594 | - wx.navigateTo({ url: lurl }); | ||
| 595 | - }, | ||
| 596 | - | ||
| 597 | - //跳转到权益 | ||
| 598 | - go_quanyi:function(t){ | ||
| 599 | - var user_info = getApp().globalData.userInfo; | ||
| 600 | - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | ||
| 601 | - wx.navigateTo({ url: '/pages/getphone/getphone', }) | ||
| 602 | - return false; | ||
| 603 | - } | ||
| 604 | - getApp().goto("/pages/user/userqy/userqy"); | ||
| 605 | - }, | ||
| 606 | - | ||
| 607 | - imageLoad:function (e) { | ||
| 608 | - var imgwidth = e.detail.width; | ||
| 609 | - var imgheight = e.detail.height; | ||
| 610 | - //宽高比 | ||
| 611 | - var ratio = imgwidth / imgheight; | ||
| 612 | - //计算的高度值 | ||
| 613 | - var viewHeight = 715 / ratio; | ||
| 614 | - if(this.data.max_sw_height<viewHeight) this.setData({ max_sw_height:viewHeight }); | ||
| 615 | - }, | 657 | + wx.navigateTo({ |
| 658 | + url: lurl | ||
| 659 | + }); | ||
| 660 | + }, | ||
| 661 | + new_nav: function(e) { | ||
| 662 | + var th = this; | ||
| 663 | + var new_nav = e.currentTarget.dataset.url; | ||
| 664 | + getApp().goto(new_nav); | ||
| 665 | + }, | ||
| 666 | + //跳转到权益 | ||
| 667 | + go_quanyi: function(t) { | ||
| 668 | + var user_info = getApp().globalData.userInfo; | ||
| 669 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | ||
| 670 | + wx.navigateTo({ | ||
| 671 | + url: '/pages/getphone/getphone', | ||
| 672 | + }) | ||
| 673 | + return false; | ||
| 674 | + } | ||
| 675 | + getApp().goto("/pages/user/userqy/userqy"); | ||
| 676 | + }, | ||
| 677 | + | ||
| 678 | + imageLoad: function(e) { | ||
| 679 | + var imgwidth = e.detail.width; | ||
| 680 | + var imgheight = e.detail.height; | ||
| 681 | + //宽高比 | ||
| 682 | + var ratio = imgwidth / imgheight; | ||
| 683 | + //计算的高度值 | ||
| 684 | + var viewHeight = 715 / ratio; | ||
| 685 | + if (this.data.max_sw_height < viewHeight) this.setData({ | ||
| 686 | + max_sw_height: viewHeight | ||
| 687 | + }); | ||
| 688 | + }, | ||
| 616 | //判断该用户是否是新会员 | 689 | //判断该用户是否是新会员 |
| 617 | - is_new: function () { | ||
| 618 | - // var th = this; | ||
| 619 | - // getApp().request.promiseGet("/api/weshop/marketing/newpeople/act/judge", { | ||
| 620 | - // data: { | ||
| 621 | - // storeId: o.stoid, | ||
| 622 | - // userId: d.user_id | ||
| 623 | - // } | ||
| 624 | - // }).then(res => { | ||
| 625 | - // var swiperimage = th.data.swiperimage; | ||
| 626 | - // swiperimage.push("/api/weshop/marketing/newpeople/act/bound/judge"); | ||
| 627 | - // if (res.data.code == 0) { | ||
| 628 | - // th.setData({ | ||
| 629 | - // is_disgraceful:1 | ||
| 630 | - // }) | ||
| 631 | - // } | ||
| 632 | - // }) | ||
| 633 | - | ||
| 634 | - // getApp().request.promiseGet("/api/weshop/marketing/newpeople/act/judge", { | ||
| 635 | - // data: { | ||
| 636 | - // storeId: o.stoid, | ||
| 637 | - // userId: d.user_id | ||
| 638 | - // } | ||
| 639 | - // }).then(res => { | ||
| 640 | - // var swiperimage = th.data.swiperimage; | ||
| 641 | - // swiperimage.push("/miniapp/images/newpeople/newpeople.png"); | ||
| 642 | - // if (res.data.code == 0) { | ||
| 643 | - // th.setData({ | ||
| 644 | - // swiperimage: swiperimage | ||
| 645 | - // }) | ||
| 646 | - // } | ||
| 647 | - // }) | 690 | + is_new: function() { |
| 691 | + var th = this; | ||
| 692 | + wx.hideLoading(); | ||
| 693 | + getApp().request.promiseGet("/api/weshop/marketing/newpeople/act/judge", { | ||
| 694 | + data: { | ||
| 695 | + storeId: os.stoid, | ||
| 696 | + userId: d.user_id | ||
| 697 | + } | ||
| 698 | + }).then(res => { | ||
| 699 | + if (res.data.code == 0) { | ||
| 700 | + var actid = res.data.data.id; //活动id | ||
| 701 | + var giftBagId = res.data.data.giftBagId; //礼包id | ||
| 702 | + var new_nav = "/pages/giftpack/newvipgift/newvipgift?actId=" + actid + '&' + 'actType=' + 1 + '&' + 'giftBagId=' + giftBagId; | ||
| 703 | + var new_image = res.data.data.imageurl; | ||
| 704 | + var swiperimage = th.data.swiperimage; | ||
| 705 | + var img = { | ||
| 706 | + image: "/miniapp/images/newpeople/newpeople.png", | ||
| 707 | + nav_url: new_nav | ||
| 708 | + } | ||
| 709 | + swiperimage.unshift(img); | ||
| 710 | + th.setData({ | ||
| 711 | + swiperimage: swiperimage, | ||
| 712 | + new_image: new_image, | ||
| 713 | + new_nav: new_nav | ||
| 714 | + }) | ||
| 648 | 715 | ||
| 649 | - } | 716 | + getApp().request.promiseGet("/api/weshop/marketing/newpeople/act/bound/judge", { |
| 717 | + data: { | ||
| 718 | + storeId: o.stoid, | ||
| 719 | + userId: d.user_id | ||
| 720 | + } | ||
| 721 | + }).then(res => { | ||
| 722 | + if (res.data.code == 0) { | ||
| 723 | + th.setData({ | ||
| 724 | + is_disgraceful: 1 | ||
| 725 | + }) | ||
| 726 | + } | ||
| 727 | + }) | ||
| 728 | + } | ||
| 729 | + }) | ||
| 650 | 730 | ||
| 731 | + }, | ||
| 732 | + is_festival: function(e) { | ||
| 733 | + var th = this; | ||
| 734 | + var url = "/api/weshop/marketing/holiday/act/judge"; | ||
| 735 | + getApp().request.promiseGet(url, { | ||
| 736 | + data: { | ||
| 737 | + storeId: os.stoid, | ||
| 738 | + userId: d.user_id | ||
| 739 | + } | ||
| 740 | + }).then(res => { | ||
| 741 | + if (res.data.code == 0) { | ||
| 742 | + var actid = res.data.data.id; //活动id | ||
| 743 | + var giftBagId = res.data.data.gifBagId; //礼包id | ||
| 744 | + var nav_url = "/pages/giftpack/festival/festival?actId=" + actid + '&' + 'actType=' + 3 + '&' + 'giftBagId=' + giftBagId; | ||
| 745 | + var swiperimage = th.data.swiperimage; | ||
| 746 | + var actImg = res.data.data.actImg; | ||
| 747 | + var img = { | ||
| 748 | + image: actImg, | ||
| 749 | + nav_url: nav_url | ||
| 750 | + } | ||
| 751 | + swiperimage.unshift(img); | ||
| 752 | + th.setData({ | ||
| 753 | + swiperimage: swiperimage, | ||
| 754 | + new_nav: nav_url | ||
| 755 | + }) | ||
| 756 | + } | ||
| 757 | + }) | ||
| 758 | + } | ||
| 651 | }); | 759 | }); |
| 652 | \ No newline at end of file | 760 | \ No newline at end of file |
pages/index/index/index.wxml
| @@ -108,14 +108,13 @@ | @@ -108,14 +108,13 @@ | ||
| 108 | </view> | 108 | </view> |
| 109 | </view> | 109 | </view> |
| 110 | </view> | 110 | </view> |
| 111 | - | ||
| 112 | <!-- 轮播 --> | 111 | <!-- 轮播 --> |
| 113 | <swiper class="swiper" autoplay="true" interval="5000" circular="{{true}}" indicator-dots="{{true}}" indicator-active-color="rgb(255,255,255)"> | 112 | <swiper class="swiper" autoplay="true" interval="5000" circular="{{true}}" indicator-dots="{{true}}" indicator-active-color="rgb(255,255,255)"> |
| 114 | - <!-- 跳转我的权益 --> | 113 | + <!-- 活动轮播 --> |
| 115 | <block wx:for="{{swiperimage}}" wx:for-item="adver" wx:for-index="key"> | 114 | <block wx:for="{{swiperimage}}" wx:for-item="adver" wx:for-index="key"> |
| 116 | <swiper-item> | 115 | <swiper-item> |
| 117 | <view class="title-img-frame"> | 116 | <view class="title-img-frame"> |
| 118 | - <image class="xc-title-img" src="{{url+adver}}" bindtap="{{key==0?'go_quanyi':''}}"></image> | 117 | + <image class="xc-title-img" src="{{url+adver.image}}" bindtap="{{adver.nav_url==0?'go_quanyi':'new_nav'}}" data-url="{{adver.nav_url}}"></image> |
| 119 | </view> | 118 | </view> |
| 120 | </swiper-item> | 119 | </swiper-item> |
| 121 | </block> | 120 | </block> |
| @@ -347,9 +346,9 @@ | @@ -347,9 +346,9 @@ | ||
| 347 | <!-- 新人礼领取图片 --> | 346 | <!-- 新人礼领取图片 --> |
| 348 | <view class="newreceive flex-center"> | 347 | <view class="newreceive flex-center"> |
| 349 | <view> | 348 | <view> |
| 350 | - <navigator url=""> | 349 | + <navigator bindtap="new_nav"> |
| 351 | <view class="flex-level"> | 350 | <view class="flex-level"> |
| 352 | - <image class="receive" src="{{url}}/miniapp/images/newpeople/newreceive.png"></image> | 351 | + <image class="receive" src="{{url}}{{new_image==''?'/miniapp/images/newpeople/newreceive.png':new_image}}"></image> |
| 353 | </view> | 352 | </view> |
| 354 | </navigator> | 353 | </navigator> |
| 355 | <view class="flex-level"> | 354 | <view class="flex-level"> |
pages/index/index/index.wxss
| @@ -451,6 +451,7 @@ | @@ -451,6 +451,7 @@ | ||
| 451 | .xc-title-img { | 451 | .xc-title-img { |
| 452 | height: 220rpx; | 452 | height: 220rpx; |
| 453 | width: 100%; | 453 | width: 100%; |
| 454 | + border-radius: 15rpx; | ||
| 454 | } | 455 | } |
| 455 | 456 | ||
| 456 | .title-img-frame { | 457 | .title-img-frame { |
| @@ -906,5 +907,5 @@ | @@ -906,5 +907,5 @@ | ||
| 906 | } | 907 | } |
| 907 | .swiper{ | 908 | .swiper{ |
| 908 | height: 250rpx; | 909 | height: 250rpx; |
| 909 | - padding-bottom:10rpx; | 910 | + padding-bottom:30rpx; |
| 910 | } | 911 | } |
| 911 | \ No newline at end of file | 912 | \ No newline at end of file |
pages/user/add_comment/add_comment.js
| @@ -8,7 +8,6 @@ Page({ | @@ -8,7 +8,6 @@ Page({ | ||
| 8 | resourceUrl: a.resourceUrl, | 8 | resourceUrl: a.resourceUrl, |
| 9 | iurl: a.imghost, | 9 | iurl: a.imghost, |
| 10 | defaultPhoto: a.resourceUrl + "/static/images/camera.png", | 10 | defaultPhoto: a.resourceUrl + "/static/images/camera.png", |
| 11 | - | ||
| 12 | uploadPath: [], //上传后文件路径 | 11 | uploadPath: [], //上传后文件路径 |
| 13 | maxWord: 0, | 12 | maxWord: 0, |
| 14 | is_anonymous: !1, | 13 | is_anonymous: !1, |
| @@ -20,7 +19,9 @@ Page({ | @@ -20,7 +19,9 @@ Page({ | ||
| 20 | isLongPress: !1, | 19 | isLongPress: !1, |
| 21 | userinfo: null, | 20 | userinfo: null, |
| 22 | imgs: [], //本地文件再上传时的路径 | 21 | imgs: [], //本地文件再上传时的路径 |
| 23 | - lenMore:0 | 22 | + lenMore:0, |
| 23 | + goods_id: "", //商品id | ||
| 24 | + order_id: "", //订单id | ||
| 24 | }, | 25 | }, |
| 25 | onLoad: async function (a) { | 26 | onLoad: async function (a) { |
| 26 | var th = this; | 27 | var th = this; |
| @@ -35,6 +36,10 @@ Page({ | @@ -35,6 +36,10 @@ Page({ | ||
| 35 | console.log(e); | 36 | console.log(e); |
| 36 | th.setData({userinfo: e}) | 37 | th.setData({userinfo: e}) |
| 37 | }) | 38 | }) |
| 39 | + th.setData({ | ||
| 40 | + goods_id: a.goods_id, | ||
| 41 | + order_id: a.order_id | ||
| 42 | + }) | ||
| 38 | }, | 43 | }, |
| 39 | keyUpChangeNum: function (t) { | 44 | keyUpChangeNum: function (t) { |
| 40 | this.setData({ | 45 | this.setData({ |
| @@ -79,7 +84,7 @@ Page({ | @@ -79,7 +84,7 @@ Page({ | ||
| 79 | }); | 84 | }); |
| 80 | }); | 85 | }); |
| 81 | }, | 86 | }, |
| 82 | - submitComment: function () { | 87 | + submitComment: function (i) { |
| 83 | var a = this; | 88 | var a = this; |
| 84 | if (!a.data.service_rank || !a.data.goods_rank || !a.data.deliver_rank) | 89 | if (!a.data.service_rank || !a.data.goods_rank || !a.data.deliver_rank) |
| 85 | return getApp().my_warnning("请先打分",0,a); | 90 | return getApp().my_warnning("请先打分",0,a); |
| @@ -111,9 +116,15 @@ Page({ | @@ -111,9 +116,15 @@ Page({ | ||
| 111 | e.post("/api/weshop/comment/savecomment", { | 116 | e.post("/api/weshop/comment/savecomment", { |
| 112 | data:p_data, | 117 | data:p_data, |
| 113 | success: function (a) { | 118 | success: function (a) { |
| 119 | + if(a.data.code==0){ | ||
| 114 | wx.setStorageSync("user:comment:update", !0), t.showSuccess("评论成功", function () { | 120 | wx.setStorageSync("user:comment:update", !0), t.showSuccess("评论成功", function () { |
| 115 | - wx.navigateBack(); | 121 | + // wx.navigateBack(); |
| 122 | + var url = i.currentTarget.dataset.url; | ||
| 123 | + getApp().goto(url); | ||
| 116 | }); | 124 | }); |
| 125 | + }else{ | ||
| 126 | + getApp().my_warnning(a.data.msg,0,a); | ||
| 127 | + } | ||
| 117 | } | 128 | } |
| 118 | }); | 129 | }); |
| 119 | //}); | 130 | //}); |
pages/user/add_comment/add_comment.wxml
| @@ -106,7 +106,7 @@ | @@ -106,7 +106,7 @@ | ||
| 106 | </view> | 106 | </view> |
| 107 | 107 | ||
| 108 | <view class="Submission flex-level "> | 108 | <view class="Submission flex-level "> |
| 109 | - <view class="fs30 flex-level white " bindtap="submitComment">提交评价</view> | 109 | + <view class="fs30 flex-level white " bindtap="submitComment" data-url="/pages/user/view_comment/view_comment?goods_id={{goods_id}}&order_id={{order_id}}">提交评价</view> |
| 110 | </view> | 110 | </view> |
| 111 | </view> | 111 | </view> |
| 112 | 112 |
pages/user/assistance/assistance.js
0 → 100644
| 1 | +var t = getApp(), | ||
| 2 | + a = t.request, | ||
| 3 | + o = t.globalData.setting, | ||
| 4 | + os = o, | ||
| 5 | + i = require("../../../utils/util.js"), | ||
| 6 | + ut = i, | ||
| 7 | + s = require("../../../utils/common.js"); | ||
| 8 | +var regeneratorRuntime = require('../../../utils/runtime.js'); | ||
| 9 | +var oo = t.globalData.setting; | ||
| 10 | +Page({ | ||
| 11 | + | ||
| 12 | + /** | ||
| 13 | + * 页面的初始数据 | ||
| 14 | + */ | ||
| 15 | + data: { | ||
| 16 | + url: os.url, //接口网址 | ||
| 17 | + iurl: os.imghost, //图片前缀网址 | ||
| 18 | + switch_head: 0, //0:我的任务,1:活动说明 | ||
| 19 | + zl_act: null, //助力活动 | ||
| 20 | + zl_user_list: [], //任务列表 | ||
| 21 | + is_load: 0, //是否已经加载 | ||
| 22 | + cur_page: 1, //页码 | ||
| 23 | + page_num: 5, //每页多少个 | ||
| 24 | + is_show_more: 0, //是否加载更多 | ||
| 25 | + help_id:"",//助力活动的id | ||
| 26 | + timer:"",//任务列表的定时器 | ||
| 27 | + | ||
| 28 | + }, | ||
| 29 | + | ||
| 30 | + /** | ||
| 31 | + * 生命周期函数--监听页面加载 | ||
| 32 | + */ | ||
| 33 | + onLoad: function(options) { | ||
| 34 | + var th = this; | ||
| 35 | + var nav_b = th.selectComponent("#nav_b"); //组件的id | ||
| 36 | + nav_b.set_name("助力", ""); | ||
| 37 | + // 助力活动 | ||
| 38 | + this.assistance(); | ||
| 39 | + }, | ||
| 40 | + | ||
| 41 | + /** | ||
| 42 | + * 生命周期函数--监听页面显示 | ||
| 43 | + */ | ||
| 44 | + onShow: function() { | ||
| 45 | + var th=this; | ||
| 46 | + this.data.timer= setInterval(function () { | ||
| 47 | + th.get_list(); | ||
| 48 | + | ||
| 49 | + },2000) | ||
| 50 | + | ||
| 51 | + }, | ||
| 52 | + // 助力活动 | ||
| 53 | + async assistance() { | ||
| 54 | + var th=this; | ||
| 55 | + var user_id = getApp().globalData.user_id; | ||
| 56 | + var store_id = os.stoid; | ||
| 57 | + | ||
| 58 | + await getApp().request.promiseGet("/api/weshop/marketing/help/act/judge", { | ||
| 59 | + data: { | ||
| 60 | + storeId: store_id, | ||
| 61 | + userId: user_id | ||
| 62 | + } | ||
| 63 | + }).then(res => { | ||
| 64 | + if (res.data.code == 0) { | ||
| 65 | + | ||
| 66 | + var help_data=res.data.data; | ||
| 67 | + console.log(help_data.id,'数据', res.data.data); | ||
| 68 | + th.setData({ | ||
| 69 | + zl_act:help_data, | ||
| 70 | + help_id:help_data.id | ||
| 71 | + }); | ||
| 72 | + | ||
| 73 | + } | ||
| 74 | + }) | ||
| 75 | + | ||
| 76 | + }, | ||
| 77 | + | ||
| 78 | + //--点击获取用户任务列表--会员的任务列表 | ||
| 79 | + get_list:function() { | ||
| 80 | + var th = this; | ||
| 81 | + var help_id=this.data.help_id; | ||
| 82 | + t.request.get("/api/weshop/marketing/help/help/user/page", { | ||
| 83 | + data: { | ||
| 84 | + userId:getApp().globalData.user_id, | ||
| 85 | + storeId: os.stoid, | ||
| 86 | + helpId: help_id | ||
| 87 | + }, | ||
| 88 | + success: function(res) { | ||
| 89 | + clearTimeout(th.data.timer); | ||
| 90 | + | ||
| 91 | + if (!th.data.is_load) th.setData({ | ||
| 92 | + is_load: 1 | ||
| 93 | + }) | ||
| 94 | + if (res.data.code == 0) { | ||
| 95 | + | ||
| 96 | + var list = th.data.zl_user_list; | ||
| 97 | + list = list.concat(res.data.data.pageData) //连接数组 | ||
| 98 | + th.setData({ | ||
| 99 | + zl_user_list: list | ||
| 100 | + }); | ||
| 101 | + var n_all_num = th.data.cur_page * th.data.page_num; | ||
| 102 | + if (res.data.data.total > n_all_num) th.setData({ | ||
| 103 | + is_show_more: 1 | ||
| 104 | + }) | ||
| 105 | + else th.setData({ | ||
| 106 | + is_show_more: 0 | ||
| 107 | + }) | ||
| 108 | + //页吗要更新一下 | ||
| 109 | + th.data.cur_page++; | ||
| 110 | + } else { | ||
| 111 | + th.setData({ | ||
| 112 | + is_show_more: 0 | ||
| 113 | + }) | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + } | ||
| 117 | + }) | ||
| 118 | + }, | ||
| 119 | + | ||
| 120 | + //-----跳转到领取礼包的页面------ | ||
| 121 | + go_task: function() { | ||
| 122 | + var help_id=this.data.help_id; | ||
| 123 | + | ||
| 124 | + getApp().goto("/pages/user/assistance/task_assistance?help_id="+help_id); | ||
| 125 | + }, | ||
| 126 | + switch_head: function (e) { | ||
| 127 | + var th = this; | ||
| 128 | + var index = e.currentTarget.dataset.index; //获取当前选择的是任务还是活动说明 | ||
| 129 | + var switch_head = th.data.switch_head; //0任务,1活动说明 | ||
| 130 | + if (index != switch_head) { | ||
| 131 | + th.setData({ | ||
| 132 | + switch_head: index | ||
| 133 | + }) | ||
| 134 | + } | ||
| 135 | + }, | ||
| 136 | + | ||
| 137 | + //关闭导航 | ||
| 138 | + close: function () { | ||
| 139 | + var th = this; | ||
| 140 | + var nav_b = th.selectComponent("#nav_b"); //组件的id | ||
| 141 | + nav_b.close_box(); | ||
| 142 | + }, | ||
| 143 | + | ||
| 144 | +}) | ||
| 0 | \ No newline at end of file | 145 | \ No newline at end of file |
pages/user/assistance/assistance.json
0 → 100644
| 1 | +{ | ||
| 2 | + "navigationBarTitleText": "好友助力", | ||
| 3 | + "navigationStyle": "custom", | ||
| 4 | + "usingComponents": { | ||
| 5 | + "warn": "/components/long_warn/long_warn", | ||
| 6 | + "my_confirm": "/components/my_confirm/my_confirm", | ||
| 7 | + "nav_b": "/components/nav_b/nav_b" | ||
| 8 | + } | ||
| 9 | +} | ||
| 0 | \ No newline at end of file | 10 | \ No newline at end of file |
pages/user/assistance/assistance.wxml
0 → 100644
| 1 | +<wxs module="filter" src="c_filter.wxs"></wxs> | ||
| 2 | +<view class="page" bindtap="close"> | ||
| 3 | + <!-- 背景图片 --> | ||
| 4 | + <image class="lumi" src="{{iurl+'miniapp/images/friendhelp/lumi.png'}}" lazy-load="true"></image> | ||
| 5 | + <view class="zindex"> | ||
| 6 | + <view class="top"> | ||
| 7 | + <view class="flex-center"> | ||
| 8 | + <image class="getgift" src="{{iurl+'miniapp/images/friendhelp/getgift.png'}}" lazy-load="true"></image> | ||
| 9 | + </view> | ||
| 10 | + <view class="flex-center fs32"> | ||
| 11 | + <view class="excitation">机会总是留给最有行动力的人</view> | ||
| 12 | + </view> | ||
| 13 | + <view class="flex-center"> | ||
| 14 | + <image class="gift" src="{{zl_act.imageUrl==''?iurl+'miniapp/images/friendhelp/gift.png':iurl+zl_act.imageUrl}}" lazy-load="true"></image> | ||
| 15 | + </view> | ||
| 16 | + <view class="flex-center fs26 time"> | ||
| 17 | + <view>活动时间:</view> | ||
| 18 | + <view>{{filter.fm_time(zl_act.beginDate)}}-{{filter.fm_time(zl_act.endDate)}} | ||
| 19 | + </view> | ||
| 20 | + </view> | ||
| 21 | + <view class="flex-center" bindtap="go_task"> | ||
| 22 | + <view class="flex-center take"> | ||
| 23 | + <view>立即领取</view> | ||
| 24 | + </view> | ||
| 25 | + </view> | ||
| 26 | + </view> | ||
| 27 | + | ||
| 28 | + <!-- 任务及说明栏 --> | ||
| 29 | + <view> | ||
| 30 | + <!-- 标题 --> | ||
| 31 | + <view class="flex-vertical-between fs28 padding head"> | ||
| 32 | + <!-- task --> | ||
| 33 | + <view class="flex-center lhead {{switch_head==0?'rhead':''}}" bindtap="switch_head" data-index="{{0}}"> | ||
| 34 | + <image class="explain" src="{{iurl+'miniapp/images/friendhelp/task.png'}}" lazy-load="true"></image> | ||
| 35 | + <view>我的任务</view> | ||
| 36 | + </view> | ||
| 37 | + <view class="flex-center lhead {{switch_head==1?'rhead':''}}" bindtap="switch_head" data-index="{{1}}"> | ||
| 38 | + <image class="explain" src="{{iurl+'miniapp/images/friendhelp/explain.png'}}" lazy-load="true"></image> | ||
| 39 | + <view>活动说明</view> | ||
| 40 | + </view> | ||
| 41 | + </view> | ||
| 42 | + | ||
| 43 | + <!-- 我的任务 --> | ||
| 44 | + <view wx:if="{{switch_head==0}}" class="white"> | ||
| 45 | + <view class="items"> | ||
| 46 | + <view class="item fs26 flex-vertical-between padding" wx:for="{{zl_user_list}}"> | ||
| 47 | + <view class="flex-center width"> | ||
| 48 | + <view class="ellipsis-1">{{item.help_taskname}}</view> | ||
| 49 | + </view> | ||
| 50 | + | ||
| 51 | + <!-- 已完成的颜色nostate --> | ||
| 52 | + <view class="flex-center width state" wx:if="{{item.is_acting==0}}"> | ||
| 53 | + <view class="ellipsis-1">领取礼包</view> | ||
| 54 | + </view> | ||
| 55 | + <view class="flex-center width state" wx:if="{{item.is_acting==1}}"> | ||
| 56 | + <view class="ellipsis-1">{{item.helped}}/{{item.help_num}}</view> | ||
| 57 | + </view> | ||
| 58 | + <view class="flex-center width state" wx:if="{{item.is_acting==2}}"> | ||
| 59 | + <view class="ellipsis-1">查看礼包</view> | ||
| 60 | + </view> | ||
| 61 | + | ||
| 62 | + | ||
| 63 | + </view> | ||
| 64 | + <!-- 加载更多 --> | ||
| 65 | + <block wx:if="{{is_load && zl_user_list.length!=0}}"> | ||
| 66 | + <view class="fs28 flex-center"> | ||
| 67 | + <view class="line"></view> | ||
| 68 | + <view class="load" bindtap="get_list">点击加载更多</view> | ||
| 69 | + <view class="line"></view> | ||
| 70 | + </view> | ||
| 71 | + </block> | ||
| 72 | + </view> | ||
| 73 | + | ||
| 74 | + | ||
| 75 | + <view class="fs30" style="margin-top: 30rpx;"> | ||
| 76 | + <view class="flex-center nothing" wx:if="{{is_load && zl_user_list.length==0}}"> | ||
| 77 | + <view>暂无任务记录</view> | ||
| 78 | + </view> | ||
| 79 | + <view class="flex-center receive"> | ||
| 80 | + <view class="flex-center"> | ||
| 81 | + <view>已有</view> | ||
| 82 | + <view>{{zl_act.countAll}}</view> | ||
| 83 | + <view>人领取了任务</view> | ||
| 84 | + </view> | ||
| 85 | + | ||
| 86 | + </view> | ||
| 87 | + </view> | ||
| 88 | + | ||
| 89 | + </view> | ||
| 90 | + <!-- 活动说明 --> | ||
| 91 | + <view wx:if="{{switch_head}}" class="white"> | ||
| 92 | + <view class="items"> | ||
| 93 | + <view class="content fs28 padding"> | ||
| 94 | + <!-- <view>{{zl_act.remark}}</view> --> | ||
| 95 | + <rich-text nodes="{{zl_act.remark}}"></rich-text> | ||
| 96 | + </view> | ||
| 97 | + </view> | ||
| 98 | + | ||
| 99 | + </view> | ||
| 100 | + | ||
| 101 | + </view> | ||
| 102 | + | ||
| 103 | + </view> | ||
| 104 | +</view> | ||
| 105 | +<!-- 制作一个圆球导航 --> | ||
| 106 | +<nav_b id="nav_b"></nav_b> | ||
| 0 | \ No newline at end of file | 107 | \ No newline at end of file |
pages/user/assistance/assistance.wxss
0 → 100644
| 1 | +page { | ||
| 2 | + background-color: rgb(208, 17, 25); | ||
| 3 | + width: 100%; | ||
| 4 | + height: 100%; | ||
| 5 | +} | ||
| 6 | + | ||
| 7 | +.lumi { | ||
| 8 | + position: absolute; | ||
| 9 | + z-index: 0; | ||
| 10 | + width: 100%; | ||
| 11 | + height: 1100rpx; | ||
| 12 | +} | ||
| 13 | + | ||
| 14 | +.zindex { | ||
| 15 | + position: absolute; | ||
| 16 | + z-index: 1; | ||
| 17 | + width: 100%; | ||
| 18 | +} | ||
| 19 | + | ||
| 20 | +.top { | ||
| 21 | + padding-bottom: 75rpx; | ||
| 22 | +} | ||
| 23 | + | ||
| 24 | +.getgift { | ||
| 25 | + width: 610rpx; | ||
| 26 | + height: 130rpx; | ||
| 27 | + padding-top: 70rpx; | ||
| 28 | +} | ||
| 29 | + | ||
| 30 | +.excitation { | ||
| 31 | + padding-top: 30rpx; | ||
| 32 | + color: rgb(255, 255, 255); | ||
| 33 | + padding-bottom: 50rpx; | ||
| 34 | +} | ||
| 35 | + | ||
| 36 | +.gift { | ||
| 37 | + width: 550rpx; | ||
| 38 | + height: 500rpx; | ||
| 39 | +} | ||
| 40 | + | ||
| 41 | +.time { | ||
| 42 | + color: rgb(255, 255, 255); | ||
| 43 | + margin-bottom: 55rpx; | ||
| 44 | + text-decoration: underline; | ||
| 45 | + margin-top: 10rpx; | ||
| 46 | +} | ||
| 47 | + | ||
| 48 | +.take { | ||
| 49 | + width: 440rpx; | ||
| 50 | + height: 77rpx; | ||
| 51 | + color: rgb(221, 45, 8); | ||
| 52 | + background-color: rgb(252, 210, 10); | ||
| 53 | + border-radius: 45rpx; | ||
| 54 | + font-weight: 900; | ||
| 55 | + line-height: 77rpx; | ||
| 56 | + box-shadow: 0rpx 7rpx 0rpx 0rpx rgb(245, 119, 6); | ||
| 57 | + font-size: 38rpx; | ||
| 58 | +} | ||
| 59 | + | ||
| 60 | +.head { | ||
| 61 | + border-bottom: 4rpx solid rgb(253, 193, 7); | ||
| 62 | + color: rgb(255, 255, 255); | ||
| 63 | + height: 50rpx; | ||
| 64 | + line-height: 50rpx; | ||
| 65 | +} | ||
| 66 | + | ||
| 67 | +.lhead { | ||
| 68 | + border-top: 4rpx solid rgb(253, 193, 7); | ||
| 69 | + border-left: 4rpx solid rgb(253, 193, 7); | ||
| 70 | + border-right: 4rpx solid rgb(253, 193, 7); | ||
| 71 | + width: 290rpx; | ||
| 72 | + height: 50rpx; | ||
| 73 | + line-height: 50rpx; | ||
| 74 | +} | ||
| 75 | + | ||
| 76 | +.rhead { | ||
| 77 | + background-color: rgb(253, 193, 7); | ||
| 78 | + border-bottom: 4rpx solid rgb(253, 193, 7); | ||
| 79 | +} | ||
| 80 | + | ||
| 81 | +.items { | ||
| 82 | + padding-top: 50rpx; | ||
| 83 | +} | ||
| 84 | + | ||
| 85 | +.explain { | ||
| 86 | + width: 30rpx; | ||
| 87 | + height: 30rpx; | ||
| 88 | + margin-right: 10rpx; | ||
| 89 | +} | ||
| 90 | + | ||
| 91 | +.padding { | ||
| 92 | + padding: 0rpx 50rpx; | ||
| 93 | +} | ||
| 94 | + | ||
| 95 | +.content { | ||
| 96 | + padding-bottom: 35rpx; | ||
| 97 | +} | ||
| 98 | + | ||
| 99 | +.width { | ||
| 100 | + width: 290rpx; | ||
| 101 | +} | ||
| 102 | + | ||
| 103 | +.line { | ||
| 104 | + width: 110rpx; | ||
| 105 | + border-top: 2rpx solid rgb(255, 255, 255); | ||
| 106 | +} | ||
| 107 | + | ||
| 108 | +.loads { | ||
| 109 | + margin-bottom: 35rpx; | ||
| 110 | +} | ||
| 111 | + | ||
| 112 | +.load { | ||
| 113 | + margin: 0rpx 26rpx; | ||
| 114 | +} | ||
| 115 | + | ||
| 116 | +.item { | ||
| 117 | + margin-bottom: 35rpx; | ||
| 118 | +} | ||
| 119 | + | ||
| 120 | +.state { | ||
| 121 | + text-decoration: underline; | ||
| 122 | +} | ||
| 123 | +.nostate{ | ||
| 124 | + color: rgb(195,155,156); | ||
| 125 | +} | ||
| 126 | +.nothing { | ||
| 127 | + padding: 50rpx 0rpx; | ||
| 128 | +} | ||
| 129 | + | ||
| 130 | +.receive { | ||
| 131 | + padding-bottom: 50rpx; | ||
| 132 | +} |
pages/user/assistance/assistance_success.js
0 → 100644
| 1 | +var auth = require("../../../utils/auth.js"), rq = require("../../../utils/request.js"); | ||
| 2 | +var e = getApp(), app = e, s = e.globalData.setting, os = s, app_d = e.globalData; | ||
| 3 | +var regeneratorRuntime = require('../../../utils/runtime.js'); | ||
| 4 | +Page({ | ||
| 5 | + | ||
| 6 | + /** | ||
| 7 | + * 页面的初始数据 | ||
| 8 | + */ | ||
| 9 | + data: { | ||
| 10 | + iurl: s.imghost, | ||
| 11 | + }, | ||
| 12 | + | ||
| 13 | + /** | ||
| 14 | + * 生命周期函数--监听页面加载 | ||
| 15 | + */ | ||
| 16 | + onLoad: function (options) { | ||
| 17 | + | ||
| 18 | + }, | ||
| 19 | + | ||
| 20 | + /** | ||
| 21 | + * 生命周期函数--监听页面初次渲染完成 | ||
| 22 | + */ | ||
| 23 | + onReady: function () { | ||
| 24 | + | ||
| 25 | + }, | ||
| 26 | + | ||
| 27 | + /** | ||
| 28 | + * 生命周期函数--监听页面显示 | ||
| 29 | + */ | ||
| 30 | + onShow: function () { | ||
| 31 | + | ||
| 32 | + }, | ||
| 33 | + | ||
| 34 | + | ||
| 35 | + // 初始化判断微信余额 | ||
| 36 | + async weixin() { | ||
| 37 | + var user_id = getApp().globalData.user_id; | ||
| 38 | + var store_id = os.stoid; | ||
| 39 | + await getApp().request.promiseGet("/api/weshop/marketing/help/act/judge", { | ||
| 40 | + data: { | ||
| 41 | + user_id: user_id, | ||
| 42 | + store_id: store_id | ||
| 43 | + } | ||
| 44 | + }).then(res => { | ||
| 45 | + console.log("是什么东西", res.data.code); | ||
| 46 | + | ||
| 47 | + }) | ||
| 48 | + | ||
| 49 | + }, | ||
| 50 | + | ||
| 51 | + /** | ||
| 52 | + * 生命周期函数--监听页面隐藏 | ||
| 53 | + */ | ||
| 54 | + onHide: function () { | ||
| 55 | + | ||
| 56 | + }, | ||
| 57 | + | ||
| 58 | + /** | ||
| 59 | + * 生命周期函数--监听页面卸载 | ||
| 60 | + */ | ||
| 61 | + onUnload: function () { | ||
| 62 | + | ||
| 63 | + }, | ||
| 64 | + | ||
| 65 | + /** | ||
| 66 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
| 67 | + */ | ||
| 68 | + onPullDownRefresh: function () { | ||
| 69 | + | ||
| 70 | + }, | ||
| 71 | + | ||
| 72 | + /** | ||
| 73 | + * 页面上拉触底事件的处理函数 | ||
| 74 | + */ | ||
| 75 | + onReachBottom: function () { | ||
| 76 | + | ||
| 77 | + }, | ||
| 78 | + | ||
| 79 | + /** | ||
| 80 | + * 用户点击右上角分享 | ||
| 81 | + */ | ||
| 82 | + onShareAppMessage: function () { | ||
| 83 | + | ||
| 84 | + } | ||
| 85 | +}) | ||
| 0 | \ No newline at end of file | 86 | \ No newline at end of file |
pages/user/assistance/assistance_success.json
0 → 100644
pages/user/assistance/assistance_success.wxml
0 → 100644
| 1 | + | ||
| 2 | +<view class="top-back" style="background-image: url({{iurl}}/miniapp/images/friendhelp/lumi.png)"> | ||
| 3 | + <view class="flex-vertical user_assis"> | ||
| 4 | + <image class="circle user_img" src="https://mshopimg.yolipai.net/public/upload/qyimg/temp/2019/08-14/0697f7277936a3b116a6ebc4f8f5e39a.png"></image> | ||
| 5 | + <view class="user_name white fs28 ellipsis-1">你好</view> | ||
| 6 | + </view> | ||
| 7 | + <view class="caption_title white fs32 t-c"> | ||
| 8 | + 助力成功,自己也差拆一个吧~ | ||
| 9 | + </view> | ||
| 10 | + <!-- 礼包图片 --> | ||
| 11 | +<view class="t-c"> | ||
| 12 | +<image class="assis_liba" src="{{iurl}}/miniapp/images/friendhelp/libao_asiss.png"> | ||
| 13 | +</image> | ||
| 14 | +</view> | ||
| 15 | + <view class="flex jc-center"> | ||
| 16 | + <view class="activity_time fs24 white"> | ||
| 17 | + 活动时间:5月23日-6月15日 | ||
| 18 | + </view> | ||
| 19 | + </view> | ||
| 20 | +</view> | ||
| 21 | +<view class="cklie_button t-c flex-center" bindtap="cklie_button">我也要参加</view> | ||
| 22 | +<view class="fs26 white t-c">已有126人领取礼盒</view> | ||
| 23 | +<!-- 礼盒弹框 --> | ||
| 24 | +<!-- <view class="cover-layer" wx:if='{{is_show!=0}}' bindtap="clike_none"></view> | ||
| 25 | +<view class="libao_frame t-c" wx:if='{{is_show!=0}}'> | ||
| 26 | + <view class="layer-img" style="background-image: url({{iurl}}/miniapp/images/friendhelp/success.png)"> | ||
| 27 | + <view class="button-img t-c fs28 flex-center" style="background-image: url({{iurl}}/miniapp/images/friendhelp/participate.png)"> | ||
| 28 | + 我也要参加 | ||
| 29 | + </view> | ||
| 30 | + <view class=" fs24 success white t-c">已成功帮你的小伙伴助力!</view> | ||
| 31 | + </view> | ||
| 32 | + <view class="link_div"> | ||
| 33 | +</view> | ||
| 34 | +<image class="close-none"bindtap="clike_none" src="{{iurl}}/miniapp/images/plus/Close.png"></image> | ||
| 35 | +</view> --> | ||
| 36 | +<!-- 引入提示组件 --> | ||
| 37 | +<warn id="warn"></warn> | ||
| 38 | +<!-- 制作一个圆球导航 --> | ||
| 39 | +<nav_b id="nav_b"></nav_b> | ||
| 0 | \ No newline at end of file | 40 | \ No newline at end of file |
pages/user/assistance/assistance_success.wxss
0 → 100644
| 1 | +page{ | ||
| 2 | + background: #d01119; | ||
| 3 | + width: 100%; | ||
| 4 | + height: 100% | ||
| 5 | + | ||
| 6 | +} | ||
| 7 | +.top-back{ | ||
| 8 | + width: 100%; | ||
| 9 | + height: 60%; | ||
| 10 | + background-repead:no-repead; | ||
| 11 | + background-size:100% 100%; | ||
| 12 | + | ||
| 13 | +} | ||
| 14 | +.user_img{ | ||
| 15 | + width: 70rpx; | ||
| 16 | + height: 70rpx; | ||
| 17 | + margin-right: 15rpx; | ||
| 18 | + | ||
| 19 | +} | ||
| 20 | +.user_assis{ | ||
| 21 | + width: 85%; | ||
| 22 | + margin: auto; | ||
| 23 | + padding-top: 50rpx; | ||
| 24 | +} | ||
| 25 | +.caption_title{ | ||
| 26 | + margin-top: 60rpx; | ||
| 27 | + margin-bottom: 30rpx; | ||
| 28 | +} | ||
| 29 | +.assis_liba{ | ||
| 30 | + width: 50%; | ||
| 31 | + margin: auto; | ||
| 32 | + height: 340rpx; | ||
| 33 | + | ||
| 34 | +} | ||
| 35 | +.activity_time{ | ||
| 36 | + border-bottom: 1rpx solid #fff; | ||
| 37 | + margin: auto; | ||
| 38 | + display: inline; | ||
| 39 | +} | ||
| 40 | +.cklie_button{ | ||
| 41 | + margin: auto; | ||
| 42 | + width: 60%; | ||
| 43 | + height: 80rpx; | ||
| 44 | + border-radius: 50rpx; | ||
| 45 | + margin-top: 20rpx; | ||
| 46 | + background: #fbda0e; | ||
| 47 | + color:#d01119; | ||
| 48 | + line-height: 80rpx; | ||
| 49 | + letter-spacing: 5rpx; | ||
| 50 | + box-shadow: 0rpx 7rpx 0rpx 0rpx rgb(245, 119, 6); | ||
| 51 | + font-size: 44rpx; | ||
| 52 | + margin-bottom: 40rpx; | ||
| 53 | +} | ||
| 54 | +.con_div{ | ||
| 55 | +z-index: 15; | ||
| 56 | +position: fixed; | ||
| 57 | +top: 0; | ||
| 58 | +left: 0; | ||
| 59 | +height: 100%; | ||
| 60 | +width: 100%; | ||
| 61 | +} | ||
| 0 | \ No newline at end of file | 62 | \ No newline at end of file |
pages/user/assistance/c_filter.wxs
0 → 100644
| 1 | +var filters = { | ||
| 2 | + toFix:function(val,count){ | ||
| 3 | + return val.toFixed(count) | ||
| 4 | + }, | ||
| 5 | + fm_time:function(ts) { | ||
| 6 | + var d = getDate(ts*1000) | ||
| 7 | + var fm=(d.getMonth()+1)+"月"+ d.getDate()+"日"; | ||
| 8 | + return fm; | ||
| 9 | + }, | ||
| 10 | + | ||
| 11 | +} | ||
| 12 | + | ||
| 13 | +module.exports = { | ||
| 14 | + toFix: filters.toFix, | ||
| 15 | + fm_time:filters.fm_time, | ||
| 16 | +} | ||
| 0 | \ No newline at end of file | 17 | \ No newline at end of file |
pages/user/assistance/friend_assistance.js
0 → 100644
| 1 | +var auth = require("../../../utils/auth.js"), rq = require("../../../utils/request.js"); | ||
| 2 | +var e = getApp(), app = e, s = e.globalData.setting, os = s, app_d = e.globalData; | ||
| 3 | +var regeneratorRuntime = require('../../../utils/runtime.js'); | ||
| 4 | +Page({ | ||
| 5 | + | ||
| 6 | + /** | ||
| 7 | + * 页面的初始数据 | ||
| 8 | + */ | ||
| 9 | + data: { | ||
| 10 | + iurl: s.imghost, | ||
| 11 | + is_show:0,//显示弹框 | ||
| 12 | + }, | ||
| 13 | + | ||
| 14 | + /** | ||
| 15 | + * 生命周期函数--监听页面加载 | ||
| 16 | + */ | ||
| 17 | + onLoad: function (options) { | ||
| 18 | + | ||
| 19 | + }, | ||
| 20 | + | ||
| 21 | + | ||
| 22 | + // 跳转到助力成功页 | ||
| 23 | + participate_activity:function(){ | ||
| 24 | + wx.navigateTo({ | ||
| 25 | + url: '/pages/user/assistance/assistance_success', | ||
| 26 | + }) | ||
| 27 | + }, | ||
| 28 | + /** | ||
| 29 | + * 生命周期函数--监听页面初次渲染完成 | ||
| 30 | + */ | ||
| 31 | + onReady: function () { | ||
| 32 | + | ||
| 33 | + }, | ||
| 34 | + | ||
| 35 | + /** | ||
| 36 | + * 生命周期函数--监听页面显示 | ||
| 37 | + */ | ||
| 38 | + onShow: function () { | ||
| 39 | + | ||
| 40 | + }, | ||
| 41 | + //点击开启礼盒 | ||
| 42 | + cklie_button:function(){ | ||
| 43 | + this.setData({ is_show:1}); | ||
| 44 | + }, | ||
| 45 | + //点击关闭礼盒 | ||
| 46 | + clike_none:function(){ | ||
| 47 | + this.setData({ is_show:0}); | ||
| 48 | + }, | ||
| 49 | + //导航球 | ||
| 50 | + close: function () { | ||
| 51 | + var th = this; | ||
| 52 | + var nav_b = th.selectComponent("#nav_b"); //组件的id | ||
| 53 | + nav_b.close_box(); | ||
| 54 | + nav_b.set_name("助力", ""); | ||
| 55 | + }, | ||
| 56 | + /** | ||
| 57 | + * 生命周期函数--监听页面隐藏 | ||
| 58 | + */ | ||
| 59 | + onHide: function () { | ||
| 60 | + | ||
| 61 | + }, | ||
| 62 | + | ||
| 63 | + /** | ||
| 64 | + * 生命周期函数--监听页面卸载 | ||
| 65 | + */ | ||
| 66 | + onUnload: function () { | ||
| 67 | + | ||
| 68 | + }, | ||
| 69 | + | ||
| 70 | + /** | ||
| 71 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
| 72 | + */ | ||
| 73 | + onPullDownRefresh: function () { | ||
| 74 | + | ||
| 75 | + }, | ||
| 76 | + | ||
| 77 | + /** | ||
| 78 | + * 页面上拉触底事件的处理函数 | ||
| 79 | + */ | ||
| 80 | + onReachBottom: function () { | ||
| 81 | + | ||
| 82 | + }, | ||
| 83 | + | ||
| 84 | + /** | ||
| 85 | + * 用户点击右上角分享 | ||
| 86 | + */ | ||
| 87 | + onShareAppMessage: function () { | ||
| 88 | + | ||
| 89 | + } | ||
| 90 | +}) | ||
| 0 | \ No newline at end of file | 91 | \ No newline at end of file |
pages/user/assistance/friend_assistance.json
0 → 100644
pages/user/assistance/friend_assistance.wxml
0 → 100644
| 1 | +<view class="top-back" style="background-image: url({{iurl}}/miniapp/images/friendhelp/lumi.png)"> | ||
| 2 | + <view class="flex-vertical user_assis"> | ||
| 3 | + <image class="circle user_img" src="https://mshopimg.yolipai.net/public/upload/qyimg/temp/2019/08-14/0697f7277936a3b116a6ebc4f8f5e39a.png"></image> | ||
| 4 | + <view class="user_name white fs28 ellipsis-1">你好</view> | ||
| 5 | + </view> | ||
| 6 | + <view class="caption_title white fs32 t-c"> | ||
| 7 | + 拜托拜托,帮我拆礼盒得好礼~ | ||
| 8 | + </view> | ||
| 9 | + <!-- 礼包图片 --> | ||
| 10 | +<view class="t-c"> | ||
| 11 | +<image class="assis_liba" src="../../../images/frinedhelp/libao_asiss.png"> | ||
| 12 | +</image> | ||
| 13 | +</view> | ||
| 14 | + <view class="flex jc-center"> | ||
| 15 | + <view class="activity_time fs24 white"> | ||
| 16 | + 活动时间:5月23日-6月15日 | ||
| 17 | + </view> | ||
| 18 | + </view> | ||
| 19 | +</view> | ||
| 20 | +<view class="cklie_button t-c flex-center" bindtap="cklie_button">帮他拆礼盒</view> | ||
| 21 | +<view class="fs26 white t-c">已有126人领取礼盒</view> | ||
| 22 | +<!-- 礼盒弹框 --> | ||
| 23 | +<view class="cover-layer" wx:if='{{is_show!=0}}' bindtap="clike_none"></view> | ||
| 24 | +<view class="libao_frame t-c" wx:if='{{is_show!=0}}'> | ||
| 25 | + <view class="layer-img" style="background-image: url({{iurl}}/miniapp/images/friendhelp/success.png)"> | ||
| 26 | + <view class="button-img t-c fs28 flex-center" style="background-image: url({{iurl}}/miniapp/images/friendhelp/participate.png)"bindtap="participate_activity" > | ||
| 27 | + 我也要参加 | ||
| 28 | + </view> | ||
| 29 | + <view class=" fs24 success white t-c">已成功帮你的小伙伴助力!</view> | ||
| 30 | + </view> | ||
| 31 | + <view class="link_div"> | ||
| 32 | +</view> | ||
| 33 | +<image class="close-none"bindtap="clike_none" src="{{iurl}}/miniapp/images/plus/Close.png"></image> | ||
| 34 | +</view> | ||
| 35 | +<!-- 引入提示组件 --> | ||
| 36 | +<warn id="warn"></warn> | ||
| 37 | +<!-- 制作一个圆球导航 --> | ||
| 38 | +<nav_b id="nav_b"></nav_b> | ||
| 0 | \ No newline at end of file | 39 | \ No newline at end of file |
pages/user/assistance/friend_assistance.wxss
0 → 100644
| 1 | +page{ | ||
| 2 | + background: #d01119; | ||
| 3 | + width: 100%; | ||
| 4 | + height: 100% | ||
| 5 | + | ||
| 6 | +} | ||
| 7 | +.top-back{ | ||
| 8 | + width: 100%; | ||
| 9 | + height: 60%; | ||
| 10 | + background-repead:no-repead; | ||
| 11 | + background-size:100% 100%; | ||
| 12 | + | ||
| 13 | +} | ||
| 14 | +.user_img{ | ||
| 15 | + width: 70rpx; | ||
| 16 | + height: 70rpx; | ||
| 17 | + margin-right: 15rpx; | ||
| 18 | + | ||
| 19 | +} | ||
| 20 | +.user_assis{ | ||
| 21 | + width: 85%; | ||
| 22 | + margin: auto; | ||
| 23 | + padding-top: 50rpx; | ||
| 24 | +} | ||
| 25 | +.caption_title{ | ||
| 26 | + margin-top: 60rpx; | ||
| 27 | + margin-bottom: 30rpx; | ||
| 28 | +} | ||
| 29 | +.assis_liba{ | ||
| 30 | + width: 50%; | ||
| 31 | + margin: auto; | ||
| 32 | + height: 340rpx; | ||
| 33 | + | ||
| 34 | +} | ||
| 35 | +.activity_time{ | ||
| 36 | + border-bottom: 1rpx solid #fff; | ||
| 37 | + margin: auto; | ||
| 38 | + display: inline; | ||
| 39 | +} | ||
| 40 | +.cklie_button{ | ||
| 41 | + margin: auto; | ||
| 42 | + width: 60%; | ||
| 43 | + height: 80rpx; | ||
| 44 | + border-radius: 50rpx; | ||
| 45 | + margin-top: 20rpx; | ||
| 46 | + background: #fbda0e; | ||
| 47 | + color:#d01119; | ||
| 48 | + line-height: 80rpx; | ||
| 49 | + letter-spacing: 5rpx; | ||
| 50 | + box-shadow: 0rpx 7rpx 0rpx 0rpx rgb(245, 119, 6); | ||
| 51 | + font-size: 44rpx; | ||
| 52 | + margin-bottom: 40rpx; | ||
| 53 | +} | ||
| 54 | +.con_div{ | ||
| 55 | +z-index: 15; | ||
| 56 | +position: fixed; | ||
| 57 | +top: 0; | ||
| 58 | +left: 0; | ||
| 59 | +height: 100%; | ||
| 60 | +width: 100%; | ||
| 61 | +} | ||
| 62 | +.layer-img{ | ||
| 63 | + width: 100%; | ||
| 64 | + height: 515rpx; | ||
| 65 | + background-repead:no-repead; | ||
| 66 | + background-size:100% 100%; | ||
| 67 | +} | ||
| 68 | +.libao_frame{ | ||
| 69 | +z-index: 15; | ||
| 70 | +position: fixed; | ||
| 71 | +width: 70%; | ||
| 72 | +top: 37.5%; | ||
| 73 | +left: 50%; | ||
| 74 | +transform: translate(-50%, -50%); | ||
| 75 | +height: auto; | ||
| 76 | + | ||
| 77 | +} | ||
| 78 | +.button-img{ | ||
| 79 | + width: 60%; | ||
| 80 | + margin: auto; | ||
| 81 | + color: #d01119; | ||
| 82 | + height: 75rpx; | ||
| 83 | + line-height: 72rpx; | ||
| 84 | + background-repead:no-repead; | ||
| 85 | + background-size:100% 100%; | ||
| 86 | + position: absolute; | ||
| 87 | + left: 19%; | ||
| 88 | + bottom: 43%; | ||
| 89 | +} | ||
| 90 | +.success{ | ||
| 91 | + position: absolute; | ||
| 92 | + left: 23%; | ||
| 93 | + bottom: 36%; | ||
| 94 | +} | ||
| 95 | +.link_div{ | ||
| 96 | + width: 3rpx; | ||
| 97 | + height: 125rpx; | ||
| 98 | + background: #fff; | ||
| 99 | + margin: auto; | ||
| 100 | + | ||
| 101 | +} | ||
| 102 | +.close-none{ | ||
| 103 | +width: 70rpx; | ||
| 104 | +height: 70rpx; | ||
| 105 | + | ||
| 106 | +} | ||
| 107 | + |
pages/user/assistance/task_assistance.js
0 → 100644
| 1 | +var auth = require("../../../utils/auth.js"), rq = require("../../../utils/request.js"); | ||
| 2 | +var e = getApp(), app = e, i = require("../../../utils/util.js"), | ||
| 3 | + ut = i,s = e.globalData.setting, os = s, app_d = e.globalData; | ||
| 4 | +var regeneratorRuntime = require('../../../utils/runtime.js'); | ||
| 5 | +Page({ | ||
| 6 | + | ||
| 7 | + /** | ||
| 8 | + * 页面的初始数据 | ||
| 9 | + */ | ||
| 10 | + data: { | ||
| 11 | + sw_index: 0,//轮播的下标控制 | ||
| 12 | + iurl: s.imghost, | ||
| 13 | + is_task:0,//判断标题名是任务1还是2 | ||
| 14 | + activity_data:"25:20:59",//活动剩余时间 | ||
| 15 | + task_number:12,//任务数 | ||
| 16 | + is_task:0,//历史记录与任务 | ||
| 17 | + aitem:"",//活动的轮播图 | ||
| 18 | + switch_head: 0, //0:我的任务,1:记录 | ||
| 19 | + }, | ||
| 20 | + | ||
| 21 | + /** | ||
| 22 | + * 生命周期函数--监听页面加载 | ||
| 23 | + */ | ||
| 24 | + onLoad: function (options) { | ||
| 25 | + var help_id=options.help_id; | ||
| 26 | + console.log("是什么鬼",help_id); | ||
| 27 | + var th=this; | ||
| 28 | + th.close(); | ||
| 29 | + }, | ||
| 30 | + // 轮播图点击左边 | ||
| 31 | + click_pre:function(){ | ||
| 32 | + var index = this.data.sw_index; | ||
| 33 | + index--; | ||
| 34 | + if (index < 0) return; | ||
| 35 | + this.setData({ sw_index: index }) | ||
| 36 | + | ||
| 37 | + }, | ||
| 38 | + //轮播图点击右边 | ||
| 39 | + click_next:function(){ | ||
| 40 | + var index = this.data.sw_index; | ||
| 41 | + index++; | ||
| 42 | + if (index >= this.data.aitem.length) return; | ||
| 43 | + this.setData({ sw_index: index }) | ||
| 44 | + | ||
| 45 | + }, | ||
| 46 | + //任务领取 | ||
| 47 | + onlicke:function(){ | ||
| 48 | + var th=this; | ||
| 49 | + getApp().my_warnning("任务领取成功", 1, th); | ||
| 50 | + }, | ||
| 51 | + | ||
| 52 | +//我的任务和帮拆记录的替换 | ||
| 53 | + switch_head: function (e) { | ||
| 54 | + var th = this; | ||
| 55 | + var index = e.currentTarget.dataset.index;//获取当前选择的是任务还是活动说明 | ||
| 56 | + var switch_head = th.data.switch_head;//0任务,1活动说明 | ||
| 57 | + if (index != switch_head) { | ||
| 58 | + th.setData({ | ||
| 59 | + switch_head: index, | ||
| 60 | + is_task: index | ||
| 61 | + }) | ||
| 62 | + } | ||
| 63 | + }, | ||
| 64 | + //划动的时候监听 | ||
| 65 | + onSli:function(e){ | ||
| 66 | + | ||
| 67 | + var ind=e.detail.current ; | ||
| 68 | + this.setData({ | ||
| 69 | + sw_index:ind | ||
| 70 | + }) | ||
| 71 | + }, | ||
| 72 | + //导航球 | ||
| 73 | + close: function () { | ||
| 74 | + var th = this; | ||
| 75 | + var nav_b = th.selectComponent("#nav_b"); //组件的id | ||
| 76 | + nav_b.close_box(); | ||
| 77 | + nav_b.set_name("助力", ""); | ||
| 78 | + }, | ||
| 79 | + | ||
| 80 | + /** | ||
| 81 | + * 生命周期函数--监听页面初次渲染完成 | ||
| 82 | + */ | ||
| 83 | + onReady: function () { | ||
| 84 | + | ||
| 85 | + }, | ||
| 86 | + | ||
| 87 | + /** | ||
| 88 | + * 生命周期函数--监听页面显示 | ||
| 89 | + */ | ||
| 90 | + onShow: function () { | ||
| 91 | + var th=this; | ||
| 92 | + /*-----统计-----*/ | ||
| 93 | + rq.get("/api/weshop/zl_task", { | ||
| 94 | + data: { user_id: app_d.user_id, | ||
| 95 | + strod_id:os.stoid | ||
| 96 | + }, | ||
| 97 | + success: function (su) { | ||
| 98 | + | ||
| 99 | + var data=su.data; | ||
| 100 | + console.log('waitlist5555555555' + data.code); | ||
| 101 | + if (data.code!=0){ | ||
| 102 | + getApp().my_warnning(data.msg,0, th); | ||
| 103 | + return false; | ||
| 104 | + } | ||
| 105 | + if (data.code==0){ | ||
| 106 | + //轮播图的数据 | ||
| 107 | + var data_aissa=data.data.pageData; | ||
| 108 | + //当前时间戳 | ||
| 109 | + var nt = ut.gettimestamp(); | ||
| 110 | + | ||
| 111 | + data_aissa.forEach(function (val, ind) { | ||
| 112 | + console.log(nt, "当前时间","结束时间", val.end_time,"开始时间"); | ||
| 113 | + //已开始 | ||
| 114 | + if (val.start_time < nt && val.end_time > nt) data_aissa[ind].status = 0; | ||
| 115 | + //未开始 | ||
| 116 | + else if (val.start_time > nt && val.end_time > nt) data_aissa[ind].status = 1; | ||
| 117 | + //已结束 | ||
| 118 | + | ||
| 119 | + else if (val.start_time < nt && val.end_time < nt) data_aissa[ind].status = 2; | ||
| 120 | + | ||
| 121 | + }); | ||
| 122 | + | ||
| 123 | + console.log("是什么东西2222222222",data_aissa); | ||
| 124 | + | ||
| 125 | + th.setData({ aitem:data_aissa}); | ||
| 126 | + | ||
| 127 | + | ||
| 128 | + } | ||
| 129 | + | ||
| 130 | + } | ||
| 131 | + }) | ||
| 132 | + | ||
| 133 | + }, | ||
| 134 | + //----助力任务----- | ||
| 135 | + countDown() { | ||
| 136 | + if (!this.data.is_timer) return false; | ||
| 137 | + var th = this; | ||
| 138 | + // 获取当前时间,同时得到活动结束时间数组 | ||
| 139 | + var newTime = ut.gettimestamp(); | ||
| 140 | + var List = this.data.aitem; | ||
| 141 | + for (var j = 0; j < List.length; j++) { | ||
| 142 | + var endTimeList = List[j]; | ||
| 143 | + // 对结束时间进行处理渲染到页面 | ||
| 144 | + for (var i = 0; i < endTimeList.length; i++) { | ||
| 145 | + var o = endTimeList[i]; | ||
| 146 | + var endTime = o.end_time | ||
| 147 | + if (o.status == 0) endTime = o.start_time | ||
| 148 | + | ||
| 149 | + var obj = null; | ||
| 150 | + // 如果活动未结束,对时间进行处理 | ||
| 151 | + if (endTime - newTime > 0) { | ||
| 152 | + var time = (endTime - newTime); | ||
| 153 | + // 获取天、时、分、秒 | ||
| 154 | + var day = parseInt(time / (60 * 60 * 24)); | ||
| 155 | + var hou = parseInt(time % (60 * 60 * 24) / 3600); | ||
| 156 | + var min = parseInt(time % (60 * 60 * 24) % 3600 / 60); | ||
| 157 | + var sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); | ||
| 158 | + obj = { | ||
| 159 | + day: this.timeFormat(day), | ||
| 160 | + hou: this.timeFormat(hou), | ||
| 161 | + min: this.timeFormat(min), | ||
| 162 | + sec: this.timeFormat(sec) | ||
| 163 | + } | ||
| 164 | + } else { | ||
| 165 | + //活动已结束,全部设置为'00' | ||
| 166 | + obj = { | ||
| 167 | + day: '00', | ||
| 168 | + hou: '00', | ||
| 169 | + min: '00', | ||
| 170 | + sec: '00' | ||
| 171 | + } | ||
| 172 | + } | ||
| 173 | + var txt = "aitem[" + j + "][" + i + "].djs"; | ||
| 174 | + th.setData({ | ||
| 175 | + [txt]: obj | ||
| 176 | + }); | ||
| 177 | + } | ||
| 178 | + | ||
| 179 | + } | ||
| 180 | + setTimeout(th.countDown, 1000); | ||
| 181 | + | ||
| 182 | + }, | ||
| 183 | + | ||
| 184 | + /** | ||
| 185 | + * 生命周期函数--监听页面隐藏 | ||
| 186 | + */ | ||
| 187 | + onHide: function () { | ||
| 188 | + | ||
| 189 | + }, | ||
| 190 | + | ||
| 191 | + /** | ||
| 192 | + * 生命周期函数--监听页面卸载 | ||
| 193 | + */ | ||
| 194 | + onUnload: function () { | ||
| 195 | + | ||
| 196 | + }, | ||
| 197 | + | ||
| 198 | + /** | ||
| 199 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
| 200 | + */ | ||
| 201 | + onPullDownRefresh: function () { | ||
| 202 | + | ||
| 203 | + }, | ||
| 204 | + | ||
| 205 | + /** | ||
| 206 | + * 页面上拉触底事件的处理函数 | ||
| 207 | + */ | ||
| 208 | + onReachBottom: function () { | ||
| 209 | + | ||
| 210 | + }, | ||
| 211 | + | ||
| 212 | + /** | ||
| 213 | + * 用户点击右上角分享 | ||
| 214 | + */ | ||
| 215 | + onShareAppMessage: function () { | ||
| 216 | + | ||
| 217 | + } | ||
| 218 | +}) | ||
| 0 | \ No newline at end of file | 219 | \ No newline at end of file |
pages/user/assistance/task_assistance.json
0 → 100644
| 1 | +{ | ||
| 2 | + "navigationBarTitleText": "好友助力", | ||
| 3 | + "navigationStyle": "custom", | ||
| 4 | + "usingComponents": { | ||
| 5 | + "warn": "/components/long_warn/long_warn", | ||
| 6 | + "my_confirm": "/components/my_confirm/my_confirm", | ||
| 7 | + "nav_b": "/components/nav_b/nav_b" | ||
| 8 | + } | ||
| 9 | +} | ||
| 0 | \ No newline at end of file | 10 | \ No newline at end of file |
pages/user/assistance/task_assistance.wxml
0 → 100644
| 1 | +<view class="top-back" style="background-image: url({{iurl}}/miniapp/images/friendhelp/lumi.png)"> | ||
| 2 | + <!-- 助力活动头部 --> | ||
| 3 | + <view class="top-frame"> | ||
| 4 | + <view class="top-title white fs36 t-c"> | ||
| 5 | + {{aitem[sw_index].tite_name}} | ||
| 6 | + </view> | ||
| 7 | + <view class="activity-data t-c fs28 white"> | ||
| 8 | + 活动剩余时间: {{activity_data}} | ||
| 9 | + </view> | ||
| 10 | + </view> | ||
| 11 | + <!-- 图片的轮播图 --> | ||
| 12 | + <view class="xc-specific-more-frame flex-center"> | ||
| 13 | + <view bindtap="click_pre"> | ||
| 14 | + <view class="bg_left xc-left bcolor"></view> | ||
| 15 | + </view> | ||
| 16 | + <swiper current="{{sw_index}}" style='width:82.7%; height:100%' | ||
| 17 | + bindchange='onSli' | ||
| 18 | + indicator-dots="{{false}}" autoplay="{{false}}" > | ||
| 19 | + | ||
| 20 | + <swiper-item wx:for="{{aitem}}" wx:for-item="aitem" wx:for-index="pidx"> | ||
| 21 | + | ||
| 22 | + <image class="xc-center-img "src="{{aitem.PrivilegeICOUrl}}"></image> | ||
| 23 | + | ||
| 24 | + </swiper-item> | ||
| 25 | + | ||
| 26 | + </swiper> | ||
| 27 | + | ||
| 28 | + <view bindtap="click_next"> | ||
| 29 | + <view class="bg_right xc-right bcolor mt" ></view> | ||
| 30 | + </view> | ||
| 31 | + </view> | ||
| 32 | + | ||
| 33 | + <view class="task-number fs28 white t-c "> | ||
| 34 | + 今天剩余可领{{task_number}}个任务 | ||
| 35 | + </view> | ||
| 36 | + <view class="task_clike fs40 t-c flex-center" bindtap="onlicke"> | ||
| 37 | + 就选它了 | ||
| 38 | + </view> | ||
| 39 | +</view> | ||
| 40 | +<!-- 底部列表 --> | ||
| 41 | + <view> | ||
| 42 | + <!-- 标题 --> | ||
| 43 | + | ||
| 44 | + <view class="flex-vertical-between fs28 padding head"> | ||
| 45 | + <view class="flex-center lhead {{switch_head==0?'rhead':''}}" bindtap="switch_head"data-index="0"> | ||
| 46 | + <image class="unfinished" src="{{iurl}}miniapp/images/friendhelp/task.png" lazy-load="true"></image> | ||
| 47 | + <view >我的任务</view> | ||
| 48 | + </view> | ||
| 49 | + <view class="flex-center lhead {{switch_head==1?'rhead':''}}" bindtap="switch_head" data-index='1'> | ||
| 50 | + <image class="unfinished" style="margin-top: 5rpx;" src="{{iurl}}miniapp/images/friendhelp/edit.png" lazy-load="true"></image> | ||
| 51 | + <view>帮拆记录</view> | ||
| 52 | + </view> | ||
| 53 | + </view> | ||
| 54 | + | ||
| 55 | + <view class="white"> | ||
| 56 | + <view class="items" wx:if="{{is_task==0}}"> | ||
| 57 | + <view class="item fs26 flex-vertical-between padding" wx:for="{{5}}"> | ||
| 58 | + <view class="flex-center width"> | ||
| 59 | + <view class="ellipsis-1">豪华任务一 | ||
| 60 | + </view> | ||
| 61 | + </view> | ||
| 62 | + | ||
| 63 | + <view class="flex-center width state"> | ||
| 64 | + <view class="ellipsis-1">进行中 | ||
| 65 | + </view> | ||
| 66 | + </view> | ||
| 67 | + | ||
| 68 | + </view> | ||
| 69 | + </view> | ||
| 70 | + </view> | ||
| 71 | + | ||
| 72 | + | ||
| 73 | + <view class="items" wx:if="{{is_task==1}}"> | ||
| 74 | + | ||
| 75 | + | ||
| 76 | + <view class="item fs26 flex flex-vertical-between padding" wx:for="{{5}}"> | ||
| 77 | + <view class="flex white"style="justify-content: space-around; width: 90%;margin:auto"> | ||
| 78 | + <image class="circle user_img" src="https://mshopimg.yolipai.net/public/upload/qyimg/temp/2019/08-14/0697f7277936a3b116a6ebc4f8f5e39a.png"></image> | ||
| 79 | + <view class="ellipsis-1">豪华任务一 | ||
| 80 | + </view> | ||
| 81 | + <view class="ellipsis-1">2019-05-12 | ||
| 82 | + </view> | ||
| 83 | + </view> | ||
| 84 | + | ||
| 85 | + </view> | ||
| 86 | + | ||
| 87 | + </view> | ||
| 88 | + <view class="fs30" wx:if="{{1<0}}"> | ||
| 89 | + <view class="flex-center nothing"> | ||
| 90 | + <view>暂无任务记录</view> | ||
| 91 | + </view> | ||
| 92 | + <view class="flex-center receive"> | ||
| 93 | + <view class="flex-center"> | ||
| 94 | + <view>已有</view> | ||
| 95 | + <view>126</view> | ||
| 96 | + <view>人领取了任务</view> | ||
| 97 | + </view> | ||
| 98 | + </view> | ||
| 99 | + </view> | ||
| 100 | + | ||
| 101 | + </view> | ||
| 102 | + <!-- 加载更多 --> | ||
| 103 | + <view class="fs32 "> | ||
| 104 | + <view class="flex-center"> | ||
| 105 | + <view class="line"></view> | ||
| 106 | + <view class="load white" bindtap="">点击加载更多</view> | ||
| 107 | + <view class="line"></view> | ||
| 108 | + </view> | ||
| 109 | + <view class="flex-center white"style="margin-top: 20rpx;" > | ||
| 110 | + <view>已有</view> | ||
| 111 | + <view>126</view> | ||
| 112 | + <view>人领取了任务</view> | ||
| 113 | + </view> | ||
| 114 | + </view> | ||
| 115 | + | ||
| 116 | +<!-- 引入提示组件 --> | ||
| 117 | +<warn id="warn"></warn> | ||
| 118 | +<!-- 制作一个圆球导航 --> | ||
| 119 | +<nav_b id="nav_b"></nav_b> | ||
| 0 | \ No newline at end of file | 120 | \ No newline at end of file |
pages/user/assistance/task_assistance.wxss
0 → 100644
| 1 | +page{ | ||
| 2 | + background: #d01119; | ||
| 3 | + width: 100%; | ||
| 4 | + height: 100% | ||
| 5 | + | ||
| 6 | +} | ||
| 7 | +.top-back{ | ||
| 8 | + width: 100%; | ||
| 9 | + height: 60%; | ||
| 10 | + background-repead:no-repead; | ||
| 11 | + background-size:100% 100%; | ||
| 12 | + | ||
| 13 | +} | ||
| 14 | +.top-frame{ | ||
| 15 | + width: 100%; | ||
| 16 | + height: auto; | ||
| 17 | + padding-top: 50rpx | ||
| 18 | +} | ||
| 19 | +.top-title{ | ||
| 20 | + letter-spacing:10rpx | ||
| 21 | +} | ||
| 22 | +.activity-data{ | ||
| 23 | + padding-top: 10rpx; | ||
| 24 | + letter-spacing: 10rpx; | ||
| 25 | + | ||
| 26 | +} | ||
| 27 | +.xc-specific-more-frame{ | ||
| 28 | + width: 100%; | ||
| 29 | + height: 40%; | ||
| 30 | + | ||
| 31 | + margin-top: 20rpx; | ||
| 32 | +} | ||
| 33 | +.task-number{ | ||
| 34 | + margin-top: 50rpx | ||
| 35 | +} | ||
| 36 | +.task_clike{ | ||
| 37 | + margin: auto; | ||
| 38 | + width: 60%; | ||
| 39 | + height: 80rpx; | ||
| 40 | + border-radius: 50rpx; | ||
| 41 | + margin-top: 20rpx; | ||
| 42 | + background: #fbda0e; | ||
| 43 | + color:#d01119; | ||
| 44 | + line-height: 80rpx; | ||
| 45 | + letter-spacing: 5rpx; | ||
| 46 | + box-shadow: 0rpx 7rpx 0rpx 0rpx rgb(245, 119, 6); | ||
| 47 | +} | ||
| 48 | +/* 底部列表样式 */ | ||
| 49 | + | ||
| 50 | + | ||
| 51 | +.head { | ||
| 52 | + border-bottom: 4rpx solid rgb(253, 193, 7); | ||
| 53 | + color: rgb(255, 255, 255); | ||
| 54 | + height: 48rpx; | ||
| 55 | + line-height: 48rpx; | ||
| 56 | +} | ||
| 57 | + | ||
| 58 | +.lhead { | ||
| 59 | + border-top: 4rpx solid rgb(253, 193, 7); | ||
| 60 | + border-left: 4rpx solid rgb(253, 193, 7); | ||
| 61 | + border-right: 4rpx solid rgb(253, 193, 7); | ||
| 62 | + width: 290rpx; | ||
| 63 | + height: 48rpx; | ||
| 64 | + line-height: 48rpx; | ||
| 65 | +} | ||
| 66 | + | ||
| 67 | +.items { | ||
| 68 | + padding-top: 50rpx; | ||
| 69 | +} | ||
| 70 | + | ||
| 71 | +.rhead { | ||
| 72 | + background-color: rgb(253, 193, 7); | ||
| 73 | +} | ||
| 74 | + | ||
| 75 | +.unfinished { | ||
| 76 | + width:35rpx; | ||
| 77 | + height: 35rpx; | ||
| 78 | + margin-right: 10rpx; | ||
| 79 | +} | ||
| 80 | + | ||
| 81 | +.padding { | ||
| 82 | + padding: 0rpx 50rpx; | ||
| 83 | +} | ||
| 84 | + | ||
| 85 | +.width { | ||
| 86 | + width: 290rpx; | ||
| 87 | +} | ||
| 88 | + | ||
| 89 | +.line { | ||
| 90 | + width: 110rpx; | ||
| 91 | + border: 1rpx solid rgb(255, 255, 255); | ||
| 92 | +} | ||
| 93 | + | ||
| 94 | +.load { | ||
| 95 | + margin: 0rpx 26rpx; | ||
| 96 | +} | ||
| 97 | + | ||
| 98 | +.item { | ||
| 99 | + margin-bottom: 35rpx; | ||
| 100 | +} | ||
| 101 | + | ||
| 102 | +.state { | ||
| 103 | + text-decoration: underline; | ||
| 104 | +} | ||
| 105 | + | ||
| 106 | +.nothing { | ||
| 107 | + padding: 50rpx 0rpx; | ||
| 108 | +} | ||
| 109 | + | ||
| 110 | +.receive { | ||
| 111 | + padding-bottom: 50rpx; | ||
| 112 | +} | ||
| 113 | +.xc-center-img{ | ||
| 114 | + width: 100%; | ||
| 115 | + height: 100% | ||
| 116 | +} | ||
| 117 | + | ||
| 118 | +.xc-left{ | ||
| 119 | + width: 40rpx; | ||
| 120 | + height: 40rpx; | ||
| 121 | +} | ||
| 122 | +.bcolor { | ||
| 123 | +border-color: #fff; | ||
| 124 | + | ||
| 125 | +} | ||
| 126 | +.xc-right{ | ||
| 127 | + width: 40rpx; | ||
| 128 | + height: 40rpx; | ||
| 129 | +} | ||
| 130 | +.user_img{ | ||
| 131 | + width: 50rpx; | ||
| 132 | + height: 50rpx; | ||
| 133 | + | ||
| 134 | +} | ||
| 0 | \ No newline at end of file | 135 | \ No newline at end of file |
pages/user/comment/comment.js
| @@ -124,10 +124,11 @@ Page({ | @@ -124,10 +124,11 @@ Page({ | ||
| 124 | 124 | ||
| 125 | //图片失败,默认图片 | 125 | //图片失败,默认图片 |
| 126 | bind_bnerr2: function(e) { | 126 | bind_bnerr2: function(e) { |
| 127 | + var th = this; | ||
| 127 | var _errImg = e.currentTarget.dataset.errorimg; | 128 | var _errImg = e.currentTarget.dataset.errorimg; |
| 128 | var _errObj = {}; | 129 | var _errObj = {}; |
| 129 | _errObj[_errImg] = os.imghost + "/public/images/default_goods_image_240.gif"; | 130 | _errObj[_errImg] = os.imghost + "/public/images/default_goods_image_240.gif"; |
| 130 | - //this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | 131 | + th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; |
| 131 | }, | 132 | }, |
| 132 | //预览图片 | 133 | //预览图片 |
| 133 | previewImg: function(e) { | 134 | previewImg: function(e) { |
pages/user/comment/comment.wxml
| @@ -7,21 +7,21 @@ | @@ -7,21 +7,21 @@ | ||
| 7 | 7 | ||
| 8 | </view> | 8 | </view> |
| 9 | 9 | ||
| 10 | -<!-- 无评价 --> | ||
| 11 | -<view class="noCollection" wx:if="{{(!comments||comments.length==0) && isloaded}}"> | ||
| 12 | - <view class="flex-level"> | ||
| 13 | - <image src="{{iurl}}/miniapp/images/comment.png"></image> | ||
| 14 | - </view> | ||
| 15 | - <view class="flex-level fs30 xc-ash">当前暂无评价</view> | ||
| 16 | - <view class="flex-level"> | ||
| 17 | - <navigator url="/pages/index/index/index" bindtap="goto"> | ||
| 18 | - <view class="flex-center fs28 white">去首页逛逛</view> | ||
| 19 | - </navigator> | 10 | + <!-- 无评价 --> |
| 11 | + <view class="noCollection" wx:if="{{(!comments||comments.length==0) && isloaded}}"> | ||
| 12 | + <view class="flex-level"> | ||
| 13 | + <image src="{{iurl}}/miniapp/images/comment.png"></image> | ||
| 14 | + </view> | ||
| 15 | + <view class="flex-level fs30 xc-ash">当前暂无评价</view> | ||
| 16 | + <view class="flex-level"> | ||
| 17 | + <navigator url="/pages/index/index/index" bindtap="goto"> | ||
| 18 | + <view class="flex-center fs28 white">去首页逛逛</view> | ||
| 19 | + </navigator> | ||
| 20 | + </view> | ||
| 20 | </view> | 21 | </view> |
| 21 | -</view> | ||
| 22 | 22 | ||
| 23 | - <!-- 待评价栏 --> | ||
| 24 | - <view class="stay_evaluate" wx:if="{{comments.length>0}}" wx:for="{{comments}}"> | 23 | + <!-- 待评价栏 --> |
| 24 | + <view class="stay_evaluate" wx:if="{{comments.length>0}}" wx:for="{{comments}}"> | ||
| 25 | 25 | ||
| 26 | <!-- 商品编号和状态 --> | 26 | <!-- 商品编号和状态 --> |
| 27 | <view class="Commodity_number flex-vertical-between fs26 padding border_bottom"> | 27 | <view class="Commodity_number flex-vertical-between fs26 padding border_bottom"> |
| @@ -66,16 +66,15 @@ | @@ -66,16 +66,15 @@ | ||
| 66 | <view class="starss flex fs26"> | 66 | <view class="starss flex fs26"> |
| 67 | <view class="commen">评价:</view> | 67 | <view class="commen">评价:</view> |
| 68 | <view class="stars"> | 68 | <view class="stars"> |
| 69 | - <image | ||
| 70 | - src="{{imaitem>=item.deliver_rank?iurl+'/miniapp/images/StarswhiteUnCk.png':iurl+'/miniapp/images/StarsredCk.png'}}" data-ind="{{imaitem}}" data-oo="{{item.deliver_rank}}" wx:for="{{5}}" wx:for-index="imaitem" wx:for-item="{{item_start}}"></image> | 69 | + <image src="{{imaitem>=item.deliver_rank?iurl+'/miniapp/images/StarswhiteUnCk.png':iurl+'/miniapp/images/StarsredCk.png'}}" data-ind="{{imaitem}}" data-oo="{{item.deliver_rank}}" wx:for="{{5}}" wx:for-index="imaitem" wx:for-item="{{item_start}}"></image> |
| 71 | </view> | 70 | </view> |
| 72 | </view> | 71 | </view> |
| 73 | <!-- 评价内容 --> | 72 | <!-- 评价内容 --> |
| 74 | <view class="Comment_content ellipsis-2 fs24">{{item.content.length>0?item.content:'此用户没有填写评论'}}</view> | 73 | <view class="Comment_content ellipsis-2 fs24">{{item.content.length>0?item.content:'此用户没有填写评论'}}</view> |
| 75 | <view class="Comment_images flex"> | 74 | <view class="Comment_images flex"> |
| 76 | - <image bindtap="previewImg" wx:if="{{item.source_type==0 && aitem.length>10}}" data-index="{{index}}" src="{{aitem}}" wx:for="{{item.img}}" wx:for-item="aitem" wx:for-index="i" data-sindex="{{i}}" data-name="img"></image> | ||
| 77 | - <image bindtap="previewImg" wx:if="{{item.source_type==1 && aitem.length>10}}" src="{{aitem}}" wx:for-index="i" data-index="{{index}}" wx:for="{{item.weapp_img}}" wx:for-item="aitem" data-sindex="{{i}}" data-name="weapp_img"></image> | ||
| 78 | - | 75 | + <image wx:if="{{item.source_type==0 && aitem.length>10}}" data-index="{{index}}" src="{{iurl+aitem}}" wx:for="{{item.img}}" wx:for-item="aitem" wx:for-index="i" data-sindex="{{i}}" data-name="img"></image> |
| 76 | + <image wx:if="{{item.source_type==1 && aitem.length>10}}" src="{{iurl+aitem}}" wx:for-index="i" data-index="{{index}}" wx:for="{{item.weapp_img}}" wx:for-item="aitem" data-sindex="{{i}}" data-name="weapp_img"></image> | ||
| 77 | + | ||
| 79 | </view> | 78 | </view> |
| 80 | 79 | ||
| 81 | <!-- 商家回复 --> | 80 | <!-- 商家回复 --> |
| @@ -106,12 +105,19 @@ | @@ -106,12 +105,19 @@ | ||
| 106 | </view> | 105 | </view> |
| 107 | </view> | 106 | </view> |
| 108 | </view> | 107 | </view> |
| 109 | - <navigator wx:if="{{item.comment_id}}" class="commodity_To_evaluate flex-level View_evaluation fs24" url="/pages/user/order_detail/order_detail?order_id={{item.order_id}}"> | ||
| 110 | - <view>查看订单</view> | ||
| 111 | - </navigator> | ||
| 112 | - <navigator wx:if="{{!item.comment_id}}" bindtap="comment" data-recid="{{item.rec_id}}" class="commodity_To_evaluate flex-level comment_go" url="item.comment_id>0?'/pages/user/add_comment/add_comment':'' "> | ||
| 113 | - <view class="fs24">去评价</view> | ||
| 114 | - </navigator> | 108 | + <view class="flex"> |
| 109 | + <navigator wx:if="{{item.comment_id}}" class="commodity_To_evaluate flex-level View_evaluation fs24" url="/pages/user/order_detail/order_detail?order_id={{item.order_id}}"> | ||
| 110 | + <view>查看订单</view> | ||
| 111 | + </navigator> | ||
| 112 | + | ||
| 113 | + <navigator wx:if="{{item.comment_id}}" class="commodity_To_evaluate flex-level comment_go" url="/pages/user/view_comment/view_comment?goods_id={{item.goods_id}}&order_id={{item.order_id}}"> | ||
| 114 | + <view>查看评价</view> | ||
| 115 | + </navigator> | ||
| 116 | + | ||
| 117 | + <navigator wx:if="{{!item.comment_id}}" bindtap="comment" data-recid="{{item.rec_id}}" class="commodity_To_evaluate flex-level comment_go" url="{{item.comment_id>0?'/pages/user/add_comment/add_comment?goods_id={{item.goods_id}}&order_id={{item.order_id}}':''}}"> | ||
| 118 | + <view class="fs24">去评价</view> | ||
| 119 | + </navigator> | ||
| 120 | + </view> | ||
| 115 | </view> | 121 | </view> |
| 116 | </view> | 122 | </view> |
| 117 | </view> | 123 | </view> |
pages/user/comment/comment.wxss
| @@ -36,6 +36,7 @@ | @@ -36,6 +36,7 @@ | ||
| 36 | .border_bottom { | 36 | .border_bottom { |
| 37 | border-bottom: 3rpx solid rgb(245, 245, 245); | 37 | border-bottom: 3rpx solid rgb(245, 245, 245); |
| 38 | } | 38 | } |
| 39 | + | ||
| 39 | /* 无评价 */ | 40 | /* 无评价 */ |
| 40 | 41 | ||
| 41 | .noCollection image { | 42 | .noCollection image { |
| @@ -122,14 +123,17 @@ | @@ -122,14 +123,17 @@ | ||
| 122 | height: 39rpx; | 123 | height: 39rpx; |
| 123 | border-radius: 9rpx; | 124 | border-radius: 9rpx; |
| 124 | } | 125 | } |
| 125 | -.commodity_evaluate .commodity_To_evaluate view{ | 126 | + |
| 127 | +.commodity_evaluate .commodity_To_evaluate view { | ||
| 126 | height: 39rpx; | 128 | height: 39rpx; |
| 127 | line-height: 39rpx; | 129 | line-height: 39rpx; |
| 128 | } | 130 | } |
| 129 | -.commodity_evaluate .comment_go{ | ||
| 130 | - margin-top: 10rpx; | ||
| 131 | - background-color: rgb(211, 28, 52); | 131 | + |
| 132 | +.commodity_evaluate .comment_go { | ||
| 133 | + margin-left: 20rpx; | ||
| 134 | + background-color: rgb(211, 28, 52); | ||
| 132 | color: rgb(255, 255, 255); | 135 | color: rgb(255, 255, 255); |
| 136 | + border: 2rpx solid rgb(211, 28, 52); | ||
| 133 | } | 137 | } |
| 134 | 138 | ||
| 135 | .Commodity_spec { | 139 | .Commodity_spec { |
| @@ -141,26 +145,30 @@ | @@ -141,26 +145,30 @@ | ||
| 141 | } | 145 | } |
| 142 | 146 | ||
| 143 | .Commodity_spec view { | 147 | .Commodity_spec view { |
| 144 | - height: 28rpx; | ||
| 145 | - align-items: center; | 148 | + height: 28rpx; |
| 149 | + align-items: center; | ||
| 146 | } | 150 | } |
| 147 | 151 | ||
| 148 | .Commodity_evaluation .Comment_content { | 152 | .Commodity_evaluation .Comment_content { |
| 149 | color: rgb(153, 153, 153); | 153 | color: rgb(153, 153, 153); |
| 150 | letter-spacing: 1rpx; | 154 | letter-spacing: 1rpx; |
| 151 | } | 155 | } |
| 152 | -.Commodity_evaluation .starss{ | ||
| 153 | - height: 58rpx; | ||
| 154 | - /* // line-height: 58rpx; */ | ||
| 155 | - align-items: center; | 156 | + |
| 157 | +.Commodity_evaluation .starss { | ||
| 158 | + height: 58rpx; | ||
| 159 | + /* // line-height: 58rpx; */ | ||
| 160 | + align-items: center; | ||
| 156 | } | 161 | } |
| 157 | -.Commodity_evaluation .commen{ | 162 | + |
| 163 | +.Commodity_evaluation .commen { | ||
| 158 | height: 58rpx; | 164 | height: 58rpx; |
| 159 | line-height: 58rpx; | 165 | line-height: 58rpx; |
| 160 | } | 166 | } |
| 161 | -.Commodity_evaluation .starss .stars{ | 167 | + |
| 168 | +.Commodity_evaluation .starss .stars { | ||
| 162 | line-height: 58rpx; | 169 | line-height: 58rpx; |
| 163 | } | 170 | } |
| 171 | + | ||
| 164 | .Commodity_evaluation .starss .stars image { | 172 | .Commodity_evaluation .starss .stars image { |
| 165 | width: 29rpx; | 173 | width: 29rpx; |
| 166 | height: 26rpx; | 174 | height: 26rpx; |
| @@ -173,17 +181,35 @@ | @@ -173,17 +181,35 @@ | ||
| 173 | margin-right: 8rpx; | 181 | margin-right: 8rpx; |
| 174 | margin-top: 18rpx; | 182 | margin-top: 18rpx; |
| 175 | border-radius: 6rpx; | 183 | border-radius: 6rpx; |
| 176 | - border: 3rpx solid rgb(245, 245, 245); | 184 | + border: 2rpx solid rgb(245, 245, 245); |
| 185 | + margin-left: 15rpx; | ||
| 177 | } | 186 | } |
| 178 | -.commodity_evaluate .View_evaluation{ | ||
| 179 | - border:2rpx solid rgb(179, 179, 179); | ||
| 180 | - color:rgb(0, 0, 0); | 187 | + |
| 188 | +.commodity_evaluate .View_evaluation { | ||
| 189 | + border: 2rpx solid rgb(179, 179, 179); | ||
| 190 | + color: rgb(0, 0, 0); | ||
| 181 | background-color: rgb(255, 255, 255); | 191 | background-color: rgb(255, 255, 255); |
| 182 | } | 192 | } |
| 183 | -.comment_addtime{ | 193 | + |
| 194 | +.comment_addtime { | ||
| 184 | height: 50rpx; | 195 | height: 50rpx; |
| 185 | } | 196 | } |
| 186 | -.title_width{ width: 146rpx; text-align:center } | ||
| 187 | -.shop-font{ color: rgb(153, 153, 153);} | ||
| 188 | -.reply{ margin-top: 10rpx} | ||
| 189 | -.get_bottom{ text-align: center; color: #999; margin-bottom: 20rpx} | ||
| 190 | \ No newline at end of file | 197 | \ No newline at end of file |
| 198 | + | ||
| 199 | +.title_width { | ||
| 200 | + width: 146rpx; | ||
| 201 | + text-align: center; | ||
| 202 | +} | ||
| 203 | + | ||
| 204 | +.shop-font { | ||
| 205 | + color: rgb(153, 153, 153); | ||
| 206 | +} | ||
| 207 | + | ||
| 208 | +.reply { | ||
| 209 | + margin-top: 10rpx; | ||
| 210 | +} | ||
| 211 | + | ||
| 212 | +.get_bottom { | ||
| 213 | + text-align: center; | ||
| 214 | + color: #999; | ||
| 215 | + margin-bottom: 20rpx; | ||
| 216 | +} |
pages/user/coupons/coupons.wxml
| @@ -34,15 +34,15 @@ | @@ -34,15 +34,15 @@ | ||
| 34 | </view> | 34 | </view> |
| 35 | <view class="moneys">{{filter.getNum(detail.Sum)}}元微券</view> | 35 | <view class="moneys">{{filter.getNum(detail.Sum)}}元微券</view> |
| 36 | <view class="car-rim"> | 36 | <view class="car-rim"> |
| 37 | - <view class="coupon_from">微券来源: {{detail.Operator==null?'微信商城':detail.Operator}}</view> | 37 | + <view class="coupon_from">微券来源: {{detail.Operator==null?'微信商城':detail.Operator==''?"微信商城":detail.Operator}}</view> |
| 38 | <view wx:if="{{detail.ValidDate!=null&&detail.BeginDate!=null}}"> | 38 | <view wx:if="{{detail.ValidDate!=null&&detail.BeginDate!=null}}"> |
| 39 | <!-- 不指定格式则默认输出:yyyy-MM-dd hh:mm:ss 格式 --> | 39 | <!-- 不指定格式则默认输出:yyyy-MM-dd hh:mm:ss 格式 --> |
| 40 | - <view class="text">有效期: {{detail.BeginDate==null?"":time.replace_time2(detail.BeginDate)}}至{{time.replace_time2(detail.ValidDate)}}</view> | 40 | + <view class="text">有效期: {{(detail.BeginDate==null || detail.BeginDate=='')?"":time.replace_time2(detail.BeginDate)}}至{{time.replace_time2(detail.ValidDate)}}</view> |
| 41 | </view> | 41 | </view> |
| 42 | <view wx:else> | 42 | <view wx:else> |
| 43 | <view class="text">有效期:不限</view> | 43 | <view class="text">有效期:不限</view> |
| 44 | </view> | 44 | </view> |
| 45 | - <view class="textss">使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{detail.UseObjectID==null?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用{{detail.region_list_name==null?"":",不包邮地区:"+region_list_name}} | 45 | + <view class="textss">使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用{{detail.region_list_name==null?"":",不包邮地区:"+region_list_name}} |
| 46 | </view> | 46 | </view> |
| 47 | 47 | ||
| 48 | </view> | 48 | </view> |
pages/user/index/index.js
| @@ -30,25 +30,29 @@ Page({ | @@ -30,25 +30,29 @@ Page({ | ||
| 30 | cz_val:0, | 30 | cz_val:0, |
| 31 | full_cz_val:0, | 31 | full_cz_val:0, |
| 32 | is_dengji:0, //是不是等级 | 32 | is_dengji:0, //是不是等级 |
| 33 | + is_banner:0,//是不是有生日活动 | ||
| 34 | + giftbagid:"",//生日活动的类型 | ||
| 35 | + actId:"",//生日活动的id | ||
| 36 | + actImg:"", | ||
| 37 | + is_assistance:0,//助力活动 | ||
| 33 | }, | 38 | }, |
| 34 | - goto_service: function () { | 39 | + goto_nav: function (e) { |
| 35 | var th = this; | 40 | var th = this; |
| 41 | + var url = e.currentTarget.dataset.url; | ||
| 36 | if (th.data.userInfo != null) { | 42 | if (th.data.userInfo != null) { |
| 37 | - var url = "/pages/user/my_service/i_service"; | ||
| 38 | getApp().goto(url); | 43 | getApp().goto(url); |
| 39 | } else { | 44 | } else { |
| 40 | - if(th.data.is_nav){ | ||
| 41 | wx.navigateTo({ | 45 | wx.navigateTo({ |
| 42 | url: '/pages/getphone/getphone', | 46 | url: '/pages/getphone/getphone', |
| 43 | }) | 47 | }) |
| 44 | - } | ||
| 45 | } | 48 | } |
| 46 | }, | 49 | }, |
| 47 | /** | 50 | /** |
| 48 | * 生命周期函数--监听页面加载 | 51 | * 生命周期函数--监听页面加载 |
| 49 | */ | 52 | */ |
| 50 | onLoad: function (options) { | 53 | onLoad: function (options) { |
| 51 | - | 54 | + this.birthday(); |
| 55 | + this.is_assistance(); | ||
| 52 | }, | 56 | }, |
| 53 | 57 | ||
| 54 | /** | 58 | /** |
| @@ -253,7 +257,7 @@ Page({ | @@ -253,7 +257,7 @@ Page({ | ||
| 253 | //!this.nomore && this.requestRecommend(); | 257 | //!this.nomore && this.requestRecommend(); |
| 254 | var goods_list = this.selectComponent("#goods_recommend"); //组件的id | 258 | var goods_list = this.selectComponent("#goods_recommend"); //组件的id |
| 255 | goods_list.init(); | 259 | goods_list.init(); |
| 256 | - setTimeOut(function () { goods_list.get_list(); }, 300) | 260 | + setTimeout(function () { goods_list.get_list(); }, 300) |
| 257 | }, | 261 | }, |
| 258 | 262 | ||
| 259 | /** | 263 | /** |
| @@ -450,7 +454,58 @@ Page({ | @@ -450,7 +454,58 @@ Page({ | ||
| 450 | 454 | ||
| 451 | jump: function () { | 455 | jump: function () { |
| 452 | getApp().goto("/pages/user/grow_value/grow_value") | 456 | getApp().goto("/pages/user/grow_value/grow_value") |
| 457 | + }, | ||
| 458 | + // 判断生日营销的页面是不是存在 | ||
| 459 | + birthday:function(){ | ||
| 460 | + var th = this; | ||
| 461 | + // rq.get("/api/weshop/marketing/birthday/act/judge", { | ||
| 462 | + // data: { storeId: os.stoid, userId: app_d.user_id }, | ||
| 463 | + // success: function (res) { | ||
| 464 | + // var code = res.data.code; | ||
| 465 | + // if (code == 0) { | ||
| 466 | + // var giftbagid = res.data.data.giftBagId; | ||
| 467 | + // var actId = res.data.data.id; | ||
| 468 | + // var actImg = res.data.data.actImg; | ||
| 469 | + // t.setData({ giftbagid: giftbagid, actId: actId, actImg: actImg }); | ||
| 470 | + // t.setData({ is_banner: 1 }); | ||
| 471 | + // } | ||
| 472 | + | ||
| 473 | + // } | ||
| 474 | + // }) | ||
| 475 | + | ||
| 476 | + | ||
| 477 | + }, | ||
| 478 | + clike_banne:function(){ | ||
| 479 | + var th = this; | ||
| 480 | + var actId=th.data.actId; | ||
| 481 | + var giftbagid=th.data.giftbagid; | ||
| 482 | + if (actId != "" && giftbagid!=""){ | ||
| 483 | + | ||
| 484 | + wx.redirectTo({ | ||
| 485 | + url: "/pages/giftpack/birthdaygift/birthdaygift?actId=" + actId + "&gifbagid=" + giftbagid + "&orderType=" + 3 | ||
| 486 | + }); | ||
| 487 | + }else{ | ||
| 488 | + | ||
| 489 | + getApp().showWarning("请稍后重试"); | ||
| 490 | + } | ||
| 491 | + }, | ||
| 492 | + // 判断助力活动是不是存在 | ||
| 493 | + is_assistance:function(){ | ||
| 494 | + // var th = this; | ||
| 495 | + // rq.get("/api/weshop/marketing/help/act/judge", { | ||
| 496 | + // data: { storeId: os.stoid, userId: app_d.user_id }, | ||
| 497 | + // success: function (res) { | ||
| 498 | + // var code = res.data.code; | ||
| 499 | + // if (code == 0) { | ||
| 500 | + // th.setData({ is_assistance:1}); | ||
| 501 | + // } | ||
| 502 | + | ||
| 503 | + // } | ||
| 504 | + // }) | ||
| 505 | + | ||
| 453 | } | 506 | } |
| 454 | 507 | ||
| 455 | 508 | ||
| 509 | + | ||
| 510 | + | ||
| 456 | }) | 511 | }) |
| 457 | \ No newline at end of file | 512 | \ No newline at end of file |
pages/user/index/index.wxml
| @@ -166,10 +166,18 @@ | @@ -166,10 +166,18 @@ | ||
| 166 | </view> | 166 | </view> |
| 167 | </view> | 167 | </view> |
| 168 | </view> | 168 | </view> |
| 169 | + <!-- 生日营销 is_banner--> | ||
| 170 | + <block wx:if="{{is_banner}}"> | ||
| 171 | + <view class="t-c banner-frame" bindtap="clike_banne"> | ||
| 172 | + <image class="banner-img" src="{{actImg==''?iurl+'/miniapp/images/user/banner-img.jpg':iurl+actImg}}"> | ||
| 173 | + </image> | ||
| 174 | + </view> | ||
| 175 | + </block> | ||
| 176 | + | ||
| 169 | <!-- 工具与服务 --> | 177 | <!-- 工具与服务 --> |
| 170 | <view class="xc-tool-service"> | 178 | <view class="xc-tool-service"> |
| 171 | <view class="xc-tool-service-title flex-vertical"> | 179 | <view class="xc-tool-service-title flex-vertical"> |
| 172 | - <image class="xc-tool-service-img" src="{{iurl}}/miniapp/images/gj.png"></image> | 180 | + <image class="xc-tool-service-img" src="{{iurl}}/miniapp/images/gj.png"></image> |
| 173 | <view class="three-level-word xc-tool-service-word">工具与服务</view> | 181 | <view class="three-level-word xc-tool-service-word">工具与服务</view> |
| 174 | </view> | 182 | </view> |
| 175 | <view class="xc-project-frame"> | 183 | <view class="xc-project-frame"> |
| @@ -212,14 +220,21 @@ | @@ -212,14 +220,21 @@ | ||
| 212 | <image class="xc-center-img " src="{{iurl}}/miniapp/images/add2.png"></image> | 220 | <image class="xc-center-img " src="{{iurl}}/miniapp/images/add2.png"></image> |
| 213 | <view class="four-level-word">我的地址</view> | 221 | <view class="four-level-word">我的地址</view> |
| 214 | </view> | 222 | </view> |
| 215 | - <view class="item t-c" data-url="/pages/user/my_service/i_service" bindtap="goto_service" > | 223 | + <view class="item t-c" data-url="/pages/user/my_service/i_service" bindtap="goto_nav" > |
| 216 | <image class="xc-center-img " src="{{iurl}}/miniapp/images/yyservice/myservice.png"></image> | 224 | <image class="xc-center-img " src="{{iurl}}/miniapp/images/yyservice/myservice.png"></image> |
| 217 | <view class="four-level-word">我的服务</view> | 225 | <view class="four-level-word">我的服务</view> |
| 218 | </view> | 226 | </view> |
| 219 | - <view class="item t-c" data-url="/pages/giftpack/mygiftpack/mygiftpack" bindtap="goto"> | ||
| 220 | - <image class="xc-center-img " src="{{iurl}}/miniapp/images/yyservice/myservice.png"></image> | ||
| 221 | - <view class="four-level-word">我的礼包</view> | 227 | + <view class="item t-c" data-url="/pages/giftpack/mygiftpack/mygiftpack" bindtap="goto_nav"> |
| 228 | + <image class="xc-center-img " src="{{iurl}}/miniapp/images//user/wdlb.png"></image> | ||
| 229 | + <view class="four-level-word">专享礼包</view> | ||
| 222 | </view> | 230 | </view> |
| 231 | + <block wx:if="{{is_assistance==1}}"> | ||
| 232 | + <view class="item t-c" data-url="/pages/user/assistance/assistance" bindtap="goto_nav"> | ||
| 233 | + <image class="xc-center-img " src="{{iurl}}/miniapp/images/friendhelp/icon-zl.png"></image> | ||
| 234 | + <view class="four-level-word">助力活动</view> | ||
| 235 | + </view> | ||
| 236 | + </block> | ||
| 237 | + | ||
| 223 | </view> | 238 | </view> |
| 224 | 239 | ||
| 225 | </view> | 240 | </view> |
pages/user/index/index.wxss
| @@ -344,7 +344,7 @@ | @@ -344,7 +344,7 @@ | ||
| 344 | .xc-tool-service .xc-tool-service-title { | 344 | .xc-tool-service .xc-tool-service-title { |
| 345 | width: 100%; | 345 | width: 100%; |
| 346 | height: 90rpx; | 346 | height: 90rpx; |
| 347 | - border: 2rpx solid #f2f2f2; | 347 | + |
| 348 | } | 348 | } |
| 349 | 349 | ||
| 350 | .xc-tool-service-img { | 350 | .xc-tool-service-img { |
| @@ -361,9 +361,6 @@ | @@ -361,9 +361,6 @@ | ||
| 361 | width: 100%; | 361 | width: 100%; |
| 362 | } | 362 | } |
| 363 | 363 | ||
| 364 | -.xc-project-frame .center_v { | ||
| 365 | -} | ||
| 366 | - | ||
| 367 | .xc-project-frame .item { | 364 | .xc-project-frame .item { |
| 368 | width: 25%; | 365 | width: 25%; |
| 369 | margin-top: 30rpx; | 366 | margin-top: 30rpx; |
| @@ -699,3 +696,14 @@ | @@ -699,3 +696,14 @@ | ||
| 699 | margin-top: 8rpx; | 696 | margin-top: 8rpx; |
| 700 | margin-right: 5rpx; | 697 | margin-right: 5rpx; |
| 701 | } | 698 | } |
| 699 | +.banner-img{ | ||
| 700 | + width: 95%; | ||
| 701 | + height: 140rpx; | ||
| 702 | + border-radius: 10px 10px 0px 0px; | ||
| 703 | + margin-bottom: -5rpx; | ||
| 704 | + | ||
| 705 | +} | ||
| 706 | +.banner-frame{ | ||
| 707 | + width: 100%; | ||
| 708 | + background: #f2f2f2; | ||
| 709 | +} | ||
| 702 | \ No newline at end of file | 710 | \ No newline at end of file |
pages/user/my_service/tment_eval.js
| @@ -23,6 +23,10 @@ Page({ | @@ -23,6 +23,10 @@ Page({ | ||
| 23 | arrangeTime: "", //服务日期 | 23 | arrangeTime: "", //服务日期 |
| 24 | is_evaluate: 0, //是否评价 | 24 | is_evaluate: 0, //是否评价 |
| 25 | EvaluateDatetime: "", //评价时间 | 25 | EvaluateDatetime: "", //评价时间 |
| 26 | + is_act:0, //是否能购获取图片 | ||
| 27 | + actId:0, //活动ID | ||
| 28 | + giftBagId:0, //礼包ID | ||
| 29 | + | ||
| 26 | }, | 30 | }, |
| 27 | //点击星级 | 31 | //点击星级 |
| 28 | check_stars: function(e) { | 32 | check_stars: function(e) { |
| @@ -219,6 +223,7 @@ Page({ | @@ -219,6 +223,7 @@ Page({ | ||
| 219 | is_evaluate: options.evaluate | 223 | is_evaluate: options.evaluate |
| 220 | }) | 224 | }) |
| 221 | th.query_bea(); | 225 | th.query_bea(); |
| 226 | + th.judge_act(); | ||
| 222 | }, | 227 | }, |
| 223 | 228 | ||
| 224 | /** | 229 | /** |
| @@ -231,4 +236,46 @@ Page({ | @@ -231,4 +236,46 @@ Page({ | ||
| 231 | th.evaluate_get(); | 236 | th.evaluate_get(); |
| 232 | } | 237 | } |
| 233 | }, | 238 | }, |
| 239 | + //评价其他跳转 | ||
| 240 | + evaluate_qt:function(){ | ||
| 241 | + | ||
| 242 | + wx.redirectTo({ | ||
| 243 | + url: "/pages/user/my_service/tment_order_list?state="+2 | ||
| 244 | + }); | ||
| 245 | + }, | ||
| 246 | + //点击领取礼包 | ||
| 247 | + clike_lb:function(){ | ||
| 248 | + | ||
| 249 | + var id=this.data.actId; | ||
| 250 | + var gifbagid = this.data.gifbagid; | ||
| 251 | + wx.redirectTo({ | ||
| 252 | + url: "/pages/giftpack/evaluategift/evaluategift?actId=" + id + "&gifbagid=&orderType=2&orderNumber="+this.data.number | ||
| 253 | + }); | ||
| 254 | + | ||
| 255 | + }, | ||
| 256 | + | ||
| 257 | + //--评价有礼判断--- | ||
| 258 | + judge_act: function () { | ||
| 259 | + var th = this; | ||
| 260 | + var url = "/api/weshop/marketing/comment/act/judge"; | ||
| 261 | + getApp().request.promiseGet(url, { | ||
| 262 | + data: { | ||
| 263 | + orderNumber: th.data.number, | ||
| 264 | + orderType: 2, | ||
| 265 | + storeId: a.stoid, | ||
| 266 | + userId: d.user_id | ||
| 267 | + } | ||
| 268 | + }).then(res => { | ||
| 269 | + if (res.data.code == 0) { | ||
| 270 | + var id = res.data.data.id; | ||
| 271 | + var giftbagid = res.data.data.giftbagid; | ||
| 272 | + th.setData({ | ||
| 273 | + is_act: 1, | ||
| 274 | + actId: id, | ||
| 275 | + giftBagId: giftbagid | ||
| 276 | + }) | ||
| 277 | + } | ||
| 278 | + }) | ||
| 279 | + }, | ||
| 280 | + | ||
| 234 | }) | 281 | }) |
| 235 | \ No newline at end of file | 282 | \ No newline at end of file |
pages/user/my_service/tment_eval.wxml
| @@ -91,4 +91,15 @@ | @@ -91,4 +91,15 @@ | ||
| 91 | <view>确认提交</view> | 91 | <view>确认提交</view> |
| 92 | </view> | 92 | </view> |
| 93 | </navigator> | 93 | </navigator> |
| 94 | +<view wx:else> | ||
| 95 | + | ||
| 96 | + | ||
| 97 | +<view style="margin: auto;margin-bottom: 30rpx;" class="Submission flex-center" bindtap="evaluate_qt"> | ||
| 98 | + <view>评价其他</view> | ||
| 99 | + </view> | ||
| 100 | + | ||
| 101 | + <view wx:if="{{is_act}}" style="margin: auto;margin-bottom: 30rpx;" class="Submission flex-center yellow-b" bindtap="clike_lb"> | ||
| 102 | + <view>点击领取礼品</view> | ||
| 103 | + </view> | ||
| 104 | + </view> | ||
| 94 | <warn id="warn"></warn> | 105 | <warn id="warn"></warn> |
| 95 | \ No newline at end of file | 106 | \ No newline at end of file |
pages/user/my_service/tment_eval.wxss
| @@ -115,6 +115,10 @@ | @@ -115,6 +115,10 @@ | ||
| 115 | background-color: rgb(214, 1, 33); | 115 | background-color: rgb(214, 1, 33); |
| 116 | color: rgb(255, 255, 255); | 116 | color: rgb(255, 255, 255); |
| 117 | } | 117 | } |
| 118 | +.Submission.yellow-b{ | ||
| 119 | + background-color: #ffb03f; | ||
| 120 | + | ||
| 121 | +} | ||
| 118 | 122 | ||
| 119 | .clonri { | 123 | .clonri { |
| 120 | margin: 0rpx; | 124 | margin: 0rpx; |
pages/user/my_service/tment_order_list.js
| @@ -39,7 +39,11 @@ Page({ | @@ -39,7 +39,11 @@ Page({ | ||
| 39 | * 生命周期函数--监听页面加载 | 39 | * 生命周期函数--监听页面加载 |
| 40 | */ | 40 | */ |
| 41 | onLoad: function(options) { | 41 | onLoad: function(options) { |
| 42 | - | 42 | + var state=options.state; |
| 43 | + if (state != null && state != undefined && state!=""){ | ||
| 44 | + this.setData({ activeCategoryId: state }); | ||
| 45 | + } | ||
| 46 | + | ||
| 43 | }, | 47 | }, |
| 44 | changeTab: function(e) { | 48 | changeTab: function(e) { |
| 45 | var th = this; | 49 | var th = this; |
pages/user/view_comment/view_comment.js
0 → 100644
| 1 | +var i = require("../../../utils/util.js"), | ||
| 2 | + ut = i; | ||
| 3 | +var e = getApp(), | ||
| 4 | + a = e.globalData.setting, | ||
| 5 | + os = a, | ||
| 6 | + t = e.request, | ||
| 7 | + d = e.globalData; | ||
| 8 | +Page({ | ||
| 9 | + | ||
| 10 | + /** | ||
| 11 | + * 页面的初始数据 | ||
| 12 | + */ | ||
| 13 | + data: { | ||
| 14 | + url: a.url, | ||
| 15 | + iurl: a.imghost, | ||
| 16 | + comment: [], //用户单个评价的内容 | ||
| 17 | + goods_id: "", //商品id | ||
| 18 | + order_id: "", //订单id | ||
| 19 | + is_act: 0, //是否开启活动 | ||
| 20 | + actId: "", //活动id | ||
| 21 | + giftBagId: "", //礼包id | ||
| 22 | + }, | ||
| 23 | + | ||
| 24 | + /** | ||
| 25 | + * 生命周期函数--监听页面加载 | ||
| 26 | + */ | ||
| 27 | + onLoad: function(options) { | ||
| 28 | + var th = this; | ||
| 29 | + th.setData({ | ||
| 30 | + goods_id: options.goods_id, | ||
| 31 | + order_id: options.order_id | ||
| 32 | + }) | ||
| 33 | + th.query_comment(); | ||
| 34 | + }, | ||
| 35 | + | ||
| 36 | + /** | ||
| 37 | + * 生命周期函数--监听页面显示 | ||
| 38 | + */ | ||
| 39 | + onShow: function() { | ||
| 40 | + | ||
| 41 | + }, | ||
| 42 | + query_comment: function() { | ||
| 43 | + var th = this; | ||
| 44 | + wx.showLoading({ | ||
| 45 | + title: '加载中' | ||
| 46 | + }) | ||
| 47 | + var url = "/api/weshop/comment/list"; | ||
| 48 | + getApp().request.promiseGet(url, { | ||
| 49 | + data: { | ||
| 50 | + store_id: a.stoid, | ||
| 51 | + userId: d.user_id, | ||
| 52 | + goods_id: th.data.goods_id, | ||
| 53 | + order_id: th.data.order_id | ||
| 54 | + } | ||
| 55 | + }).then(res => { | ||
| 56 | + wx.hideLoading(); | ||
| 57 | + if (res.data.code == 0) { | ||
| 58 | + var data = res.data.data.pageData; | ||
| 59 | + if (data[0].img) data[0].img = ut.unserialize(data[0].img); | ||
| 60 | + if (data[0].weapp_img) data[0].weapp_img = JSON.parse(data[0].weapp_img); | ||
| 61 | + th.setData({ | ||
| 62 | + comment: data | ||
| 63 | + }) | ||
| 64 | + th.judge_act(); //判断是否开启评价有礼 | ||
| 65 | + } else { | ||
| 66 | + getApp().my_warnning("系统繁忙,请稍后再试", 0, th); | ||
| 67 | + } | ||
| 68 | + }) | ||
| 69 | + }, | ||
| 70 | + //评价有礼判断 | ||
| 71 | + judge_act: function() { | ||
| 72 | + var th = this; | ||
| 73 | + var url = "/api/weshop/marketing/comment/act/judge"; | ||
| 74 | + getApp().request.promiseGet(url, { | ||
| 75 | + data: { | ||
| 76 | + orderGoodsId: th.data.goods_id, | ||
| 77 | + orderNumber: th.data.order_id, | ||
| 78 | + orderType: 1, | ||
| 79 | + storeId: a.stoid, | ||
| 80 | + userId: d.user_id | ||
| 81 | + } | ||
| 82 | + }).then(res => { | ||
| 83 | + if (res.data.code == 0) { | ||
| 84 | + var id = res.data.data.id; | ||
| 85 | + var giftbagid = res.data.data.giftbagid; | ||
| 86 | + th.setData({ | ||
| 87 | + is_act: 1, | ||
| 88 | + actId: id, | ||
| 89 | + giftBagId: giftbagid | ||
| 90 | + }) | ||
| 91 | + } else { | ||
| 92 | + | ||
| 93 | + } | ||
| 94 | + }) | ||
| 95 | + }, | ||
| 96 | + //预览图片 | ||
| 97 | + previewImg: function(e) { | ||
| 98 | + var th = this; | ||
| 99 | + var index = e.currentTarget.dataset.index; | ||
| 100 | + var sindex = e.currentTarget.dataset.sindex; | ||
| 101 | + var imgArr = th.data.comment; | ||
| 102 | + var image = imgArr[0].weapp_img; | ||
| 103 | + var imagename = ""; | ||
| 104 | + var iurl = th.data.iurl; | ||
| 105 | + if (image != "") { | ||
| 106 | + image = imgArr[0].weapp_img[index]; | ||
| 107 | + wx.previewImage({ | ||
| 108 | + current: iurl + image, | ||
| 109 | + //当前图片地址 | ||
| 110 | + urls: imgArr[0].weapp_img, //所有要预览的图片的地址集合 数组形式 | ||
| 111 | + }) | ||
| 112 | + } else { | ||
| 113 | + image = imgArr[0].img[index]; | ||
| 114 | + wx.previewImage({ | ||
| 115 | + current: iurl + image, | ||
| 116 | + //当前图片地址 | ||
| 117 | + urls: imgArr[0].img, //所有要预览的图片的地址集合 数组形式 | ||
| 118 | + }) | ||
| 119 | + } | ||
| 120 | + }, | ||
| 121 | + goto: function(e) { | ||
| 122 | + var th = this; | ||
| 123 | + var url = e.currentTarget.dataset.url; | ||
| 124 | + getApp().goto(url); | ||
| 125 | + } | ||
| 126 | + | ||
| 127 | +}) | ||
| 0 | \ No newline at end of file | 128 | \ No newline at end of file |
pages/user/view_comment/view_comment.json
0 → 100644
pages/user/view_comment/view_comment.wxml
0 → 100644
| 1 | +<view class="commoditymax" wx:for="{{comment}}" wx:if="{{index==0}}" wx:for-item="item"> | ||
| 2 | + <!-- 商品评价 --> | ||
| 3 | + <view class='commodity'> | ||
| 4 | + <!-- 商品信息 --> | ||
| 5 | + <navigator class='information flex-vertical' url="{{'/pages/goods/goodsInfo/goodsInfo?goods_id='+item.goods_id}}"> | ||
| 6 | + <image src="{{iurl+item.original_img}}" binderror="bind_bnerr2" data-errorimg="item.original_img"></image> | ||
| 7 | + <view class="goods_name xc-black"> | ||
| 8 | + <!-- 商品名称 --> | ||
| 9 | + <view class='ellipsis-2 fs32'>{{item.goods_name}}</view> | ||
| 10 | + <!-- 商品价格,数量 --> | ||
| 11 | + <view class='flex jc_sb balin'> | ||
| 12 | + <!-- 价格 --> | ||
| 13 | + <view class='flex-vertical balin'> | ||
| 14 | + <view class="fs24">¥</view> | ||
| 15 | + <view class="fs35">{{item.goods_price}}</view> | ||
| 16 | + </view> | ||
| 17 | + | ||
| 18 | + <!-- 商品数量 --> | ||
| 19 | + <view class='sum flex-vertical balin xc-black'> | ||
| 20 | + <view class="fs24">x</view> | ||
| 21 | + <view class="fs28">{{item.goods_num}}</view> | ||
| 22 | + </view> | ||
| 23 | + | ||
| 24 | + </view> | ||
| 25 | + | ||
| 26 | + </view> | ||
| 27 | + | ||
| 28 | + </navigator> | ||
| 29 | + | ||
| 30 | + | ||
| 31 | + <!-- 商品评价信息 --> | ||
| 32 | + <view class="addComment"> | ||
| 33 | + <view class="fs26 comment">{{item.content}}</view> | ||
| 34 | + <view class="flex addimages" wx:if="{{item.weapp_img.length>0 || item.img.length>0}}"> | ||
| 35 | + <!-- 评论图片集合 --> | ||
| 36 | + <view class="images"> | ||
| 37 | + <block wx:if="{{item.weapp_img!=''}}"> | ||
| 38 | + <image class="rel" catchtap="previewImg" data-index="{{index}}" src="{{iurl+item}}" wx:for="{{item.weapp_img}}" lazy-load="true"> | ||
| 39 | + </image> | ||
| 40 | + </block> | ||
| 41 | + <block wx:else> | ||
| 42 | + <image wx:if="{{item.img!=''}}" class="rel" catchtap="previewImg" data-index="{{index}}" src="{{iurl+item}}" wx:for="{{item.img}}" lazy-load="true"> | ||
| 43 | + </image> | ||
| 44 | + </block> | ||
| 45 | + </view> | ||
| 46 | + | ||
| 47 | + </view> | ||
| 48 | + | ||
| 49 | + </view> | ||
| 50 | + </view> | ||
| 51 | + | ||
| 52 | + <!-- 评价等级 --> | ||
| 53 | + <view class="Grade"> | ||
| 54 | + <!-- 宝贝评分 --> | ||
| 55 | + <view class="title flex-vertical"> | ||
| 56 | + <view class="column"></view> | ||
| 57 | + <view class="fs28">宝贝评分</view> | ||
| 58 | + </view> | ||
| 59 | + | ||
| 60 | + <!-- 服务评级 --> | ||
| 61 | + <view class="score-items"> | ||
| 62 | + <view class="score-item flex-vertical"> | ||
| 63 | + <view class="fs24">描述相符</view> | ||
| 64 | + <view class="stars flex-vertical"> | ||
| 65 | + <view class="flex-vertical" wx:for="{{5}}" wx:for-item="goods" wx:for-index="goods"> | ||
| 66 | + <image src="{{goods<item.goods_rank?iurl+'/miniapp/images/StarsredCk.png':iurl+'/miniapp/images/StarswhiteUnCk.png'}}" lazy-load="true"></image> | ||
| 67 | + </view> | ||
| 68 | + </view> | ||
| 69 | + </view> | ||
| 70 | + | ||
| 71 | + <view class="score-item flex-vertical"> | ||
| 72 | + <view class="fs24">物流服务</view> | ||
| 73 | + <view class="stars flex-vertical"> | ||
| 74 | + <view class="flex-vertical" wx:for="{{5}}" wx:for-item="deliver" wx:for-index="deliver"> | ||
| 75 | + <image src="{{deliver<item.deliver_rank?iurl+'/miniapp/images/StarsredCk.png':iurl+'/miniapp/images/StarswhiteUnCk.png'}}" lazy-load="true"></image> | ||
| 76 | + </view> | ||
| 77 | + </view> | ||
| 78 | + </view> | ||
| 79 | + <view class="score-item flex-vertical"> | ||
| 80 | + <view class="fs24">服务态度</view> | ||
| 81 | + <view class="stars flex-vertical"> | ||
| 82 | + <view class="flex-vertical" wx:for="{{5}}" wx:for-item="service" wx:for-index="service"> | ||
| 83 | + <image src="{{service<item.service_rank?iurl+'/miniapp/images/StarsredCk.png':iurl+'/miniapp/images/StarswhiteUnCk.png'}}" lazy-load="true"></image> | ||
| 84 | + </view> | ||
| 85 | + </view> | ||
| 86 | + | ||
| 87 | + </view> | ||
| 88 | + | ||
| 89 | + </view> | ||
| 90 | + | ||
| 91 | + </view> | ||
| 92 | +</view> | ||
| 93 | +<!-- 是否匿名评价 --> | ||
| 94 | +<view class="Whether" wx:if="{{comment.length>0}}"> | ||
| 95 | + <view class="Submission flex-level "> | ||
| 96 | + <view class="fs30 flex-level white " bindtap="goto" data-url="/pages/user/comment/comment">评价其他</view> | ||
| 97 | + </view> | ||
| 98 | + <view class="flex-level" wx:if="{{is_act}}"> | ||
| 99 | + <view class="fs30 flex-level white receive" data-url="/pages/giftpack/evaluategift/evaluategift?actId={{actId}}&orderNumber={{order_id}}&orderGoodsId={{goods_id}}&giftBagId={{giftBagId}}" bindtap="goto">点击领取礼品</view> | ||
| 100 | + </view> | ||
| 101 | +</view> | ||
| 102 | + | ||
| 103 | +<!-- 引入提示组件 --> | ||
| 104 | +<warn id="warn"></warn> | ||
| 105 | +<my_confirm id="my_confirm"></my_confirm> | ||
| 0 | \ No newline at end of file | 106 | \ No newline at end of file |
pages/user/view_comment/view_comment.wxss
0 → 100644
| 1 | +page{ | ||
| 2 | + overflow-x: hidden; | ||
| 3 | +} | ||
| 4 | +/* 商品详情和评价 */ | ||
| 5 | +.commoditymax{ | ||
| 6 | + overflow-x: hidden; | ||
| 7 | +} | ||
| 8 | +.commodity { | ||
| 9 | + border-top: 6rpx solid rgb(245, 245, 245); | ||
| 10 | + border-bottom: 6rpx solid rgb(245, 245, 245); | ||
| 11 | + padding: 0rpx 30rpx; | ||
| 12 | + padding-bottom:10rpx; | ||
| 13 | +} | ||
| 14 | + | ||
| 15 | +.commodity .information { | ||
| 16 | + height: 286rpx; | ||
| 17 | +} | ||
| 18 | + | ||
| 19 | +.commodity .information image { | ||
| 20 | + width: 186rpx; | ||
| 21 | + height: 186rpx; | ||
| 22 | +} | ||
| 23 | + | ||
| 24 | +.information .goods_name { | ||
| 25 | + width: 480rpx; | ||
| 26 | + margin-left: 25rpx; | ||
| 27 | + height: 186rpx; | ||
| 28 | +} | ||
| 29 | + | ||
| 30 | +.information .goods_name .ellipsis-2 { | ||
| 31 | + line-height: 40rpx; | ||
| 32 | + height: 80rpx; | ||
| 33 | +} | ||
| 34 | + | ||
| 35 | +.information .goods_name .jc_sb { | ||
| 36 | + margin-top: 60rpx; | ||
| 37 | + color: rgb(212, 28, 52); | ||
| 38 | + margin-right: 7rpx; | ||
| 39 | +} | ||
| 40 | + | ||
| 41 | +.information .goods_name .jc_sb .fs32 { | ||
| 42 | + line-height: 40rpx; | ||
| 43 | +} | ||
| 44 | + | ||
| 45 | +.information .goods_name .jc_sb .sum { | ||
| 46 | + margin-right: 5rpx; | ||
| 47 | +} | ||
| 48 | + | ||
| 49 | +.balin { | ||
| 50 | + align-items: baseline; | ||
| 51 | +} | ||
| 52 | + | ||
| 53 | +.addComment { | ||
| 54 | + width: 690rpx; | ||
| 55 | + padding: 32rpx 0rpx 21rpx 0rpx; | ||
| 56 | +} | ||
| 57 | + | ||
| 58 | +.addComment textarea { | ||
| 59 | + padding: 0rpx 18rpx; | ||
| 60 | + max-height: 100rpx; | ||
| 61 | + width: 654rpx; | ||
| 62 | +} | ||
| 63 | + | ||
| 64 | +.addComment .addimages { | ||
| 65 | + padding: 0rpx 18rpx; | ||
| 66 | + margin-top: 20rpx; | ||
| 67 | + align-items: flex-end; | ||
| 68 | + width: 652rpx; | ||
| 69 | + margin-bottom: 15rpx; | ||
| 70 | +} | ||
| 71 | +.comment{ | ||
| 72 | + overflow: hidden; | ||
| 73 | + text-overflow: ellipsis; | ||
| 74 | + display: -webkit-box; | ||
| 75 | + -webkit-box-orient: vertical; | ||
| 76 | + -webkit-line-clamp: 3; | ||
| 77 | +} | ||
| 78 | +.addComment .addimages .images { | ||
| 79 | + height: 140rpx; | ||
| 80 | +} | ||
| 81 | + | ||
| 82 | +.addComment .addimages .images .rel { | ||
| 83 | + width: 140rpx; | ||
| 84 | + height: 100%; | ||
| 85 | + overflow: visible; | ||
| 86 | + margin-right: 15rpx; | ||
| 87 | +} | ||
| 88 | + | ||
| 89 | +.addComment .addimages .images image .abs { | ||
| 90 | + width: 30rpx; | ||
| 91 | + height: 30rpx; | ||
| 92 | + top: -7rpx; | ||
| 93 | + right: -7rpx; | ||
| 94 | +} | ||
| 95 | + | ||
| 96 | +.addComment .addimage { | ||
| 97 | + width: 139rpx; | ||
| 98 | + height: 139rpx; | ||
| 99 | + border: 2rpx dashed rgb(196, 196, 196); | ||
| 100 | + font-size: 16rpx; | ||
| 101 | + margin-left: 6rpx; | ||
| 102 | +} | ||
| 103 | + | ||
| 104 | +.addComment .addimage image { | ||
| 105 | + width: 60rpx; | ||
| 106 | + height: 58rpx; | ||
| 107 | +} | ||
| 108 | + | ||
| 109 | +.Grade { | ||
| 110 | + width: 100%; | ||
| 111 | + height: 310rpx; | ||
| 112 | + border-bottom: 6rpx solid rgb(245, 245, 245); | ||
| 113 | + padding-left: 45rpx; | ||
| 114 | +} | ||
| 115 | + | ||
| 116 | +.Grade .title { | ||
| 117 | + width: 100%; | ||
| 118 | + height: 105rpx; | ||
| 119 | +} | ||
| 120 | + | ||
| 121 | +.Grade .title .column { | ||
| 122 | + height: 30rpx; | ||
| 123 | + border-left: 6rpx solid rgb(211, 27, 58); | ||
| 124 | + margin-right: 12rpx; | ||
| 125 | +} | ||
| 126 | + | ||
| 127 | +.Grade .score-item { | ||
| 128 | + height: 55rpx; | ||
| 129 | + line-height: 55rpx; | ||
| 130 | +} | ||
| 131 | + | ||
| 132 | +.Grade .score-item .stars { | ||
| 133 | + margin-left: 83rpx; | ||
| 134 | +} | ||
| 135 | +.Grade .score-item .stars view{ | ||
| 136 | + width: 60rpx; | ||
| 137 | + height: 55rpx; | ||
| 138 | +} | ||
| 139 | + | ||
| 140 | +.Grade .score-item .stars image { | ||
| 141 | + width: 35rpx; | ||
| 142 | + height: 35rpx; | ||
| 143 | +} | ||
| 144 | +.Whether { | ||
| 145 | + padding:0rpx 31rpx; | ||
| 146 | +} | ||
| 147 | +.Whether .flex-right-vertical { | ||
| 148 | + height: 67rpx; | ||
| 149 | +} | ||
| 150 | + | ||
| 151 | +.Whether .flex-right-vertical .radio { | ||
| 152 | + margin-right: 15rpx; | ||
| 153 | +} | ||
| 154 | + | ||
| 155 | +.Whether .Submission { | ||
| 156 | + margin: 40rpx 0 40rpx 0; | ||
| 157 | +} | ||
| 158 | + | ||
| 159 | +.Whether .white { | ||
| 160 | + width: 364rpx; | ||
| 161 | + height: 58rpx; | ||
| 162 | + background-color: rgb(212, 28, 52); | ||
| 163 | + border-radius: 40rpx; | ||
| 164 | + line-height: 58rpx; | ||
| 165 | +} | ||
| 166 | +.Whether .receive{ | ||
| 167 | + background-color: rgb(255, 176, 63); | ||
| 168 | +} | ||
| 169 | + | ||
| 170 | + |