Commit 52a8ebb6cc2e8edd7b3f6846e2b6938bf919f470

Authored by 后端研发-苏明海
2 parents f673acc3 9dcbc6f8

Merge branch 'test' into 'qa'

Test

See merge request !520
Showing 88 changed files with 4227 additions and 1738 deletions
app.wxss
@@ -293,7 +293,6 @@ justify-content:space-around; @@ -293,7 +293,6 @@ justify-content:space-around;
293 293
294 294
295 295
296 -  
297 /* 7.26 */ 296 /* 7.26 */
298 .white{ 297 .white{
299 color: #fff; 298 color: #fff;
@@ -413,4 +412,5 @@ background: #ffe3e2; @@ -413,4 +412,5 @@ background: #ffe3e2;
413 412
414 .lh1 { 413 .lh1 {
415 line-height: 1; 414 line-height: 1;
416 -}  
417 \ No newline at end of file 415 \ No newline at end of file
  416 +}
  417 +
components/diy_searchbox/diy_searchbox.js
@@ -5,7 +5,6 @@ var t = getApp(), @@ -5,7 +5,6 @@ var t = getApp(),
5 Component({ 5 Component({
6 properties: { 6 properties: {
7 // 这里定义了innerText属性,属性值可以在组件使用时指定 7 // 这里定义了innerText属性,属性值可以在组件使用时指定
8 -  
9 object: { 8 object: {
10 type: Object, 9 type: Object,
11 value: null, 10 value: null,
@@ -15,19 +14,49 @@ Component({ @@ -15,19 +14,49 @@ Component({
15 // 这里是一些组件内部数据 14 // 这里是一些组件内部数据
16 yc:false, 15 yc:false,
17 imghost: o.imghost, 16 imghost: o.imghost,
18 - someData: {} 17 + someData: {},
  18 + first:1,
  19 + inputShowed:1,
  20 + inputval:'在店铺内搜索',
  21 + keyword:'',
19 }, 22 },
20 ready: function() { 23 ready: function() {
21 - console.log("ready"); 24 + var th=this;
  25 + getApp().getConfig2(function(e) {
  26 + //看有没有热搜
  27 + if(e.hot_keywords)
  28 + th.setData({keyword:e.hot_keywords});
  29 + })
22 }, 30 },
23 methods: { 31 methods: {
24 //智能跳转 32 //智能跳转
25 go_url:function (e) { 33 go_url:function (e) {
26 var url=e.currentTarget.dataset.url; 34 var url=e.currentTarget.dataset.url;
27 getApp().goto(url); 35 getApp().goto(url);
28 - }  
29 -  
30 -  
31 - 36 + },
  37 + click_sear:function(){
  38 + //如果搜索的单词为空的时候,就要跳到搜索页
  39 + if(this.data.keyword!=''){
  40 + getApp().goto("/pages/goods/search/search");
  41 + return false;
  42 + }
  43 + this.setData({first:0,inputShowed:1,inputval:''});
  44 + },
  45 +
  46 + onblur:function(){
  47 + var val=this.data.inputval;
  48 + if(val==''){
  49 + this.setData({first:1,});
  50 + }
  51 + },
  52 + set_input:function(e){
  53 + var val=e.detail.value;
  54 + this.setData({inputval:val});
  55 + },
  56 + sear:function(){
  57 + var url="/pages/goods/search/search?s_key="+this.data.inputval;
  58 + getApp().goto(url);
  59 + }
  60 +
32 } 61 }
33 }) 62 })
34 \ No newline at end of file 63 \ No newline at end of file
components/diy_searchbox/diy_searchbox.wxml
@@ -2,12 +2,22 @@ @@ -2,12 +2,22 @@
2 <block wx:if="{{object.style==1}}"> 2 <block wx:if="{{object.style==1}}">
3 <view class="{{object.is_top==1?'abs_top':''}}"> 3 <view class="{{object.is_top==1?'abs_top':''}}">
4 <view class='ss' > 4 <view class='ss' >
5 - <view bindtap='go_url' data-url="/pages/goods/search/search" class="s1_gk_a1">  
6 - <view class='s_ge'>  
7 - <image src='{{imghost}}/miniapp/images/search.png'></image>  
8 - <text>在店铺内搜索</text> 5 + <view bindtap='click_sear' class="s1_gk_a1" wx:if="{{first}}">
  6 + <view class='s_ge'>
  7 + <image src='{{imghost}}/miniapp/images/search.png'></image>
  8 + <text>在店铺内搜索</text>
  9 + </view>
9 </view> 10 </view>
  11 + <!-- 响应搜索事件 -->
  12 + <view class="s1_gk_a1" wx:else>
  13 + <view class='s_ge flex'>
  14 + <image class="find_img" src='{{imghost}}/miniapp/images/search.png' bindtap='sear'></image>
  15 + <input id="find_inp" class="find_inp" value=""
  16 + bindconfirm="sear" bindinput='set_input' focus="{{inputShowed}}" bindblur="onblur" />
  17 + </view>
10 </view> 18 </view>
  19 +
  20 +
11 </view> 21 </view>
12 </view> 22 </view>
13 <view wx:if="{{object.is_top==1}}" style="height: 120rpx;"></view> 23 <view wx:if="{{object.is_top==1}}" style="height: 120rpx;"></view>
@@ -24,10 +34,15 @@ @@ -24,10 +34,15 @@
24 </view> 34 </view>
25 35
26 <view class='s2_cen' style='background-color:{{object.inner_bgcolor}}'> 36 <view class='s2_cen' style='background-color:{{object.inner_bgcolor}}'>
27 - <navigator url="/pages/goods/search/search" class="s1_gk_a2">  
28 - <image src='/public/static/images/model/select.png'></image>  
29 - <text style='color:{{object.word_color?object.word_color:"#fff"}}'>在店铺内搜索</text> 37 + <navigator wx:if="{{first}}" bindtap='click_sear' class="s1_gk_a2 flex" style="height: 100%;">
  38 + <image src='/public/static/images/model/select.png'></image>
  39 + <text style='color:{{object.word_color?object.word_color:"#fff"}}'>在店铺内搜索</text>
30 </navigator> 40 </navigator>
  41 + <navigator wx:else class="s1_gk_a2 flex" style="height: 100%;">
  42 + <image src='/public/static/images/model/select.png' bindtap='sear'></image>
  43 + <input id="find_inp" class="find_inp2" value=""
  44 + bindconfirm="sear" bindinput='set_input' focus="{{inputShowed}}" bindblur="onblur" />
  45 + </navigator>
31 </view> 46 </view>
32 47
33 <view class='s2_right'> 48 <view class='s2_right'>
components/diy_searchbox/diy_searchbox.wxss
@@ -60,9 +60,6 @@ @@ -60,9 +60,6 @@
60 height: 30rpx; 60 height: 30rpx;
61 margin-left: 10rpx; 61 margin-left: 10rpx;
62 margin-right: 4rpx; 62 margin-right: 4rpx;
63 - margin-bottom:-6rpx;  
64 -margin-top:20rpx;  
65 -  
66 } 63 }
67 64
68 .s1_gk_a1{ 65 .s1_gk_a1{
@@ -83,4 +80,9 @@ margin-top:20rpx; @@ -83,4 +80,9 @@ margin-top:20rpx;
83 80
84 .abs_top2{ 81 .abs_top2{
85 position: fixed; z-index: 10; 82 position: fixed; z-index: 10;
86 -}  
87 \ No newline at end of file 83 \ No newline at end of file
  84 +}
  85 +
  86 +.flex{ display: flex; align-items: center;}
  87 +.find_img{margin: 0 20rpx; }
  88 +.find_inp{text-align: left; width: 620rpx;}
  89 +.find_inp2{text-align: left; width: 520rpx;}
88 \ No newline at end of file 90 \ No newline at end of file
components/goods_list/g_filter.wxs
@@ -59,7 +59,7 @@ var g_filters = { @@ -59,7 +59,7 @@ var g_filters = {
59 } 59 }
60 60
61 if(type==0) return min_price; 61 if(type==0) return min_price;
62 - if(min_name.length>4 ) min_name=min_name.substring(0, 4); 62 + if(min_name.length>4 ) min_name=min_name.substring(0, 8);
63 return min_name; 63 return min_name;
64 }, 64 },
65 } 65 }
components/goods_list/goods_list.js
@@ -62,7 +62,7 @@ Component({ @@ -62,7 +62,7 @@ Component({
62 //--- 判断是等级会员,且在有效期范围内 --- 62 //--- 判断是等级会员,且在有效期范围内 ---
63 if (user.card_field && now < end) { 63 if (user.card_field && now < end) {
64 var card_name = ob.name_map.get(user.card_field); 64 var card_name = ob.name_map.get(user.card_field);
65 - if (card_name.length > 4) card_name = card_name.substring(0, 4); 65 + if (card_name.length > 4) card_name = card_name.substring(0, 8);
66 th.setData({ 66 th.setData({
67 card_field: user.card_field, 67 card_field: user.card_field,
68 card_name: card_name, 68 card_name: card_name,
@@ -166,7 +166,6 @@ Component({ @@ -166,7 +166,6 @@ Component({
166 card_name_map.set(name, plusCard[i].CardName); 166 card_name_map.set(name, plusCard[i].CardName);
167 new_arr.push(plusCard[i]); 167 new_arr.push(plusCard[i]);
168 168
169 -  
170 } 169 }
171 } 170 }
172 var ob = { 171 var ob = {
custom-tab-bar/index.wxml
1 <!-- 如果是自定义的话 --> 1 <!-- 如果是自定义的话 -->
2 -<view class="main_bar" style=" background: {{backgroundColor}}; font-size: 30rpx;"> 2 +<view class="main_bar" style=" background: {{backgroundColor}}; font-size: 23rpx;">
3 <block wx:for="{{list}}" wx:for-index="idx"> 3 <block wx:for="{{list}}" wx:for-index="idx">
4 <view data-url="{{item.weappurl}}" bindtap="nav_goto" class="tabbar_item" data-act="{{active==idx?1:0}}" 4 <view data-url="{{item.weappurl}}" bindtap="nav_goto" class="tabbar_item" data-act="{{active==idx?1:0}}"
5 style="width:{{100 / list.length}}%;color: {{active==idx?fontcolor_sele:fontcolor}};"> 5 style="width:{{100 / list.length}}%;color: {{active==idx?fontcolor_sele:fontcolor}};">
6 <view wx:if="{{item.nav_name=='购物车'}}" class="cart_num" >{{cartGoodsNum}} </view> 6 <view wx:if="{{item.nav_name=='购物车'}}" class="cart_num" >{{cartGoodsNum}} </view>
7 - <view class="tab_img" style="margin-top: 10rpx;"> 7 + <view class="tab_img" style="margin-top: 6rpx;">
8 <view class="nav_imgage" style="background-image: url({{active==idx?item.src_sele:item.src}});"></view> 8 <view class="nav_imgage" style="background-image: url({{active==idx?item.src_sele:item.src}});"></view>
9 </view> 9 </view>
10 - <view style="height:20px;line-height:15px; margin-top: 10rpx;"> 10 + <view style="height:20px;line-height:15px; margin-top: 2rpx;">
11 {{item.nav_name}} 11 {{item.nav_name}}
12 </view> 12 </view>
13 </view> 13 </view>
custom-tab-bar/index.wxss
@@ -2,11 +2,11 @@ @@ -2,11 +2,11 @@
2 width:100%; border-top: 1rpx solid #ebebeb; position: fixed; bottom: 0; left: 0; z-index: 10000; 2 width:100%; border-top: 1rpx solid #ebebeb; position: fixed; bottom: 0; left: 0; z-index: 10000;
3 } 3 }
4 .tabbar_item{ 4 .tabbar_item{
5 - position:relative;height:100%;float:left;text-align:center;padding:5px 0; 5 + position:relative;height:100%;float:left;text-align:center;padding:0px 0;
6 } 6 }
7 .tab_img{display: flex; justify-content: center;align-items: center} 7 .tab_img{display: flex; justify-content: center;align-items: center}
8 .nav_imgage{ 8 .nav_imgage{
9 - height: 56rpx; width: 56rpx;background-position: center;background-repeat: no-repeat;background-size: auto 85%; 9 + height: 58rpx; width: 58rpx;background-position: center;background-repeat: no-repeat;background-size: auto 92%;
10 } 10 }
11 .cart_num{ 11 .cart_num{
12 top:0;background-color: red;color: #fff;font-size: 20rpx;border-radius: 50%;width: 40rpx;line-height:40rpx;height: 40rpx;position: absolute;z-index: 100;right:30rpx; 12 top:0;background-color: red;color: #fff;font-size: 20rpx;border-radius: 50%;width: 40rpx;line-height:40rpx;height: 40rpx;position: absolute;z-index: 100;right:30rpx;
images/share/hui_hear_pic.png

27.6 KB | W: | H:

5.13 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
images/share/mackground.png

10.4 KB | W: | H:

3.96 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
images/share/s_gou.png

23.8 KB | W: | H:

3.87 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
packageA/images/gt.png 0 → 100644

1.72 KB

packageA/pages/liveStream/liveStream.js
@@ -57,7 +57,7 @@ Page({ @@ -57,7 +57,7 @@ Page({
57 let self = this; 57 let self = this;
58 getApp().request.put("/api/weshop/wx/livelist/updatelivelist", { 58 getApp().request.put("/api/weshop/wx/livelist/updatelivelist", {
59 data: { 59 data: {
60 - storeId: 1 60 + storeId: o.stoid
61 }, 61 },
62 success: function (res) { 62 success: function (res) {
63 console.log('我发起了PUT请求,请求结果:', res.data); 63 console.log('我发起了PUT请求,请求结果:', res.data);
packageA/pages/prom_list/prom_list.js
@@ -770,7 +770,9 @@ Page({ @@ -770,7 +770,9 @@ Page({
770 data: { 770 data: {
771 store_id: o.stoid, 771 store_id: o.stoid,
772 is_show: 1, 772 is_show: 1,
773 - pageSize: 1000 773 + pageSize: 1000,
  774 + orderField:"sort",
  775 + orderType:'asc',
774 }, 776 },
775 success: function(ee) { 777 success: function(ee) {
776 if (ee.data.code == 0) { 778 if (ee.data.code == 0) {
@@ -795,12 +797,12 @@ Page({ @@ -795,12 +797,12 @@ Page({
795 //----要进行门店分组-------- 797 //----要进行门店分组--------
796 for (var i = 0; i < sto_arr.length; i++) { 798 for (var i = 0; i < sto_arr.length; i++) {
797 //找一下这个门店有没有在分类数组内 799 //找一下这个门店有没有在分类数组内
798 - var find2 = 0,  
799 - find2name = ""; 800 + var find2 = 0, find2name = "",sort=0;
800 for (var m = 0; m < sto_cate.length; m++) { 801 for (var m = 0; m < sto_cate.length; m++) {
801 if (sto_arr[i].category_id == sto_cate[m].cat_id) { 802 if (sto_arr[i].category_id == sto_cate[m].cat_id) {
802 find2 = sto_cate[m].cat_id; 803 find2 = sto_cate[m].cat_id;
803 find2name = sto_cate[m].cat_name; 804 find2name = sto_cate[m].cat_name;
  805 + sort=sto_cate[m].sort;
804 break; 806 break;
805 } 807 }
806 } 808 }
@@ -822,6 +824,7 @@ Page({ @@ -822,6 +824,7 @@ Page({
822 var item = { 824 var item = {
823 cat_id: find2, 825 cat_id: find2,
824 name: find2name, 826 name: find2name,
  827 + sort:sort,
825 s_arr: arr0 828 s_arr: arr0
826 }; 829 };
827 newarr.push(item); 830 newarr.push(item);
@@ -837,6 +840,7 @@ Page({ @@ -837,6 +840,7 @@ Page({
837 var item = { 840 var item = {
838 cat_id: find2, 841 cat_id: find2,
839 name: find2name, 842 name: find2name,
  843 + sort:sort,
840 s_arr: arr0 844 s_arr: arr0
841 }; 845 };
842 newarr.push(item); 846 newarr.push(item);
@@ -845,6 +849,18 @@ Page({ @@ -845,6 +849,18 @@ Page({
845 } 849 }
846 } 850 }
847 } 851 }
  852 +
  853 + //门店分类要排序下
  854 + function compare(property){
  855 + return function(a,b){
  856 + var value1 = a[property];
  857 + var value2 = b[property];
  858 + return value1 - value2;
  859 + }
  860 + }
  861 + if(newarr.length>0)
  862 + newarr.sort(compare("sort"));
  863 +
848 864
849 //----安排其他的分类----- 865 //----安排其他的分类-----
850 if (qita.length > 0) { 866 if (qita.length > 0) {
@@ -1135,7 +1151,7 @@ Page({ @@ -1135,7 +1151,7 @@ Page({
1135 1151
1136 if (bconfig.is_sort_storage) { 1152 if (bconfig.is_sort_storage) {
1137 wx.getLocation({ 1153 wx.getLocation({
1138 - type: 'wgs84', 1154 + type: 'gcj02',
1139 success: function(res) { 1155 success: function(res) {
1140 1156
1141 th.data.lat = res.latitude; 1157 th.data.lat = res.latitude;
@@ -1464,7 +1480,7 @@ Page({ @@ -1464,7 +1480,7 @@ Page({
1464 var e = th.data.bconfig; 1480 var e = th.data.bconfig;
1465 if (e.is_sort_storage) { 1481 if (e.is_sort_storage) {
1466 wx.getLocation({ 1482 wx.getLocation({
1467 - type: 'wgs84', 1483 + type: 'gcj02',
1468 success: function(res) { 1484 success: function(res) {
1469 th.data.lat = res.latitude; 1485 th.data.lat = res.latitude;
1470 th.data.lon = res.longitude; 1486 th.data.lon = res.longitude;
pages/cart/cart/cart.js
@@ -159,6 +159,15 @@ Page({ @@ -159,6 +159,15 @@ Page({
159 await getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + item.goods_id, {}).then(res => { 159 await getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + item.goods_id, {}).then(res => {
160 good = res.data.data; 160 good = res.data.data;
161 }) 161 })
  162 + if(!good){
  163 + var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
  164 + getApp().request.delete(url, {
  165 + success: function (t) {
  166 + }
  167 + });
  168 + continue;
  169 + }
  170 +
162 var tt = ut.gettimestamp(); 171 var tt = ut.gettimestamp();
163 //如果商品下架了,或者商品是赠品,一开始都要清除 172 //如果商品下架了,或者商品是赠品,一开始都要清除
164 if ((good.down_time > 0 && good.down_time < tt) || good.is_on_sale == 0 || item.is_gift) { 173 if ((good.down_time > 0 && good.down_time < tt) || good.is_on_sale == 0 || item.is_gift) {
@@ -821,13 +830,21 @@ Page({ @@ -821,13 +830,21 @@ Page({
821 var g_arr = new Array(); //已选的商品列表 830 var g_arr = new Array(); //已选的商品列表
822 var user_id = getApp().globalData.user_id; 831 var user_id = getApp().globalData.user_id;
823 var th = this; 832 var th = this;
824 - 833 + //用于判断是不是积分购的普通购买
  834 + var normal_arr={};
825 var ab = 0; //选中 835 var ab = 0; //选中
826 wx.showLoading(); 836 wx.showLoading();
827 for (var i = 0; i < this.data.requestData.length; i++) { 837 for (var i = 0; i < this.data.requestData.length; i++) {
828 var i_arr = this.data.requestData[i].goods; 838 var i_arr = this.data.requestData[i].goods;
  839 +
  840 +
829 for (var j = 0; j < i_arr.length; j++) { 841 for (var j = 0; j < i_arr.length; j++) {
830 if (i_arr[j].selected && i_arr[j].is_gift!=1) { 842 if (i_arr[j].selected && i_arr[j].is_gift!=1) {
  843 +
  844 + if(i_arr[j].is_pd_normal) {
  845 + normal_arr[i_arr[j].goods_id]=1;
  846 + }
  847 +
831 //map 的key是不会重复,会覆盖,, 848 //map 的key是不会重复,会覆盖,,
832 var ie = { 849 var ie = {
833 goods_id: i_arr[j].goods_id, 850 goods_id: i_arr[j].goods_id,
@@ -972,13 +989,13 @@ Page({ @@ -972,13 +989,13 @@ Page({
972 } 989 }
973 } 990 }
974 991
975 - if (num > val.redisnum && val.redisnum) { 992 + if (num > val.redisnum && val.redisnum && !normal_arr[val.goods_id]) {
976 isok = 0; 993 isok = 0;
977 gname = val.goods_name; 994 gname = val.goods_name;
978 throw "超出活动库存"; 995 throw "超出活动库存";
979 return false; 996 return false;
980 } 997 }
981 - if (num > val.goods_num - val.buy_num && val.goods_num) { 998 + if (num > val.goods_num - val.buy_num && val.goods_num && !normal_arr[val.goods_id]) {
982 isok = 0; 999 isok = 0;
983 gname = val.goods_name; 1000 gname = val.goods_name;
984 throw "超出活动库存"; 1001 throw "超出活动库存";
@@ -993,7 +1010,7 @@ Page({ @@ -993,7 +1010,7 @@ Page({
993 return false; 1010 return false;
994 } 1011 }
995 1012
996 - if (num + buyed.promgoodsbuynum > val.buy_limit && val.buy_limit > 0) { 1013 + if (num + buyed.promgoodsbuynum > val.buy_limit && val.buy_limit > 0 && !normal_arr[val.goods_id]) {
997 isok = 0; 1014 isok = 0;
998 gname = val.goods_name; 1015 gname = val.goods_name;
999 throw "超出活动限购"; 1016 throw "超出活动限购";
@@ -1006,7 +1023,7 @@ Page({ @@ -1006,7 +1023,7 @@ Page({
1006 if (g_arr[i].goods_id == val.goods_id) { 1023 if (g_arr[i].goods_id == val.goods_id) {
1007 1024
1008 //如果会员是等级会员,商品有等级价,且不是活动商品 1025 //如果会员是等级会员,商品有等级价,且不是活动商品
1009 - if(card_field && val[card_field]>0 && (val.prom_type==0 || val.prom_type==3 || val.prom_type==4 || val.prom_type==5) ){ 1026 + if(card_field && val[card_field]>0 && (val.prom_type==0 || val.prom_type==3 || val.prom_type==4 || val.prom_type==5 || normal_arr[val.goods_id]) ){
1010 if (g_arr[i].goods_price != val[card_field]){ 1027 if (g_arr[i].goods_price != val[card_field]){
1011 isok = 0; 1028 isok = 0;
1012 gname = val.goods_name; 1029 gname = val.goods_name;
pages/cart/cart/cart.wxml
@@ -107,7 +107,7 @@ @@ -107,7 +107,7 @@
107 </view> 107 </view>
108 </block> 108 </block>
109 </view> 109 </view>
110 - <view class="pay-for flex-vertical-between" style="bottom:{{tabBar.isIpx ? '172rpx' : '100rpx'}}"> 110 + <view class="pay-for flex-vertical-between">
111 <view class="allradio flex-vertical-between"> 111 <view class="allradio flex-vertical-between">
112 <view class="flex-vertical mlr" bindtap="checkAll"> 112 <view class="flex-vertical mlr" bindtap="checkAll">
113 <!--<radio class="order-raido" color="red" checked="{{checkAllToggle}}"></radio>--> 113 <!--<radio class="order-raido" color="red" checked="{{checkAllToggle}}"></radio>-->
pages/cart/cart/cart.wxss
@@ -138,12 +138,11 @@ radio { @@ -138,12 +138,11 @@ radio {
138 } 138 }
139 139
140 .pay-for { 140 .pay-for {
141 -  
142 width: 100%; 141 width: 100%;
143 - height: 100rpx; 142 + height: 110rpx;
144 position: fixed; 143 position: fixed;
145 left: 0; 144 left: 0;
146 - bottom: 90rpx; 145 + bottom: 110rpx;
147 font-size: 28rpx; 146 font-size: 28rpx;
148 color: #666; 147 color: #666;
149 background-color: rgb(255, 255, 255); 148 background-color: rgb(255, 255, 255);
pages/cart/cart2/cart2.js
@@ -46,7 +46,9 @@ Page({ @@ -46,7 +46,9 @@ Page({
46 bn_exp_type:1, //0是物流 1自提 46 bn_exp_type:1, //0是物流 1自提
47 bn_pick:0, //选择的门店 47 bn_pick:0, //选择的门店
48 bn_pickname: "", //选择的门店名称 48 bn_pickname: "", //选择的门店名称
49 - bn_t_exp_t:0, //判断商品和门店一起决定的物流自提的方式0 都可以 1自提 2物流 49 + bn_t_exp_t:0, //判断商品和门店一起决定的物流自提的方式0 都可以 1自提 2物流
  50 +
  51 + bn_plus_cut_price:0, //显示等级卡会优惠多少钱
50 /*------------------------*/ 52 /*------------------------*/
51 user_addr:null,//物流 53 user_addr:null,//物流
52 userinfo:null, //获取会员 54 userinfo:null, //获取会员
@@ -105,7 +107,11 @@ Page({ @@ -105,7 +107,11 @@ Page({
105 //-- order_prom_list -- 107 //-- order_prom_list --
106 order_prom_list_cart:null, 108 order_prom_list_cart:null,
107 109
108 - ispt_goods:0, //是否平摊至单品,0要平摊 1不平摊 110 + ispt_goods:0, //是否平摊至单品,0要平摊 1不平摊
  111 + rank_switch:0, //是不是开同等级卡
  112 + show_card:null, //显示的等级卡
  113 + card_name:'', //显示的卡的名称
  114 + card_cut_price:null,//减价多少钱
109 115
110 }, 116 },
111 onLoad: function(t) { 117 onLoad: function(t) {
@@ -113,7 +119,7 @@ Page({ @@ -113,7 +119,7 @@ Page({
113 wx.setNavigationBarTitle({ title: "填写订单",}) 119 wx.setNavigationBarTitle({ title: "填写订单",})
114 var th = this; this.setData({ is_b_now: t.is_bnow == undefined ? 0 : t.is_bnow,}); 120 var th = this; this.setData({ is_b_now: t.is_bnow == undefined ? 0 : t.is_bnow,});
115 th.data.param=t; 121 th.data.param=t;
116 - 122 +
117 //清空is_pick_up 123 //清空is_pick_up
118 getApp().request.put("/api/weshop/useraddress/updatePickUp", { 124 getApp().request.put("/api/weshop/useraddress/updatePickUp", {
119 data: {user_id: getApp().globalData.user_id, is_pickup: 0}, 125 data: {user_id: getApp().globalData.user_id, is_pickup: 0},
@@ -121,15 +127,7 @@ Page({ @@ -121,15 +127,7 @@ Page({
121 } 127 }
122 }); 128 });
123 129
124 - //先获取是否有关闭使用优惠券  
125 - getApp().getConfig2(function (ee) {  
126 - var json_d = JSON.parse(ee.switch_list);  
127 - th.data.ispt_goods=json_d.ispt_goods; //是不是平摊到单品的控制参数赋值  
128 - th.setData({ is_close_quan: json_d.is_close_quan,sales_rules:ee.sales_rules});  
129 - //-----先获取物流,再获取用户信息,再展示页面-----  
130 - th.get_wuliu(th.get_info(th.show_page));  
131 - })  
132 - 130 +
133 }, 131 },
134 onUnload: function () { this.setData({ isclose: 1 })}, 132 onUnload: function () { this.setData({ isclose: 1 })},
135 onHide: function () { 133 onHide: function () {
@@ -155,7 +153,6 @@ Page({ @@ -155,7 +153,6 @@ Page({
155 console.log("getuser_addr") 153 console.log("getuser_addr")
156 console.log(ie) 154 console.log(ie)
157 155
158 -  
159 //地址切换要把包邮券清空 156 //地址切换要把包邮券清空
160 if( !th.data.user_addr || th.data.user_addr.address_id!=ie.address_id){ 157 if( !th.data.user_addr || th.data.user_addr.address_id!=ie.address_id){
161 var using_quan=th.data.using_quan; 158 var using_quan=th.data.using_quan;
@@ -209,6 +206,57 @@ Page({ @@ -209,6 +206,57 @@ Page({
209 getApp().globalData.is_cart2_old=0; 206 getApp().globalData.is_cart2_old=0;
210 } 207 }
211 } 208 }
  209 +
  210 + //先获取是否有关闭使用优惠券
  211 + getApp().getConfig2(function (ee) {
  212 + var json_d = JSON.parse(ee.switch_list);
  213 + th.data.ispt_goods=json_d.ispt_goods; //是不是平摊到单品的控制参数赋值
  214 + th.setData({ is_close_quan: json_d.is_close_quan,sales_rules:ee.sales_rules,rank_switch:json_d.rank_switch});
  215 +
  216 + var rank_switch=json_d.rank_switch;
  217 + var max_price=-1;
  218 + var show_card=null;
  219 + var name="";
  220 + //如果有开等级卡的时候,
  221 + //因为都是调接口,要返回在计算
  222 + if(rank_switch==2){
  223 + //-- 获取所有的等级卡, --
  224 + getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?storeId=" + os.stoid,
  225 + {}).then(res => {
  226 + if(res.data.code==0){
  227 + var plusCard = res.data.data;
  228 + //-- 循环判断,拿到最贵的那张卡 --
  229 + for(var ih in plusCard){
  230 + if(plusCard[ih].IsStopBuy == true){ continue; }
  231 + if(max_price<0){
  232 + max_price=plusCard[ih].CardFee;
  233 + name='card'+plusCard[ih]['CorrPrice'];
  234 + show_card=plusCard[ih];
  235 + }else{
  236 + if(max_price<plusCard[ih].CardFee){
  237 + max_price=plusCard[ih].CardFee;
  238 + name='card'+plusCard[ih]['CorrPrice'];
  239 + show_card=plusCard[ih];
  240 + }
  241 + }
  242 + }
  243 +
  244 + if(show_card){
  245 + name=name.toLowerCase();
  246 + th.setData({card_name:name,show_card:show_card})
  247 + }
  248 + }
  249 + //-----先获取物流,再获取用户信息,再展示页面-----
  250 + th.get_wuliu(th.get_info(th.show_page));
  251 + })
  252 + }else{
  253 + //-----先获取物流,再获取用户信息,再展示页面-----
  254 + th.get_wuliu(th.get_info(th.show_page));
  255 + }
  256 +
  257 + })
  258 +
  259 +
212 }, 260 },
213 261
214 //-------------------获取物流--------------- 262 //-------------------获取物流---------------
@@ -304,6 +352,9 @@ Page({ @@ -304,6 +352,9 @@ Page({
304 var arr = new Array(); 352 var arr = new Array();
305 var carr = su.data.data.pageData; 353 var carr = su.data.data.pageData;
306 th.data.cartlist_y = carr; //存储原始购物车列表 354 th.data.cartlist_y = carr; //存储原始购物车列表
  355 +
  356 + //---是不是购买等级卡成功的返回---等级卡显示的判断---
  357 + var is_card_back=getApp().globalData.is_card_back;
307 358
308 for (var i = 0; i < carr.length; i++) { 359 for (var i = 0; i < carr.length; i++) {
309 var item = carr[i]; 360 var item = carr[i];
@@ -311,6 +362,25 @@ Page({ @@ -311,6 +362,25 @@ Page({
311 if(item.prom_type==3 && item.is_gift!=1){ 362 if(item.prom_type==3 && item.is_gift!=1){
312 await th.add_prom_goods_map(item); 363 await th.add_prom_goods_map(item);
313 } 364 }
  365 +
  366 + //-- 如果是等级会员注册返回 --
  367 + if(is_card_back){
  368 + // 拼团,搭配购不计算,赠品也不计算
  369 + if( item['prom_type']!=5 && item['prom_type']!=6 && !item.is_gift && !item['is_collocation'] && item.goods_price>item[th.data.card_name] ){
  370 + item.goods_price=item[th.data.card_name];
  371 + carr[i].goods_price=item[th.data.card_name];
  372 + }
  373 + }else{
  374 + // 拼团,搭配购不计算,赠品也不计算,同时会员还未购买等级会员
  375 + if(item[th.data.card_name]>0 && item['prom_type']!=5 && item['prom_type']!=6 && !th.data.userinfo.card_field
  376 + && !item.is_gift && !item['is_collocation'] && item.goods_price>item[th.data.card_name] ){
  377 + item.cut_price= item.goods_price-item[th.data.card_name];
  378 + carr[i].cut_price=(item.goods_price-item[th.data.card_name])*item.goods_num;
  379 + }
  380 +
  381 + }
  382 +
  383 +
314 item.original_img = oo.imghost + item.original_img; 384 item.original_img = oo.imghost + item.original_img;
315 /*----接口要弄出来的,先顶着-----*/ 385 /*----接口要弄出来的,先顶着-----*/
316 var pcid = item.pick_id; 386 var pcid = item.pick_id;
@@ -320,7 +390,9 @@ Page({ @@ -320,7 +390,9 @@ Page({
320 if (arr.length > 0) { 390 if (arr.length > 0) {
321 for (var j = 0; j < arr.length; j++) { 391 for (var j = 0; j < arr.length; j++) {
322 if (arr[j].pickup_id == pcid) { 392 if (arr[j].pickup_id == pcid) {
323 - arr[j].goods.push(item); 393 + arr[j].goods.push(item);
  394 + //-- 把等级卡会优惠多少钱装进去 --
  395 + if(item.cut_price) arr[j].card_cut_price+=item.cut_price;
324 find = 1;break; 396 find = 1;break;
325 } 397 }
326 } 398 }
@@ -348,6 +420,7 @@ Page({ @@ -348,6 +420,7 @@ Page({
348 420
349 //如果是物流的话,全部自提的控制要弄成0 421 //如果是物流的话,全部自提的控制要弄成0
350 if (e_t == 0) th.setData({ is_all_zt:0}); 422 if (e_t == 0) th.setData({ is_all_zt:0});
  423 +
351 var narr = new Array(); narr.push(item); 424 var narr = new Array(); narr.push(item);
352 425
353 //-----------拼装购物车结算的数组,如果有默认物流时要用默认物流编号----------------- 426 //-----------拼装购物车结算的数组,如果有默认物流时要用默认物流编号-----------------
@@ -359,9 +432,13 @@ Page({ @@ -359,9 +432,13 @@ Page({
359 } 432 }
360 433
361 var ie = { 434 var ie = {
362 - pickup_id: pcid, pname: pikname, goods: narr, exp_type: e_t, wind: m_wind, distr_t: dis_t, 435 + pickup_id: pcid, pname: pikname, goods: narr, exp_type: e_t, wind: m_wind, distr_t: dis_t,card_cut_price:0,
363 goods_price: 0, shipping_price: 0, user_money: 0, total_amount: 0, order_amount: 0, user_note:0}; 436 goods_price: 0, shipping_price: 0, user_money: 0, total_amount: 0, order_amount: 0, user_note:0};
  437 +
  438 + //-- 把等级卡会优惠多少钱装进去 --
  439 + if(item.cut_price) ie.card_cut_price+=item.cut_price;
364 arr.push(ie); 440 arr.push(ie);
  441 +
365 } 442 }
366 } 443 }
367 //深拷贝 444 //深拷贝
@@ -414,6 +491,22 @@ Page({ @@ -414,6 +491,22 @@ Page({
414 var item=th.data.wu_arr[k]; if(def_exp_code==item.code){ m_wind=k; } 491 var item=th.data.wu_arr[k]; if(def_exp_code==item.code){ m_wind=k; }
415 } 492 }
416 } 493 }
  494 +
  495 + //---是不是购买等级卡成功的返回---等级卡显示的判断---
  496 + var is_card_back=getApp().globalData.is_card_back;
  497 + if(is_card_back){
  498 + gg.goods_price=gd[th.data.card_name];
  499 + getApp().globalData.is_card_back=0;
  500 + th.setData({card_cut_price:0});
  501 + }else{
  502 + //--- 商家等级卡开通的情况下, 会员不是等级会员的情况, 商品有设置等级卡价格,同时等级卡价格小于商品的价格
  503 + //-- 搭配购的商品也可以单独购买,所以此时搭配购的商品要进行计算优惠 --
  504 + if(!gg.collocation_goods && gd['prom_type']!=6 && th.data.card_name && gd[th.data.card_name]>0 && gg.goods_price>gd[th.data.card_name] && !th.data.userinfo.card_field){
  505 + var cut_p= (gg.goods_price-gd[th.data.card_name])*gg.goods_num;
  506 + th.setData({card_cut_price:cut_p});
  507 + }
  508 + }
  509 +
417 switch (gd.prom_type){ 510 switch (gd.prom_type){
418 case 0: 511 case 0:
419 case 2: 512 case 2:
@@ -432,7 +525,7 @@ Page({ @@ -432,7 +525,7 @@ Page({
432 525
433 t.data.data.prom_id = 0; 526 t.data.data.prom_id = 0;
434 t.data.data.prom_type = 0; 527 t.data.data.prom_type = 0;
435 - 528 +
436 //如果立即购买那边过来,就要读取接口,查看活动的优惠内容 529 //如果立即购买那边过来,就要读取接口,查看活动的优惠内容
437 if(gg.prom_type==3){ 530 if(gg.prom_type==3){
438 t.data.data.prom_id = gg.prom_id ; 531 t.data.data.prom_id = gg.prom_id ;
@@ -444,7 +537,7 @@ Page({ @@ -444,7 +537,7 @@ Page({
444 var num=1; 537 var num=1;
445 if(data.is_bz==1){ 538 if(data.is_bz==1){
446 num=data.bs; 539 num=data.bs;
447 - if (num > data.gift_limitnum) num = 0; 540 + if (num > data.gift_limit_num) num = 0;
448 } 541 }
449 //如果赠品数量超出礼品库存,就取消 542 //如果赠品数量超出礼品库存,就取消
450 if(num>data['gift_storecount']) num=0; 543 if(num>data['gift_storecount']) num=0;
@@ -480,7 +573,6 @@ Page({ @@ -480,7 +573,6 @@ Page({
480 th.get_buy_now_quan(); 573 th.get_buy_now_quan();
481 574
482 }) 575 })
483 -  
484 }else{ 576 }else{
485 //--看是不是搭配促销-- 577 //--看是不是搭配促销--
486 if(gg.prom_type==5){ 578 if(gg.prom_type==5){
@@ -1524,7 +1616,10 @@ Page({ @@ -1524,7 +1616,10 @@ Page({
1524 if(gg.room_id && gg.room_id>0){ 1616 if(gg.room_id && gg.room_id>0){
1525 goods.room_id=gg.room_id; 1617 goods.room_id=gg.room_id;
1526 } 1618 }
1527 - 1619 +
  1620 + //积分购,先要带is_integral_normal=1
  1621 + if(gg.is_integral_normal) goods.is_integral_normal=1;
  1622 +
1528 //如果不立即购买或者秒杀,如果是线下库存购买的时候 1623 //如果不立即购买或者秒杀,如果是线下库存购买的时候
1529 if(goods.prom_type!=1 && goods.prom_type!=6 && th.data.sales_rules==2){ 1624 if(goods.prom_type!=1 && goods.prom_type!=6 && th.data.sales_rules==2){
1530 var isok=1; 1625 var isok=1;
@@ -2942,7 +3037,13 @@ Page({ @@ -2942,7 +3037,13 @@ Page({
2942 } 3037 }
2943 } 3038 }
2944 return is_use; 3039 return is_use;
2945 - } 3040 + },
  3041 +
  3042 + //跳转到购买卡
  3043 + buycard:function(){
  3044 + getApp().goto("/pages/user/plus/plus");
  3045 + getApp().globalData.plus_buy_back=1;
  3046 + }
2946 3047
2947 3048
2948 3049
pages/cart/cart2/cart2.wxml
@@ -3,518 +3,588 @@ @@ -3,518 +3,588 @@
3 <wxs module="filters" src="../../../utils/filter.wxs"></wxs> 3 <wxs module="filters" src="../../../utils/filter.wxs"></wxs>
4 4
5 <form bindsubmit="submitForm"> 5 <form bindsubmit="submitForm">
6 - <view class="container">  
7 - <!--要进行判断地址是否显示---->  
8 - <view bindtap="enterAddressPage" class="user-mes"  
9 - hidden='{{(bn_exp_type==1 && is_b_now==1) || (is_all_zt==1 && is_b_now==0)}}'>  
10 - <!---默认地址显示------>  
11 - <block wx:if="{{user_addr!=null}}">  
12 -  
13 - <view class="user-contact">  
14 - <text>收货人:</text>{{user_addr.consignee}}{{'  '}}{{user_addr.mobile}}</view>  
15 - <view class="location">  
16 - <view class="address">{{user_addr.more_address}}{{' '}}{{user_addr.address}}</view>  
17 - <view class="pos-icon">  
18 - <image class="wh100" src="{{imgUrl}}/miniapp/images/goodscategory/new_position.png"></image>  
19 - </view>  
20 - </view>  
21 - <view class="update-logistics">  
22 - <!-- <image class="arrow-rigth" src="{{imgUrl}}/miniapp/images/new_position.png"></image> -->  
23 - <view class="xc-right"></view>  
24 - </view>  
25 - </block>  
26 - <!---先增地址------>  
27 - <block wx:else>  
28 - <view class="add_new">  
29 - <image class="addr_jia" src="{{imgUrl}}/miniapp/images/jia.png"></image>添加地址  
30 - </view>  
31 - </block>  
32 - <view class="border-img"><image class="wh100" src="{{imgUrl}}/miniapp/images/order/new_dividing_line.png"></image></view>  
33 - </view>  
34 -  
35 - <!---------------------购物车进来,有可能多单---------------------->  
36 - <block wx:if="{{is_b_now==0}}">  
37 - <view class="xc-border main-top"></view>  
38 - <view wx:for="{{cartlist}}" wx:for-index="pidx">  
39 - <view class="use-item bfff">  
40 -  
41 - <image class="dp" src='{{imgUrl}}/miniapp/images/goodscategory/new_store.png'> </image> <view>门店:{{item.pname}}</view></view>  
42 - <view class="order-detail" wx:for="{{item.goods}}" wx:for-index="idx" wx:for-item="items">  
43 - <!----商品图片----->  
44 - <view class="goods-img" style="position: relative">  
45 - <image wx:if="{{items.is_gift}}" src="{{imgUrl}}/miniapp/images/giveaway.png" class="gift_image"></image>  
46 - <image class="wh100" src="{{items.original_img}}" binderror='cart_set_err'  
47 - data-err='cartlist[{{pidx}}].goods[{{idx}}].original_img' ></image>  
48 - </view>  
49 - <!----商品名称规格---->  
50 - <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{items.goods_id}}">  
51 - <view class="goods-name">{{items.goods_name}}</view>  
52 - <!-- 商品属性 -->  
53 - <view class="flex-vertical fs28 color-gray n_guige">  
54 - <view class="goods-color">  
55 - <block><text>{{filters.show_gui_ge(items.goods_spec,items.goods_color)}}</text></block>  
56 - <!--<block wx:if="{{!items.goods_spec && !items.goods_color}}"><text>规格1</text></block>-->  
57 - <!--<block wx:else>-->  
58 - <!--<text wx:if="{{items.goods_spec!=''}}">{{items.goods_spec}}<text wx:if="{{items.goods_color}}">/</text></text>-->  
59 - <!--<text wx:if="{{items.goods_color}}">{{items.goods_color}}</text>-->  
60 - <!--</block>-->  
61 - </view>  
62 - </view>  
63 -  
64 -  
65 - <!-----商品名称规格------>  
66 - <view class="order-num flex-space-between">  
67 - <view class="co-red">¥<text class="fs36">{{filters.toFix(items.goods_price,2)}}</text></view>  
68 - <view class="goods-num">x{{items.goods_num}}</view>  
69 - </view>  
70 - </navigator>  
71 -  
72 - </view>  
73 -  
74 - <!-----使用优惠券------>  
75 - <view class="xc-coupon-frame flex-center" data-bn="0" bindtap="open_coupon_list"  
76 - wx:if="{{(item.quan_list && item.quan_list.length>0) || get_by_quan_list_cart[item.pickup_id]!=null}}" data-cind="{{pidx}}" data-pickid="{{item.pickup_id}}">  
77 - <view class="work-frame flex-space-between">  
78 - <view class="work">优惠券<text class="quan_num_show fs20">{{item.can_num}}张可用</text></view>  
79 - <view class="xc-right-frame">  
80 - <text wx:if="{{using_quan[item.pickup_id].is_nouse}}">不使用</text>  
81 - <text wx:if="{{using_quan[item.pickup_id].money}}">¥{{using_quan[item.pickup_id].money}}元优惠券</text>  
82 - <text wx:if="{{using_quan[item.pickup_id].isby}}">包邮券</text> 6 + <view class="container">
  7 + <!--要进行判断地址是否显示---->
  8 + <view bindtap="enterAddressPage" class="user-mes mgt20" hidden='{{(bn_exp_type==1 && is_b_now==1) || (is_all_zt==1 && is_b_now==0)}}'>
  9 + <!---默认地址显示------>
  10 + <block wx:if="{{user_addr!=null}}">
  11 +
  12 + <view class="user-contact">
  13 + <text>收货人:</text>{{user_addr.consignee}}{{'  '}}{{user_addr.mobile}}</view>
  14 + <view class="location">
  15 + <view class="address">{{user_addr.more_address}}{{' '}}{{user_addr.address}}</view>
  16 + <view class="pos-icon">
  17 + <image class="wh100 bdr14" src="{{imgUrl}}/miniapp/images/goodscategory/new_position.png"></image>
  18 + </view>
  19 + </view>
  20 + <view class="update-logistics">
  21 + <!-- <image class="arrow-rigth" src="{{imgUrl}}/miniapp/images/new_position.png"></image> -->
  22 + <view class="xc-right"></view>
  23 + </view>
  24 + </block>
  25 + <!---先增地址------>
  26 + <block wx:else>
  27 + <view class="add_new">
  28 + <image class="addr_jia" src="{{imgUrl}}/miniapp/images/jia.png"></image>添加地址
  29 + </view>
  30 + </block>
  31 + <!-- <view class="border-img">
  32 + <image class="wh100" src="{{imgUrl}}/miniapp/images/order/new_dividing_line.png"></image>
  33 + </view> -->
  34 + </view>
  35 +
  36 + <!---------------------购物车进来,有可能多单---------------------->
  37 + <block wx:if="{{is_b_now==0}}">
  38 + <!-- <view class="xc-border main-top"></view> -->
  39 + <view wx:for="{{cartlist}}" wx:for-index="pidx">
  40 + <view class="use-item bfff bdr_t-14 mgt20">
  41 + <image class="dp" src='{{imgUrl}}/miniapp/images/goodscategory/new_store.png'></image>
  42 + <!-- <view>门店:{{item.pname}}</view> -->
  43 + <view>{{item.pname}}</view>
  44 + </view>
  45 + <view class="order-detail" wx:for="{{item.goods}}" wx:for-index="idx" wx:for-item="items">
  46 + <!----商品图片----->
  47 + <view class="goods-img" style="position: relative">
  48 + <image wx:if="{{items.is_gift}}" src="{{imgUrl}}/miniapp/images/giveaway.png" class="gift_image"></image>
  49 + <image class="wh100 bdr14" src="{{items.original_img}}" binderror='cart_set_err' data-err='cartlist[{{pidx}}].goods[{{idx}}].original_img'></image>
  50 + </view>
  51 + <!----商品名称规格---->
  52 + <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{items.goods_id}}">
  53 + <view class="goods-name ellipsis-2">{{items.goods_name}}</view>
  54 + <!-- 商品属性 -->
  55 + <view class="flex-vertical fs28 color-gray n_guige">
  56 + <view class="goods-color">
  57 + <block><text>{{filters.show_gui_ge(items.goods_spec,items.goods_color)}}</text></block>
  58 + <!--<block wx:if="{{!items.goods_spec && !items.goods_color}}"><text>规格1</text></block>-->
  59 + <!--<block wx:else>-->
  60 + <!--<text wx:if="{{items.goods_spec!=''}}">{{items.goods_spec}}<text wx:if="{{items.goods_color}}">/</text></text>-->
  61 + <!--<text wx:if="{{items.goods_color}}">{{items.goods_color}}</text>-->
  62 + <!--</block>-->
  63 + </view>
  64 + </view>
  65 +
  66 +
  67 + <!-----商品名称规格------>
  68 + <view class="order-num flex-space-between">
  69 + <view class="co-red">¥<text class="fs36">{{filters.toFix(items.goods_price,2)}}</text></view>
  70 + <view class="goods-num">x{{items.goods_num}}</view>
  71 + </view>
  72 + </navigator>
  73 + </view>
  74 +
  75 +
  76 + <!-- 如果是等级卡的商品,会员没有注册,要提醒注册 -->
  77 + <view class="plus_buy fs28" wx:if="{{item.card_cut_price>0}}">
  78 + <view class="flex">
  79 + <view class="card_bg ellipsis-1" style="margin-right: 10rpx;">
  80 + <image src="{{imgUrl}}/miniapp/images/plus/dj_icon.png"></ image>
  81 + <text class="card_name">{{show_card.CardName}}</text>
  82 + </view>
  83 + <view>立减 <text style="color:#f23030;">{{filters.toFix(item.card_cut_price,2) }}</text> 元</view>
  84 + </view>
  85 + <view>
  86 + <text style="color: #999;margin-left: 4rpx;">vip超级会员仅需{{show_card.CardFee}}元</text>
  87 + </view>
  88 + <!-- 三角形 -->
  89 + <view class="car_tri_up"></view>
  90 + <!-- 立即开通跳转 -->
  91 + <view bindtap="buycard" class="card_op">立即开通</view>
  92 + </view>
  93 +
  94 +
  95 + <!-----使用优惠券------>
  96 + <view class="xc-coupon-frame flex-center" data-bn="0" bindtap="open_coupon_list" wx:if="{{(item.quan_list && item.quan_list.length>0) || get_by_quan_list_cart[item.pickup_id]!=null}}"
  97 + data-cind="{{pidx}}" data-pickid="{{item.pickup_id}}">
  98 + <view class="work-frame flex-space-between">
  99 + <view class="work">优惠券<text class="quan_num_show fs20">{{item.can_num}}张可用</text></view>
  100 + <view class="xc-right-frame">
  101 + <text wx:if="{{using_quan[item.pickup_id].is_nouse}}">不使用</text>
  102 + <text wx:if="{{using_quan[item.pickup_id].money}}">¥{{using_quan[item.pickup_id].money}}元优惠券</text>
  103 + <text wx:if="{{using_quan[item.pickup_id].isby}}">包邮券</text>
83 <view class="xc-right"></view> 104 <view class="xc-right"></view>
84 - </view>  
85 - </view>  
86 - </view>  
87 -  
88 -  
89 - <view class="set-mes">  
90 - <view wx:if="{{order.store_prom}}">  
91 - <icon color="#f23030" size="16" type="info"></icon>  
92 - {{order.store_prom}}  
93 - </view>  
94 - <view class="use-item flex-space-between">  
95 - <view class="flex-vertical">  
96 - <view bindtap='setexptype_w' data-ind="{{pidx}}" data-t='1' data-txt='cartlist[{{pidx}}].exp_type'style="display:{{item.distr_t==2?'none':'flex;align-items: center'}};">  
97 - <!-- <icon bindtap='setexptype_w' data-t='1' data-txt='cartlist[{{pidx}}].exp_type' color="{{item.exp_type==1?'red':'gray'}}" size="16" type="success"></icon> -->  
98 -  
99 -  
100 -  
101 - <block wx:if="{{item.exp_type==1}}">  
102 - <!-- <view class="circle white xc-hookt fs20 red-b sn"><text>Γ</text></view> -->  
103 - <icon data-t='0' data-txt='cartlist[{{pidx}}].exp_type' color="red" size="16" type="success"></icon>  
104 - </block>  
105 - <block wx:else>  
106 - <view class="circle xc-hookts on"></view>  
107 - </block>  
108 - <view bindtap='setexptype_w' data-ind="{{pidx}}" data-t='1' data-txt='cartlist[{{pidx}}].exp_type' class="yu_er">门店自提</view>  
109 - </view>  
110 -  
111 - <view data-t='0' data-txt='cartlist[{{pidx}}].exp_type' data-ind="{{pidx}}" bindtap="setexptype_w" style="display:{{item.distr_t==1?'none':'flex;align-items: center'}};">  
112 - <!-- <icon bindtap='setexptype_w' data-t='0' data-txt='cartlist[{{pidx}}].exp_type' color="{{item.exp_type==0?'red':'gray'}}" size="16" type="success"></icon> -->  
113 - <block wx:if="{{item.exp_type==0}}">  
114 - <!-- <view class="circle white xc-hookt fs20 red-b sn"><text>Γ</text></view> -->  
115 - <icon data-t='0' data-txt='cartlist[{{pidx}}].exp_type' color="red" size="16" type="success"></icon>  
116 - </block>  
117 - <block wx:else>  
118 - <view class="circle xc-hookts on"></view>  
119 - </block>  
120 -  
121 - <view bindtap='setexptype_w' data-t='0' data-ind="{{pidx}}"  
122 - data-txt='cartlist[{{pidx}}].exp_type'  
123 - data-wl_txt='cartlist[{{pidx}}].wind'  
124 - class="yu_er">快递邮寄</view>  
125 - </view>  
126 - </view>  
127 - <block wx:if="{{item.exp_type==0}}">  
128 - <!-- 点击显示物流选择 -->  
129 - <view class="flex-vertical" bindtap="show_wu_arr" data-txt='cartlist[{{pidx}}].wind' data-w_sele_index="{{pidx}}">  
130 - <view >{{wu_arr[item.wind].name}}</view><view class="xc-right"></view>  
131 - </view>  
132 - </block>  
133 - </view>  
134 -  
135 - <!-- <view bindtap="express_name" class="use-item" hidden='{{item.exp_type==1}}'> 105 + </view>
  106 + </view>
  107 + </view>
  108 +
  109 +
  110 + <view class="set-mes bdr_b-14">
  111 + <view wx:if="{{order.store_prom}}">
  112 + <icon color="#f23030" size="16" type="info"></icon>
  113 + {{order.store_prom}}
  114 + </view>
  115 + <view class="use-item flex-space-between">
  116 + <view class="flex-vertical">
  117 + <view bindtap='setexptype_w' data-ind="{{pidx}}" data-t='1' data-txt='cartlist[{{pidx}}].exp_type' style="padding-right:26rpx;display:{{item.distr_t==2?'none':'flex;align-items: center'}};">
  118 + <!-- <icon bindtap='setexptype_w' data-t='1' data-txt='cartlist[{{pidx}}].exp_type' color="{{item.exp_type==1?'red':'gray'}}" size="16" type="success"></icon> -->
  119 +
  120 +
  121 +
  122 + <block wx:if="{{item.exp_type==1}}">
  123 + <!-- <view class="circle white xc-hookt fs20 red-b sn"><text>Γ</text></view> -->
  124 + <icon data-t='0' data-txt='cartlist[{{pidx}}].exp_type' color="red" size="16" type="success"></icon>
  125 + </block>
  126 + <block wx:else>
  127 + <view class="circle xc-hookts on"></view>
  128 + </block>
  129 + <view bindtap='setexptype_w' data-ind="{{pidx}}" data-t='1' data-txt='cartlist[{{pidx}}].exp_type' class="yu_er">门店自提</view>
  130 + </view>
  131 +
  132 + <view data-t='0' data-txt='cartlist[{{pidx}}].exp_type' data-ind="{{pidx}}" bindtap="setexptype_w" style="display:{{item.distr_t==1?'none':'flex;align-items: center'}};">
  133 + <!-- <icon bindtap='setexptype_w' data-t='0' data-txt='cartlist[{{pidx}}].exp_type' color="{{item.exp_type==0?'red':'gray'}}" size="16" type="success"></icon> -->
  134 + <block wx:if="{{item.exp_type==0}}">
  135 + <!-- <view class="circle white xc-hookt fs20 red-b sn"><text>Γ</text></view> -->
  136 + <icon data-t='0' data-txt='cartlist[{{pidx}}].exp_type' color="red" size="16" type="success"></icon>
  137 + </block>
  138 + <block wx:else>
  139 + <view class="circle xc-hookts on"></view>
  140 + </block>
  141 +
  142 + <view bindtap='setexptype_w' data-t='0' data-ind="{{pidx}}" data-txt='cartlist[{{pidx}}].exp_type' data-wl_txt='cartlist[{{pidx}}].wind'
  143 + class="yu_er">快递邮寄</view>
  144 + </view>
  145 + </view>
  146 + <block wx:if="{{item.exp_type==0}}">
  147 + <!-- 点击显示物流选择 -->
  148 + <view class="flex-vertical" bindtap="show_wu_arr" data-txt='cartlist[{{pidx}}].wind' data-w_sele_index="{{pidx}}" style="padding-right:6rpx;">
  149 + <view>{{wu_arr[item.wind].name}}</view>
  150 + <view class="xc-right"></view>
  151 + </view>
  152 + </block>
  153 + </view>
  154 +
  155 + <!-- <view bindtap="express_name" class="use-item" hidden='{{item.exp_type==1}}'>
136 <view>选择物流:</view> --> 156 <view>选择物流:</view> -->
137 - <!-- <picker bindchange="bindPickerChange_w" data-txt='cartlist[{{pidx}}].wind' value="{{item.wind}}" range="{{wu_arr}}" range-key="name"> 157 + <!-- <picker bindchange="bindPickerChange_w" data-txt='cartlist[{{pidx}}].wind' value="{{item.wind}}" range="{{wu_arr}}" range-key="name">
138 <view >{{wu_arr[item.wind].name}}</view> 158 <view >{{wu_arr[item.wind].name}}</view>
139 </picker> --> 159 </picker> -->
140 - <!-- </view> -->  
141 - </view>  
142 -  
143 - <!-- 留言 -->  
144 - <view class="coupon-mes flex-vertical">  
145 - <view>留言</view>  
146 - <view class="leave-word">  
147 - <input placeholder-class="fs28" placeholder='给商家留言,最多100字'bindinput="keyUpChangeNum"  
148 - disabled="{{disabled}}" class="word-box" maxlength="100" name="user_note_{{item.pickup_id}}"></input>  
149 -  
150 - </view>  
151 - </view>  
152 -  
153 - </view>  
154 -  
155 - <!-----使用余额------>  
156 - <view class="set-mes" wx:if="{{yuer>0}}">  
157 - <view class="use-item" bindtap='set_js_useyuer'>  
158 - <icon color="{{js_use_money?'red':'gray'}}" size="16" type="success"></icon>  
159 - <view class="yu_er">使用余额 :¥{{yuer}} </view>  
160 - </view>  
161 - </view>  
162 -  
163 - </block>  
164 -  
165 - <!------立即购买-------->  
166 - <view class="xc-border xc-border"></view>  
167 - <block wx:if="{{is_b_now==1}}">  
168 - <view class="use-item bfff">  
169 - <image class="dp" src='{{imgUrl}}/miniapp/images/dianpu.png'> </image> <view>门店:{{bn_pickname}}</view></view>  
170 - <view class="order-detail">  
171 - <view class="goods-img">  
172 - <image class="wh100" src="{{bn_goods.original_img}}" binderror='cart_set_err' data-err="bn_goods.original_img"></image>  
173 - </view>  
174 - <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{bn_goods.goods_id}}">  
175 - <view class="goods-name">{{bn_goods.goods_name}}</view>  
176 - <!-- 商品属性 -->  
177 - <view class="flex-vertical fs28 xc-ash color-gray n_guige">  
178 - <view class="goods-color">  
179 - <block><text>{{filters.show_gui_ge(bn_goods.goods_spec,bn_goods.goods_color)}}</text></block>  
180 - <!--<block wx:if="{{!bn_goods.goods_spec && !bn_goods.goods_color}}"><text>规格1</text></block>-->  
181 - <!--<block wx:else>-->  
182 - <!--<text wx:if="{{bn_goods.goods_spec!=''}}">{{bn_goods.goods_spec}}<text wx:if="{{bn_goods.goods_color}}">/</text></text>-->  
183 - <!--<text wx:if="{{bn_goods.goods_color}}">{{bn_goods.goods_color}}</text>-->  
184 - <!--</block>-->  
185 - </view>  
186 - </view>  
187 -  
188 - <!-----商品名称规格------>  
189 - <view class="order-num flex-space-between">  
190 - <view class="co-red">¥<text class="fs36">{{filters.toFix(bn_goods.shop_price,2)}}</text></view>  
191 - <view class="goods-num">x{{bn_goods.buynum}}</view>  
192 - </view>  
193 - </navigator>  
194 -  
195 - </view>  
196 - <!-- 赠品的显示 -->  
197 - <view class="order-detail" wx:if="{{buy_now_gift_goods}}">  
198 - <view class="goods-img" style="position: relative">  
199 - <image src="{{imgUrl}}/miniapp/images/giveaway.png" class="gift_image"></image>  
200 -  
201 - <image class="wh100" src="{{buy_now_gift_goods.original_img}}" binderror='cart_set_err' data-err="buy_now_gift_goods.original_img"></image>  
202 - </view>  
203 - <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{buy_now_gift_goods.goods_id}}">  
204 - <view class="goods-name">{{buy_now_gift_goods.goods_name}}</view>  
205 - <!-- 商品属性 -->  
206 - <view class="flex-vertical fs28 xc-ash color-gray n_guige">  
207 - <view class="goods-color">  
208 - <block><text>{{filters.show_gui_ge(buy_now_gift_goods.goods_spec,buy_now_gift_goods.goods_color)}}</text></block>  
209 - </view>  
210 - </view>  
211 - <!-----商品名称规格------>  
212 - <view class="order-num flex-space-between">  
213 - <view class="co-red">¥<text class="fs36">0</text></view>  
214 - <view class="goods-num">x{{buy_now_gift_goods.buynum}}</view>  
215 - </view>  
216 - </navigator>  
217 - </view>  
218 -  
219 -  
220 - <block wx:if="{{collocation_goods}}">  
221 - <!-- 搭配购买的功能实现 -->  
222 - <view class="order-detail" wx:for="{{collocation_goods}}">  
223 - <view class="goods-img">  
224 - <image class="wh100" src="{{imgUrl+item.original_img}}" binderror='err_img_collocation' data-err="item.original_img"></image>  
225 - </view>  
226 - <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}">  
227 - <view class="goods-name">{{item.goods_name}}</view>  
228 - <!-- 商品属性 -->  
229 - <view class="flex-vertical fs28 xc-ash color-gray n_guige">  
230 - <view class="goods-color">  
231 - <block><text>{{filters.show_gui_ge(item.goods_spec,item.goods_color)}}</text></block>  
232 - </view>  
233 - </view>  
234 - <!-----商品名称规格------>  
235 - <view class="order-num flex-space-between">  
236 - <view class="co-red">¥<text class="fs36">{{item.price}}</text></view>  
237 - <view class="goods-num">x{{item.goods_num}}</view>  
238 - </view>  
239 - </navigator>  
240 - </view>  
241 - </block>  
242 -  
243 -  
244 - <view class="set-mes">  
245 - <view wx:if="{{order.store_prom}}"><icon color="#f23030" size="16" type="info"></icon>{{order.store_prom}}  
246 - </view>  
247 -  
248 - <view class="xc-coupon-frame flex-center" data-bn="1" bindtap="open_coupon_list" data-pickid="{{bn_pick}}"  
249 - wx:if="{{(selected_quan_list && selected_quan_list.length>0) || get_by_quan_list!=null}}">  
250 - <view class="work-frame flex-space-between">  
251 - <view class="work">  
252 - 优惠券 <text class="quan_num_show">{{(selected_quan_list?selected_quan_list.length:0)+ (get_by_quan_list?get_by_quan_list.length:0)}}张可用</text>  
253 - </view>  
254 - <view class="xc-right-frame">  
255 - <text wx:if="{{using_quan[bn_pick].is_nouse}}">不使用</text>  
256 - <block wx:else>  
257 - <text wx:if="{{using_quan[bn_pick].money}}">¥{{using_quan[bn_pick].money}}元优惠券</text>  
258 - <text wx:if="{{using_quan[bn_pick].isby}}">包邮券</text>  
259 - </block>  
260 - <view class="xc-right"></view>  
261 - </view>  
262 - </view>  
263 - </view>  
264 -  
265 - <view class="use-item flex-space-between">  
266 - <view class="flex">  
267 - <view bindtap='setexptype' data-t='1' data-txt='cartlist[{{pidx}}].exp_type' style="display:{{bn_t_exp_t==2?'none':'flex;align-items:center;'}};">  
268 - <icon color="{{bn_exp_type==1?'red':'gray'}}" size="16" type="success"></icon>  
269 - <view class="yu_er">自提</view>  
270 - </view>  
271 - <view bindtap='setexptype' data-t='0' data-txt='cartlist[{{pidx}}].exp_type' style="display:{{bn_t_exp_t==1?'none':'flex;align-items:center;'}};">  
272 - <icon color="{{bn_exp_type==0?'red':'gray'}}" size="16" type="success"></icon>  
273 - <view class="yu_er">物流</view>  
274 - </view>  
275 -</view>  
276 - <block wx:if="{{bn_exp_type==0}}">  
277 - <view class="flex-vertical" bindtap="show_wu_arr" data-txt='index'><view class="logistics-name">{{wu_arr[index].name}}</view><view class="xc-right"></view></view>  
278 - </block>  
279 - </view>  
280 - </view>  
281 -  
282 - <!-----使用余额------>  
283 - <view class="set-mes" wx:if="{{yuer>0}}">  
284 - <view class="use-item" bindtap='set_bn_useyuer'>  
285 - <icon color="{{bn_use_money?'red':'gray'}}" size="16" type="success"></icon>  
286 - <view class="yu_er">使用余额 :¥{{yuer}} </view>  
287 - </view>  
288 - </view>  
289 - <view class="coupon-mes flex-vertical">  
290 - <view>留言</view>  
291 - <view class="leave-word">  
292 - <input placeholder-class="fs28" placeholder='给商家留言,最多100字' bindinput="keyUpChangeNum" disabled="{{disabled}}" class="word-box" maxlength="100" name="user_note"></input>  
293 -  
294 - </view>  
295 - </view>  
296 - </block>  
297 -  
298 - <view class="information">  
299 - <view class="item" wx:if="{{formData.all_price>0}}">  
300 - <view>商品金额</view>  
301 - <view class="co-red">¥ {{formData.all_price}}元</view>  
302 - </view>  
303 - <view class="item" wx:if="{{formData.shipping_price>0}}">  
304 - <view>配送费用</view>  
305 - <view class="co-red">¥ {{formData.shipping_price}}元</view>  
306 - </view>  
307 - <view class="item" wx:if="{{formData.coupon_price>0}}">  
308 - <view>使用优惠券</view>  
309 - <view class="co-red">- ¥ {{formData.coupon_price}}元</view>  
310 - </view>  
311 - <!-- 优惠活动优惠金额 -->  
312 - <view class="item" wx:if="{{formData.cut_price>0}}">  
313 - <view>优惠活动</view>  
314 - <view class="co-red">- ¥ {{filters.toFix(formData.cut_price,2)}}元</view>  
315 - </view>  
316 - <!-- 订单优惠优惠金额 -->  
317 - <view class="item" wx:if="{{formData.order_prom_amount>0}}">  
318 - <view>订单优惠</view>  
319 - <view class="co-red">- ¥ {{filters.toFix(formData.order_prom_amount,2)}}元</view>  
320 - </view>  
321 - <view class="item" wx:if="{{formData.user_money>0}}">  
322 - <view>使用余额</view>  
323 - <view class="co-red">- ¥ {{formData.user_money}}元</view>  
324 - </view>  
325 - </view>  
326 - </view>  
327 -  
328 - <view class="btn-wrap">  
329 - <button class="tips-btn" formType="submit" id="submitOrder">提交订单</button>  
330 - <view class="pay-amount">  
331 - <view class="payable">应付金额 : </view>  
332 - <view class="co-red big">¥ {{formData.order_amount}}元</view>  
333 - </view>  
334 - </view> 160 + <!-- </view> -->
  161 + </view>
  162 +
  163 + <!-- 留言 -->
  164 + <view class="coupon-mes flex-vertical">
  165 + <view>留言</view>
  166 + <view class="leave-word">
  167 + <input placeholder-class="fs28" placeholder='给商家留言,最多100字' bindinput="keyUpChangeNum" disabled="{{disabled}}"
  168 + class="word-box" maxlength="100" name="user_note_{{item.pickup_id}}"></input>
  169 +
  170 + </view>
  171 + </view>
  172 +
  173 + </view>
  174 +
  175 + <!-----使用余额------>
  176 + <view class="set-mes bdr_t-14" wx:if="{{yuer>0}}">
  177 + <view class="use-item" bindtap='set_js_useyuer'>
  178 + <icon color="{{js_use_money?'red':'gray'}}" size="16" type="success"></icon>
  179 + <view class="yu_er">使用余额 :¥{{yuer}} </view>
  180 + </view>
  181 + </view>
  182 +
  183 + </block>
  184 +
  185 + <!------立即购买-------->
  186 + <!-- <view class="xc-border xc-border"></view> -->
  187 + <block wx:if="{{is_b_now==1}}">
  188 + <view class="use-item bfff bdr_t-14 mgt20">
  189 + <image class="dp" src='{{imgUrl}}/miniapp/images/goodscategory/new_store.png'> </image>
  190 + <view>{{bn_pickname}}</view>
  191 + <!-- <view>门店:{{bn_pickname}}</view> -->
  192 + </view>
  193 + <view class="order-detail">
  194 + <view class="goods-img">
  195 + <image class="wh100 bdr14" src="{{bn_goods.original_img}}" binderror='cart_set_err' data-err="bn_goods.original_img"></image>
  196 + </view>
  197 + <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{bn_goods.goods_id}}">
  198 + <view class="goods-name ellipsis-2">{{bn_goods.goods_name}}</view>
  199 + <!-- 商品属性 -->
  200 + <view class="flex-vertical fs28 xc-ash color-gray n_guige">
  201 + <view class="goods-color">
  202 + <block><text>{{filters.show_gui_ge(bn_goods.goods_spec,bn_goods.goods_color)}}</text></block>
  203 + <!--<block wx:if="{{!bn_goods.goods_spec && !bn_goods.goods_color}}"><text>规格1</text></block>-->
  204 + <!--<block wx:else>-->
  205 + <!--<text wx:if="{{bn_goods.goods_spec!=''}}">{{bn_goods.goods_spec}}<text wx:if="{{bn_goods.goods_color}}">/</text></text>-->
  206 + <!--<text wx:if="{{bn_goods.goods_color}}">{{bn_goods.goods_color}}</text>-->
  207 + <!--</block>-->
  208 + </view>
  209 + </view>
  210 +
  211 + <!-----商品名称规格------>
  212 + <view class="order-num flex-space-between">
  213 + <view class="co-red">¥<text class="fs36">{{filters.toFix(bn_goods.shop_price,2)}}</text></view>
  214 + <view class="goods-num">x{{bn_goods.buynum}}</view>
  215 + </view>
  216 + </navigator>
  217 +
  218 + </view>
  219 + <!-- 赠品的显示 -->
  220 + <view class="order-detail" wx:if="{{buy_now_gift_goods}}">
  221 + <view class="goods-img" style="position: relative">
  222 + <image src="{{imgUrl}}/miniapp/images/giveaway.png" class="gift_image"></image>
  223 +
  224 + <image class="wh100 bdr14" src="{{buy_now_gift_goods.original_img}}" binderror='cart_set_err' data-err="buy_now_gift_goods.original_img"></image>
  225 + </view>
  226 + <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{buy_now_gift_goods.goods_id}}">
  227 + <view class="goods-name ellipsis-2">{{buy_now_gift_goods.goods_name}}</view>
  228 + <!-- 商品属性 -->
  229 + <view class="flex-vertical fs28 xc-ash color-gray n_guige">
  230 + <view class="goods-color">
  231 + <block><text>{{filters.show_gui_ge(buy_now_gift_goods.goods_spec,buy_now_gift_goods.goods_color)}}</text></block>
  232 + </view>
  233 + </view>
  234 + <!-----商品名称规格------>
  235 + <view class="order-num flex-space-between">
  236 + <view class="co-red">¥<text class="fs36">0</text></view>
  237 + <view class="goods-num">x{{buy_now_gift_goods.buynum}}</view>
  238 + </view>
  239 + </navigator>
  240 + </view>
  241 +
  242 +
  243 + <block wx:if="{{collocation_goods}}">
  244 + <!-- 搭配购买的功能实现 -->
  245 + <view class="order-detail" wx:for="{{collocation_goods}}">
  246 + <view class="goods-img">
  247 + <image class="wh100 bdr14" src="{{imgUrl+item.original_img}}" binderror='err_img_collocation' data-err="item.original_img"></image>
  248 + </view>
  249 + <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}">
  250 + <view class="goods-name ellipsis-2">{{item.goods_name}}</view>
  251 + <!-- 商品属性 -->
  252 + <view class="flex-vertical fs28 xc-ash color-gray n_guige">
  253 + <view class="goods-color">
  254 + <block><text>{{filters.show_gui_ge(item.goods_spec,item.goods_color)}}</text></block>
  255 + </view>
  256 + </view>
  257 + <!-----商品名称规格------>
  258 + <view class="order-num flex-space-between">
  259 + <view class="co-red">¥<text class="fs36">{{item.price}}</text></view>
  260 + <view class="goods-num">x{{item.goods_num}}</view>
  261 + </view>
  262 + </navigator>
  263 + </view>
  264 + </block>
  265 +
  266 + <!-- 如果是等级卡的商品,会员没有注册,要提醒注册 -->
  267 + <view class="plus_buy fs28" wx:if="{{card_cut_price>0}}">
  268 + <view class="flex">
  269 + <view class="card_bg ellipsis-1" style="margin-right: 10rpx;">
  270 + <image src="{{imgUrl}}/miniapp/images/plus/dj_icon.png"></ image>
  271 + <text class="card_name">{{show_card.CardName}}</text>
  272 + </view>
  273 + <view>立减 <text style="color:#f23030;">{{filters.toFix(card_cut_price,2) }}</text> 元</view>
  274 + </view>
  275 + <view>
  276 + <text style="color: #999;margin-left: 4rpx;">vip超级会员仅需{{show_card.CardFee}}元</text>
  277 + </view>
  278 + <!-- 三角形 -->
  279 + <view class="car_tri_up"></view>
  280 + <!-- 立即开通跳转 -->
  281 + <view bindtap="buycard" class="card_op">立即开通</view>
  282 + </view>
  283 +
  284 +
  285 + <view class="set-mes bdr_b-14">
  286 + <view wx:if="{{order.store_prom}}">
  287 + <icon color="#f23030" size="16" type="info"></icon>{{order.store_prom}}
  288 + </view>
  289 +
  290 + <view class="xc-coupon-frame flex-center" data-bn="1" bindtap="open_coupon_list" data-pickid="{{bn_pick}}" wx:if="{{(selected_quan_list && selected_quan_list.length>0) || get_by_quan_list!=null}}">
  291 + <view class="work-frame flex-space-between">
  292 + <view class="work">
  293 + 优惠券 <text class="quan_num_show">{{(selected_quan_list?selected_quan_list.length:0)+ (get_by_quan_list?get_by_quan_list.length:0)}}张可用</text>
  294 + </view>
  295 + <view class="xc-right-frame">
  296 + <text wx:if="{{using_quan[bn_pick].is_nouse}}">不使用</text>
  297 + <block wx:else>
  298 + <text wx:if="{{using_quan[bn_pick].money}}">¥{{using_quan[bn_pick].money}}元优惠券</text>
  299 + <text wx:if="{{using_quan[bn_pick].isby}}">包邮券</text>
  300 + </block>
  301 + <view class="xc-right"></view>
  302 + </view>
  303 + </view>
  304 + </view>
  305 +
  306 + <view class="use-item flex-space-between">
  307 + <view class="flex">
  308 + <view bindtap='setexptype' data-t='1' data-txt='cartlist[{{pidx}}].exp_type' style="padding-right:26rpx;display:{{bn_t_exp_t==2?'none':'flex;align-items:center;'}};">
  309 + <icon color="{{bn_exp_type==1?'red':'gray'}}" size="16" type="success"></icon>
  310 + <view class="yu_er">门店自提</view>
  311 + </view>
  312 + <view bindtap='setexptype' data-t='0' data-txt='cartlist[{{pidx}}].exp_type' style="display:{{bn_t_exp_t==1?'none':'flex;align-items:center;'}};">
  313 + <icon color="{{bn_exp_type==0?'red':'gray'}}" size="16" type="success"></icon>
  314 + <view class="yu_er">快递邮寄</view>
  315 + </view>
  316 + </view>
  317 + <block wx:if="{{bn_exp_type==0}}">
  318 + <view class="flex-vertical" bindtap="show_wu_arr" data-txt='index'>
  319 + <view class="logistics-name">{{wu_arr[index].name}}</view>
  320 + <view class="xc-right"></view>
  321 + </view>
  322 + </block>
  323 + </view>
  324 + </view>
  325 +
  326 + <view class="coupon-mes flex-vertical">
  327 + <view>留言</view>
  328 + <view class="leave-word">
  329 + <input placeholder-class="fs28" placeholder='给商家留言,最多100字' bindinput="keyUpChangeNum" disabled="{{disabled}}"
  330 + class="word-box" maxlength="100" name="user_note"></input>
  331 + </view>
  332 + </view>
  333 +
  334 + <!-----使用余额------>
  335 + <view class="set-mes bdr_t-14" wx:if="{{yuer>0}}">
  336 + <view class="use-item" bindtap='set_bn_useyuer'>
  337 + <icon color="{{bn_use_money?'red':'gray'}}" size="16" type="success"></icon>
  338 + <view class="yu_er">使用余额 :¥{{yuer}} </view>
  339 + </view>
  340 + </view>
  341 +
  342 + </block>
  343 +
  344 + <view class="information bdr14">
  345 + <view class="item" wx:if="{{formData.all_price>0}}">
  346 + <view>商品金额</view>
  347 + <view class="co-red">¥ {{formData.all_price}}元</view>
  348 + </view>
  349 + <view class="item" wx:if="{{formData.shipping_price>0}}">
  350 + <view>配送费用</view>
  351 + <view class="co-red">¥ {{formData.shipping_price}}元</view>
  352 + </view>
  353 + <view class="item" wx:if="{{formData.coupon_price>0}}">
  354 + <view>使用优惠券</view>
  355 + <view class="co-red">- ¥ {{formData.coupon_price}}元</view>
  356 + </view>
  357 + <!-- 优惠活动优惠金额 -->
  358 + <view class="item" wx:if="{{formData.cut_price>0}}">
  359 + <view>优惠活动</view>
  360 + <view class="co-red">- ¥ {{filters.toFix(formData.cut_price,2)}}元</view>
  361 + </view>
  362 + <!-- 订单优惠优惠金额 -->
  363 + <view class="item" wx:if="{{formData.order_prom_amount>0}}">
  364 + <view>订单优惠</view>
  365 + <view class="co-red">- ¥ {{filters.toFix(formData.order_prom_amount,2)}}元</view>
  366 + </view>
  367 + <view class="item" wx:if="{{formData.user_money>0}}">
  368 + <view>使用余额</view>
  369 + <view class="co-red">- ¥ {{formData.user_money}}元</view>
  370 + </view>
  371 + </view>
  372 + </view>
  373 +
  374 + <view class="btn-wrap shadow-1">
  375 + <view class="pay-amount">
  376 + <view class="payable">应付金额:<text class="co-red">¥{{formData.order_amount}}</text></view>
  377 + <!-- <view class="co-red big"></view> -->
  378 + </view>
  379 + <button class="tips-btn" formType="submit" id="submitOrder">提交订单</button>
  380 + </view>
335 </form> 381 </form>
336 382
337 <!-- 使用券列表的弹窗 --> 383 <!-- 使用券列表的弹窗 -->
338 -<view wx:if='{{open_quan==1}}' >  
339 - <view class="cover-layer flex-center " bindtap='close_coupon'> </view>  
340 - <view class="cx-popup {{open_quan==true?'up' : 'down'}}" > 384 +<view wx:if='{{open_quan==1}}'>
  385 + <view class="cover-layer flex-center " bindtap='close_coupon'> </view>
  386 + <view class="cx-popup {{open_quan==true?'up' : 'down'}}">
341 <!-- 最上面 --> 387 <!-- 最上面 -->
342 - <view class="top flex">  
343 - <view class="xc-top-content t-c"><view class="xc-title">优惠券使用</view></view>  
344 - <view class="xc-close-frame" bindtap='close_coupon' ><view class="xc-close">×</view></view>  
345 - </view>  
346 - <!-- 使用优惠券和不使用优惠券层-->  
347 - <view class="may_use_coupon fs28 flex"> 可使用的优惠券  
348 - <view class=" is_use_coupon flex-vertical" bindtap="sele_quan_item" data-no="1">不使用优惠券  
349 - <block wx:if="{{using_quan[selected_quan_pick].is_nouse_red}}"><view class="circle white xc-hooka fs20 red-b sn"><text>Γ</text></view> </block>  
350 - <block wx:else><view class="circle xc-hookst ons"></view></block>  
351 - </view>  
352 - </view>  
353 -  
354 - <!-- 中间券内容显示 -->  
355 - <view class="xc-frame flex-level">  
356 - <view class="list-frame">  
357 - <view wx:for="{{selected_quan_list}}" bindtap="sele_quan_item" wx:if="{{!item.is_using}}" data-ind="{{q_index}}" wx:for-item="item" wx:for-index="q_index">  
358 - <view class="xc-coupon-frame flex-center" data-ind="{{q_index}}"> 388 + <view class="top flex">
  389 + <view class="xc-top-content t-c">
  390 + <view class="xc-title">优惠券使用</view>
  391 + </view>
  392 + <view class="xc-close-frame" bindtap='close_coupon'>
  393 + <view class="xc-close">×</view>
  394 + </view>
  395 + </view>
  396 + <!-- 使用优惠券和不使用优惠券层-->
  397 + <view class="may_use_coupon fs28 flex"> 可使用的优惠券
  398 + <view class=" is_use_coupon flex-vertical" bindtap="sele_quan_item" data-no="1">不使用优惠券
  399 + <block wx:if="{{using_quan[selected_quan_pick].is_nouse_red}}">
  400 + <view class="circle white xc-hooka fs20 red-b sn"><text>Γ</text></view>
  401 + </block>
  402 + <block wx:else>
  403 + <view class="circle xc-hookst ons"></view>
  404 + </block>
  405 + </view>
  406 + </view>
  407 +
  408 + <!-- 中间券内容显示 -->
  409 + <view class="xc-frame flex-level">
  410 + <view class="list-frame">
  411 + <view wx:for="{{selected_quan_list}}" bindtap="sele_quan_item" wx:if="{{!item.is_using}}" data-ind="{{q_index}}"
  412 + wx:for-item="item" wx:for-index="q_index">
  413 + <view class="xc-coupon-frame flex-center" data-ind="{{q_index}}">
  414 + <view class="coupon-frame flex rel">
  415 + <!-- 锯齿 -->
  416 + <include src="juchi_part.wxml" />
  417 + <!-- 左边 -->
  418 + <view class="coupon-left rel {{filter.setcolor(item.UseObjectType)}} flex-center">
  419 + <view class="white xc-money-frames">
  420 + <view class="f_text"><text class="xc-rmb-symbol">¥</text><text class="xc-rmb-val">{{item.Sum}}</text></view>
  421 + <view class="coupon-explain t-c" wx:if="{{item.BuySum>0}}">满{{item.BuySum}}元可用</view>
  422 + <view class="coupon-explain t-c" wx:else>满0元可用</view>
  423 + </view>
  424 + </view>
  425 + <!-- 右边 -->
  426 + <view class="coupon-right flex-center rel">
  427 + <view class="coupon-annotation flex">
  428 + <view class="flex top-frame">
  429 + <view class="frame">
  430 + <view class="coupon-wode ib flex ellipsis-2 ">
  431 + <text class="xc-brand t-c ib white {{filter.setcolor(item.UseObjectType)}}">{{filter.get_type_card(item.UseObjectType)}}</text>
  432 + <block>{{item.Sum}}元优惠券</block>
  433 + </view>
  434 + <view class="coupon-time">{{filters.replace_time2(item.BeginDate)}}至{{item.ValidDate?filters.replace_time2(item.ValidDate):'不限'}}</view>
  435 + </view>
  436 + </view>
  437 + <block wx:if="{{item.show_red}}">
  438 + <view class="circle white xc-hook fs20 red-b sn"><text>Γ</text></view>
  439 + </block>
  440 + <block wx:else>
  441 + <view class="circle xc-hooks on"></view>
  442 + </block>
  443 + </view>
  444 + <include src="remark_click_part.wxml" />
  445 + </view>
  446 + </view>
  447 + </view>
  448 + <!-- 打开是说明 -->
  449 + <include src="remark_part.wxml" />
  450 + </view>
  451 + <!-- 包邮券的显示,立即购买 -->
  452 + <block wx:if="{{ is_b_now && bn_exp_type==0}}">
  453 + <view wx:for="{{get_by_quan_list}}" bindtap="sele_quan_item_by" wx:if="{{!item.is_using}}" data-ind="{{byq_index}}"
  454 + wx:for-item="item" wx:for-index="byq_index">
  455 + <view class="xc-coupon-frame flex-center" data-ind="{{byq_index}}">
  456 + <view class="coupon-frame flex rel">
  457 + <!-- 锯齿 -->
  458 + <include src="juchi_part.wxml" />
  459 + <!-- 左边 -->
  460 + <view class="coupon-left rel {{filter.setcolor(item.UseObjectType)}} flex-center">
  461 + <view class="white xc-money-frames">
  462 + <view class="f_text"><text class="xc-rmb-val">包邮券</text></view>
  463 + <view class="coupon-explain t-c" wx:if="{{item.condition>0}}">满{{item.condition}}元可用</view>
  464 + <view class="coupon-explain t-c" wx:else>满0元可用</view>
  465 + </view>
  466 + </view>
  467 + <!-- 右边 -->
  468 + <view class="coupon-right flex-center rel">
  469 + <view class="coupon-annotation flex">
  470 + <view class="flex top-frame">
  471 + <view class="frame">
  472 + <view class="coupon-wode ib flex ellipsis-2 ">
  473 + <text class="xc-brand t-c ib white {{filter.setcolor(item.UseObjectType)}}">{{filter.get_type_card(0)}}</text>
  474 + <block>包邮券</block>
  475 + </view>
  476 + <view class="coupon-time">{{filters.format_time(item.use_start_time)}}至{{item.use_end_time?filters.format_time(item.use_end_time):'不限'}}</view>
  477 + </view>
  478 + </view>
  479 + <block wx:if="{{item.show_red}}">
  480 + <view class="circle white xc-hook fs20 red-b sn"><text>Γ</text></view>
  481 + </block>
  482 + <block wx:else>
  483 + <view class="circle xc-hooks on"></view>
  484 + </block>
  485 + </view>
  486 + <include src="remark_click_part2.wxml" />
  487 + </view>
  488 + </view>
  489 + </view>
  490 + <!-- 打开是说明 -->
  491 + <include src="remark_part.wxml" />
  492 + </view>
  493 + </block>
  494 +
  495 + <!-- 包邮券的显示,购物车购买 -->
  496 + <block wx:if="{{!is_b_now && sele_exp_type==0}}">
  497 + <view wx:for="{{by_quan_list_cart}}" bindtap="sele_quan_item_by" wx:if="{{!item.is_using}}" data-ind="{{byq_index}}"
  498 + wx:for-item="item" wx:for-index="byq_index">
  499 + <view class="xc-coupon-frame flex-center" data-ind="{{byq_index}}">
359 <view class="coupon-frame flex rel"> 500 <view class="coupon-frame flex rel">
360 - <!-- 锯齿 -->  
361 - <include src="juchi_part.wxml" />  
362 - <!-- 左边 -->  
363 - <view class="coupon-left rel {{filter.setcolor(item.UseObjectType)}} flex-center">  
364 - <view class="white xc-money-frames">  
365 - <view class="f_text"><text class="xc-rmb-symbol">¥</text><text class="xc-rmb-val">{{item.Sum}}</text></view>  
366 - <view class="coupon-explain t-c" wx:if="{{item.BuySum>0}}">满{{item.BuySum}}元可用</view>  
367 - <view class="coupon-explain t-c" wx:else>满0元可用</view>  
368 - </view>  
369 - </view>  
370 - <!-- 右边 -->  
371 - <view class="coupon-right flex-center rel">  
372 - <view class="coupon-annotation flex">  
373 - <view class="flex top-frame">  
374 - <view class="frame">  
375 - <view class="coupon-wode ib flex ellipsis-2 ">  
376 - <text class="xc-brand t-c ib white {{filter.setcolor(item.UseObjectType)}}">{{filter.get_type_card(item.UseObjectType)}}</text>  
377 - <block>{{item.Sum}}元优惠券</block>  
378 - </view>  
379 - <view class="coupon-time">{{filters.replace_time2(item.BeginDate)}}至{{item.ValidDate?filters.replace_time2(item.ValidDate):'不限'}}</view>  
380 - </view>  
381 - </view>  
382 - <block wx:if="{{item.show_red}}"><view class="circle white xc-hook fs20 red-b sn"><text>Γ</text></view></block>  
383 - <block wx:else><view class="circle xc-hooks on"></view></block>  
384 - </view>  
385 - <include src="remark_click_part.wxml" />  
386 - </view>  
387 - </view>  
388 - </view>  
389 - <!-- 打开是说明 --> 501 + <!-- 锯齿 -->
  502 + <include src="juchi_part.wxml" />
  503 + <!-- 左边 -->
  504 + <view class="coupon-left rel {{filter.setcolor(item.UseObjectType)}} flex-center">
  505 + <view class="white xc-money-frames">
  506 + <view class="f_text"><text class="xc-rmb-val">包邮券</text></view>
  507 + <view class="coupon-explain t-c" wx:if="{{item.condition>0}}">满{{item.condition}}元可用</view>
  508 + <view class="coupon-explain t-c" wx:else>满0元可用</view>
  509 + </view>
  510 + </view>
  511 + <!-- 右边 -->
  512 + <view class="coupon-right flex-center rel">
  513 + <view class="coupon-annotation flex">
  514 + <view class="flex top-frame">
  515 + <view class="frame">
  516 + <view class="coupon-wode ib flex ellipsis-2 ">
  517 + <text class="xc-brand t-c ib white {{filter.setcolor(item.UseObjectType)}}">{{filter.get_type_card(0)}}</text>
  518 + <block>包邮券</block>
  519 + </view>
  520 + <view class="coupon-time">{{filters.format_time(item.use_start_time)}}至{{item.use_end_time?filters.format_time(item.use_end_time):'不限'}}</view>
  521 + </view>
  522 + </view>
  523 + <block wx:if="{{item.show_red}}">
  524 + <view class="circle white xc-hook fs20 red-b sn"><text>Γ</text></view>
  525 + </block>
  526 + <block wx:else>
  527 + <view class="circle xc-hooks on"></view>
  528 + </block>
  529 + </view>
  530 + <include src="remark_click_part2.wxml" />
  531 + </view>
  532 + </view>
  533 + </view>
  534 + <!-- 打开是说明 -->
390 <include src="remark_part.wxml" /> 535 <include src="remark_part.wxml" />
391 - </view>  
392 - <!-- 包邮券的显示,立即购买 -->  
393 - <block wx:if="{{ is_b_now && bn_exp_type==0}}">  
394 - <view wx:for="{{get_by_quan_list}}" bindtap="sele_quan_item_by" wx:if="{{!item.is_using}}" data-ind="{{byq_index}}" wx:for-item="item" wx:for-index="byq_index">  
395 - <view class="xc-coupon-frame flex-center" data-ind="{{byq_index}}">  
396 - <view class="coupon-frame flex rel">  
397 - <!-- 锯齿 -->  
398 - <include src="juchi_part.wxml" />  
399 - <!-- 左边 -->  
400 - <view class="coupon-left rel {{filter.setcolor(item.UseObjectType)}} flex-center">  
401 - <view class="white xc-money-frames">  
402 - <view class="f_text"><text class="xc-rmb-val">包邮券</text></view>  
403 - <view class="coupon-explain t-c" wx:if="{{item.condition>0}}">满{{item.condition}}元可用</view>  
404 - <view class="coupon-explain t-c" wx:else>满0元可用</view>  
405 - </view>  
406 - </view>  
407 - <!-- 右边 -->  
408 - <view class="coupon-right flex-center rel">  
409 - <view class="coupon-annotation flex">  
410 - <view class="flex top-frame">  
411 - <view class="frame">  
412 - <view class="coupon-wode ib flex ellipsis-2 ">  
413 - <text class="xc-brand t-c ib white {{filter.setcolor(item.UseObjectType)}}">{{filter.get_type_card(0)}}</text>  
414 - <block>包邮券</block>  
415 - </view>  
416 - <view class="coupon-time">{{filters.format_time(item.use_start_time)}}至{{item.use_end_time?filters.format_time(item.use_end_time):'不限'}}</view>  
417 - </view>  
418 - </view>  
419 - <block wx:if="{{item.show_red}}"><view class="circle white xc-hook fs20 red-b sn"><text>Γ</text></view></block>  
420 - <block wx:else><view class="circle xc-hooks on"></view></block>  
421 - </view>  
422 - <include src="remark_click_part2.wxml" />  
423 - </view>  
424 - </view>  
425 - </view>  
426 - <!-- 打开是说明 -->  
427 - <include src="remark_part.wxml" />  
428 - </view>  
429 - </block>  
430 -  
431 - <!-- 包邮券的显示,购物车购买 -->  
432 - <block wx:if="{{!is_b_now && sele_exp_type==0}}">  
433 - <view wx:for="{{by_quan_list_cart}}" bindtap="sele_quan_item_by" wx:if="{{!item.is_using}}" data-ind="{{byq_index}}" wx:for-item="item" wx:for-index="byq_index">  
434 - <view class="xc-coupon-frame flex-center" data-ind="{{byq_index}}">  
435 - <view class="coupon-frame flex rel">  
436 - <!-- 锯齿 -->  
437 - <include src="juchi_part.wxml" />  
438 - <!-- 左边 -->  
439 - <view class="coupon-left rel {{filter.setcolor(item.UseObjectType)}} flex-center">  
440 - <view class="white xc-money-frames">  
441 - <view class="f_text"><text class="xc-rmb-val">包邮券</text></view>  
442 - <view class="coupon-explain t-c" wx:if="{{item.condition>0}}">满{{item.condition}}元可用</view>  
443 - <view class="coupon-explain t-c" wx:else>满0元可用</view>  
444 - </view>  
445 - </view>  
446 - <!-- 右边 -->  
447 - <view class="coupon-right flex-center rel">  
448 - <view class="coupon-annotation flex">  
449 - <view class="flex top-frame">  
450 - <view class="frame">  
451 - <view class="coupon-wode ib flex ellipsis-2 ">  
452 - <text class="xc-brand t-c ib white {{filter.setcolor(item.UseObjectType)}}">{{filter.get_type_card(0)}}</text>  
453 - <block>包邮券</block>  
454 - </view>  
455 - <view class="coupon-time">{{filters.format_time(item.use_start_time)}}至{{item.use_end_time?filters.format_time(item.use_end_time):'不限'}}</view>  
456 - </view>  
457 - </view>  
458 - <block wx:if="{{item.show_red}}"><view class="circle white xc-hook fs20 red-b sn"><text>Γ</text></view></block>  
459 - <block wx:else><view class="circle xc-hooks on"></view></block>  
460 - </view>  
461 - <include src="remark_click_part2.wxml" />  
462 - </view>  
463 - </view>  
464 - </view>  
465 - <!-- 打开是说明 -->  
466 - <include src="remark_part.wxml" />  
467 - </view>  
468 - </block>  
469 -  
470 -  
471 - </view>  
472 - </view>  
473 - <!-- 最底下确定层-->  
474 - <view class="determine-frame"><view class="xc-confirm flex-center" bindtap="confirm_quan"> 确定 </view></view>  
475 - </view> 536 + </view>
  537 + </block>
  538 +
  539 +
  540 + </view>
  541 + </view>
  542 + <!-- 最底下确定层-->
  543 + <view class="determine-frame">
  544 + <view class="xc-confirm flex-center" bindtap="confirm_quan"> 确定 </view>
  545 + </view>
  546 + </view>
476 </view> 547 </view>
477 <!----弹起选择物流名的列表----> 548 <!----弹起选择物流名的列表---->
478 -<view wx:if='{{open_express==1}}' >  
479 - <view class="cover-layer flex-center " bindtap='close_express'>  
480 - </view>  
481 -  
482 - <view class="cx-popup radius {{open_express==1?'up' : 'down'}}" >  
483 - <view class="tops flex">  
484 - <view class="top-content fs32">  
485 - <view>选择物流名字</view>  
486 - </view>  
487 - <view class="close-frame" bindtap='close_express' >  
488 - <view class="xc-close-express">×</view>  
489 - </view>  
490 - </view>  
491 - <view class="express_list">  
492 - <view wx:for="{{wu_arr}}" wx:for-item="express_list" wx:for-index="idx">  
493 - <view class="express_list_frame" bindtap="click_express_name"  
494 - data-shippingcode="{{express_list.shipping_code}}"  
495 - data-name="{{express_list.name}}" data-idxe="{{idx}}">  
496 -  
497 - <block wx:if="{{is_express==idx}}">  
498 - <view class="circle white xc-hook fs20 red-b"><text>Γ</text></view>  
499 - </block>  
500 - <block wx:else>  
501 - <view class="circle xc-hooks"></view>  
502 - </block>  
503 - <view class="fs30">{{express_list.name}}</view>  
504 -  
505 - </view> 549 +<view wx:if='{{open_express==1}}'>
  550 + <view class="cover-layer flex-center " bindtap='close_express'>
  551 + </view>
  552 +
  553 + <view class="cx-popup radius {{open_express==1?'up' : 'down'}}">
  554 + <view class="tops flex">
  555 + <view class="top-content fs32">
  556 + <view>选择物流名字</view>
  557 + </view>
  558 + <view class="close-frame" bindtap='close_express'>
  559 + <view class="xc-close-express">×</view>
  560 + </view>
  561 + </view>
  562 + <view class="express_list">
  563 + <view wx:for="{{wu_arr}}" wx:for-item="express_list" wx:for-index="idx">
  564 + <view class="express_list_frame" bindtap="click_express_name" data-shippingcode="{{express_list.shipping_code}}"
  565 + data-name="{{express_list.name}}" data-idxe="{{idx}}">
  566 +
  567 + <block wx:if="{{is_express==idx}}">
  568 + <view class="circle white xc-hook fs20 red-b"><text>Γ</text></view>
  569 + </block>
  570 + <block wx:else>
  571 + <view class="circle xc-hooks"></view>
  572 + </block>
  573 + <view class="fs30">{{express_list.name}}</view>
  574 +
506 </view> 575 </view>
507 </view> 576 </view>
508 - <view class="flex click-buttem" >  
509 - <view class="xc-determine flex-center" bindtap="determine_expres">  
510 - <view class="flex-vertical t-c">确定</view>  
511 - </view>  
512 - <view class="xc-confirms flex-center" bindtap="select_default_logistics">  
513 - <view class="flex-vertical t-c">设为默认</view>  
514 - </view>  
515 - </view>  
516 -  
517 - </view > 577 + </view>
  578 + <view class="flex click-buttem">
  579 + <view class="xc-determine flex-center" bindtap="determine_expres">
  580 + <view class="flex-vertical t-c">确定</view>
  581 + </view>
  582 + <view class="xc-confirms flex-center" bindtap="select_default_logistics">
  583 + <view class="flex-vertical t-c">设为默认</view>
  584 + </view>
  585 + </view>
  586 +
  587 + </view>
518 </view> 588 </view>
519 589
520 -<warn id="warn"></warn>  
521 \ No newline at end of file 590 \ No newline at end of file
  591 +<warn id="warn"></warn>
pages/cart/cart2/cart2.wxss
  1 +.bdr_t-14 {
  2 + border-top-left-radius: 14rpx;
  3 + border-top-right-radius: 14rpx;
  4 +}
  5 +.bdr_b-14 {
  6 + border-bottom-left-radius: 14rpx;
  7 + border-bottom-right-radius: 14rpx;
  8 +}
  9 +.bdr14 {
  10 + border-radius: 14rpx;
  11 +}
  12 +.mgt20 {
  13 + margin-top: 20rpx;
  14 +}
  15 +.shadow {
  16 + box-shadow: 0 4rpx 12px #e7e9eb;
  17 +}
  18 +.shadow-1 {
  19 + box-shadow: 16rpx 0px 12px #e7e9eb;
  20 +}
  21 +
  22 +
  23 +page {
  24 + /* background-color: #FAFAFA; */
  25 + background-color: #F0F0F0;
  26 + padding: 0 22rpx;
  27 + box-sizing: border-box;
  28 +}
  29 +.container {
  30 + background-color: #F0F0F0;
  31 + /* padding-top: 28rpx; */
  32 + padding-bottom: 120rpx;
  33 +}
1 .user-mes { 34 .user-mes {
2 position: relative; 35 position: relative;
3 background-color: #fff; 36 background-color: #fff;
4 font-size: 32rpx; 37 font-size: 32rpx;
5 color: #444; 38 color: #444;
  39 + /* margin-top: 28rpx; */
  40 + border-radius: 14rpx;
6 } 41 }
7 .user-contact { 42 .user-contact {
8 - padding: 24rpx 70rpx; 43 + padding: 24rpx 26rpx;
9 font-weight: 600; 44 font-weight: 600;
10 } 45 }
11 46
@@ -16,10 +51,10 @@ @@ -16,10 +51,10 @@
16 51
17 .pos-icon { 52 .pos-icon {
18 position: absolute; 53 position: absolute;
19 - left: 22rpx;  
20 - top: 9rpx;  
21 - width: 32rpx;  
22 - height: 37.5rpx; 54 + left: 28rpx;
  55 + top: 6rpx;
  56 + width: 30rpx;
  57 + height: 36rpx;
23 } 58 }
24 59
25 .border-img { 60 .border-img {
@@ -32,7 +67,7 @@ @@ -32,7 +67,7 @@
32 right: 0; 67 right: 0;
33 top: 0; 68 top: 0;
34 width: 80rpx; 69 width: 80rpx;
35 - height: 148rpx; 70 + height: 100%;
36 display: flex; 71 display: flex;
37 align-items: center; 72 align-items: center;
38 justify-content: center; 73 justify-content: center;
@@ -51,7 +86,7 @@ @@ -51,7 +86,7 @@
51 86
52 .order-detail { 87 .order-detail {
53 padding: 30rpx 0; 88 padding: 30rpx 0;
54 - border-bottom: 6rpx solid #eee; 89 + border-bottom: 2rpx solid #eee;
55 color: #777; 90 color: #777;
56 min-height: 190rpx; 91 min-height: 190rpx;
57 background-color: #fff; 92 background-color: #fff;
@@ -60,8 +95,8 @@ @@ -60,8 +95,8 @@
60 95
61 .goods-img { 96 .goods-img {
62 float: left; 97 float: left;
63 - width: 191rpx;  
64 - height: 191rpx; 98 + width: 200rpx;
  99 + height: 200rpx;
65 margin: 0 20rpx; 100 margin: 0 20rpx;
66 } 101 }
67 102
@@ -90,22 +125,33 @@ @@ -90,22 +125,33 @@
90 line-height: 42rpx; 125 line-height: 42rpx;
91 } 126 }
92 127
93 -.set-mes{background-color: #fff; } 128 +.set-mes{
  129 + background-color: #fff;
  130 + /* margin-top: 20rpx; */
  131 +}
94 .use-item{ 132 .use-item{
95 display: flex; 133 display: flex;
96 align-items: center; 134 align-items: center;
97 height: 80rpx; 135 height: 80rpx;
98 - border-bottom: 1px solid #ddd; 136 + /* border-bottom: 1px solid #ddd; */
99 font-size: 30rpx; 137 font-size: 30rpx;
100 - width:95%;  
101 -margin:auto;  
102 - 138 + /* width:95%;
  139 +margin:auto; */
  140 + padding: 0 26rpx;
103 } 141 }
104 .use-item>view{ 142 .use-item>view{
105 - display: flex;margin-right: 12rpx; 143 + display: flex;
  144 + /* margin-right: 12rpx; */
  145 +}
  146 +.use-item.bfff{
  147 + background-color: #fff;
  148 +}
  149 +.use-item .dp{
  150 + display: block;
  151 + width: 50rpx;
  152 + height: 50rpx;
  153 + margin-left: -6rpx;
106 } 154 }
107 -.use-item.bfff{ background-color: #fff;}  
108 -.use-item .dp{width: 56rpx; height: 56rpx; margin-left: -5rpx}  
109 155
110 .set-item { 156 .set-item {
111 justify-content: space-between; 157 justify-content: space-between;
@@ -135,14 +181,16 @@ margin:auto; @@ -135,14 +181,16 @@ margin:auto;
135 } 181 }
136 182
137 .coupon-mes { 183 .coupon-mes {
  184 + /* box-sizing: border-box; */
138 height:95rpx; 185 height:95rpx;
139 - padding: 0 20rpx; 186 + padding: 0 26rpx;
140 background-color: #fff; 187 background-color: #fff;
141 font-size: 30rpx; 188 font-size: 30rpx;
142 color: #444; 189 color: #444;
143 - width: 100%;  
144 -  
145 - 190 + /* width: 100%; */
  191 + border-radius: 14rpx;
  192 + margin-top: 20rpx;
  193 + margin-bottom: 20rpx;
146 } 194 }
147 195
148 .coupon-title { 196 .coupon-title {
@@ -169,15 +217,14 @@ margin:auto; @@ -169,15 +217,14 @@ margin:auto;
169 217
170 .leave-word { 218 .leave-word {
171 position: relative; 219 position: relative;
172 -  
173 font-size: 24rpx; 220 font-size: 24rpx;
174 margin-left: 20rpx; 221 margin-left: 20rpx;
175 - 222 + flex-grow: 1;
176 } 223 }
177 224
178 .word-box { 225 .word-box {
179 -  
180 - width: 600rpx; 226 + font-size: 26rpx;
  227 + /* width: 600rpx; */
181 padding: 10rpx; 228 padding: 10rpx;
182 height: 28rpx; 229 height: 28rpx;
183 line-height: 40rpx; 230 line-height: 40rpx;
@@ -190,9 +237,9 @@ margin:auto; @@ -190,9 +237,9 @@ margin:auto;
190 } 237 }
191 238
192 .information { 239 .information {
193 - padding: 0 20rpx; 240 + padding: 0 26rpx;
194 background-color: #fff; 241 background-color: #fff;
195 - margin-bottom: 120rpx; 242 + /* margin-bottom: 120rpx; */
196 } 243 }
197 244
198 .information .item { 245 .information .item {
@@ -205,36 +252,50 @@ margin:auto; @@ -205,36 +252,50 @@ margin:auto;
205 } 252 }
206 253
207 .btn-wrap { 254 .btn-wrap {
208 - height: 100rpx; width: 100%;  
209 - background-color: #fff;  
210 - position: fixed; bottom: 0;left: 0;  
211 - border-top:1rpx solid #dee;  
212 - z-index:9999 255 + height: 94rpx;
  256 + box-sizing: border-box;
  257 + display: flex;
  258 + justify-content: space-between;
  259 + background-color: white;
  260 + align-items: center;
  261 + position: fixed;
  262 + bottom: 0;
  263 + left: 0;
  264 + width: 100%;
  265 + padding: 0 30rpx;
213 } 266 }
214 267
215 .tips-btn { 268 .tips-btn {
216 - float: right; 269 + /* float: right;
217 width: 200rpx; 270 width: 200rpx;
218 height: 100rpx; 271 height: 100rpx;
219 line-height: 100rpx; 272 line-height: 100rpx;
220 text-align: center; 273 text-align: center;
221 font-size: 30rpx; 274 font-size: 30rpx;
222 color: #fff; 275 color: #fff;
223 - background-color: #f23030; 276 + background-color: #f23030; */
  277 + color: white;
  278 + background-color: #FE4445;
  279 + height: 72rpx;
  280 + line-height: 72rpx;
  281 + padding: 0 42rpx;
  282 + border-radius: 36rpx;
  283 + margin-left: 0;
  284 + margin-right: 0;
224 } 285 }
225 286
226 .pay-amount { 287 .pay-amount {
227 - float: right; 288 + /* float: right;
228 display: flex; 289 display: flex;
229 align-items: center; 290 align-items: center;
230 height: 100rpx; 291 height: 100rpx;
231 font-size: 26rpx; 292 font-size: 26rpx;
232 - margin-right: 40rpx; 293 + margin-right: 40rpx; */
233 } 294 }
234 295
235 .payable { 296 .payable {
236 color: #444; 297 color: #444;
237 - margin-right: 20rpx; 298 + /* margin-right: 20rpx; */
238 } 299 }
239 300
240 .shipping-modal { 301 .shipping-modal {
@@ -274,10 +335,19 @@ margin:auto; @@ -274,10 +335,19 @@ margin:auto;
274 } 335 }
275 336
276 /*----------nyf新增,地址---------*/ 337 /*----------nyf新增,地址---------*/
277 -.add_new{height: 60rpx; line-height: 60rpx;} 338 +.add_new{
  339 + height: 90rpx;
  340 + display: flex;
  341 + align-items: center;
  342 + padding: 0 26rpx;
  343 +}
278 .addr_jia{width: 45rpx; height: 45rpx; border: 1rpx solid #ddd; 344 .addr_jia{width: 45rpx; height: 45rpx; border: 1rpx solid #ddd;
279 - margin-right: 15rpx; margin-left: 20rpx; vertical-align: middle;}  
280 -.yu_er{margin-left: 10rpx;margin-right: 60rpx;} .wuliu{margin-left: 20rpx;} 345 + margin-right: 15rpx;vertical-align: middle;}
  346 +.yu_er{
  347 + margin-left: 10rpx;
  348 + /* margin-right: 60rpx; */
  349 +}
  350 +.wuliu{margin-left: 20rpx;}
281 351
282 352
283 /*---- 优惠券列表 -----*/ 353 /*---- 优惠券列表 -----*/
@@ -290,8 +360,8 @@ margin:auto; @@ -290,8 +360,8 @@ margin:auto;
290 width: 100%; 360 width: 100%;
291 height: 100%; 361 height: 100%;
292 border-bottom:3rpx solid #eee; 362 border-bottom:3rpx solid #eee;
293 -  
294 - 363 + padding: 0 26rpx;
  364 + background-color: white;
295 } 365 }
296 .xc-right{ 366 .xc-right{
297 width:20rpx; 367 width:20rpx;
@@ -300,7 +370,6 @@ margin:auto; @@ -300,7 +370,6 @@ margin:auto;
300 border-right:2rpx solid #000; 370 border-right:2rpx solid #000;
301 transform:rotate(45deg); 371 transform:rotate(45deg);
302 display:inline-block; 372 display:inline-block;
303 -  
304 } 373 }
305 374
306 .xc-coupon-frame .work-frame .work{ font-size: 30rpx; line-height: 92rpx; } 375 .xc-coupon-frame .work-frame .work{ font-size: 30rpx; line-height: 92rpx; }
@@ -309,15 +378,15 @@ margin:auto; @@ -309,15 +378,15 @@ margin:auto;
309 /* 自定义弹出窗口 */ 378 /* 自定义弹出窗口 */
310 .cx-popup{ 379 .cx-popup{
311 width:100%; 380 width:100%;
312 - height:920rpx; 381 + height:880rpx;
313 background: #fff; 382 background: #fff;
314 z-index: 35; 383 z-index: 35;
315 border-top-left-radius: 20rpx; 384 border-top-left-radius: 20rpx;
316 border-top-right-radius: 20rpx; 385 border-top-right-radius: 20rpx;
317 position:fixed; 386 position:fixed;
318 bottom:0; 387 bottom:0;
319 - padding-bottom: 25rpx;  
320 - 388 + left: 0;
  389 + /* padding-bottom: 25rpx; */
321 } 390 }
322 391
323 .cx-popup .top{ 392 .cx-popup .top{
@@ -431,9 +500,9 @@ color: #333; @@ -431,9 +500,9 @@ color: #333;
431 } 500 }
432 501
433 .xc-confirm { 502 .xc-confirm {
434 - width: 48%; 503 + width: 50%;
435 border-radius: 50rpx; 504 border-radius: 50rpx;
436 - height: 50rpx; 505 + height: 80rpx;
437 margin:0 auto; 506 margin:0 auto;
438 background:#d60021; 507 background:#d60021;
439 color:#fff; 508 color:#fff;
@@ -509,31 +578,32 @@ border-bottom: 1rpx solid #eee; @@ -509,31 +578,32 @@ border-bottom: 1rpx solid #eee;
509 width: 100%; 578 width: 100%;
510 height: 65%; 579 height: 65%;
511 overflow-y: auto; 580 overflow-y: auto;
512 - margin-bottom: 10rpx; 581 + margin-bottom: 40rpx;
513 582
514 } 583 }
515 .xc-confirms { 584 .xc-confirms {
516 - width: 40%;  
517 - border-radius: 50rpx;  
518 - height: 55rpx;  
519 - margin:0 auto;  
520 - font-size:28rpx;  
521 - background: #fff;  
522 - color: #333;  
523 - border: 2rpx solid #333;  
524 - 585 + box-sizing: border-box;
  586 + width: 40%;
  587 + border-radius: 50rpx;
  588 + height: 80rpx;
  589 + margin:0 auto;
  590 + font-size:28rpx;
  591 + background: #fff;
  592 + color: #333;
  593 + border: 2rpx solid #333;
525 } 594 }
526 595
527 596
528 /* 优惠券的改版样式 */ 597 /* 优惠券的改版样式 */
529 .xc-coupon-frame{ 598 .xc-coupon-frame{
530 - width: 710rpx; 599 + /* width: 710rpx; */
  600 + width: 100%;
531 height:auto; 601 height:auto;
532 margin: 0 auto; 602 margin: 0 auto;
533 603
534 } 604 }
535 .xc-coupon-frame .coupon-frame{ 605 .xc-coupon-frame .coupon-frame{
536 - width: 99%; 606 + width: 100%;
537 height: 200rpx; 607 height: 200rpx;
538 margin-top:10rpx; 608 margin-top:10rpx;
539 border-bottom: 1rpx solid #eee; 609 border-bottom: 1rpx solid #eee;
@@ -577,12 +647,12 @@ width:100%; @@ -577,12 +647,12 @@ width:100%;
577 top:-37rpx; 647 top:-37rpx;
578 } 648 }
579 .coupon-right{ 649 .coupon-right{
580 - width:490rpx; 650 + /* width:490rpx; */
581 height: 99%; 651 height: 99%;
582 border-top: 1rpx solid #eaeaea; 652 border-top: 1rpx solid #eaeaea;
583 /* //border-bottom: 1rpx solid #eaeaea; */ 653 /* //border-bottom: 1rpx solid #eaeaea; */
584 border-right: 1rpx solid #eaeaea; 654 border-right: 1rpx solid #eaeaea;
585 - 655 + flex-grow: 1;
586 } 656 }
587 .coupon-annotation{ 657 .coupon-annotation{
588 width: 95%; 658 width: 95%;
@@ -672,15 +742,15 @@ align-items: center; @@ -672,15 +742,15 @@ align-items: center;
672 width: 24rpx; 742 width: 24rpx;
673 } 743 }
674 .xc-buttom{ 744 .xc-buttom{
675 - width:99%;  
676 -min-height:76rpx;  
677 -height:auto;  
678 -line-height:40rpx;  
679 -border-left:1rpx solid #eee;  
680 -border-right:1rpx solid #eee;  
681 -border-bottom:1rpx solid #eee;  
682 -margin-left: 6rpx;  
683 - 745 + box-sizing: border-box;
  746 + width:100%;
  747 + min-height:76rpx;
  748 + height:auto;
  749 + line-height:40rpx;
  750 + border-left:1rpx solid #eee;
  751 + border-right:1rpx solid #eee;
  752 + border-bottom:1rpx solid #eee;
  753 +/* margin-left: 6rpx; */
684 } 754 }
685 755
686 .goods-num{ 756 .goods-num{
@@ -726,10 +796,12 @@ width:42rpx; @@ -726,10 +796,12 @@ width:42rpx;
726 height:42rpx; 796 height:42rpx;
727 } 797 }
728 .may_use_coupon{ 798 .may_use_coupon{
729 - width: 95%;  
730 - height: 68rpx; 799 + /* width: 95%; */
  800 + /* height: 68rpx; */
731 line-height:78rpx; 801 line-height:78rpx;
732 - margin: auto; 802 + padding: 0 26rpx;
  803 + justify-content: space-between;
  804 + align-items: center;
733 } 805 }
734 .determine-frame{ 806 .determine-frame{
735 width: 100%; 807 width: 100%;
@@ -737,7 +809,7 @@ height:42rpx; @@ -737,7 +809,7 @@ height:42rpx;
737 809
738 } 810 }
739 .xc-determine{ 811 .xc-determine{
740 - height: 55rpx; 812 + height: 80rpx;
741 width: 40%; 813 width: 40%;
742 border-radius: 50rpx; 814 border-radius: 50rpx;
743 background: #d60021; 815 background: #d60021;
@@ -821,4 +893,68 @@ margin-left: 20rpx; @@ -821,4 +893,68 @@ margin-left: 20rpx;
821 .n_guige{ display: inline-block; background:rgb(236, 236, 236); color: rgb(63,63,63); padding: 3rpx 10rpx; border-radius: 3rpx } 893 .n_guige{ display: inline-block; background:rgb(236, 236, 236); color: rgb(63,63,63); padding: 3rpx 10rpx; border-radius: 3rpx }
822 .gift_image{ width: 60rpx; height: 60rpx; position: absolute; top: 0; left: 0} 894 .gift_image{ width: 60rpx; height: 60rpx; position: absolute; top: 0; left: 0}
823 895
824 -.quan_num_show{ padding: 6rpx 10rpx; background-color:#ea5551; color:#fff; border-radius: 6rpx }  
825 \ No newline at end of file 896 \ No newline at end of file
  897 +.quan_num_show{ padding: 4rpx 6rpx; background-color:#ea5551; color:#fff; border-radius: 6rpx;margin-left:10rpx;font-size:24rpx;}
  898 +
  899 +.navigator-hover {
  900 + background: none;
  901 + opacity: 1;
  902 +}
  903 +
  904 +
  905 +.plus_buy{
  906 + background-color: #fff;
  907 + margin:15rpx 0;
  908 + padding: 20rpx 10rpx;
  909 + position: relative;
  910 +}
  911 +
  912 +
  913 +.card_bg {
  914 + box-sizing: border-box;
  915 + padding: 2rpx 10rpx;
  916 + height: 28rpx;
  917 + border-radius: 26rpx;
  918 + font-size: 18rpx;
  919 + line-height: 28rpx;
  920 + max-width: 210rpx;
  921 + background: #333;
  922 + color: #fff;
  923 + margin-left: 8rpx;
  924 + position:relative;
  925 + top:7rpx;
  926 +}
  927 +
  928 +.card_bg image {
  929 + width: 19rpx;
  930 + height: 19rpx;
  931 + margin-right: 8rpx;
  932 +}
  933 +
  934 +/* .card_bg .card_name {
  935 + max-width: 76rpx;
  936 + width: auto;
  937 + overflow: hidden;
  938 + white-space: nowrap;
  939 +} */
  940 +
  941 +.card_name {
  942 + position: relative;
  943 + top: -4rpx;
  944 + margin-left: 6px;
  945 +}
  946 +
  947 +.car_tri_up {
  948 + width: 0;height: 0;
  949 + border-left: 20rpx solid transparent;
  950 + border-right: 20rpx solid transparent;
  951 + border-bottom: 20rpx solid #fff;
  952 + position: absolute;
  953 + right: 20rpx;
  954 + top:-10rpx
  955 +}
  956 +.card_op{
  957 + position: absolute;
  958 + right: 20rpx;
  959 + top:36rpx
  960 +}
  961 +
pages/cart/cart2_pt/cart2_pt.js
1 var t = getApp(),app=t, a = t.request, e = require("../../../utils/common.js"), 1 var t = getApp(),app=t, a = t.request, e = require("../../../utils/common.js"),
2 s = require("../../../utils/util.js"), o = require("../../../utils/md5.js"), to = getApp(); 2 s = require("../../../utils/util.js"), o = require("../../../utils/md5.js"), to = getApp();
3 -var oo=t.globalData.setting; 3 +var oo=t.globalData.setting,os=oo;
4 var regeneratorRuntime = require('../../../utils/runtime.js'); 4 var regeneratorRuntime = require('../../../utils/runtime.js');
5 var util_pay = require("../../../utils/pay.js"); 5 var util_pay = require("../../../utils/pay.js");
6 6
@@ -58,6 +58,11 @@ Page({ @@ -58,6 +58,11 @@ Page({
58 is_normal:0, 58 is_normal:0,
59 is_express:0,//选择物流的控制器 59 is_express:0,//选择物流的控制器
60 yuer:0, 60 yuer:0,
  61 +
  62 + rank_switch:0, //是不是开同等级卡
  63 + show_card:null, //显示的等级卡
  64 + card_name:'', //显示的卡的名称
  65 + card_cut_price:null,//减价多少钱
61 }, 66 },
62 onLoad: function(t) { 67 onLoad: function(t) {
63 console.log("onLoad_pt_cart"); 68 console.log("onLoad_pt_cart");
@@ -75,7 +80,7 @@ Page({ @@ -75,7 +80,7 @@ Page({
75 if(appD.is_pt_tz) th.data.is_pt_tz=appD.is_pt_tz; 80 if(appD.is_pt_tz) th.data.is_pt_tz=appD.is_pt_tz;
76 th.data.param=t; 81 th.data.param=t;
77 //先获取物流,再获取用户信息,再展示页面 82 //先获取物流,再获取用户信息,再展示页面
78 - th.get_wuliu(th.get_info(th.show_page)); 83 + //th.get_wuliu(th.get_info(th.show_page));
79 }, 84 },
80 onUnload: function () { this.setData({ isclose: 1 })}, 85 onUnload: function () { this.setData({ isclose: 1 })},
81 86
@@ -178,6 +183,25 @@ Page({ @@ -178,6 +183,25 @@ Page({
178 t.data.data.prom_id = 0; 183 t.data.data.prom_id = 0;
179 t.data.data.prom_type = 0; 184 t.data.data.prom_type = 0;
180 t.data.data.is_normal=1; 185 t.data.data.is_normal=1;
  186 +
  187 + var gd=t.data.data;
  188 + //-- 用商品的手店价来显示 --
  189 + gg.goods_price=gd.shop_price;
  190 + //---是不是购买等级卡成功的返回---等级卡显示的判断---
  191 + var is_card_back=getApp().globalData.is_card_back;
  192 + if(is_card_back){
  193 + gg.goods_price=gd[th.data.card_name];
  194 + t.data.data.shop_price=gg.goods_price;
  195 + getApp().globalData.is_card_back=0;
  196 + th.setData({card_cut_price:0});
  197 + }else{
  198 + //--- 商品不能是搭配购,商家等级卡开通的情况下, 会员不是等级会员的情况, 商品有设置等级卡价格,同时等级卡价格小于商品的价格
  199 + if(th.data.card_name && gd[th.data.card_name]>0 && gg.goods_price>gd[th.data.card_name] && !th.data.userinfo.card_field){
  200 + var cut_p= gg.goods_price-gd[th.data.card_name];
  201 + th.setData({card_cut_price:cut_p});
  202 + }
  203 + }
  204 +
181 th.setData({ 205 th.setData({
182 bn_goods: t.data.data, bn_pickname: gg.pick_name, bn_exp_type: et, 206 bn_goods: t.data.data, bn_pickname: gg.pick_name, bn_exp_type: et,
183 bn_pick: gg.pick_id, bn_t_exp_t: distr_t, is_normal:1 207 bn_pick: gg.pick_id, bn_t_exp_t: distr_t, is_normal:1
@@ -244,6 +268,56 @@ Page({ @@ -244,6 +268,56 @@ Page({
244 getApp().globalData.is_cart2_old=0; 268 getApp().globalData.is_cart2_old=0;
245 } 269 }
246 } 270 }
  271 +
  272 + //先获取是否有关闭使用优惠券
  273 + getApp().getConfig2(function (ee) {
  274 + var json_d = JSON.parse(ee.switch_list);
  275 + th.data.ispt_goods=json_d.ispt_goods; //是不是平摊到单品的控制参数赋值
  276 + th.setData({ is_close_quan: json_d.is_close_quan,sales_rules:ee.sales_rules,rank_switch:json_d.rank_switch});
  277 +
  278 + var rank_switch=json_d.rank_switch;
  279 + var max_price=-1;
  280 + var show_card=null;
  281 + var name="";
  282 + //如果有开等级卡的时候,
  283 + //因为都是调接口,要返回在计算
  284 + if(rank_switch==2){
  285 + //-- 获取所有的等级卡, --
  286 + getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?storeId=" + os.stoid,
  287 + {}).then(res => {
  288 + if(res.data.code==0){
  289 + var plusCard = res.data.data;
  290 + //-- 循环判断,拿到最贵的那张卡 --
  291 + for(var ih in plusCard){
  292 + if(plusCard[ih].IsStopBuy == true){ continue; }
  293 + if(max_price<0){
  294 + max_price=plusCard[ih].CardFee;
  295 + name='card'+plusCard[ih]['CorrPrice'];
  296 + show_card=plusCard[ih];
  297 + }else{
  298 + if(max_price<plusCard[ih].CardFee){
  299 + max_price=plusCard[ih].CardFee;
  300 + name='card'+plusCard[ih]['CorrPrice'];
  301 + show_card=plusCard[ih];
  302 + }
  303 + }
  304 + }
  305 +
  306 + if(show_card){
  307 + name=name.toLowerCase();
  308 + th.setData({card_name:name,show_card:show_card})
  309 + }
  310 + }
  311 + //-----先获取物流,再获取用户信息,再展示页面-----
  312 + th.get_wuliu(th.get_info(th.show_page));
  313 + })
  314 + }else{
  315 + //-----先获取物流,再获取用户信息,再展示页面-----
  316 + th.get_wuliu(th.get_info(th.show_page));
  317 + }
  318 + })
  319 +
  320 +
247 }, 321 },
248 //---------------检查是否有收货地址------------------- 322 //---------------检查是否有收货地址-------------------
249 checkAddressList: function() { 323 checkAddressList: function() {
@@ -294,8 +368,8 @@ Page({ @@ -294,8 +368,8 @@ Page({
294 console.log('calculatePrice2222'); 368 console.log('calculatePrice2222');
295 console.log(rs); 369 console.log(rs);
296 var o_shipping_price = 0, goods_weight = -1, goods_piece = -1; 370 var o_shipping_price = 0, goods_weight = -1, goods_piece = -1;
297 - //-----------当地址不为空,且是物流时,计算物流费用----------  
298 - if (th.data.user_addr != null && th.data.bn_exp_type == 0 && good.is_free_shipping == 0 ){ 371 + //-----------当地址不为空,且是物流时,计算物流费用,同时阶梯团不计算拼团价格----------
  372 + if (th.data.user_addr != null && th.data.bn_exp_type == 0 && good.is_free_shipping == 0 && (th.data.kt_type!=3 || th.data.bn_goods.is_normal==1) ){
299 switch (good['exp_sum_type']) { 373 switch (good['exp_sum_type']) {
300 case 1: 374 case 1:
301 //统一运费 375 //统一运费
@@ -362,7 +436,8 @@ Page({ @@ -362,7 +436,8 @@ Page({
362 //------------立即购买------------- 436 //------------立即购买-------------
363 console.log("buy_new"); 437 console.log("buy_new");
364 438
365 - if(th.data.bn_exp_type == 0 && th.data.user_addr==null ){ 439 + //如果不是阶梯团,或者是普通购买,商家选择了物流,以及地址为空的时候
  440 + if(th.data.bn_exp_type == 0 && th.data.user_addr==null && (th.data.kt_type!=3 || th.data.bn_goods.is_normal==1) ){
366 ff = false; 441 ff = false;
367 getApp().my_warnning("请选择收货地址",0,this); 442 getApp().my_warnning("请选择收货地址",0,this);
368 this.data.is_summit_ing = 0; 443 this.data.is_summit_ing = 0;
@@ -375,7 +450,7 @@ Page({ @@ -375,7 +450,7 @@ Page({
375 console.log(th.data.wu_arr); 450 console.log(th.data.wu_arr);
376 console.log(th.data.bn_exp_type); 451 console.log(th.data.bn_exp_type);
377 452
378 - if(th.data.bn_exp_type==0) { 453 + if(th.data.bn_exp_type==0 && (th.data.kt_type!=3 || th.data.bn_goods.is_normal==1)) {
379 if (th.data.wu_arr == null || th.data.wu_arr.length <= 0) { 454 if (th.data.wu_arr == null || th.data.wu_arr.length <= 0) {
380 getApp().my_warnning("读取物流失败",0,this); 455 getApp().my_warnning("读取物流失败",0,this);
381 this.data.is_summit_ing = 0; 456 this.data.is_summit_ing = 0;
@@ -394,8 +469,6 @@ Page({ @@ -394,8 +469,6 @@ Page({
394 'more_address': addr == null ? "" : addr.more_address, 469 'more_address': addr == null ? "" : addr.more_address,
395 'mobile': th.data.userinfo.mobile, 470 'mobile': th.data.userinfo.mobile,
396 'email':'', 471 'email':'',
397 - 'shipping_code': th.data.bn_exp_type == 1 ? 0 : th.data.wu_arr[th.data.index].code,  
398 - 'shipping_name': th.data.bn_exp_type == 1 ? '' : th.data.wu_arr[th.data.index].name,  
399 'invoice_title':'', 472 'invoice_title':'',
400 'goods_price': th.data.formData.all_price, //商品总价 473 'goods_price': th.data.formData.all_price, //商品总价
401 'shipping_price': th.data.formData.shipping_price, //物流金额 474 'shipping_price': th.data.formData.shipping_price, //物流金额
@@ -411,10 +484,18 @@ Page({ @@ -411,10 +484,18 @@ Page({
411 'is_pt_tz':th.data.is_pt_tz, //开团类型 484 'is_pt_tz':th.data.is_pt_tz, //开团类型
412 'order_goods':new Array(), 485 'order_goods':new Array(),
413 }; 486 };
  487 +
  488 + //如果不是阶梯团,或者是普通购买,
  489 + if((th.data.kt_type!=3 || th.data.bn_goods.is_normal==1)){
  490 + item['shipping_code']= th.data.bn_exp_type == 1 ? 0 : th.data.wu_arr[th.data.index].code;
  491 + item['shipping_name']= th.data.bn_exp_type == 1 ? '' : th.data.wu_arr[th.data.index].name;
  492 + }
414 493
415 if(!th.data.bn_goods.is_normal){ 494 if(!th.data.bn_goods.is_normal){
416 item.is_zsorder=th.data.kt_type+1; //开团类型 495 item.is_zsorder=th.data.kt_type+1; //开团类型
417 } 496 }
  497 +
  498 +
418 499
419 if(th.data.qh!='') 500 if(th.data.qh!='')
420 { 501 {
@@ -454,7 +535,9 @@ Page({ @@ -454,7 +535,9 @@ Page({
454 item.room_ids=gg.room_id; 535 item.room_ids=gg.room_id;
455 goods.room_id=gg.room_id; 536 goods.room_id=gg.room_id;
456 } 537 }
457 - 538 +
  539 + if(th.data.bn_goods.is_normal){goods.is_pd_normal=1;}
  540 +
458 item.order_goods.push(goods); 541 item.order_goods.push(goods);
459 pdata.push(item); 542 pdata.push(item);
460 543
@@ -762,4 +845,10 @@ Page({ @@ -762,4 +845,10 @@ Page({
762 }) 845 })
763 }, 846 },
764 847
  848 +
  849 + //跳转到购买卡
  850 + buycard:function(){
  851 + getApp().goto("/pages/user/plus/plus");
  852 + getApp().globalData.plus_buy_back=1;
  853 + }
765 }); 854 });
pages/cart/cart2_pt/cart2_pt.wxml
@@ -2,14 +2,14 @@ @@ -2,14 +2,14 @@
2 <form bindsubmit="submitForm"> 2 <form bindsubmit="submitForm">
3 <view class="container"> 3 <view class="container">
4 <!--要进行判断地址是否显示----> 4 <!--要进行判断地址是否显示---->
5 - <view bindtap="enterAddressPage" class="user-mes" hidden='{{bn_exp_type==1 || kt_type==3}}'> 5 + <view bindtap="enterAddressPage" class="user-mes mgt20" hidden='{{bn_exp_type==1 || kt_type==3}}'>
6 <!---默认地址显示------> 6 <!---默认地址显示------>
7 <block wx:if="{{user_addr!=null}}"> 7 <block wx:if="{{user_addr!=null}}">
8 <view class="user-contact">收货人:{{user_addr.consignee}}{{'  '}}{{user_addr.mobile}}</view> 8 <view class="user-contact">收货人:{{user_addr.consignee}}{{'  '}}{{user_addr.mobile}}</view>
9 <view class="location"> 9 <view class="location">
10 <view class="address">{{user_addr.more_address}}{{' '}}{{user_addr.address}}</view> 10 <view class="address">{{user_addr.more_address}}{{' '}}{{user_addr.address}}</view>
11 <view class="pos-icon"> 11 <view class="pos-icon">
12 - <image class="wh100" src="{{imgUrl}}/miniapp/images/goodscategory/new_position.png"></image> 12 + <image class="wh100 bdr14" src="{{imgUrl}}/miniapp/images/goodscategory/new_position.png"></image>
13 </view> 13 </view>
14 </view> 14 </view>
15 <view class="update-logistics"> 15 <view class="update-logistics">
@@ -22,22 +22,22 @@ @@ -22,22 +22,22 @@
22 <image class="addr_jia" src="{{imgUrl}}/miniapp/images/jia.png"></image>添加地址 22 <image class="addr_jia" src="{{imgUrl}}/miniapp/images/jia.png"></image>添加地址
23 </view> 23 </view>
24 </block> 24 </block>
25 - <view class="border-img"><image class="wh100" src="{{imgUrl}}/miniapp/images/tt.png"></image></view> 25 + <!-- <view class="border-img"><image class="wh100 bdr14" src="{{imgUrl}}/miniapp/images/tt.png"></image></view> -->
26 </view> 26 </view>
27 27
28 28
29 <!------立即购买--------> 29 <!------立即购买-------->
30 <block> 30 <block>
31 - <view class="xc-border main-top"></view>  
32 - <view class="use-item bfff">  
33 - <image class="dp" src='{{imgUrl}}/miniapp/images/goodscategory/new_store.png'> </image> <view>门店:{{bn_pickname}}</view></view> 31 + <!-- <view class="xc-border main-top"></view> -->
  32 + <view class="use-item bfff bdr_t-14 mgt20">
  33 + <image class="dp" src='{{imgUrl}}/miniapp/images/goodscategory/new_store.png'> </image> <view>{{bn_pickname}}</view></view>
34 <view class="order-detail"> 34 <view class="order-detail">
35 <view class="goods-img"> 35 <view class="goods-img">
36 - <image class="wh100" src="{{bn_goods.original_img}}" 36 + <image class="wh100 bdr14" src="{{bn_goods.original_img}}"
37 binderror='cart_set_err' data-err="bn_goods.original_img"></image> 37 binderror='cart_set_err' data-err="bn_goods.original_img"></image>
38 </view> 38 </view>
39 <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{bn_goods.goods_id}}"> 39 <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{bn_goods.goods_id}}">
40 - <view class="goods-name">{{bn_goods.goods_name}}</view> 40 + <view class="goods-name ellipsis-2">{{bn_goods.goods_name}}</view>
41 <!-- 商品属性 --> 41 <!-- 商品属性 -->
42 <view class="flex-vertical fs28 color-gray n_guige"> 42 <view class="flex-vertical fs28 color-gray n_guige">
43 <view class="goods-color"><text>{{filters.show_gui_ge(bn_goods.goods_spec,bn_goods.goods_color)}}</text> 43 <view class="goods-color"><text>{{filters.show_gui_ge(bn_goods.goods_spec,bn_goods.goods_color)}}</text>
@@ -54,14 +54,34 @@ @@ -54,14 +54,34 @@
54 <view class="goods-num">x{{bn_goods.buynum}}</view> 54 <view class="goods-num">x{{bn_goods.buynum}}</view>
55 </view> --> 55 </view> -->
56 </view> 56 </view>
57 - <view class="set-mes"> 57 +
  58 + <!-- 如果是等级卡的商品,会员没有注册,要提醒注册 -->
  59 + <view class="plus_buy fs28" wx:if="{{card_cut_price>0}}">
  60 + <view class="flex">
  61 + <view class="card_bg ellipsis-1" style="margin-right: 10rpx;">
  62 + <image src="{{imgUrl}}/miniapp/images/plus/dj_icon.png"></ image>
  63 + <text class="card_name">{{show_card.CardName}}</text>
  64 + </view>
  65 + <view>立减 <text style="color:#f23030;">{{filters.toFix(card_cut_price,2) }}</text> 元</view>
  66 + </view>
  67 + <view>
  68 + <text style="color: #999;margin-left: 4rpx;">vip超级会员仅需{{show_card.CardFee}}元</text>
  69 + </view>
  70 + <!-- 三角形 -->
  71 + <view class="car_tri_up"></view>
  72 + <!-- 立即开通跳转 -->
  73 + <view bindtap="buycard" class="card_op">立即开通</view>
  74 + </view>
  75 +
  76 +
  77 + <view class="set-mes bdr_b-14">
58 <view wx:if="{{order.store_prom}}"><icon color="#f23030" size="16" type="info"></icon>{{order.store_prom}} 78 <view wx:if="{{order.store_prom}}"><icon color="#f23030" size="16" type="info"></icon>{{order.store_prom}}
59 </view> 79 </view>
60 80
61 <!--阶梯团是不显示的--> 81 <!--阶梯团是不显示的-->
62 <view class="use-item flex-space-between" wx:if="{{kt_type!=3 || is_normal==1}}"> 82 <view class="use-item flex-space-between" wx:if="{{kt_type!=3 || is_normal==1}}">
63 <view class="flex-vertical"> 83 <view class="flex-vertical">
64 - <view bindtap='setexptype' data-t='1' style="display:{{bn_t_exp_t==2?'none':'flex;align-items:center;'}};"> 84 + <view bindtap='setexptype' data-t='1' style="padding-right:26rpx;display:{{bn_t_exp_t==2?'none':'flex;align-items:center;'}}">
65 <!-- <icon color="{{bn_exp_type==1?'red':'gray'}}" size="16" type="success"></icon> --> 85 <!-- <icon color="{{bn_exp_type==1?'red':'gray'}}" size="16" type="success"></icon> -->
66 <block wx:if="{{bn_exp_type==1}}"> 86 <block wx:if="{{bn_exp_type==1}}">
67 87
@@ -70,9 +90,9 @@ @@ -70,9 +90,9 @@
70 <block wx:else> 90 <block wx:else>
71 <view class="circle xc-hookts on"></view> 91 <view class="circle xc-hookts on"></view>
72 </block> 92 </block>
73 - <view class="yu_er">自提</view> 93 + <view class="yu_er">门店自提</view>
74 </view> 94 </view>
75 - <view class="{{bn_t_exp_t==2?'':'xc-left'}}" bindtap='setexptype' data-t='0' style="display:{{bn_t_exp_t==1?'none':'flex;align-items:center;'}};"> 95 + <view class="{{bn_t_exp_t==2?'':'xc-left'}}" bindtap='setexptype' data-t='0' style="display:{{bn_t_exp_t==1?'none':'flex;align-items:center;'}}">
76 <!-- <icon color="{{bn_exp_type==0?'red':'gray'}}" size="16" type="success"></icon> --> 96 <!-- <icon color="{{bn_exp_type==0?'red':'gray'}}" size="16" type="success"></icon> -->
77 <block wx:if="{{bn_exp_type==0}}"> 97 <block wx:if="{{bn_exp_type==0}}">
78 98
@@ -81,7 +101,7 @@ @@ -81,7 +101,7 @@
81 <block wx:else> 101 <block wx:else>
82 <view class="circle xc-hookts on"></view> 102 <view class="circle xc-hookts on"></view>
83 </block> 103 </block>
84 - <view class="yu_er">物流</view> 104 + <view class="yu_er">快递邮寄</view>
85 </view> 105 </view>
86 </view> 106 </view>
87 <block wx:if="{{bn_exp_type==0}}"> 107 <block wx:if="{{bn_exp_type==0}}">
@@ -101,14 +121,7 @@ @@ -101,14 +121,7 @@
101 121
102 </view> 122 </view>
103 123
104 - <!-----使用余额------>  
105 - <view class="set-mes" wx:if="{{userinfo.user_money>0}}">  
106 - <view class="use-item" bindtap='set_bn_useyuer'>  
107 - <icon color="{{bn_use_money?'red':'gray'}}" size="16" type="success"></icon>  
108 - <view class="yu_er">使用余额 :¥{{yuer}} </view>  
109 -  
110 - </view>  
111 - </view> 124 +
112 <view class="coupon-mes flex-vertical"> 125 <view class="coupon-mes flex-vertical">
113 <view>留言</view> 126 <view>留言</view>
114 <view class="leave-word"> 127 <view class="leave-word">
@@ -118,7 +131,14 @@ @@ -118,7 +131,14 @@
118 </view> 131 </view>
119 </block> 132 </block>
120 133
121 - <view class="information"> 134 + <view class="information bdr14">
  135 + <!-----使用余额------>
  136 + <view class="set-mes" wx:if="{{userinfo.user_money>0}}">
  137 + <view class="use-item" bindtap='set_bn_useyuer' style="padding-left:0;padding-right:0;">
  138 + <icon color="{{bn_use_money?'red':'gray'}}" size="16" type="success"></icon>
  139 + <view class="yu_er">使用余额 :¥{{yuer}} </view>
  140 + </view>
  141 + </view>
122 <view class="item" wx:if="{{kt_type<3 || is_normal==1}}"> 142 <view class="item" wx:if="{{kt_type<3 || is_normal==1}}">
123 <view>商品金额</view> 143 <view>商品金额</view>
124 <view class="co-red">¥ {{formData.all_price}}元</view> 144 <view class="co-red">¥ {{formData.all_price}}元</view>
@@ -142,11 +162,11 @@ @@ -142,11 +162,11 @@
142 </view> 162 </view>
143 163
144 <view class="btn-wrap"> 164 <view class="btn-wrap">
145 - <button class="tips-btn" formType="submit" id="submitOrder">提交订单</button>  
146 - <view class="pay-amount">  
147 - <view class="payable">应付金额 : </view>  
148 - <view class="co-red big">¥ {{formData.order_amount}}元</view>  
149 - </view> 165 + <view class="pay-amount">
  166 + <view class="payable">应付金额:<text class="co-red">¥{{formData.order_amount}}</text></view>
  167 + <!-- <view class="co-red big"></view> -->
  168 + </view>
  169 + <button class="tips-btn" formType="submit" id="submitOrder">提交订单</button>
150 </view> 170 </view>
151 </form> 171 </form>
152 172
pages/cart/cart2_pt/cart2_pt.wxss
  1 +.bdr_t-14 {
  2 + border-top-left-radius: 14rpx;
  3 + border-top-right-radius: 14rpx;
  4 +}
  5 +.bdr_b-14 {
  6 + border-bottom-left-radius: 14rpx;
  7 + border-bottom-right-radius: 14rpx;
  8 +}
  9 +.bdr14 {
  10 + border-radius: 14rpx;
  11 +}
  12 +.mgt20 {
  13 + margin-top: 20rpx;
  14 +}
  15 +.shadow {
  16 + box-shadow: 0 4rpx 12px #e7e9eb;
  17 +}
  18 +.shadow-1 {
  19 + box-shadow: 16rpx 0px 12px #e7e9eb;
  20 +}
  21 +
  22 +
  23 +page {
  24 + /* background-color: #FAFAFA; */
  25 + background-color: #F0F0F0;
  26 + padding: 0 22rpx;
  27 + box-sizing: border-box;
  28 +}
  29 +.container {
  30 + background-color: #F0F0F0;
  31 + /* padding-top: 28rpx; */
  32 + padding-bottom: 120rpx;
  33 +}
1 .user-mes { 34 .user-mes {
2 position: relative; 35 position: relative;
3 background-color: #fff; 36 background-color: #fff;
4 font-size: 32rpx; 37 font-size: 32rpx;
5 color: #444; 38 color: #444;
  39 + /* margin-top: 28rpx; */
  40 + border-radius: 14rpx;
6 } 41 }
7 .user-contact { 42 .user-contact {
8 - padding: 24rpx 70rpx;  
9 - font-weight: 600;  
10 - 43 + padding: 24rpx 26rpx;
  44 + font-weight: 600;
11 } 45 }
12 - 46 +
13 .location { 47 .location {
14 position: relative; 48 position: relative;
15 padding: 0 70rpx 24rpx; 49 padding: 0 70rpx 24rpx;
@@ -17,15 +51,15 @@ @@ -17,15 +51,15 @@
17 51
18 .pos-icon { 52 .pos-icon {
19 position: absolute; 53 position: absolute;
20 - left: 22rpx;  
21 - top: 20rpx;  
22 - width: 32rpx;  
23 - height: 40rpx; 54 + left: 28rpx;
  55 + top: 6rpx;
  56 + width: 30rpx;
  57 + height: 36rpx;
24 } 58 }
25 59
26 .border-img { 60 .border-img {
27 width: 100%; 61 width: 100%;
28 - height: 16rpx; 62 + height: 12rpx;
29 } 63 }
30 64
31 .update-logistics { 65 .update-logistics {
@@ -33,7 +67,7 @@ @@ -33,7 +67,7 @@
33 right: 0; 67 right: 0;
34 top: 0; 68 top: 0;
35 width: 80rpx; 69 width: 80rpx;
36 - height: 148rpx; 70 + height: 100%;
37 display: flex; 71 display: flex;
38 align-items: center; 72 align-items: center;
39 justify-content: center; 73 justify-content: center;
@@ -52,7 +86,7 @@ @@ -52,7 +86,7 @@
52 86
53 .order-detail { 87 .order-detail {
54 padding: 30rpx 0; 88 padding: 30rpx 0;
55 - border-bottom: 7rpx solid #eee; 89 + border-bottom: 2rpx solid #eee;
56 color: #777; 90 color: #777;
57 min-height: 190rpx; 91 min-height: 190rpx;
58 background-color: #fff; 92 background-color: #fff;
@@ -61,14 +95,14 @@ @@ -61,14 +95,14 @@
61 95
62 .goods-img { 96 .goods-img {
63 float: left; 97 float: left;
64 - width: 190rpx;  
65 - height: 190rpx; 98 + width: 200rpx;
  99 + height: 200rpx;
66 margin: 0 20rpx; 100 margin: 0 20rpx;
67 } 101 }
68 102
69 .order-cont { 103 .order-cont {
70 float: left; 104 float: left;
71 - width: 400rpx; 105 + width: 438rpx;
72 } 106 }
73 107
74 .goods-name { 108 .goods-name {
@@ -78,7 +112,7 @@ @@ -78,7 +112,7 @@
78 margin-bottom: 16rpx; 112 margin-bottom: 16rpx;
79 font-size: 28rpx; 113 font-size: 28rpx;
80 color: #333; 114 color: #333;
81 - 115 +
82 } 116 }
83 117
84 .goods-color { 118 .goods-color {
@@ -86,29 +120,38 @@ @@ -86,29 +120,38 @@
86 } 120 }
87 121
88 .order-num { 122 .order-num {
89 - float: right; 123 + margin-top: 25rpx;
90 font-size: 24rpx; 124 font-size: 24rpx;
91 - margin-top: 10rpx;  
92 - margin-right: 20rpx;  
93 - text-align: right;  
94 line-height: 42rpx; 125 line-height: 42rpx;
95 } 126 }
96 127
97 -.set-mes{background-color: #fff; } 128 +.set-mes{
  129 + background-color: #fff;
  130 + /* margin-top: 20rpx; */
  131 +}
98 .use-item{ 132 .use-item{
99 display: flex; 133 display: flex;
100 align-items: center; 134 align-items: center;
101 - height: 92rpx;  
102 - border-bottom: 1px solid #ddd; 135 + height: 80rpx;
  136 + /* border-bottom: 1px solid #ddd; */
103 font-size: 30rpx; 137 font-size: 30rpx;
104 - width: 95%;  
105 - margin: auto; 138 + /* width:95%;
  139 +margin:auto; */
  140 + padding: 0 26rpx;
106 } 141 }
107 .use-item>view{ 142 .use-item>view{
108 - display: flex;margin-right: 10rpx; 143 + display: flex;
  144 + /* margin-right: 12rpx; */
  145 +}
  146 +.use-item.bfff{
  147 + background-color: #fff;
  148 +}
  149 +.use-item .dp{
  150 + display: block;
  151 + width: 50rpx;
  152 + height: 50rpx;
  153 + margin-left: -6rpx;
109 } 154 }
110 -.use-item.bfff{ background-color: #fff;}  
111 -.use-item .dp{width: 56rpx; height: 56rpx; margin-left: -5rpx}  
112 155
113 .set-item { 156 .set-item {
114 justify-content: space-between; 157 justify-content: space-between;
@@ -138,15 +181,16 @@ @@ -138,15 +181,16 @@
138 } 181 }
139 182
140 .coupon-mes { 183 .coupon-mes {
141 - height:95rpx;  
142 - padding: 0 20rpx; 184 + /* box-sizing: border-box; */
  185 + height:95rpx;
  186 + padding: 0 26rpx;
143 background-color: #fff; 187 background-color: #fff;
144 font-size: 30rpx; 188 font-size: 30rpx;
145 color: #444; 189 color: #444;
146 - width: 100%;  
147 - border-bottom: 6rpx solid #eee;  
148 - margin-bottom: 20rpx;  
149 - 190 + /* width: 100%; */
  191 + border-radius: 14rpx;
  192 + margin-top: 20rpx;
  193 + margin-bottom: 20rpx;
150 } 194 }
151 195
152 .coupon-title { 196 .coupon-title {
@@ -175,12 +219,12 @@ @@ -175,12 +219,12 @@
175 position: relative; 219 position: relative;
176 font-size: 24rpx; 220 font-size: 24rpx;
177 margin-left: 20rpx; 221 margin-left: 20rpx;
178 - 222 + flex-grow: 1;
179 } 223 }
180 224
181 .word-box { 225 .word-box {
182 -  
183 - width: 600rpx; 226 + font-size: 26rpx;
  227 + /* width: 600rpx; */
184 padding: 10rpx; 228 padding: 10rpx;
185 height: 28rpx; 229 height: 28rpx;
186 line-height: 40rpx; 230 line-height: 40rpx;
@@ -193,9 +237,9 @@ @@ -193,9 +237,9 @@
193 } 237 }
194 238
195 .information { 239 .information {
196 - padding: 0 20rpx; 240 + padding: 0 26rpx;
197 background-color: #fff; 241 background-color: #fff;
198 - margin-bottom: 120rpx; 242 + /* margin-bottom: 120rpx; */
199 } 243 }
200 244
201 .information .item { 245 .information .item {
@@ -208,34 +252,50 @@ @@ -208,34 +252,50 @@
208 } 252 }
209 253
210 .btn-wrap { 254 .btn-wrap {
211 - height: 100rpx; width: 100%;  
212 - background-color: #fff;  
213 - position: fixed; bottom: 0;left: 0 255 + height: 94rpx;
  256 + box-sizing: border-box;
  257 + display: flex;
  258 + justify-content: space-between;
  259 + background-color: white;
  260 + align-items: center;
  261 + position: fixed;
  262 + bottom: 0;
  263 + left: 0;
  264 + width: 100%;
  265 + padding: 0 30rpx;
214 } 266 }
215 267
216 .tips-btn { 268 .tips-btn {
217 - float: right; 269 + /* float: right;
218 width: 200rpx; 270 width: 200rpx;
219 height: 100rpx; 271 height: 100rpx;
220 line-height: 100rpx; 272 line-height: 100rpx;
221 text-align: center; 273 text-align: center;
222 font-size: 30rpx; 274 font-size: 30rpx;
223 color: #fff; 275 color: #fff;
224 - background-color: #f23030; 276 + background-color: #f23030; */
  277 + color: white;
  278 + background-color: #FE4445;
  279 + height: 72rpx;
  280 + line-height: 72rpx;
  281 + padding: 0 42rpx;
  282 + border-radius: 36rpx;
  283 + margin-left: 0;
  284 + margin-right: 0;
225 } 285 }
226 286
227 .pay-amount { 287 .pay-amount {
228 - float: right; 288 + /* float: right;
229 display: flex; 289 display: flex;
230 align-items: center; 290 align-items: center;
231 height: 100rpx; 291 height: 100rpx;
232 font-size: 26rpx; 292 font-size: 26rpx;
233 - margin-right: 40rpx; 293 + margin-right: 40rpx; */
234 } 294 }
235 295
236 .payable { 296 .payable {
237 color: #444; 297 color: #444;
238 - margin-right: 20rpx; 298 + /* margin-right: 20rpx; */
239 } 299 }
240 300
241 .shipping-modal { 301 .shipping-modal {
@@ -275,24 +335,58 @@ @@ -275,24 +335,58 @@
275 } 335 }
276 336
277 /*----------nyf新增,地址---------*/ 337 /*----------nyf新增,地址---------*/
278 -.add_new{height: 60rpx; line-height: 60rpx;} 338 +.add_new{
  339 + height: 90rpx;
  340 + display: flex;
  341 + align-items: center;
  342 + padding: 0 26rpx;
  343 +}
279 .addr_jia{width: 45rpx; height: 45rpx; border: 1rpx solid #ddd; 344 .addr_jia{width: 45rpx; height: 45rpx; border: 1rpx solid #ddd;
280 - margin-right: 15rpx; margin-left: 20rpx; vertical-align: middle;}  
281 -.yu_er{margin-left: 15rpx;} .wuliu{margin-left: 20rpx;} 345 + margin-right: 15rpx;vertical-align: middle;}
  346 +.yu_er{
  347 + margin-left: 10rpx;
  348 + /* margin-right: 60rpx; */
  349 +}
  350 +.wuliu{margin-left: 20rpx;}
  351 +
  352 +
  353 +/*---- 优惠券列表 -----*/
  354 +.xc-coupon-frame{
  355 + width: 100%;
  356 + height: 92rpx;
  357 +
  358 +}
  359 +.xc-coupon-frame .work-frame{
  360 + width: 100%;
  361 + height: 100%;
  362 + border-bottom:3rpx solid #eee;
  363 + padding: 0 26rpx;
  364 + background-color: white;
  365 +}
  366 +.xc-right{
  367 + width:20rpx;
  368 + height:20rpx;
  369 + border-top:2rpx solid #000;
  370 + border-right:2rpx solid #000;
  371 + transform:rotate(45deg);
  372 + display:inline-block;
  373 +}
282 374
  375 +.xc-coupon-frame .work-frame .work{ font-size: 30rpx; line-height: 92rpx; }
  376 +.xc-right-frame{font-size: 30rpx;line-height: 92rpx; margin-right: 10rpx }
283 377
284 /* 自定义弹出窗口 */ 378 /* 自定义弹出窗口 */
285 .cx-popup{ 379 .cx-popup{
286 width:100%; 380 width:100%;
287 - height:920rpx; 381 + height:880rpx;
288 background: #fff; 382 background: #fff;
289 z-index: 35; 383 z-index: 35;
290 border-top-left-radius: 20rpx; 384 border-top-left-radius: 20rpx;
291 border-top-right-radius: 20rpx; 385 border-top-right-radius: 20rpx;
292 position:fixed; 386 position:fixed;
293 bottom:0; 387 bottom:0;
294 - padding-bottom: 25rpx;  
295 - 388 + left: 0;
  389 + /* padding-bottom: 25rpx; */
296 } 390 }
297 391
298 .cx-popup .top{ 392 .cx-popup .top{
@@ -300,7 +394,7 @@ @@ -300,7 +394,7 @@
300 height:100rpx; 394 height:100rpx;
301 border-bottom:3rpx solid #ddd; 395 border-bottom:3rpx solid #ddd;
302 margin: auto; 396 margin: auto;
303 - margin-top: 30rpx; 397 + margin-top: 30rpx;
304 398
305 } 399 }
306 .xc-top-content{ 400 .xc-top-content{
@@ -321,7 +415,7 @@ @@ -321,7 +415,7 @@
321 } 415 }
322 .xc-frame{ 416 .xc-frame{
323 width: 100%; 417 width: 100%;
324 - height:68.9%; 418 + height:60%;
325 } 419 }
326 420
327 .xc-frame .list-frame{ 421 .xc-frame .list-frame{
@@ -332,18 +426,18 @@ @@ -332,18 +426,18 @@
332 } 426 }
333 .xc-close-frame{ 427 .xc-close-frame{
334 margin-top:-10rpx; 428 margin-top:-10rpx;
335 - 429 +
336 } 430 }
337 431
338 .xc-close{ 432 .xc-close{
339 - width: 37rpx;  
340 - height: 37rpx;  
341 - border-radius: 50%;  
342 - border: 3rpx solid #333;  
343 - text-align: center;  
344 - line-height: 34rpx;  
345 - font-size: 29rpx;  
346 - color: #333; 433 + width: 37rpx;
  434 +height: 37rpx;
  435 +border-radius: 50%;
  436 +border: 3rpx solid #333;
  437 +text-align: center;
  438 +line-height: 34rpx;
  439 +font-size: 29rpx;
  440 +color: #333;
347 441
348 } 442 }
349 .xc-money{ 443 .xc-money{
@@ -388,7 +482,7 @@ @@ -388,7 +482,7 @@
388 .xc-coupon-money1{ 482 .xc-coupon-money1{
389 color: #444; 483 color: #444;
390 font-size: 28rpx; 484 font-size: 28rpx;
391 - line-height: 60rpx; 485 + line-height: 60rpx;
392 486
393 487
394 } 488 }
@@ -406,9 +500,9 @@ @@ -406,9 +500,9 @@
406 } 500 }
407 501
408 .xc-confirm { 502 .xc-confirm {
409 - width: 48%;  
410 - border-radius: 50rpx;  
411 - height: 50rpx; 503 + width: 50%;
  504 + border-radius: 50rpx;
  505 + height: 80rpx;
412 margin:0 auto; 506 margin:0 auto;
413 background:#d60021; 507 background:#d60021;
414 color:#fff; 508 color:#fff;
@@ -422,128 +516,300 @@ @@ -422,128 +516,300 @@
422 @keyframes down { 0% { transform: translateY(0); } 100% { transform: translateY(550rpx); } } 516 @keyframes down { 0% { transform: translateY(0); } 100% { transform: translateY(550rpx); } }
423 517
424 .xc-not-Selection{ 518 .xc-not-Selection{
425 - width: 40rpx;  
426 - height: 40rpx; 519 + width: 40rpx;
  520 +height: 40rpx;
427 background: #eeeeee; 521 background: #eeeeee;
428 } 522 }
429 523
430 524
431 .xc-close-express{ 525 .xc-close-express{
432 - width: 40rpx;  
433 - height: 40rpx;  
434 - border-radius: 50%;  
435 - border: 3rpx solid #333;  
436 - text-align: center;  
437 - font-size:32rpx;  
438 - line-height: 38rpx;  
439 - color: #333;  
440 - margin-top: 5rpx; 526 + width: 40rpx;
  527 +height: 40rpx;
  528 +border-radius: 50%;
  529 +border: 3rpx solid #333;
  530 +text-align: center;
  531 +font-size:32rpx;
  532 +line-height: 38rpx;
  533 +color: #333;
  534 +margin-top: 5rpx;
441 } 535 }
442 .cx-popup .tops{ 536 .cx-popup .tops{
443 - width: 100%;  
444 - height: 145rpx;  
445 - border-bottom: 3rpx solid #eee; 537 + width: 100%;
  538 +height: 145rpx;
  539 +border-bottom: 3rpx solid #eee;
446 540
447 } 541 }
448 .top-content { 542 .top-content {
449 - width: 82%;  
450 - padding-top: 33px;  
451 - height: 100%;  
452 - padding-left: 40rpx; 543 + width: 82%;
  544 +padding-top: 33px;
  545 +height: 100%;
  546 +padding-left: 40rpx;
453 } 547 }
454 .close-frame{ 548 .close-frame{
455 - margin-top: 30rpx; 549 + margin-top: 30rpx;
456 550
457 } 551 }
458 -.cx-popup.radius{  
459 -  
460 - height: 650rpx;  
461 552
462 -}  
463 .xc-hook { 553 .xc-hook {
464 - width: 33rpx;  
465 - height: 33rpx;  
466 - transform: rotate(-135deg);  
467 - line-height: 35rpx;  
468 - text-align: center;  
469 - margin-right: 20rpx 554 +width: 33rpx;
  555 +height: 33rpx;
  556 +transform: rotate(-135deg);
  557 +line-height: 35rpx;
  558 +text-align: center;
  559 +margin-right: 20rpx
470 560
471 561
472 } 562 }
473 .xc-hooks { 563 .xc-hooks {
474 - width: 30rpx;  
475 - height: 30rpx;  
476 - border: 1rpx solid #999;  
477 - margin-right: 20rpx; 564 +width: 30rpx;
  565 +height: 30rpx;
  566 +border: 1rpx solid #999;
  567 +margin-right: 20rpx;
478 } 568 }
479 .express_list_frame{ 569 .express_list_frame{
480 - display: flex;  
481 - height: 80rpx;  
482 - align-items: center;  
483 - padding-left: 40rpx;  
484 - border-bottom: 1rpx solid #eee; 570 + display: flex;
  571 +height: 80rpx;
  572 +align-items: center;
  573 +padding-left: 40rpx;
  574 +border-bottom: 1rpx solid #eee;
485 575
486 } 576 }
487 .express_list{ 577 .express_list{
488 - width: 100%;  
489 - height: 65%;  
490 - overflow-y: scroll;  
491 - overflow: hidden; 578 + width: 100%;
  579 + height: 65%;
  580 + overflow-y: auto;
  581 + margin-bottom: 40rpx;
  582 +
492 } 583 }
493 .xc-confirms { 584 .xc-confirms {
494 - width: 40%;  
495 - border-radius: 50rpx;  
496 - height: 55rpx;  
497 - margin:0 auto;  
498 - font-size:28rpx;  
499 - background: #fff;  
500 - color: #333;  
501 - border: 2rpx solid #333;  
502 - 585 + box-sizing: border-box;
  586 + width: 40%;
  587 + border-radius: 50rpx;
  588 + height: 80rpx;
  589 + margin:0 auto;
  590 + font-size:28rpx;
  591 + background: #fff;
  592 + color: #333;
  593 + border: 2rpx solid #333;
503 } 594 }
504 595
505 -.xc-right{  
506 - width:20rpx;  
507 - height:20rpx;  
508 - border-top:2rpx solid #000;  
509 - border-right:2rpx solid #000;  
510 - transform:rotate(45deg);  
511 - display:inline-block;  
512 - margin-right: 5rpx;  
513 - margin-left: 10rpx;  
514 596
515 -} 597 +/* 优惠券的改版样式 */
  598 +.xc-coupon-frame{
  599 + /* width: 710rpx; */
  600 + width: 100%;
  601 + height:auto;
  602 + margin: 0 auto;
516 603
  604 +}
  605 +.xc-coupon-frame .coupon-frame{
  606 + width: 100%;
  607 + height: 200rpx;
  608 + margin-top:10rpx;
  609 + border-bottom: 1rpx solid #eee;
517 610
518 -.xc-left{  
519 - margin-left: 45rpx;  
520 } 611 }
521 -.xc-border{  
522 - border-top:8rpx solid #eee;  
523 -width: 100% 612 +.xc-coupon-frame .coupon-frame .coupon-left{
  613 + width: 215rpx;
  614 + height:100%;
  615 + overflow: hidden;
524 } 616 }
525 -.main-top{  
526 -margin-top: 20rpx; 617 +.xc-money-frames{
  618 + width:96%;
  619 + margin-top: -10px;
  620 +}
  621 +
  622 +.xc-rmb-symbol{
  623 + font-size:40rpx;
527 624
528 } 625 }
529 -.order-num {  
530 - margin-top: 25rpx;  
531 - font-size: 24rpx;  
532 - line-height: 42rpx;  
533 - width: 95%;  
534 626
  627 +.xc-rmb-val{
  628 + font-size:60rpx;
  629 +
  630 +}
  631 +.coupon-explain{
  632 + font-size:25rpx;
  633 +width:100%;
  634 +
  635 +
  636 +}
  637 +.xc-valuer{
  638 + margin-top:39rpx;
  639 + margin-left:28rpx;
  640 + font-size:25rpx;
  641 +}
  642 +.coupon-frame .oval{
  643 + width:155rpx;
  644 + height:83rpx;
  645 + border-radius: 50%;
  646 + right:-78rpx;
  647 + top:-37rpx;
  648 +}
  649 +.coupon-right{
  650 + /* width:490rpx; */
  651 + height: 99%;
  652 + border-top: 1rpx solid #eaeaea;
  653 + /* //border-bottom: 1rpx solid #eaeaea; */
  654 + border-right: 1rpx solid #eaeaea;
  655 + flex-grow: 1;
  656 +}
  657 +.coupon-annotation{
  658 + width: 95%;
  659 + height: 100%;
  660 +
  661 +}
  662 +.xc-brand{
  663 + width:100rpx;
  664 + height:35rpx;
  665 + line-height: 35rpx;
  666 + font-size:21rpx;
  667 + border-radius:10rpx; position: relative; top:-1px;
  668 + margin-right: 8rpx
  669 +}
  670 +.top-frame{
  671 + width:82%;
  672 + height: 75rpx;
  673 + margin-top:10rpx;
  674 +}
  675 +.top-frame .coupon-wode{
  676 + font-size: 25rpx;
  677 + margin-left:10rpx;
  678 + width:340rpx;
  679 + height:88rpx;
  680 +}
  681 +.coupon-code{
  682 + width:60rpx;
  683 + height:60rpx;
  684 + margin-top:5rpx;
  685 +
  686 +}
  687 +.frame{
  688 + width: 100%
  689 +}
  690 +.coupon-time{
  691 + font-size: 23rpx;
  692 + line-height:33rpx;
  693 + color: #333;
  694 +}
  695 +
  696 +.clik-get{
  697 + width:125rpx;
  698 + height:45rpx;
  699 + border-radius: 25rpx;
  700 + line-height: 45rpx;
  701 + font-size:25rpx;
  702 + bottom:67rpx;
  703 + right:6px;
  704 +}
  705 +
  706 +.code-img{
  707 + margin-left:20rpx;
  708 +}
  709 +.bottmo-explain{
  710 +top:145rpx;
  711 +width:94%;
  712 +border-top:1rpx dashed #eee;
  713 +padding-top:8rpx;
  714 +height:38rpx;
  715 +line-height: 51rpx;
  716 +
  717 +}
  718 +.font-word{
  719 + font-size: 22rpx;
  720 +}
  721 +.circle-size{
  722 + background: #a0a0a0;
  723 + width: 27rpx;
  724 + height: 27rpx;
  725 + margin-top:13rpx;
  726 +margin-left:8rpx;
  727 +display: flex;
  728 +
  729 +align-items: center;
  730 +}
  731 +.xc-jiantou{
  732 + /* width: 9rpx;
  733 + height: 9rpx; */
  734 + /* border-top: 2rpx solid #fff;
  735 + border-right: 2rpx solid #fff; */
  736 + transform: rotate(-90deg);
  737 + color: #fff;
  738 + font-size: 15rpx;
  739 + /* display:inline-block;
  740 + margin-top: 6.5rpx; */
  741 + text-align: center;
  742 +width: 24rpx;
  743 +}
  744 +.xc-buttom{
  745 + box-sizing: border-box;
  746 + width:100%;
  747 + min-height:76rpx;
  748 + height:auto;
  749 + line-height:40rpx;
  750 + border-left:1rpx solid #eee;
  751 + border-right:1rpx solid #eee;
  752 + border-bottom:1rpx solid #eee;
  753 +/* margin-left: 6rpx; */
535 } 754 }
  755 +
536 .goods-num{ 756 .goods-num{
537 font-size: 28rpx; 757 font-size: 28rpx;
538 -color: #333; 758 + color: #333;
  759 +}
539 760
  761 +.explain-coupon{
  762 + font-size:25rpx;
  763 + padding: 10rpx 10rpx
540 } 764 }
541 -.click-buttem{  
542 -width: 90%;  
543 -margin: auto; 765 +.circle-frame{
  766 + width: 20rpx;
  767 + height: auto;
  768 + z-index:1;
  769 + left:210rpx;
  770 +
  771 +}
  772 +.circle-sawtooth{
  773 + width: 11rpx;
  774 + height: 11rpx;
  775 + background: #fff;
  776 +}
  777 +
  778 +.red{background-color: #fe7496;}
  779 +.green{ background-color: #22c7c1;}
  780 +.blue{background-color:#5e82e3;}
  781 +.g_gray{background-color: #aaaaaa}
  782 +
  783 +.f_text{text-align: center; height:96rpx; }
  784 +.xc-hook.sn {
  785 + margin-top:12%;
  786 +width:45rpx;
  787 +height:45rpx;
  788 +font-size:28rpx;
  789 +line-height:44rpx;
  790 +
  791 +
  792 +}
  793 +.xc-hooks.on{
  794 + margin-top:12%;
  795 +width:42rpx;
  796 +height:42rpx;
  797 +}
  798 +.may_use_coupon{
  799 + /* width: 95%; */
  800 + /* height: 68rpx; */
  801 + line-height:78rpx;
  802 + padding: 0 26rpx;
  803 + justify-content: space-between;
  804 + align-items: center;
  805 +}
  806 +.determine-frame{
  807 + width: 100%;
  808 + height: 130rpx;
  809 +
544 } 810 }
545 .xc-determine{ 811 .xc-determine{
546 - height: 55rpx; 812 + height: 80rpx;
547 width: 40%; 813 width: 40%;
548 border-radius: 50rpx; 814 border-radius: 50rpx;
549 background: #d60021; 815 background: #d60021;
@@ -552,6 +818,21 @@ font-size: 28rpx; @@ -552,6 +818,21 @@ font-size: 28rpx;
552 margin: 0 auto; 818 margin: 0 auto;
553 819
554 } 820 }
  821 +.click-buttem{
  822 +width: 90%;
  823 +margin: auto;
  824 +}
  825 +.logistics-name{
  826 + margin-right:20rpx;
  827 +}
  828 +.xc-border{
  829 + border-top:8rpx solid #eee;
  830 +width: 100%
  831 +}
  832 +.main-top{
  833 +margin-top: 20rpx;
  834 +
  835 +}
555 .xc-hookts{ 836 .xc-hookts{
556 border: 1rpx solid #999; 837 border: 1rpx solid #999;
557 838
@@ -561,8 +842,118 @@ border: 1rpx solid #999; @@ -561,8 +842,118 @@ border: 1rpx solid #999;
561 height:30rpx; 842 height:30rpx;
562 843
563 } 844 }
  845 +.xc-hookt.sn{
  846 + width: 32rpx;
  847 +height: 32rpx;
  848 +font-size: 28rpx;
  849 +line-height: 34rpx;
  850 +}
  851 +.xc-hookt{
  852 + transform: rotate(-135deg);
  853 +text-align: center;
  854 +
  855 +}
  856 +.main-bottom{
  857 + margin-bottom: 20rpx;
  858 +
  859 +}
  860 +.xc-hookst{
  861 + border: 1rpx solid #999;
  862 +
  863 +}
  864 +.xc-hookst.ons{
  865 + width: 42rpx;
  866 +height: 42rpx;
  867 +margin-left: 20rpx;
  868 +
  869 +}
  870 +.is_use_coupon{
  871 + width: 65%;
  872 +justify-content: flex-end;
  873 +padding-top: 10rpx;
  874 +
  875 +
  876 +}
  877 +.xc-hooka{
  878 + transform: rotate(-135deg);
  879 +text-align: center;
  880 +
  881 +}
  882 +.xc-hooka.sn{
  883 + width: 45rpx;
  884 +height: 45rpx;
  885 +font-size: 28rpx;
  886 +line-height: 44rpx;
  887 +margin-left: 20rpx;
  888 +
  889 +}
564 .color-gray{ 890 .color-gray{
565 color: #808080; 891 color: #808080;
566 } 892 }
  893 +.n_guige{ display: inline-block; background:rgb(236, 236, 236); color: rgb(63,63,63); padding: 3rpx 10rpx; border-radius: 3rpx }
  894 +.gift_image{ width: 60rpx; height: 60rpx; position: absolute; top: 0; left: 0}
  895 +
  896 +.quan_num_show{ padding: 4rpx 6rpx; background-color:#ea5551; color:#fff; border-radius: 6rpx;margin-left:10rpx;font-size:24rpx;}
  897 +
  898 +.navigator-hover {
  899 + background: none;
  900 + opacity: 1;
  901 +}
  902 +
  903 +.plus_buy{
  904 + background-color: #fff;
  905 + margin:15rpx 0;
  906 + padding: 20rpx 10rpx;
  907 + position: relative;
  908 +}
  909 +
  910 +
  911 +.card_bg {
  912 + box-sizing: border-box;
  913 + padding: 2rpx 10rpx;
  914 + height: 28rpx;
  915 + border-radius: 26rpx;
  916 + font-size: 18rpx;
  917 + line-height: 28rpx;
  918 + max-width: 210rpx;
  919 + background: #333;
  920 + color: #fff;
  921 + margin-left: 8rpx;
  922 + position:relative;
  923 + top:7rpx;
  924 +}
  925 +
  926 +.card_bg image {
  927 + width: 19rpx;
  928 + height: 19rpx;
  929 + margin-right: 8rpx;
  930 +}
  931 +
  932 +/* .card_bg .card_name {
  933 + max-width: 76rpx;
  934 + width: auto;
  935 + overflow: hidden;
  936 + white-space: nowrap;
  937 +} */
  938 +
  939 +.card_name {
  940 + position: relative;
  941 + top: -4rpx;
  942 + margin-left: 6px;
  943 +}
  944 +
  945 +.car_tri_up {
  946 + width: 0;height: 0;
  947 + border-left: 20rpx solid transparent;
  948 + border-right: 20rpx solid transparent;
  949 + border-bottom: 20rpx solid #fff;
  950 + position: absolute;
  951 + right: 20rpx;
  952 + top:-10rpx
  953 +}
  954 +.card_op{
  955 + position: absolute;
  956 + right: 20rpx;
  957 + top:36rpx
  958 +}
567 959
568 -.n_guige{ display: inline-block; background:rgb(236, 236, 236); color: rgb(63,63,63); padding: 3rpx 10rpx; border-radius: 3rpx }  
569 \ No newline at end of file 960 \ No newline at end of file
pages/cart/cart_wk/cart_wk.wxml
1 <wxs module="filters" src="../../../utils/filter.wxs"></wxs> 1 <wxs module="filters" src="../../../utils/filter.wxs"></wxs>
2 <!----要进行判断地址是否显示----> 2 <!----要进行判断地址是否显示---->
3 -<view bindtap="enterAddressPage" class="user-mes" 3 +<view bindtap="enterAddressPage" class="user-mes mgt20"
4 hidden='{{exp_type==1 }}'> 4 hidden='{{exp_type==1 }}'>
5 <!-----默认地址显示----> 5 <!-----默认地址显示---->
6 <block wx:if="{{user_addr!=null}}"> 6 <block wx:if="{{user_addr!=null}}">
7 - <view class="user-contact">{{user_addr.consignee}}{{'  '}}{{user_addr.mobile}}</view> 7 + <view class="user-contact">收货人:{{user_addr.consignee}}{{'  '}}{{user_addr.mobile}}</view>
8 <view class="location"> 8 <view class="location">
9 <view class="address">{{user_addr.more_address}}{{' '}}{{user_addr.address}}</view> 9 <view class="address">{{user_addr.more_address}}{{' '}}{{user_addr.address}}</view>
10 <view class="pos-icon"> 10 <view class="pos-icon">
11 - <image class="wh100" src="{{imgUrl}}/miniapp/images/iconfont-address.png"></image> 11 + <image class="wh100 bdr14" src="{{imgUrl}}/miniapp/images/goodscategory/new_position.png"></image>
12 </view> 12 </view>
13 </view> 13 </view>
14 <view class="update-logistics"> 14 <view class="update-logistics">
@@ -21,15 +21,13 @@ @@ -21,15 +21,13 @@
21 <image class="addr_jia" src="{{imgUrl}}/miniapp/images/jia.png"></image>添加地址 21 <image class="addr_jia" src="{{imgUrl}}/miniapp/images/jia.png"></image>添加地址
22 </view> 22 </view>
23 </block> 23 </block>
24 - <view class="border-img"><image class="wh100" src="{{imgUrl}}/miniapp/images/tt.png"></image></view> 24 + <!-- <view class="border-img"><image class="wh100 bdr14" src="{{imgUrl}}/miniapp/images/tt.png"></image></view> -->
25 </view> 25 </view>
26 26
27 <!--头部--> 27 <!--头部-->
28 -<view class='top'>  
29 - <view class='t_img'>  
30 - <image src='{{imgUrl}}/miniapp/images/11.png'></image>  
31 - </view>  
32 - <view class='t_wz'>{{pickup.pickup_name}}</view> 28 +<view class='top bdr_t-14 flex'>
  29 + <image class="t_img" src='{{imgUrl}}/miniapp/images/goodscategory/new_store.png'></image>
  30 + <view class='t_wz'>美得得超市{{pickup.pickup_name}}</view>
33 </view> 31 </view>
34 32
35 <!--商品图片显示--> 33 <!--商品图片显示-->
@@ -39,17 +37,19 @@ @@ -39,17 +37,19 @@
39 <image src="{{order.show_img}}" binderror="bind_bnerr" data-errorimg="order.show_img"></image> 37 <image src="{{order.show_img}}" binderror="bind_bnerr" data-errorimg="order.show_img"></image>
40 </view> 38 </view>
41 39
42 - <view class='cen_name'>{{order.order_goods.goods_name}}</view>  
43 -  
44 - <view class='cen_jg'>¥{{order.order_goods.goods_price}}  
45 - <view class='cen_sl'>x{{order.order_goods.goods_num}}</view>  
46 - </view>  
47 - 40 + <view class="details-container">
  41 + <view class='cen_name ellipsis-3'>{{order.order_goods.goods_name}}</view>
  42 + <view class="flex jc_sb">
  43 + <view class='cen_jg'>¥{{order.order_goods.goods_price}}</view>
  44 + <view class='cen_sl'>x{{order.order_goods.goods_num}}</view>
  45 + </view>
  46 + </view>
  47 +
48 </view> 48 </view>
49 49
50 <!--取货方式--> 50 <!--取货方式-->
51 51
52 -<view class='quhou'> 52 +<view class='quhou bdr_b-14'>
53 53
54 <view bindtap="set_wuliu" data-type="1" class='qu_fs' wx:if="{{distr_type==0 || distr_type==1}}"> 54 <view bindtap="set_wuliu" data-type="1" class='qu_fs' wx:if="{{distr_type==0 || distr_type==1}}">
55 <image wx:if="{{exp_type==0}}" src='{{imgUrl}}/miniapp/images/kon.png'></image> 55 <image wx:if="{{exp_type==0}}" src='{{imgUrl}}/miniapp/images/kon.png'></image>
@@ -64,7 +64,7 @@ @@ -64,7 +64,7 @@
64 </view> 64 </view>
65 65
66 </view> 66 </view>
67 -<view class="use-item" wx:if='{{exp_type==0}}'> 67 +<view class="use-item bdr_b-14" wx:if='{{exp_type==0}}'>
68 <view>使用物流:</view> 68 <view>使用物流:</view>
69 <picker bindchange="bindPickerChange" value="{{index}}" range="{{wu_arr}}" range-key="name"> 69 <picker bindchange="bindPickerChange" value="{{index}}" range="{{wu_arr}}" range-key="name">
70 <view >{{wu_arr[index].name}}</view> 70 <view >{{wu_arr[index].name}}</view>
@@ -72,46 +72,45 @@ @@ -72,46 +72,45 @@
72 </view> 72 </view>
73 73
74 <!--成团人数--> 74 <!--成团人数-->
75 -<view class='chentuan'> 75 +<view class='chentuan bdr14'>
76 <view class='ct_one jc_sb'> 76 <view class='ct_one jc_sb'>
77 <view class='ct_one_left'>成团人数</view> 77 <view class='ct_one_left'>成团人数</view>
78 <view class='ct_one_right'><text class='redwz'>{{teamgroup.jt_ct_num}}</text>人</view> 78 <view class='ct_one_right'><text class='redwz'>{{teamgroup.jt_ct_num}}</text>人</view>
79 </view> 79 </view>
80 <view class='ct_one jc_sb'> 80 <view class='ct_one jc_sb'>
81 <view class='ct_one_left'>成团金额</view> 81 <view class='ct_one_left'>成团金额</view>
82 - <view class='ct_one_right'>¥<text class='redwz'>{{filters.toFix(order.order_amount+order.user_money+order.tail_money,2)}}</text></view> 82 + <view class='ct_one_right'><text class='redwz'>¥{{filters.toFix(order.order_amount+order.user_money+order.tail_money,2)}}</text></view>
83 </view> 83 </view>
84 <view class='ct_one jc_sb'> 84 <view class='ct_one jc_sb'>
85 <view class='ct_one_left'>支付定金</view> 85 <view class='ct_one_left'>支付定金</view>
86 - <view class='ct_one_right'>¥<text class='redwz'>{{filters.toFix(order.order_amount+order.user_money,2)}}</text> 86 + <view class='ct_one_right'><text class='redwz'>¥{{filters.toFix(order.order_amount+order.user_money,2)}}</text>
87 </view> 87 </view>
88 </view> 88 </view>
89 </view> 89 </view>
90 90
91 <!--尾款--> 91 <!--尾款-->
92 -<view class='chentuan'> 92 +<view class='chentuan bdr14'>
93 <view class='ct_one jc_sb'> 93 <view class='ct_one jc_sb'>
94 <view class='ct_one_left'>尾款金额</view> 94 <view class='ct_one_left'>尾款金额</view>
95 - <view class='ct_one_right'>¥<text class='redwz'>{{order.tail_money}}</text> 95 + <view class='ct_one_right'><text class='redwz'>¥{{order.tail_money}}</text>
96 </view> 96 </view>
97 </view> 97 </view>
98 98
99 <view class='ct_one jc_sb' wx:if="{{exp_price>0}}"> 99 <view class='ct_one jc_sb' wx:if="{{exp_price>0}}">
100 <view class='ct_one_left'>配送费用</view> 100 <view class='ct_one_left'>配送费用</view>
101 - <view class='ct_one_right'>¥<text class='redwz'>{{exp_price}}</text> 101 + <view class='ct_one_right'><text class='redwz'>¥{{exp_price}}</text>
102 </view> 102 </view>
103 </view> 103 </view>
104 </view> 104 </view>
105 105
106 <!--支付--> 106 <!--支付-->
107 -<view class='zf'>  
108 - <view class='zf_left'> 107 +<view class='zf shadow'>
  108 + <!-- <view class='zf_left'>
109 <text class='zf_left_wz'>支付合计:</text> 109 <text class='zf_left_wz'>支付合计:</text>
110 <text class='zf_left_red'>¥{{filters.toFix(order.tail_money+exp_price,2)}}</text> 110 <text class='zf_left_red'>¥{{filters.toFix(order.tail_money+exp_price,2)}}</text>
111 - </view>  
112 - <view class='zf_btn' bindtap="to_pay">  
113 - <text>支付尾款</text>  
114 - </view> 111 + </view> -->
  112 + <view class='zf_left'>支付合计:<text class='zf_left_red'>¥{{filters.toFix(order.tail_money+exp_price,2)}}</text></view>
  113 + <view class='zf_btn' bindtap="to_pay">支付尾款</view>
115 </view> 114 </view>
116 115
117 <!--支付的方式选择,0微信支付 1余额支付--> 116 <!--支付的方式选择,0微信支付 1余额支付-->
pages/cart/cart_wk/cart_wk.wxss
1 -/* pages/cart/cart_wk/cart_wk.wxss */ 1 +.bdr_t-14 {
  2 + border-top-left-radius: 14rpx;
  3 + border-top-right-radius: 14rpx;
  4 +}
  5 +.bdr_b-14 {
  6 + border-bottom-left-radius: 14rpx;
  7 + border-bottom-right-radius: 14rpx;
  8 +}
  9 +.bdr14 {
  10 + border-radius: 14rpx;
  11 +}
  12 +.mgt20 {
  13 + margin-top: 20rpx;
  14 +}
  15 +.shadow {
  16 + box-shadow: 0 4rpx 12px #e7e9eb;
  17 +}
  18 +.shadow-1 {
  19 + box-shadow: 16rpx 0px 12px #e7e9eb;
  20 +}
  21 +
  22 +page {
  23 + background-color: #F0F0F0;
  24 + padding: 0 22rpx;
  25 + box-sizing: border-box;
  26 +}
2 27
3 .user-mes { 28 .user-mes {
4 - position: relative;  
5 - background-color: #fff;  
6 - font-size: 30rpx;  
7 - color: #444; 29 + position: relative;
  30 + background-color: #fff;
  31 + font-size: 32rpx;
  32 + color: #444;
  33 + /* margin-top: 28rpx; */
  34 + border-radius: 14rpx;
8 } 35 }
9 .user-contact { 36 .user-contact {
10 - padding: 24rpx 80rpx; 37 + padding: 24rpx 26rpx;
  38 + font-weight: 600;
11 } 39 }
12 - 40 +
13 .location { 41 .location {
14 - position: relative;  
15 - padding: 0 80rpx 24rpx; 42 + position: relative;
  43 + padding: 0 70rpx 24rpx;
16 } 44 }
17 45
18 .pos-icon { 46 .pos-icon {
19 - position: absolute;  
20 - left: 30rpx;  
21 - top: 0;  
22 - width: 32rpx;  
23 - height: 32.5rpx; 47 + position: absolute;
  48 + left: 28rpx;
  49 + top: 6rpx;
  50 + width: 30rpx;
  51 + height: 36rpx;
24 } 52 }
25 53
26 .border-img { 54 .border-img {
@@ -29,14 +57,14 @@ @@ -29,14 +57,14 @@
29 } 57 }
30 58
31 .update-logistics { 59 .update-logistics {
32 - position: absolute;  
33 - right: 0;  
34 - top: 0;  
35 - width: 80rpx;  
36 - height: 148rpx;  
37 - display: flex;  
38 - align-items: center;  
39 - justify-content: center; 60 + position: absolute;
  61 + right: 0;
  62 + top: 0;
  63 + width: 80rpx;
  64 + height: 100%;
  65 + display: flex;
  66 + align-items: center;
  67 + justify-content: center;
40 } 68 }
41 69
42 .arrow-rigth { 70 .arrow-rigth {
@@ -60,56 +88,65 @@ @@ -60,56 +88,65 @@
60 } 88 }
61 89
62 .top { 90 .top {
63 -  
64 - background-color: white;  
65 -height: 40px;  
66 -display: flex;  
67 -padding: 10rpx 0 0 0;  
68 -border-bottom: 2rpx solid rgb(238, 238, 238);  
69 -margin-top: 10rpx;  
70 - 91 + background-color: white;
  92 + height: 40px;
  93 + display: flex;
  94 + padding: 0 26rpx;
  95 + /* border-bottom: 2rpx solid rgb(238, 238, 238); */
  96 + margin-top: 20rpx;
  97 + align-items: center;
71 } 98 }
72 99
73 -.t_img image {  
74 - width: 70rpx;  
75 - height: 70rpx; 100 +.t_img {
  101 + display: block;
  102 + width: 50rpx;
  103 + height: 50rpx;
  104 + margin-left:-6rpx;
76 } 105 }
77 106
78 .t_wz { 107 .t_wz {
79 font-size: 30rpx; 108 font-size: 30rpx;
80 - font-weight: bold; 109 + /* font-weight: bold; */
81 color: rgb(0, 0, 0); 110 color: rgb(0, 0, 0);
82 line-height: 65rpx; 111 line-height: 65rpx;
83 - margin-left: 18rpx; 112 + /* margin-left: 18rpx; */
84 } 113 }
85 114
86 .center { 115 .center {
  116 + box-sizing: border-box;
87 background-color: white; 117 background-color: white;
88 width: 100%; 118 width: 100%;
89 min-height: 80rpx; 119 min-height: 80rpx;
90 display: flex; 120 display: flex;
91 - padding: 24rpx 140rpx 24rpx 20rpx; 121 + padding: 24rpx 26rpx;
92 border-bottom: 2rpx solid #eee; 122 border-bottom: 2rpx solid #eee;
93 } 123 }
94 124
95 .center .cen_img { 125 .center .cen_img {
96 - width: 120rpx;  
97 - height: 120rpx; 126 + width: 200rpx;
  127 + height: 200rpx;
  128 + border-radius: 14rpx;
  129 + overflow: hidden;
  130 + flex-shrink: 0;
98 } 131 }
99 132
100 .center .cen_img image { 133 .center .cen_img image {
101 - width: 120rpx;  
102 - height: 120rpx; 134 + display: block;
  135 + width: 100%;
  136 + height: 100%;
  137 +}
  138 +
  139 +.details-container {
  140 + display: flex;
  141 + padding-left:20rpx;
  142 + flex:1;
  143 + flex-direction: column;
  144 + justify-content: space-between;
103 } 145 }
104 146
105 .center .cen_name { 147 .center .cen_name {
106 height: 120rpx; 148 height: 120rpx;
107 - width: 370rpx;  
108 font-size: 30rpx; 149 font-size: 30rpx;
109 - padding-left: 10rpx;  
110 - overflow:hidden;  
111 - text-overflow:ellipsis;  
112 - white-space:nowraps  
113 } 150 }
114 151
115 .center .cen_jg { 152 .center .cen_jg {
@@ -117,7 +154,6 @@ margin-top: 10rpx; @@ -117,7 +154,6 @@ margin-top: 10rpx;
117 font-size: 32rpx; 154 font-size: 32rpx;
118 width: 200rpx; 155 width: 200rpx;
119 height: 40rpx; 156 height: 40rpx;
120 - text-align: right;  
121 } 157 }
122 158
123 .center .cen_jg .cen_sl { 159 .center .cen_jg .cen_sl {
@@ -128,20 +164,23 @@ margin-top: 10rpx; @@ -128,20 +164,23 @@ margin-top: 10rpx;
128 } 164 }
129 165
130 .quhou { 166 .quhou {
  167 + box-sizing: border-box;
131 background-color: white; 168 background-color: white;
132 border-bottom: 2rpx solid #eee; 169 border-bottom: 2rpx solid #eee;
133 font-size: 28rpx; 170 font-size: 28rpx;
134 - min-height: 70rpx; 171 + height: 92rpx;
135 display: flex; 172 display: flex;
136 - padding-top: 20rpx; 173 + align-items: center;
  174 + padding: 0 26rpx;
137 } 175 }
138 176
139 .quhou .qu_fs { 177 .quhou .qu_fs {
140 font-size: 30rpx; 178 font-size: 30rpx;
141 display: flex; 179 display: flex;
142 height: 60rpx; 180 height: 60rpx;
143 - margin-left: 25rpx; 181 + /* margin-left: 25rpx; */
144 line-height: 62rpx; 182 line-height: 62rpx;
  183 + margin-right: 20rpx;
145 } 184 }
146 185
147 .quhou .qu_fs image { 186 .quhou .qu_fs image {
@@ -156,23 +195,26 @@ margin-top: 10rpx; @@ -156,23 +195,26 @@ margin-top: 10rpx;
156 .quhou .qu_fs .qu_wz {} 195 .quhou .qu_fs .qu_wz {}
157 196
158 .chentuan { 197 .chentuan {
  198 + box-sizing: border-box;
159 width: 100%; 199 width: 100%;
160 min-height: 90rpx; 200 min-height: 90rpx;
161 background-color: white; 201 background-color: white;
162 - padding: 20rpx 10rpx; 202 + padding: 20rpx 26rpx;
163 margin-top: 20rpx; 203 margin-top: 20rpx;
164 font-size: 28rpx; 204 font-size: 28rpx;
165 } 205 }
166 206
167 .chentuan .ct_one { 207 .chentuan .ct_one {
168 - height: 40rpx;  
169 - margin-bottom: 10rpx; 208 + /* height: 40rpx; */
  209 + /* margin-bottom: 10rpx; */
170 display: flex; 210 display: flex;
171 - width: 708rpx; 211 + line-height: 60rpx;
  212 + font-size: 30rpx;
  213 + /* width: 708rpx; */
172 } 214 }
173 215
174 .chentuan .ct_one .ct_one_left { 216 .chentuan .ct_one .ct_one_left {
175 - margin-left: 10rpx; 217 + /* margin-left: 10rpx; */
176 } 218 }
177 219
178 .chentuan .ct_one .ct_one_right { 220 .chentuan .ct_one .ct_one_right {
@@ -185,14 +227,26 @@ margin-top: 10rpx; @@ -185,14 +227,26 @@ margin-top: 10rpx;
185 } 227 }
186 228
187 .zf { 229 .zf {
188 - background-color: white; 230 + /* background-color: white;
189 width: 100%; 231 width: 100%;
190 min-height: 80rpx; 232 min-height: 80rpx;
191 line-height: 80rpx; 233 line-height: 80rpx;
192 font-size: 30rpx; 234 font-size: 30rpx;
193 position: fixed; 235 position: fixed;
194 bottom: 0; 236 bottom: 0;
195 - text-align: right; 237 + text-align: right; */
  238 +
  239 + height: 94rpx;
  240 + box-sizing: border-box;
  241 + display: flex;
  242 + justify-content: space-between;
  243 + background-color: white;
  244 + align-items: center;
  245 + position: fixed;
  246 + bottom: 0;
  247 + left: 0;
  248 + width: 100%;
  249 + padding: 0 30rpx;
196 } 250 }
197 251
198 .zf view{ 252 .zf view{
@@ -204,13 +258,29 @@ margin-top: 10rpx; @@ -204,13 +258,29 @@ margin-top: 10rpx;
204 margin-right: 20rpx; 258 margin-right: 20rpx;
205 } 259 }
206 260
207 -.zf .zf_btn {  
208 - color: white; 261 +.zf_btn {
  262 + /* color: white;
209 background-color: #c4182e; 263 background-color: #c4182e;
210 font-size: 28rpx; 264 font-size: 28rpx;
211 width: 170rpx; 265 width: 170rpx;
212 text-align: center; 266 text-align: center;
213 - line-height: 80rpx; 267 + line-height: 80rpx; */
  268 + /* float: right;
  269 + width: 200rpx;
  270 + height: 100rpx;
  271 + line-height: 100rpx;
  272 + text-align: center;
  273 + font-size: 30rpx;
  274 + color: #fff;
  275 + background-color: #f23030; */
  276 + color: white;
  277 + background-color: #FE4445;
  278 + height: 72rpx;
  279 + line-height: 72rpx;
  280 + padding: 0 42rpx;
  281 + border-radius: 36rpx;
  282 + margin-left: 0;
  283 + margin-right: 0;
214 } 284 }
215 285
216 .zf .zf_left .zf_left_red { 286 .zf .zf_left .zf_left_red {
@@ -218,9 +288,22 @@ margin-top: 10rpx; @@ -218,9 +288,22 @@ margin-top: 10rpx;
218 } 288 }
219 289
220 /*----------nyf新增,地址---------*/ 290 /*----------nyf新增,地址---------*/
221 -.add_new{height: 60rpx; line-height: 60rpx;}  
222 -.addr_jia{width: 45rpx; height: 45rpx; border: 1rpx solid #ddd;  
223 - margin-right: 15rpx; margin-left: 20rpx; vertical-align: middle;} 291 +.add_new{
  292 + box-sizing: border-box;
  293 + height: 92rpx;
  294 + padding: 0 26rpx;
  295 + display: flex;
  296 + align-items: center;
  297 + /* line-height: 60rpx; */
  298 +}
  299 +.addr_jia{
  300 + width: 45rpx;
  301 + height: 45rpx;
  302 + border: 1rpx solid #ddd;
  303 + margin-right: 15rpx;
  304 + /* margin-left: 20rpx; */
  305 + vertical-align: middle;
  306 +}
224 .yu_er{margin-left: 15rpx;} .wuliu{margin-left: 20rpx;} 307 .yu_er{margin-left: 15rpx;} .wuliu{margin-left: 20rpx;}
225 308
226 309
@@ -228,9 +311,9 @@ margin-top: 10rpx; @@ -228,9 +311,9 @@ margin-top: 10rpx;
228 display: flex; 311 display: flex;
229 align-items: center; 312 align-items: center;
230 height: 92rpx; 313 height: 92rpx;
231 - border-bottom: 1px solid #ddd; 314 + /* border-bottom: 1px solid #ddd; */
232 font-size: 30rpx; 315 font-size: 30rpx;
233 - padding-left: 20rpx; 316 + padding:0 26rpx;
234 background: #fff; 317 background: #fff;
235 } 318 }
236 .use-item>view{ 319 .use-item>view{
pages/giftpack/birthdaygift/birthdaygift.js
@@ -127,7 +127,7 @@ Page({ @@ -127,7 +127,7 @@ Page({
127 //--先判断会员状态-- 127 //--先判断会员状态--
128 var user_info = getApp().globalData.userInfo; 128 var user_info = getApp().globalData.userInfo;
129 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 129 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
130 - getApp().goto('/pages/getphone/getphone'); 130 + getApp().goto('/pages/togoin/togoin');
131 return false; 131 return false;
132 } 132 }
133 this.GetList(); 133 this.GetList();
pages/giftpack/buygiftpack/giftpackbuy.js
@@ -41,7 +41,7 @@ Page({ @@ -41,7 +41,7 @@ Page({
41 //--先判断会员状态-- 41 //--先判断会员状态--
42 var user_info = getApp().globalData.userInfo; 42 var user_info = getApp().globalData.userInfo;
43 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 43 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
44 - getApp().goto('/pages/getphone/getphone'); 44 + getApp().goto('/pages/togoin/togoin');
45 return false; 45 return false;
46 } 46 }
47 this.getList(); 47 this.getList();
pages/giftpack/evaluategift/evaluategift.js
@@ -31,6 +31,10 @@ Page({ @@ -31,6 +31,10 @@ Page({
31 orderNumber: "", //订单号 31 orderNumber: "", //订单号
32 orderGoodsId: "", //商品id 32 orderGoodsId: "", //商品id
33 orderType:1, 33 orderType:1,
  34 +
  35 + weappurltitle:"进入商城购物",
  36 + weappurl:"/pages/index/index/index",
  37 +
34 }, 38 },
35 GetList: function() { 39 GetList: function() {
36 var th = this; 40 var th = this;
@@ -113,6 +117,14 @@ Page({ @@ -113,6 +117,14 @@ Page({
113 textTitle: res.data.data.actIntro.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"') 117 textTitle: res.data.data.actIntro.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"')
114 }) 118 })
115 } 119 }
  120 + if (res.data.data.weappurl != '' && res.data.data.weappurltitle != '') {
  121 + th.setData({
  122 + weappurl: res.data.data.weappurl,
  123 + weappurltitle: res.data.data.weappurltitle
  124 + })
  125 + }
  126 +
  127 +
116 } else { 128 } else {
117 getApp().my_warnning(res.data.msg, 0, th); 129 getApp().my_warnning(res.data.msg, 0, th);
118 return false; 130 return false;
@@ -140,7 +152,7 @@ Page({ @@ -140,7 +152,7 @@ Page({
140 //--先判断会员状态-- 152 //--先判断会员状态--
141 var user_info = getApp().globalData.userInfo; 153 var user_info = getApp().globalData.userInfo;
142 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 154 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
143 - getApp().goto('/pages/getphone/getphone'); 155 + getApp().goto('/pages/togoin/togoin');
144 return false; 156 return false;
145 } 157 }
146 158
pages/giftpack/evaluategift/evaluategift.wxml
@@ -158,7 +158,7 @@ @@ -158,7 +158,7 @@
158 </block> 158 </block>
159 <view class="button_box"> 159 <view class="button_box">
160 <view> 160 <view>
161 - <button class="button" bindtap="goto" data-url="/pages/index/index/index">进入商城购物</button> 161 + <button class="button" bindtap="goto" data-url="{{weappurl}}">{{weappurltitle}}</button>
162 </view> 162 </view>
163 <view class="button_text "> 163 <view class="button_text ">
164 <text>本活动最终解释权归公司所有,如果有问题请联系客服</text> 164 <text>本活动最终解释权归公司所有,如果有问题请联系客服</text>
pages/giftpack/festival/festival.js
@@ -133,7 +133,7 @@ Page({ @@ -133,7 +133,7 @@ Page({
133 //--先判断会员状态-- 133 //--先判断会员状态--
134 var user_info = getApp().globalData.userInfo; 134 var user_info = getApp().globalData.userInfo;
135 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 135 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
136 - getApp().goto('/pages/getphone/getphone'); 136 + getApp().goto('/pages/togoin/togoin');
137 return false; 137 return false;
138 } 138 }
139 this.is_festival(); 139 this.is_festival();
pages/giftpack/giftpacklist/giftpacklist.js
@@ -45,7 +45,7 @@ Page({ @@ -45,7 +45,7 @@ Page({
45 //--先判断会员状态-- 45 //--先判断会员状态--
46 var user_info = getApp().globalData.userInfo; 46 var user_info = getApp().globalData.userInfo;
47 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 47 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
48 - getApp().goto('/pages/getphone/getphone'); 48 + getApp().goto('/pages/togoin/togoin');
49 return false; 49 return false;
50 } 50 }
51 51
pages/giftpack/mygiftpack/mygiftpack.js
@@ -42,7 +42,7 @@ Page({ @@ -42,7 +42,7 @@ Page({
42 //--先判断会员状态-- 42 //--先判断会员状态--
43 var user_info = getApp().globalData.userInfo; 43 var user_info = getApp().globalData.userInfo;
44 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 44 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
45 - getApp().goto('/pages/getphone/getphone'); 45 + getApp().goto('/pages/togoin/togoin');
46 return false; 46 return false;
47 } 47 }
48 this.getList(); 48 this.getList();
pages/giftpack/newvipgift/newvipgift.js
@@ -126,7 +126,7 @@ Page({ @@ -126,7 +126,7 @@ Page({
126 //--先判断会员状态-- 126 //--先判断会员状态--
127 var user_info = getApp().globalData.userInfo; 127 var user_info = getApp().globalData.userInfo;
128 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 128 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
129 - getApp().goto('/pages/getphone/getphone'); 129 + getApp().goto('/pages/togoin/togoin');
130 return false; 130 return false;
131 } 131 }
132 this.GetList(); 132 this.GetList();
pages/goods/categoryList/categoryList.wxml
1 <!-- <import src="../../tabbar/tabbar.wxml" /> 1 <!-- <import src="../../tabbar/tabbar.wxml" />
2 <template is="tabBar" data="{{tabBar}}" /> --> 2 <template is="tabBar" data="{{tabBar}}" /> -->
  3 +<wxs module="g_filter" src="g_filter.wxs"></wxs>
3 4
4 <!-- 风格1 --> 5 <!-- 风格1 -->
5 <block wx:if="{{is_used_share==0}}"> 6 <block wx:if="{{is_used_share==0}}">
@@ -419,9 +420,12 @@ @@ -419,9 +420,12 @@
419 </view> 420 </view>
420 </block> 421 </block>
421 <block wx:else> 422 <block wx:else>
  423 +
422 <!-- 商品价格,先判断下是后又等级价--> 424 <!-- 商品价格,先判断下是后又等级价-->
423 <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}"> 425 <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}">
424 - <!-- 当会员是等级卡的时候 --> 426 +
  427 +
  428 + <!-- 当会员是等级卡的时候 -->
425 <block wx:if="{{card_field}}"> 429 <block wx:if="{{card_field}}">
426 <!-- 等级价>0 --> 430 <!-- 等级价>0 -->
427 <block wx:if="{{item[card_field]>0}}"> 431 <block wx:if="{{item[card_field]>0}}">
@@ -446,21 +450,25 @@ @@ -446,21 +450,25 @@
446 </block> 450 </block>
447 </block> 451 </block>
448 <block wx:else> 452 <block wx:else>
449 - <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> 453 +
  454 + <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}">
450 <view class="flex ai-center"> 455 <view class="flex ai-center">
451 <view class="price">¥{{item.shop_price}}</view> 456 <view class="price">¥{{item.shop_price}}</view>
452 <view class="word-line xc-ash mk_price">¥{{item.market_price}}</view> 457 <view class="word-line xc-ash mk_price">¥{{item.market_price}}</view>
453 </view> 458 </view>
454 <view class="comment flex jc_sb"> 459 <view class="comment flex jc_sb">
455 - <view class="flex ai_and"> 460 + <view class="flex ai-center">
456 <view class="">¥{{g_filter.get_card_price(item,card_list,0)}}</view> 461 <view class="">¥{{g_filter.get_card_price(item,card_list,0)}}</view>
457 - <view class="card_bg"> 462 + <view class="card_bg flex ai-center">
458 <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> 463 <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
459 - {{g_filter.get_card_price(item,card_list,1)}} 464 + <text>{{g_filter.get_card_price(item,card_list,1)}}</text>
460 </view> 465 </view>
461 </view> 466 </view>
462 - <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view>  
463 </view> 467 </view>
  468 +
  469 + <view class="fs24" style="color:#999; margin-top: 3rpx;">评论{{item.comment_count}} 已售{{item.sales_sum}}</view>
  470 +
  471 +
464 </block> 472 </block>
465 <block wx:else> 473 <block wx:else>
466 <view class="price">¥{{item.shop_price}}</view> 474 <view class="price">¥{{item.shop_price}}</view>
pages/goods/categoryList/categoryList.wxss
@@ -311,7 +311,7 @@ width: 60%; @@ -311,7 +311,7 @@ width: 60%;
311 max-height: 90%; 311 max-height: 90%;
312 overflow-y:scroll; 312 overflow-y:scroll;
313 overflow: hidden scroll; 313 overflow: hidden scroll;
314 - padding-bottom: 25rpx; 314 + padding-bottom: 65rpx;
315 315
316 316
317 } 317 }
pages/goods/categoryList/g_filter.wxs 0 → 100644
  1 +var g_filters = {
  2 + //-- 判断是不是有等级价 --
  3 + is_has_rank:function(rank_switch,item){
  4 + if(!rank_switch) return false;
  5 + if(item.cardprice1 || item.cardprice2 || item.cardprice3) {return true}
  6 + return false;
  7 + },
  8 +
  9 + //-- 判断,不是等级会员时候,要显示的最低等级价和名称 --
  10 + get_card_price:function(goods,all_card,type){
  11 + var price1=parseFloat(goods['cardprice1']);
  12 + var price2=parseFloat(goods['cardprice2']);
  13 + var price3=parseFloat(goods['cardprice3']);
  14 + if(!all_card){
  15 + if(type==0) return 0;
  16 + return "";
  17 + }
  18 +
  19 +
  20 + var arr=[];
  21 + var min_price= 0;
  22 + var min_name="";
  23 +
  24 + var min_price=null;
  25 + var min_name=null;
  26 + //---设置对应的价格名字----
  27 + for(var i=0;i<3;i++) {
  28 + var vl=all_card[i];
  29 + if(!vl) continue;
  30 + if(vl['CorrPrice']=="Price1" && price1>0)
  31 + {
  32 +
  33 + if(min_price==null) {
  34 + min_price=price1;min_name=vl['CardName'];
  35 + }
  36 + else if(price1<min_price) {
  37 + min_price=price1;min_name=vl['CardName'];
  38 + }
  39 + }
  40 + if(vl['CorrPrice']=="Price2" && price2>0)
  41 + {
  42 + if(min_price==null) {
  43 + min_price=price2;min_name=vl['CardName'];
  44 + }
  45 + else if(price2<min_price) {
  46 + min_price=price2;min_name=vl['CardName'];
  47 + }
  48 + }
  49 +
  50 + if(vl['CorrPrice']=="Price3" && price3>0)
  51 + {
  52 + if(min_price==null) {
  53 + min_price=price3;min_name=vl['CardName'];
  54 + }
  55 + else if(price3<min_price) {
  56 + min_price=price3;min_name=vl['CardName'];
  57 + }
  58 + }
  59 +
  60 + }
  61 +
  62 +
  63 + if(min_price==null){
  64 + if(type==0) return 0;
  65 + return "";
  66 + }
  67 +
  68 +
  69 + //if(type==0) return arr.length;
  70 + //--进行排序,升序---
  71 + /*---
  72 + arr.sort(function(a,b){
  73 + if (a.price < b.price) {
  74 + return -1;
  75 + } else if (a.fee == b.fee) {
  76 + return 0;
  77 + } else {
  78 + return 1;
  79 + }
  80 + })--*/
  81 + //-- 获取最下价钱,和相应的卡的名称 --
  82 + if(type==0) return min_price.toFixed(2);
  83 +
  84 + if(min_name.length>4) min_name=min_name.substring(0, 8);
  85 + return min_name;
  86 + },
  87 +}
  88 +module.exports = {
  89 + is_has_rank:g_filters.is_has_rank,
  90 + get_card_price:g_filters.get_card_price,
  91 +}
0 \ No newline at end of file 92 \ No newline at end of file
pages/goods/goodsInfo/g_filter.wxs
@@ -77,7 +77,7 @@ var g_filters = { @@ -77,7 +77,7 @@ var g_filters = {
77 //min_price=min.price; 77 //min_price=min.price;
78 //min_name=min.name; 78 //min_name=min.name;
79 if(type==0) return min_price.toFixed(2); 79 if(type==0) return min_price.toFixed(2);
80 - if(min_name.length>4 ) min_name=min_name.substring(0, 4); 80 + if(min_name.length>4) min_name=min_name.substring(0, 8);
81 return min_name; 81 return min_name;
82 }, 82 },
83 } 83 }
pages/goods/goodsInfo/goodsInfo.js
@@ -236,11 +236,12 @@ Page({ @@ -236,11 +236,12 @@ Page({
236 sales_rules:1, //默认是线上销售 236 sales_rules:1, //默认是线上销售
237 237
238 wait_for_user_store:null, 238 wait_for_user_store:null,
239 -  
240 prom_goods:null, //商品优惠列表 239 prom_goods:null, //商品优惠列表
241 order_prom:null, //订单优惠 240 order_prom:null, //订单优惠
242 collocationGoods:null, //搭配购 241 collocationGoods:null, //搭配购
243 - 242 +
  243 + poster:null, //自定义海报
  244 + share_b_img:'', //自定义分享的背景
244 }, 245 },
245 246
246 //------初始化加载---------- 247 //------初始化加载----------
@@ -254,7 +255,37 @@ Page({ @@ -254,7 +255,37 @@ Page({
254 gid = t.goods_id, 255 gid = t.goods_id,
255 first_leader=t.first_leader, 256 first_leader=t.first_leader,
256 room_id=t.room_id; 257 room_id=t.room_id;
257 - 258 +
  259 + //-- 自定义海报 --
  260 + getApp().request.promiseGet("/api/weshop/goods/poster/page",{
  261 + data:{store_id:os.stoid, type:1, is_user:1 }
  262 + }).then(res=>{
  263 + if(res.data.code==0){
  264 +
  265 + var poster_data=res.data.data.pageData[0];
  266 + var json_str=poster_data.jsonStr;
  267 +
  268 + if(json_str){
  269 + var json_data=JSON.parse(json_str);
  270 + if(json_data.bg_img){
  271 +
  272 + //-- 把图片那到本地 --
  273 + wx.getImageInfo({
  274 + src:json_data.bg_img,
  275 + success: function(res) {
  276 + var path= res.path;
  277 + th.setData({share_b_img:path})
  278 + },
  279 + fail: function(res) {}
  280 + });
  281 + }
  282 +
  283 + th.setData({poster:json_data})
  284 +
  285 + }
  286 + }
  287 + })
  288 +
258 //---获取手机地址坐标-- 289 //---获取手机地址坐标--
259 //--如果tg_id是空的话,分享回来-- 290 //--如果tg_id是空的话,分享回来--
260 if (gid == undefined || gid == null || gid == "") { 291 if (gid == undefined || gid == null || gid == "") {
@@ -347,7 +378,7 @@ Page({ @@ -347,7 +378,7 @@ Page({
347 //--- 判断是等级会员,且在有效期范围内 --- 378 //--- 判断是等级会员,且在有效期范围内 ---
348 if(user.card_field && now<end){ 379 if(user.card_field && now<end){
349 var card_name=ob.name_map.get(user.card_field); 380 var card_name=ob.name_map.get(user.card_field);
350 - if(card_name.length>5) card_name=card_name.substring(0,5); 381 + if(card_name.length>6) card_name=card_name.substring(0,6);
351 382
352 var is_near_date=0; 383 var is_near_date=0;
353 if(end-now<60*60*30*24) is_near_date=1; //如果小于30天 384 if(end-now<60*60*30*24) is_near_date=1; //如果小于30天
@@ -369,7 +400,7 @@ Page({ @@ -369,7 +400,7 @@ Page({
369 }) 400 })
370 } 401 }
371 }); 402 });
372 - 403 +
373 //获取用户的默认门店 404 //获取用户的默认门店
374 getApp().get_user_store(function(ee) { 405 getApp().get_user_store(function(ee) {
375 406
@@ -449,6 +480,8 @@ Page({ @@ -449,6 +480,8 @@ Page({
449 480
450 }); 481 });
451 482
  483 +
  484 +
452 }, 485 },
453 486
454 //------------程序初始化入口------------- 487 //------------程序初始化入口-------------
@@ -971,8 +1004,8 @@ Page({ @@ -971,8 +1004,8 @@ Page({
971 goods_name: o.goods_name, 1004 goods_name: o.goods_name,
972 goods_sn: o.goods_sn, 1005 goods_sn: o.goods_sn,
973 sku: o.sku, 1006 sku: o.sku,
974 - };  
975 - 1007 + };
  1008 +
976 //---是不是从收藏夹出来的--- 1009 //---是不是从收藏夹出来的---
977 if(th.data.c_guide_id){ 1010 if(th.data.c_guide_id){
978 newd['guide_id'] = th.data.c_guide_id; 1011 newd['guide_id'] = th.data.c_guide_id;
@@ -1345,7 +1378,7 @@ Page({ @@ -1345,7 +1378,7 @@ Page({
1345 var user_info = getApp().globalData.userInfo; 1378 var user_info = getApp().globalData.userInfo;
1346 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 1379 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
1347 wx.navigateTo({ 1380 wx.navigateTo({
1348 - url: '/pages/getphone/getphone', 1381 + url: '/pages/togoin/togoin',
1349 }) 1382 })
1350 return false; 1383 return false;
1351 } 1384 }
@@ -1520,12 +1553,18 @@ Page({ @@ -1520,12 +1553,18 @@ Page({
1520 if(getApp().globalData.user_id){ 1553 if(getApp().globalData.user_id){
1521 url+="&first_leader="+getApp().globalData.user_id; 1554 url+="&first_leader="+getApp().globalData.user_id;
1522 } 1555 }
1523 -  
1524 - return { 1556 +
  1557 + var ob={
1525 title: price + "元 " +title, 1558 title: price + "元 " +title,
1526 path:url, 1559 path:url,
1527 imageUrl: img, 1560 imageUrl: img,
1528 - } 1561 + };
  1562 + if(th.data.prom_type==6){
  1563 + title+='\n'+th.data.prom_act.share_remark;
  1564 + ob.title=title;
  1565 + ob.desc=th.data.prom_act.share_remark;
  1566 + }
  1567 + return ob;
1529 1568
1530 }, 1569 },
1531 1570
@@ -1767,7 +1806,6 @@ Page({ @@ -1767,7 +1806,6 @@ Page({
1767 th.setData({def_pick_store:null}); 1806 th.setData({def_pick_store:null});
1768 } 1807 }
1769 1808
1770 -  
1771 //----------获取门店---------------- 1809 //----------获取门店----------------
1772 getApp().request.promiseGet("/api/weshop/pickup/list", { 1810 getApp().request.promiseGet("/api/weshop/pickup/list", {
1773 data: dd, 1811 data: dd,
@@ -1828,7 +1866,9 @@ Page({ @@ -1828,7 +1866,9 @@ Page({
1828 data: { 1866 data: {
1829 store_id: o.stoid, 1867 store_id: o.stoid,
1830 is_show: 1, 1868 is_show: 1,
1831 - pageSize: 1000 1869 + pageSize: 1000,
  1870 + orderField:"sort",
  1871 + orderType:'asc',
1832 }, 1872 },
1833 success: function(ee) { 1873 success: function(ee) {
1834 if (ee.data.code == 0) { 1874 if (ee.data.code == 0) {
@@ -1853,12 +1893,12 @@ Page({ @@ -1853,12 +1893,12 @@ Page({
1853 //----要进行门店分组-------- 1893 //----要进行门店分组--------
1854 for (var i = 0; i < sto_arr.length; i++) { 1894 for (var i = 0; i < sto_arr.length; i++) {
1855 //找一下这个门店有没有在分类数组内 1895 //找一下这个门店有没有在分类数组内
1856 - var find2 = 0,  
1857 - find2name = ""; 1896 + var find2 = 0, find2name = "",sort=0;
1858 for (var m = 0; m < sto_cate.length; m++) { 1897 for (var m = 0; m < sto_cate.length; m++) {
1859 if (sto_arr[i].category_id == sto_cate[m].cat_id) { 1898 if (sto_arr[i].category_id == sto_cate[m].cat_id) {
1860 find2 = sto_cate[m].cat_id; 1899 find2 = sto_cate[m].cat_id;
1861 find2name = sto_cate[m].cat_name; 1900 find2name = sto_cate[m].cat_name;
  1901 + sort = sto_cate[m].sort;
1862 break; 1902 break;
1863 } 1903 }
1864 } 1904 }
@@ -1880,6 +1920,7 @@ Page({ @@ -1880,6 +1920,7 @@ Page({
1880 var item = { 1920 var item = {
1881 cat_id: find2, 1921 cat_id: find2,
1882 name: find2name, 1922 name: find2name,
  1923 + sort:sort,
1883 s_arr: arr0 1924 s_arr: arr0
1884 }; 1925 };
1885 newarr.push(item); 1926 newarr.push(item);
@@ -1895,6 +1936,7 @@ Page({ @@ -1895,6 +1936,7 @@ Page({
1895 var item = { 1936 var item = {
1896 cat_id: find2, 1937 cat_id: find2,
1897 name: find2name, 1938 name: find2name,
  1939 + sort:sort,
1898 s_arr: arr0 1940 s_arr: arr0
1899 }; 1941 };
1900 newarr.push(item); 1942 newarr.push(item);
@@ -1903,6 +1945,18 @@ Page({ @@ -1903,6 +1945,18 @@ Page({
1903 } 1945 }
1904 } 1946 }
1905 } 1947 }
  1948 +
  1949 + //门店分类要排序下
  1950 + function compare(property){
  1951 + return function(a,b){
  1952 + var value1 = a[property];
  1953 + var value2 = b[property];
  1954 + return value1 - value2;
  1955 + }
  1956 + }
  1957 + if(newarr.length>0)
  1958 + newarr.sort(compare("sort"));
  1959 +
1906 1960
1907 //----安排其他的分类----- 1961 //----安排其他的分类-----
1908 if (qita.length > 0) { 1962 if (qita.length > 0) {
@@ -1913,6 +1967,10 @@ Page({ @@ -1913,6 +1967,10 @@ Page({
1913 }; 1967 };
1914 newarr.push(item); 1968 newarr.push(item);
1915 } 1969 }
  1970 +
  1971 +
  1972 +
  1973 +
1916 th.setData({ 1974 th.setData({
1917 is_show_sto_cat: 1, 1975 is_show_sto_cat: 1,
1918 all_sto: newarr 1976 all_sto: newarr
@@ -2184,6 +2242,9 @@ Page({ @@ -2184,6 +2242,9 @@ Page({
2184 }); 2242 });
2185 return false; 2243 return false;
2186 } 2244 }
  2245 + if(prom_type==4){
  2246 + th.setData({is_integral_normal:1});
  2247 + }
2187 //if (prom_type != 3 && prom_type!=0){ 2248 //if (prom_type != 3 && prom_type!=0){
2188 //---判断秒杀---- 2249 //---判断秒杀----
2189 if (prom_type == 1) { 2250 if (prom_type == 1) {
@@ -2666,7 +2727,7 @@ Page({ @@ -2666,7 +2727,7 @@ Page({
2666 var user_info = getApp().globalData.userInfo; 2727 var user_info = getApp().globalData.userInfo;
2667 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 2728 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
2668 wx.navigateTo({ 2729 wx.navigateTo({
2669 - url: '/pages/getphone/getphone', 2730 + url: '/pages/togoin/togoin',
2670 }) 2731 })
2671 return false; 2732 return false;
2672 } 2733 }
@@ -3168,7 +3229,7 @@ Page({ @@ -3168,7 +3229,7 @@ Page({
3168 var user_info = getApp().globalData.userInfo; 3229 var user_info = getApp().globalData.userInfo;
3169 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 3230 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
3170 wx.navigateTo({ 3231 wx.navigateTo({
3171 - url: '/pages/getphone/getphone', 3232 + url: '/pages/togoin/togoin',
3172 }) 3233 })
3173 return false; 3234 return false;
3174 } 3235 }
@@ -3218,14 +3279,14 @@ Page({ @@ -3218,14 +3279,14 @@ Page({
3218 } 3279 }
3219 }) 3280 })
3220 }, 3281 },
3221 - 3282 +
3222 //--定义的保存图片方法,分享团--- 3283 //--定义的保存图片方法,分享团---
3223 saveImageToPhotosAlbum: function() { 3284 saveImageToPhotosAlbum: function() {
3224 //--先判断会员状态-- 3285 //--先判断会员状态--
3225 var user_info = getApp().globalData.userInfo; 3286 var user_info = getApp().globalData.userInfo;
3226 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 3287 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
3227 //getApp().my_warnning("请先登录",0,this); 3288 //getApp().my_warnning("请先登录",0,this);
3228 - wx.navigateTo({ url: '/pages/getphone/getphone', }) 3289 + wx.navigateTo({ url: '/pages/togoin/togoin', })
3229 return false; 3290 return false;
3230 } 3291 }
3231 3292
@@ -3245,7 +3306,7 @@ Page({ @@ -3245,7 +3306,7 @@ Page({
3245 }) 3306 })
3246 3307
3247 var app = getApp(); 3308 var app = getApp();
3248 - var unit = that.data.screenWidth / 750 * 1.35; 3309 + var unit = that.data.screenWidth / 750 * 1.35; //基础单位,
3249 var path2 = that.data.data.original_img; 3310 var path2 = that.data.data.original_img;
3250 var scene = th.data.gid+""; 3311 var scene = th.data.gid+"";
3251 var user_id=getApp().globalData.user_id?getApp().globalData.user_id:0; 3312 var user_id=getApp().globalData.user_id?getApp().globalData.user_id:0;
@@ -3269,19 +3330,51 @@ Page({ @@ -3269,19 +3330,51 @@ Page({
3269 var context = wx.createCanvasContext('share'); 3330 var context = wx.createCanvasContext('share');
3270 //先画背景 3331 //先画背景
3271 var pg_path = "../../../images/share/share_bg.png"; 3332 var pg_path = "../../../images/share/share_bg.png";
  3333 +
  3334 + //-- 如果有自定义海报的时候,判断背景的图片 --
  3335 + if(th.data.share_b_img){
  3336 + pg_path=th.data.share_b_img;
  3337 + }
3272 context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); 3338 context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit);
3273 - //--昵称---  
3274 - context.setFontSize(24 * unit)  
3275 - context.setFillStyle("black")  
3276 - context.fillText(app.globalData.userInfo.nickname, 152 * unit, 76 * unit);  
3277 - var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit;  
3278 - //强烈推荐 改许程  
3279 - var tj_path = "../../../images/share/q_tj.png";  
3280 - context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit);  
3281 - context.setFontSize(16 * unit)  
3282 - context.setLineJoin('round'); //交点设置成圆角  
3283 - context.setFillStyle("white")  
3284 - context.fillText('强烈推荐', 149 * unit + width + 15 * unit, 76 * unit); 3339 +
  3340 + //-- 是自定义海报的情况下 --
  3341 + if(th.data.poster && parseInt(th.data.poster.style)==2){
  3342 + //在线上分享人的情况下
  3343 + if(parseInt(th.data.poster.show_headpic)){
  3344 + //获取坐标
  3345 + var x=parseFloat(th.data.poster.head_x)*2;
  3346 + var y=parseFloat(th.data.poster.head_y)*2;
  3347 + var x1=(x+90) *unit;
  3348 + var y1=(y+50) *unit;
  3349 + //--昵称---
  3350 + context.setFontSize(24 * unit)
  3351 + context.setFillStyle("black")
  3352 + context.fillText(app.globalData.userInfo.nickname, x1, y1);
  3353 + var width = 24 * app.globalData.userInfo.nickname.length * unit + 4 * unit;
  3354 + //强烈推荐 改许程
  3355 + var tj_path = "../../../images/share/q_tj.png";
  3356 + context.drawImage(tj_path, x1 + width, y1-22*unit, 85 * unit, 30 * unit);
  3357 + context.setFontSize(16 * unit)
  3358 + context.setLineJoin('round'); //交点设置成圆角
  3359 + context.setFillStyle("white")
  3360 + context.fillText('强烈推荐', x1 + width+8*unit, y1-1*unit);
  3361 + }
  3362 + }else{
  3363 + //--昵称---
  3364 + context.setFontSize(24 * unit)
  3365 + context.setFillStyle("black")
  3366 + context.fillText(app.globalData.userInfo.nickname, 152 * unit, 76 * unit);
  3367 + var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit;
  3368 + //强烈推荐 改许程
  3369 + var tj_path = "../../../images/share/q_tj.png";
  3370 + context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit);
  3371 + context.setFontSize(16 * unit)
  3372 + context.setLineJoin('round'); //交点设置成圆角
  3373 + context.setFillStyle("white")
  3374 + context.fillText('强烈推荐', 149 * unit + width + 15 * unit, 76 * unit);
  3375 + }
  3376 +
  3377 +
3285 3378
3286 //---产品名称--- 3379 //---产品名称---
3287 //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度 3380 //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度
@@ -3315,21 +3408,44 @@ Page({ @@ -3315,21 +3408,44 @@ Page({
3315 switch (type) { 3408 switch (type) {
3316 case 0: //普通商品的展示 3409 case 0: //普通商品的展示
3317 //中间的几个字 3410 //中间的几个字
3318 - var g_path = "../../../images/share/s_gou.png";  
3319 - context.drawImage(g_path, 56 * unit, 670 * unit, 22 * unit, 22 * unit);  
3320 - context.setFillStyle("red")  
3321 - context.setFontSize(18 * unit)  
3322 - context.fillText("正品保证", 84 * unit, 690 * unit);  
3323 -  
3324 - context.drawImage(g_path, 218 * unit, 670 * unit, 22 * unit, 22 * unit);  
3325 - context.setFillStyle("red")  
3326 - context.setFontSize(18 * unit)  
3327 - context.fillText("纯实体店", 246 * unit, 690 * unit);  
3328 -  
3329 - context.drawImage(g_path, 388 * unit, 670 * unit, 22 * unit, 22 * unit);  
3330 - context.setFillStyle("red")  
3331 - context.setFontSize(18 * unit)  
3332 - context.fillText("官方验证", 420 * unit, 690 * unit); 3411 + if(th.data.poster && parseInt(th.data.poster.style)==2 ){
  3412 + if(parseInt(th.data.poster.show_quality)){
  3413 + var g_path = "../../../images/share/s_gou.png";
  3414 + context.drawImage(g_path, 56 * unit, 670 * unit, 22 * unit, 22 * unit);
  3415 + context.setFillStyle("red")
  3416 + context.setFontSize(18 * unit)
  3417 + context.fillText("正品保证", 84 * unit, 690 * unit);
  3418 +
  3419 + context.drawImage(g_path, 218 * unit, 670 * unit, 22 * unit, 22 * unit);
  3420 + context.setFillStyle("red")
  3421 + context.setFontSize(18 * unit)
  3422 + context.fillText("纯实体店", 246 * unit, 690 * unit);
  3423 +
  3424 + context.drawImage(g_path, 388 * unit, 670 * unit, 22 * unit, 22 * unit);
  3425 + context.setFillStyle("red")
  3426 + context.setFontSize(18 * unit)
  3427 + context.fillText("官方验证", 420 * unit, 690 * unit);
  3428 + }
  3429 +
  3430 + }else{
  3431 + var g_path = "../../../images/share/s_gou.png";
  3432 + context.drawImage(g_path, 56 * unit, 670 * unit, 22 * unit, 22 * unit);
  3433 + context.setFillStyle("red")
  3434 + context.setFontSize(18 * unit)
  3435 + context.fillText("正品保证", 84 * unit, 690 * unit);
  3436 +
  3437 + context.drawImage(g_path, 218 * unit, 670 * unit, 22 * unit, 22 * unit);
  3438 + context.setFillStyle("red")
  3439 + context.setFontSize(18 * unit)
  3440 + context.fillText("纯实体店", 246 * unit, 690 * unit);
  3441 +
  3442 + context.drawImage(g_path, 388 * unit, 670 * unit, 22 * unit, 22 * unit);
  3443 + context.setFillStyle("red")
  3444 + context.setFontSize(18 * unit)
  3445 + context.fillText("官方验证", 420 * unit, 690 * unit);
  3446 + }
  3447 +
  3448 +
3333 //---画线--- 3449 //---画线---
3334 context.setLineWidth(1 * unit) 3450 context.setLineWidth(1 * unit)
3335 context.moveTo(32 * unit, 710 * unit) 3451 context.moveTo(32 * unit, 710 * unit)
@@ -3338,15 +3454,21 @@ Page({ @@ -3338,15 +3454,21 @@ Page({
3338 //---文字--- 3454 //---文字---
3339 context.setFillStyle("black") 3455 context.setFillStyle("black")
3340 context.setFontSize(22 * unit) 3456 context.setFontSize(22 * unit)
3341 - // 原来start --->  
3342 - context.fillText("优惠乐翻天,精彩就在你身边", 40 * unit, 776 * unit);  
3343 - context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 826 * unit);  
3344 - // <--- 原来end  
3345 - // context.fillText("优惠乐翻天,精彩就在你身边", 40 * unit, 816 * unit);  
3346 - // context.setFontSize(18 * unit)  
3347 - // context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 850 * unit);  
3348 - //---二维吗图---  
3349 - context.drawImage(vpath, 380 * unit, 736 * unit, 120 * unit, 120 * unit); 3457 + // 原来start --->
  3458 + context.fillText("优惠乐翻天,精彩就在你身边", 40 * unit, 776 * unit);
  3459 + context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 826 * unit);
  3460 +
  3461 + //---二维吗图---
  3462 + //-- 自定义海报 --
  3463 + if(th.data.poster){
  3464 + var erm_x= parseFloat(th.data.poster.ewm_x)*2;
  3465 + var erm_y= parseFloat(th.data.poster.ewm_y)*2;
  3466 + context.drawImage(vpath, erm_x * unit, erm_y * unit, 120 * unit, 120 * unit);
  3467 + }else{
  3468 + //---二维吗图---
  3469 + context.drawImage(vpath, 420 * unit, 726 * unit, 120 * unit, 120 * unit);
  3470 + }
  3471 +
3350 break; 3472 break;
3351 case 1: //秒杀商品的展示 3473 case 1: //秒杀商品的展示
3352 //---画线--- 3474 //---画线---
@@ -3365,7 +3487,17 @@ Page({ @@ -3365,7 +3487,17 @@ Page({
3365 context.fillText("特惠好物,限时秒杀", 40 * unit, 806 * unit); 3487 context.fillText("特惠好物,限时秒杀", 40 * unit, 806 * unit);
3366 context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 846 * unit); 3488 context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 846 * unit);
3367 //---二维吗图--- 3489 //---二维吗图---
3368 - context.drawImage(vpath, 380 * unit, 736 * unit, 120 * unit, 120 * unit); 3490 + //-- 自定义海报 --
  3491 + if(th.data.poster){
  3492 + var erm_x= parseFloat(th.data.poster.ewm_x)*2;
  3493 + var erm_y= parseFloat(th.data.poster.ewm_y)*2;
  3494 + context.drawImage(vpath, erm_x * unit, erm_y * unit, 120 * unit, 120 * unit);
  3495 + }else{
  3496 + //---二维吗图---
  3497 + context.drawImage(vpath, 420 * unit, 726 * unit, 120 * unit, 120 * unit);
  3498 + }
  3499 +
  3500 +
3369 break; 3501 break;
3370 3502
3371 case 2: //会员团和商家团的展示 3503 case 2: //会员团和商家团的展示
@@ -3401,7 +3533,15 @@ Page({ @@ -3401,7 +3533,15 @@ Page({
3401 context.setFontSize(21.3 * unit) 3533 context.setFontSize(21.3 * unit)
3402 context.fillText("长按识别二维码,立即参团", 40 * unit, 856 * unit); 3534 context.fillText("长按识别二维码,立即参团", 40 * unit, 856 * unit);
3403 //---二维吗图--- 3535 //---二维吗图---
3404 - context.drawImage(vpath, 420 * unit, 726 * unit, 120 * unit, 120 * unit); 3536 + //-- 自定义海报 --
  3537 + if(th.data.poster){
  3538 + var erm_x= parseFloat(th.data.poster.ewm_x)*2;
  3539 + var erm_y= parseFloat(th.data.poster.ewm_y)*2;
  3540 + context.drawImage(vpath, erm_x * unit, erm_y * unit, 120 * unit, 120 * unit);
  3541 + }else{
  3542 + //---二维吗图---
  3543 + context.drawImage(vpath, 420 * unit, 726 * unit, 120 * unit, 120 * unit);
  3544 + }
3405 break 3545 break
3406 case 3: //阶梯团的展示 3546 case 3: //阶梯团的展示
3407 //---画线--- 3547 //---画线---
@@ -3436,27 +3576,62 @@ Page({ @@ -3436,27 +3576,62 @@ Page({
3436 context.font = 'normal bold 18px sans-serif'; 3576 context.font = 'normal bold 18px sans-serif';
3437 context.setFontSize(22 * unit) 3577 context.setFontSize(22 * unit)
3438 context.fillText("长按识别二维码,立即参团", 40 * unit, 860 * unit); 3578 context.fillText("长按识别二维码,立即参团", 40 * unit, 860 * unit);
3439 - //---二维吗图---  
3440 - context.drawImage(vpath, 420 * unit, 726 * unit, 120 * unit, 120 * unit);  
3441 - 3579 +
  3580 + //-- 自定义海报 --
  3581 + if(th.data.poster){
  3582 + var erm_x= parseFloat(th.data.poster.ewm_x)*2;
  3583 + var erm_y= parseFloat(th.data.poster.ewm_y)*2;
  3584 + context.drawImage(vpath, erm_x * unit, erm_y * unit, 120 * unit, 120 * unit);
  3585 + }else{
  3586 + //---二维吗图---
  3587 + context.drawImage(vpath, 420 * unit, 726 * unit, 120 * unit, 120 * unit);
  3588 + }
3442 break 3589 break
3443 } 3590 }
3444 -  
3445 - //---绘制圆形要放在最后----  
3446 - context.save();  
3447 - context.beginPath();  
3448 - var h_x = 60 * unit;  
3449 - var h_y = 24 * unit;  
3450 - var h_r = 40 * unit;  
3451 - var cx = h_x + h_r;  
3452 - var cy = h_y + h_r;  
3453 - context.arc(cx, cy, h_r, 0, Math.PI * 2, false);  
3454 - context.closePath();  
3455 - context.fill();  
3456 - context.clip();  
3457 - context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2);  
3458 - context.restore();  
3459 - 3591 +
  3592 +
  3593 + //--- 如果是自定义海报的时候 ---
  3594 + if(th.data.poster && parseInt(th.data.poster.style)==2){
  3595 +
  3596 + //如果显示会员信息的话
  3597 + if(parseInt(th.data.poster.show_headpic)){
  3598 + //获取坐标
  3599 + var x= parseFloat(th.data.poster.head_x)*2;
  3600 + var y=parseFloat(th.data.poster.head_y)*2;
  3601 + //---绘制圆形要放在最后----
  3602 + context.save();
  3603 + context.beginPath();
  3604 + var h_x = x* unit;
  3605 + var h_y = y * unit;
  3606 + var h_r = 40 * unit;
  3607 + var cx = h_x + h_r;
  3608 + var cy = h_y + h_r;
  3609 + context.arc(cx, cy, h_r, 0, Math.PI * 2, false);
  3610 + context.closePath();
  3611 + context.fill();
  3612 + context.clip();
  3613 + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2);
  3614 + context.restore();
  3615 + }
  3616 +
  3617 + }else{
  3618 + //---绘制圆形要放在最后----
  3619 + context.save();
  3620 + context.beginPath();
  3621 + var h_x = 60 * unit;
  3622 + var h_y = 24 * unit;
  3623 + var h_r = 40 * unit;
  3624 + var cx = h_x + h_r;
  3625 + var cy = h_y + h_r;
  3626 + context.arc(cx, cy, h_r, 0, Math.PI * 2, false);
  3627 + context.closePath();
  3628 + context.fill();
  3629 + context.clip();
  3630 + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2);
  3631 + context.restore();
  3632 + }
  3633 +
  3634 +
3460 //把画板内容绘制成图片,并回调 画板图片路径 3635 //把画板内容绘制成图片,并回调 画板图片路径
3461 context.draw(false, function() { 3636 context.draw(false, function() {
3462 setTimeout(function() { 3637 setTimeout(function() {
@@ -3588,6 +3763,7 @@ Page({ @@ -3588,6 +3763,7 @@ Page({
3588 tt(func); 3763 tt(func);
3589 } else { 3764 } else {
3590 path2 = path2.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); 3765 path2 = path2.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn");
  3766 + path2 = path2.replace("https://thirdwx.qlogo.cn", "https://wx.qlogo.cn");
3591 wx.getImageInfo({ 3767 wx.getImageInfo({
3592 src: path2, 3768 src: path2,
3593 success: function(res) { 3769 success: function(res) {
@@ -3698,7 +3874,7 @@ Page({ @@ -3698,7 +3874,7 @@ Page({
3698 3874
3699 if (bconfig.is_sort_storage) { 3875 if (bconfig.is_sort_storage) {
3700 wx.getLocation({ 3876 wx.getLocation({
3701 - type: 'wgs84', 3877 + type: 'gcj02',
3702 success: function(res) { 3878 success: function(res) {
3703 3879
3704 th.data.lat = res.latitude; 3880 th.data.lat = res.latitude;
@@ -4039,7 +4215,7 @@ Page({ @@ -4039,7 +4215,7 @@ Page({
4039 var e = th.data.bconfig; 4215 var e = th.data.bconfig;
4040 if (e.is_sort_storage) { 4216 if (e.is_sort_storage) {
4041 wx.getLocation({ 4217 wx.getLocation({
4042 - type: 'wgs84', 4218 + type: 'gcj02',
4043 success: function(res) { 4219 success: function(res) {
4044 th.data.lat = res.latitude; 4220 th.data.lat = res.latitude;
4045 th.data.lon = res.longitude; 4221 th.data.lon = res.longitude;
pages/goods/goodsInfo/goodsInfo.wxml
@@ -230,6 +230,7 @@ @@ -230,6 +230,7 @@
230 </view> 230 </view>
231 </view> 231 </view>
232 232
  233 + <!-- 不是拼团 -->
233 <block wx:if="{{prom_type!=6}}"> 234 <block wx:if="{{prom_type!=6}}">
234 <view class="goods-price rel"> 235 <view class="goods-price rel">
235 <view class="co-red" style="overflow: hidden" wx:if="{{prom_type==0 || prom_type==3}}"> 236 <view class="co-red" style="overflow: hidden" wx:if="{{prom_type==0 || prom_type==3}}">
@@ -258,12 +259,9 @@ @@ -258,12 +259,9 @@
258 <view class="share-font">分享</view> 259 <view class="share-font">分享</view>
259 </view> 260 </view>
260 261
261 -  
262 -  
263 -  
264 - <!-- 等级卡的价格,不是等级卡会员,且商品又有设置等级级价,商家后台有开通升级卡同能 -->  
265 -  
266 - <view class="flex ai_and" wx:if="{{!card_field && g_filters.is_has_rank(rank_switch,data)}}"> 262 + <!-- 不是秒杀 -->
  263 + <!-- 等级卡的价格,不是等级卡会员,且商品又有设置等级级价,商家后台有开通升级卡同能 -->
  264 + <view class="flex ai_and" wx:if="{{!card_field && g_filters.is_has_rank(rank_switch,data) && prom_type!=1 }}">
267 265
268 <view class="flex ai-center grade-card-frame card-frame" > 266 <view class="flex ai-center grade-card-frame card-frame" >
269 <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> 267 <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image>
@@ -279,7 +277,8 @@ @@ -279,7 +277,8 @@
279 277
280 <block wx:if="{{g_filters.is_has_rank(rank_switch,data)}}"> 278 <block wx:if="{{g_filters.is_has_rank(rank_switch,data)}}">
281 279
282 - <view wx:if="{{!card_field }}"> 280 + <!-- 不是秒杀,且会员不是等级会员 -->
  281 + <view wx:if="{{!card_field && prom_type!=1 }}">
283 <view class="beauty-makeup-frame flex ai-center"> 282 <view class="beauty-makeup-frame flex ai-center">
284 <view class="left flex ai-center"> 283 <view class="left flex ai-center">
285 <view class="flex ai-center grade-card-frame card-frame advert-card"> 284 <view class="flex ai-center grade-card-frame card-frame advert-card">
@@ -287,13 +286,13 @@ @@ -287,13 +286,13 @@
287 <view class="fs24 white view card-name ellipsis-1">{{g_filters.get_card_price(data,card_list,1)}}</view> 286 <view class="fs24 white view card-name ellipsis-1">{{g_filters.get_card_price(data,card_list,1)}}</view>
288 </view> 287 </view>
289 <view class="card-effect"> 288 <view class="card-effect">
290 - <view class="fs24 xc-black3">成为{{g_filters.get_card_price(data,card_list,1)}}立<text class="co-red">省{{filters.toFix(data.market_price-g_filters.get_card_price(data,card_list,0),2)}}</text>元</view> 289 + <view class="fs24 xc-black3">成为{{g_filters.get_card_price(data,card_list,1)}}立<text class="co-red">省{{filters.toFix(data.shop_price-g_filters.get_card_price(data,card_list,0),2)}}</text>元</view>
291 <view class="fs22 xc-ash"> 开通会员 尽享更多优惠 </view> 290 <view class="fs22 xc-ash"> 开通会员 尽享更多优惠 </view>
292 </view> 291 </view>
293 </view> 292 </view>
294 <view class="right flex jc-center ai-center" bindtap="go_plus"> 293 <view class="right flex jc-center ai-center" bindtap="go_plus">
295 - <view class="at_once_carde xc-black3 fs28">立即开卡</view>  
296 - <view class="bg_right"></view> 294 + <view class="at_once_carde xc-black3 fs28">立即开卡</view>
  295 + <view class="bg_right"></view>
297 </view> 296 </view>
298 297
299 </view> 298 </view>
@@ -481,7 +480,7 @@ @@ -481,7 +480,7 @@
481 480
482 <view class="bz_view flex ai-center" wx:if="{{bconfig}}" style="line-height: 36rpx"> 481 <view class="bz_view flex ai-center" wx:if="{{bconfig}}" style="line-height: 36rpx">
483 <image class="bzfu_img" src="{{iurl}}/miniapp/images/bzfu_w.png"></image> 482 <image class="bzfu_img" src="{{iurl}}/miniapp/images/bzfu_w.png"></image>
484 - <view>{{bconfig.service_bz}}</view> 483 + <view class="bz-content">{{bconfig.service_bz}}</view>
485 </view> 484 </view>
486 485
487 486
pages/goods/goodsInfo/goodsInfo.wxss
@@ -948,7 +948,7 @@ left:31rpx;} @@ -948,7 +948,7 @@ left:31rpx;}
948 .item_right text{ margin-left: 66rpx;} 948 .item_right text{ margin-left: 66rpx;}
949 949
950 .bzfu_img{ width: 164rpx; height:34rpx; margin-right: 18rpx; margin-left: 12rpx } 950 .bzfu_img{ width: 164rpx; height:34rpx; margin-right: 18rpx; margin-left: 12rpx }
951 - .bz_view{ height:100rpx; padding: 0 13rpx; color: #333; font-size: 28rpx; 951 + .bz_view{ height:100rpx; padding: 0 34rpx 0 13rpx; color: #333; font-size: 28rpx;
952 border-bottom: 3rpx solid #eee; border-top: 3rpx solid #eee; } 952 border-bottom: 3rpx solid #eee; border-top: 3rpx solid #eee; }
953 .bz_view view{ width: 460rpx; max-height: 70rpx; overflow: hidden;} 953 .bz_view view{ width: 460rpx; max-height: 70rpx; overflow: hidden;}
954 954
@@ -963,6 +963,11 @@ left:31rpx;} @@ -963,6 +963,11 @@ left:31rpx;}
963 } 963 }
964 .bg_jj.down1{transform: rotate(135deg);} 964 .bg_jj.down1{transform: rotate(135deg);}
965 965
  966 +.bz-content {
  967 + flex-grow: 1;
  968 + text-align: justify;
  969 +}
  970 +
966 /* 顶部边框 */ 971 /* 顶部边框 */
967 .topframe{ 972 .topframe{
968 width: 100%; 973 width: 100%;
pages/goods/goodsList/g_filter.wxs
@@ -7,7 +7,7 @@ var g_filters = { @@ -7,7 +7,7 @@ var g_filters = {
7 }, 7 },
8 8
9 //-- 判断,不是等级会员时候,要显示的最低等级价和名称 -- 9 //-- 判断,不是等级会员时候,要显示的最低等级价和名称 --
10 - get_card_price:function(goods,all_card,type){ 10 + get_card_price:function(goods,all_card,type){
11 var price1=parseFloat(goods['cardprice1']); 11 var price1=parseFloat(goods['cardprice1']);
12 var price2=parseFloat(goods['cardprice2']); 12 var price2=parseFloat(goods['cardprice2']);
13 var price3=parseFloat(goods['cardprice3']); 13 var price3=parseFloat(goods['cardprice3']);
@@ -32,7 +32,7 @@ var g_filters = { @@ -32,7 +32,7 @@ var g_filters = {
32 min_price=price1;min_name=vl['CardName']; 32 min_price=price1;min_name=vl['CardName'];
33 } 33 }
34 else if(price1<min_price) { 34 else if(price1<min_price) {
35 - min_price=price1;min_name=vl['CardName']; 35 + min_price=price1;min_name=vl['CardName'];
36 } 36 }
37 } 37 }
38 if(vl['CorrPrice']=="Price2" && price2>0) 38 if(vl['CorrPrice']=="Price2" && price2>0)
@@ -41,7 +41,7 @@ var g_filters = { @@ -41,7 +41,7 @@ var g_filters = {
41 min_price=price2;min_name=vl['CardName']; 41 min_price=price2;min_name=vl['CardName'];
42 } 42 }
43 else if(price2<min_price) { 43 else if(price2<min_price) {
44 - min_price=price2;min_name=vl['CardName']; 44 + min_price=price2;min_name=vl['CardName'];
45 } 45 }
46 } 46 }
47 47
@@ -51,7 +51,7 @@ var g_filters = { @@ -51,7 +51,7 @@ var g_filters = {
51 min_price=price3;min_name=vl['CardName']; 51 min_price=price3;min_name=vl['CardName'];
52 } 52 }
53 else if(price3<min_price) { 53 else if(price3<min_price) {
54 - min_price=price3;min_name=vl['CardName']; 54 + min_price=price3;min_name=vl['CardName'];
55 } 55 }
56 } 56 }
57 57
@@ -73,11 +73,10 @@ var g_filters = { @@ -73,11 +73,10 @@ var g_filters = {
73 return 1; 73 return 1;
74 } 74 }
75 })--*/ 75 })--*/
76 - //-- 获取最下价钱,和相应的卡的名称 --  
77 - //min_price=min.price;  
78 - //min_name=min.name; 76 + //-- 获取最下价钱,和相应的卡的名称 --
79 if(type==0) return min_price.toFixed(2); 77 if(type==0) return min_price.toFixed(2);
80 - if(min_name.length>4 ) min_name=min_name.substring(0, 4); 78 +
  79 + if(min_name.length>4) min_name=min_name.substring(0, 8);
81 return min_name; 80 return min_name;
82 }, 81 },
83 } 82 }
pages/goods/goodsList/goodsList.js
@@ -105,7 +105,7 @@ Page({ @@ -105,7 +105,7 @@ Page({
105 //--- 判断是等级会员,且在有效期范围内 --- 105 //--- 判断是等级会员,且在有效期范围内 ---
106 if(user.card_field && now<end){ 106 if(user.card_field && now<end){
107 var card_name=ob.name_map.get(user.card_field); 107 var card_name=ob.name_map.get(user.card_field);
108 - if(card_name.length>4) card_name=card_name.substring(0,4); 108 + // if(card_name.length>4) card_name=card_name.substring(0,4);
109 th.setData({card_field:user.card_field,card_name:card_name,card_list:ob.card_list}); 109 th.setData({card_field:user.card_field,card_name:card_name,card_list:ob.card_list});
110 } 110 }
111 } 111 }
pages/goods/goodsList/goodsList.wxml
@@ -52,7 +52,7 @@ @@ -52,7 +52,7 @@
52 <view class="item-cont"> 52 <view class="item-cont">
53 <view class="title">{{item.goods_name}}</view> 53 <view class="title">{{item.goods_name}}</view>
54 <!-- 判断是否有活动价 --> 54 <!-- 判断是否有活动价 -->
55 - <block wx:if="{{item.prom_price>0}}"> 55 + <block wx:if="{{item.prom_price>0 && item.prom_type!=2 && item.prom_type!=4}}">
56 <!-- 活动价 --> 56 <!-- 活动价 -->
57 <view class="price">¥{{item.prom_price}}</view> 57 <view class="price">¥{{item.prom_price}}</view>
58 <view class="comment flex jc_sb"> 58 <view class="comment flex jc_sb">
pages/goods/search/g_filter.wxs
@@ -77,7 +77,7 @@ var g_filters = { @@ -77,7 +77,7 @@ var g_filters = {
77 //min_price=min.price; 77 //min_price=min.price;
78 //min_name=min.name; 78 //min_name=min.name;
79 if(type==0) return min_price.toFixed(2); 79 if(type==0) return min_price.toFixed(2);
80 - if(min_name.length>4 ) min_name=min_name.substring(0, 4); 80 + if(min_name.length>7 ) min_name=min_name.substring(0, 8);
81 return min_name; 81 return min_name;
82 }, 82 },
83 } 83 }
pages/goods/search/search.js
@@ -78,7 +78,7 @@ Page({ @@ -78,7 +78,7 @@ Page({
78 //--- 判断是等级会员,且在有效期范围内 --- 78 //--- 判断是等级会员,且在有效期范围内 ---
79 if(user.card_field && now<end){ 79 if(user.card_field && now<end){
80 var card_name=ob.name_map.get(user.card_field); 80 var card_name=ob.name_map.get(user.card_field);
81 - if(card_name.length>4) card_name=card_name.substring(0,4); 81 + if(card_name.length>7) card_name=card_name.substring(0,8);
82 th.setData({card_field:user.card_field,card_name:card_name,card_list:ob.card_list}); 82 th.setData({card_field:user.card_field,card_name:card_name,card_list:ob.card_list});
83 } 83 }
84 } 84 }
pages/goods/search/search.wxml
@@ -28,14 +28,14 @@ @@ -28,14 +28,14 @@
28 </navigator> 28 </navigator>
29 </view> 29 </view>
30 <view class="choice_list"> 30 <view class="choice_list">
31 - <navigator class="choice_item" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" wx:for="{{requestData}}" wx:key="{{index}}"> 31 + <navigator class="choice_item flex ai-center" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" wx:for="{{requestData}}" wx:key="{{index}}">
32 <view class="img-wrap"> 32 <view class="img-wrap">
33 <image src="{{item.original_img}}" lazy-load="true" binderror="bind_bnerr" data-errorimg="requestData[{{index}}].original_img"></image> 33 <image src="{{item.original_img}}" lazy-load="true" binderror="bind_bnerr" data-errorimg="requestData[{{index}}].original_img"></image>
34 </view> 34 </view>
35 <view class="item-cont"> 35 <view class="item-cont">
36 - <view class="title">{{item.goods_name}}</view>  
37 - <!-- 判断是否有活动价 -->  
38 - <block wx:if="{{item.prom_price>0}}"> 36 + <view class="title ellipsis-2">{{item.goods_name}}</view>
  37 + <!-- 判断是否有活动价,小程序没有有团购和拼单 -->
  38 + <block wx:if="{{item.prom_price>0 && item.prom_type!=2 && item.prom_type!=4}}">
39 <!-- 活动价 --> 39 <!-- 活动价 -->
40 <view class="price">¥{{item.prom_price}}</view> 40 <view class="price">¥{{item.prom_price}}</view>
41 <view class="comment flex jc_sb"> 41 <view class="comment flex jc_sb">
@@ -50,11 +50,12 @@ @@ -50,11 +50,12 @@
50 <block wx:if="{{card_field}}"> 50 <block wx:if="{{card_field}}">
51 <!-- 等级价>0 --> 51 <!-- 等级价>0 -->
52 <block wx:if="{{item[card_field]>0}}"> 52 <block wx:if="{{item[card_field]>0}}">
53 - <view class="flex ai_and"> 53 + <view class="flex ai_center">
54 <view class="price">¥{{item[card_field]}}</view> 54 <view class="price">¥{{item[card_field]}}</view>
55 - <view class="card_bg">  
56 - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>  
57 - <view class="card_name">{{card_name}}</view> 55 + <view class="card_bg flex ai-center">
  56 + <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
  57 + <!-- <view class="card_name ellipsis-1">{{card_name}}</view> -->
  58 + <text class="ellipsis-1">{{card_name}}</text>
58 </view> 59 </view>
59 </view> 60 </view>
60 <view class="comment flex jc_sb"> 61 <view class="comment flex jc_sb">
@@ -77,11 +78,13 @@ @@ -77,11 +78,13 @@
77 <view class="word-line xc-ash mk_price">¥{{item.market_price}}</view> 78 <view class="word-line xc-ash mk_price">¥{{item.market_price}}</view>
78 </view> 79 </view>
79 <view class="comment flex jc_sb"> 80 <view class="comment flex jc_sb">
80 - <view class="flex ai_and"> 81 + <view class="flex ai_center">
81 <view class="">¥{{g_filter.get_card_price(item,card_list,0)}}</view> 82 <view class="">¥{{g_filter.get_card_price(item,card_list,0)}}</view>
82 - <view class="card_bg">  
83 - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>  
84 - {{g_filter.get_card_price(item,card_list,1)}} 83 + <view class="card_bg flex">
  84 + <view class="flex ai-center">
  85 + <image src="{{url}}/miniapp/images/plus/dj_icon.png" class=""></image>
  86 + <text class="ellipsis-1">{{g_filter.get_card_price(item,card_list,1)}}</text>
  87 + </view>
85 </view> 88 </view>
86 </view> 89 </view>
87 <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> 90 <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view>
pages/goods/search/search.wxss
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 align-items: center; 11 align-items: center;
12 justify-content: center; 12 justify-content: center;
13 font-size: 32rpx; 13 font-size: 32rpx;
14 - border-bottom: 1px solid #dfefef; 14 + border-bottom: 2rpx solid #E6E6E6;
15 background-color: #fff; 15 background-color: #fff;
16 } 16 }
17 17
@@ -64,15 +64,17 @@ @@ -64,15 +64,17 @@
64 width: 100%; 64 width: 100%;
65 min-height: 200rpx; 65 min-height: 200rpx;
66 padding: 10rpx 0; 66 padding: 10rpx 0;
67 - border-bottom: 1px solid #dfefef; 67 + border-bottom: 2rpx solid #E6E6E6;
68 font-size: 30rpx; 68 font-size: 30rpx;
69 } 69 }
70 70
71 .img-wrap { 71 .img-wrap {
72 - float: left; 72 + /* float: left; */
73 width: 180rpx; 73 width: 180rpx;
74 height: 180rpx; 74 height: 180rpx;
75 - padding: 0 10rpx 10rpx; 75 + padding: 0 10rpx 0 30rpx;
  76 + flex-shrink: 0;
  77 + /* padding: 10rpx; */
76 } 78 }
77 79
78 .img-wrap image { 80 .img-wrap image {
@@ -83,16 +85,17 @@ @@ -83,16 +85,17 @@
83 .item-cont .title { 85 .item-cont .title {
84 height: 72rpx; 86 height: 72rpx;
85 margin: 16rpx 0; 87 margin: 16rpx 0;
86 - padding-right: 10rpx; 88 + padding-right: 30rpx;
87 line-height: 36rpx; 89 line-height: 36rpx;
88 color: #333; 90 color: #333;
89 overflow: hidden; 91 overflow: hidden;
  92 + text-align: justify;
90 } 93 }
91 94
92 .price { 95 .price {
93 display: inline-block; 96 display: inline-block;
94 color: #f23030; 97 color: #f23030;
95 - line-height: 24rpx; 98 + /* line-height: 24rpx; */
96 /* padding-bottom: 20rpx; */ 99 /* padding-bottom: 20rpx; */
97 } 100 }
98 101
@@ -226,7 +229,7 @@ @@ -226,7 +229,7 @@
226 margin-left: 15rpx; 229 margin-left: 15rpx;
227 } 230 }
228 231
229 -.card_bg { 232 +/* .card_bg {
230 display: flex; 233 display: flex;
231 max-width: 110rpx; 234 max-width: 110rpx;
232 height: 25rpx; 235 height: 25rpx;
@@ -241,11 +244,36 @@ @@ -241,11 +244,36 @@
241 margin-top: 7rpx; 244 margin-top: 7rpx;
242 line-height: 25rpx; 245 line-height: 25rpx;
243 width: auto; 246 width: auto;
  247 +} */
  248 +
  249 +.card_bg {
  250 + box-sizing: border-box;
  251 + padding: 2rpx 10rpx;
  252 + /* height: 28rpx; */
  253 + border-radius: 26rpx;
  254 + font-size: 18rpx;
  255 + /* line-height: 28rpx; */
  256 + max-width: 210rpx;
  257 + background: #333;
  258 + color: #fff;
  259 + margin-left: 8rpx;
244 } 260 }
245 261
246 .card_bg image { 262 .card_bg image {
247 width: 19rpx; 263 width: 19rpx;
248 height: 19rpx; 264 height: 19rpx;
  265 + margin-right: 8rpx;
  266 + flex-shrink: 0;
  267 +}
  268 +
  269 +.card_name {
  270 + position: relative;
  271 + top: -4rpx;
  272 +}
  273 +
  274 +/* .card_bg image {
  275 + width: 19rpx;
  276 + height: 19rpx;
249 margin-right: 1rpx; 277 margin-right: 1rpx;
250 vertical-align: middle; 278 vertical-align: middle;
251 } 279 }
@@ -255,6 +283,10 @@ @@ -255,6 +283,10 @@
255 width: auto; 283 width: auto;
256 overflow: hidden; 284 overflow: hidden;
257 white-space: nowrap; 285 white-space: nowrap;
  286 +} */
  287 +
  288 +.navigator-hover {
  289 + opacity: 1;
258 } 290 }
259 291
260 .mk_price { 292 .mk_price {
@@ -263,5 +295,6 @@ @@ -263,5 +295,6 @@
263 } 295 }
264 296
265 .item-cont { 297 .item-cont {
266 - line-height: 38rpx; 298 + /* line-height: 38rpx; */
  299 + flex-grow: 1;
267 } 300 }
pages/index/index/index.js
@@ -16,6 +16,8 @@ var api = require(&#39;../../../api/api.js&#39;); @@ -16,6 +16,8 @@ var api = require(&#39;../../../api/api.js&#39;);
16 var d = getApp().globalData; 16 var d = getApp().globalData;
17 17
18 18
  19 +
  20 +
19 Page({ 21 Page({
20 data: { 22 data: {
21 url: o.imghost, 23 url: o.imghost,
@@ -730,8 +732,8 @@ Page({ @@ -730,8 +732,8 @@ Page({
730 var user_info = getApp().globalData.userInfo; 732 var user_info = getApp().globalData.userInfo;
731 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 733 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
732 wx.navigateTo({ 734 wx.navigateTo({
733 - //url: '/pages/togoin/togoin',  
734 - url: '/pages/getphone/getphone', 735 + url: '/pages/togoin/togoin',
  736 + //url: '/pages/getphone/getphone',
735 }) 737 })
736 return false; 738 return false;
737 } 739 }
pages/order/refund_order/refund_order.js
@@ -13,7 +13,7 @@ Page({ @@ -13,7 +13,7 @@ Page({
13 back_money: 0, 13 back_money: 0,
14 back_integral: 0, 14 back_integral: 0,
15 reasonSelect: 0, 15 reasonSelect: 0,
16 - reasonList: [ "订单不能按预计时间送达", "操作有误(商品、地址等选错)", "重复下单/误下单", "其他渠道价格更低", "该商品降价了", "不想买了", "其他原因" ], 16 + reasonList: [ "没有收到货", "不喜欢/不想要", "个人原因拍错/漏拍", "空包裹", "未按照约定时间发货", "快递/物流未送达", "快递/物流无跟踪记录", "发错快递", "商品破损", "商品尺寸规格不符", "商品质量差,与网上描述不符", "其他原因" ],
17 refund_type:0, 17 refund_type:0,
18 isloading:0, 18 isloading:0,
19 }, 19 },
pages/store/index.js
@@ -23,7 +23,7 @@ Page({ @@ -23,7 +23,7 @@ Page({
23 onLoad:function(e){ 23 onLoad:function(e){
24 var th=this; 24 var th=this;
25 wx.getLocation({ 25 wx.getLocation({
26 - type: 'wgs84', 26 + type: 'gcj02',
27 success: function(res) { 27 success: function(res) {
28 th.data.lat = res.latitude; 28 th.data.lat = res.latitude;
29 th.data.lon = res.longitude; 29 th.data.lon = res.longitude;
pages/tabbar/tabbar.js deleted
pages/tabbar/tabbar.json deleted
1 -{  
2 - "usingComponents": {}  
3 -}  
4 \ No newline at end of file 0 \ No newline at end of file
pages/tabbar/tabbar.wxml deleted
1 -  
2 -<!--pages/tabbar.wxml-->  
3 - <template name="tabBar">  
4 - <!-- 如果是自定义的话 -->  
5 - <view hidden="{{tabBar.iscustom=='2'}}" class="tab-bar" style="width:100%;height:{{tabBar.isIpx ? '172rpx' : '104rpx'}};position:fixed;color: {{tabBar.color}}; background: {{tabBar.backgroundColor}}; bottom: 0;z-index:9999999;">  
6 - <block wx:for="{{tabBar.list}}" wx:key="weappurl">  
7 - <block wx:if="{{!item.active}}">  
8 - <navigator url="{{item.weappurl}}" open-type="redirect" class="tabbar_item {{item.clas}}" style="position:relative;width:{{100 / tabBar.length}}%;height:100%;float:left;text-align:center;padding:5px 0;">  
9 - <view wx:if="{{item.nav_name=='购物车'}}" style="top:0;background-color: red;color: #fff;font-size: 20rpx;border-radius: 50%;width: 40rpx;line-height:40rpx;height: 40rpx;position: absolute;z-index: 100;right:30rpx;">  
10 - {{tabBar.cartGoodsNum}}  
11 - </view>  
12 - <view style="width:35%;height:58rpx;margin-left:33%;display: flex; justify-content: center;align-items: center">  
13 - <!--<image src="{{item.src}}" bindload="load_nav" data-index="{{ index }}" class="img" style="max-width: 100%; width:{{item.width?item.width:0}}rpx;height:{{item.height}}rpx"></image>-->  
14 - <view class="nav_imgage" style="background-image: url({{item.src}});height: 50rpx; width: 50rpx;background-position: center;background-repeat: no-repeat;background-size: auto 85%;"></view>  
15 - </view>  
16 - <view style="height:20px;line-height:15px; position: relative; top: -8rpx"><text class="tabbar_text" wx:if="{{item.nav_name}}" style="font-size:0.6rem">{{item.nav_name}}</text></view>  
17 - </navigator>  
18 - </block>  
19 - <block wx:else>  
20 - <view class="tabbar_item {{item.clas}}" style="color: {{item.selectedColor? item.selectedColor :tabBar.selectedColor}};position:relative;width:{{100 / tabBar.length}}%;height:100%;float:left;text-align:center;padding:5px 0;">  
21 - <view wx:if="{{item.nav_name=='购物车'}}" style="top:0;background-color: red;color: #fff;font-size: 20rpx;border-radius: 50%;width: 40rpx;line-height:40rpx;height: 40rpx;position: absolute;z-index: 100;right:30rpx;">  
22 - {{tabBar.cartGoodsNum}}  
23 - </view>  
24 - <view style="width:35%;height:58rpx;margin-left:33%; display: flex; justify-content: center;align-items: center">  
25 - <!--<image src="{{item.src_sele}}" bindload="load_nav" data-index="{{ index }}" class="img" style="max-width: 100%;width:{{item.width?item.width:0}}rpx;height:{{item.height}}rpx"></image>-->  
26 - <view class="nav_imgage" style="background-image: url({{item.src_sele}});height: 50rpx; width: 50rpx;background-position: center;background-repeat: no-repeat;background-size: auto 85%;"></view>  
27 - </view>  
28 - <view style="height:20px;line-height:15px; position: relative; top: -8rpx"><text class="tabbar_text" wx:if="{{item.nav_name}}" style="font-size:0.6rem">{{item.nav_name}}</text></view>  
29 - </view>  
30 - </block>  
31 -  
32 - </block>  
33 - </view>  
34 -  
35 -  
36 - <!-- 如果是默认的话 -->  
37 - <view hidden="{{tabBar.iscustom=='1'}}" class="tab-bar" style="width:100%;height:{{tabBar.isIpx ? '168rpx' : '100rpx'}};position:fixed;color:#6e6d6b; background:#ffffff; bottom: 0;z-index:9999999;padding:2px 0;">  
38 - <!-- 1 -->  
39 - <block wx:if="{{tabBar.active!='/pages/index/index/index'}}">  
40 - <navigator url="/pages/index/index/index" class="tabbar_item {{item.clas}}" open-type="redirect" style="position:relative;width:25%;height:100%;float:left;text-align:center;padding:2px 0;">  
41 - <view style="width:30%;height:54rpx;margin-left:35%;">  
42 - <image src="{{tabBar.url}}/miniapp/images/bar/index.png" class="img" style="width:100%;height:100%"></image>  
43 - </view>  
44 - <view style="height:40rpx;line-height:22rpx;"><text class="tabbar_text" style="font-size:0.6rem">首页</text></view>  
45 - </navigator>  
46 - </block>  
47 - <block wx:else>  
48 - <view class="tabbar_item {{item.clas}}" style="color:#f23030;position:relative;width:25%;height:100%;float:left;text-align:center;padding:2px 0;">  
49 - <view style="width:30%;height:54rpx;margin-left:35%;">  
50 - <image src="{{tabBar.url}}/miniapp/images/bar/index_on.png" class="img" style="width:100%;height:100%"></image>  
51 - </view>  
52 - <view style="height:40rpx;line-height:22rpx;"><text class="tabbar_text" style="font-size:0.6rem">首页</text></view>  
53 - </view>  
54 - </block>  
55 -  
56 -  
57 - <!-- 2 -->  
58 - <block wx:if="{{tabBar.active!='/pages/goods/categoryList/categoryList'}}">  
59 - <navigator url="/pages/goods/categoryList/categoryList" class="tabbar_item {{tabBar.clas}}" open-type="redirect" style="position:relative;width:25%;height:100%;float:left;text-align:center;padding:2px 0;">  
60 - <view style="width:30%;height:54rpx;margin-left:35%;">  
61 - <image src="{{tabBar.url}}/miniapp/images/bar/fl.png" class="img" style="width:100%;height:100%"></image>  
62 - </view>  
63 - <view style="height:40rpx;line-height:22rpx;"><text class="tabbar_text" wx:if="分类" style="font-size:0.6rem">分类</text></view>  
64 - </navigator>  
65 - </block>  
66 - <block wx:else>  
67 - <view class="tabbar_item {{tabBar.clas}}" style="color:#f23030;position:relative;width:25%;height:100%;float:left;text-align:center;padding:2px 0;">  
68 - <view style="width:30%;height:54rpx;margin-left:35%;">  
69 - <image src="{{tabBar.url}}/miniapp/images/bar/fl_on.png" class="img" style="width:100%;height:100%"></image>  
70 - </view>  
71 - <view style="height:40rpx;line-height:22rpx;"><text class="tabbar_text" wx:if="分类" style="font-size:0.6rem">分类</text></view>  
72 - </view>  
73 - </block>  
74 -  
75 -  
76 - <!-- 3 -->  
77 - <block wx:if="{{tabBar.active!='/pages/cart/cart/cart'}}">  
78 - <navigator url="/pages/cart/cart/cart" open-type="redirect" class="tabbar_item {{tabBar.clas}}" style="position:relative;width:25%;height:100%;float:left;text-align:center;padding:2px 0;">  
79 - <view style="background-color: red;color: #fff;font-size: 20rpx;border-radius: 50%;width: 40rpx;height: 40rpx;line-heith:40rpx;position: fixed;z-index: 100;left:63%;display: flex;align-items: center;justify-content: center;">  
80 - {{tabBar.cartGoodsNum}}  
81 - </view><view style="width:30%;height:54rpx;margin-left:35%;">  
82 - <image src="{{tabBar.url}}/miniapp/images/bar/car.png" class="img" style="width:100%;height:100%"></image>  
83 - </view>  
84 - <view style="height:40rpx;line-height:22rpx;"><text class="tabbar_text" style="font-size:0.6rem">购物车</text></view>  
85 - </navigator>  
86 - </block>  
87 - <block wx:else>  
88 - <view class="tabbar_item {{tabBar.clas}}" style="color: #f23030;position:relative;width:25%;height:100%;float:left;text-align:center;padding:2px 0;">  
89 - <view style="background-color: red;color: #fff;font-size: 20rpx;border-radius: 50%;width: 40rpx;height: 40rpx;line-heith:40rpx;position: fixed;z-index: 100;left:63%;display: flex;align-items: center;justify-content: center;">  
90 - {{tabBar.cartGoodsNum}}  
91 - </view><view style="width:30%;height:54rpx;margin-left:35%;">  
92 - <image src="{{tabBar.url}}/miniapp/images/bar/car_on.png" class="img" style="width:100%;height:100%"></image>  
93 - </view>  
94 - <view style="height:40rpx;line-height:22rpx;"><text class="tabbar_text" style="font-size:0.6rem">购物车</text></view>  
95 - </view>  
96 - </block>  
97 -  
98 - <!-- 4 -->  
99 - <block wx:if="{{tabBar.active!='/pages/user/index/index'}}">  
100 - <navigator url="/pages/user/index/index" open-type="redirect" class="tabbar_item {{tabBar.clas}}" style="position:relative;width:25%;height:100%;float:left;text-align:center;padding:2px 0;">  
101 - <view style="width:30%;height:54rpx;margin-left:35%;">  
102 - <image src="{{tabBar.url}}/miniapp/images/bar/user.png" class="img" style="width:100%;height:100%"></image>  
103 - </view>  
104 - <view style="height:40rpx;line-height:22rpx;"><text class="tabbar_text" style="font-size:0.6rem">我的</text></view>  
105 - </navigator>  
106 - </block>  
107 - <block wx:else>  
108 - <view class="tabbar_item {{tabBar.clas}}" style="color: #f23030;position:relative;width:25%;height:100%;float:left;text-align:center;padding:2px 0;">  
109 - <view style="width:30%;height:54rpx;margin-left:35%;">  
110 - <image src="{{tabBar.url}}/miniapp/images/bar/user_on.png" class="img" style="width:100%;height:100%"></image>  
111 - </view>  
112 - <view style="height:40rpx;line-height:22rpx;"><text class="tabbar_text" style="font-size:0.6rem">我的</text></view>  
113 - </view>  
114 - </block>  
115 -  
116 - </view>  
117 - </template>  
pages/tabbar/tabbar.wxss deleted
1 -.menu_red{  
2 -  
3 - top:0;background-color: red;color: #fff;font-size: 20rpx;border-radius: 50%;width: 40rpx;line-height:40rpx;height: 40rpx;position: absolute;z-index: 100;right:30rpx;  
4 -}  
5 -  
6 -.menu_default_red{  
7 - background-color: red;color: #fff;font-size: 20rpx;border-radius: 50%;width: 40rpx;height: 40rpx;line-heith:40rpx;position: fixed;z-index: 100;left:63%  
8 -}  
9 \ No newline at end of file 0 \ No newline at end of file
pages/team/team_show/team_show.js
@@ -148,7 +148,7 @@ Page({ @@ -148,7 +148,7 @@ Page({
148 //--先判断会员状态-- 148 //--先判断会员状态--
149 var user_info=getApp().globalData.userInfo; 149 var user_info=getApp().globalData.userInfo;
150 if(user_info==null || user_info.mobile==undefined || user_info.mobile=="" || user_info.mobile==null){ 150 if(user_info==null || user_info.mobile==undefined || user_info.mobile=="" || user_info.mobile==null){
151 - wx.navigateTo({ url: '/pages/getphone/getphone', }) 151 + wx.navigateTo({ url: '/pages/togoin/togoin', })
152 return false; 152 return false;
153 } 153 }
154 154
@@ -705,141 +705,7 @@ Page({ @@ -705,141 +705,7 @@ Page({
705 }); 705 });
706 setTimeout(th.countDown2, 1000); 706 setTimeout(th.countDown2, 1000);
707 }, 707 },
708 - //--获取门店---  
709 - async get_sto(e) {  
710 - var th = this, dd = null,i=getApp().request;  
711 - var g_distr_type = this.data.goods.distr_type;  
712 - if (g_distr_type != 0) {  
713 - dd = {  
714 - store_id: o.stoid,  
715 - distr_type: g_distr_type,  
716 - isstop: 0,  
717 - pageSize: 300  
718 - }  
719 - } else {  
720 - dd = {  
721 - store_id: o.stoid,  
722 - isstop: 0,  
723 - pageSize: 300  
724 - }  
725 - }  
726 - //----------获取门店----------------  
727 - await getApp().request.promiseGet("/api/weshop/pickup/list", {  
728 - data: dd,  
729 - }).then(res => {  
730 - var e = res;  
731 - if (e.data.code == 0) {  
732 - //单总量超出5个的时候  
733 - if (e.data.data.total > 5) {  
734 - i.get("/api/weshop/storagecategory/page", {  
735 - data: {  
736 - store_id: o.stoid,  
737 - is_show: 1,  
738 - pageSize: 300  
739 - },  
740 - success: function(ee) {  
741 - if (ee.data.code == 0) {  
742 - if (ee.data.data.pageData.length > 0) {  
743 - var sto_cate = ee.data.data.pageData;  
744 - var sto_arr = e.data.data.pageData;  
745 - var newarr = new Array();  
746 - var qita = new Array();  
747 - //----要进行门店分组--------  
748 - for (var i = 0; i < sto_arr.length; i++) {  
749 - //找一下这个门店有没有在分类数组内  
750 - var find2 = 0,  
751 - find2name = "";  
752 - for (var m = 0; m < sto_cate.length; m++) {  
753 - if (sto_arr[i].category_id == sto_cate[m].cat_id) {  
754 - find2 = sto_cate[m].cat_id;  
755 - find2name = sto_cate[m].cat_name;  
756 - break;  
757 - }  
758 - }  
759 -  
760 - if (newarr.length > 0) {  
761 - var find = 0;  
762 - //如果有找到,那门店就在这个分组内,否则,分类就要排在其他  
763 - if (find2 != 0) {  
764 - for (var ii = 0; ii < newarr.length; ii++) {  
765 - if (sto_arr[i].category_id == newarr[ii].cat_id) {  
766 - newarr[ii].s_arr.push(sto_arr[i]);  
767 - find = 1;  
768 - break;  
769 - }  
770 - }  
771 - if (find == 0) {  
772 - var arr0 = new Array();  
773 - arr0.push(sto_arr[i]);  
774 - var item = {  
775 - cat_id: find2,  
776 - name: find2name,  
777 - s_arr: arr0  
778 - };  
779 - newarr.push(item);  
780 - }  
781 - } else {  
782 - qita.push(sto_arr[i]);  
783 - }  
784 - } else {  
785 - //如果有找到,那门店就在这个分组内,否则,分类就要排在其他  
786 - if (find2 != 0) {  
787 - var arr0 = new Array();  
788 - arr0.push(sto_arr[i]);  
789 - var item = {  
790 - cat_id: find2,  
791 - name: find2name,  
792 - s_arr: arr0  
793 - };  
794 - newarr.push(item);  
795 - } else {  
796 - qita.push(sto_arr[i]);  
797 - }  
798 - }  
799 - }  
800 -  
801 - //----安排其他的分类-----  
802 - if (qita.length > 0) {  
803 - var item = {  
804 - cat_id: -1,  
805 - name: "其他",  
806 - s_arr: qita  
807 - };  
808 - newarr.push(item);  
809 - }  
810 - //--给门店赋值--  
811 - th.setData({  
812 - is_show_sto_cat: 1,  
813 - ssl: newarr  
814 - });  
815 -  
816 - } else {  
817 - //--只留第二层---  
818 - th.setData({  
819 - is_show_sto_cat: 0,  
820 - ssl_child: e.data.data.pageData,  
821 - });  
822 - }  
823 - } else {  
824 - //--只留第二层---  
825 - th.setData({  
826 - is_show_sto_cat: 0,  
827 - ssl_child: e.data.data.pageData,  
828 - });  
829 - }  
830 - }  
831 - });  
832 - } else {  
833 - //--只留第二层---  
834 - th.setData({  
835 - is_show_sto_cat: 0,  
836 - ssl_child: e.data.data.pageData  
837 - });  
838 - }  
839 - }  
840 - })  
841 - },  
842 - 708 +
843 //------去支付,购买------- 709 //------去支付,购买-------
844 go_pay:function () { 710 go_pay:function () {
845 var th=this; 711 var th=this;
@@ -1105,7 +971,7 @@ Page({ @@ -1105,7 +971,7 @@ Page({
1105 971
1106 if (bconfig.is_sort_storage) { 972 if (bconfig.is_sort_storage) {
1107 wx.getLocation({ 973 wx.getLocation({
1108 - type: 'wgs84', 974 + type: 'gcj02',
1109 success: function(res) { 975 success: function(res) {
1110 976
1111 th.data.lat = res.latitude; 977 th.data.lat = res.latitude;
@@ -1170,7 +1036,7 @@ Page({ @@ -1170,7 +1036,7 @@ Page({
1170 var e = th.data.bconfig; 1036 var e = th.data.bconfig;
1171 if (e.is_sort_storage) { 1037 if (e.is_sort_storage) {
1172 wx.getLocation({ 1038 wx.getLocation({
1173 - type: 'wgs84', 1039 + type: 'gcj02',
1174 success: function(res) { 1040 success: function(res) {
1175 th.data.lat = res.latitude; 1041 th.data.lat = res.latitude;
1176 th.data.lon = res.longitude; 1042 th.data.lon = res.longitude;
@@ -1288,7 +1154,9 @@ Page({ @@ -1288,7 +1154,9 @@ Page({
1288 data: { 1154 data: {
1289 store_id: o.stoid, 1155 store_id: o.stoid,
1290 is_show: 1, 1156 is_show: 1,
1291 - pageSize: 1000 1157 + pageSize: 1000,
  1158 + orderField:"sort",
  1159 + orderType:'asc',
1292 }, 1160 },
1293 success: function(ee) { 1161 success: function(ee) {
1294 if (ee.data.code == 0) { 1162 if (ee.data.code == 0) {
@@ -1313,12 +1181,12 @@ Page({ @@ -1313,12 +1181,12 @@ Page({
1313 //----要进行门店分组-------- 1181 //----要进行门店分组--------
1314 for (var i = 0; i < sto_arr.length; i++) { 1182 for (var i = 0; i < sto_arr.length; i++) {
1315 //找一下这个门店有没有在分类数组内 1183 //找一下这个门店有没有在分类数组内
1316 - var find2 = 0,  
1317 - find2name = ""; 1184 + var find2 = 0,find2name = "",sort=0;
1318 for (var m = 0; m < sto_cate.length; m++) { 1185 for (var m = 0; m < sto_cate.length; m++) {
1319 if (sto_arr[i].category_id == sto_cate[m].cat_id) { 1186 if (sto_arr[i].category_id == sto_cate[m].cat_id) {
1320 find2 = sto_cate[m].cat_id; 1187 find2 = sto_cate[m].cat_id;
1321 find2name = sto_cate[m].cat_name; 1188 find2name = sto_cate[m].cat_name;
  1189 + sort=sto_cate[m].sort;
1322 break; 1190 break;
1323 } 1191 }
1324 } 1192 }
@@ -1340,6 +1208,7 @@ Page({ @@ -1340,6 +1208,7 @@ Page({
1340 var item = { 1208 var item = {
1341 cat_id: find2, 1209 cat_id: find2,
1342 name: find2name, 1210 name: find2name,
  1211 + sort:sort,
1343 s_arr: arr0 1212 s_arr: arr0
1344 }; 1213 };
1345 newarr.push(item); 1214 newarr.push(item);
@@ -1355,6 +1224,7 @@ Page({ @@ -1355,6 +1224,7 @@ Page({
1355 var item = { 1224 var item = {
1356 cat_id: find2, 1225 cat_id: find2,
1357 name: find2name, 1226 name: find2name,
  1227 + sort:sort,
1358 s_arr: arr0 1228 s_arr: arr0
1359 }; 1229 };
1360 newarr.push(item); 1230 newarr.push(item);
@@ -1363,7 +1233,19 @@ Page({ @@ -1363,7 +1233,19 @@ Page({
1363 } 1233 }
1364 } 1234 }
1365 } 1235 }
1366 - 1236 +
  1237 + //门店分类要排序下
  1238 + function compare(property){
  1239 + return function(a,b){
  1240 + var value1 = a[property];
  1241 + var value2 = b[property];
  1242 + return value1 - value2;
  1243 + }
  1244 + }
  1245 + if(newarr.length>0)
  1246 + newarr.sort(compare("sort"));
  1247 +
  1248 +
1367 //----安排其他的分类----- 1249 //----安排其他的分类-----
1368 if (qita.length > 0) { 1250 if (qita.length > 0) {
1369 var item = { 1251 var item = {
pages/team/team_success/team_success.js
@@ -56,7 +56,34 @@ Page({ @@ -56,7 +56,34 @@ Page({
56 }) 56 })
57 var pay_f = t.payf, order_sn = t.ordersn; 57 var pay_f = t.payf, order_sn = t.ordersn;
58 this.setData({ pay_f: pay_f, order_sn: order_sn}), 58 this.setData({ pay_f: pay_f, order_sn: order_sn}),
59 - this.init(order_sn) 59 + this.init(order_sn);
  60 +
  61 + //-- 自定义海报 --
  62 + getApp().request.promiseGet("/api/weshop/goods/poster/page",{
  63 + data:{store_id:os.stoid, type:1, is_user:1 }
  64 + }).then(res=>{
  65 + if(res.data.code==0){
  66 +
  67 + var poster_data=res.data.data.pageData[0];
  68 + var json_str=poster_data.jsonStr;
  69 + if(json_str){
  70 + var json_data=JSON.parse(json_str);
  71 + if(json_data.bg_img){
  72 +
  73 + //-- 把图片那到本地 --
  74 + wx.getImageInfo({
  75 + src:json_data.bg_img,
  76 + success: function(res) {
  77 + var path= res.path;
  78 + th.setData({share_b_img:path})
  79 + },
  80 + fail: function(res) {}
  81 + });
  82 + }
  83 + th.setData({poster:json_data})
  84 + }
  85 + }
  86 + })
60 }, 87 },
61 //关闭展开列表 88 //关闭展开列表
62 click:function(e){ 89 click:function(e){
@@ -377,19 +404,53 @@ Page({ @@ -377,19 +404,53 @@ Page({
377 console.log(vpath); 404 console.log(vpath);
378 405
379 //先画背景 406 //先画背景
380 - var pg_path = "../../../images/share/share_bg.png"; 407 + var pg_path = "../../../images/share/share_bg.png";
  408 + //-- 如果有自定义海报的时候,判断背景的图片 --
  409 + if(th.data.share_b_img){
  410 + pg_path=th.data.share_b_img;
  411 + }
  412 +
381 context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); 413 context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit);
382 - //--昵称---  
383 - context.setFontSize(24 * unit)  
384 - context.setFillStyle("black")  
385 - context.fillText(app.globalData.userInfo.nickname, 152 * unit, 76 * unit);  
386 - var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit;  
387 - //强烈推荐  
388 - var tj_path = "../../../images/share/q_tj.png";  
389 - context.drawImage(tj_path, 152 * unit + width, 54 * unit, 110 * unit, 30 * unit);  
390 - context.setFontSize(18 * unit)  
391 - context.setFillStyle("white")  
392 - context.fillText('强烈推荐', 152 * unit + width + 20 * unit, 76 * unit); 414 +
  415 + //-- 是自定义海报的情况下 --
  416 + if(th.data.poster && parseInt(th.data.poster.style)==2){
  417 + //在线上分享人的情况下
  418 + if(parseInt(th.data.poster.show_headpic)){
  419 + //获取坐标
  420 + var x=parseFloat(th.data.poster.head_x)*2;
  421 + var y=parseFloat(th.data.poster.head_y)*2;
  422 + var x1=(x+90) *unit;
  423 + var y1=(y+50) *unit;
  424 + //--昵称---
  425 + context.setFontSize(24 * unit)
  426 + context.setFillStyle("black")
  427 + context.fillText(app.globalData.userInfo.nickname, x1, y1);
  428 + var width = 24 * app.globalData.userInfo.nickname.length * unit + 4 * unit;
  429 + //强烈推荐 改许程
  430 + var tj_path = "../../../images/share/q_tj.png";
  431 + context.drawImage(tj_path, x1 + width, y1-22*unit, 85 * unit, 30 * unit);
  432 + context.setFontSize(16 * unit)
  433 + context.setLineJoin('round'); //交点设置成圆角
  434 + context.setFillStyle("white")
  435 + context.fillText('强烈推荐', x1 + width+8*unit, y1-1*unit);
  436 + }
  437 +
  438 + }else{
  439 + //--昵称---
  440 + context.setFontSize(24 * unit)
  441 + context.setFillStyle("black")
  442 + context.fillText(app.globalData.userInfo.nickname, 152 * unit, 76 * unit);
  443 + var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit;
  444 + //强烈推荐
  445 + var tj_path = "../../../images/share/q_tj.png";
  446 + context.drawImage(tj_path, 152 * unit + width, 54 * unit, 110 * unit, 30 * unit);
  447 + context.setFontSize(18 * unit)
  448 + context.setFillStyle("white")
  449 + context.fillText('强烈推荐', 152 * unit + width + 20 * unit, 76 * unit);
  450 + }
  451 +
  452 +
  453 +
393 454
394 //---产品名称--- 455 //---产品名称---
395 context.setFontSize(21.3 * unit); 456 context.setFontSize(21.3 * unit);
@@ -468,7 +529,15 @@ Page({ @@ -468,7 +529,15 @@ Page({
468 context.setFontSize(22 * unit) 529 context.setFontSize(22 * unit)
469 context.fillText("长按识别二维码,立即参团", 40 * unit, 856 * unit); 530 context.fillText("长按识别二维码,立即参团", 40 * unit, 856 * unit);
470 //---二维吗图--- 531 //---二维吗图---
471 - context.drawImage(vpath, 420 * unit, 726 * unit, 120 * unit, 120 * unit); 532 + //-- 自定义海报 --
  533 + if(th.data.poster){
  534 + var erm_x= parseFloat(th.data.poster.ewm_x)*2;
  535 + var erm_y= parseFloat(th.data.poster.ewm_y)*2;
  536 + context.drawImage(vpath, erm_x * unit, erm_y * unit, 120 * unit, 120 * unit);
  537 + }else{
  538 + //---二维吗图---
  539 + context.drawImage(vpath, 420 * unit, 726 * unit, 120 * unit, 120 * unit);
  540 + }
472 break 541 break
473 case 2://阶梯团的展示 542 case 2://阶梯团的展示
474 //---画线--- 543 //---画线---
@@ -503,24 +572,58 @@ Page({ @@ -503,24 +572,58 @@ Page({
503 572
504 context.fillText("长按识别二维码,立即参团", 40 * unit, 860 * unit); 573 context.fillText("长按识别二维码,立即参团", 40 * unit, 860 * unit);
505 //---二维吗图--- 574 //---二维吗图---
506 - context.drawImage(vpath, 420 * unit, 726 * unit, 120 * unit, 120 * unit); 575 + //-- 自定义海报 --
  576 + if(th.data.poster){
  577 + var erm_x= parseFloat(th.data.poster.ewm_x)*2;
  578 + var erm_y= parseFloat(th.data.poster.ewm_y)*2;
  579 + context.drawImage(vpath, erm_x * unit, erm_y * unit, 120 * unit, 120 * unit);
  580 + }else{
  581 + //---二维吗图---
  582 + context.drawImage(vpath, 420 * unit, 726 * unit, 120 * unit, 120 * unit);
  583 + }
507 break 584 break
508 } 585 }
509 586
510 - //---绘制圆形要放在最后----  
511 - context.save();  
512 - context.beginPath();  
513 - var h_x = 60 * unit;  
514 - var h_y = 24 * unit;  
515 - var h_r = 40 * unit;  
516 - var cx = h_x + h_r;  
517 - var cy = h_y + h_r;  
518 - context.arc(cx, cy, h_r, 0, Math.PI * 2, false);  
519 - context.closePath();  
520 - context.fill();  
521 - context.clip();  
522 - context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2);  
523 - context.restore(); 587 + //--- 如果是自定义海报的时候 ---
  588 + if(th.data.poster && parseInt(th.data.poster.style)==2){
  589 +
  590 + //如果显示会员信息的话
  591 + if(parseInt(th.data.poster.show_headpic)){
  592 + //获取坐标
  593 + var x= parseFloat(th.data.poster.head_x)*2;
  594 + var y=parseFloat(th.data.poster.head_y)*2;
  595 + //---绘制圆形要放在最后----
  596 + context.save();
  597 + context.beginPath();
  598 + var h_x = x* unit;
  599 + var h_y = y * unit;
  600 + var h_r = 40 * unit;
  601 + var cx = h_x + h_r;
  602 + var cy = h_y + h_r;
  603 + context.arc(cx, cy, h_r, 0, Math.PI * 2, false);
  604 + context.closePath();
  605 + context.fill();
  606 + context.clip();
  607 + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2);
  608 + context.restore();
  609 + }
  610 +
  611 + }else{
  612 + //---绘制圆形要放在最后----
  613 + context.save();
  614 + context.beginPath();
  615 + var h_x = 60 * unit;
  616 + var h_y = 24 * unit;
  617 + var h_r = 40 * unit;
  618 + var cx = h_x + h_r;
  619 + var cy = h_y + h_r;
  620 + context.arc(cx, cy, h_r, 0, Math.PI * 2, false);
  621 + context.closePath();
  622 + context.fill();
  623 + context.clip();
  624 + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2);
  625 + context.restore();
  626 + }
524 627
525 //把画板内容绘制成图片,并回调 画板图片路径 628 //把画板内容绘制成图片,并回调 画板图片路径
526 context.draw(false, function () { 629 context.draw(false, function () {
@@ -623,6 +726,7 @@ Page({ @@ -623,6 +726,7 @@ Page({
623 tt(func); 726 tt(func);
624 }else { 727 }else {
625 path2=path2.replace("http://thirdwx.qlogo.cn","https://wx.qlogo.cn"); 728 path2=path2.replace("http://thirdwx.qlogo.cn","https://wx.qlogo.cn");
  729 + path2=path2.replace("https://thirdwx.qlogo.cn","https://wx.qlogo.cn");
626 wx.getImageInfo({ 730 wx.getImageInfo({
627 src: path2, 731 src: path2,
628 success: function (res) { 732 success: function (res) {
pages/togoin/togoin.js
1 -var t = require("../../utils/common.js"); var os = getApp().globalData.setting; 1 +var t = require("../../utils/common.js");
  2 +var app=getApp();
  3 +var os = app.globalData.setting;
  4 +
2 Page({ 5 Page({
3 - data: {  
4 - store: null,  
5 - imghots: os.imghost,  
6 - },  
7 - onLoad: function () {  
8 - var th = this, app = getApp();  
9 - app.getConfig(function (e) {  
10 - th.setData({ store: e });  
11 - })  
12 - },  
13 - onShow(){ 6 + data: {
  7 + user:null,
  8 + show_bind:0,
  9 + imghots: os.imghost,
  10 + store_logo:'',
  11 + first_leader:'', //-- 邀请人 --
  12 + },
  13 + onLoad: function (options) {
  14 + //--判断是否有接受到邀请人的ID--
  15 + if(options.first_leader){
  16 + this.setData({first_leader:options.first_leader});
  17 + }
  18 + var th=this;
  19 + app.getConfig(function (e) {
  20 + e.store_logo=th.data.imghots+e.store_logo;
  21 + th.setData({ store: e,store_logo:e.store_logo});
  22 + })
  23 + },
  24 + //绑定手机号
  25 + getphone:function (e) {
  26 + //接下来写业务代码登录
  27 + e=e.detail;
  28 + if (e.encryptedData==undefined){
  29 + return app.my_warnning("登录需要授权手机号码!", 0, this);
  30 + return false;
  31 + }
  32 + var th=this;
  33 + var sessionKey = getApp().globalData.sessionKey;
  34 + var openid = getApp().globalData.openid;
  35 + var r=getApp().globalData.getu;
  36 +
  37 + th.save_the_data(r,e,sessionKey,openid)
  38 + },
14 39
15 - }, 40 + //-- 会员授权 --
  41 + bindGetUserInfo: function(ee) {
  42 + var that = this;
  43 + var user=ee.detail.userInfo;
  44 + //此处授权得到userInfo
  45 + getApp().globalData.getu = user;
  46 +
  47 + //--拿下code--
  48 + wx.login({
  49 + success: function (o) {
  50 + var dd = {
  51 + js_code:o.code,
  52 + store_id: os.stoid,
  53 + nickname: app.clear_word(app.globalData.getu.nickName),
  54 + head_pic: app.clear_word(app.globalData.getu.avatarUrl)
  55 + };
  56 +
  57 +
  58 + getApp().request.get("/api/weshop/users/openidandkey", {
  59 + data: dd,
  60 + success: function (e) {
  61 + if(e.data.code==0){
  62 + that.setData({user:user})
  63 + //如果有会员的话,没有sessionKey
  64 + if(!e.data.data.sessionKey){
  65 + getApp().showWarning("登陆成功");
  66 + getApp().globalData.userInfo=e.data.data;
  67 + getApp().globalData.user_id=e.data.data.user_id;
  68 + getApp().globalData.openid = e.data.data.weapp_openid;
  69 +
  70 + setTimeout(function () {
  71 + wx.navigateBack({ delta: 1}) //返回上一页
  72 + },1000)
  73 + }else{
  74 + getApp().globalData.sessionKey=e.data.data.sessionKey;
  75 + getApp().globalData.openid=e.data.data.openid;;
  76 + that.setData({show_bind:1})
  77 + }
  78 + }else{
  79 + getApp().confirmBox(e.data.msg);
  80 + }
  81 + }
  82 + });
  83 + }
  84 + })
  85 + },
  86 +
  87 + //暂不登陆,返回上一页
  88 + cancle_bind:function () {
  89 + wx.navigateBack({ delta: 1})
  90 + },
  91 +
  92 + close_pop:function(){
  93 + this.setData({show_bind:0})
  94 + },
  95 + show_bind_mobile:function(){
  96 + this.setData({show_bind:1})
  97 + },
  98 +
  99 + save_the_data:function (r,e,sessionKey,openid) {
  100 + var app=getApp(),a=app,th=this;
  101 + var dd = {
  102 + oauth: "miniapp",
  103 + nickname:a.clear_word(r.nickName),
  104 + head_pic: r.avatarUrl,
  105 + sex: r.gender,
  106 + terminal: "miniapp",
  107 + sessionKey: sessionKey,
  108 + openid:openid,
  109 + encryptedData: e.encryptedData,
  110 + iv: e.iv,
  111 + store_id: getApp().globalData.setting.stoid,
  112 + };
  113 + //--如果有邀请人的时候--
  114 + if(th.data.first_leader){
  115 + dd.first_leader=th.data.first_leader;
  116 + }
  117 +
  118 + console.log(dd);
  119 + app.request.get("/api/weshop/users/thirdLogin", {
  120 + data: dd,
  121 + success: function (e) {
  122 +
  123 + if (e.data.code == 0) {
  124 + app.globalData.user_id = e.data.data.user_id;
  125 + } else {
  126 + return app.showWarning("授权登入失败!"+e.data.msg);
  127 + }
  128 +
  129 + wx.setStorageSync("userinfo",e.data.data);
  130 + wx.setStorageSync("isAuth", !0), app.globalData.userInfo = e.data.data, app.globalData.userInfo.head_pic = t.getFullUrl(a.globalData.userInfo.head_pic);
  131 + wx.navigateBack({ delta: 1})
  132 +
  133 + },
  134 + failStatus: function (t) {
  135 + return app.my_warnning("授权登入失败,请稍后再试!", 0, that);
  136 + },
  137 + fail: function (t) {
  138 + return i.clearAuth(), i.alertLoginErrorAndGoHome(), !1;
  139 + }
  140 + });
  141 + },
16 142
17 - bindGetUserInfo: function(e) {  
18 - var that = this, app = getApp();  
19 - //此处授权得到userInfo  
20 - console.log(e.detail.userInfo);  
21 - app.globalData.getu = e.detail.userInfo; 143 + bind_bnerr:function(e){
  144 + var _errImg = e.target.dataset.errorimg;
  145 + var _errObj = {};
  146 + _errObj[_errImg] = this.data.imghots+"/miniapp/images/logo.png";
  147 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  148 + }
22 149
23 - //接下来写业务代码  
24 - //最后,记得返回刚才的页面  
25 - app.auth.wxLogin_fir(function(){  
26 - console.log("togoin");  
27 - console.log("1");  
28 - wx.navigateBack({  
29 - delta: 1  
30 - })  
31 - })  
32 -  
33 - },  
34 -  
35 - cancle_bind:function(){  
36 - getApp().goto('/pages/user/index/index');  
37 - }  
38 -  
39 -  
40 -}); 150 +})
pages/togoin/togoin.json
1 { 1 {
2 - "navigationBarTitleText": "授权登录" 2 + "navigationBarTitleText": "授权登录",
  3 + "usingComponents": {
  4 + "warn": "/components/long_warn/long_warn"
  5 + }
3 } 6 }
4 \ No newline at end of file 7 \ No newline at end of file
pages/togoin/togoin.wxml
1 -<view class="all_page">  
2 - <view class="content">  
3 - <view><image class='logo' src="{{imghots+store.store_logo}}"> </image></view>  
4 - <view class="title">{{store.store_name}}</view>  
5 - <view style="padding:0 40rpx">为了更好的提供服务,小程序将申请获取您的头像,昵称信息</view>  
6 - <button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">授权登录</button>  
7 - <text class="btn2" bindtap="cancle_bind">暂不授权</text> 1 +<view>
  2 +
  3 + <!-- 登录图 -->
  4 + <view >
  5 + <view class="logins flex-center2 ali-c flex" style="position: relative;top: 120rpx;">
  6 + <image mode="widthFix" bindtap="go_index" class="login_img_back" src="{{imghots}}/miniapp/images/loginbg.jpg"></image>
  7 + <image bindtap="go_index" class="login_img" src="{{store_logo}}" binderror="bind_bnerr" lazy-load="true" data-errorimg="store_logo"></image>
  8 + <view style="position: absolute; margin-top:140rpx">{{store.store_name}}</view>
  9 + </view>
8 </view> 10 </view>
9 -</view>  
10 \ No newline at end of file 11 \ No newline at end of file
  12 +
  13 + <!-- 登录按钮 -->
  14 + <view>
  15 + <view class="phones">
  16 + <!-- 授权获取基础信息 -->
  17 + <button hidden="{{user}}" class="getPhoneNumber" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
  18 + <view class="flex flex-center2 ali-c">
  19 + <image class="we_chat" src="{{imghots}}/miniapp/images/we_chat.png"></image>
  20 + <view>微信账号快捷登陆</view>
  21 + </view>
  22 + </button>
  23 + <!-- 点击显示绑定手机的对话框 -->
  24 + <button hidden="{{!user}}" class="getPhoneNumber" bindtap="show_bind_mobile">
  25 + <view class="flex flex-center2 ali-c" >
  26 + <image class="we_chat" src="{{imghots}}/miniapp/images/we_chat.png"></image>
  27 + <view>微信账号快捷登陆</view>
  28 + </view>
  29 + </button>
  30 + </view>
  31 +
  32 + <view class="userlongin flex-center2 flex fs30 jc_sb" style="margin: 0 130rpx">
  33 + <view bindtap="cancle_bind">暂不登陆</view>
  34 + </view>
  35 +
  36 + </view>
  37 +
  38 +</view>
  39 +
  40 +
  41 +<view wx:if="{{show_bind}}">
  42 + <view class="cover-layer" bindtap="close_pop"></view>
  43 + <view class="p_content">
  44 + <view class="p_title flex ali-c fs34">
  45 + 请授权绑定手机号完成注册,拒绝将登陆失败
  46 + </view>
  47 + <view class="flex btn_view">
  48 + <view bindtap="close_pop" style="height: 100%; line-height:normal;" class="txt-center f2 flex ali-c flex-center2 fs36 b_right">拒绝</view>
  49 + <button style="height: 100%;" class="g_mobile f2 flex ali-c flex-center2 fs36 txt-red" open-type="getPhoneNumber" bindgetphonenumber="getphone">绑定</button>
  50 + </view>
  51 + </view>
  52 +</view>
  53 +
  54 +<warn id="warn"></warn>
pages/togoin/togoin.wxss
1 -.all_page{  
2 - position: fixed;  
3 - height: 100%;  
4 - width: 100%;  
5 - background: #fff;  
6 - justify-content: center;/*水平居中*/ 1 +page{
  2 + border-top: 3rpx solid #EAEAEC;
  3 + background-color: #fff;
7 } 4 }
8 -.all_page .content{  
9 - font-size: 30rpx;  
10 - text-align: center;  
11 - height: 400px; 5 +.logins {
12 width: 100%; 6 width: 100%;
13 - position: absolute;  
14 - top: 50%;  
15 - margin-top:-200px;  
16 -}  
17 -.logo{width: 140rpx; height: 140rpx; border-radius:50% }  
18 -.all_page .content .title{  
19 - font-size: 36rpx; margin: 20rpx 0 7 + padding-bottom: 130rpx;
  8 + background-position: center;
  9 + background-repeat: no-repeat;
  10 + background-size: cover
20 } 11 }
21 12
22 -.all_page .btn{  
23 - height: 80rpx;  
24 - line-height: 80rpx;  
25 - width: 580rpx;  
26 - background: #fc661f;  
27 - color:#fff;  
28 - font-size: 32rpx;  
29 - margin-top: 100rpx;  
30 - border-radius: 5rpx; 13 +.login_img {
  14 + width: 192rpx;
  15 + height: 192rpx;
  16 + border-radius: 50%;
  17 + position: absolute;
  18 +}
  19 +.phones{
  20 + margin-bottom: 48rpx;
  21 +}
  22 +.getPhoneNumber {
  23 + width: 600rpx;
  24 + height: 94rpx;
  25 + line-height: 94rpx;
  26 + background-color: #57b837;
  27 + border-radius: 48rpx;
  28 + color: rgb(255,255,255);
  29 + font-size: 32rpx;
  30 + margin-top:150rpx;
  31 +}
  32 +.we_chat{
  33 + width: 55rpx;
  34 + height: 45rpx;
  35 + margin-right: 15rpx;
  36 +}
  37 +.userlongin{
  38 + color: #767f8e;
  39 +}
  40 +button{
  41 + border:none;
  42 +}
  43 +.login_img_back{ width: 100%;}
  44 +.p_content{
  45 + margin: 10%;
  46 + width: 80%;
  47 + height:340rpx;
  48 + top:50%;
  49 + margin-top: -180rpx;
  50 + background-color: #fff;
  51 + z-index: 12;
  52 + position: fixed;
31 } 53 }
32 54
33 -.all_page .btn2{  
34 - height: 80rpx;  
35 - line-height: 80rpx;  
36 - width: 580rpx;  
37 -  
38 - color:#999;  
39 - font-size: 32rpx;  
40 - border-radius: 5rpx;  
41 - margin-top: 10rpx;  
42 -}  
43 \ No newline at end of file 55 \ No newline at end of file
  56 +.btn_view { height: 120rpx; line-height: 120rpx; border-top:1rpx solid #e9e9e9;}
  57 +.p_title{ height:220rpx; padding: 0 40rpx; line-height: 50rpx;}
  58 +.g_mobile{ background: none;line-height: normal;}
  59 +.b_right{border-right:1rpx solid #e9e9e9;}
  60 +
  61 +.ali-c{align-items: center;}
  62 +.flex-center2{ justify-content: center;}
  63 +.f2 {
  64 + flex: 2 0;
  65 +}
pages/user/Detailed/Detailed.js
@@ -407,6 +407,7 @@ Page({ @@ -407,6 +407,7 @@ Page({
407 ee.data.head_pic = "../../../images/share/hui_hear_pic.png";tt(); 407 ee.data.head_pic = "../../../images/share/hui_hear_pic.png";tt();
408 } else { 408 } else {
409 path2 = path2.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); 409 path2 = path2.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn");
  410 + path2 = path2.replace("https://thirdwx.qlogo.cn", "https://wx.qlogo.cn");
410 wx.getImageInfo({ 411 wx.getImageInfo({
411 src: path2, 412 src: path2,
412 success: function (res) { 413 success: function (res) {
pages/user/assistance/assistance.js
@@ -28,6 +28,11 @@ Page({ @@ -28,6 +28,11 @@ Page({
28 timer: "", //任务列表的定时器 28 timer: "", //任务列表的定时器
29 s_num: "", //多少人已经领取任务 29 s_num: "", //多少人已经领取任务
30 page: 1, //我的任务的当前页 30 page: 1, //我的任务的当前页
  31 +
  32 + imageUrl:'',
  33 + btn_color:'',
  34 + bg_color:'',
  35 + font_color:'',
31 }, 36 },
32 37
33 /** 38 /**
@@ -49,7 +54,7 @@ Page({ @@ -49,7 +54,7 @@ Page({
49 //--先判断会员状态-- 54 //--先判断会员状态--
50 var user_info = getApp().globalData.userInfo; 55 var user_info = getApp().globalData.userInfo;
51 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 56 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
52 - getApp().goto('/pages/getphone/getphone'); 57 + getApp().goto('/pages/togoin/togoin');
53 return false; 58 return false;
54 } 59 }
55 60
@@ -57,6 +62,21 @@ Page({ @@ -57,6 +62,21 @@ Page({
57 // 助力活动 62 // 助力活动
58 this.assistance(); 63 this.assistance();
59 }, 64 },
  65 +
  66 + print() {
  67 + var user_id = getApp().globalData.user_id;
  68 + var store_id = os.stoid;
  69 +
  70 + getApp().request.promiseGet("/api/weshop/marketing/help/act/judge", {
  71 + data: {
  72 + storeId: store_id,
  73 + userId: user_id
  74 + }
  75 + }).then(res => {
  76 + console.log('res', res);
  77 + });
  78 + },
  79 +
60 // 助力活动 80 // 助力活动
61 assistance() { 81 assistance() {
62 var th = this; 82 var th = this;
@@ -74,7 +94,11 @@ Page({ @@ -74,7 +94,11 @@ Page({
74 help_data.remark = help_data.remark.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"'); 94 help_data.remark = help_data.remark.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"');
75 th.setData({ 95 th.setData({
76 zl_act: help_data, 96 zl_act: help_data,
77 - help_id: help_data.id 97 + help_id: help_data.id,
  98 + btn_color: help_data.btn_color,
  99 + bg_color: help_data.bg_color,
  100 + font_color: help_data.font_color,
  101 + imageUrl: help_data.imageUrl,
78 }); 102 });
79 if (th.data.help_id != "" && th.data.help_id != null) { 103 if (th.data.help_id != "" && th.data.help_id != null) {
80 //我的任务 104 //我的任务
pages/user/assistance/assistance.wxml
1 <wxs module="filter" src="c_filter.wxs"></wxs> 1 <wxs module="filter" src="c_filter.wxs"></wxs>
2 <wxs module="filter_s" src="../../../utils/filter.wxs"></wxs> 2 <wxs module="filter_s" src="../../../utils/filter.wxs"></wxs>
3 -<view class="page" bindtap="close"> 3 +<view class="page" bindtap="close" style="background-color:#{{bg_color ? bg_color:'d01119'}};">
4 <!-- 背景图片 --> 4 <!-- 背景图片 -->
5 - <image class="lumi" src="{{iurl+'miniapp/images/friendhelp/lumi.png'}}" lazy-load="true"></image>  
6 - <view class="zindex"> 5 + <image wx:if="{{!(imageUrl)}}" class="lumi" src="{{iurl+'miniapp/images/friendhelp/lumi.png'}}" lazy-load="true"></image>
  6 +
  7 + <view class="zindex" style="color:#{{font_color ? font_color:'black'}};background-color:#{{bg_color ? bg_color:'d01119'}};">
7 <view class="top"> 8 <view class="top">
8 - <view class="flex-center">  
9 - <image class="getgift" src="{{iurl+'miniapp/images/friendhelp/getgift.png'}}" lazy-load="true"></image>  
10 - </view>  
11 - <view class="flex-center fs32">  
12 - <view class="excitation">机会总是留给最有行动力的人</view>  
13 - </view>  
14 - <view class="flex-center">  
15 - <image class="gift" src="{{zl_act.imageUrl==''?iurl+'miniapp/images/friendhelp/gift.png':iurl+zl_act.imageUrl}}" lazy-load="true"></image>  
16 - </view>  
17 - <view wx:if="{{zl_act.beginDate && zl_act.endDate}}" class="flex-center fs26 time">  
18 - <view>活动时间:{{filter_s.format_time(zl_act.beginDate,0)}} 至 {{filter_s.format_time(zl_act.endDate,0)}}</view>  
19 -  
20 - </view>  
21 - <view class="flex-center" bindtap="go_task">  
22 - <view class="flex-center take"> 9 + <!-- 上传主图的情况 -->
  10 + <view class="bg-img" wx:if="{{imageUrl}}"></view>
  11 + <!-- 没有上传主图的情况 -->
  12 + <block wx:else>
  13 + <view class="flex-center">
  14 + <image class="getgift" src="{{iurl+'miniapp/images/friendhelp/getgift.png'}}" lazy-load="true"></image>
  15 + </view>
  16 + <view class="flex-center fs32">
  17 + <view class="excitation" style="color:{{font_color ? ('#'+font_color):'white'}};">机会总是留给最有行动力的人</view>
  18 + </view>
  19 + <view class="flex-center">
  20 + <image class="gift" src="{{zl_act.imageUrl==''?iurl+'miniapp/images/friendhelp/gift.png':iurl+zl_act.imageUrl}}" lazy-load="true"></image>
  21 + </view>
  22 + <view wx:if="{{zl_act.beginDate && zl_act.endDate}}" class="flex-center fs26 time">
  23 + <view style="color:{{font_color ? ('#'+font_color):'white'}};">活动时间:{{filter_s.format_time(zl_act.beginDate,0)}} 至 {{filter_s.format_time(zl_act.endDate,0)}}</view>
  24 + </view>
  25 + </block>
  26 +
  27 + <view class="flex-center btn-get" bindtap="go_task">
  28 + <view class="flex-center take" style="color:{{font_color?('#'+font_color):'white'}};background-color: #{{btn_color? btn_color:'FDC107'}};">
23 <view>立即领取</view> 29 <view>立即领取</view>
24 </view> 30 </view>
25 </view> 31 </view>
26 </view> 32 </view>
  33 +
  34 +
27 35
28 <!-- 任务及说明栏 --> 36 <!-- 任务及说明栏 -->
29 - <view> 37 + <view class="task-container">
30 <!-- 标题 --> 38 <!-- 标题 -->
31 - <view class="flex-vertical-between fs28 padding head"> 39 + <view class="flex-vertical-between fs28 padding head"
  40 + style="color:{{font_color ? ('#'+font_color):'white'}};border-color:{{btn_color ? ('#'+btn_color):'#FDC107'}};">
32 <!-- task --> 41 <!-- task -->
33 - <view class="flex-center lhead {{switch_head==0?'rhead':''}}" bindtap="switch_head" data-index="{{0}}"> 42 + <view class="flex-center lhead"
  43 + style="background-color:{{switch_head==0?(btn_color ? ('#'+btn_color):'#FDC107'):'transparent'}};border-color:{{btn_color ? ('#'+btn_color):'#FDC107'}};"
  44 + bindtap="switch_head" data-index="{{0}}">
34 <image class="explain" src="{{iurl+'miniapp/images/friendhelp/task.png'}}" lazy-load="true"></image> 45 <image class="explain" src="{{iurl+'miniapp/images/friendhelp/task.png'}}" lazy-load="true"></image>
35 <view>我的任务</view> 46 <view>我的任务</view>
36 </view> 47 </view>
37 - <view class="flex-center lhead {{switch_head==1?'rhead':''}}" bindtap="switch_head" data-index="{{1}}"> 48 + <view class="flex-center lhead"
  49 + style="background-color:{{switch_head==1?(btn_color ? ('#'+btn_color):'#FDC107'):'transparent'}};border-color:{{btn_color ? ('#'+btn_color):'#FDC107'}};"
  50 + bindtap="switch_head" data-index="{{1}}">
38 <image class="explain" src="{{iurl+'miniapp/images/friendhelp/explain.png'}}" lazy-load="true"></image> 51 <image class="explain" src="{{iurl+'miniapp/images/friendhelp/explain.png'}}" lazy-load="true"></image>
39 <view>活动说明</view> 52 <view>活动说明</view>
40 </view> 53 </view>
41 </view> 54 </view>
42 55
43 <!-- 我的任务 --> 56 <!-- 我的任务 -->
44 - <view wx:if="{{switch_head==0}}" class="white">  
45 - <view class="items"> 57 + <view wx:if="{{switch_head==0}}" class="task-content">
  58 + <view class="items" style="color:{{font_color ? ('#'+font_color):'white'}};">
46 <view class="tesk_list"> 59 <view class="tesk_list">
47 <view class="item fs26 flex-vertical-between padding" wx:for="{{zl_user_list}}"> 60 <view class="item fs26 flex-vertical-between padding" wx:for="{{zl_user_list}}">
48 <view class="flex-center width"> 61 <view class="flex-center width">
@@ -74,10 +87,10 @@ @@ -74,10 +87,10 @@
74 87
75 88
76 <view class="fs30" style="margin-top: 30rpx;"> 89 <view class="fs30" style="margin-top: 30rpx;">
77 - <view class="flex-center nothing" wx:if="{{is_load && zl_user_list.length==0}}"> 90 + <view class="flex-center nothing" wx:if="{{is_load && zl_user_list.length==0}}" style="color:{{font_color ? ('#'+font_color):'white'}}">
78 <view>暂无任务记录</view> 91 <view>暂无任务记录</view>
79 </view> 92 </view>
80 - <view class="flex-center receive" wx:if="{{is_load && s_num}}"> 93 + <view class="flex-center receive" wx:if="{{is_load && s_num}}" style="color:{{font_color ? ('#'+font_color):'white'}}">
81 <view class="flex-center ai-bas"> 94 <view class="flex-center ai-bas">
82 <view>该活动已被领取了{{s_num}}次</view> 95 <view>该活动已被领取了{{s_num}}次</view>
83 </view> 96 </view>
@@ -89,7 +102,7 @@ @@ -89,7 +102,7 @@
89 <!-- 活动说明 --> 102 <!-- 活动说明 -->
90 <view wx:if="{{switch_head}}" class="white"> 103 <view wx:if="{{switch_head}}" class="white">
91 <view class="items"> 104 <view class="items">
92 - <view class="content fs28 padding"> 105 + <view class="content fs28 padding" style="color:{{font_color ? ('#'+font_color):'white'}}">
93 <block wx:if="{{zl_act.remark!=''}}"> 106 <block wx:if="{{zl_act.remark!=''}}">
94 <rich-text nodes="{{zl_act.remark}}" style="word-break:break-all;word-wrap:break-word"></rich-text> 107 <rich-text nodes="{{zl_act.remark}}" style="word-break:break-all;word-wrap:break-word"></rich-text>
95 </block> 108 </block>
pages/user/assistance/assistance.wxss
1 page { 1 page {
2 - background-color: rgb(208, 17, 25);  
3 - width: 100%;  
4 - height: 100%; 2 + /* background-color: rgb(208, 17, 25); */
  3 + /* width: 100%;
  4 + height: 100%; */
  5 +
  6 +}
  7 +
  8 +.page {
  9 + height: 100vh;
  10 +}
  11 +
5 12
  13 +.bg-img {
  14 + background: url("https://mshopimg.yolipai.net/public/upload/newpeoplegift/temp/2020/09-26/75640123e5ae953e416527134a6fc477.jpg") no-repeat center center;
  15 + background-size: 100% 100%;
6 } 16 }
7 17
8 .lumi { 18 .lumi {
9 position: absolute; 19 position: absolute;
10 z-index: 0; 20 z-index: 0;
11 width: 100%; 21 width: 100%;
12 - height: 1100rpx; 22 + height: 800rpx;
13 } 23 }
14 24
15 .zindex { 25 .zindex {
16 - position: absolute;  
17 - z-index: 1;  
18 - width: 100%; 26 + /* position: absolute; */
  27 + /* z-index: 1;
  28 + width: 100%; */
19 } 29 }
20 30
21 .top { 31 .top {
22 - padding-bottom: 75rpx; 32 + box-sizing: border-box;
  33 + height: 1000rpx;
  34 + /* padding-bottom: 75rpx; */
  35 + /* background: url("https://mshopimg.yolipai.net/public/upload/newpeoplegift/temp/2020/09-26/75640123e5ae953e416527134a6fc477.jpg") no-repeat center center;
  36 + background-size: 100% 100%; */
  37 + position: relative;
  38 +}
  39 +
  40 +.bg-img {
  41 + width: 100%;
  42 + height: 100%;
  43 +}
  44 +
  45 +.btn-get {
  46 + position: absolute;
  47 + width: 100%;
  48 + bottom: 75rpx;
23 } 49 }
24 50
25 .getgift { 51 .getgift {
26 - width: 610rpx;  
27 - height: 130rpx;  
28 - padding-top: 70rpx; 52 + width: 600rpx;
  53 + height: 100rpx;
  54 + padding-top: 60rpx;
29 } 55 }
30 56
31 .excitation { 57 .excitation {
@@ -42,7 +68,7 @@ page { @@ -42,7 +68,7 @@ page {
42 .time { 68 .time {
43 color: rgb(255, 255, 255); 69 color: rgb(255, 255, 255);
44 margin-bottom: 55rpx; 70 margin-bottom: 55rpx;
45 - text-decoration: underline; 71 + /* text-decoration: underline; */
46 margin-top: 10rpx; 72 margin-top: 10rpx;
47 } 73 }
48 74
@@ -54,8 +80,20 @@ page { @@ -54,8 +80,20 @@ page {
54 border-radius: 45rpx; 80 border-radius: 45rpx;
55 font-weight: 900; 81 font-weight: 900;
56 line-height: 77rpx; 82 line-height: 77rpx;
57 - box-shadow: 0rpx 7rpx 0rpx 0rpx rgb(245, 119, 6); 83 + box-shadow: 0rpx 7rpx 0rpx 0rpx rgba(0, 0, 0, .2);
58 font-size: 38rpx; 84 font-size: 38rpx;
  85 +
  86 + -webkit-animation: free_download 500ms linear alternate infinite;
  87 + animation: free_download 500ms linear alternate infinite;
  88 +}
  89 +
  90 +@-webkit-keyframes free_download{
  91 + 0%{-webkit-transform:scale(0.9);}
  92 + 100%{-webkit-transform:scale(1);}
  93 +}
  94 +@keyframes free_download{
  95 + 0%{transform:scale(0.9);}
  96 + 100%{transform:scale(1);}
59 } 97 }
60 98
61 .head { 99 .head {
@@ -69,7 +107,8 @@ page { @@ -69,7 +107,8 @@ page {
69 border-top: 4rpx solid rgb(253, 193, 7); 107 border-top: 4rpx solid rgb(253, 193, 7);
70 border-left: 4rpx solid rgb(253, 193, 7); 108 border-left: 4rpx solid rgb(253, 193, 7);
71 border-right: 4rpx solid rgb(253, 193, 7); 109 border-right: 4rpx solid rgb(253, 193, 7);
72 - width: 290rpx; 110 + /* width: 290rpx; */
  111 + width: 50%;
73 height: 50rpx; 112 height: 50rpx;
74 line-height: 50rpx; 113 line-height: 50rpx;
75 } 114 }
@@ -90,7 +129,7 @@ page { @@ -90,7 +129,7 @@ page {
90 } 129 }
91 130
92 .padding { 131 .padding {
93 - padding: 0rpx 50rpx; 132 + /* padding: 0rpx 50rpx; */
94 } 133 }
95 134
96 .content { 135 .content {
@@ -138,4 +177,14 @@ page { @@ -138,4 +177,14 @@ page {
138 max-height: 335rpx; 177 max-height: 335rpx;
139 overflow: hidden; 178 overflow: hidden;
140 overflow-y:auto; 179 overflow-y:auto;
  180 +}
  181 +
  182 +
  183 +.task-container {
  184 + padding: 40rpx 40rpx 60rpx;
  185 +}
  186 +.task-content {
  187 + /* background-color: rgba(0,0,0,.3);
  188 + border-bottom-left-radius: 12rpx;
  189 + border-bottom-right-radius: 12rpx; */
141 } 190 }
142 \ No newline at end of file 191 \ No newline at end of file
pages/user/assistance/friend_assistance.js
@@ -57,7 +57,7 @@ Page({ @@ -57,7 +57,7 @@ Page({
57 //--先判断会员状态-- 57 //--先判断会员状态--
58 var user_info = getApp().globalData.userInfo; 58 var user_info = getApp().globalData.userInfo;
59 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 59 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
60 - getApp().goto('/pages/getphone/getphone'); 60 + getApp().goto('/pages/togoin/togoin');
61 return false; 61 return false;
62 } 62 }
63 63
@@ -117,7 +117,7 @@ Page({ @@ -117,7 +117,7 @@ Page({
117 var user_info = getApp().globalData.userInfo; 117 var user_info = getApp().globalData.userInfo;
118 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 118 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
119 wx.navigateTo({ 119 wx.navigateTo({
120 - url: '/pages/getphone/getphone', 120 + url: '/pages/togoin/togoin',
121 }) 121 })
122 return false; 122 return false;
123 } 123 }
pages/user/assistance/giftpacklist.js
@@ -71,7 +71,7 @@ Page({ @@ -71,7 +71,7 @@ Page({
71 //--先判断会员状态-- 71 //--先判断会员状态--
72 var user_info = getApp().globalData.userInfo; 72 var user_info = getApp().globalData.userInfo;
73 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 73 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
74 - getApp().goto('/pages/getphone/getphone'); 74 + getApp().goto('/pages/togoin/togoin');
75 return false; 75 return false;
76 } 76 }
77 77
pages/user/assistance/task_assistance.js
@@ -66,6 +66,12 @@ Page({ @@ -66,6 +66,12 @@ Page({
66 66
67 // Hei: 0, 67 // Hei: 0,
68 max_sw_height: 0, 68 max_sw_height: 0,
  69 +
  70 +
  71 + imageUrl:'',
  72 + btn_color:'',
  73 + bg_color:'',
  74 + font_color:'',
69 }, 75 },
70 76
71 /** 77 /**
@@ -143,7 +149,7 @@ Page({ @@ -143,7 +149,7 @@ Page({
143 //--先判断会员状态-- 149 //--先判断会员状态--
144 var user_info = getApp().globalData.userInfo; 150 var user_info = getApp().globalData.userInfo;
145 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 151 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
146 - getApp().goto('/pages/getphone/getphone'); 152 + getApp().goto('/pages/togoin/togoin');
147 return false; 153 return false;
148 } 154 }
149 155
@@ -163,6 +169,11 @@ Page({ @@ -163,6 +169,11 @@ Page({
163 var help_data = res.data.data; 169 var help_data = res.data.data;
164 th.setData({ 170 th.setData({
165 endDate: help_data.endDate, 171 endDate: help_data.endDate,
  172 +
  173 + btn_color: help_data.btn_color,
  174 + bg_color: help_data.bg_color,
  175 + font_color: help_data.font_color,
  176 + imageUrl: help_data.imageUrl,
166 }); 177 });
167 178
168 //任务时间 设置全局定时器 179 //任务时间 设置全局定时器
@@ -1003,9 +1014,10 @@ Page({ @@ -1003,9 +1014,10 @@ Page({
1003 var block = th.data.block; 1014 var block = th.data.block;
1004 if (images) { 1015 if (images) {
1005 th.data.head_pic_arr.length = 0; 1016 th.data.head_pic_arr.length = 0;
1006 - for (var i in images) { 1017 + for (var i in images) {s
1007 var img_path = images[i].headPic; 1018 var img_path = images[i].headPic;
1008 img_path=img_path.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); 1019 img_path=img_path.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn");
  1020 + img_path=img_path.replace("https://thirdwx.qlogo.cn", "https://wx.qlogo.cn");
1009 await getApp().request.promise_downimg(img_path).then(res => { 1021 await getApp().request.promise_downimg(img_path).then(res => {
1010 th.data.head_pic_arr.push(res); 1022 th.data.head_pic_arr.push(res);
1011 }) 1023 })
pages/user/assistance/task_assistance.wxml
1 <wxs module="filter" src="../../../utils/filter.wxs"></wxs> 1 <wxs module="filter" src="../../../utils/filter.wxs"></wxs>
2 -<view class="top-back" style="padding-bottom:80rpx;background-image: url({{iurl}}/miniapp/images/friendhelp/lumi.png)" bindtap="close"> 2 +<view class="top-back" style="background-color:#{{bg_color ? bg_color:'d01119'}};padding-bottom:80rpx;background-image: url({{iurl}}/miniapp/images/friendhelp/lumi.png)" bindtap="close">
3 <!-- <view class="top-back" style="padding-bottom:{{is_user_task!=null&&is_user_task.status==0?50:0}}rpx;background-image: url({{iurl}}/miniapp/images/friendhelp/lumi.png)" bindtap="close"> --> 3 <!-- <view class="top-back" style="padding-bottom:{{is_user_task!=null&&is_user_task.status==0?50:0}}rpx;background-image: url({{iurl}}/miniapp/images/friendhelp/lumi.png)" bindtap="close"> -->
4 <!-- 助力活动头部 --> 4 <!-- 助力活动头部 -->
5 <view class="top-frame"> 5 <view class="top-frame">
6 <view class="flex-center"> 6 <view class="flex-center">
7 - <view class="top-title white fs36 t-c ellipsis-1"> 7 + <view class="top-title white fs36 t-c ellipsis-1" style="color:{{font_color ? ('#'+font_color):'white'}};">
8 {{aitem[sw_index].helpTaskName}} 8 {{aitem[sw_index].helpTaskName}}
9 </view> 9 </view>
10 </view> 10 </view>
11 - <view class="activity-data t-c fs28 white"> 11 + <view class="activity-data t-c fs28" style="color:{{font_color ? ('#'+font_color):'white'}};">
12 活动剩余时间: 12 活动剩余时间:
13 <block wx:if="{{aitem[0].djs.day}}"><text class='tui-conutdown-box'> {{aitem[0].djs.day}}天 </text></block> 13 <block wx:if="{{aitem[0].djs.day}}"><text class='tui-conutdown-box'> {{aitem[0].djs.day}}天 </text></block>
14 <text class='tui-conutdown-box'>{{aitem[0].djs.hou}}</text>: 14 <text class='tui-conutdown-box'>{{aitem[0].djs.hou}}</text>:
@@ -45,17 +45,20 @@ @@ -45,17 +45,20 @@
45 <text class="white fs24">{{is_user_task.zlHelpNum}}/{{is_user_task.helpNum}}</text> 45 <text class="white fs24">{{is_user_task.zlHelpNum}}/{{is_user_task.helpNum}}</text>
46 46
47 </view> 47 </view>
48 - <view class="task-number fs28 white t-c "> 48 + <view class="task-number fs28 t-c" style="color:{{font_color ? ('#'+font_color):'white'}};">
49 今天剩余可领{{task_number}}个任务 49 今天剩余可领{{task_number}}个任务
50 </view> 50 </view>
51 51
52 - <view wx:if="{{is_user_task==null}}" class="task_clike fs40 t-c flex-center" data-taskid="{{taskid}}" bindtap="add_onlicke"> 52 + <view wx:if="{{is_user_task==null}}" class="task_clike fs40 t-c flex-center" data-taskid="{{taskid}}" bindtap="add_onlicke"
  53 + style="background-color:#{{btn_color ? btn_color:'fbda0e'}};color:{{font_color?('#'+font_color):'white'}};">
53 就选它了 54 就选它了
54 </view> 55 </view>
55 - <view wx:if="{{is_user_task!=null&&is_user_task.status==0}}" class="task_clike fs40 t-c flex-center" bindtap="save_share"> 56 + <view wx:if="{{is_user_task!=null&&is_user_task.status==0}}" class="task_clike fs40 t-c flex-center" bindtap="save_share"
  57 + style="background-color:#{{btn_color ? btn_color:'fbda0e'}};color:{{font_color?('#'+font_color):'white'}};">
56 好友拆一拆 58 好友拆一拆
57 </view> 59 </view>
58 - <view wx:if="{{is_user_task!=null&&is_user_task.status==1}}" class="task_clike fs40 t-c flex-center" data-libaoid="{{is_user_task.helpListGiftBagId}}"data-taskingid="{{is_user_task.id}}" bindtap="redeem_now"> 60 + <view wx:if="{{is_user_task!=null&&is_user_task.status==1}}" class="task_clike fs40 t-c flex-center" data-libaoid="{{is_user_task.helpListGiftBagId}}"data-taskingid="{{is_user_task.id}}" bindtap="redeem_now"
  61 + style="background-color:#{{btn_color ? btn_color:'fbda0e'}};color:{{font_color?('#'+font_color):'white'}};">
59 立即兑换 62 立即兑换
60 </view> 63 </view>
61 64
@@ -66,22 +69,24 @@ @@ -66,22 +69,24 @@
66 69
67 </view> 70 </view>
68 <!-- 底部列表 --> 71 <!-- 底部列表 -->
69 -<view> 72 +<view style="background-color:#{{bg_color ? bg_color:'d01119'}}">
70 <!-- <view style="margin-top:{{is_user_task!=null?52:0}}rpx"> --> 73 <!-- <view style="margin-top:{{is_user_task!=null?52:0}}rpx"> -->
71 <!-- 标题 --> 74 <!-- 标题 -->
72 75
73 - <view class="flex-vertical-between fs28 padding head">  
74 - <view class="flex-center lhead {{switch_head==0?'rhead':''}}" bindtap="user_task_list_click" data-index="0"> 76 + <view class="flex-vertical-between fs28 padding head" style="color:#{{font_color ? font_color:'white'}};border-color:{{btn_color ? ('#'+btn_color):'#FDC107'}};">
  77 + <view class="flex-center lhead" bindtap="user_task_list_click" data-index="0"
  78 + style="background-color:{{switch_head==0?(btn_color ? ('#'+btn_color):'#FDC107'):'transparent'}};border-color:{{btn_color ? ('#'+btn_color):'#FDC107'}};">
75 <image class="unfinished" src="{{iurl}}miniapp/images/friendhelp/task.png" lazy-load="true"></image> 79 <image class="unfinished" src="{{iurl}}miniapp/images/friendhelp/task.png" lazy-load="true"></image>
76 <view>我的任务</view> 80 <view>我的任务</view>
77 </view> 81 </view>
78 - <view class="flex-center lhead {{switch_head==1?'rhead':''}}" bindtap="dismantle_record_click" data-index='1'> 82 + <view class="flex-center lhead" bindtap="dismantle_record_click" data-index='1'
  83 + style="background-color:{{switch_head==1?(btn_color ? ('#'+btn_color):'#FDC107'):'transparent'}};border-color:{{btn_color ? ('#'+btn_color):'#FDC107'}};">
79 <image class="unfinished" style="margin-top: 5rpx;" src="{{iurl}}miniapp/images/friendhelp/edit.png" lazy-load="true"></image> 84 <image class="unfinished" style="margin-top: 5rpx;" src="{{iurl}}miniapp/images/friendhelp/edit.png" lazy-load="true"></image>
80 <view>帮拆记录</view> 85 <view>帮拆记录</view>
81 </view> 86 </view>
82 </view> 87 </view>
83 88
84 - <view class="white"> 89 + <view style="color:{{font_color ? ('#'+font_color):'white'}}">
85 90
86 <view class="items" wx:if="{{is_task==0}}"> 91 <view class="items" wx:if="{{is_task==0}}">
87 <view class="tesk_list"> 92 <view class="tesk_list">
@@ -101,7 +106,7 @@ @@ -101,7 +106,7 @@
101 </view> 106 </view>
102 107
103 <view class="fs30" wx:if="{{user_task_list==null || user_task_list==''}}"> 108 <view class="fs30" wx:if="{{user_task_list==null || user_task_list==''}}">
104 - <view class="flex-center nothing white"> 109 + <view class="flex-center nothing">
105 <view>暂无任务记录</view> 110 <view>暂无任务记录</view>
106 </view> 111 </view>
107 </view> 112 </view>
@@ -111,7 +116,7 @@ @@ -111,7 +116,7 @@
111 </view> 116 </view>
112 117
113 118
114 - <view class="items" wx:if="{{is_task==1}}"> 119 + <view class="items" wx:if="{{is_task==1}}" style="color:{{font_color ? ('#'+font_color):'white'}};">
115 <block wx:if="{{ dismantle!=null|| dismantle!=''}}"> 120 <block wx:if="{{ dismantle!=null|| dismantle!=''}}">
116 121
117 <view class="tesk_list"> 122 <view class="tesk_list">
@@ -133,7 +138,7 @@ @@ -133,7 +138,7 @@
133 </block> 138 </block>
134 139
135 <view class="fs30" wx:if="{{dismantle==null|| dismantle==''}}"> 140 <view class="fs30" wx:if="{{dismantle==null|| dismantle==''}}">
136 - <view class="flex-center nothing white"> 141 + <view class="flex-center nothing">
137 <view>暂无任务记录</view> 142 <view>暂无任务记录</view>
138 </view> 143 </view>
139 </view> 144 </view>
@@ -143,16 +148,16 @@ @@ -143,16 +148,16 @@
143 148
144 </view> 149 </view>
145 <!-- 加载更多 --> 150 <!-- 加载更多 -->
146 -<view class="fs32"> 151 +<view class="fs32" style="background-color:#{{bg_color ? bg_color:'d01119'}};color:{{font_color ? ('#'+font_color):'white'}};">
147 <view class="flex-center" wx:if="{{is_show==1&&is_user_list==0}}"> 152 <view class="flex-center" wx:if="{{is_show==1&&is_user_list==0}}">
148 <view class="line"></view> 153 <view class="line"></view>
149 - <view class="load white" bindtap="task_list">点击加载更多</view> 154 + <view class="load" bindtap="task_list">点击加载更多</view>
150 <view class="line"></view> 155 <view class="line"></view>
151 </view> 156 </view>
152 - <view class="flex-center white bottom" wx:if="{{usercount>0}}"> 157 + <view class="flex-center bottom" wx:if="{{usercount>0}}">
153 <view>该任务已被领取了{{usercount}}次</view> 158 <view>该任务已被领取了{{usercount}}次</view>
154 </view> 159 </view>
155 - <view class="flex-center white bottom" wx:else> 160 + <view class="flex-center bottom" wx:else>
156 <view>暂无领取记录</view> 161 <view>暂无领取记录</view>
157 </view> 162 </view>
158 </view> 163 </view>
pages/user/assistance/task_assistance.wxss
1 page { 1 page {
2 - background: #d01119; 2 + /* background: #d01119; */
3 width: 100%; 3 width: 100%;
4 height: 100%; 4 height: 100%;
5 5
@@ -13,7 +13,7 @@ page { @@ -13,7 +13,7 @@ page {
13 } 13 }
14 .top-back { 14 .top-back {
15 width: 100%; 15 width: 100%;
16 - /* height:65%; */ 16 + /* height:100vh; */
17 background-repead: no-repead; 17 background-repead: no-repead;
18 background-size: 100% 100%; 18 background-size: 100% 100%;
19 padding-bottom: 50rpx; 19 padding-bottom: 50rpx;
@@ -55,7 +55,7 @@ page { @@ -55,7 +55,7 @@ page {
55 color: #d01119; 55 color: #d01119;
56 line-height: 65rpx; 56 line-height: 65rpx;
57 letter-spacing: 5rpx; 57 letter-spacing: 5rpx;
58 - box-shadow: 0rpx 7rpx 0rpx 0rpx rgb(245, 119, 6); 58 + box-shadow: 0rpx 7rpx 0rpx 0rpx rgba(0, 0, 0, .2);
59 } 59 }
60 60
61 /* 底部列表样式 */ 61 /* 底部列表样式 */
@@ -235,8 +235,8 @@ line-height: 48rpx; @@ -235,8 +235,8 @@ line-height: 48rpx;
235 235
236 } 236 }
237 .bottom{ 237 .bottom{
238 - margin-bottom: 50rpx;  
239 - margin-top: 20rpx; 238 + padding-bottom: 50rpx;
  239 + padding-top: 20rpx;
240 } 240 }
241 241
242 .rel { 242 .rel {
pages/user/cardinfo/cardinfo.js
@@ -53,7 +53,7 @@ Page({ @@ -53,7 +53,7 @@ Page({
53 //--先判断会员状态-- 53 //--先判断会员状态--
54 var user_info = getApp().globalData.userInfo; 54 var user_info = getApp().globalData.userInfo;
55 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 55 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
56 - wx.navigateTo({ url: '/pages/getphone/getphone' }) 56 + wx.navigateTo({ url: '/pages/togoin/togoin' })
57 return false; 57 return false;
58 } 58 }
59 59
@@ -645,6 +645,7 @@ Page({ @@ -645,6 +645,7 @@ Page({
645 tt(func); 645 tt(func);
646 } else { 646 } else {
647 path2 = path2.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); 647 path2 = path2.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn");
  648 + path2 = path2.replace("https://thirdwx.qlogo.cn", "https://wx.qlogo.cn");
648 wx.getImageInfo({ 649 wx.getImageInfo({
649 src: path2, 650 src: path2,
650 success: function (res) { 651 success: function (res) {
pages/user/coupons/coupons.js
@@ -156,7 +156,7 @@ Page({ @@ -156,7 +156,7 @@ Page({
156 //--先判断会员状态-- 156 //--先判断会员状态--
157 var user_info = getApp().globalData.userInfo; 157 var user_info = getApp().globalData.userInfo;
158 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 158 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
159 - wx.navigateTo({ url: '/pages/getphone/getphone', }) 159 + wx.navigateTo({ url: '/pages/togoin/togoin', })
160 return false; 160 return false;
161 } 161 }
162 this.init(th.myyhj,th.s_guoqi); 162 this.init(th.myyhj,th.s_guoqi);
pages/user/deposit/deposit.js
@@ -20,7 +20,7 @@ Page({ @@ -20,7 +20,7 @@ Page({
20 // --先判断会员状态-- 20 // --先判断会员状态--
21 var user_info = getApp().globalData.userInfo; 21 var user_info = getApp().globalData.userInfo;
22 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 22 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
23 - wx.navigateTo({ url: '/pages/getphone/getphone', }) 23 + wx.navigateTo({ url: '/pages/togoin/togoin', })
24 return false; 24 return false;
25 } 25 }
26 wx.setNavigationBarTitle({ 26 wx.setNavigationBarTitle({
pages/user/index/index.js
@@ -41,6 +41,7 @@ Page({ @@ -41,6 +41,7 @@ Page({
41 actImg: "", 41 actImg: "",
42 is_assistance: 0, //助力活动 42 is_assistance: 0, //助力活动
43 ad_img:"", 43 ad_img:"",
  44 + add_card_data:'', //等级卡的内容
44 }, 45 },
45 goto_nav: function(e) { 46 goto_nav: function(e) {
46 var th = this; 47 var th = this;
@@ -49,7 +50,7 @@ Page({ @@ -49,7 +50,7 @@ Page({
49 getApp().goto(url); 50 getApp().goto(url);
50 } else { 51 } else {
51 wx.navigateTo({ 52 wx.navigateTo({
52 - url: '/pages/getphone/getphone', 53 + url: '/pages/togoin/togoin',
53 }) 54 })
54 } 55 }
55 }, 56 },
@@ -70,14 +71,17 @@ Page({ @@ -70,14 +71,17 @@ Page({
70 th.setData({ad_img:item.ad_code}) 71 th.setData({ad_img:item.ad_code})
71 } 72 }
72 }) 73 })
  74 +
  75 + app.getUserFir();
  76 +
  77 +
73 }, 78 },
74 79
75 /** 80 /**
76 * 生命周期函数--监听页面显示 81 * 生命周期函数--监听页面显示
77 */ 82 */
78 onShow: function() { 83 onShow: function() {
79 -  
80 - 84 +
81 if (typeof this.getTabBar === 'function' && this.getTabBar()) { 85 if (typeof this.getTabBar === 'function' && this.getTabBar()) {
82 var index=getApp().getPageIndex(this); 86 var index=getApp().getPageIndex(this);
83 this.getTabBar().setData({ 87 this.getTabBar().setData({
@@ -100,11 +104,27 @@ Page({ @@ -100,11 +104,27 @@ Page({
100 if (getApp().globalData.user_id) getApp().requestCardNum(th); 104 if (getApp().globalData.user_id) getApp().requestCardNum(th);
101 },500) 105 },500)
102 /*------会员登录------*/ 106 /*------会员登录------*/
103 - app.getUserFir(async function(e) {  
104 - if (e != undefined && e != null && e.mobile) { 107 + var e=getApp().globalData.userInfo;
  108 +
  109 + if (e != undefined && e != null && e.mobile) {
105 s.setData({ 110 s.setData({
106 userInfo: e 111 userInfo: e
107 }); 112 });
  113 +
  114 + //-- 要调用接口,获取卡的钱 --
  115 + var url="/api/weshop/wxuser/getWxCardInfo?storeId="+os.stoid+"&userId="+e.user_id;
  116 + rq.get(url,{
  117 + success: function(su) {
  118 + if(su.data.code==0){
  119 + s.setData({
  120 + add_card_data: su.data.data,
  121 + });
  122 + }
  123 + }
  124 + });
  125 +
  126 +
  127 +
108 /*-----统计-----*/ 128 /*-----统计-----*/
109 rq.get("/api/weshop/order/waitlist", { 129 rq.get("/api/weshop/order/waitlist", {
110 data: { 130 data: {
@@ -312,7 +332,6 @@ Page({ @@ -312,7 +332,6 @@ Page({
312 //th.requestRecommend(); 332 //th.requestRecommend();
313 333
314 } 334 }
315 - });  
316 335
317 var goods_list = this.selectComponent("#goods_recommend"); //组件的id 336 var goods_list = this.selectComponent("#goods_recommend"); //组件的id
318 goods_list.init(); 337 goods_list.init();
@@ -416,7 +435,7 @@ Page({ @@ -416,7 +435,7 @@ Page({
416 //--跳到绑定页面-- 435 //--跳到绑定页面--
417 gobindtel: function() { 436 gobindtel: function() {
418 wx.navigateTo({ 437 wx.navigateTo({
419 - url: '/pages/getphone/getphone', 438 + url: '/pages/togoin/togoin',
420 }) 439 })
421 }, 440 },
422 441
@@ -655,6 +674,37 @@ Page({ @@ -655,6 +674,37 @@ Page({
655 if(!url || url=='') return; 674 if(!url || url=='') return;
656 if(url[0]!='/') url='/'+url; 675 if(url[0]!='/') url='/'+url;
657 getApp().goto(url); 676 getApp().goto(url);
  677 + },
  678 +
  679 + //添加卡包
  680 + addcard:function(){
  681 + var res=this.data.add_card_data;
  682 + var arr = new Array(6)
  683 + arr[0] = res.code;
  684 + arr[1] = res.timestamp;
  685 + arr[2] = res.jsapiTicket;
  686 + arr[3] = res.openid;
  687 + arr[4] = res.cardid;
  688 + arr[5] = res.nonceStr;
  689 + var c=arr.sort();
  690 + var newstr="";
  691 + for (var i=0;i<c.length;i++)
  692 + {
  693 + newstr+=c[i];
  694 + }
  695 +
  696 + var sh1= ut.sha1(newstr);
  697 + wx.addCard({
  698 + cardList: [
  699 + {
  700 + cardId: res.cardid,
  701 + cardExt: '{"code": "'+res.code+'", "openid": "'+res.openid+'","timestamp": "' + res.timestamp + '","nonce_str":"' + res.nonceStr + '","outer_str":"web", "signature":"' + sh1 + '"}'
  702 + }
  703 +
  704 + ],
  705 + success: function (res) {},
  706 + cancel: function (res) {}
  707 + });
658 } 708 }
659 709
660 }) 710 })
pages/user/index/index.wxml
@@ -244,6 +244,13 @@ @@ -244,6 +244,13 @@
244 <image class="xc-center-img " src="{{iurl}}/miniapp/images/add2.png"></image> 244 <image class="xc-center-img " src="{{iurl}}/miniapp/images/add2.png"></image>
245 <view class="four-level-word">我的地址</view> 245 <view class="four-level-word">我的地址</view>
246 </view> 246 </view>
  247 +
  248 + <!-- 收入卡包 -->
  249 + <view class="item t-c" bindtap="addcard" wx:if="{{add_card_data}}">
  250 + <image class="xc-center-img " src="{{iurl}}//miniapp/images/wx_cardbag.png"></image>
  251 + <view class="four-level-word">收入卡包</view>
  252 + </view>
  253 +
247 <view class="item t-c" data-url="/pages/user/my_service/i_service" bindtap="goto_nav" > 254 <view class="item t-c" data-url="/pages/user/my_service/i_service" bindtap="goto_nav" >
248 <image class="xc-center-img " src="{{iurl}}/miniapp/images/yyservice/myservice.png"></image> 255 <image class="xc-center-img " src="{{iurl}}/miniapp/images/yyservice/myservice.png"></image>
249 <view class="four-level-word">我的服务</view> 256 <view class="four-level-word">我的服务</view>
pages/user/integral/integral.js
@@ -279,7 +279,7 @@ Page({ @@ -279,7 +279,7 @@ Page({
279 //--先判断会员状态-- 279 //--先判断会员状态--
280 var user_info = getApp().globalData.userInfo; 280 var user_info = getApp().globalData.userInfo;
281 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 281 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
282 - wx.navigateTo({ url: '/pages/getphone/getphone', }) 282 + wx.navigateTo({ url: '/pages/togoin/togoin', })
283 return false; 283 return false;
284 } 284 }
285 285
pages/user/member/bring/bring.js
@@ -365,7 +365,7 @@ Page({ @@ -365,7 +365,7 @@ Page({
365 var user_info = getApp().globalData.userInfo; 365 var user_info = getApp().globalData.userInfo;
366 if (user_info == null || user_info.mobile == undefined || user_info.mobile == " " || user_info.mobile == null) { 366 if (user_info == null || user_info.mobile == undefined || user_info.mobile == " " || user_info.mobile == null) {
367 wx.navigateTo({ 367 wx.navigateTo({
368 - url: '/pages/getphone/getphone', 368 + url: '/pages/togoin/togoin',
369 }) 369 })
370 return false; 370 return false;
371 } 371 }
pages/user/member/menber.js
@@ -23,7 +23,7 @@ Page({ @@ -23,7 +23,7 @@ Page({
23 //--先判断会员状态-- 23 //--先判断会员状态--
24 var user_info = getApp().globalData.userInfo; 24 var user_info = getApp().globalData.userInfo;
25 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 25 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
26 - wx.navigateTo({ url: '/pages/getphone/getphone', }) 26 + wx.navigateTo({ url: '/pages/togoin/togoin', })
27 return false; 27 return false;
28 } 28 }
29 this.init_fir(); 29 this.init_fir();
pages/user/my_service/appment_main.js
@@ -528,7 +528,7 @@ Page({ @@ -528,7 +528,7 @@ Page({
528 validay: options.Validay 528 validay: options.Validay
529 }) 529 })
530 wx.getLocation({ 530 wx.getLocation({
531 - type: 'wgs84', 531 + type: 'gcj02',
532 success: function(res) { 532 success: function(res) {
533 th.data.lat = res.latitude; 533 th.data.lat = res.latitude;
534 th.data.lon = res.longitude; 534 th.data.lon = res.longitude;
pages/user/order_detail/order_detail.js
@@ -665,6 +665,458 @@ Page({ @@ -665,6 +665,458 @@ Page({
665 } 665 }
666 func(ob) 666 func(ob)
667 }, 667 },
  668 +
  669 +
  670 + //再来一单的功能的实现
  671 + moreOrder:function(e){
  672 + var th=this;
  673 + var item=th.data.order;
  674 + th.check_more_order(item);
  675 + },
  676 +
  677 + check_more_order:async function(item){
  678 + var pickup=null,th=this;
  679 + //--------获取门店-----------
  680 + await getApp().request.promiseGet("/api/weshop/pickup/get/" + os.stoid + "/" + item.pickup_id, {
  681 +
  682 + }).then(res=>{
  683 + pickup = res.data.data;
  684 + })
  685 +
  686 + //--------获取商品----------
  687 + var goods_list=item.order_goods;
  688 + //--- 返回的内容 ---
  689 + var back_goods_arr=[];
  690 + var err_text="";
  691 + for(var i in goods_list){
  692 + var g_item=goods_list[i];
  693 + //--如果是赠品,不加入购物车--
  694 + if(g_item['is_gift']) continue;
  695 + if(g_item['prom_type']==4 ){
  696 + $err_text+= g_item['goods_name']+"积分购商品不加入购物车\n";
  697 + continue;
  698 + }
  699 + if(g_item['prom_type']==5){
  700 + $err_text+= g_item['goods_name']+"搭配购商品不加入购物车\n";
  701 + continue;
  702 + }
  703 + if(g_item['prom_type']==6 ){
  704 + $err_text+= g_item['goods_name']+"拼团商品不加入购物车\n";
  705 + continue;
  706 + }
  707 +
  708 + //--获取商品--
  709 + var good=null;
  710 + await getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + g_item.goods_id, {
  711 +
  712 + }).then(res=>{
  713 + good=res.data.data;
  714 + })
  715 +
  716 + if(!good){
  717 + err_text+= g_item['goods_name']+"未找到商品\n";
  718 + continue;
  719 + }
  720 + if (good.is_on_sale != 1) {
  721 + err_text+= g_item['goods_name']+"已经下架\n";
  722 + continue;
  723 + }
  724 +
  725 + var timestamp = ut.gettimestamp();
  726 + if (good.on_time > timestamp) {
  727 + err_text+= g_item['goods_name']+"还未上架\n";
  728 + continue;
  729 + }
  730 + if (good.down_time > 0) {
  731 + if (good.down_time < timestamp) {
  732 + err_text+=g_item['goods_name']+"已经下架\n";
  733 + continue;
  734 + }
  735 + }
  736 +
  737 + //如果商品的配送方式和门店不匹配
  738 + if(good['distr_type']>0 && pick_up['distr_type']>0 && good['distr_type']!=pick_up['distr_type'] ){
  739 + err_text+= good['goods_name']+"配送方式不一致\n";
  740 + continue;
  741 + }
  742 +
  743 + var prom=null;
  744 + var b_item={}
  745 + b_item.goods_id=g_item.goods_id;
  746 + b_item.goods_name=g_item.goods_name;
  747 + b_item.goods_num=g_item.goods_num;
  748 + b_item.guide_id=g_item.guide_id;
  749 + b_item.guide_type=g_item.guide_type;
  750 + b_item.pickup_id=item.pickup_id;
  751 + b_item.price=good.shop_price;
  752 + b_item.goods_sn=good.goods_sn;
  753 + b_item.sku=good.sku;
  754 + b_item.is_integral_normal=g_item.is_integral_normal;
  755 +
  756 + //-- 如果会员是等级卡的时候,同时商品也有设置相应的卡价格 --
  757 + var card_field=th.data.card_field;
  758 + if(card_field && good[card_field]>0){
  759 + b_item.price=good[card_field];
  760 + }
  761 +
  762 + //--判断商品当前的活动情况--
  763 + switch(good.prom_type){
  764 + case 1:
  765 + var flash=null;
  766 + getApp().request.promiseGet("/api/ms/flash_sale/get/" + os.stoid + "/" + good.prom_id, {
  767 + }).then(res=>{
  768 + if (res.data.code== 0) {
  769 + flash=res.data.data;
  770 + }
  771 + })
  772 + //----已经结束-----
  773 + if (flash && flash.is_end == 0 && flash.end_time > timestamp && flash.start_time > timestamp ) {
  774 + prom=flash;
  775 + b_item.price=prom.price; //
  776 + }
  777 + break;
  778 + case 6:
  779 + b_item.is_pd_normal=1; break;
  780 + }
  781 +
  782 +
  783 +
  784 + //判断是不是线下库存的购买, 是不是秒杀活动
  785 + if(th.data.sales_rules==2 && !prom){
  786 +
  787 + //-- 看一下购物车上有多少商品 --
  788 + var cart_num=0;
  789 + await getApp().request.promiseGet("/api/weshop/cart/page", {
  790 + data: {
  791 + store_id: os.stoid,
  792 + user_id: getApp().globalData.user_id,
  793 + state:0, is_gift:0,
  794 + goods_id:good.goods_id,
  795 + pick_id: b_item.pickup_id
  796 + }
  797 + }).then(res=>{
  798 + var num = 0;
  799 + if(res.data.code==0 && res.data.data && res.data.data.pageData) {
  800 + for (var i = 0; i < res.data.data.pageData.length; i++) {
  801 + num += res.data.data.pageData[i].goods_num;
  802 + }
  803 + }
  804 + cart_num=num;
  805 + })
  806 +
  807 + var lock=0,plist=null;
  808 + //先读取门店的lock,
  809 + await getApp().request.promiseGet("/api/weshop/order/ware/lock/page",{
  810 + data:{store_id:os.stoid,wareId:good.goods_id,storageId:b_item.pickup_id,pageSize:1000}
  811 + }).then(res=>{
  812 + if(res.data.code==0 && res.data.data.total>0){
  813 + for(var i in res.data.data.pageData)
  814 + lock+=res.data.data.pageData[i].outQty
  815 + }
  816 + })
  817 +
  818 + //---通过接口获取门店的线下库存信息--
  819 + await getApp().request.promiseGet("/api/weshop/goods/getWareStorages",{
  820 + data:{storageNos:pickup.pickup_no,wareIds:encodeURIComponent(good.erpwareid),storeId:os.stoid}
  821 + }).then(res=>{
  822 + if(res.data.code==0 && res.data.data.total>0){
  823 + plist=res.data.data.pageData[0];
  824 + }
  825 + })
  826 +
  827 + if(!plist){
  828 + err_text+= good['goods_name']+"库存不足\n";
  829 + continue;
  830 + }
  831 + if(plist.CanOutQty-lock<=0){
  832 + err_text+= good['goods_name']+"库存不足\n";
  833 + continue;
  834 + }
  835 + if(b_item.goods_num>(plist.CanOutQty-lock)){
  836 + b_item.goods_num=plist.CanOutQty-lock;
  837 + }
  838 + var req_data={
  839 + store_id: os.stoid,
  840 + user_id: getApp().globalData.user_id,
  841 + goods_id: good.goods_id,
  842 + };
  843 +
  844 + var buynum=0;
  845 + //---要获得商品,该用户买了多少件,同步应用---
  846 + await getApp().request.promiseGet("/api/weshop/ordergoods/getUserBuyGoodsNum", {
  847 + data: req_data,
  848 + }).then(res => {
  849 + if(res.data.code==0){
  850 + var buy_num_data = res.data.data;
  851 + buynum = buy_num_data.goodsbuynum;
  852 + }
  853 + })
  854 +
  855 + //---- 要计算商品的限购 -----
  856 + if(good['viplimited']>0){
  857 + if(cart_num+buynum>good['viplimited']){
  858 + err_text+= good['goods_name']+"超出限购\n";
  859 + continue;
  860 + }
  861 + good['viplimited']-=(cart_num+buynum);
  862 + if(b_item.goods_num>good['viplimited']){
  863 + b_item.goods_num=good['viplimited'];
  864 + }
  865 + }
  866 +
  867 + back_goods_arr.push(b_item); //返回商品元素
  868 +
  869 + }else{
  870 +
  871 + //-- 看一下购物车上有多少商品 --
  872 + var cart_num=0;
  873 + await getApp().request.promiseGet("/api/weshop/cart/page", {
  874 + data: {
  875 + store_id: os.stoid,
  876 + user_id: getApp().globalData.user_id,
  877 + state:0, is_gift:0,
  878 + goods_id:good.goods_id
  879 + }
  880 + }).then(res=>{
  881 + var num = 0;
  882 + if(res.data.code==0 && res.data.data && res.data.data.pageData) {
  883 + for (var i = 0; i < res.data.data.pageData.length; i++) {
  884 + num += res.data.data.pageData[i].goods_num;
  885 + }
  886 + }
  887 + cart_num=num;
  888 + })
  889 +
  890 +
  891 + if(good.store_count<=0){
  892 + err_text+= good['goods_name']+"库存不足\n";
  893 + continue;
  894 + }
  895 + if(b_item.goods_num>good.store_count)
  896 + b_item.goods_num=good.store_count;
  897 +
  898 + var buynum=0; //商品已经购买多少件
  899 + var promgoodsbuynum=0; //活动已经购买多少件
  900 + var redis_num = 0; //redis库存
  901 +
  902 + var req_data={
  903 + store_id: os.stoid,
  904 + user_id: getApp().globalData.user_id,
  905 + goods_id: good.goods_id,
  906 + };
  907 +
  908 + if(prom){
  909 + req_data.prom_type= good.prom_type;
  910 + req_data.prom_id= good.prom_id;
  911 + b_item.prom_type=good.prom_type;
  912 + b_item.prom_id=good.prom_id;
  913 +
  914 + //------判断活动是否抢光-----
  915 + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" +
  916 + os.stoid + "/" + good.prom_type + "/" + good.prom_id, {
  917 + 1: 1
  918 + }).then(res => {
  919 + redis_num = res.data.data;
  920 + });
  921 + if(redis_num<=0){
  922 + err_text+= good['goods_name']+"活动不足\n";
  923 + continue;
  924 + }
  925 +
  926 + }
  927 +
  928 + //---要获得商品,该用户买了多少件,同步应用---
  929 + await getApp().request.promiseGet("/api/weshop/ordergoods/getUserBuyGoodsNum", {
  930 + data: req_data,
  931 + }).then(res => {
  932 + if(res.data.code==0){
  933 + var buy_num_data = res.data.data;
  934 + if (buy_num_data.promgoodsbuynum) promgoodsbuynum = buy_num_data.promgoodsbuynum;
  935 + buynum = buy_num_data.goodsbuynum;
  936 + }
  937 + })
  938 +
  939 + //---- 要计算商品的限购 -----
  940 + if(good['viplimited']>0){
  941 + if(cart_num+buynum>good['viplimited']){
  942 + err_text+= good['goods_name']+"超出限购\n";
  943 + continue;
  944 + }
  945 + good['viplimited']-=(cart_num+buynum);
  946 + if(b_item.goods_num>good['viplimited']){
  947 + b_item.goods_num=good['viplimited'];
  948 + }
  949 +
  950 + }
  951 +
  952 + //-- 判断活动的库存 --
  953 + if(prom){
  954 + if(prom['goods_num']<=prom['buy_num']){
  955 + err_text+= good['goods_name']+"超出活动库存\n";continue;
  956 + }
  957 +
  958 + if(b_item.goods_num>prom['goods_num']-prom['buy_num']){
  959 + b_item['goods_num']= b_item['goods_num']-b_item['buy_num'];
  960 + }
  961 +
  962 + if(b_item.goods_num>redis_num){
  963 + b_item.goods_num=redis_num;
  964 + }
  965 +
  966 + if(cart_num+buynum>prom['buy_limit']){
  967 + err_text+= good['goods_name']+"超出活动限购\n";continue;
  968 + }
  969 + prom['buy_limit'] -= (cart_num+buynum);
  970 + if(b_item.goods_num>prom['buy_limit']){
  971 + b_item.goods_num=prom['buy_limit'];
  972 + }
  973 +
  974 + }
  975 + back_goods_arr.push(b_item); //返回商品元素
  976 + }
  977 + }
  978 +
  979 + //有重新购买的数据是时候,就要重新生成订单
  980 + if(back_goods_arr.length>0){
  981 + th.setData({back_goods_arr:back_goods_arr});
  982 + if(!err_text){
  983 + th.more_add_cart();
  984 + }else{
  985 + // 如果没有获取用户信息
  986 + wx.showModal({
  987 + title:'确定',
  988 + content: err_text+',确定要买其他商品码?',
  989 + success(res) {
  990 + if (res.confirm) {
  991 + //跳转到登录页
  992 + th.more_add_cart();
  993 + }
  994 + }
  995 + });
  996 +
  997 + }
  998 + }else{
  999 + getApp().confirmBox(err_text);
  1000 + }
  1001 + },
  1002 +
  1003 + more_add_cart:async function(){
  1004 + var back_goods_arr=this.data.back_goods_arr;
  1005 + var err_text="";
  1006 + var ok_num=0;
  1007 +
  1008 + for(var i in back_goods_arr){
  1009 + //商品ID
  1010 + var g_item=back_goods_arr[i];
  1011 + var newd = {
  1012 + goods_id: g_item.goods_id,
  1013 + goods_num: g_item.goods_num,
  1014 + pick_id: g_item.pickup_id,
  1015 + user_id: oo.user_id,
  1016 + store_id: os.stoid,
  1017 + goods_price: g_item.price,
  1018 + member_goods_price: g_item.price,
  1019 + goods_name: g_item.goods_name,
  1020 + goods_sn: g_item.goods_sn,
  1021 + sku: g_item.sku,
  1022 + };
  1023 +
  1024 + if(g_item.guide_id){
  1025 + newd['guide_id']=g_item.guide_id;
  1026 + newd['guide_type']=g_item.guide_type;
  1027 + }
  1028 +
  1029 + if(g_item.is_integral_normal){
  1030 + newd['is_integral_normal']=g_item.is_integral_normal;
  1031 + }
  1032 + if(g_item.is_pd_normal){
  1033 + newd['is_pd_normal']=g_item.is_pd_normal;
  1034 + }
  1035 + if(g_item.prom_type){
  1036 + newd['prom_type']=g_item.prom_type;
  1037 + newd['prom_id']=g_item.prom_id;
  1038 + }
  1039 +
  1040 +
  1041 +
  1042 + var b_cart_goods=null;
  1043 + await getApp().request.promiseGet("/api/weshop/cart/page", {
  1044 + data: {
  1045 + store_id: os.stoid,
  1046 + user_id: oo.user_id,
  1047 + goods_id: g_item.goods_id,
  1048 + pick_id: g_item.pickup_id,
  1049 + },
  1050 + }).then(res=>{
  1051 + //-------如果购物车中有相关的数据-------
  1052 + if (res.data.data.total > 0) {
  1053 + b_cart_goods= res.data.data.pageData[0];
  1054 + }
  1055 + })
  1056 +
  1057 + //-- 如果就加入过购物车 --
  1058 + if(b_cart_goods){
  1059 + var updata = {
  1060 + id: b_cart_goods.id,
  1061 + goods_num: newd.goods_num + b_cart_goods.goods_num,
  1062 + goods_price: newd.goods_price,
  1063 + member_goods_price:newd.goods_price,
  1064 + store_id: os.stoid,
  1065 + };
  1066 + if(newd.guide_id){
  1067 + updata.guide_id=newd.guide_id;
  1068 + updata.guide_type=newd.guide_type;
  1069 + }
  1070 + await getApp().request.promisePut("/api/weshop/cart/update", {
  1071 + data: updata
  1072 + }).then(res=>{
  1073 + if(res.data.code==0) {
  1074 + ok_num++;
  1075 + }else{
  1076 + err_text+=newd.goods_name+"加入购物车失败\n";
  1077 + }
  1078 + })
  1079 +
  1080 + }else{
  1081 + await getApp().request.promisePost("/api/weshop/cart/save", {
  1082 + data: newd
  1083 + }).then(res=>{
  1084 + if(res.data.code==0) {
  1085 + ok_num++;
  1086 + }else{
  1087 + err_text+=newd.goods_name+"加入购物车失败\n";
  1088 + }
  1089 + })
  1090 + }
  1091 + }
  1092 +
  1093 + if(ok_num==0){
  1094 + //-- 如果没有获取用户信息 --
  1095 + wx.showModal({
  1096 + title:'提示',
  1097 + content: err_text,
  1098 + success(res) {}
  1099 + });
  1100 + }else{
  1101 + if(err_text==""){
  1102 + getApp().goto("/pages/cart/cart/cart");
  1103 + }else{
  1104 + // 如果没有获取用户信息
  1105 + wx.showModal({
  1106 + title:'提示',
  1107 + content: err_text,
  1108 + success(res) {
  1109 + if (res.confirm) {
  1110 + //跳转到登录页
  1111 + getApp().goto("/pages/cart/cart/cart");
  1112 + }
  1113 + }
  1114 + });
  1115 +
  1116 + }
  1117 +
  1118 + }
  1119 + }
668 1120
669 1121
670 1122
pages/user/order_detail/order_detail.wxml
@@ -160,13 +160,18 @@ @@ -160,13 +160,18 @@
160 <navigator class="tips-btn" wx:if="{{order.is_all_return_status==0 || order.is_all_return_status==1}}" 160 <navigator class="tips-btn" wx:if="{{order.is_all_return_status==0 || order.is_all_return_status==1}}"
161 url="/pages/user/return_goods_info/return_goods_info?order_id={{order.order_id}}">退款详情</navigator> 161 url="/pages/user/return_goods_info/return_goods_info?order_id={{order.order_id}}">退款详情</navigator>
162 </block> 162 </block>
163 - 163 +
  164 +
164 <block wx:if="{{order.order_status==2 && order.is_zsorder!=4}}"> 165 <block wx:if="{{order.order_status==2 && order.is_zsorder!=4}}">
165 <navigator wx:if="{{order.order_goods.length>1}}" class="tips-btn" 166 <navigator wx:if="{{order.order_goods.length>1}}" class="tips-btn"
166 - url="/pages/user/comment/comment?status=0&order_id={{order.order_id}}">评价{{order.order_goods.length}}</navigator> 167 + url="/pages/user/comment/comment?status=0&order_id={{order.order_id}}">评价</navigator>
167 <navigator wx:else class="tips-btn" 168 <navigator wx:else class="tips-btn"
168 url="/pages/user/add_comment/add_comment?goods_id={{order.order_goods[0].goods_id}}&order_id={{order.order_id}}}">去评价</navigator> 169 url="/pages/user/add_comment/add_comment?goods_id={{order.order_goods[0].goods_id}}&order_id={{order.order_id}}}">去评价</navigator>
169 </block> 170 </block>
  171 + <!-- 积分购 拼团 搭配购没有有再来一单 -->
  172 + <block wx:if="{{ (order.pay_status==1 || order.order_status==3) && order.pt_prom_id<=0 && order.integral<=0 && order.order_goods[0].prom_type!=5}}">
  173 + <view style="background-color: #feca53;" class="tips-btn" bindtap="moreOrder" >再来一单</view>
  174 + </block>
170 </view> 175 </view>
171 </view> 176 </view>
172 177
pages/user/order_list/order_list.js
@@ -41,9 +41,12 @@ Page({ @@ -41,9 +41,12 @@ Page({
41 is_get: 0, 41 is_get: 0,
42 conf: null, 42 conf: null,
43 iscodeall: null, 43 iscodeall: null,
  44 + sales_rules:1, //默认是显示线上库存
44 45
45 //会员的等级价位 46 //会员的等级价位
46 card_field:null, 47 card_field:null,
  48 +
  49 + back_goods_arr:null, //返回商品的列表
47 }, 50 },
48 onLoad: function(t) { 51 onLoad: function(t) {
49 var th = this; 52 var th = this;
@@ -53,7 +56,7 @@ Page({ @@ -53,7 +56,7 @@ Page({
53 s.init(this, "", "orderList"); 56 s.init(this, "", "orderList");
54 //---查看会员的等级价--- 57 //---查看会员的等级价---
55 getApp().getConfig2(function(e) { 58 getApp().getConfig2(function(e) {
56 - th.setData({conf: e }); 59 + th.setData({conf: e,sales_rules:e.sales_rules });
57 //--- 看后台是不是有开通等级卡 --- 60 //--- 看后台是不是有开通等级卡 ---
58 if(e.switch_list){ 61 if(e.switch_list){
59 var s_list=JSON.parse(e.switch_list); 62 var s_list=JSON.parse(e.switch_list);
@@ -746,5 +749,460 @@ Page({ @@ -746,5 +749,460 @@ Page({
746 content: "请将二维码展示给核销员,收货更快捷" 749 content: "请将二维码展示给核销员,收货更快捷"
747 }; 750 };
748 qc_com.open(obj) 751 qc_com.open(obj)
  752 + },
  753 +
  754 + //再来一单的功能的实现
  755 + moreOrder:function(e){
  756 + var th=this;
  757 + var index=e.currentTarget.dataset.index;
  758 + var item=th.data.orderList[index];
  759 + th.check_more_order(item);
  760 + },
  761 +
  762 + check_more_order:async function(item){
  763 + var pickup=null,th=this;
  764 + //--------获取门店-----------
  765 + await getApp().request.promiseGet("/api/weshop/pickup/get/" + os.stoid + "/" + item.pickup_id, {
  766 +
  767 + }).then(res=>{
  768 + pickup = res.data.data;
  769 + })
  770 +
  771 + //--------获取商品----------
  772 + var goods_list=item.order_goods;
  773 + //--- 返回的内容 ---
  774 + var back_goods_arr=[];
  775 + var err_text="";
  776 + for(var i in goods_list){
  777 + var g_item=goods_list[i];
  778 + //--如果是赠品,不加入购物车--
  779 + if(g_item['is_gift']) continue;
  780 + if(g_item['prom_type']==4 ){
  781 + $err_text+= g_item['goods_name']+"积分购商品不加入购物车\n";
  782 + continue;
  783 + }
  784 + if(g_item['prom_type']==5){
  785 + $err_text+= g_item['goods_name']+"搭配购商品不加入购物车\n";
  786 + continue;
  787 + }
  788 + if(g_item['prom_type']==6 ){
  789 + $err_text+= g_item['goods_name']+"拼团商品不加入购物车\n";
  790 + continue;
  791 + }
  792 +
  793 + //--获取商品--
  794 + var good=null;
  795 + await getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + g_item.goods_id, {
  796 +
  797 + }).then(res=>{
  798 + good=res.data.data;
  799 + })
  800 +
  801 + if(!good){
  802 + err_text+= g_item['goods_name']+"未找到商品\n";
  803 + continue;
  804 + }
  805 + if (good.is_on_sale != 1) {
  806 + err_text+= g_item['goods_name']+"已经下架\n";
  807 + continue;
  808 + }
  809 +
  810 + var timestamp = ut.gettimestamp();
  811 + if (good.on_time > timestamp) {
  812 + err_text+= g_item['goods_name']+"还未上架\n";
  813 + continue;
  814 + }
  815 + if (good.down_time > 0) {
  816 + if (good.down_time < timestamp) {
  817 + err_text+=g_item['goods_name']+"已经下架\n";
  818 + continue;
  819 + }
  820 + }
  821 +
  822 + //如果商品的配送方式和门店不匹配
  823 + if(good['distr_type']>0 && pick_up['distr_type']>0 && good['distr_type']!=pick_up['distr_type'] ){
  824 + err_text+= good['goods_name']+"配送方式不一致\n";
  825 + continue;
  826 + }
  827 +
  828 + var prom=null;
  829 + var b_item={}
  830 + b_item.goods_id=g_item.goods_id;
  831 + b_item.goods_name=g_item.goods_name;
  832 + b_item.goods_num=g_item.goods_num;
  833 + b_item.guide_id=g_item.guide_id;
  834 + b_item.guide_type=g_item.guide_type;
  835 + b_item.pickup_id=item.pickup_id;
  836 + b_item.price=good.shop_price;
  837 + b_item.goods_sn=good.goods_sn;
  838 + b_item.sku=good.sku;
  839 + b_item.is_integral_normal=g_item.is_integral_normal;
  840 +
  841 + //-- 如果会员是等级卡的时候,同时商品也有设置相应的卡价格 --
  842 + var card_field=th.data.card_field;
  843 + if(card_field && good[card_field]>0){
  844 + b_item.price=good[card_field];
  845 + }
  846 +
  847 + //--判断商品当前的活动情况--
  848 + switch(good.prom_type){
  849 + case 1:
  850 + var flash=null;
  851 + await getApp().request.promiseGet("/api/ms/flash_sale/get/" + os.stoid + "/" + good.prom_id, {
  852 + }).then(res=>{
  853 + if (res.data.code== 0) {
  854 + flash=res.data.data;
  855 + }
  856 + })
  857 + //----已经结束-----
  858 + if (flash && flash.is_end == 0 && flash.end_time>timestamp && flash.start_time<timestamp ) {
  859 + prom=flash;
  860 + b_item.price=prom.price; //
  861 + }
  862 + break;
  863 + case 6:
  864 + b_item.is_pd_normal=1; break;
  865 + }
  866 +
  867 +
  868 +
  869 + //判断是不是线下库存的购买, 是不是秒杀活动
  870 + if(th.data.sales_rules==2 && !prom){
  871 +
  872 + //-- 看一下购物车上有多少商品 --
  873 + var cart_num=0;
  874 + await getApp().request.promiseGet("/api/weshop/cart/page", {
  875 + data: {
  876 + store_id: os.stoid,
  877 + user_id: getApp().globalData.user_id,
  878 + state:0, is_gift:0,
  879 + goods_id:good.goods_id,
  880 + pick_id: b_item.pickup_id
  881 + }
  882 + }).then(res=>{
  883 + var num = 0;
  884 + if(res.data.code==0 && res.data.data && res.data.data.pageData) {
  885 + for (var i = 0; i < res.data.data.pageData.length; i++) {
  886 + num += res.data.data.pageData[i].goods_num;
  887 + }
  888 + }
  889 + cart_num=num;
  890 + })
  891 +
  892 + var lock=0,plist=null;
  893 + //先读取门店的lock,
  894 + await getApp().request.promiseGet("/api/weshop/order/ware/lock/page",{
  895 + data:{store_id:os.stoid,wareId:good.goods_id,storageId:b_item.pickup_id,pageSize:1000}
  896 + }).then(res=>{
  897 + if(res.data.code==0 && res.data.data.total>0){
  898 + for(var i in res.data.data.pageData)
  899 + lock+=res.data.data.pageData[i].outQty
  900 + }
  901 + })
  902 +
  903 + //---通过接口获取门店的线下库存信息--
  904 + await getApp().request.promiseGet("/api/weshop/goods/getWareStorages",{
  905 + data:{storageNos:pickup.pickup_no,wareIds:encodeURIComponent(good.erpwareid),storeId:os.stoid}
  906 + }).then(res=>{
  907 + if(res.data.code==0 && res.data.data.total>0){
  908 + plist=res.data.data.pageData[0];
  909 + }
  910 + })
  911 +
  912 + if(!plist){
  913 + err_text+= good['goods_name']+"库存不足\n";
  914 + continue;
  915 + }
  916 + if(plist.CanOutQty-lock<=0){
  917 + err_text+= good['goods_name']+"库存不足\n";
  918 + continue;
  919 + }
  920 + if(b_item.goods_num>(plist.CanOutQty-lock)){
  921 + b_item.goods_num=plist.CanOutQty-lock;
  922 + }
  923 + var req_data={
  924 + store_id: os.stoid,
  925 + user_id: getApp().globalData.user_id,
  926 + goods_id: good.goods_id,
  927 + };
  928 +
  929 + var buynum=0;
  930 + //---要获得商品,该用户买了多少件,同步应用---
  931 + await getApp().request.promiseGet("/api/weshop/ordergoods/getUserBuyGoodsNum", {
  932 + data: req_data,
  933 + }).then(res => {
  934 + if(res.data.code==0){
  935 + var buy_num_data = res.data.data;
  936 + buynum = buy_num_data.goodsbuynum;
  937 + }
  938 + })
  939 +
  940 + //---- 要计算商品的限购 -----
  941 + if(good['viplimited']>0){
  942 + if(cart_num+buynum>good['viplimited']){
  943 + err_text+= good['goods_name']+"超出限购\n";
  944 + continue;
  945 + }
  946 + good['viplimited']-=(cart_num+buynum);
  947 + if(b_item.goods_num>good['viplimited']){
  948 + b_item.goods_num=good['viplimited'];
  949 + }
  950 + }
  951 +
  952 + back_goods_arr.push(b_item); //返回商品元素
  953 +
  954 + }else{
  955 +
  956 + //-- 看一下购物车上有多少商品 --
  957 + var cart_num=0;
  958 + await getApp().request.promiseGet("/api/weshop/cart/page", {
  959 + data: {
  960 + store_id: os.stoid,
  961 + user_id: getApp().globalData.user_id,
  962 + state:0, is_gift:0,
  963 + goods_id:good.goods_id
  964 + }
  965 + }).then(res=>{
  966 + var num = 0;
  967 + if(res.data.code==0 && res.data.data && res.data.data.pageData) {
  968 + for (var i = 0; i < res.data.data.pageData.length; i++) {
  969 + num += res.data.data.pageData[i].goods_num;
  970 + }
  971 + }
  972 + cart_num=num;
  973 + })
  974 +
  975 +
  976 + if(good.store_count<=0){
  977 + err_text+= good['goods_name']+"库存不足\n";
  978 + continue;
  979 + }
  980 + if(b_item.goods_num>good.store_count)
  981 + b_item.goods_num=good.store_count;
  982 +
  983 + var buynum=0; //商品已经购买多少件
  984 + var promgoodsbuynum=0; //活动已经购买多少件
  985 + var redis_num = 0; //redis库存
  986 +
  987 + var req_data={
  988 + store_id: os.stoid,
  989 + user_id: getApp().globalData.user_id,
  990 + goods_id: good.goods_id,
  991 + };
  992 +
  993 + if(prom){
  994 + req_data.prom_type= good.prom_type;
  995 + req_data.prom_id= good.prom_id;
  996 + b_item.prom_type=good.prom_type;
  997 + b_item.prom_id=good.prom_id;
  998 + //------判断活动是否抢光-----
  999 + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" +
  1000 + os.stoid + "/" + good.prom_type + "/" + good.prom_id, {
  1001 + 1: 1
  1002 + }).then(res => {
  1003 + redis_num = res.data.data;
  1004 + });
  1005 + if(redis_num<=0){
  1006 + err_text+= good['goods_name']+"活动不足\n";
  1007 + continue;
  1008 + }
  1009 +
  1010 + }
  1011 +
  1012 + //---要获得商品,该用户买了多少件,同步应用---
  1013 + await getApp().request.promiseGet("/api/weshop/ordergoods/getUserBuyGoodsNum", {
  1014 + data: req_data,
  1015 + }).then(res => {
  1016 + if(res.data.code==0){
  1017 + var buy_num_data = res.data.data;
  1018 + if (buy_num_data.promgoodsbuynum) promgoodsbuynum = buy_num_data.promgoodsbuynum;
  1019 + buynum = buy_num_data.goodsbuynum;
  1020 + }
  1021 + })
  1022 +
  1023 + //---- 要计算商品的限购 -----
  1024 + if(good['viplimited']>0){
  1025 + if(cart_num+buynum>good['viplimited']){
  1026 + err_text+= good['goods_name']+"超出限购\n";
  1027 + continue;
  1028 + }
  1029 + good['viplimited']-=(cart_num+buynum);
  1030 + if(b_item.goods_num>good['viplimited']){
  1031 + b_item.goods_num=good['viplimited'];
  1032 + }
  1033 +
  1034 + }
  1035 +
  1036 + //-- 判断活动的库存 --
  1037 + if(prom){
  1038 + if(prom['goods_num']<=prom['buy_num']){
  1039 + err_text+= good['goods_name']+"超出活动库存\n";continue;
  1040 + }
  1041 +
  1042 + if(b_item.goods_num>prom['goods_num']-prom['buy_num']){
  1043 + b_item['goods_num']= b_item['goods_num']-b_item['buy_num'];
  1044 + }
  1045 +
  1046 + if(b_item.goods_num>redis_num){
  1047 + b_item.goods_num=redis_num;
  1048 + }
  1049 +
  1050 + if(cart_num+buynum>prom['buy_limit']){
  1051 + err_text+= good['goods_name']+"超出活动限购\n";continue;
  1052 + }
  1053 + prom['buy_limit'] -= (cart_num+buynum);
  1054 + if(b_item.goods_num>prom['buy_limit']){
  1055 + b_item.goods_num=prom['buy_limit'];
  1056 + }
  1057 +
  1058 + }
  1059 + back_goods_arr.push(b_item); //返回商品元素
  1060 + }
  1061 + }
  1062 +
  1063 + //有重新购买的数据是时候,就要重新生成订单
  1064 + if(back_goods_arr.length>0){
  1065 + th.setData({back_goods_arr:back_goods_arr});
  1066 + if(!err_text){
  1067 + th.more_add_cart();
  1068 + }else{
  1069 + // 如果没有获取用户信息
  1070 + wx.showModal({
  1071 + title:'确定',
  1072 + content: err_text+',确定要买其他商品码?',
  1073 + success(res) {
  1074 + if (res.confirm) {
  1075 + //跳转到登录页
  1076 + th.more_add_cart();
  1077 + }
  1078 + }
  1079 + });
  1080 +
  1081 + }
  1082 + }else{
  1083 + getApp().confirmBox(err_text);
  1084 + }
  1085 + },
  1086 +
  1087 + more_add_cart:async function(){
  1088 + var back_goods_arr=this.data.back_goods_arr;
  1089 + var err_text="";
  1090 + var ok_num=0;
  1091 +
  1092 + for(var i in back_goods_arr){
  1093 + //商品ID
  1094 + var g_item=back_goods_arr[i];
  1095 + var newd = {
  1096 + goods_id: g_item.goods_id,
  1097 + goods_num: g_item.goods_num,
  1098 + pick_id: g_item.pickup_id,
  1099 + user_id: oo.user_id,
  1100 + store_id: os.stoid,
  1101 + goods_price: g_item.price,
  1102 + member_goods_price: g_item.price,
  1103 + goods_name: g_item.goods_name,
  1104 + goods_sn: g_item.goods_sn,
  1105 + sku: g_item.sku,
  1106 + };
  1107 +
  1108 + if(g_item.guide_id){
  1109 + newd['guide_id']=g_item.guide_id;
  1110 + newd['guide_type']=g_item.guide_type;
  1111 + }
  1112 +
  1113 + if(g_item.is_integral_normal){
  1114 + newd['is_integral_normal']=g_item.is_integral_normal;
  1115 + }
  1116 + if(g_item.is_pd_normal){
  1117 + newd['is_pd_normal']=g_item.is_pd_normal;
  1118 + }
  1119 +
  1120 + if(g_item.prom_type){
  1121 + newd['prom_type']=g_item.prom_type;
  1122 + newd['prom_id']=g_item.prom_id;
  1123 + }
  1124 +
  1125 +
  1126 + var b_cart_goods=null;
  1127 + await getApp().request.promiseGet("/api/weshop/cart/page", {
  1128 + data: {
  1129 + store_id: os.stoid,
  1130 + user_id: oo.user_id,
  1131 + goods_id: g_item.goods_id,
  1132 + pick_id: g_item.pickup_id,
  1133 + },
  1134 + }).then(res=>{
  1135 + //-------如果购物车中有相关的数据-------
  1136 + if (res.data.data.total > 0) {
  1137 + b_cart_goods= res.data.data.pageData[0];
  1138 + }
  1139 + })
  1140 +
  1141 + //-- 如果就加入过购物车 --
  1142 + if(b_cart_goods){
  1143 + var updata = {
  1144 + id: b_cart_goods.id,
  1145 + goods_num: newd.goods_num + b_cart_goods.goods_num,
  1146 + goods_price: newd.goods_price,
  1147 + member_goods_price:newd.goods_price,
  1148 + store_id: os.stoid,
  1149 + };
  1150 + if(newd.guide_id){
  1151 + updata.guide_id=newd.guide_id;
  1152 + updata.guide_type=newd.guide_type;
  1153 + }
  1154 + await getApp().request.promisePut("/api/weshop/cart/update", {
  1155 + data: updata
  1156 + }).then(res=>{
  1157 + if(res.data.code==0) {
  1158 + ok_num++;
  1159 + }else{
  1160 + err_text+=newd.goods_name+"加入购物车失败\n";
  1161 + }
  1162 + })
  1163 +
  1164 + }else{
  1165 + await getApp().request.promisePost("/api/weshop/cart/save", {
  1166 + data: newd
  1167 + }).then(res=>{
  1168 + if(res.data.code==0) {
  1169 + ok_num++;
  1170 + }else{
  1171 + err_text+=newd.goods_name+"加入购物车失败\n";
  1172 + }
  1173 + })
  1174 + }
  1175 + }
  1176 +
  1177 + if(ok_num==0){
  1178 + //-- 如果没有获取用户信息 --
  1179 + wx.showModal({
  1180 + title:'提示',
  1181 + content: err_text,
  1182 + success(res) {}
  1183 + });
  1184 + }else{
  1185 + if(err_text==""){
  1186 + getApp().goto("/pages/cart/cart/cart");
  1187 + }else{
  1188 + // 如果没有获取用户信息
  1189 + wx.showModal({
  1190 + title:'提示',
  1191 + content: err_text,
  1192 + success(res) {
  1193 + if (res.confirm) {
  1194 + //跳转到登录页
  1195 + getApp().goto("/pages/cart/cart/cart");
  1196 + }
  1197 + }
  1198 + });
  1199 +
  1200 + }
  1201 +
  1202 + }
749 } 1203 }
  1204 +
  1205 +
  1206 +
  1207 +
750 }); 1208 });
751 \ No newline at end of file 1209 \ No newline at end of file
pages/user/order_list/order_list.wxml
@@ -99,7 +99,7 @@ @@ -99,7 +99,7 @@
99 <view class="goods-total flex"> 99 <view class="goods-total flex">
100 <block wx:if="{{item.pt_status==4 || item.pt_status==5}}"> 100 <block wx:if="{{item.pt_status==4 || item.pt_status==5}}">
101 <view class="commodity_money flex baseline"> 101 <view class="commodity_money flex baseline">
102 - <view>合计:</view> 102 + <view>合计<text wx:if="{{item.discount!=underdefine && item.discount!=null && item.discount!=0}}" style="color:#d60021;">(改)</text>:</view>
103 <view class="fs24 xc-wc">¥</view> 103 <view class="fs24 xc-wc">¥</view>
104 <view class="xc-wc">{{filters.toFix(item.order_amount+item.user_money+item.pt_tail_money,2)}} 104 <view class="xc-wc">{{filters.toFix(item.order_amount+item.user_money+item.pt_tail_money,2)}}
105 </view> 105 </view>
@@ -108,13 +108,13 @@ @@ -108,13 +108,13 @@
108 </block> 108 </block>
109 <block wx:else> 109 <block wx:else>
110 <view wx:if="{{item.is_zsorder==4}}" class="commodity_money flex baseline"> 110 <view wx:if="{{item.is_zsorder==4}}" class="commodity_money flex baseline">
111 - <view>定金:</view> 111 + <view>定金<text wx:if="{{item.discount!=underdefine && item.discount!=null && item.discount!=0}}" style="color:#d60021;">(改)</text>:</view>
112 <view class="fs24 xc-wc">¥</view> 112 <view class="fs24 xc-wc">¥</view>
113 <view class="xc-wc">{{filters.toFix(item.order_amount+item.user_money,2)}} 113 <view class="xc-wc">{{filters.toFix(item.order_amount+item.user_money,2)}}
114 </view> 114 </view>
115 </view> 115 </view>
116 <view class="commodity_money flex baseline" wx:else> 116 <view class="commodity_money flex baseline" wx:else>
117 - <view>合计:</view> 117 + <view>合计<text wx:if="{{item.discount!=underdefine && item.discount!=null && item.discount!=0}}" style="color:#d60021;">(改)</text>:</view>
118 <view class="fs24 xc-wc">¥</view> 118 <view class="fs24 xc-wc">¥</view>
119 <view class="xc-wc">{{filters.toFix(item.order_amount+item.user_money,2)}} 119 <view class="xc-wc">{{filters.toFix(item.order_amount+item.user_money,2)}}
120 <text wx:if="{{item.coupon_price}}">+{{item.coupon_price}}元优惠券</text> 120 <text wx:if="{{item.coupon_price}}">+{{item.coupon_price}}元优惠券</text>
@@ -133,7 +133,7 @@ @@ -133,7 +133,7 @@
133 </view> 133 </view>
134 </view> 134 </view>
135 </view> 135 </view>
136 - <view class="links flex-right-vertical fs30"> 136 + <view class="links flex-right-vertical fs30" style="flex-wrap: wrap;margin-top: 10rpx;">
137 <image wx:if="{{(item.order_status==1&&item.pay_status==1 && item.shipping_status==0 && item.exp_type==1)}}" class="code" src="{{iurl}}miniapp/images/order/code.png" bindtap="code_show" data-order_sn="{{item.order_sn}}"></image> 137 <image wx:if="{{(item.order_status==1&&item.pay_status==1 && item.shipping_status==0 && item.exp_type==1)}}" class="code" src="{{iurl}}miniapp/images/order/code.png" bindtap="code_show" data-order_sn="{{item.order_sn}}"></image>
138 <view bindtap="cancelOrder" class="commodity_To_evaluate flex-level View_evaluation" data-id="{{item.order_id}}" data-zsorder="{{item.is_zsorder}}" data-orderindex="{{index}}" wx:if="{{(item.order_status==0 &&item.pay_status==0)}}">取消订单</view> 138 <view bindtap="cancelOrder" class="commodity_To_evaluate flex-level View_evaluation" data-id="{{item.order_id}}" data-zsorder="{{item.is_zsorder}}" data-orderindex="{{index}}" wx:if="{{(item.order_status==0 &&item.pay_status==0)}}">取消订单</view>
139 <view class="commodity_To_evaluate flex-level View_evaluation" wx:if="{{item.pt_status==3}}">拼团失败</view> 139 <view class="commodity_To_evaluate flex-level View_evaluation" wx:if="{{item.pt_status==3}}">拼团失败</view>
@@ -155,7 +155,8 @@ @@ -155,7 +155,8 @@
155 <view bindtap="confirmOrder" data-zsorder="{{item.is_zsorder}}" class="commodity_To_evaluate flex-level comment_go" data-id="{{item.order_id}}" hidden="{{!(item.order_status==1&&item.pay_status==1&&item.shipping_status==1)}}">确认收货</view> 155 <view bindtap="confirmOrder" data-zsorder="{{item.is_zsorder}}" class="commodity_To_evaluate flex-level comment_go" data-id="{{item.order_id}}" hidden="{{!(item.order_status==1&&item.pay_status==1&&item.shipping_status==1)}}">确认收货</view>
156 <view bindtap="confirmOrder" data-zsorder="{{item.is_zsorder}}" class="commodity_To_evaluate flex-level comment_go" data-id="{{item.order_id}}" hidden="{{!(item.order_status==1&&item.pay_status==1&&item.shipping_status==2)}}">确认收货</view> 156 <view bindtap="confirmOrder" data-zsorder="{{item.is_zsorder}}" class="commodity_To_evaluate flex-level comment_go" data-id="{{item.order_id}}" hidden="{{!(item.order_status==1&&item.pay_status==1&&item.shipping_status==2)}}">确认收货</view>
157 </block> 157 </block>
158 - 158 +
  159 +
159 <block wx:if="{{item.order_status==2 && item.is_zsorder!=4}}"> 160 <block wx:if="{{item.order_status==2 && item.is_zsorder!=4}}">
160 <navigator wx:if="{{item.order_goods.length>1}}" class="order-btn white red-b" 161 <navigator wx:if="{{item.order_goods.length>1}}" class="order-btn white red-b"
161 url="/pages/user/comment/comment?status=0&order_id={{item.order_id}}">评价</navigator> 162 url="/pages/user/comment/comment?status=0&order_id={{item.order_id}}">评价</navigator>
@@ -166,6 +167,13 @@ @@ -166,6 +167,13 @@
166 167
167 <navigator class="commodity_To_evaluate flex-level comment_go" url="/pages/cart/cart_wk/cart_wk?order_id={{item.order_id}}" data-idx="{{index}}" wx:if="{{item.pt_status==2 && item.pt_tail_money>0}}">支付尾款</navigator> 168 <navigator class="commodity_To_evaluate flex-level comment_go" url="/pages/cart/cart_wk/cart_wk?order_id={{item.order_id}}" data-idx="{{index}}" wx:if="{{item.pt_status==2 && item.pt_tail_money>0}}">支付尾款</navigator>
168 <navigator class="commodity_To_evaluate flex-level comment_go" bindtap="jumpToCart4" data-idx="{{index}}" wx:if="{{(item.order_status==0&&item.pay_status==0)}}">立即支付</navigator> 169 <navigator class="commodity_To_evaluate flex-level comment_go" bindtap="jumpToCart4" data-idx="{{index}}" wx:if="{{(item.order_status==0&&item.pay_status==0)}}">立即支付</navigator>
  170 +
  171 + <!-- 积分购 拼团 搭配购没有有再来一单 -->
  172 + <block wx:if="{{(item.pay_status==1 || item.order_status==3) && item.pt_prom_id<=0 && item.integral<=0 && item.order_goods[0].prom_type!=5 }}">
  173 + <view bindtap="moreOrder" class="commodity_To_evaluate flex-level comment_go" style="background-color: #feca53;"
  174 + data-index="{{index}}" >再来一单</view>
  175 + </block>
  176 +
169 </view> 177 </view>
170 </view> 178 </view>
171 </view> 179 </view>
pages/user/order_list/order_list.wxss
@@ -221,7 +221,8 @@ page { @@ -221,7 +221,8 @@ page {
221 } 221 }
222 222
223 .commodity_evaluate .links { 223 .commodity_evaluate .links {
224 - height: 92rpx; 224 + /* height: 92rpx; */
  225 + height: auto;
225 } 226 }
226 227
227 .commodity_evaluate .commodity_To_evaluate { 228 .commodity_evaluate .commodity_To_evaluate {
@@ -229,6 +230,7 @@ page { @@ -229,6 +230,7 @@ page {
229 height: 48rpx; 230 height: 48rpx;
230 border-radius: 10rpx; 231 border-radius: 10rpx;
231 line-height: 48rpx; 232 line-height: 48rpx;
  233 + margin-bottom: 10rpx;
232 } 234 }
233 235
234 .commodity_evaluate .commodity_To_evaluate view { 236 .commodity_evaluate .commodity_To_evaluate view {
pages/user/plus/plus.js
@@ -62,7 +62,7 @@ Page({ @@ -62,7 +62,7 @@ Page({
62 //--先判断会员状态-- 62 //--先判断会员状态--
63 var user_info = getApp().globalData.userInfo; 63 var user_info = getApp().globalData.userInfo;
64 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 64 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
65 - wx.navigateTo({ url: '/pages/getphone/getphone?first_leader=' + fir_leader, }) 65 + wx.navigateTo({ url: '/pages/togoin/togoin?first_leader=' + fir_leader, })
66 return false; 66 return false;
67 } 67 }
68 //-----------商家配置信息----- 等级卡规则,是否又开邀请码,营业员------------ 68 //-----------商家配置信息----- 等级卡规则,是否又开邀请码,营业员------------
@@ -319,8 +319,17 @@ Page({ @@ -319,8 +319,17 @@ Page({
319 319
320 //--支付成功,跳转到等级卡续费页面-- 320 //--支付成功,跳转到等级卡续费页面--
321 success:function () { 321 success:function () {
322 - var u_url = "/pages/user/cardinfo/cardinfo";  
323 - wx.reLaunch({url: u_url}) 322 +
  323 + if(getApp().globalData.plus_buy_back){
  324 + getApp().globalData.plus_buy_back=0;
  325 + getApp().globalData.is_card_back=1;
  326 + //返回购物车购买
  327 + wx.navigateBack();
  328 + }else{
  329 + var u_url = "/pages/user/cardinfo/cardinfo";
  330 + wx.reLaunch({url: u_url})
  331 + }
  332 +
324 }, 333 },
325 334
326 //--绑定邀请码的输入-- 335 //--绑定邀请码的输入--
@@ -370,7 +379,7 @@ Page({ @@ -370,7 +379,7 @@ Page({
370 //--先判断会员状态-- 379 //--先判断会员状态--
371 var user_info = getApp().globalData.userInfo; 380 var user_info = getApp().globalData.userInfo;
372 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 381 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
373 - wx.navigateTo({ url: '/pages/getphone/getphone?first_leader=' + fir_leader, }) 382 + wx.navigateTo({ url: '/pages/togoin/togoin?first_leader=' + fir_leader, })
374 return false; 383 return false;
375 } 384 }
376 } 385 }
pages/user/userinfo/userinfo.js
@@ -248,7 +248,7 @@ Page({ @@ -248,7 +248,7 @@ Page({
248 wait_for_store_config: function() { 248 wait_for_store_config: function() {
249 var th = this; 249 var th = this;
250 wx.getLocation({ 250 wx.getLocation({
251 - type: 'wgs84', 251 + type: 'gcj02',
252 success: function(res) { 252 success: function(res) {
253 th.data.lat = res.latitude; 253 th.data.lat = res.latitude;
254 th.data.lon = res.longitude; 254 th.data.lon = res.longitude;
@@ -273,165 +273,171 @@ Page({ @@ -273,165 +273,171 @@ Page({
273 }, 273 },
274 onclickstore: function() { 274 onclickstore: function() {
275 var th = this; 275 var th = this;
276 - if (th.data.store == 0) {  
277 - this.setData({  
278 - store: 1  
279 - })  
280 - } else {  
281 - this.setData({  
282 - store: 0  
283 - })  
284 - }  
285 - var dd = {  
286 - store_id: r.stoid,  
287 - isstop: 0,  
288 - pageSize: 300  
289 - }  
290 - th.setData({  
291 - sort_store: 0  
292 - });  
293 - var i = getApp().request;  
294 - //如果有距离的话  
295 - if (th.data.lat != null) {  
296 - dd.lat = th.data.lat;  
297 - dd.lon = th.data.lon;  
298 - }  
299 - //----------获取门店----------------  
300 - getApp().request.promiseGet("/api/weshop/pickup/list", {  
301 - data: dd,  
302 - }).then(res => {  
303 - var e = res;  
304 - if (e.data.code == 0) {  
305 - //-- 如果有默认选择门店的时候,要把默认门店放在第一位 --  
306 - if (th.data.def_pick_store) {  
307 - for (var k = 0; k < e.data.data.pageData.length; k++) {  
308 - if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) {  
309 - e.data.data.pageData.splice(k, 1); //删除  
310 - break;  
311 - }  
312 - }  
313 - e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加  
314 - }  
315 -  
316 - //单总量超出5个的时候  
317 - if (e.data.data.total > 5) {  
318 - i.get("/api/weshop/storagecategory/page", {  
319 - data: {  
320 - store_id: r.stoid,  
321 - is_show: 1,  
322 - pageSize: 300  
323 - },  
324 - success: function(ee) {  
325 - if (ee.data.code == 0) {  
326 - if (ee.data.data.pageData.length > 0) {  
327 - var def_arr = new Array();  
328 - var ishas = 0;  
329 - //-- 开始就看5个门店 --  
330 - for (var k = 0; k < 5; k++) {  
331 - if (k == e.data.data.pageData.length) break;  
332 - def_arr.push(e.data.data.pageData[k]);  
333 - }  
334 -  
335 - th.setData({  
336 - def_pickpu_list: def_arr,  
337 - pickpu_list: ee.data.data.pageData  
338 - });  
339 - var sto_cate = ee.data.data.pageData;  
340 - var sto_arr = e.data.data.pageData;  
341 - var newarr = new Array();  
342 - var qita = new Array();  
343 -  
344 - //----要进行门店分组--------  
345 - for (var i = 0; i < sto_arr.length; i++) {  
346 - //找一下这个门店有没有在分类数组内  
347 - var find2 = 0,  
348 - find2name = "";  
349 - for (var m = 0; m < sto_cate.length; m++) {  
350 - if (sto_arr[i].category_id == sto_cate[m].cat_id) {  
351 - find2 = sto_cate[m].cat_id;  
352 - find2name = sto_cate[m].cat_name;  
353 - break;  
354 - }  
355 - }  
356 -  
357 - if (newarr.length > 0) {  
358 - var find = 0;  
359 - //如果有找到,那门店就在这个分组内,否则,分类就要排在其他  
360 - if (find2 != 0) {  
361 - for (var ii = 0; ii < newarr.length; ii++) {  
362 - if (sto_arr[i].category_id == newarr[ii].cat_id) {  
363 - newarr[ii].s_arr.push(sto_arr[i]);  
364 - find = 1;  
365 - break;  
366 - }  
367 - }  
368 - if (find == 0) {  
369 - var arr0 = new Array();  
370 - arr0.push(sto_arr[i]);  
371 - var item = {  
372 - cat_id: find2,  
373 - name: find2name,  
374 - s_arr: arr0  
375 - };  
376 - newarr.push(item);  
377 - }  
378 - } else {  
379 - qita.push(sto_arr[i]);  
380 - }  
381 - } else {  
382 - //如果有找到,那门店就在这个分组内,否则,分类就要排在其他  
383 - if (find2 != 0) {  
384 - var arr0 = new Array();  
385 - arr0.push(sto_arr[i]);  
386 - var item = {  
387 - cat_id: find2,  
388 - name: find2name,  
389 - s_arr: arr0  
390 - };  
391 - newarr.push(item);  
392 - } else {  
393 - qita.push(sto_arr[i]);  
394 - }  
395 - }  
396 - }  
397 -  
398 - //----安排其他的分类-----  
399 - if (qita.length > 0) {  
400 - var item = {  
401 - cat_id: -1,  
402 - name: "其他",  
403 - s_arr: qita  
404 - };  
405 - newarr.push(item);  
406 - }  
407 - th.setData({  
408 - is_show_sto_cat: 1,  
409 - all_sto: newarr  
410 - });  
411 -  
412 - } else {  
413 - th.setData({  
414 - is_show_sto_cat: -1,  
415 - only_pk: e.data.data.pageData  
416 - });  
417 - }  
418 - } else {  
419 - th.setData({  
420 - is_show_sto_cat: -1,  
421 - only_pk: e.data.data.pageData  
422 - });  
423 - }  
424 - }  
425 - });  
426 - } else {  
427 - th.setData({  
428 - is_show_sto_cat: 0,  
429 - only_pk: e.data.data.pageData  
430 - });  
431 - }  
432 - }  
433 - }, 200) 276 + //检验门店的点击,看下次数是不是到了
  277 + this.check_click_ok(function(){
  278 + if (th.data.store == 0) {
  279 + th.setData({
  280 + store: 1
  281 + })
  282 + } else {
  283 + th.setData({
  284 + store: 0
  285 + })
  286 + }
  287 + var dd = {
  288 + store_id: r.stoid,
  289 + isstop: 0,
  290 + pageSize: 300
  291 + }
  292 + th.setData({
  293 + sort_store: 0
  294 + });
  295 + var i = getApp().request;
  296 + //如果有距离的话
  297 + if (th.data.lat != null) {
  298 + dd.lat = th.data.lat;
  299 + dd.lon = th.data.lon;
  300 + }
  301 + //----------获取门店----------------
  302 + getApp().request.promiseGet("/api/weshop/pickup/list", {
  303 + data: dd,
  304 + }).then(res => {
  305 + var e = res;
  306 + if (e.data.code == 0) {
  307 + //-- 如果有默认选择门店的时候,要把默认门店放在第一位 --
  308 + if (th.data.def_pick_store) {
  309 + for (var k = 0; k < e.data.data.pageData.length; k++) {
  310 + if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) {
  311 + e.data.data.pageData.splice(k, 1); //删除
  312 + break;
  313 + }
  314 + }
  315 + e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加
  316 + }
  317 +
  318 + //单总量超出5个的时候
  319 + if (e.data.data.total > 5) {
  320 + i.get("/api/weshop/storagecategory/page", {
  321 + data: {
  322 + store_id: r.stoid,
  323 + is_show: 1,
  324 + pageSize: 300
  325 + },
  326 + success: function(ee) {
  327 + if (ee.data.code == 0) {
  328 + if (ee.data.data.pageData.length > 0) {
  329 + var def_arr = new Array();
  330 + var ishas = 0;
  331 + //-- 开始就看5个门店 --
  332 + for (var k = 0; k < 5; k++) {
  333 + if (k == e.data.data.pageData.length) break;
  334 + def_arr.push(e.data.data.pageData[k]);
  335 + }
  336 +
  337 + th.setData({
  338 + def_pickpu_list: def_arr,
  339 + pickpu_list: ee.data.data.pageData
  340 + });
  341 + var sto_cate = ee.data.data.pageData;
  342 + var sto_arr = e.data.data.pageData;
  343 + var newarr = new Array();
  344 + var qita = new Array();
  345 +
  346 + //----要进行门店分组--------
  347 + for (var i = 0; i < sto_arr.length; i++) {
  348 + //找一下这个门店有没有在分类数组内
  349 + var find2 = 0,
  350 + find2name = "";
  351 + for (var m = 0; m < sto_cate.length; m++) {
  352 + if (sto_arr[i].category_id == sto_cate[m].cat_id) {
  353 + find2 = sto_cate[m].cat_id;
  354 + find2name = sto_cate[m].cat_name;
  355 + break;
  356 + }
  357 + }
  358 +
  359 + if (newarr.length > 0) {
  360 + var find = 0;
  361 + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他
  362 + if (find2 != 0) {
  363 + for (var ii = 0; ii < newarr.length; ii++) {
  364 + if (sto_arr[i].category_id == newarr[ii].cat_id) {
  365 + newarr[ii].s_arr.push(sto_arr[i]);
  366 + find = 1;
  367 + break;
  368 + }
  369 + }
  370 + if (find == 0) {
  371 + var arr0 = new Array();
  372 + arr0.push(sto_arr[i]);
  373 + var item = {
  374 + cat_id: find2,
  375 + name: find2name,
  376 + s_arr: arr0
  377 + };
  378 + newarr.push(item);
  379 + }
  380 + } else {
  381 + qita.push(sto_arr[i]);
  382 + }
  383 + } else {
  384 + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他
  385 + if (find2 != 0) {
  386 + var arr0 = new Array();
  387 + arr0.push(sto_arr[i]);
  388 + var item = {
  389 + cat_id: find2,
  390 + name: find2name,
  391 + s_arr: arr0
  392 + };
  393 + newarr.push(item);
  394 + } else {
  395 + qita.push(sto_arr[i]);
  396 + }
  397 + }
  398 + }
  399 +
  400 + //----安排其他的分类-----
  401 + if (qita.length > 0) {
  402 + var item = {
  403 + cat_id: -1,
  404 + name: "其他",
  405 + s_arr: qita
  406 + };
  407 + newarr.push(item);
  408 + }
  409 + th.setData({
  410 + is_show_sto_cat: 1,
  411 + all_sto: newarr
  412 + });
  413 +
  414 + } else {
  415 + th.setData({
  416 + is_show_sto_cat: -1,
  417 + only_pk: e.data.data.pageData
  418 + });
  419 + }
  420 + } else {
  421 + th.setData({
  422 + is_show_sto_cat: -1,
  423 + only_pk: e.data.data.pageData
  424 + });
  425 + }
  426 + }
  427 + });
  428 + } else {
  429 + th.setData({
  430 + is_show_sto_cat: 0,
  431 + only_pk: e.data.data.pageData
  432 + });
  433 + }
  434 + }
  435 + }, 200)
  436 +
  437 + },2)
  438 +
434 }, 439 },
  440 +
435 //选择更多门店 441 //选择更多门店
436 more_store: function() { 442 more_store: function() {
437 this.setData({ 443 this.setData({
@@ -887,7 +893,24 @@ Page({ @@ -887,7 +893,24 @@ Page({
887 893
888 //-- 跳转到获取导购的列表 -- 894 //-- 跳转到获取导购的列表 --
889 go_get_guide:function () { 895 go_get_guide:function () {
890 - getApp().goto("/pages/user/choice_guide/choice_guide"); 896 + this.check_click_ok(function(){
  897 + getApp().goto("/pages/user/choice_guide/choice_guide");
  898 + },1)
  899 + },
  900 +
  901 + //点击门店,导购的次数判断, type 1=导购 2=门店
  902 + check_click_ok:function(func,idx){
  903 + var th=this;
  904 + var userId=getApp().globalData.user_id;
  905 + getApp().request.get("/api/weshop/users/getGuideNum/"+r.stoid+"/"+userId+"/"+idx, {
  906 + success: function(res) {
  907 + if(res.data.code==0){
  908 + func();
  909 + }else{
  910 + getApp().my_warnning(res.data.msg, 0, th);
  911 + }
  912 + }
  913 + });
891 } 914 }
892 915
893 916
utils/auth.js
@@ -207,47 +207,10 @@ module.exports = { @@ -207,47 +207,10 @@ module.exports = {
207 //获取本地存储 207 //获取本地存储
208 var a = wx.getStorageSync("wx_user_info"); 208 var a = wx.getStorageSync("wx_user_info");
209 var userInfo = a.userInfo; 209 var userInfo = a.userInfo;
210 - if (userInfo==undefined){ //判断本地是数据是否正确  
211 - wx.getUserInfo({  
212 - success: function (res)  
213 - {  
214 - console.log('doGetWxUser');  
215 - console.log(res);  
216 - console.log(ind);  
217 - //组装用户  
218 - var ar = {'nickName':res.userInfo.nickName,  
219 - 'avatarUrl':res.userInfo.avatarUrl,  
220 - 'gender': res.userInfo.gender};  
221 - //----会员记录到全局------  
222 - n.globalData.getu = ar;  
223 - var uu = {'userInfo': ar};  
224 - a=uu;  
225 -  
226 - if(ind==1){  
227 - a && void 0 != a ? (n.globalData.wechatUser = a, o.login_fir(t, a, e)) : o.goGetUserInfo();  
228 - }else{  
229 - a && void 0 != a ? (n.globalData.wechatUser = a, o.login(t, a, e)) : o.goGetUserInfo();  
230 - }  
231 -  
232 - },  
233 -  
234 - fail: function () {  
235 - //---获取用户信息失败后。请跳转授权页面--  
236 - wx.showModal({  
237 - title: '警告',  
238 - content: '尚未进行授权,请点击确定跳转到授权页面进行授权。',  
239 - success: function (res) {  
240 - if (res.confirm) {  
241 - console.log('用户点击确定')  
242 - wx.navigateTo({  
243 - url: '/pages/togoin/togoin',  
244 - })  
245 - }  
246 - }  
247 - })  
248 - }  
249 -  
250 - }) 210 + if (userInfo==undefined){
  211 + //判断本地是数据是否正确
  212 + n.goto("/pages/togoin/togoin");
  213 +
251 }else{ 214 }else{
252 a && void 0 != a ? (n.globalData.wechatUser = a, o.login(t, a, e)) : o.goGetUserInfo(); 215 a && void 0 != a ? (n.globalData.wechatUser = a, o.login(t, a, e)) : o.goGetUserInfo();
253 } 216 }
utils/request.js
@@ -232,6 +232,27 @@ module.exports = { @@ -232,6 +232,27 @@ module.exports = {
232 }) 232 })
233 }) 233 })
234 }, 234 },
  235 +
  236 +
  237 + //---promise的使用delete----
  238 + promisePut:function(url,data){
  239 + var th=this;
  240 + if(url.indexOf("http")==-1) url=getApp().globalData.setting.url +url;
  241 + return new Promise((resolve, reject) => {
  242 + data.isShowLoading && th.showLoading();
  243 + wx.request({
  244 + url,
  245 + method: 'PUT',
  246 + header: {"content-type": "application/x-www-form-urlencoded" },
  247 + data:data.data,
  248 + success(res) {
  249 + data.isShowLoading && th.hideLoading();
  250 + resolve(res);
  251 + },
  252 + fail(err) { data.isShowLoading && th.hideLoading(); reject(err); }
  253 + })
  254 + })
  255 + },
235 256
236 //--------具有时间限制的读取接口---------- 257 //--------具有时间限制的读取接口----------
237 time_limit_get(time,url,data){ 258 time_limit_get(time,url,data){
utils/util.js
@@ -410,6 +410,60 @@ function ob_to_parm(ob){ @@ -410,6 +410,60 @@ function ob_to_parm(ob){
410 return parm; 410 return parm;
411 } 411 }
412 412
  413 +function encodeUTF8(s) {
  414 + var i, r = [], c, x;
  415 + for (i = 0; i < s.length; i++)
  416 + if ((c = s.charCodeAt(i)) < 0x80) r.push(c);
  417 + else if (c < 0x800) r.push(0xC0 + (c >> 6 & 0x1F), 0x80 + (c & 0x3F));
  418 + else {
  419 + if ((x = c ^ 0xD800) >> 10 == 0) //对四字节UTF-16转换为Unicode
  420 + c = (x << 10) + (s.charCodeAt(++i) ^ 0xDC00) + 0x10000,
  421 + r.push(0xF0 + (c >> 18 & 0x7), 0x80 + (c >> 12 & 0x3F));
  422 + else r.push(0xE0 + (c >> 12 & 0xF));
  423 + r.push(0x80 + (c >> 6 & 0x3F), 0x80 + (c & 0x3F));
  424 + };
  425 + return r;
  426 +};
  427 +// 字符串加密成 hex 字符串
  428 +function sha1(s) {
  429 + var data = new Uint8Array(encodeUTF8(s))
  430 + var i, j, t;
  431 + var l = ((data.length + 8) >>> 6 << 4) + 16, s = new Uint8Array(l << 2);
  432 + s.set(new Uint8Array(data.buffer)), s = new Uint32Array(s.buffer);
  433 + for (t = new DataView(s.buffer), i = 0; i < l; i++)s[i] = t.getUint32(i << 2);
  434 + s[data.length >> 2] |= 0x80 << (24 - (data.length & 3) * 8);
  435 + s[l - 1] = data.length << 3;
  436 + var w = [], f = [
  437 + function () { return m[1] & m[2] | ~m[1] & m[3]; },
  438 + function () { return m[1] ^ m[2] ^ m[3]; },
  439 + function () { return m[1] & m[2] | m[1] & m[3] | m[2] & m[3]; },
  440 + function () { return m[1] ^ m[2] ^ m[3]; }
  441 + ], rol = function (n, c) { return n << c | n >>> (32 - c); },
  442 + k = [1518500249, 1859775393, -1894007588, -899497514],
  443 + m = [1732584193, -271733879, null, null, -1009589776];
  444 + m[2] = ~m[0], m[3] = ~m[1];
  445 + for (i = 0; i < s.length; i += 16) {
  446 + var o = m.slice(0);
  447 + for (j = 0; j < 80; j++)
  448 + w[j] = j < 16 ? s[i + j] : rol(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1),
  449 + t = rol(m[0], 5) + f[j / 20 | 0]() + m[4] + w[j] + k[j / 20 | 0] | 0,
  450 + m[1] = rol(m[1], 30), m.pop(), m.unshift(t);
  451 + for (j = 0; j < 5; j++)m[j] = m[j] + o[j] | 0;
  452 + };
  453 + t = new DataView(new Uint32Array(m).buffer);
  454 + for (var i = 0; i < 5; i++)m[i] = t.getUint32(i << 2);
  455 +
  456 + var hex = Array.prototype.map.call(new Uint8Array(new Uint32Array(m).buffer), function (e) {
  457 + return (e < 16 ? "0" : "") + e.toString(16);
  458 + }).join("");
  459 +
  460 + return hex;
  461 +};
  462 +
  463 +
  464 +
  465 +
  466 +
413 module.exports = { 467 module.exports = {
414 formatTime: function(e, r) { 468 formatTime: function(e, r) {
415 var t = e ? new Date(1e3 * e) : new Date(), n = t.getFullYear(), o = t.getMonth() + 1, a = t.getDate(), u = t.getHours(), i = t.getMinutes(), f = t.getSeconds(), s = function(e) { 469 var t = e ? new Date(1e3 * e) : new Date(), n = t.getFullYear(), o = t.getMonth() + 1, a = t.getDate(), u = t.getHours(), i = t.getMinutes(), f = t.getSeconds(), s = function(e) {
@@ -515,5 +569,6 @@ module.exports = { @@ -515,5 +569,6 @@ module.exports = {
515 mergeArray:mergeArray, //数组合并 569 mergeArray:mergeArray, //数组合并
516 isContained:isContained, //是否包含 570 isContained:isContained, //是否包含
517 base64_encode:base64_encode, //64位加密 571 base64_encode:base64_encode, //64位加密
518 - ob_to_parm:ob_to_parm //对象变成参数 572 + ob_to_parm:ob_to_parm ,//对象变成参数
  573 + sha1:sha1, //sha1进行签名
519 }; 574 };