Closed
Merge Request #592 · created by 后端研发-苏明海


Qa


From qa into master

Closed by 后端研发-苏明海

Changes were not merged into target branch

1 participants















app.js
@@ -178,7 +178,7 @@ App({ @@ -178,7 +178,7 @@ App({
178 success: function (o) { 178 success: function (o) {
179 console.log('getwuliu'); 179 console.log('getwuliu');
180 console.log(o); 180 console.log(o);
181 - if (o.data.code == 0) { 181 + if (o.data.code == 0 && o.data.data && o.data.data.pageData && o.data.data.pageData.length>0) {
182 var arr = o.data.data.pageData; 182 var arr = o.data.data.pageData;
183 console.log(arr); 183 console.log(arr);
184 arr.forEach(function(item,index){ 184 arr.forEach(function(item,index){
app.json
1 { 1 {
2 "pages": [ 2 "pages": [
3 "pages/index/index/index", 3 "pages/index/index/index",
4 - "pages/justTest/justTest",  
5 "pages/goods/categoryList/categoryList", 4 "pages/goods/categoryList/categoryList",
6 "pages/cart/cart/cart", 5 "pages/cart/cart/cart",
7 "pages/cart/cart2/cart2", 6 "pages/cart/cart2/cart2",
@@ -86,11 +85,18 @@ @@ -86,11 +85,18 @@
86 "pages/video/index", 85 "pages/video/index",
87 "pages/template/index", 86 "pages/template/index",
88 "pages/store/index", 87 "pages/store/index",
89 - "pages/user/choice_guide/choice_guide" 88 + "pages/user/choice_guide/choice_guide",
  89 + "pages/cart/cart2_inte/cart2_inte",
  90 + "pages/giftpack/festival/festival",
  91 + "pages/team/team_more/team_more",
  92 + "pages/user/collect_list/collect_list",
  93 + "pages/user/deposit/deposit",
  94 + "pages/user/deposit/prepaid/msg/msg",
  95 + "pages/user/deposit/prepaid/prepaid"
90 ], 96 ],
91 "plugins": { 97 "plugins": {
92 "live-player-plugin": { 98 "live-player-plugin": {
93 - "version": "1.1.1", 99 + "version": "1.2.1",
94 "provider": "wx2b03c6e691cd7370" 100 "provider": "wx2b03c6e691cd7370"
95 } 101 }
96 }, 102 },
app.wxss
@@ -446,12 +446,12 @@ background: #ffe3e2; @@ -446,12 +446,12 @@ background: #ffe3e2;
446 /* 图标字体(ty) */ 446 /* 图标字体(ty) */
447 @font-face { 447 @font-face {
448 font-family: 'iconfont'; /* project id 2054717 */ 448 font-family: 'iconfont'; /* project id 2054717 */
449 - src: url('//at.alicdn.com/t/font_2054717_kp0q24eh5l.eot');  
450 - src: url('//at.alicdn.com/t/font_2054717_kp0q24eh5l.eot?#iefix') format('embedded-opentype'),  
451 - url('//at.alicdn.com/t/font_2054717_kp0q24eh5l.woff2') format('woff2'),  
452 - url('//at.alicdn.com/t/font_2054717_kp0q24eh5l.woff') format('woff'),  
453 - url('//at.alicdn.com/t/font_2054717_kp0q24eh5l.ttf') format('truetype'),  
454 - url('//at.alicdn.com/t/font_2054717_kp0q24eh5l.svg#iconfont') format('svg'); 449 + src: url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.eot');
  450 + src: url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.eot?#iefix') format('embedded-opentype'),
  451 + url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.woff2') format('woff2'),
  452 + url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.woff') format('woff'),
  453 + url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.ttf') format('truetype'),
  454 + url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.svg#iconfont') format('svg');
455 } 455 }
456 456
457 .iconfont { 457 .iconfont {
@@ -462,6 +462,10 @@ background: #ffe3e2; @@ -462,6 +462,10 @@ background: #ffe3e2;
462 -moz-osx-font-smoothing: grayscale; 462 -moz-osx-font-smoothing: grayscale;
463 } 463 }
464 464
  465 +.icon-shanchu:before {
  466 + content: "\e61b";
  467 +}
  468 +
465 .icon-buqian:before { 469 .icon-buqian:before {
466 content: "\e65f"; 470 content: "\e65f";
467 } 471 }
components/diy_goodsGroup/diy_goodsGroup.js
@@ -112,7 +112,7 @@ Component({ @@ -112,7 +112,7 @@ Component({
112 }, 112 },
113 113
114 pageLifetimes: { 114 pageLifetimes: {
115 - //游客登后,只要更新卡的情况 115 + //游客登后,只要更新卡的情况
116 show: function () { 116 show: function () {
117 //--初始化卡类-- 117 //--初始化卡类--
118 this.card_init(); 118 this.card_init();
@@ -121,9 +121,13 @@ Component({ @@ -121,9 +121,13 @@ Component({
121 121
122 methods: { 122 methods: {
123 // 这里是一个自定义方法 123 // 这里是一个自定义方法
124 - init: function (classstyle_id, wgroup) { 124 + init:async function (classstyle_id, wgroup) {
  125 +
  126 + this.setData({classstyle_id:classstyle_id})
  127 +
125 var th = this; 128 var th = this;
126 var g_id = this.data.g_id; 129 var g_id = this.data.g_id;
  130 + var len=this.data.firist_type_data.length;
127 if (classstyle_id == 1) { 131 if (classstyle_id == 1) {
128 //---手动选择的时候--- 132 //---手动选择的时候---
129 g_id = this.data.firist_type_data[th.data.firist_type_curr]; 133 g_id = this.data.firist_type_data[th.data.firist_type_curr];
@@ -147,7 +151,7 @@ Component({ @@ -147,7 +151,7 @@ Component({
147 str += g_id[i].goodsid + ","; 151 str += g_id[i].goodsid + ",";
148 } 152 }
149 str=str.substring(0, str.length - 1); 153 str=str.substring(0, str.length - 1);
150 - app.request.get("/api/weshop/goods/getgoodslistOrdby?store_id=" + os.stoid + "&goodsidlist=" + str, { 154 + await app.request.get("/api/weshop/goods/getgoodslistOrdby?store_id=" + os.stoid + "&goodsidlist=" + str, {
151 isShowLoading:false, 155 isShowLoading:false,
152 success: function(res) { 156 success: function(res) {
153 157
@@ -179,8 +183,8 @@ Component({ @@ -179,8 +183,8 @@ Component({
179 } 183 }
180 184
181 //---控制有没有加载更多的按钮--- 185 //---控制有没有加载更多的按钮---
182 - if (th.data.firist_type_curr == th.data.firist_type_data.length) {th.setData({ goods_btn: [] }); }  
183 - else th.setData({ goods_btn: res.data}); 186 + if (th.data.firist_type_curr >= len) {th.setData({ goods_btn: [] }); }
  187 + else th.setData({ goods_btn: [1,2]});
184 } 188 }
185 } 189 }
186 190
@@ -199,7 +203,7 @@ Component({ @@ -199,7 +203,7 @@ Component({
199 if(th.data.is_hot) r_data.is_hot=th.data.is_hot; 203 if(th.data.is_hot) r_data.is_hot=th.data.is_hot;
200 if(th.data.is_new) r_data.is_new=th.data.is_new; 204 if(th.data.is_new) r_data.is_new=th.data.is_new;
201 205
202 - app.request.promiseGet("/api/weshop/goods/page", { 206 + await app.request.promiseGet("/api/weshop/goods/page", {
203 data:r_data 207 data:r_data
204 }).then(res => { 208 }).then(res => {
205 //商品地址 209 //商品地址
@@ -216,7 +220,7 @@ Component({ @@ -216,7 +220,7 @@ Component({
216 break; 220 break;
217 case "3": 221 case "3":
218 var item = {}; 222 var item = {};
219 - app.request.promiseGet("/api/weshop/goodsGroup/pageGoodsList", { 223 + await app.request.promiseGet("/api/weshop/goodsGroup/pageGoodsList", {
220 data: { 224 data: {
221 store_id:os.stoid , 225 store_id:os.stoid ,
222 gpid: wgroup, 226 gpid: wgroup,
components/diy_goodsGroup/diy_goodsGroup.wxml
@@ -602,14 +602,16 @@ @@ -602,14 +602,16 @@
602 </block> 602 </block>
603 <view class="clear"></view> 603 <view class="clear"></view>
604 </view> 604 </view>
  605 +
  606 +
605 <!-- 商品的显示不是左右 --> 607 <!-- 商品的显示不是左右 -->
606 <block wx:if="{{object.column!=5}}"> 608 <block wx:if="{{object.column!=5}}">
607 -<block wx:if="{{object.classstyle=='1' }}"><view class="button-wrapper" wx:if="{{goods_btn.length!=0 }}" style="border: none"> 609 +<block wx:if="{{classstyle_id=='1' }}"><view class="button-wrapper" wx:if="{{goods_btn.length!=0 }}" style="border: none">
608 <button type="default" size="default" loading="{{loading}}" disabled="{{disabled}}" bindtap="setLoading" style="background-color: rgba(0,0,0,0);border:none"> 610 <button type="default" size="default" loading="{{loading}}" disabled="{{disabled}}" bindtap="setLoading" style="background-color: rgba(0,0,0,0);border:none">
609 {{loadText}} 611 {{loadText}}
610 </button> 612 </button>
611 </view></block> 613 </view></block>
612 -<block wx:if="{{object.classstyle!='1' }}"> 614 +<block wx:if="{{classstyle_id!='1' }}">
613 <view class="button-wrapper" wx:if="{{object.goodscount * page <total }}" style="border: none"> 615 <view class="button-wrapper" wx:if="{{object.goodscount * page <total }}" style="border: none">
614 <button type="default" size="default" loading="{{loading}}" disabled="{{disabled}}" bindtap="setLoading" style="background-color: rgba(0,0,0,0);border:none">{{loadText}}</button> 616 <button type="default" size="default" loading="{{loading}}" disabled="{{disabled}}" bindtap="setLoading" style="background-color: rgba(0,0,0,0);border:none">{{loadText}}</button>
615 </view> 617 </view>
components/diy_picMax/diy_picMax.wxss
1 .picMax{ 1 .picMax{
2 width: 100%; 2 width: 100%;
3 overflow: hidden; 3 overflow: hidden;
  4 + margin-top: -0.01rpx;
4 } 5 }
5 .pic_item{ 6 .pic_item{
6 - float: left; 7 + float: left; margin: 0; padding: 0;
7 } 8 }
8 -.pic_item image{width: 100%;vertical-align: bottom;} 9 +.pic_item image{width: 100%;vertical-align: bottom; margin: 0; }
9 .picMax-clear{clear: both;} 10 .picMax-clear{clear: both;}
10 11
11 12
@@ -16,7 +17,10 @@ @@ -16,7 +17,10 @@
16 position:absolute;top:0; left:0; 17 position:absolute;top:0; left:0;
17 } 18 }
18 .pic_item2 image{ width: 100%; height: 100%;} 19 .pic_item2 image{ width: 100%; height: 100%;}
19 -.width_1{width: 187.5rpx}.width_2{width: 375rpx;}.width_3{width: 562.5rpx}.width_4{width:750rpx;} 20 +/* .width_1{width: 187.5rpx}.width_2{width: 375rpx;}.width_3{width: 562.5rpx}.width_4{width:750rpx;} */
  21 +.width_1{width: 25%}.width_2{width: 50%}.width_3{width: 75%}.width_4{width:100%}
  22 +
  23 +
20 .height_1{height: 187.5rpx;}.height_2{height: 375rpx;}.height_3{height: 562.5rpx}.height_4{height: 748rpx;} 24 .height_1{height: 187.5rpx;}.height_2{height: 375rpx;}.height_3{height: 562.5rpx}.height_4{height: 748rpx;}
21 .mar_x1{margin-left:187.5rpx;}.mar_x2{margin-left:375rpx;}.mar_x3{margin-left:562.5rpx}.mar_x4{margin-left: 748rpx;} 25 .mar_x1{margin-left:187.5rpx;}.mar_x2{margin-left:375rpx;}.mar_x3{margin-left:562.5rpx}.mar_x4{margin-left: 748rpx;}
22 .mar_y1{margin-top: 187.5rpx;}.mar_y2{margin-top: 375rpx;}.mar_y3{margin-top: 562.5rpx}.mar_y4{margin-top: 748rpx;} 26 .mar_y1{margin-top: 187.5rpx;}.mar_y2{margin-top: 375rpx;}.mar_y3{margin-top: 562.5rpx}.mar_y4{margin-top: 748rpx;}
23 \ No newline at end of file 27 \ No newline at end of file
components/diy_pingd_buy/diy_pingd_buy.js
@@ -69,7 +69,7 @@ Component({ @@ -69,7 +69,7 @@ Component({
69 69
70 //如果拼单的数组为空的时候 70 //如果拼单的数组为空的时候
71 var goodslist=res.data.data; 71 var goodslist=res.data.data;
72 - if(goodslist.length==0) return false; 72 + if(!goodslist || goodslist.length==0) return false;
73 73
74 /*--商品队列按照添加的顺序排列--*/ 74 /*--商品队列按照添加的顺序排列--*/
75 g_id.forEach(function(val, ind) { 75 g_id.forEach(function(val, ind) {
components/diy_scan/diy_scan.js 0 → 100644
  1 +Component({
  2 + properties: {
  3 + object: {
  4 + type: Object,
  5 + value: null
  6 + },
  7 + // 这里定义了innerText属性,属性值可以在组件使用时指定
  8 + },
  9 + data: {
  10 + // 这里是一些组件内部数据
  11 + someData: {},
  12 + left:getApp().globalData.windowWidth-50,
  13 + top:200,
  14 + },
  15 + methods: {
  16 + // 这里是一个自定义方法
  17 + customMethod() { },
  18 + //-- 如果触摸移动 --
  19 + setTouchMove:function (e) {
  20 + var w=getApp().globalData.windowWidth;
  21 + if(e.touches[0].clientX<10 || e.touches[0].clientX>w-50) return false;
  22 + if(e.touches[0].clientY<10) return false;
  23 + this.setData({left: e.touches[0].clientX,top: e.touches[0].clientY})
  24 + },
  25 +
  26 + //-- 扫描成功之后 --
  27 + getScancode:function(){
  28 + var _this = this;
  29 + //-- 允许从相机和相册扫码 --
  30 + wx.scanCode({
  31 + success: (res) => {
  32 + var result = res.result;
  33 + wx.navigateTo({
  34 + url: "/pages/goods/search/search?s_key=" + result,
  35 + });
  36 + }
  37 + })
  38 + }
  39 + }
  40 +})
0 \ No newline at end of file 41 \ No newline at end of file
components/diy_scan/diy_scan.json 0 → 100644
  1 +{
  2 + "component": true
  3 + }
0 \ No newline at end of file 4 \ No newline at end of file
components/diy_scan/diy_scan.wxml 0 → 100644
  1 +<view class="scan_view" disable-scroll="true" bindtap='getScancode' style="top:{{top}}px;left:{{left}}px;" bindtouchmove="setTouchMove">
  2 + <view style="text-align: center;">
  3 + <image class="cs-img" src="{{object.img}}"></image>
  4 + <view class="s_title" wx:if="{{object.title!=''}}">{{object.title}}</view>
  5 + </view>
  6 +</view>
  7 +
components/diy_scan/diy_scan.wxss 0 → 100644
  1 +.scan_view{
  2 + position: fixed;z-index: 100; left: 0; top: 0; width: 100rpx; height: 100rpx;
  3 + border-radius: 50%; background-color: rgba(125,125,2,0.5);box-shadow: #ccc 0px 0px 70px 1px;
  4 + display: flex;align-items: center;justify-content: center; color: #f8f8f8;
  5 +}
  6 +.cs-img{ width: 32rpx; height: 32rpx; }
  7 +.s_title{ font-size: 20rpx;}
0 \ No newline at end of file 8 \ No newline at end of file
components/diy_seckill/diy_seckill.js
@@ -65,7 +65,7 @@ Component({ @@ -65,7 +65,7 @@ Component({
65 //如果秒杀的数组为空的时候 65 //如果秒杀的数组为空的时候
66 66
67 var goodslist=res.data.data; 67 var goodslist=res.data.data;
68 - if(goodslist.length==0) return false; 68 + if(!goodslist || goodslist.length==0) return false;
69 69
70 // 判断火热,预热 70 // 判断火热,预热
71 var newTime = ut.gettimestamp(); 71 var newTime = ut.gettimestamp();
components/diy_service/diy_service.wxml
1 <!--有在线客户 和 打电话--> 1 <!--有在线客户 和 打电话-->
2 <block wx:if="{{sys_switch.weapp_customertype}}"> 2 <block wx:if="{{sys_switch.weapp_customertype}}">
3 - <!-- 判断是不是有登 --> 3 + <!-- 判断是不是有登 -->
4 <view wx:if="{{userInfo}}" class="custom-service" bindtap="go_user" > 4 <view wx:if="{{userInfo}}" class="custom-service" bindtap="go_user" >
5 <view style="text-align: center;"> 5 <view style="text-align: center;">
6 <image class="cs-img" src="{{object.img}}"></image> 6 <image class="cs-img" src="{{object.img}}"></image>
components/diy_shopname/diy_shopname.js
@@ -27,15 +27,21 @@ Component({ @@ -27,15 +27,21 @@ Component({
27 //--所有商品-- 27 //--所有商品--
28 getApp().request.promiseGet("/api/weshop/goods/page/", 28 getApp().request.promiseGet("/api/weshop/goods/page/",
29 {data:{ isonsale: 1, store_id: o.stoid,page:1,pageSize:1}}).then(res => { 29 {data:{ isonsale: 1, store_id: o.stoid,page:1,pageSize:1}}).then(res => {
30 - var total=res.data.data.total;  
31 - th.setData({total:total}) 30 +
  31 + if(res.data.code==0 && res.data.data){
  32 + var total=res.data.data.total;
  33 + th.setData({total:total})
  34 + }
32 }) 35 })
33 36
34 //--所有新品-- 37 //--所有新品--
35 getApp().request.promiseGet("/api/weshop/goods/page/", 38 getApp().request.promiseGet("/api/weshop/goods/page/",
36 {data:{is_new:1,isonsale: 1, store_id: o.stoid,page:1,pageSize:1}}).then(res => { 39 {data:{is_new:1,isonsale: 1, store_id: o.stoid,page:1,pageSize:1}}).then(res => {
37 - var total=res.data.data.total;  
38 - th.setData({new_total:total}) 40 + if(res.data.code==0 && res.data.data)
  41 + {
  42 + var total = res.data.data.total;
  43 + th.setData({new_total: total})
  44 + }
39 }) 45 })
40 46
41 }, 47 },
components/diy_shopname/diy_shopname.wxml
@@ -3,18 +3,20 @@ @@ -3,18 +3,20 @@
3 <view class="big"> 3 <view class="big">
4 4
5 <view class="big_picture_border"> 5 <view class="big_picture_border">
6 - <image class="big_picture" src='{{object.srcimg}}' binderror="berror" data-err="object.srcimg"></image> 6 + <image mode="widthFix" style="display: block;" class="big_picture" src='{{object.srcimg}}' binderror="berror" data-err="object.srcimg"></image>
7 </view> 7 </view>
8 <block wx:if="{{object.style==1}}"> 8 <block wx:if="{{object.style==1}}">
9 9
10 - <view class="big_border"> 10 + <view style="position: relative; height: 150rpx;">
  11 + <view class="big_border" >
11 <view class="circle"> 12 <view class="circle">
12 <view class="border"> 13 <view class="border">
13 - <image class="wxd_ww" src='{{sto}}' bindtap="go_user"></image> 14 + <image class="wxd_ww" src='{{sto}}' bindtap="go_user"></image>
14 </view> 15 </view>
15 </view> 16 </view>
16 <view class="font">{{store_name}}</view> 17 <view class="font">{{store_name}}</view>
17 </view> 18 </view>
  19 + </view>
18 20
19 <view class="all_view"> 21 <view class="all_view">
20 <view class="v_item" bindtap="go_all_wares"> 22 <view class="v_item" bindtap="go_all_wares">
@@ -36,8 +38,7 @@ @@ -36,8 +38,7 @@
36 </view> 38 </view>
37 </block> 39 </block>
38 40
39 -  
40 - <block wx:else="{{object.style==2}}"> 41 + <block wx:if="{{object.style==2}}">
41 <view class="big_border_two"> 42 <view class="big_border_two">
42 <view class="circle_tow"> 43 <view class="circle_tow">
43 <view class="border"> 44 <view class="border">
@@ -48,35 +49,38 @@ @@ -48,35 +49,38 @@
48 <view class="fonts">{{store_name}}</view> 49 <view class="fonts">{{store_name}}</view>
49 </view> 50 </view>
50 </view> 51 </view>
51 - <view class="base_font">  
52 - <view class="arrange">  
53 - <view class="base_font_one">  
54 - <navigator url="/pages/goods/goodsList/goodsList" class="navi">  
55 - <view>{{total}}</view>  
56 - <view>全部商品</view>  
57 - </navigator>  
58 - </view>  
59 -  
60 - <view class="base_font_one">  
61 - <view class="shuxian">|</view>  
62 - <navigator url="/pages/goods/goodsList/goodsList?is_new=1" class="navi">  
63 - <view>{{new_total}}</view>  
64 - <view>上新商品</view>  
65 - </navigator>  
66 - </view>  
67 -  
68 - <view class="base_font_one" bindtap="go_user">  
69 - <view class="shuxian">|</view>  
70 - <view class="navi">  
71 - <view >  
72 - <image class="user_pictrue_two" src='{{imghost}}/miniapp/images/numb.png'></image>  
73 - </view>  
74 - <view>个人中心</view>  
75 - </view>  
76 - </view>  
77 - </view>  
78 - </view>  
79 </block> 52 </block>
80 </view> 53 </view>
  54 +
  55 + <block wx:if="{{object.style==2}}">
  56 + <view class="base_font">
  57 + <view class="arrange">
  58 + <view class="base_font_one">
  59 + <navigator url="/pages/goods/goodsList/goodsList" class="navi">
  60 + <view>{{total}}</view>
  61 + <view>全部商品</view>
  62 + </navigator>
  63 + </view>
  64 +
  65 + <view class="base_font_one">
  66 + <view class="shuxian">|</view>
  67 + <navigator url="/pages/goods/goodsList/goodsList?is_new=1" class="navi">
  68 + <view>{{new_total}}</view>
  69 + <view>上新商品</view>
  70 + </navigator>
  71 + </view>
  72 +
  73 + <view class="base_font_one" bindtap="go_user">
  74 + <view class="shuxian">|</view>
  75 + <view class="navi">
  76 + <view >
  77 + <image class="user_pictrue_two" src='{{imghost}}/miniapp/images/numb.png'></image>
  78 + </view>
  79 + <view>个人中心</view>
  80 + </view>
  81 + </view>
  82 + </view>
  83 + </view>
  84 + </block>
81 </view> 85 </view>
82 86
components/diy_shopname/diy_shopname.wxss
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 text-align:center; 4 text-align:center;
5 margin:0 auto; 5 margin:0 auto;
6 position: relative; 6 position: relative;
7 - height: 500rpx; 7 + /* height: 500rpx; */
8 } 8 }
9 9
10 .s1_gk_a1{ 10 .s1_gk_a1{
@@ -15,11 +15,9 @@ @@ -15,11 +15,9 @@
15 15
16 /* 圆形小图片 */ 16 /* 圆形小图片 */
17 .wxd_ww { 17 .wxd_ww {
18 - width: 126rpx;  
19 - height: 126rpx; 18 + width: 100%;
  19 + height: 100%;
20 /* justify-content: center; */ 20 /* justify-content: center; */
21 - margin-top: 20rpx;  
22 - margin-left: 6rpx;  
23 } 21 }
24 22
25 /* 小图片圆边框 */ 23 /* 小图片圆边框 */
@@ -43,8 +41,8 @@ @@ -43,8 +41,8 @@
43 /* 设置小图片外面的view的宽高 */ 41 /* 设置小图片外面的view的宽高 */
44 42
45 .circle_tow .border { 43 .circle_tow .border {
46 - width: 140rpx;  
47 - height: 140rpx; 44 + width: 100%;
  45 + height: 100%;
48 } 46 }
49 47
50 /* 小图片最大外边框 */ 48 /* 小图片最大外边框 */
@@ -52,7 +50,7 @@ @@ -52,7 +50,7 @@
52 .big_border { 50 .big_border {
53 width: 192rpx; 51 width: 192rpx;
54 height: 214rpx; 52 height: 214rpx;
55 - position: relative; 53 + position: absolute;
56 top: -82rpx; 54 top: -82rpx;
57 left: 10px; 55 left: 10px;
58 } 56 }
@@ -69,7 +67,7 @@ @@ -69,7 +67,7 @@
69 67
70 .big_picture_border { 68 .big_picture_border {
71 width: 100%; 69 width: 100%;
72 - height: 320rpx; 70 + /* height: 320rpx; */
73 } 71 }
74 72
75 73
@@ -140,9 +138,10 @@ left:-116rpx; @@ -140,9 +138,10 @@ left:-116rpx;
140 .big_border_two { 138 .big_border_two {
141 width: 100%; 139 width: 100%;
142 height: 260rpx; 140 height: 260rpx;
143 - position: relative;  
144 - top: -274rpx; 141 + position: absolute;
  142 + top: -130rpx;
145 text-align: center; 143 text-align: center;
  144 + margin-top: 50%;
146 } 145 }
147 146
148 /* 小图片2圆边框 */ 147 /* 小图片2圆边框 */
@@ -189,7 +188,6 @@ left:-116rpx; @@ -189,7 +188,6 @@ left:-116rpx;
189 width: 100%; 188 width: 100%;
190 height: 120rpx; 189 height: 120rpx;
191 position: relative; 190 position: relative;
192 - top: -250rpx;  
193 } 191 }
194 /* 使里面的view纵向排列 */ 192 /* 使里面的view纵向排列 */
195 .arrange{ 193 .arrange{
@@ -223,11 +221,11 @@ left:-116rpx; @@ -223,11 +221,11 @@ left:-116rpx;
223 } 221 }
224 .wai_zwp{ 222 .wai_zwp{
225 background-color: white; 223 background-color: white;
226 - height: 500rpx; 224 + /* height: 500rpx; */
227 } 225 }
228 226
229 .shopname_title_size{ font-size: 34rpx} 227 .shopname_title_size{ font-size: 34rpx}
230 -.big .all_view{display: flex; width: 500rpx; position:absolute; bottom:90rpx;right: 0 } 228 +.big .all_view{display: flex; width: 500rpx; position:absolute; bottom:rpx;right: 0 }
231 .big .all_view .v_item{width:33%; } 229 .big .all_view .v_item{width:33%; }
232 230
233 .big_border_two .title_center{ display: flex; justify-content: center;} 231 .big_border_two .title_center{ display: flex; justify-content: center;}
components/diy_video/diy_video.js
  1 +var t = getApp(),
  2 + a = t.request,
  3 + os = t.globalData.setting;
  4 +
1 Component({ 5 Component({
2 properties: { 6 properties: {
3 object: { 7 object: {
@@ -11,10 +15,17 @@ Component({ @@ -11,10 +15,17 @@ Component({
11 // 这里是一些组件内部数据 15 // 这里是一些组件内部数据
12 someData: {}, 16 someData: {},
13 videoUrl: "", 17 videoUrl: "",
  18 + url:os.imghost
14 }, 19 },
15 20
16 - ready: function () {  
17 - this.create_url(); 21 + ready: function () {
  22 + //-- 如果是本地视频的时候 --
  23 + if(this.properties.object.style!=2){
  24 + //网络地址
  25 + this.create_url();
  26 + }else{
  27 + this.setData({videoUrl:this.properties.object.src});
  28 + }
18 }, 29 },
19 methods: { 30 methods: {
20 // 这里是一个自定义方法 31 // 这里是一个自定义方法
components/diy_video/diy_video.wxml
1 <view class="vd_view"> 1 <view class="vd_view">
2 -<video class="vd_web" src="{{videoUrl}}"></video> 2 + <video class="vd_web" src="{{videoUrl}}"></video>
3 </view> 3 </view>
4 \ No newline at end of file 4 \ No newline at end of file
components/goods_list/goods_list.js
@@ -24,7 +24,7 @@ Component({ @@ -24,7 +24,7 @@ Component({
24 ready: function () { 24 ready: function () {
25 }, 25 },
26 pageLifetimes:{ 26 pageLifetimes:{
27 - //要处理一下,游客登后的界面的变化,主要还该是改变会员 27 + //要处理一下,游客登后的界面的变化,主要还该是改变会员
28 show: function () { 28 show: function () {
29 this.init(); 29 this.init();
30 } 30 }
@@ -151,6 +151,16 @@ Component({ @@ -151,6 +151,16 @@ Component({
151 var th = this; 151 var th = this;
152 getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, 152 getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid,
153 {}).then(res => { 153 {}).then(res => {
  154 +
  155 + if(res.data.code!=0 || !res.data.data){
  156 + var ob = {
  157 + "card_list": [],
  158 + "name_map": ""
  159 + };
  160 + func(ob);
  161 + return false;
  162 + }
  163 +
154 var plusCard = res.data.data; 164 var plusCard = res.data.data;
155 var arr = [1219, 2089, 3031]; 165 var arr = [1219, 2089, 3031];
156 var new_arr = new Array(); 166 var new_arr = new Array();
images/share/miao_share.png

14 KB | W: | H:

6.07 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
packageA/pages/activity_share/activity_share.js
@@ -59,7 +59,7 @@ Page({ @@ -59,7 +59,7 @@ Page({
59 var StaffId=options.StaffId; 59 var StaffId=options.StaffId;
60 var StorageId=options.StorageId; 60 var StorageId=options.StorageId;
61 if(first_leader){ 61 if(first_leader){
62 - //-- user_id代过来免登 -- 62 + //-- user_id代过来免登 --
63 getApp().globalData.user_id=first_leader; 63 getApp().globalData.user_id=first_leader;
64 getApp().getUserFir(); 64 getApp().getUserFir();
65 65
@@ -466,6 +466,13 @@ Page({ @@ -466,6 +466,13 @@ Page({
466 var storid = oo.stoid; 466 var storid = oo.stoid;
467 var th = this; 467 var th = this;
468 getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => { 468 getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => {
  469 +
  470 + if(res.data.code!=0 || !res.data.data){
  471 + var ob={"card_list":[],"name_map":''};
  472 + func(ob);
  473 + return false;
  474 + }
  475 +
469 var plusCard = res.data.data; 476 var plusCard = res.data.data;
470 var arr = [1219, 2089, 3031]; 477 var arr = [1219, 2089, 3031];
471 var new_arr = new Array(); 478 var new_arr = new Array();
packageA/pages/chongzhi/chongzhi.wxml
@@ -36,6 +36,7 @@ @@ -36,6 +36,7 @@
36 <view class="bottom" wx:if="{{currentIndex == 0}}" > 36 <view class="bottom" wx:if="{{currentIndex == 0}}" >
37 <text wx:if="{{g_filter.is_acting(item.EndDate)}}" 37 <text wx:if="{{g_filter.is_acting(item.EndDate)}}"
38 catchtap="viewDetails" data-index="{{index}}" class="btn" >立即使用</text> 38 catchtap="viewDetails" data-index="{{index}}" class="btn" >立即使用</text>
  39 + <text wx:else class="btn" style="background-color: #ccc;">已过期</text>
39 <text data-index="{{index}}" class="btn details" >详情</text> 40 <text data-index="{{index}}" class="btn details" >详情</text>
40 </view> 41 </view>
41 <view class="bottom" wx:if="{{currentIndex == 1}}" > 42 <view class="bottom" wx:if="{{currentIndex == 1}}" >
packageA/pages/goods_share/goods_share.js
@@ -36,7 +36,7 @@ Page({ @@ -36,7 +36,7 @@ Page({
36 var StaffId=options.StaffId; 36 var StaffId=options.StaffId;
37 var StorageId=options.StorageId; 37 var StorageId=options.StorageId;
38 if(first_leader){ 38 if(first_leader){
39 - //-- user_id代过来免登 -- 39 + //-- user_id代过来免登 --
40 getApp().globalData.user_id=first_leader; 40 getApp().globalData.user_id=first_leader;
41 getApp().getUserFir(); 41 getApp().getUserFir();
42 42
@@ -281,6 +281,13 @@ Page({ @@ -281,6 +281,13 @@ Page({
281 var storid = oo.stoid; 281 var storid = oo.stoid;
282 var th = this; 282 var th = this;
283 getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => { 283 getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => {
  284 +
  285 + if(res.data.code!=0 || !res.data.data){
  286 + var ob={"card_list":[],"name_map":''};
  287 + func(ob);
  288 + return false;
  289 + }
  290 +
284 var plusCard = res.data.data; 291 var plusCard = res.data.data;
285 var arr = [1219, 2089, 3031]; 292 var arr = [1219, 2089, 3031];
286 var new_arr = new Array(); 293 var new_arr = new Array();
packageA/pages/jfbuy/jfbuy.js
@@ -80,7 +80,7 @@ Page({ @@ -80,7 +80,7 @@ Page({
80 // //接受有没有导购的参数 80 // //接受有没有导购的参数
81 // var first_leader=options.first_leader; 81 // var first_leader=options.first_leader;
82 // if(first_leader){ 82 // if(first_leader){
83 - // //-- user_id代过来免登 -- 83 + // //-- user_id代过来免登 --
84 // getApp().globalData.user_id=first_leader; 84 // getApp().globalData.user_id=first_leader;
85 // getApp().getUserFir(); 85 // getApp().getUserFir();
86 // } 86 // }
@@ -297,7 +297,7 @@ Page({ @@ -297,7 +297,7 @@ Page({
297 // 关闭加载状态 297 // 关闭加载状态
298 th.data.is_load2=0; 298 th.data.is_load2=0;
299 // 请求成功 299 // 请求成功
300 - if(res.data.code==0) { 300 + if(res.data.code==0 && res.data.data && res.data.data.pageData) {
301 if(res.data.data.pageData.length>0) { 301 if(res.data.data.pageData.length>0) {
302 th.data.currentPage2++; 302 th.data.currentPage2++;
303 var data = res.data.data.pageData; 303 var data = res.data.data.pageData;
packageA/pages/liveStreamDetails/liveStreamDetails.js
@@ -399,13 +399,18 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un @@ -399,13 +399,18 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un
399 this.getSystemInfo(); 399 this.getSystemInfo();
400 400
401 var first_leader=options.first_leader; 401 var first_leader=options.first_leader;
  402 + var staffId=options.staffId;
  403 + var storageId=options.storageId;
  404 +
402 if(first_leader){ 405 if(first_leader){
403 - //-- user_id代过来免登 -- 406 + //-- user_id代过来免登 --
404 getApp().globalData.first_leader=first_leader; 407 getApp().globalData.first_leader=first_leader;
405 //调用接口判断是不是会员 408 //调用接口判断是不是会员
406 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+o.stoid+"/"+first_leader,{}).then(res=>{ 409 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+o.stoid+"/"+first_leader,{}).then(res=>{
407 if(res.data.code==0){ 410 if(res.data.code==0){
408 - getApp().globalData.guide_id=res.data.data.id; 411 + getApp().globalData.guide_id=res.data.data.id;
  412 + getApp().globalData.staffId=staffId;
  413 + getApp().globalData.storageId=storageId;
409 } 414 }
410 }) 415 })
411 } 416 }
@@ -420,6 +425,22 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un @@ -420,6 +425,22 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un
420 that.setData({ 425 that.setData({
421 details: obj 426 details: obj
422 }) 427 })
  428 +
  429 + //-- 如果是导购的时候 --
  430 + if(getApp().globalData.guide_id && getApp().globalData.user_id){
  431 + //报错领取记录
  432 + var record={};
  433 + record.storeId=os.stoid;
  434 + record.ReceiveTime=ut.formatTime();
  435 + record.ReceiveType=7;
  436 + record.ReceiveUserId=getApp().globalData.user_id;
  437 + record.ShareStaffId=getApp().globalData.staffId;
  438 + record.ShareStorageId=getApp().globalData.storageId;
  439 + record.shareActId=details.id;
  440 + record.shareActName=details.name;
  441 + getApp().request.promiseGet.post('api/weshop/MdReceiveType/saveReceive',{data:record}).then(res=>{})
  442 + }
  443 +
423 444
424 445
425 // 请求主图 446 // 请求主图
packageA/pages/live_share/live_share.js
@@ -31,7 +31,7 @@ Page({ @@ -31,7 +31,7 @@ Page({
31 var StaffId=options.StaffId; 31 var StaffId=options.StaffId;
32 var StorageId=options.StorageId; 32 var StorageId=options.StorageId;
33 if(first_leader){ 33 if(first_leader){
34 - //-- user_id代过来免登 -- 34 + //-- user_id代过来免登 --
35 getApp().globalData.user_id=first_leader; 35 getApp().globalData.user_id=first_leader;
36 getApp().getUserFir(); 36 getApp().getUserFir();
37 //设置分享会员和导购id和归属门店ID 37 //设置分享会员和导购id和归属门店ID
packageA/pages/prom_list/prom_list.js
@@ -39,6 +39,7 @@ Page({ @@ -39,6 +39,7 @@ Page({
39 goodsInputNum:1, 39 goodsInputNum:1,
40 g_buy_num: null, 40 g_buy_num: null,
41 sele_collocation:null, 41 sele_collocation:null,
  42 +
42 }, 43 },
43 44
44 //------初始化加载---------- 45 //------初始化加载----------
@@ -108,7 +109,7 @@ Page({ @@ -108,7 +109,7 @@ Page({
108 getApp().request.promiseGet("/api/weshop/pickup/list",{ 109 getApp().request.promiseGet("/api/weshop/pickup/list",{
109 data:{store_id:os.stoid,pickup_id:e.pickup_id,lat:th.data.lat,lon: th.data.lon}, 110 data:{store_id:os.stoid,pickup_id:e.pickup_id,lat:th.data.lat,lon: th.data.lon},
110 }).then(res=>{ 111 }).then(res=>{
111 - if(res.data.code==0){ 112 + if(res.data.code==0 && res.data.data && res.data.data.pageData){
112 e=res.data.data.pageData[0]; 113 e=res.data.data.pageData[0];
113 if (e){ 114 if (e){
114 appd.pk_store=e; 115 appd.pk_store=e;
@@ -240,20 +241,22 @@ Page({ @@ -240,20 +241,22 @@ Page({
240 }else{ 241 }else{
241 ee.setData({ data: t.data.data, }); 242 ee.setData({ data: t.data.data, });
242 } 243 }
243 -  
244 - /*---获取活动的重表---*/  
245 - //调用接口判断订单优惠,  
246 - getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid+"/"+ee.data.gid+"/2", {}).then(res => {  
247 - if(res.data.code==0){  
248 - var r_data=res.data.data;  
249 - th.loop_promise(0,r_data.collocationList,function(){  
250 - ee.setData({  
251 - collocationGoods:r_data.collocationPromList,  
252 - collocationList:r_data.collocationList,  
253 - })  
254 - })  
255 - }  
256 - }) 244 +
  245 + if(!ee.data.collocationList){
  246 + /*---获取活动的重表---*/
  247 + //调用接口判断订单优惠,
  248 + getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid+"/"+ee.data.gid+"/2", {}).then(res => {
  249 + if(res.data.code==0){
  250 + var r_data=res.data.data;
  251 + th.loop_promise(0,r_data.collocationList,function(){
  252 + ee.setData({
  253 + collocationGoods:r_data.collocationPromList,
  254 + collocationList:r_data.collocationList,
  255 + })
  256 + })
  257 + }
  258 + })
  259 + }
257 260
258 //获取统一条形码,普通商品和优惠促销的商品 261 //获取统一条形码,普通商品和优惠促销的商品
259 if ( t.data.data.prom_type == 5){ 262 if ( t.data.data.prom_type == 5){
@@ -273,7 +276,7 @@ Page({ @@ -273,7 +276,7 @@ Page({
273 } 276 }
274 //---通过接口获取门店的线下库存信息-- 277 //---通过接口获取门店的线下库存信息--
275 return getApp().request.promiseGet("/api/weshop/goods/getWareStorages",{ 278 return getApp().request.promiseGet("/api/weshop/goods/getWareStorages",{
276 - data:{storageNos:that.data.fir_def_store.pickup_no,wareIds:encodeURIComponent(th.data.data.erpwareid),storeId:os.stoid} 279 + data:{storageNos:that.data.fir_def_store.pickup_no,wareIds:encodeURIComponent(th.data.data.erpwareid),storeId:os.stoid,pageSize:2000}
277 }) 280 })
278 }).then(res=>{ 281 }).then(res=>{
279 if(res.data.code==0 && res.data.data.total>0){ 282 if(res.data.code==0 && res.data.data.total>0){
@@ -413,7 +416,7 @@ Page({ @@ -413,7 +416,7 @@ Page({
413 var pick=th.get_pick_from_list(th.data.sto_sele_id) 416 var pick=th.get_pick_from_list(th.data.sto_sele_id)
414 //---通过接口获取门店的线下库存信息-- 417 //---通过接口获取门店的线下库存信息--
415 getApp().request.get("/api/weshop/goods/getWareStorages",{ 418 getApp().request.get("/api/weshop/goods/getWareStorages",{
416 - data:{storageNos:pick.pickup_no,wareIds:encodeURIComponent(th.data.data.erpwareid),storeId:os.stoid}, 419 + data:{storageNos:pick.pickup_no,wareIds:encodeURIComponent(th.data.data.erpwareid),storeId:os.stoid,pageSize:2000},
417 success:function(res){ 420 success:function(res){
418 if(res.data.code==0){ 421 if(res.data.code==0){
419 if(res.data.data.pageData.length>0){ 422 if(res.data.data.pageData.length>0){
@@ -722,7 +725,7 @@ Page({ @@ -722,7 +725,7 @@ Page({
722 if (e.data.code == 0) { 725 if (e.data.code == 0) {
723 726
724 //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 727 //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店
725 - if(dd.lat && !th.data.def_pick_store && th.data.bconfig.is_sort_storage){ 728 + if(dd.lat && !th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage){
726 th.setData({ 729 th.setData({
727 def_pick_store:e.data.data.pageData[0], 730 def_pick_store:e.data.data.pageData[0],
728 sto_sele_name: e.data.data.pageData[0].pickup_name, 731 sto_sele_name: e.data.data.pageData[0].pickup_name,
@@ -905,7 +908,7 @@ Page({ @@ -905,7 +908,7 @@ Page({
905 only_pk: e.data.data.pageData 908 only_pk: e.data.data.pageData
906 }); 909 });
907 //-----如果没有默认门店,要取第一个门店作为默认店------ 910 //-----如果没有默认门店,要取第一个门店作为默认店------
908 - if (!th.data.def_pick_store && th.data.bconfig.is_sort_storage) { 911 + if (!th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage) {
909 th.setData({ 912 th.setData({
910 def_pick_store:e.data.data.pageData[0], 913 def_pick_store:e.data.data.pageData[0],
911 sto_sele_name: e.data.data.pageData[0].pickup_name, 914 sto_sele_name: e.data.data.pageData[0].pickup_name,
@@ -942,7 +945,7 @@ Page({ @@ -942,7 +945,7 @@ Page({
942 } 945 }
943 //---通过接口获取门店的线下库存信息-- 946 //---通过接口获取门店的线下库存信息--
944 return getApp().request.promiseGet("/api/weshop/goods/getWareStorages",{ 947 return getApp().request.promiseGet("/api/weshop/goods/getWareStorages",{
945 - data:{storageNos:pkno_str,wareIds:encodeURIComponent(th.data.data.erpwareid),storeId:os.stoid} 948 + data:{storageNos:pkno_str,wareIds:encodeURIComponent(th.data.data.erpwareid),storeId:os.stoid,pageSize:2000}
946 }) 949 })
947 }).then(res=>{ 950 }).then(res=>{
948 if(res.data.code==0){ 951 if(res.data.code==0){
@@ -1149,7 +1152,7 @@ Page({ @@ -1149,7 +1152,7 @@ Page({
1149 } 1152 }
1150 1153
1151 1154
1152 - if (bconfig.is_sort_storage) { 1155 + if (bconfig && bconfig.is_sort_storage) {
1153 wx.getLocation({ 1156 wx.getLocation({
1154 type: 'gcj02', 1157 type: 'gcj02',
1155 success: function(res) { 1158 success: function(res) {
@@ -1300,7 +1303,7 @@ Page({ @@ -1300,7 +1303,7 @@ Page({
1300 }) 1303 })
1301 //读取线下的门店库存 1304 //读取线下的门店库存
1302 await getApp().request.promiseGet("/api/weshop/goods/getWareStorages",{ 1305 await getApp().request.promiseGet("/api/weshop/goods/getWareStorages",{
1303 - data:{storageNos:item.pickup_no,wareIds:encodeURIComponent(erpwareid),storeId:os.stoid} 1306 + data:{storageNos:item.pickup_no,wareIds:encodeURIComponent(erpwareid),storeId:os.stoid,pageSize:2000}
1304 }).then(res=>{ 1307 }).then(res=>{
1305 if(res.data.code==0 && res.data.data.total>0){ 1308 if(res.data.code==0 && res.data.data.total>0){
1306 plist=res.data.data.pageData[0]; 1309 plist=res.data.data.pageData[0];
@@ -1478,7 +1481,7 @@ Page({ @@ -1478,7 +1481,7 @@ Page({
1478 th.data.t_time = setInterval(function() { 1481 th.data.t_time = setInterval(function() {
1479 if (th.data.bconfig == null) false; 1482 if (th.data.bconfig == null) false;
1480 var e = th.data.bconfig; 1483 var e = th.data.bconfig;
1481 - if (e.is_sort_storage) { 1484 + if (e && e.is_sort_storage) {
1482 wx.getLocation({ 1485 wx.getLocation({
1483 type: 'gcj02', 1486 type: 'gcj02',
1484 success: function(res) { 1487 success: function(res) {
@@ -1526,6 +1529,13 @@ Page({ @@ -1526,6 +1529,13 @@ Page({
1526 var storid = os.stoid; 1529 var storid = os.stoid;
1527 var th = this; 1530 var th = this;
1528 getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => { 1531 getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => {
  1532 +
  1533 + if(res.data.code!=0 || !res.data.data){
  1534 + var ob={"card_list":[],"name_map":''};
  1535 + func(ob);
  1536 + return false;
  1537 + }
  1538 +
1529 var plusCard = res.data.data; 1539 var plusCard = res.data.data;
1530 var arr = [1219, 2089, 3031]; 1540 var arr = [1219, 2089, 3031];
1531 var new_arr = new Array(); 1541 var new_arr = new Array();
packageA/pages/quan/quan.js
@@ -29,7 +29,7 @@ Page({ @@ -29,7 +29,7 @@ Page({
29 var StaffId=options.StaffId; 29 var StaffId=options.StaffId;
30 var StorageId=options.StorageId; 30 var StorageId=options.StorageId;
31 if(first_leader){ 31 if(first_leader){
32 - //-- user_id代过来免登 -- 32 + //-- user_id代过来免登 --
33 getApp().globalData.user_id=first_leader; 33 getApp().globalData.user_id=first_leader;
34 getApp().getUserFir(); 34 getApp().getUserFir();
35 //设置分享会员和导购id和归属门店ID 35 //设置分享会员和导购id和归属门店ID
packageA/pages/quan_list/quan_list.wxml
@@ -17,7 +17,9 @@ @@ -17,7 +17,9 @@
17 <!-- 右边 --> 17 <!-- 右边 -->
18 <view class="right fs24 co_g pding" style="background-image:url({{iurl}}/miniapp/images/coupon_img/white.png); position: relative"> 18 <view class="right fs24 co_g pding" style="background-image:url({{iurl}}/miniapp/images/coupon_img/white.png); position: relative">
19 <view class="fs28 co_b" style="margin-top: 15rpx">{{item.name}}</view> 19 <view class="fs28 co_b" style="margin-top: 15rpx">{{item.name}}</view>
20 - <view style="margin-top: 5rpx">所有门店通用</view> 20 +
  21 + <view class="ellipsis-1" style="margin-top: 5rpx" wx:if="{{item.coupon_remark!=null && item.coupon_remark!=''}}">{{item.coupon_remark}}</view>
  22 + <view style="margin-top: 5rpx" wx:else>所有门店通用</view>
21 <view wx:if="{{item.endtype==0}}">有效期 23 <view wx:if="{{item.endtype==0}}">有效期
22 <text wx:if="{{item.starttype==1}}">{{filters.format_time(getcurday+3600*24*item.startdays)}}</text> 24 <text wx:if="{{item.starttype==1}}">{{filters.format_time(getcurday+3600*24*item.startdays)}}</text>
23 <text wx:if="{{item.starttype==0 && item.use_start_time>0}}"> {{filters.format_time(item.use_start_time)}}</text>至 25 <text wx:if="{{item.starttype==0 && item.use_start_time>0}}"> {{filters.format_time(item.use_start_time)}}</text>至
packageA/pages/quan_pro/quan_pro.js
@@ -23,7 +23,7 @@ Page({ @@ -23,7 +23,7 @@ Page({
23 var th = this; 23 var th = this;
24 var first_leader=t.first_leader; 24 var first_leader=t.first_leader;
25 if(first_leader){ 25 if(first_leader){
26 - //-- user_id代过来免登 -- 26 + //-- user_id代过来免登 --
27 getApp().globalData.first_leader=first_leader; 27 getApp().globalData.first_leader=first_leader;
28 //调用接口判断是不是会员 28 //调用接口判断是不是会员
29 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{ 29 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{
packageA/pages/quan_pro/quan_pro.wxml
@@ -8,15 +8,20 @@ @@ -8,15 +8,20 @@
8 <image style="width: 100%; height: 450rpx" src="{{iurl}}/miniapp/images/coupon_img/q_detail_bg.png"></image> 8 <image style="width: 100%; height: 450rpx" src="{{iurl}}/miniapp/images/coupon_img/q_detail_bg.png"></image>
9 <view class="q_content"> 9 <view class="q_content">
10 <view class="upper flex jc_sb co-w"> 10 <view class="upper flex jc_sb co-w">
11 - <view class="left fs30"> 11 + <view class="left fs30" style="width: 440rpx;">
12 <view> 12 <view>
13 <image style="width: 70rpx; height: 70rpx; vertical-align: middle; margin-right: 20rpx" src="{{iurl}}/miniapp/images/coupon_img/coupon_logo.png"></image> 13 <image style="width: 70rpx; height: 70rpx; vertical-align: middle; margin-right: 20rpx" src="{{iurl}}/miniapp/images/coupon_img/coupon_logo.png"></image>
14 {{q_data.name}} 14 {{q_data.name}}
15 </view> 15 </view>
16 - <view class="flex ai-center" style="margin-top: 24rpx; margin-right: 20rpx; width: 440rpx"><view class="t_circle"></view>  
17 - <text wx:if="{{q_data.useobjecttype==0}}">全场通用</text>  
18 - <text wx:else>仅限{{q_data.useobjectname}}使用</text> 16 + <view class="flex ai-center" style="margin-top: 24rpx; margin-right: 20rpx; width: 440rpx">
  17 + <view class="t_circle"></view>
  18 + <view>
  19 + <text wx:if="{{q_data.useobjecttype==0}}">全场通用</text>
  20 + <text wx:else>仅限{{q_data.useobjectname}}使用</text>
  21 + </view>
  22 +
19 </view> 23 </view>
  24 + <view class="ellipsis-3" style="margin-top: 20rpx;">{{q_data.coupon_remark}}</view>
20 </view> 25 </view>
21 <view class="right" style="margin-right: 80rpx;"> 26 <view class="right" style="margin-right: 80rpx;">
22 <view class="f40 t-c" style="margin-top: 100rpx"><text class="fs26">¥</text>{{filters.toFix(q_data.money,2)}}</view> 27 <view class="f40 t-c" style="margin-top: 100rpx"><text class="fs26">¥</text>{{filters.toFix(q_data.money,2)}}</view>
pages/activity/pind_list/pind_list.js
@@ -14,12 +14,14 @@ Page({ @@ -14,12 +14,14 @@ Page({
14 timer:null, 14 timer:null,
15 ismore:1, 15 ismore:1,
16 isshow:0, 16 isshow:0,
17 - iurl: os.imghost, 17 + iurl: os.imghost,
  18 + ad_data:null,
18 }, 19 },
19 20
20 //------初始化加载---------- 21 //------初始化加载----------
21 onLoad: function(t) { 22 onLoad: function(t) {
22 var first_leader = t.first_leader; 23 var first_leader = t.first_leader;
  24 + var th=this;
23 25
24 console.log("------------"); 26 console.log("------------");
25 console.log(first_leader); 27 console.log(first_leader);
@@ -33,6 +35,22 @@ Page({ @@ -33,6 +35,22 @@ Page({
33 } 35 }
34 }) 36 })
35 } 37 }
  38 +
  39 + getApp().request.promiseGet("/api/weshop/ad/page?pid=801&store_id=" + os.stoid, {
  40 + data: {
  41 + enabled: 1
  42 + }
  43 + }).then(res => {
  44 + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){
  45 + var a = res.data.data.pageData;
  46 + var tt = {
  47 + 'ad_code': os.imghost + a[0].ad_code,
  48 + 'media_link': '',
  49 + 'ad_weapplink':a[0].ad_weapplink
  50 + };
  51 + th.setData({ad_data:tt});
  52 + }
  53 + })
36 }, 54 },
37 55
38 onShow: function(t) { 56 onShow: function(t) {
pages/activity/pind_list/pind_list.wxml
@@ -2,8 +2,13 @@ @@ -2,8 +2,13 @@
2 2
3 <view class=" body_frame"> 3 <view class=" body_frame">
4 4
5 -<image class="xc-top-img" src="{{url}}/miniapp/images/team.jpg">  
6 -</image> 5 +<block wx:if="{{ad_data}}">
  6 + <image mode="widthFix" src="{{ad_data.ad_code}}" style="width: 100%;"></image>
  7 +</block>
  8 +<block wx:else>
  9 + <image class="xc-top-img" src="{{url}}/miniapp/images/team.jpg"></image>
  10 +</block>
  11 +
7 12
8 <view class="kill-list"> 13 <view class="kill-list">
9 <view class="kill-item" wx:for="{{goodlist}}" wx:if="{{item.djs.hide==1}}"> 14 <view class="kill-item" wx:for="{{goodlist}}" wx:if="{{item.djs.hide==1}}">
pages/activity/seckill_list/seckill_list.js
@@ -11,11 +11,13 @@ Page({ @@ -11,11 +11,13 @@ Page({
11 timer:null, 11 timer:null,
12 ismore:1, //是否可以加载更多 12 ismore:1, //是否可以加载更多
13 isshow:0, 13 isshow:0,
  14 + ad_data:null,
14 }, 15 },
15 16
16 //------初始化加载---------- 17 //------初始化加载----------
17 onLoad: function(t) { 18 onLoad: function(t) {
18 var first_leader = t.first_leader; 19 var first_leader = t.first_leader;
  20 + var th=this;
19 21
20 console.log("------------"); 22 console.log("------------");
21 console.log(first_leader); 23 console.log(first_leader);
@@ -29,6 +31,23 @@ Page({ @@ -29,6 +31,23 @@ Page({
29 } 31 }
30 }) 32 })
31 } 33 }
  34 +
  35 + getApp().request.promiseGet("/api/weshop/ad/page?pid=701&store_id=" + os.stoid, {
  36 + data: {
  37 + enabled: 1
  38 + }
  39 + }).then(res => {
  40 + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){
  41 + var a = res.data.data.pageData;
  42 + var tt = {
  43 + 'ad_code': os.imghost + a[0].ad_code,
  44 + 'media_link': '',
  45 + 'ad_weapplink':a[0].ad_weapplink
  46 + };
  47 + th.setData({ad_data:tt});
  48 + }
  49 + })
  50 +
32 }, 51 },
33 52
34 53
@@ -177,6 +196,12 @@ Page({ @@ -177,6 +196,12 @@ Page({
177 _errObj[_errImg] = "/public/images/default_goods_image_240.gif"; 196 _errObj[_errImg] = "/public/images/default_goods_image_240.gif";
178 this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; 197 this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
179 } 198 }
180 - } 199 + },
  200 +
  201 + onShareTimeline() {
  202 + return {
  203 + title: '秒杀活动-' + getApp().globalData.config.store_name,
  204 + }
  205 + },
181 206
182 }); 207 });
pages/activity/seckill_list/seckill_list.wxml
@@ -2,8 +2,12 @@ @@ -2,8 +2,12 @@
2 <block wx:if="{{isshow}}"> 2 <block wx:if="{{isshow}}">
3 <view class=" body_frame"> 3 <view class=" body_frame">
4 4
5 -<image class="xc-top-img" src="{{url}}/miniapp/images/seckill_top_img.jpg">  
6 -</image> 5 +<block wx:if="{{ad_data}}">
  6 + <image mode="widthFix" src="{{ad_data.ad_code}}" style="width: 100%;"></image>
  7 +</block>
  8 +<block wx:else>
  9 + <image class="xc-top-img" src="{{url}}/miniapp/images/seckill_top_img.jpg"></image>
  10 +</block>
7 11
8 12
9 <view class="kill-list abs seckill_list"> 13 <view class="kill-list abs seckill_list">
pages/cart/cart/cart.js
@@ -44,7 +44,7 @@ Page({ @@ -44,7 +44,7 @@ Page({
44 title: "购物车", 44 title: "购物车",
45 }) 45 })
46 46
47 - //判断是否有登 47 + //判断是否有登
48 t.auth.hadAuth() && t.getUserInfo(function() { 48 t.auth.hadAuth() && t.getUserInfo(function() {
49 a.getCardList(); 49 a.getCardList();
50 }); 50 });
pages/cart/cart2/cart2.js
@@ -668,7 +668,10 @@ Page({ @@ -668,7 +668,10 @@ Page({
668 th.setData({collocation_goods:gg.collocation_goods}); 668 th.setData({collocation_goods:gg.collocation_goods});
669 669
670 var cart_arr=new Array(); 670 var cart_arr=new Array();
671 - var narr=gg.collocation_goods; 671 + //var narr=gg.collocation_goods;
  672 + //修改成深拷贝,确保返回是数据正确
  673 + var narr=JSON.parse(JSON.stringify(gg.collocation_goods));
  674 +
672 narr.push(t.data.data); 675 narr.push(t.data.data);
673 var ie = { 676 var ie = {
674 pickup_id: gg.pick_id, pname: gg.pick_name, goods: narr, exp_type: et, wind: m_wind, distr_t: distr_t, 677 pickup_id: gg.pick_id, pname: gg.pick_name, goods: narr, exp_type: et, wind: m_wind, distr_t: distr_t,
@@ -946,7 +949,7 @@ Page({ @@ -946,7 +949,7 @@ Page({
946 await getApp().request.promiseGet("/api/weshop/areaFeemail/getAreaGoods",{ 949 await getApp().request.promiseGet("/api/weshop/areaFeemail/getAreaGoods",{
947 data:{store_id:os.stoid,id:no_ex_id} 950 data:{store_id:os.stoid,id:no_ex_id}
948 }).then(res=>{ 951 }).then(res=>{
949 - if(res.data.code==0){ 952 + if(res.data.code==0 && res.data.data && res.data.data.length>0){
950 by_qc=res.data.data[0]; 953 by_qc=res.data.data[0];
951 } 954 }
952 }) 955 })
@@ -1007,7 +1010,7 @@ Page({ @@ -1007,7 +1010,7 @@ Page({
1007 WareIds: cart_item.check_quan_ware_list 1010 WareIds: cart_item.check_quan_ware_list
1008 } 1011 }
1009 }).then(res => { 1012 }).then(res => {
1010 - if (res.data.code == 0 && res.data.data.length > 0) { 1013 + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) {
1011 var q_data = res.data.data; 1014 var q_data = res.data.data;
1012 //--存储商品优惠的内容-- 1015 //--存储商品优惠的内容--
1013 cart_item.quan_youhui_list = q_data; 1016 cart_item.quan_youhui_list = q_data;
@@ -1337,6 +1340,9 @@ Page({ @@ -1337,6 +1340,9 @@ Page({
1337 //---------计算立即购买---------- 1340 //---------计算立即购买----------
1338 calculatePrice2: function () { 1341 calculatePrice2: function () {
1339 var th = this, good = this.data.bn_goods; 1342 var th = this, good = this.data.bn_goods;
  1343 +
  1344 + if(!good) return false;
  1345 +
1340 //搭配的计算要用购物的车计算方法 1346 //搭配的计算要用购物的车计算方法
1341 if(good.prom_type==5){ 1347 if(good.prom_type==5){
1342 th.calculatePrice(); 1348 th.calculatePrice();
@@ -1378,7 +1384,7 @@ Page({ @@ -1378,7 +1384,7 @@ Page({
1378 await getApp().request.promiseGet("/api/weshop/couponList/getUseCouponPrice",{ 1384 await getApp().request.promiseGet("/api/weshop/couponList/getUseCouponPrice",{
1379 data:{storeId:oo.stoid,CashRepNo:quan_no, WaresSum:th.data.ckeck_quan_price, WareIds:th.data.check_quan_ware_list} 1385 data:{storeId:oo.stoid,CashRepNo:quan_no, WaresSum:th.data.ckeck_quan_price, WareIds:th.data.check_quan_ware_list}
1380 }).then(res=>{ 1386 }).then(res=>{
1381 - if(res.data.code==0){ 1387 + if(res.data.code==0 && res.data.data && res.data.data.length>0 ){
1382 quan_price=res.data.data[0].WareCashSum; 1388 quan_price=res.data.data[0].WareCashSum;
1383 } 1389 }
1384 }) 1390 })
@@ -1442,7 +1448,7 @@ Page({ @@ -1442,7 +1448,7 @@ Page({
1442 await getApp().request.promiseGet("/api/weshop/areaFeemail/getAreaGoods",{ 1448 await getApp().request.promiseGet("/api/weshop/areaFeemail/getAreaGoods",{
1443 data:{store_id:os.stoid,id:no_ex_id} 1449 data:{store_id:os.stoid,id:no_ex_id}
1444 }).then(res=>{ 1450 }).then(res=>{
1445 - if(res.data.code==0){ 1451 + if(res.data.code==0 && res.data.data && res.data.data.length>0){
1446 no_by_data=res.data.data[0]; 1452 no_by_data=res.data.data[0];
1447 //如果有设置不包邮区域的时候 1453 //如果有设置不包邮区域的时候
1448 if(res.data.data[0].region_list){ 1454 if(res.data.data[0].region_list){
@@ -2027,7 +2033,7 @@ Page({ @@ -2027,7 +2033,7 @@ Page({
2027 },// 设置请求的 header 2033 },// 设置请求的 header
2028 success: function (res) { 2034 success: function (res) {
2029 2035
2030 - th.data.is_summit_ing=0; //是否提交中 2036 +
2031 wx.hideLoading(); 2037 wx.hideLoading();
2032 if (res.statusCode == 200) { 2038 if (res.statusCode == 200) {
2033 var data=res.data; 2039 var data=res.data;
@@ -2110,6 +2116,7 @@ Page({ @@ -2110,6 +2116,7 @@ Page({
2110 return; 2116 return;
2111 }else if(res.confirm){ 2117 }else if(res.confirm){
2112 th.data.is_continue=1; 2118 th.data.is_continue=1;
  2119 + th.data.is_summit_ing=0; //是否提交中
2113 th.submitForm(sub_value); 2120 th.submitForm(sub_value);
2114 } 2121 }
2115 } 2122 }
@@ -2120,8 +2127,10 @@ Page({ @@ -2120,8 +2127,10 @@ Page({
2120 msg=msg.slice(0, 13) + "\r\n"+ msg.slice(13); 2127 msg=msg.slice(0, 13) + "\r\n"+ msg.slice(13);
2121 } 2128 }
2122 getApp().confirmBox(msg); 2129 getApp().confirmBox(msg);
  2130 + th.data.is_summit_ing=0; //是否提交中
2123 } 2131 }
2124 }else{ 2132 }else{
  2133 + th.data.is_summit_ing=0; //是否提交中
2125 console.log("index.js wx.request CheckCallUser statusCode" + res.statusCode); 2134 console.log("index.js wx.request CheckCallUser statusCode" + res.statusCode);
2126 } 2135 }
2127 }, 2136 },
@@ -2164,7 +2173,7 @@ Page({ @@ -2164,7 +2173,7 @@ Page({
2164 }) 2173 })
2165 //读取线下的门店库存 2174 //读取线下的门店库存
2166 await getApp().request.promiseGet("/api/weshop/goods/getWareStorages",{ 2175 await getApp().request.promiseGet("/api/weshop/goods/getWareStorages",{
2167 - data:{storageNos:pick_no,wareIds:encodeURIComponent(erpwareid),storeId:os.stoid} 2176 + data:{storageNos:pick_no,wareIds:encodeURIComponent(erpwareid),storeId:os.stoid,pageSize:2000}
2168 }).then(res=>{ 2177 }).then(res=>{
2169 if(res.data.code==0){ 2178 if(res.data.code==0){
2170 plist=res.data.data.pageData[0]; 2179 plist=res.data.data.pageData[0];
@@ -2839,8 +2848,10 @@ Page({ @@ -2839,8 +2848,10 @@ Page({
2839 //getApp().waitfor2(this,"g_cart_q_time","order_prom_list_cart",async function () { 2848 //getApp().waitfor2(this,"g_cart_q_time","order_prom_list_cart",async function () {
2840 //var arr=th.data.order_prom_list_cart; 2849 //var arr=th.data.order_prom_list_cart;
2841 var arr=order_prom_list_cart; 2850 var arr=order_prom_list_cart;
  2851 + if(!arr) arr=[];
2842 //如果系统有限制使用优惠券 2852 //如果系统有限制使用优惠券
2843 if(th.data.is_close_quan) return false; 2853 if(th.data.is_close_quan) return false;
  2854 +
2844 //------------开始计算使用优惠券相关------------ 2855 //------------开始计算使用优惠券相关------------
2845 for(var ind in arr){ 2856 for(var ind in arr){
2846 var ep=arr[ind]; 2857 var ep=arr[ind];
pages/cart/cart2_pt/cart2_pt.js
@@ -585,7 +585,7 @@ Page({ @@ -585,7 +585,7 @@ Page({
585 'content-type': 'application/json' 585 'content-type': 'application/json'
586 },// 设置请求的 header 586 },// 设置请求的 header
587 success: function (res) { 587 success: function (res) {
588 - th.data.is_summit_ing=0; //是否提交中 588 +
589 wx.hideLoading(); 589 wx.hideLoading();
590 if (res.statusCode == 200) { 590 if (res.statusCode == 200) {
591 var data=res.data; 591 var data=res.data;
@@ -613,15 +613,18 @@ Page({ @@ -613,15 +613,18 @@ Page({
613 // }, 1); 613 // }, 1);
614 util_pay.pay(data.data, function() { 614 util_pay.pay(data.data, function() {
615 setTimeout(function () { 615 setTimeout(function () {
616 - wx.navigateTo({ 616 + wx.reLaunch({
617 //url: "/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data, 617 //url: "/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data,
618 - url: "/pages/team/team_success/team_success?ordersn=" + data.data, 618 + url: "/pages/team/team_success/team_success?ordersn=" + data.data,
619 }) 619 })
620 },1000) 620 },1000)
621 }, function () { 621 }, function () {
622 //支付失败 622 //支付失败
623 setTimeout(function () { 623 setTimeout(function () {
624 - wx.navigateBack({ delta: 1 }) 624 + //wx.navigateBack({ delta: 1 })
  625 + wx.reLaunch({
  626 + url: "/pages/user/order_list/order_list",
  627 + })
625 },1000) 628 },1000)
626 629
627 },oo.stoid,1); 630 },oo.stoid,1);
@@ -647,9 +650,12 @@ Page({ @@ -647,9 +650,12 @@ Page({
647 url: "/pages/user/order_list/order_list", 650 url: "/pages/user/order_list/order_list",
648 })--*/ 651 })--*/
649 var url="/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data; 652 var url="/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data;
650 - getApp().goto(url); 653 + wx.reLaunch({
  654 + url: url
  655 + })
  656 +
651 }else{ 657 }else{
652 - wx.navigateTo({ 658 + wx.reLaunch({
653 url: "/pages/team/team_success/team_success?ordersn=" + data.data, 659 url: "/pages/team/team_success/team_success?ordersn=" + data.data,
654 }) 660 })
655 } 661 }
@@ -661,13 +667,16 @@ Page({ @@ -661,13 +667,16 @@ Page({
661 } 667 }
662 } 668 }
663 else{ 669 else{
  670 + th.data.is_summit_ing=0; //是否提交中
664 getApp().confirmBox(data.msg); 671 getApp().confirmBox(data.msg);
665 } 672 }
666 } else { 673 } else {
  674 + th.data.is_summit_ing=0; //是否提交中
667 console.log("index.js wx.request CheckCallUser statusCode" + res.statusCode); 675 console.log("index.js wx.request CheckCallUser statusCode" + res.statusCode);
668 } 676 }
669 }, 677 },
670 fail: function () { 678 fail: function () {
  679 + th.data.is_summit_ing=0; //是否提交中
671 wx.hideLoading(); 680 wx.hideLoading();
672 console.log("index.js wx.request CheckCallUser fail"); 681 console.log("index.js wx.request CheckCallUser fail");
673 }, 682 },
pages/cart/cart4/cart4.js
@@ -27,7 +27,7 @@ Page({ @@ -27,7 +27,7 @@ Page({
27 data:data, 27 data:data,
28 success:function(rs){ 28 success:function(rs){
29 29
30 - if(rs.data.code==0){ 30 + if(rs.data.code==0 && rs.data.data && rs.data.data.pageData && rs.data.data.pageData.length>0){
31 //支付的金额 31 //支付的金额
32 rs.data.data.pageData.forEach(function(ie,ind){ 32 rs.data.data.pageData.forEach(function(ie,ind){
33 order_m+=ie.order_amount; 33 order_m+=ie.order_amount;
pages/giftpack/buygiftpack/giftpackbuy.js
@@ -25,6 +25,7 @@ Page({ @@ -25,6 +25,7 @@ Page({
25 curpage: 1, //当前分页数 25 curpage: 1, //当前分页数
26 pageSize: 10, //页大小 26 pageSize: 10, //页大小
27 total: 0, //总数量 27 total: 0, //总数量
  28 + ad_data:null,
28 }, 29 },
29 onLoad: function(options) { 30 onLoad: function(options) {
30 31
@@ -35,6 +36,25 @@ Page({ @@ -35,6 +36,25 @@ Page({
35 getStorageID: a.stoid, 36 getStorageID: a.stoid,
36 getUserID: d.user_id 37 getUserID: d.user_id
37 }) 38 })
  39 +
  40 +
  41 + getApp().request.promiseGet("/api/weshop/ad/page?pid=901&store_id=" + os.stoid, {
  42 + data: {
  43 + enabled: 1
  44 + }
  45 + }).then(res => {
  46 + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){
  47 + var a = res.data.data.pageData;
  48 + var tt = {
  49 + 'ad_code': os.imghost + a[0].ad_code,
  50 + 'media_link': '',
  51 + 'ad_weapplink':a[0].ad_weapplink,
  52 + 'bgcolor':a[0].bgcolor,
  53 + };
  54 + th.setData({ad_data:tt});
  55 + }
  56 + })
  57 +
38 58
39 }, 59 },
40 onShow: function() { 60 onShow: function() {
@@ -73,6 +93,13 @@ Page({ @@ -73,6 +93,13 @@ Page({
73 "userId": that.getUserID, //用户ID 93 "userId": that.getUserID, //用户ID
74 "buyFrom": 2 94 "buyFrom": 2
75 }; 95 };
  96 +
  97 + //-- 分享导购要记录 --
  98 + if(getApp().globalData.guide_id){
  99 + json.guide_id=getApp().globalData.guide_id;
  100 + }
  101 +
  102 +
76 var data = JSON.stringify(json); 103 var data = JSON.stringify(json);
77 var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; 104 var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert";
78 getApp().request.json_post(url, json, 105 getApp().request.json_post(url, json,
@@ -134,6 +161,13 @@ Page({ @@ -134,6 +161,13 @@ Page({
134 "userId": that.getUserID, //用户ID 161 "userId": that.getUserID, //用户ID
135 "buyFrom": 2 162 "buyFrom": 2
136 }; 163 };
  164 +
  165 + //-- 分享导购要记录 --
  166 + if(getApp().globalData.guide_id){
  167 + json.guide_id=getApp().globalData.guide_id;
  168 + }
  169 +
  170 +
137 var data = JSON.stringify(json); 171 var data = JSON.stringify(json);
138 var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; 172 var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert";
139 getApp().request.json_post(url, json, 173 getApp().request.json_post(url, json,
pages/giftpack/buygiftpack/giftpackbuy.wxml
1 -<view class="top_img">  
2 - <view class="top_img">  
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> 1 +<view class="top_img" style="background-color: {{ad_data?ad_data.bgcolor:'rgb(250, 120, 88)'}};">
  2 + <block wx:if="{{ad_data}}">
  3 + <view class="top_img">
  4 + <image src="{{ad_data.ad_code}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
  5 + </view>
  6 + </block>
  7 + <block wx:else>
  8 + <view class="top_img">
  9 + <image src="{{iurl+'/miniapp/images/giftbag/gift00.jpg?v=2019'}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
  10 + </view>
  11 + </block>
  12 +
  13 +
5 <view class="top_title"> 14 <view class="top_title">
6 <view class="top_title_box"> 15 <view class="top_title_box">
7 <text class="top_title_redtext">礼包列表</text> 16 <text class="top_title_redtext">礼包列表</text>
pages/giftpack/buygiftpack/giftpackbuy.wxss
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 */ 6 */
7 7
8 page { 8 page {
9 - background-color: #fb7454; 9 + /* background-color: #fb7454; */
10 } 10 }
11 11
12 .top_img { 12 .top_img {
pages/giftpack/giftpacklist/giftpacklist.js
@@ -41,7 +41,7 @@ Page({ @@ -41,7 +41,7 @@ Page({
41 //-- 获取分享人的ID -- 41 //-- 获取分享人的ID --
42 var first_leader=options.first_leader; 42 var first_leader=options.first_leader;
43 if(first_leader){ 43 if(first_leader){
44 - //-- user_id代过来免登 -- 44 + //-- user_id代过来免登 --
45 getApp().globalData.first_leader=first_leader; 45 getApp().globalData.first_leader=first_leader;
46 //调用接口判断是不是会员 46 //调用接口判断是不是会员
47 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{ 47 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{
@@ -141,10 +141,8 @@ Page({ @@ -141,10 +141,8 @@ Page({
141 141
142 } 142 }
143 143
144 -  
145 ) 144 )
146 145
147 -  
148 }, 146 },
149 GetBuyIntegral: function(e) { 147 GetBuyIntegral: function(e) {
150 var that = this.data; 148 var that = this.data;
@@ -175,6 +173,13 @@ Page({ @@ -175,6 +173,13 @@ Page({
175 "userId": d.user_id, //用户ID 173 "userId": d.user_id, //用户ID
176 "buyFrom":2 174 "buyFrom":2
177 }; 175 };
  176 +
  177 + //-- 分享导购要记录 --
  178 + if(getApp().globalData.guide_id){
  179 + json.guide_id=getApp().globalData.guide_id;
  180 + }
  181 +
  182 +
178 var data = JSON.stringify(json); 183 var data = JSON.stringify(json);
179 var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; 184 var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert";
180 getApp().request.json_post(url, json, 185 getApp().request.json_post(url, json,
pages/giftpack/mygiftpack/mygiftpack.js
@@ -25,6 +25,7 @@ Page({ @@ -25,6 +25,7 @@ Page({
25 curpage: 1, //当前分页数 25 curpage: 1, //当前分页数
26 pageSize: 10, //页大小 26 pageSize: 10, //页大小
27 total: 0, //总数量 27 total: 0, //总数量
  28 + ad_data:null,
28 }, 29 },
29 30
30 onLoad: function(options) { 31 onLoad: function(options) {
@@ -36,6 +37,23 @@ Page({ @@ -36,6 +37,23 @@ Page({
36 loadingType: 0, 37 loadingType: 0,
37 getDate: i.formatTime(new Date().getTime()) 38 getDate: i.formatTime(new Date().getTime())
38 }) 39 })
  40 +
  41 + getApp().request.promiseGet("/api/weshop/ad/page?pid=901&store_id=" + os.stoid, {
  42 + data: {
  43 + enabled: 1
  44 + }
  45 + }).then(res => {
  46 + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){
  47 + var a = res.data.data.pageData;
  48 + var tt = {
  49 + 'ad_code': os.imghost + a[0].ad_code,
  50 + 'media_link': '',
  51 + 'ad_weapplink':a[0].ad_weapplink,
  52 + 'bgcolor':a[0].bgcolor,
  53 + };
  54 + th.setData({ad_data:tt});
  55 + }
  56 + })
39 57
40 }, 58 },
41 onShow: function() { 59 onShow: function() {
pages/giftpack/mygiftpack/mygiftpack.wxml
1 -<view class="top_img">  
2 - <view class="top_img">  
3 - <!-- <image src="{{$GetInfo.imgHttp+'/miniapp/images/giftbag/gift00.jpg'}}"></image> -->  
4 - <image src="{{iurl+'/miniapp/images/giftbag/gift00.jpg?v=2019'}}" lazy-load="true"></image>  
5 - </view> 1 +<view class="top_img" style="background-color: {{ad_data?ad_data.bgcolor:'rgb(250, 120, 88)'}};">
  2 + <block wx:if="{{ad_data}}">
  3 + <view class="top_img">
  4 + <image src="{{ad_data.ad_code}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
  5 + </view>
  6 + </block>
  7 + <block wx:else>
  8 + <view class="top_img">
  9 + <!-- <image src="{{$GetInfo.imgHttp+'/miniapp/images/giftbag/gift00.jpg'}}"></image> -->
  10 + <image src="{{iurl+'/miniapp/images/giftbag/gift00.jpg?v=2019'}}" lazy-load="true"></image>
  11 + </view>
  12 + </block>
  13 +
  14 +
6 <view class="top_title"> 15 <view class="top_title">
7 <view class="top_title_box"> 16 <view class="top_title_box">
8 <text class="top_title_blacktext" bindtap="redirectTo" data-url="/pages/giftpack/buygiftpack/giftpackbuy">礼包列表</text> 17 <text class="top_title_blacktext" bindtap="redirectTo" data-url="/pages/giftpack/buygiftpack/giftpackbuy">礼包列表</text>
pages/giftpack/mygiftpack/mygiftpack.wxss
@@ -235,7 +235,7 @@ @@ -235,7 +235,7 @@
235 } 235 }
236 236
237 page { 237 page {
238 - background-color: rgb(250, 120, 88); 238 + /* background-color: rgb(250, 120, 88); */
239 } 239 }
240 .After_all { 240 .After_all {
241 height: 80rpx; 241 height: 80rpx;
pages/goods/categoryList/categoryList.js
@@ -819,7 +819,7 @@ Page({ @@ -819,7 +819,7 @@ Page({
819 // }, 819 // },
820 // 左侧更新 820 // 左侧更新
821 scrollLower: function (data) { 821 scrollLower: function (data) {
822 - //console.log("上拉加载更多", JSON.stringify(data)) 822 + if(this.data.is_no_more) return false;
823 var that = this; 823 var that = this;
824 clearInterval(that.data.timer); 824 clearInterval(that.data.timer);
825 that.setData({ 825 that.setData({
@@ -843,18 +843,17 @@ Page({ @@ -843,18 +843,17 @@ Page({
843 }); 843 });
844 if (e.data.data.pageData.length > 0) { 844 if (e.data.data.pageData.length > 0) {
845 s.setData({ 845 s.setData({
846 - msgStatus: false, 846 + msgStatus: false,is_no_more:0
847 }); 847 });
848 //如果有数据 判断分页为第一页的时候直接渲染数据 848 //如果有数据 判断分页为第一页的时候直接渲染数据
849 if (page > 1) { 849 if (page > 1) {
850 //如果分页不是在第一页 那么就把返回的数据追加到原有数据后面 850 //如果分页不是在第一页 那么就把返回的数据追加到原有数据后面
851 var arr = s.data.requestData 851 var arr = s.data.requestData
852 - console.log("arr:=" + JSON.stringify(arr))  
853 - 852 +
854 for (var i = 0; i < e.data.data.pageData.length;i++){ 853 for (var i = 0; i < e.data.data.pageData.length;i++){
855 arr.push(e.data.data.pageData[i]); 854 arr.push(e.data.data.pageData[i]);
856 } 855 }
857 - console.log(arr) 856 +
858 s.setData({ 857 s.setData({
859 requestData: arr 858 requestData: arr
860 }); 859 });
@@ -875,19 +874,28 @@ Page({ @@ -875,19 +874,28 @@ Page({
875 if (page != 1) { 874 if (page != 1) {
876 var dataArray = s.data.one_level_classify 875 var dataArray = s.data.one_level_classify
877 var index = s.data.index 876 var index = s.data.index
878 - dataArray[index]['items']['is_show_class'] = false  
879 - dataArray[index+1]['items']['is_show_class'] = true  
880 - console.log(dataArray[index + 1]['items'])  
881 - s.setData({  
882 - msgStatus: true,  
883 - stylePage: 1,  
884 - index: index + 1,  
885 - select_classify_on: index + 1,  
886 - cat_id: dataArray[index + 1]['items']['id'],  
887 - classify_name: dataArray[index + 1]['items']['name'],  
888 - one_level_classify: dataArray  
889 - });  
890 - s.style(s.data.stylePage, dataArray[index + 1]['items']['id']) 877 + dataArray[index]['items']['is_show_class'] = false
  878 + //没有下一个类别的时候
  879 + if(index+1>=dataArray.length){
  880 + s.setData({is_no_more:1});
  881 + }else{
  882 + dataArray[index+1]['items']['is_show_class'] = true
  883 + console.log(dataArray[index + 1]['items'])
  884 + s.setData({
  885 + msgStatus: true,
  886 + stylePage: 1,
  887 + index: index + 1,
  888 + select_classify_on: index + 1,
  889 + cat_id: dataArray[index + 1]['items']['id'],
  890 + classify_name: dataArray[index + 1]['items']['name'],
  891 + one_level_classify: dataArray,
  892 + is_no_more:0
  893 + });
  894 + s.style(s.data.stylePage, dataArray[index + 1]['items']['id'])
  895 + }
  896 +
  897 +
  898 +
891 }else{ 899 }else{
892 //没有数据而且是第一页的时候 900 //没有数据而且是第一页的时候
893 s.setData({ 901 s.setData({
@@ -897,7 +905,8 @@ Page({ @@ -897,7 +905,8 @@ Page({
897 s.setData({ 905 s.setData({
898 msgStatus: true, 906 msgStatus: true,
899 countDownNum: countDownNum, 907 countDownNum: countDownNum,
900 - requestData: [] 908 + requestData: [],
  909 + is_no_more:0,
901 }); 910 });
902 s.data.timer=setInterval(function () { 911 s.data.timer=setInterval(function () {
903 if (countDownNum == 0) { 912 if (countDownNum == 0) {
@@ -1012,6 +1021,12 @@ Page({ @@ -1012,6 +1021,12 @@ Page({
1012 if(!url || url=='') return; 1021 if(!url || url=='') return;
1013 if(url[0]!='/') url='/'+url; 1022 if(url[0]!='/') url='/'+url;
1014 getApp().goto(url); 1023 getApp().goto(url);
  1024 + },
  1025 +
  1026 + onShareTimeline(){
  1027 + return {
  1028 + title:'商品分类-'+getApp().globalData.config.store_name,
  1029 + }
1015 } 1030 }
1016 1031
1017 }); 1032 });
1018 \ No newline at end of file 1033 \ No newline at end of file
pages/goods/categoryList/categoryList.wxml
@@ -493,6 +493,9 @@ @@ -493,6 +493,9 @@
493 </block> 493 </block>
494 </view> 494 </view>
495 </navigator> 495 </navigator>
  496 + <!-- 暂无更多 -->
  497 + <view style="height: 30rpx;line-height: 30rpx;margin-top: 20rpx;font-size: 25rpx; text-align: center;"
  498 + wx:if="{{is_no_more}}">暂无更多</view>
496 </view> 499 </view>
497 <view class="no-data" wx:if="{{msgStatus == true}}"> 500 <view class="no-data" wx:if="{{msgStatus == true}}">
498 <!-- <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image> --> 501 <!-- <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image> -->
@@ -500,8 +503,9 @@ @@ -500,8 +503,9 @@
500 <view wx:if="{{msgStatus == true && lastMsg == false}}" class="no-data-title" style="text-align:center;margin-top:100px"> 503 <view wx:if="{{msgStatus == true && lastMsg == false}}" class="no-data-title" style="text-align:center;margin-top:100px">
501 <view style="color:#444;line-height:30px;">该类别暂无推荐商品</view><view style="color:#444;line-height:30px;"> {{countDownNum}} 秒后自动跳到下一个类别</view> </view> 504 <view style="color:#444;line-height:30px;">该类别暂无推荐商品</view><view style="color:#444;line-height:30px;"> {{countDownNum}} 秒后自动跳到下一个类别</view> </view>
502 <view wx:elif="{{lastMsg == true && msgStatus == true}}" class="no-data-title" style="text-align:center;margin-top:100px">该类别暂无推荐商品</view> 505 <view wx:elif="{{lastMsg == true && msgStatus == true}}" class="no-data-title" style="text-align:center;margin-top:100px">该类别暂无推荐商品</view>
503 - <!-- <navigator class="lookat" url="/pages/index/index/index"> 去逛逛 </navigator> --> 506 + <!-- <navigator class="lookat" url="/pages/index/index/index"> 去逛逛 </navigator> -->
504 </view> 507 </view>
  508 +
505 509
506 </scroll-view> 510 </scroll-view>
507 <!-- /goodslist --> 511 <!-- /goodslist -->
pages/goods/goodsInfo/buy_integral.wxml
@@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
11 <text wx:if="{{prom_integral}}">{{prom_integral}}积分</text> 11 <text wx:if="{{prom_integral}}">{{prom_integral}}积分</text>
12 <text wx:if="{{prom_integral && prom_price}}">+</text> 12 <text wx:if="{{prom_integral && prom_price}}">+</text>
13 <text wx:if="{{prom_price}}">{{prom_price}}元</text> 13 <text wx:if="{{prom_price}}">{{prom_price}}元</text>
  14 + <text wx:if="{{!prom_integral && !prom_price}}">0积分</text>
14 </view> 15 </view>
15 </view> 16 </view>
16 17
pages/goods/goodsInfo/g_filter.wxs
@@ -80,8 +80,38 @@ var g_filters = { @@ -80,8 +80,38 @@ var g_filters = {
80 if(min_name.length>4) min_name=min_name.substring(0, 8); 80 if(min_name.length>4) min_name=min_name.substring(0, 8);
81 return min_name; 81 return min_name;
82 }, 82 },
  83 +
  84 + toFix: function (val, count,set) {
  85 + if(val===undefined) return 0;
  86 + if(val===null) return 0;
  87 + if(val==='') return 0;
  88 + val = parseFloat(val);
  89 + if(set==1 && val==0) return val;
  90 + return val.toFixed(count)
  91 + },
  92 +
  93 + //折扣数值处理,小数位数为1时,只显示1位;小数位数为2时,才显示2位;
  94 + num: function(value) {
  95 + if(value != 0) {
  96 + var val = value.toFixed(2).toString();
  97 + if(val.indexOf('.') != -1) {
  98 + var arrval = val.split('.');
  99 + if(arrval[1].length == 1 && arrval[1][0] == 0) {
  100 + val = val.slice(0,-2);
  101 + };
  102 +
  103 + if(arrval[1].length == 2 && arrval[1][1] == 0) {
  104 + val = val.slice(0,-1);
  105 + };
  106 + };
  107 + return val;
  108 + } else {
  109 + return value.toFixed(0);
  110 + };
  111 + },
83 } 112 }
84 module.exports = { 113 module.exports = {
85 is_has_rank:g_filters.is_has_rank, 114 is_has_rank:g_filters.is_has_rank,
86 - get_card_price:g_filters.get_card_price, 115 + get_card_price:g_filters.get_card_price,
  116 + num:g_filters.num,
87 } 117 }
88 \ No newline at end of file 118 \ No newline at end of file
pages/goods/goodsInfo/goodsInfo.js
@@ -261,10 +261,10 @@ Page({ @@ -261,10 +261,10 @@ Page({
261 room_user_share=t.room_user_share; //如果是会员分享带有room_id的话,那么接下来会员分享就不传room_id 261 room_user_share=t.room_user_share; //如果是会员分享带有room_id的话,那么接下来会员分享就不传room_id
262 262
263 //-- 自定义海报 -- 263 //-- 自定义海报 --
264 - getApp().request.promiseGet("/api/weshop/goods/poster/page",{  
265 - data:{store_id:os.stoid, type:1, is_use:1 } 264 + getApp().request.promiseGet("/api/weshop/goods/poster/page", {
  265 + data:{store_id:os.stoid, type:1, is_use:1}
266 }).then(res=>{ 266 }).then(res=>{
267 - if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData[0] ){ 267 + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData[0]){
268 268
269 var poster_data=res.data.data.pageData[0]; 269 var poster_data=res.data.data.pageData[0];
270 var json_str=poster_data.jsonStr; 270 var json_str=poster_data.jsonStr;
@@ -314,7 +314,6 @@ Page({ @@ -314,7 +314,6 @@ Page({
314 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{ 314 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{
315 if(res.data.code==0){ 315 if(res.data.code==0){
316 getApp().globalData.guide_id=res.data.data.id; 316 getApp().globalData.guide_id=res.data.data.id;
317 - console.log("log2---".getApp().globalData.guide_id);  
318 } 317 }
319 }) 318 })
320 } 319 }
@@ -700,7 +699,25 @@ Page({ @@ -700,7 +699,25 @@ Page({
700 ee.check_is_youhui(ee.data.gid); 699 ee.check_is_youhui(ee.data.gid);
701 700
702 t.data.data.on_time = ut.formatTime(t.data.data.on_time, 'yyyy-MM-dd hh:mm:ss'); 701 t.data.data.on_time = ut.formatTime(t.data.data.on_time, 'yyyy-MM-dd hh:mm:ss');
703 - var txt = (t.data.data.shop_price / t.data.data.market_price * 10).toFixed(2); 702 + var txt = (t.data.data.shop_price / t.data.data.market_price * 10).toFixed(2).toString();
  703 +
  704 +
  705 + if(txt != 0) {
  706 + if(txt.indexOf('.') != -1) {
  707 + var arrtxt = txt.split('.');
  708 + if(arrtxt[1].length == 1 && arrtxt[1][0] == 0) {
  709 + txt = txt.slice(0,-2);
  710 + };
  711 +
  712 + if(arrtxt[1].length == 2 && arrtxt[1][1] == 0) {
  713 + txt = txt.slice(0,-1);
  714 + };
  715 + };
  716 + } else {
  717 + txt = 0;
  718 + }
  719 +
  720 +
704 t.data.data['disc'] = txt; 721 t.data.data['disc'] = txt;
705 722
706 if (t.data.data.original_img.indexOf(o.imghost) == -1) 723 if (t.data.data.original_img.indexOf(o.imghost) == -1)
@@ -843,7 +860,11 @@ Page({ @@ -843,7 +860,11 @@ Page({
843 url: "/pages/user/address_list/address_list?operate=selectAddress" 860 url: "/pages/user/address_list/address_list?operate=selectAddress"
844 }); 861 });
845 }, 862 },
846 - onUnload: function() {}, 863 + onUnload: function() {
  864 + for(var i = 1; i < 100; i++) {
  865 + clearInterval(i);
  866 + }
  867 + },
847 onHide: function() { 868 onHide: function() {
848 this.data.is_timer = 0; 869 this.data.is_timer = 0;
849 for(var i = 1; i < 100; i++) { 870 for(var i = 1; i < 100; i++) {
@@ -2094,7 +2115,7 @@ Page({ @@ -2094,7 +2115,7 @@ Page({
2094 if (e.data.code == 0) { 2115 if (e.data.code == 0) {
2095 2116
2096 //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 2117 //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店
2097 - if(dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store)=='{}') && th.data.bconfig.is_sort_storage){ 2118 + if(dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store)=='{}') && th.data.bconfig && th.data.bconfig.is_sort_storage){
2098 th.setData({ 2119 th.setData({
2099 def_pick_store:e.data.data.pageData[0], 2120 def_pick_store:e.data.data.pageData[0],
2100 sto_sele_name: e.data.data.pageData[0].pickup_name, 2121 sto_sele_name: e.data.data.pageData[0].pickup_name,
@@ -2283,7 +2304,7 @@ Page({ @@ -2283,7 +2304,7 @@ Page({
2283 only_pk: e.data.data.pageData 2304 only_pk: e.data.data.pageData
2284 }); 2305 });
2285 //-----如果没有默认门店,要取第一个门店作为默认店------ 2306 //-----如果没有默认门店,要取第一个门店作为默认店------
2286 - if (!th.data.def_pick_store && th.data.bconfig.is_sort_storage) { 2307 + if (!th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage) {
2287 th.setData({ 2308 th.setData({
2288 def_pick_store:e.data.data.pageData[0], 2309 def_pick_store:e.data.data.pageData[0],
2289 sto_sele_name: e.data.data.pageData[0].pickup_name, 2310 sto_sele_name: e.data.data.pageData[0].pickup_name,
@@ -2765,15 +2786,17 @@ Page({ @@ -2765,15 +2786,17 @@ Page({
2765 } 2786 }
2766 }).then(res => { 2787 }).then(res => {
2767 var now = ut.gettimestamp(); 2788 var now = ut.gettimestamp();
2768 - var tgr = res.data.data.pageData[0];  
2769 - //如果团的时间已经到了  
2770 - if (now >= tgr.kt_end_time) {  
2771 - th.update_jiti(tgr.id);  
2772 - } else {  
2773 - th.setData({  
2774 - user_order_pt_state: 2  
2775 - });  
2776 - } 2789 + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){
  2790 + var tgr = res.data.data.pageData[0];
  2791 + //如果团的时间已经到了
  2792 + if (now >= tgr.kt_end_time) {
  2793 + th.update_jiti(tgr.id);
  2794 + } else {
  2795 + th.setData({
  2796 + user_order_pt_state: 2
  2797 + });
  2798 + }
  2799 + }
2777 }) 2800 })
2778 2801
2779 } else { 2802 } else {
@@ -3110,7 +3133,12 @@ Page({ @@ -3110,7 +3133,12 @@ Page({
3110 } 3133 }
3111 }); 3134 });
3112 } else if (odr.pt_status == 1 && odr.order_status == 1) { 3135 } else if (odr.pt_status == 1 && odr.order_status == 1) {
3113 - wx.navigateTo({ 3136 +
  3137 + if(this.data.is_go_to_team_show) return false;
  3138 + this.data.is_go_to_team_show=1;
  3139 + wx.showLoading();
  3140 +
  3141 + wx.redirectTo({
3114 url: "/pages/team/team_success/team_success?ordersn=" + odr.order_sn, 3142 url: "/pages/team/team_success/team_success?ordersn=" + odr.order_sn,
3115 }); 3143 });
3116 } else { 3144 } else {
@@ -3318,17 +3346,24 @@ Page({ @@ -3318,17 +3346,24 @@ Page({
3318 3346
3319 //-------跳转pt商品------- 3347 //-------跳转pt商品-------
3320 go_to_nopay: function() { 3348 go_to_nopay: function() {
3321 - var th = this;  
3322 - wx.navigateTo({  
3323 - url: "/pages/user/order_detail/order_detail?order_id=" + th.data.buy_order.order_id,  
3324 - }); 3349 + var th = this;
  3350 + url="/pages/user/order_detail/order_detail?order_id=" + th.data.buy_order.order_id;
  3351 + getApp().goto(url);
  3352 +
3325 }, 3353 },
3326 //-------跳转pt teamshow------- 3354 //-------跳转pt teamshow-------
3327 go_to_team_show: function() { 3355 go_to_team_show: function() {
3328 - var th = this;  
3329 - wx.navigateTo({  
3330 - url: "/pages/team/team_success/team_success?ordersn=" + th.data.buy_order.order_sn,  
3331 - }); 3356 +
  3357 + if(this.data.is_go_to_team_show) return false;
  3358 + this.data.is_go_to_team_show=1;
  3359 + wx.showLoading();
  3360 +
  3361 + var th = this;
  3362 + var url="/pages/team/team_success/team_success?ordersn=" + th.data.buy_order.order_sn;
  3363 + wx.redirectTo({
  3364 + url:url,
  3365 + })
  3366 +
3332 }, 3367 },
3333 3368
3334 //---拼团倒计时--- 3369 //---拼团倒计时---
@@ -3408,9 +3443,14 @@ Page({ @@ -3408,9 +3443,14 @@ Page({
3408 } 3443 }
3409 }); 3444 });
3410 } else if (odr.pt_status == 1 && odr.order_status == 1) { 3445 } else if (odr.pt_status == 1 && odr.order_status == 1) {
3411 - wx.navigateTo({  
3412 - url: "/pages/team/team_success/team_success?ordersn=" + odr.order_sn,  
3413 - }); 3446 +
  3447 + if(this.data.is_go_to_team_show) return false;
  3448 + this.data.is_go_to_team_show=1;
  3449 + wx.showLoading();
  3450 +
  3451 + wx.redirectTo({
  3452 + url: "/pages/team/team_success/team_success?ordersn=" + odr.order_sn,
  3453 + });
3414 } else { 3454 } else {
3415 wx.navigateTo({ 3455 wx.navigateTo({
3416 url: "/pages/team/team_show/team_show?tg_id=" + id, 3456 url: "/pages/team/team_show/team_show?tg_id=" + id,
@@ -3587,6 +3627,12 @@ Page({ @@ -3587,6 +3627,12 @@ Page({
3587 'store_id': os.stoid, 3627 'store_id': os.stoid,
3588 'type': 5 3628 'type': 5
3589 }; 3629 };
  3630 +
  3631 + //-- 导购ID --
  3632 + if(getApp().globalData.guide_id){
  3633 + pdata.guide_id=getApp().globalData.guide_id;
  3634 + }
  3635 +
3590 var app = getApp(), 3636 var app = getApp(),
3591 th = this; 3637 th = this;
3592 app.request.post("/api/weshop/couponList/saveCouponList", { 3638 app.request.post("/api/weshop/couponList/saveCouponList", {
@@ -3641,14 +3687,14 @@ Page({ @@ -3641,14 +3687,14 @@ Page({
3641 var unit = that.data.screenWidth / 750 * 1.35; //基础单位, 3687 var unit = that.data.screenWidth / 750 * 1.35; //基础单位,
3642 var path2 = that.data.data.original_img; 3688 var path2 = that.data.data.original_img;
3643 var scene = th.data.gid+""; 3689 var scene = th.data.gid+"";
3644 - var user_id=getApp().globalData.user_id?getApp().globalData.user_id:0;  
3645 - if(user_id>0){ 3690 + var user_id = getApp().globalData.user_id?getApp().globalData.user_id:0;
  3691 + if(user_id>0) {
3646 scene+="_"+user_id; 3692 scene+="_"+user_id;
3647 } 3693 }
3648 //-- 如果不是会员分享过来的要分享给别人 -- 3694 //-- 如果不是会员分享过来的要分享给别人 --
3649 - if(getApp().globalData.room_id && th.data.data.goods_id==getApp().globalData.room_goods_id && !getApp().globalData.room_user_share){ 3695 + if(getApp().globalData.room_id && th.data.data.goods_id==getApp().globalData.room_goods_id && !getApp().globalData.room_user_share) {
3650 //固定房间是第3个字符 3696 //固定房间是第3个字符
3651 - if(!user_id) scene+="_0"; 3697 + if(!user_id) scene+="_0";
3652 scene+="_"+getApp().globalData.room_id ; 3698 scene+="_"+getApp().globalData.room_id ;
3653 } 3699 }
3654 ///二微码 3700 ///二微码
@@ -3678,7 +3724,7 @@ Page({ @@ -3678,7 +3724,7 @@ Page({
3678 context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); 3724 context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit);
3679 3725
3680 //-- 是自定义海报的情况下 -- 3726 //-- 是自定义海报的情况下 --
3681 - if(th.data.poster && parseInt(th.data.poster.style)==2){ 3727 + if(th.data.poster && parseInt(th.data.poster.style)==2) {
3682 //在线上分享人的情况下 3728 //在线上分享人的情况下
3683 if(parseInt(th.data.poster.show_headpic)){ 3729 if(parseInt(th.data.poster.show_headpic)){
3684 //获取坐标 3730 //获取坐标
@@ -3697,9 +3743,13 @@ Page({ @@ -3697,9 +3743,13 @@ Page({
3697 context.setFontSize(16 * unit) 3743 context.setFontSize(16 * unit)
3698 context.setLineJoin('round'); //交点设置成圆角 3744 context.setLineJoin('round'); //交点设置成圆角
3699 context.setFillStyle("white") 3745 context.setFillStyle("white")
3700 - context.fillText('强烈推荐', x1 + width+8*unit, y1-1*unit); 3746 + context.fillText('强烈推荐', x1 + width+8*unit, y1-1*unit);
  3747 +
  3748 + context.setFillStyle("black")
  3749 + context.setFontSize(24 * unit)
  3750 + context.fillText(getApp().globalData.config.store_name, 40 * unit, 130 * unit);
3701 } 3751 }
3702 - }else{ 3752 + } else {
3703 //--昵称--- 3753 //--昵称---
3704 context.setFontSize(24 * unit) 3754 context.setFontSize(24 * unit)
3705 context.setFillStyle("black") 3755 context.setFillStyle("black")
@@ -3708,9 +3758,9 @@ Page({ @@ -3708,9 +3758,9 @@ Page({
3708 //强烈推荐 改许程 3758 //强烈推荐 改许程
3709 var tj_path = "../../../images/share/q_tj.png"; 3759 var tj_path = "../../../images/share/q_tj.png";
3710 context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit); 3760 context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit);
3711 - context.setFontSize(16 * unit) 3761 + context.setFontSize(16 * unit);
3712 context.setLineJoin('round'); //交点设置成圆角 3762 context.setLineJoin('round'); //交点设置成圆角
3713 - context.setFillStyle("white") 3763 + context.setFillStyle("white");
3714 context.fillText('强烈推荐', 149 * unit + width + 15 * unit, 76 * unit); 3764 context.fillText('强烈推荐', 149 * unit + width + 15 * unit, 76 * unit);
3715 } 3765 }
3716 3766
@@ -3746,7 +3796,7 @@ Page({ @@ -3746,7 +3796,7 @@ Page({
3746 context.setFillStyle("black"); 3796 context.setFillStyle("black");
3747 context.setFontSize(21.3 * unit) 3797 context.setFontSize(21.3 * unit)
3748 th.draw_Text(context, th.data.data.goods_name, 3798 th.draw_Text(context, th.data.data.goods_name,
3749 - 38 * unit, 180 * unit, 20 * unit, 300*unit, unit); 3799 + 38 * unit, 170 * unit, 20 * unit, 300*unit, unit);
3750 //------ 产品的价格 ----- 3800 //------ 产品的价格 -----
3751 var pri0 = th.data.prom_act.addmoney; 3801 var pri0 = th.data.prom_act.addmoney;
3752 var integral=th.data.prom_act.integral; 3802 var integral=th.data.prom_act.integral;
@@ -3754,14 +3804,15 @@ Page({ @@ -3754,14 +3804,15 @@ Page({
3754 if(integral){text=integral+"积分"; } 3804 if(integral){text=integral+"积分"; }
3755 if(pri0 && integral){ text+="+";} 3805 if(pri0 && integral){ text+="+";}
3756 if(pri0){ text+="¥"+pri0;} 3806 if(pri0){ text+="¥"+pri0;}
3757 - 3807 +
  3808 + if(!pri0 && !integral){ text="0积分";}
3758 context.setFillStyle("red"); 3809 context.setFillStyle("red");
3759 - context.fillText(text, 38 * unit, 215 * unit); 3810 + context.fillText(text, 38 * unit, 235 * unit);
3760 3811
3761 } 3812 }
3762 3813
3763 //---中间大图--- 3814 //---中间大图---
3764 - context.drawImage(th.data.share_goods_img, 68 * unit, 242 * unit, 410 * unit, 410 * unit); 3815 + context.drawImage(th.data.share_goods_img, 70 * unit, 250 * unit, 408 * unit, 408 * unit);
3765 //-------大图后面就不一样了----------- 3816 //-------大图后面就不一样了-----------
3766 switch (type) { 3817 switch (type) {
3767 case 0: //普通商品的展示 3818 case 0: //普通商品的展示
@@ -3805,23 +3856,33 @@ Page({ @@ -3805,23 +3856,33 @@ Page({
3805 } 3856 }
3806 3857
3807 3858
3808 - //---画线---  
3809 - context.setLineWidth(1 * unit)  
3810 - context.moveTo(32 * unit, 710 * unit)  
3811 - context.lineTo(520 * unit, 710 * unit)  
3812 - context.stroke();  
3813 - //---文字---  
3814 - context.setFillStyle("black")  
3815 - context.setFontSize(22 * unit) 3859 + //---画线---
  3860 + context.setLineWidth(1 * unit)
  3861 + context.moveTo(32 * unit, 710 * unit)
  3862 + context.lineTo(520 * unit, 710 * unit)
  3863 + context.stroke();
  3864 +
  3865 + //---文字---
  3866 + context.setFillStyle("black")
  3867 + context.setFontSize(22 * unit)
3816 3868
3817 if(type==0){ 3869 if(type==0){
3818 // 原来start ---> 3870 // 原来start --->
3819 - context.fillText("优惠乐翻天,精彩就在你身边", 40 * unit, 776 * unit);  
3820 - context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 826 * unit); 3871 +
  3872 + context.fillText("优惠乐翻天,精彩就在你身边", 40 * unit, 806 * unit);
  3873 + context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 846 * unit);
  3874 + context.setFillStyle("black")
  3875 + context.setFontSize(28 * unit)
  3876 + context.fillText(th.data.sto_sele_name, 40 * unit, 766 * unit);
3821 }else{ 3877 }else{
3822 - // 原来start --->  
3823 - context.fillText("长按识别二维码", 40 * unit, 776 * unit);  
3824 - context.fillText("立即开始兑换", 40 * unit, 826 * unit); 3878 + // 原来start --->
  3879 + // context.fillText("长按识别二维码", 40 * unit, 776 * unit);
  3880 + // context.fillText("立即开始兑换", 40 * unit, 826 * unit);
  3881 + context.fillText("长按识别二维码", 40 * unit, 806 * unit);
  3882 + context.fillText("立即开始兑换", 40 * unit, 846 * unit);
  3883 + context.setFillStyle("black")
  3884 + context.setFontSize(28 * unit)
  3885 + context.fillText(th.data.sto_sele_name, 40 * unit, 766 * unit);
3825 } 3886 }
3826 3887
3827 //---二维吗图--- 3888 //---二维吗图---
@@ -3850,8 +3911,11 @@ Page({ @@ -3850,8 +3911,11 @@ Page({
3850 //---文字--- 3911 //---文字---
3851 context.setFontSize(22 * unit) 3912 context.setFontSize(22 * unit)
3852 context.setFillStyle("black") 3913 context.setFillStyle("black")
3853 - context.fillText("特惠好物,限时秒杀", 40 * unit, 806 * unit);  
3854 - context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 846 * unit); 3914 + context.fillText("特惠好物,限时秒杀", 40 * unit, 826 * unit);
  3915 + context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 866 * unit);
  3916 + context.setFillStyle("black")
  3917 + context.setFontSize(28 * unit)
  3918 + context.fillText(th.data.sto_sele_name, 40 * unit, 786 * unit);
3855 //---二维吗图--- 3919 //---二维吗图---
3856 //-- 自定义海报 -- 3920 //-- 自定义海报 --
3857 if(th.data.poster){ 3921 if(th.data.poster){
@@ -3891,11 +3955,14 @@ Page({ @@ -3891,11 +3955,14 @@ Page({
3891 context.setFontSize(22 * unit) 3955 context.setFontSize(22 * unit)
3892 context.fillText("已拼" + th.data.prom_act.buy_num + "份", 166 * unit, 763 * unit); 3956 context.fillText("已拼" + th.data.prom_act.buy_num + "份", 166 * unit, 763 * unit);
3893 context.setFillStyle("gray") 3957 context.setFillStyle("gray")
3894 - context.fillText("快来和我一起拼团吧!", 40 * unit, 826 * unit); 3958 + context.fillText("快来和我一起拼团吧!", 40 * unit, 836 * unit);
3895 context.setFillStyle("black") 3959 context.setFillStyle("black")
3896 context.font = 'normal bold 18px sans-serif'; 3960 context.font = 'normal bold 18px sans-serif';
3897 context.setFontSize(21.3 * unit) 3961 context.setFontSize(21.3 * unit)
3898 - context.fillText("长按识别二维码,立即参团", 40 * unit, 856 * unit); 3962 + context.fillText("长按识别二维码,立即参团", 40 * unit, 866 * unit);
  3963 + context.setFillStyle("black")
  3964 + context.setFontSize(26 * unit)
  3965 + context.fillText(th.data.sto_sele_name, 40 * unit, 806 * unit);
3899 //---二维吗图--- 3966 //---二维吗图---
3900 //-- 自定义海报 -- 3967 //-- 自定义海报 --
3901 if(th.data.poster){ 3968 if(th.data.poster){
@@ -3934,12 +4001,22 @@ Page({ @@ -3934,12 +4001,22 @@ Page({
3934 context.fillText("满" + item.rynum + "人", 40 * unit + wi, 786 * unit); 4001 context.fillText("满" + item.rynum + "人", 40 * unit + wi, 786 * unit);
3935 } 4002 }
3936 //----------------下面部分---------------- 4003 //----------------下面部分----------------
  4004 + // context.setFillStyle("gray")
  4005 + // context.fillText("快来和我一起拼团吧!", 40 * unit, 830 * unit);
  4006 + // context.setFillStyle("black")
  4007 + // context.font = 'normal bold 18px sans-serif';
  4008 + // context.setFontSize(22 * unit)
  4009 + // context.fillText("长按识别二维码,立即参团", 40 * unit, 860 * unit);
3937 context.setFillStyle("gray") 4010 context.setFillStyle("gray")
3938 - context.fillText("快来和我一起拼团吧!", 40 * unit, 830 * unit); 4011 + context.fillText("快来和我一起拼团吧!", 40 * unit, 810 * unit);
3939 context.setFillStyle("black") 4012 context.setFillStyle("black")
3940 context.font = 'normal bold 18px sans-serif'; 4013 context.font = 'normal bold 18px sans-serif';
3941 context.setFontSize(22 * unit) 4014 context.setFontSize(22 * unit)
3942 - context.fillText("长按识别二维码,立即参团", 40 * unit, 860 * unit); 4015 + context.fillText("长按识别二维码,立即参团", 40 * unit, 840 * unit);
  4016 +
  4017 + context.setFillStyle("black")
  4018 + context.setFontSize(26 * unit)
  4019 + context.fillText(th.data.sto_sele_name, 40 * unit, 876 * unit);
3943 4020
3944 //-- 自定义海报 -- 4021 //-- 自定义海报 --
3945 if(th.data.poster){ 4022 if(th.data.poster){
@@ -4241,7 +4318,7 @@ Page({ @@ -4241,7 +4318,7 @@ Page({
4241 } 4318 }
4242 4319
4243 4320
4244 - if (bconfig.is_sort_storage) { 4321 + if (bconfig && bconfig.is_sort_storage) {
4245 wx.getLocation({ 4322 wx.getLocation({
4246 type: 'gcj02', 4323 type: 'gcj02',
4247 success: function(res) { 4324 success: function(res) {
@@ -4582,7 +4659,7 @@ Page({ @@ -4582,7 +4659,7 @@ Page({
4582 var t_time = setInterval(function() { 4659 var t_time = setInterval(function() {
4583 if (th.data.bconfig == null) false; 4660 if (th.data.bconfig == null) false;
4584 var e = th.data.bconfig; 4661 var e = th.data.bconfig;
4585 - if (e.is_sort_storage) { 4662 + if (e && e.is_sort_storage) {
4586 wx.getLocation({ 4663 wx.getLocation({
4587 type: 'gcj02', 4664 type: 'gcj02',
4588 success: function(res) { 4665 success: function(res) {
@@ -4889,6 +4966,18 @@ Page({ @@ -4889,6 +4966,18 @@ Page({
4889 4966
4890 addCart_inte:function(t){ 4967 addCart_inte:function(t){
4891 this.add_cart_func_inte(t); 4968 this.add_cart_func_inte(t);
4892 - } 4969 + },
  4970 +
  4971 +
  4972 +
  4973 +
  4974 + onShareTimeline() {
  4975 + return {
  4976 + title:this.data.data.goods_name + '-' + getApp().globalData.config.store_name,
  4977 + imageUrl:this.data.gallery[0].image_url,
  4978 + }
  4979 + },
  4980 +
  4981 +
4893 4982
4894 }); 4983 });
pages/goods/goodsInfo/goodsInfo.wxml
@@ -177,6 +177,7 @@ @@ -177,6 +177,7 @@
177 <text class='gred' wx:else>还差<text style='color:#ff2753'>{{prom_act.ct_num - item.open_num}}</text>人成团 </text> 177 <text class='gred' wx:else>还差<text style='color:#ff2753'>{{prom_act.ct_num - item.open_num}}</text>人成团 </text>
178 <view class="t_show"> 178 <view class="t_show">
179 剩余 179 剩余
  180 + <text wx:if="{{timer[t_ind].day}}">{{timer[t_ind].day}}天:</text>
180 <text>{{timer[t_ind].hou}}</text>: 181 <text>{{timer[t_ind].hou}}</text>:
181 <text>{{timer[t_ind].min}}</text>: 182 <text>{{timer[t_ind].min}}</text>:
182 <text>{{timer[t_ind].sec}}</text> 183 <text>{{timer[t_ind].sec}}</text>
@@ -235,12 +236,13 @@ @@ -235,12 +236,13 @@
235 <view class="goods-price rel"> 236 <view class="goods-price rel">
236 <!-- 价格显示 --> 237 <!-- 价格显示 -->
237 <view class="co-red" style="overflow: hidden" > 238 <view class="co-red" style="overflow: hidden" >
238 - <view class="market-price" style="overflow: hidden"> 239 + <view class="market-price" style="overflow: hidden; height: 66rpx;">
239 <image class="rel_img" src="{{iurl}}/miniapp/images/integral/integral_red.png"></image> 240 <image class="rel_img" src="{{iurl}}/miniapp/images/integral/integral_red.png"></image>
240 <block wx:if="{{prom_integral}}">{{prom_integral}} 241 <block wx:if="{{prom_integral}}">{{prom_integral}}
241 <text class="rel_txt">积分</text></block> 242 <text class="rel_txt">积分</text></block>
242 <text class="rel_txt" wx:if="{{prom_integral && prom_price}}">+</text> 243 <text class="rel_txt" wx:if="{{prom_integral && prom_price}}">+</text>
243 - <text class="rel_txt" wx:if="{{prom_price}}" >{{filters.toFix(prom_price,2)}}元</text> 244 + <text class="rel_txt" wx:if="{{prom_price}}" >{{filters.toFix(prom_price,2)}}元</text>
  245 + <text class="rel_txt" wx:if="{{!prom_integral && !prom_price}}">0积分</text>
244 <text class="rel_txt" decode="{{true}}" space="{{true}}" style="color: #999; text-decoration: line-through;">&nbsp;&nbsp;&nbsp;零售价:¥{{data.market_price}}</text> 246 <text class="rel_txt" decode="{{true}}" space="{{true}}" style="color: #999; text-decoration: line-through;">&nbsp;&nbsp;&nbsp;零售价:¥{{data.market_price}}</text>
245 </view> 247 </view>
246 </view> 248 </view>
@@ -257,7 +259,8 @@ @@ -257,7 +259,8 @@
257 259
258 <view class="goods-num"> 260 <view class="goods-num">
259 <view class="sales">销量:{{prom_act.buy_num}}件</view> 261 <view class="sales">销量:{{prom_act.buy_num}}件</view>
260 - <view class="stock">折扣:{{filters.pInt((prom_price?prom_price:0)*100/data.shop_price)}}折</view> 262 + <!-- <view class="stock">折扣:{{data.disc}}折</view> -->
  263 + <view class="stock">折扣:{{g_filters.num((prom_price?prom_price:0)*100/data.shop_price)}}折</view>
261 <view class="stock">{{categories3[0].num}}人评价</view> 264 <view class="stock">{{categories3[0].num}}人评价</view>
262 </view> 265 </view>
263 </view> 266 </view>
@@ -364,6 +367,7 @@ @@ -364,6 +367,7 @@
364 <view class="goods-num" wx:if="{{prom_type!=1}}"> 367 <view class="goods-num" wx:if="{{prom_type!=1}}">
365 <view class="sales">销量:{{data.sales_sum}}件</view> 368 <view class="sales">销量:{{data.sales_sum}}件</view>
366 <view class="stock">折扣:{{data.disc}}折</view> 369 <view class="stock">折扣:{{data.disc}}折</view>
  370 + <!-- <view class="stock">折扣:{{filters.pInt((prom_price?prom_price:0)*100/data.shop_price)}}折</view> -->
367 <view class="stock">{{categories3[0].num}}人评价</view> 371 <view class="stock">{{categories3[0].num}}人评价</view>
368 </view> 372 </view>
369 <view wx:if="{{prom_type==1}}"> 373 <view wx:if="{{prom_type==1}}">
@@ -1424,14 +1428,15 @@ @@ -1424,14 +1428,15 @@
1424 1428
1425 <view wx:if="{{showPoster}}" class="poster-container"> 1429 <view wx:if="{{showPoster}}" class="poster-container">
1426 <view class="poster-wrapper"> 1430 <view class="poster-wrapper">
1427 - <view class="poster" bindtap="previewImage">  
1428 - <image src="{{shareImgPath}}" class="poster-img"></image> 1431 + <view class="poster">
  1432 + <!-- <view class="poster" bindtap="previewImage"> -->
  1433 + <image src="{{shareImgPath}}" class="poster-img" show-menu-by-longpress></image>
1429 <view class="btn-close" catchtap="closePoster">x</view> 1434 <view class="btn-close" catchtap="closePoster">x</view>
1430 </view> 1435 </view>
1431 - <view class="btn-container"> 1436 + <!-- <view class="btn-container">
1432 <button class="btn-share" open-type="share" bindtap="">微信好友分享</button> 1437 <button class="btn-share" open-type="share" bindtap="">微信好友分享</button>
1433 <button class="btn-share" bindtap="savePic">保存到相册</button> 1438 <button class="btn-share" bindtap="savePic">保存到相册</button>
1434 - </view> 1439 + </view> -->
1435 </view> 1440 </view>
1436 </view> 1441 </view>
1437 1442
pages/goods/goodsList/goodsList.js
@@ -128,7 +128,7 @@ Page({ @@ -128,7 +128,7 @@ Page({
128 //-- 获取 -- 128 //-- 获取 --
129 await getApp().request.promiseGet("/api/weshop/libao/libaoForm/page?id="+content.libao+"&store_id="+oo.stoid, { 129 await getApp().request.promiseGet("/api/weshop/libao/libaoForm/page?id="+content.libao+"&store_id="+oo.stoid, {
130 }).then(res => { 130 }).then(res => {
131 - if(res.data.code==0) 131 + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0)
132 arr[i].content.lb_name=res.data.data.pageData[0].lbtitle; 132 arr[i].content.lb_name=res.data.data.pageData[0].lbtitle;
133 }) 133 })
134 } 134 }
pages/goods/search/search.js
@@ -22,7 +22,12 @@ Page({ @@ -22,7 +22,12 @@ Page({
22 tabname: "sort", //排序的字段 22 tabname: "sort", //排序的字段
23 adname: "asc", //升降的字段 23 adname: "asc", //升降的字段
24 rq_data:null, 24 rq_data:null,
  25 +
  26 +
  27 + searchRecord: [],
  28 + keyword: '',
25 }, 29 },
  30 +
26 onLoad: function(t) { 31 onLoad: function(t) {
27 this.data.rq_data=t; 32 this.data.rq_data=t;
28 33
@@ -104,6 +109,9 @@ Page({ @@ -104,6 +109,9 @@ Page({
104 if (0 != t.max_price && t.max_price!=undefined) { url += "&min_pirce=" + t.min_pirce + "&max_price=" + t.max_price;} 109 if (0 != t.max_price && t.max_price!=undefined) { url += "&min_pirce=" + t.min_pirce + "&max_price=" + t.max_price;}
105 if (url != this.data.baseUrl) return this.requestSearch(url); 110 if (url != this.data.baseUrl) return this.requestSearch(url);
106 this.openSearchModal(); 111 this.openSearchModal();
  112 +
  113 + // 获取历史搜索记录
  114 + this.getHistorySearch();
107 }, 115 },
108 changeTab: function(t) { 116 changeTab: function(t) {
109 var ord = t.currentTarget.dataset.href; 117 var ord = t.currentTarget.dataset.href;
@@ -176,18 +184,23 @@ Page({ @@ -176,18 +184,23 @@ Page({
176 }); 184 });
177 }, 185 },
178 submitSearch: function(t) { 186 submitSearch: function(t) {
  187 + console.log(111);
179 this.search(t.detail.value.word); 188 this.search(t.detail.value.word);
  189 +
  190 +
180 }, 191 },
181 192
182 //热搜关键字 193 //热搜关键字
183 searchHotWord: function(t) { 194 searchHotWord: function(t) {
184 - this.search(t.currentTarget.dataset.word); 195 + this.historyRecord();
  196 + this.search(t.currentTarget.dataset.word);
185 }, 197 },
186 198
187 //-----点击搜索按钮---- 199 //-----点击搜索按钮----
188 search: function(t) { 200 search: function(t) {
189 if ("string" != typeof t || "" == t) return a.showWarning("请输入搜索关键词"); 201 if ("string" != typeof t || "" == t) return a.showWarning("请输入搜索关键词");
190 this.data.key_str=t; 202 this.data.key_str=t;
  203 + this.historyRecord();
191 this.resetData(), this.requestSearch(this.data.baseUrl + "&key_str=" + encodeURIComponent(t)); 204 this.resetData(), this.requestSearch(this.data.baseUrl + "&key_str=" + encodeURIComponent(t));
192 }, 205 },
193 206
@@ -253,4 +266,56 @@ Page({ @@ -253,4 +266,56 @@ Page({
253 func(ob); 266 func(ob);
254 }) 267 })
255 }, 268 },
  269 +
  270 +
  271 + getInput(e) {
  272 + this.setData({
  273 + keyword: e.detail.value
  274 + });
  275 + },
  276 +
  277 + historyRecord() {
  278 + let self = this;
  279 + let keyword = this.data.key_str;
  280 + let searchRecord = this.data.searchRecord;
  281 +
  282 + if(keyword) {
  283 + if(searchRecord.indexOf(keyword) > -1) {
  284 + // 已经存在该值
  285 + return;
  286 + } else {
  287 + if(searchRecord.length >= 10) {
  288 + searchRecord.pop(); // 删除最早的一条记录
  289 + };
  290 + searchRecord.unshift(keyword);
  291 +
  292 + // // 将历史记录添加到缓存中
  293 + wx.setStorage({
  294 + key: 'searchRecord',
  295 + data: searchRecord,
  296 + success: function(res) {
  297 + self.setData({
  298 + searchRecord,
  299 + })
  300 + }
  301 + })
  302 + };
  303 + };
  304 + },
  305 +
  306 +
  307 +
  308 +
  309 + getHistorySearch() {
  310 + this.setData({
  311 + searchRecord: wx.getStorageSync('searchRecord') || [] //若无存储则为空
  312 + });
  313 + },
  314 +
  315 + clearSearchRecord() {
  316 + wx.clearStorageSync('searchRecord');
  317 + this.setData({
  318 + searchRecord: []
  319 + });
  320 + },
256 }); 321 });
257 \ No newline at end of file 322 \ No newline at end of file
pages/goods/search/search.wxml
@@ -162,7 +162,7 @@ @@ -162,7 +162,7 @@
162 <view class="search-modal"> 162 <view class="search-modal">
163 <view class="search-bar"> 163 <view class="search-bar">
164 <form bindsubmit="submitSearch"> 164 <form bindsubmit="submitSearch">
165 - <input autoFocus class="search-input" name="word" placeholder="搜索商品"></input> 165 + <input autoFocus class="search-input" name="word" placeholder="搜索商品" bindinput="getInput"></input>
166 <button class="search-btn" formType="submit"> 166 <button class="search-btn" formType="submit">
167 <image class="wh100 search-img" src="{{url}}/miniapp/images/sea.png"></image> 167 <image class="wh100 search-img" src="{{url}}/miniapp/images/sea.png"></image>
168 </button> 168 </button>
@@ -176,5 +176,17 @@ @@ -176,5 +176,17 @@
176 </view> 176 </view>
177 </block> 177 </block>
178 </view> 178 </view>
  179 + <view class="search-hot">
  180 + <view class="hot-title flex jc_sb ai_c">
  181 + <text>历史搜索</text>
  182 + <text class="iconfont icon-shanchu xc-ash" bindtap="clearSearchRecord" wx:if="{{searchRecord.length != 0}}"></text>
  183 + </view>
  184 + <block wx:if="{{searchRecord.length>0}}">
  185 + <view class="hot-row flex flex-wrap" wx:key="{{index}}">
  186 + <view class="hot-item history ellipsis-1" bindtap="searchHotWord" data-word="{{item}}" wx:for="{{searchRecord}}" wx:key="{{index}}">{{item}}</view>
  187 + </view>
  188 + </block>
  189 + <view wx:else class="fs24">暂无历史搜索记录</view>
  190 + </view>
179 </view> 191 </view>
180 </view> 192 </view>
181 \ No newline at end of file 193 \ No newline at end of file
pages/goods/search/search.wxss
@@ -298,3 +298,14 @@ @@ -298,3 +298,14 @@
298 /* line-height: 38rpx; */ 298 /* line-height: 38rpx; */
299 flex-grow: 1; 299 flex-grow: 1;
300 } 300 }
  301 +
  302 +.history {
  303 + background-color: #f0f0f0;
  304 + color: #7b7b7b;
  305 + border: none;
  306 + margin-bottom: 8rpx;
  307 +}
  308 +
  309 +.history:first-of-type {
  310 + margin-left: 0;
  311 +}
pages/index/index/index.js
@@ -85,7 +85,7 @@ Page({ @@ -85,7 +85,7 @@ Page({
85 } 85 }
86 86
87 if(first_leader){ 87 if(first_leader){
88 - //-- user_id代过来免登 -- 88 + //-- user_id代过来免登 --
89 getApp().globalData.first_leader=first_leader; 89 getApp().globalData.first_leader=first_leader;
90 //调用接口判断是不是会员 90 //调用接口判断是不是会员
91 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{ 91 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{
@@ -478,6 +478,9 @@ Page({ @@ -478,6 +478,9 @@ Page({
478 this.data.recommend = null, this.data.currentPage = 1, n.resetConfig(), this.requestHomePage(), 478 this.data.recommend = null, this.data.currentPage = 1, n.resetConfig(), this.requestHomePage(),
479 this.requestRecommend(); 479 this.requestRecommend();
480 }, 480 },
  481 + requestRecommend(){},
  482 + requestHomePage(){},
  483 +
481 onUnload: function() { 484 onUnload: function() {
482 this.destroyActivityTimer(); 485 this.destroyActivityTimer();
483 }, 486 },
@@ -884,7 +887,17 @@ Page({ @@ -884,7 +887,17 @@ Page({
884 }, 887 },
885 888
886 889
887 - 890 + onShareTimeline() {
  891 + // getApp().getConfig(function(t) {
  892 + // return {
  893 + // title: '首页-' + getApp().globalData.config.store_name,
  894 + // }
  895 + // });
  896 +
  897 + return {
  898 + title: '首页-' + getApp().globalData.config.store_name,
  899 + }
  900 + },
888 901
889 902
890 }); 903 });
891 \ No newline at end of file 904 \ No newline at end of file
pages/index/index/index.json
1 -{  
2 - 1 +{
3 "usingComponents": { 2 "usingComponents": {
4 "goods_recommend":"/components/goods_list/goods_list", 3 "goods_recommend":"/components/goods_list/goods_list",
5 "nav": "/components/diy_nav/diy_nav", 4 "nav": "/components/diy_nav/diy_nav",
@@ -17,6 +16,8 @@ @@ -17,6 +16,8 @@
17 "assist":"/components/diy_assist/diy_assist", 16 "assist":"/components/diy_assist/diy_assist",
18 "picMax": "/components/diy_picMax/diy_picMax", 17 "picMax": "/components/diy_picMax/diy_picMax",
19 "mvideo": "/components/diy_video/diy_video", 18 "mvideo": "/components/diy_video/diy_video",
20 - "service": "/components/diy_service/diy_service"  
21 - } 19 + "service": "/components/diy_service/diy_service",
  20 + "scan": "/components/diy_scan/diy_scan"
  21 + },
  22 + "enablePullDownRefresh": false
22 } 23 }
23 \ No newline at end of file 24 \ No newline at end of file
pages/index/index/index.wxml
@@ -348,6 +348,10 @@ @@ -348,6 +348,10 @@
348 <!--在线上客服--> 348 <!--在线上客服-->
349 <block wx:if="{{item.ename=='onlineService'}}"> 349 <block wx:if="{{item.ename=='onlineService'}}">
350 <service object="{{item.content}}"></service> 350 <service object="{{item.content}}"></service>
  351 + </block>
  352 + <!--扫一扫-->
  353 + <block wx:if="{{item.ename=='scan'}}">
  354 + <scan object="{{item.content}}"></scan>
351 </block> 355 </block>
352 356
353 </view> 357 </view>
pages/justTest/justTest.js deleted
1 -// pages/justTest/justTest.js  
2 -// let livePlayer = requirePlugin('live-player-plugin');  
3 -  
4 -  
5 -var t = require("../../utils/util.js"),  
6 - ut = t,  
7 - e = require("../../utils/common.js"),  
8 - a = require("../../utils/wxParse/wxParse.js"),  
9 - s = getApp(),  
10 - i = s.request,  
11 - rq = i,  
12 - oo = s.globalData,  
13 - o = s.globalData.setting,  
14 - os = o;  
15 -var utils = require('../../utils/util.js'),ut=utils;  
16 -var regeneratorRuntime = require('../../utils/runtime.js');  
17 -  
18 -Page({  
19 -  
20 - /**  
21 - * 页面的初始数据  
22 - */  
23 - data: {  
24 - gid: "",  
25 - stoid: o.stoid,  
26 - url: o.url,  
27 - resourceUrl: o.resourceUrl,  
28 - iurl: o.imghost,  
29 - defaultAvatar: o.resourceUrl + "/static/images/user68.jpg",  
30 - data: null,  
31 - openSpecModal: !1,  
32 - openPromModal: !1,  
33 - supportPageScroll: !1,  
34 -  
35 - //联系电话  
36 - mobile: '',  
37 - bconfig:null,  
38 - sales_rules:1,  
39 -  
40 - t_time:null,  
41 - card_field:"",  
42 - dp_price:0,  
43 - cut_price:0,  
44 - open_ind_store:1,  
45 - goodsInputNum:1,  
46 - g_buy_num: null,  
47 - sele_collocation:null,  
48 -  
49 -  
50 -  
51 - photoUrl: "https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1003256280,1176261798&fm=26&gp=0.jpg",  
52 - //(用来控制显示哪个按钮) false表示还没首次进行弹框授权,或者已经授权了;true表示在首次授权弹框时拒绝授权,或者在设置页面还是拒绝了授权  
53 - isAuthSavePhoto: false  
54 - },  
55 -  
56 -  
57 -  
58 -  
59 -  
60 - sendRequest: function () {  
61 -  
62 -  
63 -  
64 - //调用接口判断是不是会员  
65 - getApp().request.promiseGet("/api/weshop/wx/livelist/page",{  
66 - data:{store_id: 1}  
67 - }).then(res=>{  
68 - console.log(res);  
69 - // if(res.data.code==0){  
70 - // getApp().globalData.guide_id=res.data.data.id;  
71 - // }  
72 - })  
73 -  
74 - },  
75 - // nav: function () {  
76 - // wx.redirectTo({  
77 - // url: '/packageA/pages/liveStream/liveStream'  
78 - // })  
79 - // },  
80 - /**  
81 - * 生命周期函数--监听页面加载  
82 - */  
83 - onLoad: function (options) {  
84 -  
85 - },  
86 -  
87 - /**  
88 - * 生命周期函数--监听页面初次渲染完成  
89 - */  
90 - onReady: function () {  
91 -  
92 - },  
93 -  
94 - /**  
95 - * 生命周期函数--监听页面显示  
96 - */  
97 - onShow: function () {  
98 -  
99 - },  
100 -  
101 - /**  
102 - * 生命周期函数--监听页面隐藏  
103 - */  
104 - onHide: function () {  
105 -  
106 - },  
107 -  
108 - /**  
109 - * 生命周期函数--监听页面卸载  
110 - */  
111 - onUnload: function () {  
112 -  
113 - },  
114 -  
115 - /**  
116 - * 页面相关事件处理函数--监听用户下拉动作  
117 - */  
118 - onPullDownRefresh: function () {  
119 -  
120 - },  
121 -  
122 - /**  
123 - * 页面上拉触底事件的处理函数  
124 - */  
125 - onReachBottom: function () {  
126 -  
127 - },  
128 -  
129 - /**  
130 - * 用户点击右上角分享  
131 - */  
132 - onShareAppMessage: function () {  
133 -  
134 - },  
135 -  
136 -  
137 -  
138 -  
139 - saveImage() {  
140 - wx.showLoading({  
141 - title: '保存中...',  
142 - mask: true,  
143 - });  
144 - wx.downloadFile({  
145 - url:  
146 - 'http://upload.jianshu.io/admin_banners/web_images/4435/c1d3ca63353c8bd527f0d781605516cb5b266d02.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/1250/h/540',  
147 - success: function(res) {  
148 - if (res.statusCode === 200) {  
149 - let img = res.tempFilePath;  
150 - wx.saveImageToPhotosAlbum({  
151 - filePath: img,  
152 - success(res) {  
153 - wx.showToast({  
154 - title: '保存成功',  
155 - icon: 'success',  
156 - duration: 2000  
157 - });  
158 - },  
159 - fail(res) {  
160 - wx.showToast({  
161 - title: '保存失败',  
162 - icon: 'success',  
163 - duration: 2000  
164 - });  
165 - }  
166 - });  
167 - }  
168 - }  
169 - });  
170 - },  
171 -  
172 -  
173 -  
174 - live() {}  
175 -  
176 -  
177 -})  
178 \ No newline at end of file 0 \ No newline at end of file
pages/justTest/justTest.json deleted
1 -{  
2 - "usingComponents": {}  
3 -}  
4 \ No newline at end of file 0 \ No newline at end of file
pages/justTest/justTest.wxml deleted
1 -<!--pages/justTest/justTest.wxml-->  
2 -<text>pages/justTest/justTest.wxml</text>  
3 -<navigator url="/packageA/pages/liveStream/liveStream">进入直播</navigator>  
4 -<navigator url="/packageA/pages/liveStreamDetails/liveStreamDetails">进入直播详情页</navigator>  
5 -<button bindtap="sendRequest">发送请求</button>  
6 -  
7 -  
8 -  
9 -  
10 -<button open-type="share" class='iconfont icon-weixin'>分享</button>  
11 -<button bindopensetting="onOpenSetting" open-type="openSetting" >  
12 - 保存图片到手机  
13 -</button>  
14 -  
15 -  
16 -  
17 -  
18 -<button bindtap="showac"></button>  
19 -  
pages/justTest/justTest.wxss deleted
1 -/* pages/justTest/justTest.wxss */  
2 -page {  
3 - background: #fff;  
4 - text-align: center;  
5 -}  
6 -  
7 -.box {  
8 - padding: 30rpx 80rpx;  
9 -}  
10 -  
11 -.img {  
12 - width: 430rpx;  
13 - height: 430rpx;  
14 - margin: 20rpx 0;  
15 -}  
16 -button {  
17 - width: 100%;  
18 - background: #ffffff;  
19 - border: none;  
20 - border-radius: 0rpx;  
21 - padding: 0;  
22 - margin: 0;  
23 -}  
24 -  
25 -.btn {  
26 - background: green;  
27 - color: #ffffff;  
28 - border-radius: 0;  
29 -}  
30 \ No newline at end of file 0 \ No newline at end of file
pages/team/team_more/team_more.js
@@ -112,6 +112,8 @@ Page({ @@ -112,6 +112,8 @@ Page({
112 // 获取当前时间,同时得到活动结束时间数组 112 // 获取当前时间,同时得到活动结束时间数组
113 var newTime = ut.gettimestamp(); 113 var newTime = ut.gettimestamp();
114 var List = this.data.teamgroup; 114 var List = this.data.teamgroup;
  115 + if(!List || List.length<=0) return false;
  116 +
115 for (var j = 0; j < List.length; j++) { 117 for (var j = 0; j < List.length; j++) {
116 // 对结束时间进行处理渲染到页面 118 // 对结束时间进行处理渲染到页面
117 var endTime = List[j].kt_end_time; 119 var endTime = List[j].kt_end_time;
pages/team/team_more/team_more.wxml
@@ -17,7 +17,9 @@ @@ -17,7 +17,9 @@
17 <text class='gred' wx:else>还差{{pt_act.ct_num - item.open_num}}人成团</text> 17 <text class='gred' wx:else>还差{{pt_act.ct_num - item.open_num}}人成团</text>
18 <view> 18 <view>
19 <view class="time_show_view"> 19 <view class="time_show_view">
20 - 剩余<text>{{item.djs.hou}}</text>: 20 + 剩余
  21 + <text wx:if="{{item.djs.day}}">{{item.djs.day}}天:</text>
  22 + <text>{{item.djs.hou}}</text>:
21 <text>{{item.djs.min}}</text>: 23 <text>{{item.djs.min}}</text>:
22 <text>{{item.djs.sec}}</text>结束 24 <text>{{item.djs.sec}}</text>结束
23 </view> 25 </view>
pages/team/team_show/team_show.js
@@ -363,24 +363,31 @@ Page({ @@ -363,24 +363,31 @@ Page({
363 //获取活动从表信息team_id,listno团编号(券号) 363 //获取活动从表信息team_id,listno团编号(券号)
364 await getApp().request.promiseGet("/api/weshop/teamgroup/get/"+os.stoid+"/"+tg_id, { 364 await getApp().request.promiseGet("/api/weshop/teamgroup/get/"+os.stoid+"/"+tg_id, {
365 }).then(res => { 365 }).then(res => {
366 - teamgroup = res.data.data;  
367 - //获取当前时间,并且判断剩余时间  
368 - var nt = ut.gettimestamp();  
369 - var buy_start_date = ut.formatTime(teamgroup.buy_start_date, "yyyy-MM-dd hh:mm:ss");  
370 - ee.setData({  
371 - pindGoods: teamgroup,  
372 - buy_start_date: buy_start_date  
373 - });  
374 -  
375 - if(nt>teamgroup.kt_end_time) {  
376 - th.setData({is_group_end:1,end_text:"团期已经结束"})  
377 - }  
378 - if(teamgroup.state==1) {  
379 - th.setData({is_group_end:1,end_text:"团期已经结束"})  
380 - }  
381 - if(teamgroup.state==3 || teamgroup.state==4 || teamgroup.state==5 ) {  
382 - th.setData({is_group_end:2,end_text:"团期已满"})  
383 - } 366 +
  367 +
  368 + if(res.data.code==0 && res.data && res.data.data ) {
  369 +
  370 + teamgroup = res.data.data;
  371 +
  372 + //获取当前时间,并且判断剩余时间
  373 + var nt = ut.gettimestamp();
  374 + var buy_start_date = ut.formatTime(teamgroup.buy_start_date, "yyyy-MM-dd hh:mm:ss");
  375 + ee.setData({
  376 + pindGoods: teamgroup,
  377 + buy_start_date: buy_start_date
  378 + });
  379 +
  380 + if(nt>teamgroup.kt_end_time) {
  381 + th.setData({is_group_end:1,end_text:"团期已经结束"})
  382 + }
  383 + if(teamgroup.state==1) {
  384 + th.setData({is_group_end:1,end_text:"团期已经结束"})
  385 + }
  386 + if(teamgroup.state==3 || teamgroup.state==4 || teamgroup.state==5 ) {
  387 + th.setData({is_group_end:2,end_text:"团期已满"})
  388 + }
  389 +
  390 + }
384 391
385 }) 392 })
386 393
@@ -969,7 +976,7 @@ Page({ @@ -969,7 +976,7 @@ Page({
969 return false; 976 return false;
970 } 977 }
971 978
972 - if (bconfig.is_sort_storage) { 979 + if ( bconfig && bconfig.is_sort_storage) {
973 wx.getLocation({ 980 wx.getLocation({
974 type: 'gcj02', 981 type: 'gcj02',
975 success: function(res) { 982 success: function(res) {
@@ -1034,7 +1041,7 @@ Page({ @@ -1034,7 +1041,7 @@ Page({
1034 var t_time = setInterval(function() { 1041 var t_time = setInterval(function() {
1035 if (th.data.bconfig == null) false; 1042 if (th.data.bconfig == null) false;
1036 var e = th.data.bconfig; 1043 var e = th.data.bconfig;
1037 - if (e.is_sort_storage) { 1044 + if (e && e.is_sort_storage) {
1038 wx.getLocation({ 1045 wx.getLocation({
1039 type: 'gcj02', 1046 type: 'gcj02',
1040 success: function(res) { 1047 success: function(res) {
@@ -1109,7 +1116,7 @@ Page({ @@ -1109,7 +1116,7 @@ Page({
1109 if (e.data.code == 0) { 1116 if (e.data.code == 0) {
1110 1117
1111 //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 1118 //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店
1112 - if(dd.lat && !th.data.def_pick_store && th.data.bconfig.is_sort_storage){ 1119 + if(dd.lat && !th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage){
1113 th.setData({ 1120 th.setData({
1114 def_pick_store:e.data.data.pageData[0], 1121 def_pick_store:e.data.data.pageData[0],
1115 sto_sele_name: e.data.data.pageData[0].pickup_name, 1122 sto_sele_name: e.data.data.pageData[0].pickup_name,
@@ -1289,7 +1296,7 @@ Page({ @@ -1289,7 +1296,7 @@ Page({
1289 only_pk: e.data.data.pageData 1296 only_pk: e.data.data.pageData
1290 }); 1297 });
1291 //-----如果没有默认门店,要取第一个门店作为默认店------ 1298 //-----如果没有默认门店,要取第一个门店作为默认店------
1292 - if (!th.data.def_pick_store && th.data.bconfig.is_sort_storage) { 1299 + if (!th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage) {
1293 th.setData({ 1300 th.setData({
1294 def_pick_store:e.data.data.pageData[0], 1301 def_pick_store:e.data.data.pageData[0],
1295 sto_sele_name: e.data.data.pageData[0].pickup_name, 1302 sto_sele_name: e.data.data.pageData[0].pickup_name,
pages/team/team_success/team_success.js
@@ -47,6 +47,7 @@ Page({ @@ -47,6 +47,7 @@ Page({
47 }, 47 },
48 onLoad: function (t) { 48 onLoad: function (t) {
49 wx.setNavigationBarTitle({ title: "拼团订单",}) 49 wx.setNavigationBarTitle({ title: "拼团订单",})
  50 +
50 var that=this; 51 var that=this;
51 var th=this; 52 var th=this;
52 //获取用户设备信息,屏幕宽度 53 //获取用户设备信息,屏幕宽度
@@ -56,7 +57,7 @@ Page({ @@ -56,7 +57,7 @@ Page({
56 } 57 }
57 }) 58 })
58 var pay_f = t.payf, order_sn = t.ordersn; 59 var pay_f = t.payf, order_sn = t.ordersn;
59 - this.setData({ pay_f: pay_f, order_sn: order_sn}), 60 + this.setData({ pay_f: pay_f, order_sn: order_sn});
60 this.init(order_sn); 61 this.init(order_sn);
61 62
62 //-- 自定义海报 -- 63 //-- 自定义海报 --
@@ -209,6 +210,19 @@ Page({ @@ -209,6 +210,19 @@ Page({
209 min_price=pri; 210 min_price=pri;
210 211
211 } 212 }
  213 +
  214 +
  215 + //获取商品信息
  216 + getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + goods_id, {
  217 + }).then(res => {
  218 + //商品地址
  219 + original_img = ee.data.imageurl+ res.data.data.original_img,
  220 + goods = res.data.data
  221 +
  222 + ee.setData({goods: goods,image: original_img,})
  223 +
  224 + })
  225 +
212 } 226 }
213 }) 227 })
214 228
@@ -233,13 +247,7 @@ Page({ @@ -233,13 +247,7 @@ Page({
233 } 247 }
234 248
235 249
236 - //获取商品信息  
237 - await getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + goods_id, {  
238 - }).then(res => {  
239 - //商品地址  
240 - original_img = ee.data.imageurl+ res.data.data.original_img,  
241 - goods = res.data.data  
242 - }) 250 +
243 251
244 //获取活动从表信息team_id:305暂时 252 //获取活动从表信息team_id:305暂时
245 await getApp().request.promiseGet("/api/weshop/teamgroup/page" , { 253 await getApp().request.promiseGet("/api/weshop/teamgroup/page" , {
@@ -266,10 +274,14 @@ Page({ @@ -266,10 +274,14 @@ Page({
266 } 274 }
267 275
268 //获取大家都在团信息 276 //获取大家都在团信息
269 - await getApp().request.promiseGet("/api/weshop/teamlist/pageteam/1?store_id="+ os.stoid +"&is_end=0&is_show=1" , { 277 + getApp().request.promiseGet("/api/weshop/teamlist/pageteam/1?store_id="+ os.stoid +"&is_end=0&is_show=1" , {
270 data:{page:1,pageSize:2} 278 data:{page:1,pageSize:2}
271 }).then(res => { 279 }).then(res => {
272 - pageteam = res.data.data.pageData; 280 + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){
  281 + pageteam = res.data.data.pageData;
  282 + ee.setData({pageteam: pageteam,})
  283 + }
  284 +
273 }) 285 })
274 286
275 //--当是成团的时候的操作-- 287 //--当是成团的时候的操作--
@@ -277,8 +289,8 @@ Page({ @@ -277,8 +289,8 @@ Page({
277 //设置值 289 //设置值
278 290
279 ee.setData({ 291 ee.setData({
280 - ordertx2: ordertx2, ordertx: ordertx, teamlist: teamlist, teamgroup: teamgroup, goods: goods, pageteam: pageteam, min_price: min_price,  
281 - order: order, image: original_img, share_img: share_img,max_num:max_num, 292 + ordertx2: ordertx2, ordertx: ordertx, teamlist: teamlist, teamgroup: teamgroup, min_price: min_price,
  293 + order: order, share_img: share_img,max_num:max_num,
282 pindGoods: teamlist,is_show:1, zk:false, 294 pindGoods: teamlist,is_show:1, zk:false,
283 hiddenName: false, ct_price:ct_price,p_status:p_status,sf_arr:sf_arr}); 295 hiddenName: false, ct_price:ct_price,p_status:p_status,sf_arr:sf_arr});
284 296
@@ -290,8 +302,8 @@ Page({ @@ -290,8 +302,8 @@ Page({
290 console.log("239什么鬼", teamlist); 302 console.log("239什么鬼", teamlist);
291 //设置值 303 //设置值
292 ee.setData({ 304 ee.setData({
293 - ordertx2: ordertx2, ordertx: ordertx, teamlist: teamlist, teamgroup: teamgroup, goods: goods, pageteam: pageteam,  
294 - order: order, image: original_img, p_status: p_status, min_price:min_price, 305 + ordertx2: ordertx2, ordertx: ordertx, teamlist: teamlist, teamgroup: teamgroup,
  306 + order: order, p_status: p_status, min_price:min_price,
295 share_img: share_img, max_num: max_num, pindGoods: teamlist, is_show: 1, 307 share_img: share_img, max_num: max_num, pindGoods: teamlist, is_show: 1,
296 ct_price: ct_price, p_status: p_status,sf_arr:sf_arr}); 308 ct_price: ct_price, p_status: p_status,sf_arr:sf_arr});
297 } 309 }
@@ -328,6 +340,8 @@ Page({ @@ -328,6 +340,8 @@ Page({
328 // 获取当前时间,同时得到活动结束时间数组 340 // 获取当前时间,同时得到活动结束时间数组
329 var newTime = ut.gettimestamp(); 341 var newTime = ut.gettimestamp();
330 var o = this.data.teamgroup; 342 var o = this.data.teamgroup;
  343 + if(!o) return false;
  344 +
331 var endTime = o.kt_end_time; 345 var endTime = o.kt_end_time;
332 if (o.status == 0) endTime = o.start_time; 346 if (o.status == 0) endTime = o.start_time;
333 347
pages/template/index.json
@@ -18,6 +18,8 @@ @@ -18,6 +18,8 @@
18 "assist":"/components/diy_assist/diy_assist", 18 "assist":"/components/diy_assist/diy_assist",
19 "picMax": "/components/diy_picMax/diy_picMax", 19 "picMax": "/components/diy_picMax/diy_picMax",
20 "mvideo": "/components/diy_video/diy_video", 20 "mvideo": "/components/diy_video/diy_video",
21 - "service": "/components/diy_service/diy_service"  
22 - } 21 + "service": "/components/diy_service/diy_service",
  22 + "scan": "/components/diy_scan/diy_scan"
  23 + },
  24 + "enablePullDownRefresh": false
23 } 25 }
24 \ No newline at end of file 26 \ No newline at end of file
pages/template/index.wxml
@@ -57,6 +57,10 @@ @@ -57,6 +57,10 @@
57 <block wx:if="{{item.ename=='onlineService'}}"> 57 <block wx:if="{{item.ename=='onlineService'}}">
58 <service object="{{item.content}}"></service> 58 <service object="{{item.content}}"></service>
59 </block> 59 </block>
  60 + <!--扫一扫-->
  61 + <block wx:if="{{item.ename=='scan'}}">
  62 + <scan object="{{item.content}}"></scan>
  63 + </block>
60 </view> 64 </view>
61 </block> 65 </block>
62 </view> 66 </view>
pages/togoin/togoin.js
@@ -67,7 +67,7 @@ Page({ @@ -67,7 +67,7 @@ Page({
67 that.setData({user:user}) 67 that.setData({user:user})
68 //如果有会员的话,没有sessionKey 68 //如果有会员的话,没有sessionKey
69 if(!e.data.data.sessionKey){ 69 if(!e.data.data.sessionKey){
70 - getApp().showWarning("登成功"); 70 + getApp().showWarning("登成功");
71 getApp().globalData.userInfo=e.data.data; 71 getApp().globalData.userInfo=e.data.data;
72 getApp().globalData.user_id=e.data.data.user_id; 72 getApp().globalData.user_id=e.data.data.user_id;
73 getApp().globalData.openid = e.data.data.weapp_openid; 73 getApp().globalData.openid = e.data.data.weapp_openid;
@@ -89,7 +89,7 @@ Page({ @@ -89,7 +89,7 @@ Page({
89 }) 89 })
90 }, 90 },
91 91
92 - //暂不登,返回上一页 92 + //暂不登,返回上一页
93 cancle_bind:function () { 93 cancle_bind:function () {
94 wx.navigateBack({ delta: 1}) 94 wx.navigateBack({ delta: 1})
95 }, 95 },
pages/togoin/togoin.wxml
@@ -16,20 +16,20 @@ @@ -16,20 +16,20 @@
16 <button hidden="{{user}}" class="getPhoneNumber" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo"> 16 <button hidden="{{user}}" class="getPhoneNumber" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
17 <view class="flex flex-center2 ali-c"> 17 <view class="flex flex-center2 ali-c">
18 <image class="we_chat" src="{{imghots}}/miniapp/images/we_chat.png"></image> 18 <image class="we_chat" src="{{imghots}}/miniapp/images/we_chat.png"></image>
19 - <view>微信账号快捷登</view> 19 + <view>微信账号快捷登</view>
20 </view> 20 </view>
21 </button> 21 </button>
22 <!-- 点击显示绑定手机的对话框 --> 22 <!-- 点击显示绑定手机的对话框 -->
23 <button hidden="{{!user}}" class="getPhoneNumber" bindtap="show_bind_mobile"> 23 <button hidden="{{!user}}" class="getPhoneNumber" bindtap="show_bind_mobile">
24 <view class="flex flex-center2 ali-c" > 24 <view class="flex flex-center2 ali-c" >
25 <image class="we_chat" src="{{imghots}}/miniapp/images/we_chat.png"></image> 25 <image class="we_chat" src="{{imghots}}/miniapp/images/we_chat.png"></image>
26 - <view>微信账号快捷登</view> 26 + <view>微信账号快捷登</view>
27 </view> 27 </view>
28 </button> 28 </button>
29 </view> 29 </view>
30 30
31 <view class="userlongin flex-center2 flex fs30 jc_sb" style="margin: 0 130rpx"> 31 <view class="userlongin flex-center2 flex fs30 jc_sb" style="margin: 0 130rpx">
32 - <view bindtap="cancle_bind">暂不登</view> 32 + <view bindtap="cancle_bind">暂不登</view>
33 </view> 33 </view>
34 34
35 </view> 35 </view>
@@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
41 <view class="cover-layer" bindtap="close_pop"></view> 41 <view class="cover-layer" bindtap="close_pop"></view>
42 <view class="p_content"> 42 <view class="p_content">
43 <view class="p_title flex ali-c fs34"> 43 <view class="p_title flex ali-c fs34">
44 - 请授权绑定手机号完成注册,拒绝将登失败 44 + 请授权绑定手机号完成注册,拒绝将登失败
45 </view> 45 </view>
46 <view class="flex btn_view"> 46 <view class="flex btn_view">
47 <view bindtap="close_pop" style="height: 100%; line-height:normal;" class="txt-center f2 flex ali-c flex-center2 fs36 b_right">拒绝</view> 47 <view bindtap="close_pop" style="height: 100%; line-height:normal;" class="txt-center f2 flex ali-c flex-center2 fs36 b_right">拒绝</view>
pages/user/assistance/assistance.js
@@ -228,6 +228,22 @@ Page({ @@ -228,6 +228,22 @@ Page({
228 var help_id = this.data.help_id; 228 var help_id = this.data.help_id;
229 var taskid=e.currentTarget.dataset.taskid; 229 var taskid=e.currentTarget.dataset.taskid;
230 getApp().goto("/pages/user/assistance/task_assistance?help_id=" + help_id+"&taskid="+taskid); 230 getApp().goto("/pages/user/assistance/task_assistance?help_id=" + help_id+"&taskid="+taskid);
231 - } 231 + },
  232 +
  233 + onShareAppMessage(res) {
  234 + if (res.from === 'button') {
  235 + // 来自页面内转发按钮
  236 + console.log(res.target)
  237 + }
  238 + return {
  239 + // title: '自定义转发标题',
  240 + }
  241 + },
  242 +
  243 + onShareTimeline() {
  244 + return {
  245 + title: '好友助力-' + getApp().globalData.config.store_name,
  246 + }
  247 + },
232 248
233 }) 249 })
pages/user/assistance/task_assistance.js
@@ -203,7 +203,7 @@ Page({ @@ -203,7 +203,7 @@ Page({
203 getApp().my_warnning(data.msg, 0, th); 203 getApp().my_warnning(data.msg, 0, th);
204 return false; 204 return false;
205 } 205 }
206 - if (data.code == 0) { 206 + if (data.code == 0 && data.data && data.data.pageData && data.data.pageData.length>0) {
207 //轮播图的数据 207 //轮播图的数据
208 var data_aissa = data.data.pageData; 208 var data_aissa = data.data.pageData;
209 //当前时间戳 209 //当前时间戳
pages/user/coupons/coupons.js
@@ -229,16 +229,20 @@ Page({ @@ -229,16 +229,20 @@ Page({
229 getApp().request.promiseGet("/api/weshop/users/listQuan", { 229 getApp().request.promiseGet("/api/weshop/users/listQuan", {
230 data:get_data 230 data:get_data
231 }).then(res=>{ 231 }).then(res=>{
232 - var a = res.data,val = a.data.total;  
233 - var details = a.data.pageData;  
234 - if (details.length == 0){  
235 - if(th.data.b_out_arr) th.setData({ number: th.data.b_out_arr.length});  
236 - return false;  
237 - }  
238 -  
239 - var all_length=val+th.data.b_out_arr.length;  
240 - th.setData({ number: all_length});  
241 - 232 +
  233 + if(res.data.code==0 && res.data){
  234 + var a = res.data,val = a.data.total;
  235 + var details = a.data.pageData;
  236 + if (details.length == 0){
  237 + if(th.data.b_out_arr) th.setData({ number: th.data.b_out_arr.length});
  238 + return false;
  239 + }
  240 + var all_length=val;
  241 + if(th.data.b_out_arr) all_length+=th.data.b_out_arr.length;
  242 + th.setData({ number: all_length});
  243 + }
  244 +
  245 +
242 }) 246 })
243 }, 247 },
244 248
pages/user/coupons/coupons.wxml
@@ -63,7 +63,8 @@ @@ -63,7 +63,8 @@
63 <view wx:else> 63 <view wx:else>
64 <view class="text">有效期:不限</view> 64 <view class="text">有效期:不限</view>
65 </view> 65 </view>
66 - <view class="textss">使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}} 66 + <view wx:if="{{detail.Remark}}" class="textss">{{detail.Remark}}</view>
  67 + <view wx:else class="textss">使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}}
67 </view> 68 </view>
68 69
69 </view> 70 </view>
pages/user/index/index.js
@@ -143,12 +143,15 @@ Page({ @@ -143,12 +143,15 @@ Page({
143 /*-----获取线下会员的预存款和优惠券的数量-----*/ 143 /*-----获取线下会员的预存款和优惠券的数量-----*/
144 rq.get("/api/weshop/users/getinfo/" + os.stoid + "/" + e.user_id, { 144 rq.get("/api/weshop/users/getinfo/" + os.stoid + "/" + e.user_id, {
145 success: function(su) { 145 success: function(su) {
146 - var data = su.data.data;  
147 - if(!data) data={};  
148 - data.cashcount = parseInt(data.cashcount);  
149 - s.setData({  
150 - udata: data,  
151 - }); 146 + if(su.data.code==0 && su.data.data ) {
  147 + var data = su.data.data;
  148 + if(!data) data={};
  149 + data.cashcount = parseInt(data.cashcount);
  150 + s.setData({
  151 + udata: data,
  152 + });
  153 + }
  154 +
152 } 155 }
153 }) 156 })
154 /*-----获取会员提现金额-----*/ 157 /*-----获取会员提现金额-----*/
pages/user/index/index.wxml
@@ -213,19 +213,19 @@ @@ -213,19 +213,19 @@
213 </block> 213 </block>
214 <block wx:elif="{{item.name=='助力活动'}}"> 214 <block wx:elif="{{item.name=='助力活动'}}">
215 <view class="item t-c" data-url="/pages/user/assistance/assistance" bindtap="goto_nav" wx:if="{{is_assistance==1}}"> 215 <view class="item t-c" data-url="/pages/user/assistance/assistance" bindtap="goto_nav" wx:if="{{is_assistance==1}}">
216 - <image class="xc-center-img " src="{{iurl}}/miniapp/images/friendhelp/icon-zl.png"></image> 216 + <image class="xc-center-img" src="{{iurl}}/miniapp/images/friendhelp/icon-zl.png"></image>
217 <view class="four-level-word">助力活动</view> 217 <view class="four-level-word">助力活动</view>
218 </view> 218 </view>
219 </block> 219 </block>
220 <block wx:elif="{{item.name=='我的权益'}}"> 220 <block wx:elif="{{item.name=='我的权益'}}">
221 <view class="item t-c" bindtap="go_qy" wx:if="{{qy_list!=null && is_init && gradeId}}"> 221 <view class="item t-c" bindtap="go_qy" wx:if="{{qy_list!=null && is_init && gradeId}}">
222 - <image class="xc-center-img " src="{{iurl+item.icoimg}}"></image> 222 + <image class="xc-center-img" src="{{iurl+item.icoimg}}"></image>
223 <view class="fs26">我的权益</view> 223 <view class="fs26">我的权益</view>
224 </view> 224 </view>
225 </block> 225 </block>
226 <block wx:else> 226 <block wx:else>
227 <view class="item t-c" data-url="{{item.weappurl}}" bindtap="goto_nav"> 227 <view class="item t-c" data-url="{{item.weappurl}}" bindtap="goto_nav">
228 - <image class="xc-center-img " src="{{iurl+item.icoimg}}"></image> 228 + <image class="xc-center-img" src="{{iurl+item.icoimg}}"></image>
229 <view class="fs26">{{item.name}}</view> 229 <view class="fs26">{{item.name}}</view>
230 </view> 230 </view>
231 </block> 231 </block>
pages/user/integral/filter.wxs
@@ -2,8 +2,14 @@ var numFr = { @@ -2,8 +2,14 @@ var numFr = {
2 getNum: function(x) { 2 getNum: function(x) {
3 var f = parseInt(x); 3 var f = parseInt(x);
4 return f; 4 return f;
  5 + },
  6 + getval: function(x,n) {
  7 + var f = parseFloat(x);
  8 + f=f.toFixed(n);
  9 + return f;
5 } 10 }
6 } 11 }
7 module.exports = { 12 module.exports = {
8 - getNum: numFr.getNum 13 + getNum: numFr.getNum,
  14 + getval: numFr.getval,
9 } 15 }
10 \ No newline at end of file 16 \ No newline at end of file
pages/user/integral/integral.js
@@ -73,13 +73,15 @@ Page({ @@ -73,13 +73,15 @@ Page({
73 await getApp().request.promiseGet("/api/weshop/users/listPoints", { 73 await getApp().request.promiseGet("/api/weshop/users/listPoints", {
74 data: get_data 74 data: get_data
75 }).then(res => { 75 }).then(res => {
  76 +
76 var msg = res.data; 77 var msg = res.data;
77 - details = msg.data.pageData;  
78 - if (details.length == 0) { 78 + if(!msg || !msg.data.pageData || msg.data.pageData.length == 0){
79 this.data.is_no_more = 1; 79 this.data.is_no_more = 1;
80 getApp().showWarning("未找更多数据"); 80 getApp().showWarning("未找更多数据");
81 return false; 81 return false;
82 } 82 }
  83 +
  84 + details = msg.data.pageData;
83 details.forEach(function (val, ind) { 85 details.forEach(function (val, ind) {
84 big_arr.push(val); 86 big_arr.push(val);
85 }) 87 })
pages/user/integral/integral.wxml
@@ -55,7 +55,7 @@ @@ -55,7 +55,7 @@
55 <view class="money-rim"> 55 <view class="money-rim">
56 <view class="tosum"> 56 <view class="tosum">
57 <view class="rbm">¥</view> 57 <view class="rbm">¥</view>
58 - <text class='f_big'>{{filter.getNum(result.ToSum)}}</text> 58 + <text class='f_big'>{{filter.getval(result.ToSum,2)}}</text>
59 </view> 59 </view>
60 </view> 60 </view>
61 <view class='mb20'>充值{{result.Integral}}积分</view> 61 <view class='mb20'>充值{{result.Integral}}积分</view>
@@ -74,7 +74,7 @@ @@ -74,7 +74,7 @@
74 <view class="text">充值{{integral}}积分</view> 74 <view class="text">充值{{integral}}积分</view>
75 <view class="min-rim"> 75 <view class="min-rim">
76 <view class="fh">¥</view> 76 <view class="fh">¥</view>
77 - <view class="value">{{filter.getNum(money)}}</view> 77 + <view class="value">{{filter.getval(money,2)}}</view>
78 </view> 78 </view>
79 </view> 79 </view>
80 <view class="bk"> 80 <view class="bk">
pages/user/integral/query/index.js
@@ -168,19 +168,19 @@ Page({ @@ -168,19 +168,19 @@ Page({
168 }).then(res => { 168 }).then(res => {
169 169
170 var details = res.data; 170 var details = res.data;
171 - console.log(details, "iiii");  
172 - var details = details.data.pageData;  
173 - console.log(details, "aaa");  
174 171
175 - if (details.length == 0) { 172 +
  173 +
  174 +
  175 + if (!details.data || details.data.pageData.length == 0) {
176 // this.data.is_no_more = 1; 176 // this.data.is_no_more = 1;
177 - console.log("无极剑圣", details);  
178 -  
179 getApp().showWarning("未找更多数据"); 177 getApp().showWarning("未找更多数据");
180 return false; 178 return false;
181 } 179 }
182 - console.log("不空", details);  
183 - console.log("长度", details.length); 180 +
  181 + var details = details.data.pageData;
  182 +
  183 +
184 details.forEach(function (val, ind) { 184 details.forEach(function (val, ind) {
185 big_arr.push(val); 185 big_arr.push(val);
186 }) 186 })
pages/user/member/account/account.js
@@ -100,16 +100,15 @@ Page({ @@ -100,16 +100,15 @@ Page({
100 data: get_data, isShowLoading:1 100 data: get_data, isShowLoading:1
101 }).then(res => { 101 }).then(res => {
102 var details = res.data; 102 var details = res.data;
103 - // console.log(details, "iiii");  
104 - var details=details.data.pageData;  
105 - //console.log(details,"aaa");  
106 103
107 - if (details.length== 0){ 104 + if (!details || !details.data || !details.data.pageData || details.data.pageData.length== 0){
108 this.data.is_no_more=1; 105 this.data.is_no_more=1;
109 getApp().showWarning("未找更多数据"); 106 getApp().showWarning("未找更多数据");
110 107
111 return false; 108 return false;
112 } 109 }
  110 +
  111 + var details=details.data.pageData;
113 // console.log("不空", details); 112 // console.log("不空", details);
114 // console.log("长度", details.length); 113 // console.log("长度", details.length);
115 details.forEach(function(val,ind){ 114 details.forEach(function(val,ind){
pages/user/member/account_unable/account_unable.js
@@ -99,17 +99,16 @@ Page({ @@ -99,17 +99,16 @@ Page({
99 await getApp().request.promiseGet("/api/weshop/users/pageUnablereCord", { 99 await getApp().request.promiseGet("/api/weshop/users/pageUnablereCord", {
100 data: get_data, isShowLoading: 1 100 data: get_data, isShowLoading: 1
101 }).then(res => { 101 }).then(res => {
  102 +
102 var details = res.data; 103 var details = res.data;
103 - // console.log(details, "iiii");  
104 - var details = details.data.pageData;  
105 - //console.log(details,"aaa");  
106 104
107 - if (details.length == 0) { 105 + if ( !details || !details.data || !details.data.pageData || details.data.pageData.length == 0) {
108 this.data.is_no_more = 1; 106 this.data.is_no_more = 1;
109 getApp().showWarning("未找更多数据"); 107 getApp().showWarning("未找更多数据");
110 -  
111 return false; 108 return false;
112 } 109 }
  110 +
  111 + var details = details.data.pageData;
113 // console.log("不空", details); 112 // console.log("不空", details);
114 // console.log("长度", details.length); 113 // console.log("长度", details.length);
115 details.forEach(function (val, ind) { 114 details.forEach(function (val, ind) {
pages/user/member/cash_record/cash_record.js
@@ -110,17 +110,14 @@ Page({ @@ -110,17 +110,14 @@ Page({
110 data: get_data, isShowLoading: 1 110 data: get_data, isShowLoading: 1
111 }).then(res => { 111 }).then(res => {
112 var details = res.data; 112 var details = res.data;
113 - console.log(details, "iiii");  
114 - var details = details.data.pageData;  
115 - console.log(details, "aaa");  
116 113
117 - if (details.length == 0) { 114 + if (!details || !details.data || !details.data.pageData || details.data.pageData.length == 0) {
118 this.data.is_no_more = 1; 115 this.data.is_no_more = 1;
119 getApp().showWarning("未找更多数据"); 116 getApp().showWarning("未找更多数据");
120 return false; 117 return false;
121 } 118 }
122 - console.log("不空", details);  
123 - console.log("长度", details.length); 119 + var details = details.data.pageData;
  120 +
124 details.forEach(function (val, ind) { 121 details.forEach(function (val, ind) {
125 big_arr.push(val); 122 big_arr.push(val);
126 }) 123 })
pages/user/order_list/order_list.wxml
@@ -222,7 +222,7 @@ @@ -222,7 +222,7 @@
222 </view> 222 </view>
223 <view class="subitem"> 223 <view class="subitem">
224 <view class="key">单价</view> 224 <view class="key">单价</view>
225 - <view class="val">¥{{i.Price}}({{i.PosPrice}})</view> 225 + <view class="val">¥{{i.Price}}(<text style="text-decoration: line-through;">{{i.PosPrice}}</text>)</view>
226 </view> 226 </view>
227 <view class="subitem"> 227 <view class="subitem">
228 <view class="key">金额</view> 228 <view class="key">金额</view>
pages/user/return_goods_list/return_goods_list.js
@@ -15,7 +15,7 @@ Page({ @@ -15,7 +15,7 @@ Page({
15 }, 15 },
16 onLoad: function() { 16 onLoad: function() {
17 var th=this,ts=s; 17 var th=this,ts=s;
18 - //确保有登 18 + //确保有登
19 e.getUserInfo(function(){ 19 e.getUserInfo(function(){
20 ts.init(th, "", "list"), th.requestReturnGoods(); 20 ts.init(th, "", "list"), th.requestReturnGoods();
21 }) 21 })