Commit a57894a185fc3e6e34e33f20b20f318e9eff2670

Authored by WXD-SEASON\season
1 parent 298b7a25

评价

packageB/pages/evaluate/evaluate.js
... ... @@ -140,6 +140,7 @@ Page({
140 140 getApp().request.promiseGet(url, {
141 141 data: {
142 142 number: th.data.number,
  143 + fromtype:th.data.ftype,
143 144 storeId: a.stoid
144 145 }
145 146 }).then(res => {
... ... @@ -239,7 +240,7 @@ Page({
239 240  
240 241 if(options.fromtype){
241 242 this.setData({ftype:parseInt(options.fromtype)}) ;
242   - if(options.fromtype==4) th.judge_act();
  243 + if(options.fromtype==4 || options.fromtype==1 ) th.judge_act();
243 244 }
244 245 //th.query_bea();
245 246  
... ... @@ -288,7 +289,7 @@ Page({
288 289  
289 290 var ty=this.data.ftype?this.data.ftype:2;
290 291 wx.redirectTo({
291   - url: "/pages/giftpack/evaluategift/evaluategift?actId="+id+ "&orderType="+ty+"&orderNumber="+this.data.number
  292 + url: "/pages/giftpack/evaluategift/evaluategift?actId="+id+ "&orderType="+ty+"&orderNumber="+this.data.number+"&isdg=1"
292 293 });
293 294  
294 295 },
... ... @@ -305,7 +306,8 @@ Page({
305 306 orderNumber: th.data.number,
306 307 orderType: ty,
307 308 storeId: a.stoid,
308   - userId: d.user_id
  309 + userId: d.user_id,
  310 + isdg:1//是否是导购评价
309 311 }
310 312 }).then(res => {
311 313 if (res.data.code == 0) {
... ... @@ -329,7 +331,8 @@ Page({
329 331 var th=this;
330 332 var chekc_data={};
331 333 chekc_data['storeId'] = a.stoid;
332   - chekc_data['number'] =this.data.number;
  334 + chekc_data['number'] =this.data.number;
  335 + chekc_data['fromtype'] =this.data.ftype;
333 336 getApp().request.get("/api/weshop/evaluation/evaluate/check",{
334 337 data:chekc_data,
335 338 success:function(res){
... ...
packageB/pages/evaluate/evaluate.wxml
... ... @@ -102,7 +102,9 @@
102 102 <view>查看已评价的订单</view>
103 103 </view>
104 104 </block>
105   -
  105 +<view wx:if="{{is_act==1}}" style="margin: auto;margin-bottom: 30rpx;" class="Submission flex-center yellow-b" bindtap="clike_lb">
  106 + <view>点击领取礼品</view>
  107 + </view>
106 108 <!-- 显示来个图标 -->
107 109 <view class="show_icon" style="margin-top: 60rpx;">
108 110 <view class="icon_item" bindtap="goto" data-url="/pages/index/index/index">
... ... @@ -117,12 +119,13 @@
117 119 <view>领券</view>
118 120 </view>
119 121 </view>
  122 +
  123 +
  124 +
120 125 </view>
121 126  
122 127 <view style="height: 60rpx;"></view>
123   - <view wx:if="{{is_act==1}}" style="margin: auto;margin-bottom: 30rpx;" class="Submission flex-center yellow-b" bindtap="clike_lb">
124   - <view>点击领取礼品</view>
125   - </view>
  128 +
126 129 </view>
127 130 <warn id="warn"></warn>
128 131 </block>
... ...
pages/giftpack/evaluategift/evaluategift.js
... ... @@ -31,6 +31,7 @@ Page({
31 31 orderNumber: "", //订单号
32 32 orderGoodsId: "", //商品id
33 33 orderType:1,
  34 + isdg:0,
34 35  
35 36 weappurltitle:"进入商城购物",
36 37 weappurl:"/pages/index/index/index",
... ... @@ -52,7 +53,8 @@ Page({
52 53 "orderNumber": th.data.orderNumber,
53 54 "orderType": th.data.orderType,
54 55 "orderGoodsId": th.data.orderGoodsId,
55   - "gifbagid": th.data.giftBagId
  56 + "gifbagid": th.data.giftBagId,
  57 + "isdg": th.data.isdg
56 58 }
57 59 }).then(res => {
58 60 if (res.data.code == 0) {
... ... @@ -133,12 +135,18 @@ Page({
133 135 },
134 136 onLoad: function(options) {
135 137  
  138 + var getisdg=0;
  139 + if (options.isdg)
  140 + {
  141 + getisdg=options.isdg;
  142 + }
136 143 var th = this;
137 144 th.setData({
138 145 getActId: options.actId,
139 146 orderNumber: options.orderNumber,
140 147 orderGoodsId: options.orderGoodsId,
141   - giftBagId: options.giftBagId
  148 + giftBagId: options.giftBagId,
  149 + isdg: getisdg
142 150 })
143 151  
144 152 var orderType = options.orderType;
... ...
pages/goods/goodsInfo/goodsInfo.wxml
... ... @@ -276,7 +276,7 @@
276 276 <view class="goods-name elli">{{data.goods_name}}</view>
277 277 </view>
278 278 <view class="goods-num">
279   - <view class="sales">销量:{{prom_act.buy_num}}件</view>
  279 + <view class="sales">销量:{{prom_act.buy_num+prom_act.virtual}}件</view>
280 280 <view class="stock">
281 281 折扣:{{g_filters.num((prom_price?prom_price:0)*10/data.shop_price)}}折
282 282 </view>
... ...