Sanakey
2021-02-06 a50a5b3b9a589356da21bfc55700d037e3f6dd27
团购相关功能更新
28个文件已修改
1310 ■■■■ 已修改文件
app.js 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app.json 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app.wxss 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/dialog-layer/index.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/group-buying/index.js 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/group-buying/index.wxml 72 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/group-buying/index.wxss 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/cart.wxml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/cart.wxss 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/detail/detail.js 314 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/detail/detail.wxml 93 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/detail/detail.wxss 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/detailEvents/detailEvents.wxml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/index.wxml 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/index.wxss 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/order.js 317 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/order.wxml 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/orderDetailEdit/orderDetailEdit.js 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/orderDetailEdit/orderDetailEdit.wxml 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/orderDetailEdit/orderDetailEdit.wxss 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/orderPay/orderPay.wxml 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/orderlist/orderlist.js 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/orderlist/orderlist.wxml 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/orderlist/orderlist.wxss 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/refund/refund.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/template/goods-item/goods-item-template.wxml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/template/goods-item/goods-item-template.wxss 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
project.config.json 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app.js
@@ -4,7 +4,7 @@
import { Request } from './utils/http'
import { updateManager } from './utils/appExtends'
import {webSocket, socketReconnect} from './utils/websocket'
let livePlayer = requirePlugin('live-player-plugin');
// let livePlayer = requirePlugin('live-player-plugin');
// promisify all wx‘s api
promisifyAll();
@@ -754,17 +754,17 @@
    // 直播间
    if((options.scene == 1007 || options.scene == 1008 || options.scene == 1044)&&options.path.includes('/pages/live-player-plugin')){
      console.log('通过直播分享卡片进入小程序', options);
      livePlayer.getShareParams()
      .then((res)=>{
        console.log('获取直播 room id', res.room_id); // 房间号
        console.log('获取直播 openid', res.openid); // 用户openid
        console.log('获取直播 share openid', res.share_openid); // 分享者openid,分享卡片进入场景才有
        console.log('获取 custom params', res.custom_params); // 开发者在跳转进入直播间页面时,页面路径上携带的自定义参数,这里传回给开发者
        let FromUserId = res.custom_params.FromUserId || '';
        this.handleFromUserIdChange(FromUserId);
      }).catch(err => {
        console.log('获取直播 share params', err)
      })
      // livePlayer.getShareParams()
      // .then((res)=>{
      //   console.log('获取直播 room id', res.room_id); // 房间号
      //   console.log('获取直播 openid', res.openid); // 用户openid
      //   console.log('获取直播 share openid', res.share_openid); // 分享者openid,分享卡片进入场景才有
      //   console.log('获取 custom params', res.custom_params); // 开发者在跳转进入直播间页面时,页面路径上携带的自定义参数,这里传回给开发者
      //   let FromUserId = res.custom_params.FromUserId || '';
      //   this.handleFromUserIdChange(FromUserId);
      // }).catch(err => {
      //   console.log('获取直播 share params', err)
      // })
    }
    // 不是初次打开
    else if(!this.isFirstOpenApp){
app.json
@@ -98,7 +98,7 @@
        "text": "商城"
      },
      {
        "pagePath": "pages/classify2/classify2",
        "pagePath": "pages/classify/classify",
        "iconPath": "imgs/icon/classify.png",
        "selectedIconPath": "imgs/icon/classify-s.png",
        "text": "分类"
@@ -126,7 +126,12 @@
    "c-contact": "/component/contact/contact",
    "c-wxparse": "/component/wxparse/wxparse",
    "van-dialog": "/src/vant-weapp/dialog/index",
    "van-divider": "/src/vant-weapp/divider/index"
    "van-divider": "/src/vant-weapp/divider/index",
    "van-tag": "/src/vant-weapp/tag/index",
    "van-button": "/src/vant-weapp/button/index",
    "van-cell": "/src/vant-weapp/cell/index",
    "van-goods-action": "/src/vant-weapp/goods-action/index",
    "van-goods-action-button": "/src/vant-weapp/goods-action-button/index"
  },
  "navigateToMiniProgramAppIdList": [
    "wxa20000d674f09912",
@@ -139,10 +144,7 @@
    }
  },
  "plugins": {
    "live-player-plugin": {
      "version": "1.2.2",
      "provider": "wx2b03c6e691cd7370"
    },
    "chooseLocation": {
      "version": "1.0.5",
      "provider": "wx76a9a06e5b4e693e"
app.wxss
@@ -288,3 +288,14 @@
.my-goods-action .van-goods-action--safe {
  padding-bottom: 2rpx;
}
.inline-block{
  display: inline-block;
}
.font-size-14{
  font-size: 28rpx;
}
.font-size-16{
  font-size: 32rpx;
}
component/dialog-layer/index.js
@@ -69,6 +69,9 @@
      this.setData({
        isShow: false
      })
      this.triggerEvent('closeDialog',{
        isShow: false
      })
    },
    showDialog() {
      this.setData({
component/group-buying/index.js
@@ -18,6 +18,10 @@
      //   console.log(oldVal);
      // }
    },
    isCanBuy:{
      type:Boolean,
      value:true
    },
    goodsItem:{
      type: Object,
      value: {}
@@ -76,6 +80,23 @@
      let dialogLayer =  this.selectComponent('#dialogLayer');
      dialogLayer.closeDialog();
    },
    showDialog2(){
      let dialogLayer =  this.selectComponent('#dialogLayer2');
      dialogLayer.showDialog();
      this.setData({
        isShowDetails:true
      })
    },
    bindCloseDialog(){
      // console.log(999);
      this.setData({
        isShowDetails:false
      })
    },
    closeDialog2(){
      let dialogLayer =  this.selectComponent('#dialogLayer2');
      dialogLayer.closeDialog();
    },
    goIndex(){
      this.triggerEvent('goIndex', {
        isShow: false
@@ -94,17 +115,44 @@
    },
    groupBuying(e){
      this.closeDialog();
      if (!this.data.isCanBuy) return;
      this.triggerEvent('buyTap', {
        name:'group',
        groupCode:e.currentTarget.dataset.groupCode,
      })
    },
    onCountDownFinish(){
      console.log('0000');
    async showGroupBuyingOrderList(e){
      let groupBuyingDocCode = e.currentTarget.dataset.groupCode;
      this.showDialog2();
      let [errMsg,listRes] = await this.getGroupBuyingOrderList(groupBuyingDocCode);
      if (errMsg) {
        return;
      }
      console.log(listRes);
      this.setData({
        isDisabled:true
      })
    }
        groupBuyingListDetail:listRes.groupBuyingList,
      });
    },
    async getGroupBuyingOrderList(groupCode){
      let data = {};
      // let groupBuyingDocCode = groupCode;
      data.groupBuyingDocCode = groupCode;
      console.log(data);
      let [errMsg,res] = await utils.to(
        wx.$http.request({
          url:'/shopping/groupBuyingOrderList.do',
          data
        })
      )
      return [errMsg,res];
    },
    // onCountDownFinish(){
    //   console.log('0000');
    //   this.setData({
    //     isDisabled:true
    //   })
    // }
  }
});
component/group-buying/index.wxml
@@ -16,7 +16,7 @@
    </view>
    <view class="content">
<!--      <van-cell-group class="my-cell-group" border="{{false}}">-->
        <van-cell class="my-cell" title-width="280rpx"  center wx:for="{{groupBuyingList}}" wx:if="{{index<2}}" wx:key="key"  border="{{index!==arrayList.length-1?true:false}}">
        <van-cell class="my-cell" title-width="250rpx"  center wx:for="{{groupBuyingList}}" wx:if="{{index<2}}" wx:key="key"  border="{{index!==arrayList.length-1?true:false}}" data-group-code="{{item.GroupBuyingDocCode}}" bind:tap="showGroupBuyingOrderList">
          <view slot="icon">
            <van-image  round width="80rpx" height="80rpx" class="van-image"
                       src="{{item.Headimgurl}}"/>
@@ -26,48 +26,78 @@
          </view>
          <view class="font-bold flex-between">
            <view class="">
              <view  class="van-cell-text">{{item.GroupBuyingMembers}}人成团,还差<text class="mark">{{item.GroupBuyingMembersBalance}}人</text></view>
              <view  class="van-cell-text no-wrap flex-between">剩余<van-count-down bind:finish="onCountDownFinish" time="{{ goodsItem.GroupBuyingEndTimeBalance+330*1000 }}" /></view>
              <view  class="van-cell-text">{{item.GroupBuyingMembers}}人成团,<block wx:if="{{item.GroupBuyingMembersBalance>0}}">还差<text class="mark">{{item.GroupBuyingMembersBalance}}人</text></block><block wx:else>已成功拼团</block></view>
<!--              <view  class="van-cell-text no-wrap flex-between">剩余<van-count-down bind:finish="onCountDownFinish" time="{{ goodsItem.GroupBuyingEndTimeBalance+1*1000 }}" /></view>-->
            </view>
            <van-button size="small" disabled="{{isDisabled}}" data-group-code="{{item.GroupBuyingDocCode}}" class="margin-left" type="danger" bind:click="groupBuying">去拼单</van-button>
            <van-button size="small" disabled="{{!isCanBuy}}" data-group-code="{{item.GroupBuyingDocCode}}" class="margin-left" type="danger" catch:tap="groupBuying">去拼单</van-button>
          </view>
        </van-cell>
<!--      </van-cell-group>-->
    </view>
  </view>
  <c-dialog-layer id="dialogLayer">
    <view slot="title" class="dialog-title">
      正在拼单
  <view hidden="{{isShowDetails}}">
    <c-dialog-layer id="dialogLayer"  >
      <view slot="title" class="dialog-title">
        正在拼单
      </view>
      <scroll-view scroll-y="true" style="height:{{280}}px;">
        <view class="content">
          <!--      <van-cell-group class="my-cell-group" border="{{false}}">-->
          <van-cell class="my-cell" title-width="150rpx"  center wx:for="{{groupBuyingList}}" wx:key="key"  border="{{index!==arrayList.length-1?true:false}}" data-group-code="{{item.GroupBuyingDocCode}}" bind:tap="showGroupBuyingOrderList">
            <view slot="icon">
              <van-image  round width="80rpx" height="80rpx" class="van-image"
                          src="{{item.Headimgurl}}"/>
            </view>
            <view class="slot-title" slot="title">
              <view  class="van-cell-text no-wrap margin-left">{{item.NickName}}</view>
            </view>
            <view class="font-bold flex-between">
              <view class="">
                <view  class="van-cell-text">{{item.GroupBuyingMembers}}人成团,<block wx:if="{{item.GroupBuyingMembersBalance>0}}">还差<text class="mark">{{item.GroupBuyingMembersBalance}}人</text></block><block wx:else>已成功拼团</block></view>
                <!--              <view  class="van-cell-text no-wrap flex-between">剩余<van-count-down bind:finish="onCountDownFinish" time="{{ goodsItem.GroupBuyingEndTimeBalance+330*1000 }}" /></view>-->
              </view>
              <van-button size="small" disabled="{{!isCanBuy}}" class="margin-left" type="danger" catch:tap="groupBuying" data-group-code="{{item.GroupBuyingDocCode}}">去拼单</van-button>
            </view>
          </van-cell>
          <!--      </van-cell-group>-->
        </view>
      </scroll-view>
    </c-dialog-layer>
  </view>
  <c-dialog-layer id="dialogLayer2" bind:closeDialog="bindCloseDialog">
    <view slot="title" class="dialog-title2" wx:for="{{groupBuyingListDetail}}" wx:key="key" wx:if="{{item.isGroupBuyingMaster}}">
      <view class="avatar-view2">
        <van-image  round width="80rpx" height="80rpx" class="van-image"
                    src="{{item.Headimgurl}}"/>
        <van-tag round color="#ffab33" class="group-tag">拼主</van-tag>
      </view>
      <view>{{item.NickName}}</view>
      <view class="van-cell-text2">{{item.EnterDate}} 发起拼单</view>
    </view>
    <scroll-view scroll-y="true" style="height:{{280}}px;">
      <view class="content">
        <!--      <van-cell-group class="my-cell-group" border="{{false}}">-->
        <van-cell class="my-cell" title-width="180rpx"  center wx:for="{{groupBuyingList}}" wx:key="key"  border="{{index!==arrayList.length-1?true:false}}">
        <van-cell class="my-cell" title-width="120rpx"  center wx:for="{{groupBuyingListDetail}}" wx:key="key"  wx:if="{{!item.isGroupBuyingMaster}}" border="{{index!==arrayList.length-1?true:false}}">
          <view slot="icon">
            <van-image  round width="80rpx" height="80rpx" class="van-image"
                        src="{{item.Headimgurl}}"/>
          </view>
          <view class="slot-title" slot="title">
            <view  class="van-cell-text no-wrap margin-left">{{item.NickName}}</view>
          <view class="slot-title2" slot="title">
            <view  class="no-wrap margin-left">{{item.NickName}}</view>
          </view>
          <view class="font-bold flex-between">
            <view class="">
              <view  class="van-cell-text">{{item.GroupBuyingMembers}}人成团,还差<text class="mark">{{item.GroupBuyingMembersBalance}}人</text></view>
              <view  class="van-cell-text no-wrap flex-between">剩余<van-count-down bind:finish="onCountDownFinish" time="{{ goodsItem.GroupBuyingEndTimeBalance+330*1000 }}" /></view>
            </view>
            <van-button size="small" disabled="{{isDisabled}}" class="margin-left" type="danger" bind:click="groupBuying" data-group-code="{{item.GroupBuyingDocCode}}">去拼单</van-button>
          <view class="font-bold">
            <view  class="van-cell-text2">{{item.EnterDate}} 拼单成功</view>
          </view>
        </van-cell>
        <!--      </van-cell-group>-->
      </view>
    </scroll-view>
  </c-dialog-layer>
  <van-goods-action class="my-goods-action">
    <van-goods-action-icon icon="shop-o" text="店铺" bind:click="goIndex" />
    <van-goods-action-icon icon="cart-o" text="购物车" bind:click="goCart" />
    <van-goods-action-button color="#f4aba7" bind:click="buyTap" data-name="order">
    <van-goods-action-button color="{{isCanBuy?'#f4aba7':'e02e24'}}" bind:click="buyTap" data-name="order">
      <view  class="goods-btn-text">
        <view>
          {{goodsItem.CurrencySign}}{{goodsItem.Price}}
@@ -77,7 +107,7 @@
        </view>
      </view>
    </van-goods-action-button>
    <van-goods-action-button color="#e02e24" bind:click="buyTap" data-name="group">
    <van-goods-action-button color="#e02e24" bind:click="buyTap" data-name="group" disabled="{{!isCanBuy}}">
      <view  class="goods-btn-text">
        <view>
          {{goodsItem.CurrencySign}}{{goodsItem.GroupBuyingPrice}}
component/group-buying/index.wxss
@@ -1,5 +1,7 @@
/*@import "../../src/src.wxss";*/
.group-buying-container view{
  overflow: visible;
}
.goods-btn-text view{
  font-size: 30rpx;
}
@@ -33,3 +35,32 @@
.mark{
  color: #f23232;
}
.dialog-title2{
  text-align: center;
  padding: 10rpx 0;
}
.group-tag{
  position: absolute;
  left: -15rpx;
  top: -10rpx;
}
.slot-title2{
  margin-left: 20rpx;
}
.van-cell-text2{
  color: #a9a9a9;
}
.my-cell-content2{
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.my-cell-content2 .iconfont{
  font-size: 42rpx;
}
.avatar-view2{
  position: relative;
  display: inline-block;
}
pages/cart/cart.wxml
@@ -33,12 +33,18 @@
            <view class="goods-title" wx:if="{{item.isShowMatCode}}">{{item.MatCode}}</view>
            <view class="goods-label" wx:if="{{item.isShowMatName}}">{{item.MatName}}</view>
            <view class="goods-label" wx:if="{{item.isShowSpecial}}">{{item.Special}}</view>
            <van-tag plain  round class="goods-tag " size="medium" color="#f23232" wx:if="{{item.skuName1}}">
              <block wx:for="{{10}}" wx:for-item="sku" wx:key="key">
                {{item['skuName'+(index+1)]}}
<!--                                {{'skuName'+index+1}}-->
              </block>
            </van-tag>
            <view class="goods-price" wx:if="{{item.isShowPrice}}">{{item.CurrencySign}}{{item.Price}}</view>
            <c-cartInput class="buy-num" catchtap="inp"  bind:quantityEdit="quantityEdit" data-cart-id="{{item.CartId}}" data-index="{{index}}" order-process="{{generateOrderProcess}}" data-id="{{item.MatCode}}" item-data="{{item}}"></c-cartInput>
            <!-- <view class="buy-num" catchtap="inp">
               <view class="jian-btn {{item.Quantity<=1? 'disabled' : ''}}" catchtap="jianBtnTap" data-index="{{index}} " data-id="{{item.MatCode}}" data-cart-id="{{item.CartId}}">-</view>
              <input type="number" value="{{item.Quantity}}" bindblur="inputNum"  data-index="{{index}}" data-id="{{item.MatCode}}" data-cart-id="{{item.CartId}}"/>
              <view class="jia-btn {{item.Quantity>=9999? 'disabled' : ''}}" catchtap="jiaBtnTap" data-index="{{index}}" data-id="{{item.MatCode}}" data-cart-id="{{item.CartId}}">+</view>
              <view class="jia-btn {{item.Quantity>=9999? 'disabled' : ''}}" catchtap="jiaBtnTap" data-index="{{index}}" data-id="{{item.MatCode}}" data-cart-id="{{item.CartId}}">+</view>
            </view> -->
          </view>
@@ -58,7 +64,7 @@
      <view class="total" hidden="{{goodsList.noSelect}}">合计:¥{{goodsList.totalPrice}}</view>
    </view>
    <!-- <form bindsubmit="formIdSubmit">
      <button form-type="submit" open-type="getUserInfo" class="get-userinfo to-pay-btn {{goodsList.noSelect?'no-select':''}}" hidden="{{!goodsList.edit}}"  bindgetuserinfo="toPayOrder" >去结算</button>
    </form> -->
    <c-authorize-phone is-must-authorize="{{true}}"  bind:authorize="toPayOrder">
@@ -72,4 +78,4 @@
  <!--<template is="contactBtnTemplate" data="{{unreadMsgNum,newMsg,animationData}}" />-->
<!-- <template is="tabBar" data="{{tabBar:bindData.tabBar}}"/> -->
</view>
<c-contact></c-contact>
<c-contact></c-contact>
pages/cart/cart.wxss
@@ -242,7 +242,7 @@
  background-color: #e64340;
  font-size: 32rpx;
  color: #fff;
}
.get-userinfo{
  border-radius: 0;
@@ -285,3 +285,6 @@
  color: #e64340;
  font-size: 26rpx;
}
.goods-tag .van-tag{
  margin-bottom: 45rpx;
}
pages/detail/detail.js
@@ -34,6 +34,7 @@
    ],
    isShow: false,
    isCanBuy:true,
    isCanBuy2:true,
    actionType: "payOrder",
    Quantity: {
      quantity: 1,
@@ -161,40 +162,8 @@
          ['Quantity.quantity']: res.data.list.Mininum||1
          // price: goodsItem.Price
        })
        this.handleNoticeText(res.data.list);
        let {
          Quantity,
          isRestrictQuantity,
          isStartupPanicBuying,
          PanicBuyingStartTimeBalance,
          PanicBuyingEndTimeBalance,
          PanicBuyingStartTime,
          PanicBuyingEndTime,
        } = res.data.list;
        if (isStartupPanicBuying&&PanicBuyingStartTimeBalance>0) {
          this.setData({
            noticeText:`未开抢,开抢时间${PanicBuyingStartTime}至${PanicBuyingEndTime}`,
            isCanBuy:false
          })
        }
        else if (isStartupPanicBuying&&PanicBuyingStartTimeBalance<=0&&PanicBuyingEndTimeBalance>0) {
          this.setData({
            noticeText:`商品抢购中,结束时间为${PanicBuyingEndTime}`,
            isCanBuy:true
          })
        }
       else if (isStartupPanicBuying&&PanicBuyingEndTimeBalance<=0) {
          this.setData({
            noticeText:`本次商品抢购已结束`,
            isCanBuy:false
          })
        }
        if (isRestrictQuantity&&Quantity<=0) {
          this.setData({
            noticeText:`该商品已售罄`,
            isCanBuy:false
          })
        }
        // WxParse.wxParse('article', 'html', res.data.list.Description, that, 5);
        this.getPosterQrCode();
        this.handleCurrentGoods();
@@ -216,6 +185,69 @@
     * 4.target为Page对象,一般为this(必填)
     * 5.imagePadding为当图片自适应是左右的单一padding(默认为0,可选)
     */
  },
  handleNoticeText(res){
    let {
      Quantity,
      isRestrictQuantity,
      isStartupPanicBuying,
      PanicBuyingStartTimeBalance,
      PanicBuyingEndTimeBalance,
      PanicBuyingStartTime,
      PanicBuyingEndTime,
      isStartupGroupBuying,
      GroupBuyingMembers,
      GroupBuyingPrice,
      GroupBuyingStartTime,
      GroupBuyingEndTime,
      GroupBuyingStartTimeBalance,
      GroupBuyingEndTimeBalance
    } = res;
    if (isStartupPanicBuying&&PanicBuyingStartTimeBalance>0) {
      this.setData({
        noticeText:`未开抢,开抢时间${PanicBuyingStartTime}至${PanicBuyingEndTime}`,
        isCanBuy:false
      })
    }
    else if (isStartupPanicBuying&&PanicBuyingStartTimeBalance<=0&&PanicBuyingEndTimeBalance>0) {
      this.setData({
        noticeText:`商品抢购中,结束时间为${PanicBuyingEndTime}`,
        isCanBuy:true
      })
    }
    else if (isStartupPanicBuying&&PanicBuyingEndTimeBalance<=0) {
      this.setData({
        noticeText:`本次商品抢购已结束`,
        isCanBuy:false
      })
    }
    if (isStartupGroupBuying&&GroupBuyingStartTimeBalance>0) {
      this.setData({
        noticeText:`未开抢,开抢时间${GroupBuyingStartTime}至${GroupBuyingEndTime}`,
        isCanBuy:false
      })
    }
    else if (isStartupGroupBuying&&GroupBuyingStartTimeBalance<=0&&GroupBuyingEndTimeBalance>0) {
      this.setData({
        noticeText:`商品拼团抢购中,结束时间为${GroupBuyingEndTime}`,
        isCanBuy:true
      })
    }
    else if (isStartupGroupBuying&&GroupBuyingEndTimeBalance<=0) {
      this.setData({
        noticeText:`本次商品限时团购已结束`,
        isCanBuy:false
      })
    }
    if (isRestrictQuantity&&Quantity<=0) {
      this.setData({
        noticeText:`该商品已售罄`,
        isCanBuy:false
      })
    }
  },
  btnTap: function (e) {
@@ -425,7 +457,9 @@
    var that = this;
    utils.hideLayer(that, "translateY", 500);
    this.setData({
      ['Quantity.quantity']: this.data.Mininum||1
      ['Quantity.quantity']: this.data.Mininum||1,
      isSelectedSku: false
    })
  },
@@ -808,6 +842,19 @@
      }
  },
  selectedSku(){
    // console.log(888);
    if (!this.data.isCanBuy) return;
    this.setData({
      isSelectedSku: true
    })
    if (this.data.isShow) {
      this.hideLayer();
    } else {
      this.showLayer();
    }
  },
  handleCurrentGoods(){
  /*
  *
@@ -820,9 +867,21 @@
    let MatCode = this.data.goodsItem.MatCode;
    let selectedSkuId = [];
    let selectedSkuName = [];
    let skuIdStrings = [];
    let goodsSkuIdStrings = [];
    let goodsSkuIdList = [];
    let skuIdList = [];
    let skuSetName = [];
    SkuParameterList.forEach((item) => {
      let arr = [];
      item.skuList.forEach((item) => {
        arr.push(item.skuId)
      })
      skuIdList.push(arr);
      skuSetName.push(item.skuSetName);
    })
    SkuMatCodeList.forEach((item,index)=>{
      let skuIdString = '';
      let skuIdArr = [];
      for (let i = 1; i < 11; i++) {
        if (item.MatCode === MatCode && item[`skuId${i}`]){
          selectedSkuId.push(item[`skuId${i}`])
@@ -830,38 +889,97 @@
        }
        if (item[`skuId${i}`]){
          skuIdString+=item[`skuId${i}`]
          skuIdArr.push(item[`skuId${i}`])
        }
      }
      skuIdStrings.push(skuIdString)
      goodsSkuIdStrings.push(skuIdString)
      goodsSkuIdList.push(skuIdArr)
    })
    this.setData({
      selectedSkuId,
      selectedSkuName,
      skuIdStrings
      selectedSkuNameStr: selectedSkuName.join(' '),
      goodsSkuIdStrings,
      skuIdList,
      goodsSkuIdList,
      skuSetName,
      skuSetNameStr:skuSetName.join(','),
    })
    console.log('selectedSkuId',selectedSkuId);
    console.log('selectedSkuName',selectedSkuName);
    console.log('skuIdStrings',skuIdStrings);
    console.log('goodsSkuIdStrings',goodsSkuIdStrings);
    console.log('skuIdList',skuIdList);
    console.log('goodsSkuIdList',goodsSkuIdList);
    console.log('skuSetName',skuSetName);
    this.handleSkuIds();
  },
  selectGoodsAttr(e){
  async selectGoodsAttr(e){
    console.log(e);
    let attrIndex = e.currentTarget.dataset.i;
    let listIndex = e.currentTarget.dataset.index;
    let skuId = e.currentTarget.dataset.skuId;
    let skuName = e.currentTarget.dataset.skuName;
    let isEnabled = e.currentTarget.dataset.isEnabled;
    let selectedSkuId = this.data.selectedSkuId;
    selectedSkuId[attrIndex] =  skuId;
    let skuIdStrings = this.data.skuIdStrings;
    let hasSkuId = skuIdStrings.includes(selectedSkuId.join(''));
    console.log(skuIdStrings,selectedSkuId.join(''));
    if (skuIdStrings.includes(selectedSkuId.join(''))){
      this.setData({
        [`selectedSkuId[${attrIndex}]`]:skuId
      })
    } else{
    let selectedSkuName = this.data.selectedSkuName;
    let length = selectedSkuId.length;
    console.log(e,selectedSkuId);
    if (!isEnabled) return;
    selectedSkuId[attrIndex] =  skuId;
    selectedSkuName[attrIndex] =  skuName;
    selectedSkuId.forEach((item,index)=>{
      if (index>attrIndex){
        selectedSkuId[index] = ''
        selectedSkuName[index] = ''
        length--;
      }
    })
    this.setData({
      // [`selectedSkuId[${attrIndex}]`]:skuId,
      selectedSkuId:selectedSkuId,
      // [`selectedskuName[${attrIndex}]`]:skuName,
      // [`selectedskuName[${attrIndex}]`]:skuName,
      selectedSkuNameStr: selectedSkuName.join(' '),
      selectedSkuIdLength: length
    })
    console.log(selectedSkuId,selectedSkuName,this.data.selectedSkuIdLength);
    // console.log(await this.getSkuParameterByMatCode());
    let [errMsg,spRes] = await this.getSkuParameterByMatCode();
    if (errMsg) {
      return;
    }
    console.log(spRes);
    if (length<selectedSkuId.length) {
      this.setData({
        SkuParameterList:spRes.SkuParameterList,
        isCanBuy2:false,
      })
    } else {
      this.setData({
        SkuParameterList:spRes.SkuParameterList,
        CouponList:spRes.CouponList,
        goodsItem:spRes.list,
        groupBuyingList:spRes.groupBuyingList,
        isCanBuy2:true,
      })
      matcode = spRes.list.MatCode
      this.handleNoticeText(spRes.list);
    }
    // selectedSkuId[attrIndex] =  skuId;
    // let goodsSkuIdStrings = this.data.goodsSkuIdStrings;
    // let hasSkuId = goodsSkuIdStrings.includes(selectedSkuId.join(''));
    // console.log(goodsSkuIdStrings,selectedSkuId.join(''));
    // if (goodsSkuIdStrings.includes(selectedSkuId.join(''))){
    //   this.setData({
    //     [`selectedSkuId[${attrIndex}]`]:skuId
    //   })
    // } else{
    //
    // }
    // this.handleDisabledSkuId();
    /*
    * 遍历第一列,把没有的标记
    * 点击第一列可选的项后,遍历剩下所有列,把没有的标记
@@ -875,6 +993,71 @@
    // })
  },
  async getSkuParameterByMatCode(){
    this.handleSkuIds();
    let data = this.data.skuIds;
    let [errMsg,res] = await utils.to(
      wx.$http.request({
        url:'/shopping/getSkuParameterByMatCode.do',
        data
      })
    )
    return [errMsg,res];
  },
  handleSkuIds(){
    let data = {};
    let selectedSkuId = this.data.selectedSkuId;
    let selectedSkuIdLength = this.data.selectedSkuIdLength;
    for (let i = 1; i < 11; i++) {
      if (selectedSkuId[i-1]){
        data[`skuId${i}`] = selectedSkuId[i-1]
      } else {
        data[`skuId${i}`] = ''
      }
    }
    if (selectedSkuIdLength<selectedSkuId.length) {
      data.matcode = this.data.goodsItem.MatCode;
    }
    console.log(selectedSkuIdLength,selectedSkuId.length);
    console.log(data);
    this.setData({
      skuIds:data
    });
  },
  handleDisabledSkuId(){
    let SkuMatCodeList = this.data.SkuMatCodeList;
    let skuIdList = this.data.skuIdList;
    let goodsSkuIdList = this.data.goodsSkuIdList.flat(2);
    // console.log(goodsSkuIdList);
    let disabledSkuId = [];
    let selectedSkuId = this.data.selectedSkuId;
    // SkuMatCodeList.forEach((item,index)=>{
    //   let disabledArr = [];
    //   if (skuIdList[0].includes(item.skuId1)) {
    //     disabledArr.push()
    //   }
    // })
    let disabledArr = [];
    skuIdList.forEach((list,index)=>{
      if (index === 0){
        list.forEach((item,i)=>{
          if (goodsSkuIdList.includes(item)){
            disabledArr.push(true)
          } else{
            disabledArr.push(false)
          }
        })
        disabledSkuId.push(disabledArr);
      }
    })
  },
  quantityEdit(e){
    // console.log(e)
@@ -885,10 +1068,19 @@
  },
  groupBuying(e){
    console.log('准备团购');
    if (!this.data.isCanBuy) return;
    if (!this.data.isCanBuy2) {
      wx.showToast({
        title: '请选择正确的分类',
        icon:'none'
      })
      return
    };
    let quantity = this.data.Quantity.quantity;
    let matCode = this.data.goodsItem.MatCode;
    let groupCode = this.data.groupCode;
    let goodsItem = this.data.goodsItem;
    let skuIds = this.data.skuIds;
    // let eventChannel = this.getOpenerEventChannel();
    //?quantity=${quantity}&matcode=${matcode}&groupCode=${groupCode}
    wx.navigateTo({
@@ -898,13 +1090,15 @@
          quantity,
          matCode,
          groupCode,
          goodsItem
          goodsItem,
          skuIds
        });
      }
    })
  },
  // 加入购物车触发事件
  addCart: function(e) {
    if (!this.data.isCanBuy) return;
    // utils.isAuthorize(this);
    // console.log(this.data.isAuthorize,333)
    // if(!this.data.isAuthorize){
@@ -919,7 +1113,7 @@
    var title = this.data.goodsItem.MatCode;
    var img = this.data.goodsItem.images[0];
    console.log(this.data.Quantity)
    let skuIds = this.data.skuIds;
    wx.request({
@@ -929,7 +1123,8 @@
      },
      data: {
        matcode: title,
        quantity: num
        quantity: num,
        ...skuIds
      },
      success: function(res) {
        wx.hideLoading();
@@ -960,6 +1155,14 @@
  },
  // 立即购买触发事件
  payOrder: function(e) {
    if (!this.data.isCanBuy) return;
    if (!this.data.isCanBuy2) {
      wx.showToast({
        title: '请选择正确的分类',
        icon:'none'
      })
      return
    };
    // utils.subscribeMessage({
    //   callback:()=>{
@@ -972,7 +1175,7 @@
    wx.showLoading({
      title: '加载中',
    })
    let skuIds = this.data.skuIds;
    wx.request({
      url: utils.getUrl('/shopping/cart.do?m=add&action=goshop'),
      header: {
@@ -980,7 +1183,8 @@
      },
      data: {
        matcode: id,
        quantity: num
        quantity: num,
        ...skuIds
      },
      success: res=> {
        wx.hideLoading();
pages/detail/detail.wxml
@@ -13,7 +13,7 @@
    </block>
  </swiper>
  <view class="detail-price" wx:if="{{goodsItem.Price!=null}}">
    <view class="des-price" wx:if="{{goodsItem.isShowPrice}}">{{goodsItem.CurrencySign}}{{goodsItem.Price}}
    <view class="des-price" wx:if="{{goodsItem.isShowPrice}}">{{goodsItem.CurrencySign}}{{goodsItem.isStartupGroupBuying?goodsItem.GroupBuyingPrice:goodsItem.Price}}
    <text class="des-sale-price" wx:if="{{goodsItem.isShowPrice&&goodsItem.Price!=goodsItem.SalesPrice&&goodsItem.SalesPrice!=0}}">{{goodsItem.CurrencySign}}{{goodsItem.SalesPrice}}</text>
    </view>
    <view class="contdown" wx:if="{{goodsItem.isStartupPanicBuying&&goodsItem.PanicBuyingStartTimeBalance>0}}">
@@ -23,6 +23,15 @@
    <view class="contdown" wx:if="{{goodsItem.isStartupPanicBuying&&goodsItem.PanicBuyingStartTimeBalance<=0&&goodsItem.PanicBuyingEndTimeBalance>0}}">
      <view style="color:#fff;">距离本商品结束还剩:</view>
      <view class="contdown-div"><van-count-down bind:finish="onCountDownFinish" time="{{ goodsItem.PanicBuyingEndTimeBalance*1000 }}" /></view>
    </view>
    <view class="contdown" wx:if="{{goodsItem.isStartupGroupBuying&&goodsItem.GroupBuyingStartTimeBalance>0}}">
      <view style="color:#fff;">距离本商品团购开抢还剩:</view>
      <view class="contdown-div"><van-count-down bind:finish="onCountDownFinish" time="{{ goodsItem.GroupBuyingStartTimeBalance*1000 }}" /></view>
    </view>
    <view class="contdown" wx:if="{{goodsItem.isStartupGroupBuying&&goodsItem.GroupBuyingStartTimeBalance<=0&&goodsItem.GroupBuyingEndTimeBalance>0}}">
      <view style="color:#fff;">距离本商品团购结束还剩:</view>
      <view class="contdown-div"><van-count-down bind:finish="onCountDownFinish" time="{{ goodsItem.GroupBuyingEndTimeBalance*1000 }}" /></view>
    </view>
  </view>
  <view class="des">
@@ -53,7 +62,14 @@
    <!-- <c-posterCreate id="posterCreate" bind:createPoster="createPoster" bind:createCanvas="createCanvas"></c-posterCreate>  -->
    <!-- <canvas type="2d" style="width: 375px;height: 667px;position:fixed;top:9999px"  id="myCanvas" /> -->
  </view>
  <view class="selected-container" wx:if="{{skuSetNameStr}}">
    <van-cell is-link title-width="100rpx" bind:tap="selectedSku">
      <view slot="title">
        <text class="van-cell-text font-size-16">{{selectedSkuNameStr?'已选':'选择'}}</text>
      </view>
      <view class="font-size-16 my-cell no-wrap">{{selectedSkuNameStr?selectedSkuNameStr:skuSetNameStr}}</view>
    </van-cell>
  </view>
<view class="ticket-list" wx:if="{{CouponList.length>0}}">
    <block wx:for="{{CouponList}}" wx:key="index">
      <view class="ticket-li" wx:if="{{item.Status!==2&&item.Status!==4}}">
@@ -145,7 +161,7 @@
        <text>{{goodsItem.MatName4}}</text>
      </view>
    </view>
    <c-group-buying wx:if="{{goodsItem.isStartupGroupBuying&&isCanBuy}}" bind:goCart="goCart" bind:goIndex="goIndex" bind:buyTap="buyTap" group-buying-list="{{groupBuyingList}}" goods-item="{{goodsItem}}"></c-group-buying>
    <c-group-buying wx:if="{{goodsItem.isStartupGroupBuying}}" bind:goCart="goCart" bind:goIndex="goIndex" bind:buyTap="buyTap" is-can-buy="{{isCanBuy}}" group-buying-list="{{groupBuyingList}}" goods-item="{{goodsItem}}"></c-group-buying>
  <!-- <image src="https://bkimg.cdn.bcebos.com/pic/2934349b033b5bb571dc8c5133d3d539b600bc12?x-bce-process=image/resize,m_lfit,w_268,limit_1/format,f_jpg" bindtap="viewImg" data-src="https://bkimg.cdn.bcebos.com/pic/2934349b033b5bb571dc8c5133d3d539b600bc12?x-bce-process=image/resize,m_lfit,w_268,limit_1/format,f_jpg" mode="widthFix"></image> -->
    <!-- <block wx:for="{{goodsItem.images}}" wx:for-item="listItem" wx:for-index="listIndex" wx:key="key">
      <image src="{{listItem}}" bindtap="viewImg" data-src="{{listItem}}" mode="widthFix"></image>
@@ -178,14 +194,14 @@
  <view>
    <view>
      <van-notice-bar
          wx:if="{{goodsItem.isStartupPanicBuying||goodsItem.isStartupGroupBuying}}"
          class="notice-bar"
          wx:if="{{goodsItem.isStartupPanicBuying}}"
          text="{{noticeText}}"
          scrollable="{{false}}"
      />
    </view>
    <view class="buy-nav" wx:if="{{!goodsItem.isStartupGroupBuying||(goodsItem.isStartupGroupBuying&&!isCanBuy)}}">
    <view class="buy-nav" wx:if="{{!goodsItem.isStartupGroupBuying}}">
      <view class="buy-nav-left">
        <view class="icon" bindtap="goIndex">
          <view class="iconfont icon-shouye"></view>
@@ -237,10 +253,13 @@
  <!--对话框标题-->
  <view class="goods-layer">
    <view class="goods-row">
      <image src="{{goodsItem.images[0]}}" />
      <image bind:tap="viewImg" data-src="{{goodsItem.images[0]}}" src="{{goodsItem.images[0]}}" />
      <view class="goods-row-txt">
        <view class="goods-title no-wrap">{{goodsItem.MatName}}</view>
        <view class="goods-price">{{goodsItem.CurrencySign}}{{goodsItem.Price}}</view>
        <view class="goods-price">{{goodsItem.CurrencySign}}{{goodsItem.isStartupGroupBuying&&actionType=='groupBuying'?goodsItem.GroupBuyingPrice:goodsItem.Price}}</view>
        <van-tag plain  round class="goods-tag " size="medium" color="#f23232" wx:if="{{selectedSkuNameStr}}">
          {{selectedSkuNameStr}}
        </van-tag>
      </view>
      <view class="iconfont icon-cuowuguanbiquxiao-xianxingyuankuang" bindtap="hideLayer"></view>
    </view>
@@ -250,7 +269,7 @@
        <view class="goods-tags" >
          <block wx:for="{{item.skuList}}" wx:for-item="listItem" wx:for-index="listIndex" wx:key="key">
<!--            <van-tag round class="goods-tag {{listItem.checked?'checked':''}}" size="medium" color="#ddd"  data-index="{{listIndex}}" bind:tap="selectGoodsAttr" data-i="{{index}}">{{listItem.skuName}}</van-tag>-->
            <van-tag round class="goods-tag {{listItem.skuId===selectedSkuId[index]?'checked':''}}" size="medium" color="#ddd"  data-index="{{listIndex}}" bind:tap="selectGoodsAttr" data-sku-id="{{listItem.skuId}}" data-i="{{index}}">{{listItem.skuName}}</van-tag>
            <van-tag round class="goods-tag {{listItem.skuId===selectedSkuId[index]?'checked':'' }} {{listItem.isEnableSelection?'':'disabled-tag'}}" size="medium" color="#ddd"  data-index="{{listIndex}}" bind:tap="selectGoodsAttr" data-sku-id="{{listItem.skuId}}" data-sku-name="{{listItem.skuName}}" data-is-enabled="{{listItem.isEnableSelection}}" data-i="{{index}}" >{{listItem.skuName}}</van-tag>
          </block>
        </view>
@@ -267,11 +286,59 @@
    </view>
  </view>
  <!--对话框按钮-->
  <c-authorize-phone class="authorize-phone" is-must-authorize="{{true}}"  bind:authorize="{{actionType}}">
   <button slot="content" class="btn-next">
    下一步
  </button>
  </c-authorize-phone>
  <view wx:if="{{!isSelectedSku}}">
    <c-authorize-phone class="authorize-phone" is-must-authorize="{{true}}" wx:if="{{!skuSetNameStr}}"  bind:authorize="{{actionType}}" >
      <button slot="content" class="btn-next" disabled="{{!isCanBuy}}">
        下一步
      </button>
    </c-authorize-phone>
    <view wx:else>
      <van-goods-action class="btn-cell-group" wx:if="{{!goodsItem.isStartupGroupBuying}}" safe-area-inset-bottom="{{false}}">
        <c-authorize-phone class="authorize-phone flex1" is-must-authorize="{{true}}"  bind:authorize="addCart">
          <van-goods-action-button disabled="{{!isCanBuy}}" round slot="content" class="btn-cell cart-btn" type="warning">
            加入购物车
          </van-goods-action-button>
        </c-authorize-phone>
        <c-authorize-phone class="authorize-phone flex1" is-must-authorize="{{true}}"  bind:authorize="payOrder">
          <van-goods-action-button disabled="{{!isCanBuy}}" round slot="content" class="btn-cell" type="danger">
            立即购买
          </van-goods-action-button>
        </c-authorize-phone>
      </van-goods-action>
      <c-authorize-phone class="authorize-phone" is-must-authorize="{{true}}" wx:else  bind:authorize="{{actionType}}" >
        <button slot="content" disabled="{{!isCanBuy}}" class="btn-next">
          下一步
        </button>
      </c-authorize-phone>
    </view>
  </view>
  <view wx:else>
    <van-goods-action class="btn-cell-group" wx:if="{{!goodsItem.isStartupGroupBuying}}" safe-area-inset-bottom="{{false}}">
      <c-authorize-phone class="authorize-phone flex1" is-must-authorize="{{true}}"  bind:authorize="addCart">
        <van-goods-action-button disabled="{{!isCanBuy}}" round slot="content" class="btn-cell cart-btn" type="warning">
          加入购物车
        </van-goods-action-button>
      </c-authorize-phone>
      <c-authorize-phone class="authorize-phone flex1" is-must-authorize="{{true}}"  bind:authorize="payOrder">
        <van-goods-action-button disabled="{{!isCanBuy}}" round slot="content" class="btn-cell" type="danger">
          立即购买
        </van-goods-action-button>
      </c-authorize-phone>
    </van-goods-action>
    <van-goods-action class="btn-cell-group" wx:else safe-area-inset-bottom="{{false}}">
      <c-authorize-phone class="authorize-phone flex1" is-must-authorize="{{true}}"  bind:authorize="payOrder">
        <van-goods-action-button disabled="{{!isCanBuy}}" round color="#f4aba7" slot="content" class="btn-cell disabled-btn">
          单独购买
        </van-goods-action-button>
      </c-authorize-phone>
      <c-authorize-phone class="authorize-phone flex1" is-must-authorize="{{true}}"  bind:authorize="groupBuying">
        <van-goods-action-button disabled="{{!isCanBuy}}" round  type="danger" slot="content" class="btn-cell">
          发起拼单
        </van-goods-action-button>
      </c-authorize-phone>
    </van-goods-action>
  </view>
  <!-- <button open-type="getUserInfo" class="btn-next" bindgetuserinfo="{{actionType}}">
    下一步
pages/detail/detail.wxss
@@ -204,7 +204,7 @@
}
.goods-row .goods-title {
  line-height: 80rpx;
  /* line-height: 80rpx; */
  font-size: 30rpx;
  max-width: 500rpx;
  overflow: hidden;
@@ -393,14 +393,46 @@
}
.goods-tag{
  margin-right: 30rpx;
  margin-bottom: 20rpx;
}
.goods-tag .van-tag{
  padding: 8rpx 20rpx;
  color:#333;
  box-sizing: border-box;
}
.goods-tag.checked .van-tag{
  border: 1rpx solid #f23232;
  background-color: #f8dede !important;
  color: #f23232 !important;
}
.goods-tag.disabled-tag .van-tag{
  background-color: #f8f8f8 !important;
  color: #d3d3d3 !important;
  text-decoration:line-through;
}
.selected-container{
  background-color: #f8f8f8;
  padding: 20rpx 0;
}
.my-cell.no-wrap{
  max-width: 580rpx;
}
/*.btn-cell-group{*/
/*  display: flex;*/
/*  justify-content: space-between;*/
/*}*/
.btn-cell-group .van-goods-action{
  position: relative;
}
.flex1{
  flex:1;
}
.btn-cell .van-button__text{
  font-size: 28rpx;
}
/*.selected-container .van-cell-text{*/
/*  font-size: 2*/
/*}*/
pages/detailEvents/detailEvents.wxml
@@ -13,7 +13,7 @@
        </block>
    </swiper>
  <view class="detail-price">
    <view class="des-price" wx:if="{{goodsItem.isShowPrice}}">{{goodsItem.CurrencySign}}{{goodsItem.Price}}
    <view class="des-price" wx:if="{{goodsItem.isShowPrice}}">{{goodsItem.CurrencySign}}{{goodsItem.Price}}
    <text class="des-sale-price" wx:if="{{goodsItem.isShowPrice&&goodsItem.Price!=goodsItem.SalesPrice&&goodsItem.SalesPrice!=0}}">{{goodsItem.CurrencySign}}{{goodsItem.SalesPrice}}</text>
    </view>
    <view class="contdown" wx:if="{{goodsItem.isStartupPanicBuying&&goodsItem.PanicBuyingStartTimeBalance>0}}">
@@ -164,6 +164,7 @@
    class="notice-bar"
    wx:if="{{goodsItem.isStartupPanicBuying}}"
    text="{{noticeText}}"
        scrollable="{{false}}"
  />
  </view>
    <view class="buy-nav">
@@ -176,7 +177,7 @@
        <view wx:if="{{isPaidDeposit}}" class="now-buy bought" data-name="order">
            已经抢购
        </view>
        <!-- <c-authorize-info style="width:100%;" wx:else bind:authorize="buyNow">
            <view >66666666</view>
            <view slot="content" class="now-buy" data-name="order">
@@ -191,7 +192,7 @@
                支付{{goodsItem.CurrencySign+goodsItem.DepositAmount||0}}立即抢订
            </view>
        </c-authorize-phone>
        <!-- <button wx:else class="now-buy clear-btn" open-type="getUserInfo"  bindgetuserinfo="buyNow" data-name="order">
      支付{{goodsItem.CurrencySign+goodsItem.DepositAmount||0}}立即抢订
    </button> -->
@@ -208,4 +209,4 @@
<c-contact></c-contact>
<!-- <c-authorize-tel bind:getPhoneNumber="getPhoneNumber" wx:if="{{isPullTelephone&&!cltcode}}"></c-authorize-tel> -->
<!-- <c-authorize-tel bind:getPhoneNumber="getPhoneNumber" wx:if="{{isPullTelephone&&!cltcode}}"></c-authorize-tel> -->
pages/index/index.wxml
@@ -245,14 +245,14 @@
                                    <image class="goods-item-img border-radius" src="{{goods.PhotoPath}}"></image>
                                    <view class="img-info" wx:if="{{goods.isRestrictQuantity&&goods.Quantity<=0}}">已抢光</view>
                                    <view class="img-info" wx:elif="{{goods.isStartupPanicBuying&&goods.PanicBuyingEndTimeBalance<=0}}">已结束</view>
                                    <van-tag wx:if="{{goods.isStartupGroupBuying&&goods.GroupBuyingEndTimeBalance>0}}" mark type="danger" class="group-tag">团购中</van-tag>
                                </view>
                                <text class="goods-item-title">{{goods.isShowMatCode?goods.ShopMatCode:''}}</text>
                                <text class="goods-item-title" wx:if="{{goods.isShowMatName}}">{{goods.MatName}}</text>
                                <view class="price">
                                    <text class="goods-item-price" wx:if="{{goods.isShowPrice}}">{{goods.CurrencySign}}{{goods.Price}}</text>
                                    <text class="goods-item-price" wx:if="{{goods.isShowPrice}}">{{goods.CurrencySign}}{{goods.isStartupGroupBuying?goods.GroupBuyingPrice:goods.Price}}</text>
                                    <text class="goods-item-costprice" wx:if="{{goods.isShowPrice&&goods.Price&&goods.Price!=goods.SalesPrice&&goods.SalesPrice!=0}}">{{goods.CurrencySign}}{{goods.SalesPrice}}</text>
                                </view>
                                <text class="goods-item-info" wx:if="{{goods.isStartupPanicBuying}}">预售: {{goods.PanicBuyingStartTime}}</text>
@@ -276,11 +276,12 @@
                    <!-- <c-single-goods-item wx:for="{{item.list}}" wx:for-item="btnItem" wx:key="index" is-go-events="{{true}}" goods-item="{{btnItem}}"></c-single-goods-item> -->
                    <button bindtap="goDetailEvents" wx:for="{{item.list}}" wx:for-item="btnItem" wx:key="index" class="item-container formid-btn" data-goods-id="{{btnItem.MatCode}}" data-index="{{index}}" data-external-url="{{btnItem.ExternalUrl}}" data-deposit-doccode="{{btnItem.DepositDocCode}}" data-deposit-rowid="{{btnItem.DepositRowId}}">
                        <view class="items border-radius">
                            <van-tag wx:if="{{btnItem.isStartupGroupBuying&&btnItem.GroupBuyingEndTimeBalance>0}}" mark type="danger" class="group-tag">团购中</van-tag>
                            <image class="goods-item-img" style='width:{{item.ImageWidthWhenScrolling|| 200}}px' src="{{btnItem.PhotoPath}}"></image>
                            <text class=" goods-item-title" style='width:{{item.ImageWidthWhenScrolling|| 200}}px'>{{btnItem.isShowMatCode?btnItem.ShopMatCode:''}}</text>
                            <text class="goods-item-title" style='width:{{item.ImageWidthWhenScrolling|| 200}}px' wx:if="{{btnItem.isShowMatName}}">{{btnItem.MatName}}</text>
                            <view class="price">
                                <text class="goods-item-price" style='width:{{item.ImageWidthWhenScrolling|| 200}}px' wx:if="{{btnItem.isShowPrice}}">{{btnItem.CurrencySign}}{{btnItem.Price}}</text>
                                <text class="goods-item-price" style='width:{{item.ImageWidthWhenScrolling|| 200}}px' wx:if="{{btnItem.isShowPrice}}">{{btnItem.CurrencySign}}{{btnItem.isStartupGroupBuying?btnItem.GroupBuyingPrice:btnItem.Price}}</text>
                                <text class="goods-item-costprice" style='width:{{item.ImageWidthWhenScrolling|| 200}}px' wx:if="{{btnItem.isShowPrice&&btnItem.SalesPrice&&btnItem.SalesPrice!==btnItem.Price}}">{{btnItem.CurrencySign}}{{btnItem.SalesPrice}}</text>
                            </view>
                            <view class="order-price" wx:if="{{!btnItem.isPaidDeposit}}">
@@ -343,6 +344,7 @@
                        <!-- <button class="hide-btn" form-type="submit"></button> -->
                        <view class="items border-radius">
                            <view style="position:relative;">
                                <van-tag wx:if="{{btnItem.isStartupGroupBuying&&btnItem.GroupBuyingEndTimeBalance>0}}" mark type="danger" class="group-tag">团购中</van-tag>
                                <image class="goods-item-img" style='width:{{item.ImageWidthWhenScrolling|| 200}}px' src="{{btnItem.PhotoPath}}"></image>
                                <view class="img-info" wx:if="{{btnItem.isRestrictQuantity&&btnItem.Quantity<=0}}">已抢光</view>
                                <view class="img-info" wx:elif="{{btnItem.isStartupPanicBuying&&btnItem.PanicBuyingEndTimeBalance<=0}}">已结束</view>
@@ -354,7 +356,7 @@
                            <text class=" goods-item-title" style='width:{{item.ImageWidthWhenScrolling || 200}}px'>{{btnItem.isShowMatCode?btnItem.ShopMatCode:''}}</text>
                            <text class="goods-item-title" style='width:{{item.ImageWidthWhenScrolling || 200}}px' wx:if="{{btnItem.isShowMatName}}">{{btnItem.MatName}}</text>
                            <view class="price">
                                <text class="goods-item-price" style='width:{{item.ImageWidthWhenScrolling || 200}}px' wx:if="{{btnItem.isShowPrice}}">{{btnItem.CurrencySign}}{{btnItem.Price}}</text>
                                <text class="goods-item-price" style='width:{{item.ImageWidthWhenScrolling || 200}}px' wx:if="{{btnItem.isShowPrice}}">{{btnItem.CurrencySign}}{{btnItem.isStartupGroupBuying?btnItem.GroupBuyingPrice:btnItem.Price}}</text>
                                <text class="goods-item-costprice" style='width:{{item.ImageWidthWhenScrolling || 200}}px' wx:if="{{btnItem.isShowPrice&&btnItem.SalesPrice&&btnItem.SalesPrice!==btnItem.Price}}">{{btnItem.CurrencySign}}{{btnItem.SalesPrice}}</text>
                            </view>
                            <!-- <scroll-view wx:if="{{isStartupPanicBuying}}" class="goods-item-info" scroll-x="{{true}}">
pages/index/index.wxss
@@ -438,3 +438,8 @@
  border-radius: 40rpx;
} */
.group-tag{
  position: absolute;
  left: -2rpx;
  top: 10rpx;
}
pages/order/order.js
@@ -78,10 +78,11 @@
    console.log(getCurrentPages())
    if (!this.data.isFirstShow&&selectedCartIds) {
    if (!this.data.isFirstShow) {
      console.log('非第一次显示页面、、、', this.data.isFirstShow);
      this.getOrderData();
      this.getAddressList();
    }
@@ -142,10 +143,8 @@
  refresh(){
    console.log('电话头像授权完成');
    if (selectedCartIds){
      this.getOrderData()
    }
    this.getOrderData();
    this.getAddressList();
  },
@@ -162,13 +161,9 @@
      url: '../addressList/addressList?way=select'
    })
  },
  getOrderData(){
    wx.showLoading({
      title: '加载中',
    });
  getAddressList() {
    wx.request({
      url: utils.getUrl('/shopping/confirm.do?m=getConfirmInfo&selectedCartIds='+selectedCartIds),
      url: utils.getUrl('/shopping/confirm.do?m=getConfirmAddress'),
      header: {
        "Cookie": "JSESSIONID=" + wx.getStorageSync('sessionID')
      },
@@ -180,6 +175,53 @@
        this.setData({
          Address: res.data.Address,
          deliveryMethod: res.data.FreeList
        })
        let Address = res.data.Address;
        if (Address&&Address.TransDistance) {
          let distance = Address.TransDistance>1000?(Address.TransDistance/1000).toFixed(1)+'km': Address.TransDistance + 'm'
          this.setData({
            ['Address.TransDistance']: distance
          })
        }
      },
      fail: function (errmsg) {
        utils.requestFail(errmsg, '/shopping/confirm.do?m=getConfirmAddress');
      }
    })
  },
  getOrderData(){
    wx.showLoading({
      title: '加载中',
    });
    let url = '';
    let quantity=this.data.quantity;
    let matcode=this.data.matCode;
    let data = {};
    if (selectedCartIds){
      url = '/shopping/confirm.do?m=getConfirmInfo&selectedCartIds='+selectedCartIds
    } else{
      let skuIds = this.data.skuIds;
      url = `/shopping/confirm.do?m=getConfirmInfo&matcode=${matcode}&quantity=${quantity}`
      data={
        ...skuIds
      }
    }
    wx.request({
      url: utils.getUrl(url),
      header: {
        "Cookie": "JSESSIONID=" + wx.getStorageSync('sessionID')
      },
      data,
      success: res => {
        wx.hideLoading();
        if(!utils.requestError(res)){
          return false;
        }
        this.setData({
          // Address: res.data.Address,
          totalMoney: res.data.PayAmount,
          CartList: res.data.CartList,
          CouponList: res.data.CouponList,
@@ -191,15 +233,15 @@
          balance2: res.data.Balance,
          isAllowPayable:res.data.isAllowPayable,
          VoucherAmount:res.data.VoucherList.VoucherAmount || 0,
          deliveryMethod: res.data.FreeList
          // deliveryMethod: res.data.FreeList
        })
        let Address = res.data.Address;
        if (Address&&Address.TransDistance) {
          let distance = Address.TransDistance>1000?(Address.TransDistance/1000).toFixed(1)+'km': Address.TransDistance + 'm'
          this.setData({
            ['Address.TransDistance']: distance
          })
        }
        // let Address = res.data.Address;
        // if (Address&&Address.TransDistance) {
        //   let distance = Address.TransDistance>1000?(Address.TransDistance/1000).toFixed(1)+'km': Address.TransDistance + 'm'
        //   this.setData({
        //     ['Address.TransDistance']: distance
        //   })
        // }
        if (res.data.Balance>0){
          this.setData({
@@ -211,7 +253,10 @@
            id:0,
          })
        }
        isUsingCoupon=true;
        if (selectedCartIds){
          isUsingCoupon=true;
        }
      },
      fail: function (errmsg) {
@@ -230,7 +275,9 @@
      })
      // console.log('进入order页',deliveryMethod,this.data.isAllowSelectDeliveryMethod)
      this.getOrderData();
      this.getAddressList();
    }
    this.setData({
      RewardStatus:app.globalData.RewardStatus,
      isAllowSelectDeliveryMethod:app.globalData.isAllowSelectDeliveryMethod,
@@ -242,6 +289,8 @@
      this.setData({
        ...res
      })
      this.getOrderData();
      this.getAddressList();
    });
  },
@@ -288,20 +337,33 @@
        Balance: 0
      })
    }
    let data = {};
    if (selectedCartIds){
      data = {
        couponCode: this.data.id == -1 ? "" : this.data.CouponList[this.data.id].CouponCode,
          points: this.data.pointId == -1 ? "0" : this.data.PointsTimesList[this.data.pointId].StartPointsAmount,
          balance: this.data.Balance,
          isUsingCoupon,
          selectedCartIds
      }
    } else{
      data = {
        couponCode:'',
        points: this.data.pointId == -1 ? "0" : this.data.PointsTimesList[this.data.pointId].StartPointsAmount,
        balance: this.data.Balance,
        isUsingCoupon:false,
        quantity: this.data.quantity,
        matcode: this.data.matCode,
        ...this.data.skuIds,
      }
    }
    wx.showLoading();
    wx.request({
      url: utils.getUrl('/shopping/confirm.do?m=getConfirmInfo'),
      header: {
        "Cookie": "JSESSIONID=" + wx.getStorageSync('sessionID')
      },
      data: {
        couponCode: this.data.id == -1 ? "" : this.data.CouponList[this.data.id].CouponCode,
        points: this.data.pointId == -1 ? "0" : this.data.PointsTimesList[this.data.pointId].StartPointsAmount,
        balance: this.data.Balance,
        isUsingCoupon,
        selectedCartIds
      },
      data,
      success: res => {
        wx.hideLoading();
        if(!utils.requestError(res)){
@@ -417,20 +479,33 @@
        isSelected2: false
      })
    }
    let data = {};
    if (selectedCartIds){
      data = {
        couponCode: this.data.id == -1 ? "" : this.data.CouponList[this.data.id].CouponCode,
        points: this.data.pointId == -1 ? "0" : this.data.PointsTimesList[this.data.pointId].StartPointsAmount,
        balance: this.data.Balance,
        isUsingCoupon,
        selectedCartIds
      }
    } else{
      data = {
        couponCode:'',
        points: this.data.pointId == -1 ? "0" : this.data.PointsTimesList[this.data.pointId].StartPointsAmount,
        balance: this.data.Balance,
        isUsingCoupon:false,
        quantity: this.data.quantity,
        matcode: this.data.matCode,
        ...this.data.skuIds,
      }
    }
    wx.showLoading();
    wx.request({
      url: utils.getUrl('/shopping/confirm.do?m=getConfirmInfo'),
      header: {
        "Cookie": "JSESSIONID=" + wx.getStorageSync('sessionID')
      },
      data: {
        couponCode: this.data.id == -1 ? "" : this.data.CouponList[this.data.id].CouponCode,
        points: this.data.pointId == -1 ? "0" : this.data.PointsTimesList[this.data.pointId].StartPointsAmount,
        balance: this.data.Balance,
        isUsingCoupon,
        selectedCartIds
      },
      data,
      success: res => {
        wx.hideLoading();
        if(!utils.requestError(res)){
@@ -584,120 +659,84 @@
    //   })
    //   return false
    // }
    wx.showLoading()
    let data = {};
    let url = '';
    if (selectedCartIds){
      wx.request({
        url: utils.getUrl('/shopping/confirm.do?m=save'),
        header: {
          "Cookie": "JSESSIONID=" + wx.getStorageSync('sessionID')
        },
        // method:'POST',
        data:{
          paymentaddress: this.data.Address.paymentaddress,
          couponCode: this.data.id == -1 ? "" : this.data.CouponList[this.data.id].CouponCode,
          presenddate: event.detail.value.date,
          paymentcomment: event.detail.value.remark,
          points: this.data.pointId == -1 ? "0" : this.data.PointsTimesList[this.data.pointId].StartPointsAmount,
          balance: this.data.isChecked ? this.data.Balance : 0,
          isUsingCoupon,
          freeid:delivery.FreeId||'',
          FromOpenId:app.globalData.FromOpenId||'',
          selectedCartIds
        },
        success: res => {
          wx.hideLoading();
          if(!utils.requestError(res)){
            return false;
          }
          // utils.cartNum();
          // let weiXinPayAmount = 0
          if (res.data.weiXinPayAmount == 0){
      url = '/shopping/confirm.do?m=save';
      data = {
        paymentaddress: this.data.Address.paymentaddress,
        couponCode: this.data.id == -1 ? "" : this.data.CouponList[this.data.id].CouponCode,
        presenddate: event.detail.value.date,
        paymentcomment: event.detail.value.remark,
        points: this.data.pointId == -1 ? "0" : this.data.PointsTimesList[this.data.pointId].StartPointsAmount,
        balance: this.data.isChecked ? this.data.Balance : 0,
        isUsingCoupon,
        freeid:delivery.FreeId||'',
        FromOpenId:app.globalData.FromOpenId||'',
        selectedCartIds
      }
    } else{
      url = '/shopping/confirm.do?m=saveGroupBuyingOrder';
      data = {
        paymentaddress: this.data.Address.paymentaddress,
        couponCode: "",
        presenddate: event.detail.value.date,
        paymentcomment: event.detail.value.remark,
        points: this.data.pointId == -1 ? "0" : this.data.PointsTimesList[this.data.pointId].StartPointsAmount,
        balance: this.data.isChecked ? this.data.Balance : 0,
        isUsingCoupon:false,
        freeid:delivery.FreeId||'',
        FromOpenId:app.globalData.FromOpenId||'',
        quantity:this.data.quantity,
        matcode: this.data.matCode,
        ...this.data.skuIds,
        groupBuyingDocCode:this.data.groupCode
      }
    }
    wx.showLoading()
    wx.request({
      url: utils.getUrl(url),
      header: {
        "Cookie": "JSESSIONID=" + wx.getStorageSync('sessionID')
      },
      // method:'POST',
      data,
      success: res => {
        wx.hideLoading();
        if(!utils.requestError(res)){
          return false;
        }
        // utils.cartNum();
        // let weiXinPayAmount = 0
        if (res.data.weiXinPayAmount == 0){
          // docstatus = 0 and  isAllowPayable = 0
          wx.redirectTo({
            url: '../orderSuccess/orderSuccess?doccode='+ res.data.doccode+'&linkman='+this.data.Address.LinkName + '&isCustomer=1'+'&formid='+res.data.formid,
          })
        } else {
          if(res.data.DocStatus == 0 && res.data.isAllowPayable == 0){
            // docstatus = 0 and  isAllowPayable = 0
            wx.redirectTo({
              url: '../orderSuccess/orderSuccess?doccode='+ res.data.doccode+'&linkman='+this.data.Address.LinkName + '&isCustomer=1'+'&formid='+res.data.formid,
            })
          } else {
            if(res.data.DocStatus == 0 && res.data.isAllowPayable == 0){
              // docstatus = 0 and  isAllowPayable = 0
              wx.redirectTo({
                url: '../orderSuccess/orderSuccess?doccode='+ res.data.doccode+'&linkman='+this.data.Address.LinkName + '&isCustomer=1'+'&formid='+res.data.formid,
              })
            } else {
              wx.redirectTo({
                url: '../orderPay/orderPay?doccode=' + res.data.doccode+'&formid='+res.data.formid,
              })
            }
          }
        },
        fail: function (errmsg) {
          utils.requestFail(errmsg,'/shopping/confirm.do');
        }
      })
    }
    else{
      wx.request({
        url: utils.getUrl('/shopping/confirm.do?m=saveGroupBuyingOrder'),
        header: {
          "Cookie": "JSESSIONID=" + wx.getStorageSync('sessionID')
        },
        // method:'POST',
        data:{
          paymentaddress: this.data.Address.paymentaddress,
          // couponCode: this.data.id == -1 ? "" : this.data.CouponList[this.data.id].CouponCode,
          presenddate: event.detail.value.date,
          paymentcomment: event.detail.value.remark,
          points: this.data.pointId == -1 ? "0" : this.data.PointsTimesList[this.data.pointId].StartPointsAmount,
          balance: this.data.isChecked ? this.data.Balance : 0,
          // isUsingCoupon,
          freeid:delivery.FreeId||'',
          FromOpenId:app.globalData.FromOpenId||'',
          // selectedCartIds
          quantity:this.data.quantity,
          matcode: this.data.matCode,
          groupBuyingDocCode:this.data.groupCode
        },
        success: res => {
          wx.hideLoading();
          if(!utils.requestError(res)){
            return false;
          }
          // utils.cartNum();
          // let weiXinPayAmount = 0
          if (res.data.weiXinPayAmount == 0){
            // docstatus = 0 and  isAllowPayable = 0
            wx.redirectTo({
              url: '../orderSuccess/orderSuccess?doccode='+ res.data.doccode+'&linkman='+this.data.Address.LinkName + '&isCustomer=1'+'&formid='+res.data.formid,
              url: '../orderPay/orderPay?doccode=' + res.data.doccode+'&formid='+res.data.formid,
            })
          } else {
            if(res.data.DocStatus == 0 && res.data.isAllowPayable == 0){
              // docstatus = 0 and  isAllowPayable = 0
              wx.redirectTo({
                url: '../orderSuccess/orderSuccess?doccode='+ res.data.doccode+'&linkman='+this.data.Address.LinkName + '&isCustomer=1'+'&formid='+res.data.formid,
              })
            } else {
              wx.redirectTo({
                url: '../orderPay/orderPay?doccode=' + res.data.doccode+'&formid='+res.data.formid,
              })
            }
          }
        },
        fail: function (errmsg) {
          utils.requestFail(errmsg,'/shopping/confirm.do');
        }
      })
    }
      },
      fail: function (errmsg) {
        utils.requestFail(errmsg,'/shopping/confirm.do');
      }
    })
  },
  onDialogClose(){
pages/order/order.wxml
@@ -51,6 +51,12 @@
            <view class="item-title" wx:if="{{goods.isShowMatName}}">{{goods.MatName}}</view>
            <view class="item-title" wx:if="{{goods.isShowMatCode}}">编号:{{goods.MatCode}}</view>
            <view class="item-title" wx:if="{{goods.isShowSpecial}}">规格:{{goods.Special}}</view>
            <van-tag plain  round class="goods-tag " size="medium" color="#f23232" wx:if="{{goods.skuName1}}">
              <block wx:for="{{10}}" wx:key="key">
                {{goods['skuName'+(index+1)]}}
<!--                {{'skuName'+index+1}}-->
              </block>
            </van-tag>
            <!-- <view class="item-title">型号:{{goods.MatCode}}</view> -->
            <!-- <text class="item-costprice" wx:if="{{SalesPrice}}">{{CurrencySign}}{{SalesPrice}}</text> -->
            <view class="item-total" wx:if="{{goods.isShowPrice}}">{{goods.CurrencySign}}{{goods.Price}} {{goods.Quantity?'*':goods.Quantity}} {{goods.Quantity}}</view>
@@ -58,17 +64,17 @@
        </view>
      </block>
      <view class="goods-item" wx:if="{{goodsItem}}"  data-id="{{goodsItem.CartId}}">
        <image src="{{goodsItem.PhotoPath}}" class="item-img" />
        <view class="item">
          <view class="item-title" wx:if="{{goodsItem.isShowMatName}}">{{goodsItem.MatName}}</view>
          <view class="item-title" wx:if="{{goodsItem.isShowMatCode}}">编号:{{goodsItem.MatCode}}</view>
          <view class="item-title" wx:if="{{goodsItem.isShowSpecial}}">规格:{{goodsItem.Special}}</view>
          <!-- <view class="item-title">型号:{{goods.MatCode}}</view> -->
          <!-- <text class="item-costprice" wx:if="{{SalesPrice}}">{{CurrencySign}}{{SalesPrice}}</text> -->
          <view class="item-total" wx:if="{{goodsItem.isShowPrice}}">{{goodsItem.CurrencySign}}{{goodsItem.Price}} {{quantity?'*':quantity}} {{quantity}}</view>
        </view>
      </view>
<!--      <view class="goods-item" wx:if="{{goodsItem}}"  data-id="{{goodsItem.CartId}}">-->
<!--        <image src="{{goodsItem.PhotoPath}}" class="item-img" />-->
<!--        <view class="item">-->
<!--          <view class="item-title" wx:if="{{goodsItem.isShowMatName}}">{{goodsItem.MatName}}</view>-->
<!--          <view class="item-title" wx:if="{{goodsItem.isShowMatCode}}">编号:{{goodsItem.MatCode}}</view>-->
<!--          <view class="item-title" wx:if="{{goodsItem.isShowSpecial}}">规格:{{goodsItem.Special}}</view>-->
<!--          &lt;!&ndash; <view class="item-title">型号:{{goods.MatCode}}</view> &ndash;&gt;-->
<!--          &lt;!&ndash; <text class="item-costprice" wx:if="{{SalesPrice}}">{{CurrencySign}}{{SalesPrice}}</text> &ndash;&gt;-->
<!--          <view class="item-total" wx:if="{{goodsItem.isShowPrice}}">{{goodsItem.CurrencySign}}{{goodsItem.Price}} {{quantity?'*':quantity}} {{quantity}}</view>-->
<!--        </view>-->
<!--      </view>-->
      <!-- <picker class="order-row invoice" bindchange="bindPickerChange" name="invoice" value="{{index}}" range="{{invoice}}" range-key="name">
        <view class="order-row-left">发票信息</view>
pages/orderDetailEdit/orderDetailEdit.js
@@ -162,6 +162,31 @@
    let matcode = e.currentTarget.dataset.matcode;
    let rowid = e.currentTarget.dataset.rowid;
    let quantity = e.currentTarget.dataset.quantity;
    let index = e.currentTarget.dataset.index;
    let list = this.data.orderDetail.list;
    let skuIds = {}
    let data = {
        matcode,
        quantity,
        formid
      };
    if (list[index].skuId1){
      for (let i = 0; i < 10; i++) {
        let item = list[index]['skuId'+(i +1)];
        if (item){
          skuIds['skuId'+(i +1)] = list[index]['skuId'+(i +1)]
        } else{
          skuIds['skuId'+(i +1)] = ''
        }
      }
      console.log(skuIds);
      data = {
        matcode,
        quantity,
        formid,
        ...skuIds
      }
    }
    wx.showLoading();
    wx.request({
@@ -169,11 +194,7 @@
      header: {
        "Cookie": "JSESSIONID=" + wx.getStorageSync('sessionID')
      },
      data: {
        matcode,
        quantity,
        formid
      },
      data,
      success: res=> {
        wx.hideLoading();
        if(!utils.requestError(res)){
pages/orderDetailEdit/orderDetailEdit.wxml
@@ -59,6 +59,12 @@
          <view class="item-title" wx:if="{{item.isShowMatName}}">{{item.MatName}}</view>
          <view class="item-title" wx:if="{{item.isShowMatCode}}">编号:{{item.MatCode}}</view>
          <view class="item-title" wx:if="{{item.isShowSpecial}}">规格:{{item.Special}}</view>
          <van-tag plain  round class="goods-tag " size="medium" color="#f23232" wx:if="{{item.skuName1}}">
            <block wx:for="{{10}}" wx:for-item="sku" wx:key="key">
              {{item['skuName'+(index+1)]}}
              <!--    {{'skuName'+index+1}}-->
            </block>
          </van-tag>
          <!-- <text class="item-costprice" wx:if="{{costprice}}">{{orderDetail.Currency}}{{item.costprice}}</text> -->
          <view class="item-total" wx:if="{{item.isShowPrice}}">
            {{item.CurrencySign}}{{item.Price}}{{item.Quantity?' * '+item.Quantity:''}}</view>
@@ -139,38 +145,51 @@
    </view> -->
    <van-cell class="my-cell" color="#ff751a" title-width="400rpx" bind:tap="showDialog">
    <view class="order-group" wx:if="{{orderDetail.groupBuyingList.length>0}}">
      <van-cell class="my-cell" color="#ff751a" title-width="400rpx" bind:tap="showDialog" border="{{false}}">
      <view slot="title">
        拼单成功
        <block wx:if="{{orderDetail.GroupBuyingMembersBalance>=0}}">
          拼单成功
        </block>
        <block wx:else>
          拼单中
        </block>
      </view>
      <view>
        <van-image  round width="80rpx" height="80rpx" class="van-image"
                    src="{{Headimgurl}}"/>
      <view class="my-cell-content">
        <view wx:for="{{orderDetail.groupBuyingList}}" wx:if="{{index<2}}" class="avatar-view">
          <van-image  round width="80rpx" height="80rpx" class="van-image"
                      src="{{item.Headimgurl}}"/>
          <view class="img-mask" wx:if="{{index==1&&orderDetail.groupBuyingList.length>2}}">+{{orderDetail.groupBuyingList.length-2}}</view>
        </view>
        <text class="iconfont icon-xiayiyeqianjinchakangengduo "></text>
      </view>
    </van-cell>
    </view>
    <c-dialog-layer id="dialogLayer">
      <view slot="title" class="dialog-title">
        <van-image  round width="80rpx" height="80rpx" class="van-image"
                    src="{{Headimgurl}}"/>
        <view>key</view>
        <view>2021年1月31日15:46:25 发起拼单</view>
      <view slot="title" class="dialog-title" wx:for="{{orderDetail.groupBuyingList}}" wx:key="key" wx:if="{{item.isGroupBuyingMaster}}">
        <view class="avatar-view">
          <van-image  round width="80rpx" height="80rpx" class="van-image"
                      src="{{item.Headimgurl}}"/>
          <van-tag round color="#ffab33" class="group-tag">拼主</van-tag>
        </view>
        <view>{{item.NickName}}</view>
        <view class="van-cell-text">{{item.EnterDate}} 发起拼单</view>
      </view>
      <scroll-view scroll-y="true" style="height:{{280}}px;">
        <view class="content">
          <!--      <van-cell-group class="my-cell-group" border="{{false}}">-->
          <van-cell class="my-cell" title-width="180rpx"  center wx:for="{{groupBuyingList}}" wx:key="key"  border="{{index!==arrayList.length-1?true:false}}">
          <van-cell class="my-cell" title-width="120rpx"  center wx:for="{{orderDetail.groupBuyingList}}" wx:key="key"  wx:if="{{!item.isGroupBuyingMaster}}" border="{{index!==arrayList.length-1?true:false}}">
            <view slot="icon">
              <van-image  round width="80rpx" height="80rpx" class="van-image"
                          src="{{item.Headimgurl}}"/>
            </view>
            <view class="slot-title" slot="title">
              <view  class="van-cell-text no-wrap margin-left">{{item.NickName}}</view>
              <view  class="no-wrap margin-left">{{item.NickName}}</view>
            </view>
            <view class="font-bold flex-between">
              <view  class="van-cell-text">xxx 时间 拼单成功</view>
              <view  class="van-cell-text">{{item.EnterDate}} 拼单成功</view>
            </view>
          </van-cell>
          <!--      </van-cell-group>-->
        </view>
      </scroll-view>
    </c-dialog-layer>
pages/orderDetailEdit/orderDetailEdit.wxss
@@ -232,7 +232,7 @@
  right: 520rpx;
}
.share-btn{
  display: inline;
  font-size: 12px;
  border: 1rpx solid #1aad19;
@@ -269,7 +269,7 @@
  justify-content: flex-end;
  padding: 10rpx 0 20rpx 0;
  background-color: #fff;
}
.price-input{
  border-bottom: 1rpx solid #dbdbdb;
@@ -339,3 +339,49 @@
.dialog-title{
  text-align: center;
}
.order-group{
  margin-top: 20rpx;
  padding: 0 10rpx;
  background-color: #fff;
}
.my-cell .van-cell{
  align-items: center;
  /* padding: 0; */
}
.avatar-view{
  position: relative;
  display: inline-block;
}
.img-mask{
  top: 0;
  position: absolute;
  /*opacity: 0.3;*/
  background-color: #666666aa;
  right: 0;
  left: 0;
  border-radius: 50%;
  height: 80rpx;
  display: flex;
  align-items: center;
  color: #fff;
  justify-content: center;
}
.group-tag{
  position: absolute;
  left: -15rpx;
  top: -10rpx;
}
.slot-title{
  margin-left: 20rpx;
}
.van-cell-text{
  color: #a9a9a9;
}
.my-cell-content{
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.my-cell-content .iconfont{
  font-size: 42rpx;
}
pages/orderPay/orderPay.wxml
@@ -3,7 +3,7 @@
<import src="../template/goods-item-row/goods-item-row-template" />
<form bindsubmit="placeOrder">
<view style="padding-bottom:120rpx;">
    <view class="payway">
@@ -86,7 +86,7 @@
        {{orderDetail.StatusDesc||""}}
        <!-- <icon class="iconfont icon-lajixiang" bindtap="deleteTap" wx:if="{{orderDetail.isShowCancelButton}}"></icon> -->
      </view>
    </view>
    <view wx:for="{{orderDetail.list}}" wx:key="key">
      <!-- {{item}} -->
@@ -96,11 +96,17 @@
          <view class="item-title" wx:if="{{item.isShowMatName}}">{{item.MatName}}</view>
          <view class="item-title" wx:if="{{item.isShowMatCode}}">编号:{{item.MatCode}}</view>
          <view class="item-title" wx:if="{{item.isShowSpecial}}">规格:{{item.Special}}</view>
          <van-tag plain  round class="goods-tag " size="medium" color="#f23232" wx:if="{{item.skuName1}}">
            <block wx:for="{{10}}" wx:for-item="sku" wx:key="key">
              {{item['skuName'+(index+1)]}}
              <!--    {{'skuName'+index+1}}-->
            </block>
          </van-tag>
          <!-- <text class="item-costprice" wx:if="{{costprice}}">{{orderDetail.Currency}}{{item.costprice}}</text> -->
          <view class="item-total" wx:if="{{item.isShowPrice}}">{{item.CurrencySign}}{{item.Price}}{{item.Quantity?' * '+item.Quantity:''}}</view>
        </view>
      </view>
    </view>
@@ -117,9 +123,9 @@
        <view>
          <text>送货时间</text><view>{{orderDetail.DeliveryDate||"-"}}</view></view>
      </view>
    <view class="order-total">
      <view>
        <view>商品总额
          <text>{{orderDetail.CurrencySign}}{{orderDetail.SumTotalMoney2}}</text>
@@ -153,4 +159,4 @@
    </view>
  </view>
</form>
</form>
pages/orderlist/orderlist.js
@@ -57,7 +57,7 @@
    // }
    // conlist.push(orderList);
    // conlist.push(waitPay);
    // conlist.push(waitPay);
    // conlist.push(waitRec);
    // conlist.push(complete);
    // conlist.push(cancle);
@@ -146,7 +146,7 @@
  //   })
  // },
  goReceipt: function(e) {
    wx.showLoading();
    wx.request({
      url: utils.getUrl('/shopping/orderReceipt.do'),
@@ -166,7 +166,7 @@
            title: '收货成功',
          })
        }
      },
      fail: function(errmsg) {
        utils.requestFail(errmsg,'/shopping/orderReceipt.do');
@@ -187,16 +187,39 @@
    let rowid = e.currentTarget.dataset.rowid;
    let quantity = e.currentTarget.dataset.quantity;
    let index = e.currentTarget.dataset.index;
    let zindex = e.currentTarget.dataset.zindex;
    let list = this.data.conlist[this.data.selected][zindex].OrderDetailList;
    console.log(list);
    let skuIds = {}
    let data = {
      matcode,
      quantity,
    };
    if (list[index].skuId1){
      for (let i = 0; i < 10; i++) {
        let item = list[index]['skuId'+(i +1)];
        if (item){
          skuIds['skuId'+(i +1)] = list[index]['skuId'+(i +1)]
        } else{
          skuIds['skuId'+(i +1)] = ''
        }
      }
      console.log(skuIds);
      data = {
        matcode,
        quantity,
        ...skuIds
      }
    }
    // return;
    wx.showLoading();
    wx.request({
      url: utils.getUrl('/shopping/cart.do?m=add&action=goshop'),
      header: {
        "Cookie": "JSESSIONID=" + wx.getStorageSync('sessionID')
      },
      data: {
        matcode,
        quantity
      },
      data,
      success: res=> {
        wx.hideLoading();
        if(!utils.requestError(res)){
@@ -368,4 +391,4 @@
  // onShareAppMessage: function() {
  // }
})
})
pages/orderlist/orderlist.wxml
@@ -42,25 +42,46 @@
        <view  bindtap="goOrderDetail" data-docstatus="{{orderlist.DocStatus}}" data-ispay="{{orderlist.isAllowPayable}}"  data-doccode="{{orderlist.doccode}}" data-formid="{{orderlist.FormId}}">
          <!-- {{item}} -->
          <view class="goods-item" data-id="{{item.MatCode}}" wx:for="{{orderlist.OrderDetailList}}" wx:key="index">
            <image src="{{item.PhotoPath}}" class="item-img" />
          <view class="goods-item" data-id="{{item.MatCode}}" wx:for="{{orderlist.OrderDetailList}}" wx:for-index="listIndex" wx:key="index">
            <view>
              <image src="{{item.PhotoPath}}" class="item-img" />
            </view>
            <view class="item">
              <view class="item-title" wx:if="{{item.isShowMatName}}">{{item.MatName}}</view>
              <view class="item-title" wx:if="{{item.isShowMatCode}}">编号:{{item.MatCode}}</view>
              <view class="item-title" wx:if="{{item.isShowSpecial}}">规格:{{item.Special}}</view>
              <van-tag plain  round class="goods-tag " size="medium" color="#f23232" wx:if="{{item.skuName1}}">
                <block wx:for="{{10}}" wx:for-item="sku" wx:key="key">
                  {{item['skuName'+(index+1)]}}
                  <!--    {{'skuName'+index+1}}-->
                </block>
              </van-tag>
              <!-- <text class="item-costprice" wx:if="{{costprice}}">{{orderDetail.CurrencySign}}{{item.costprice}}</text> -->
              <view class="item-total" wx:if="{{item.isShowPrice}}">{{item.CurrencySign}}{{item.Price}}{{item.Quantity?' * '+item.Quantity:''}}</view>
              <text class="buy-again" data-matCode="{{item.MatCode}}" data-rowid="{{item.RowId}}" data-quantity="{{item.Quantity}}" data-index="{{index}}" catchtap="buyAgain">再次购买</text>
              <text class="buy-again" data-matCode="{{item.MatCode}}" data-rowid="{{item.RowId}}" data-quantity="{{item.Quantity}}" data-index="{{listIndex}}" data-zindex="{{index}}" catchtap="buyAgain">再次购买</text>
            </view>
          </view>
        </view>
        <view class="order-info">
          <view class="pay-txt">
            共
            <text class="shop-num">{{orderlist.TotalQuantity}}</text>件商品
            <text class="true-payed">实付款:</text>
            <text class="pay-num">¥{{orderlist.PayableAmount}}</text>
          <view class="">
            <view class="pay-txt order-desc">
              <view class="group-mark" wx:if="{{orderlist.GroupBuyingDocCode}}">
                {{orderlist.DocType}}
<!--                <block wx:if="{{orderlist.GroupBuyingMembersBalance>=0}}">-->
<!--                  拼单成功-->
<!--                </block>-->
<!--                <block wx:else>-->
<!--                  拼单中-->
<!--                </block>-->
              </view>
              <view>
                共
                <text class="shop-num">{{orderlist.TotalQuantity}}</text>件商品
                <text class="true-payed">实付款:</text>
                <text class="pay-num">¥{{orderlist.PayableAmount}}</text>
              </view>
            </view>
          </view>
          <view class="order-info-btn">
            <!-- <text bindtap="deleteTap" data-doccode="{{orderlist.doccode}}">删除订单</text> -->
pages/orderlist/orderlist.wxss
@@ -122,4 +122,12 @@
}
.item {
  line-height: 42rpx;
}
}
.order-desc{
  display: flex;
  justify-content: space-between;
}
.group-mark{
  color: #f23232;
}
pages/refund/refund.js
@@ -10,6 +10,8 @@
var rowid = "";
var mIndex = "";
let formid = '';
let reasonid = '';
let hdmemo = '';
Page({
@@ -108,9 +110,9 @@
  // 提交按钮
  submitForm:function(e){
    let reasonid = this.data.index;
    reasonid = this.data.index;
    // let reasonid = e.detail.value.why;
    let hdmemo = this.data.explain;
    hdmemo = this.data.explain || '';
    var that = this;
    var imageList = this.data.imageList;
@@ -124,7 +126,7 @@
      utils.subscribeMessage({
        ids:[orderTemplateId.returnsNoticeTemplateId],
        callback:()=>{
          this.refundRequest();
        }
      })
@@ -193,7 +195,7 @@
    // })
    console.log(options);
    wx.request({
      url: utils.getUrl('/shopping/pay/getReturnReasonList.do'),
pages/template/goods-item/goods-item-template.wxml
@@ -4,13 +4,13 @@
      <image class="goods-item-img border-radius" mode="aspectFill" src="{{PhotoPath}}"></image>
      <view class="img-info" wx:if="{{isRestrictQuantity&&Quantity<=0}}">已抢光</view>
      <view class="img-info" wx:elif="{{isStartupPanicBuying&&PanicBuyingEndTimeBalance<=0}}">已结束</view>
      <van-tag wx:if="{{isStartupGroupBuying&&GroupBuyingEndTimeBalance>0}}" mark type="danger" class="group-tag">团购中</van-tag>
    </view>
    <text class="goods-item-title">{{isShowMatCode?ShopMatCode:''}}</text>
    <text class="goods-item-title" wx:if="{{isShowMatName}}">{{MatName}}</text>
    <view class="price">
      <text class="goods-item-price" wx:if="{{isShowPrice}}">{{CurrencySign}}{{Price}}</text>
      <text class="goods-item-price" wx:if="{{isShowPrice}}">{{CurrencySign}}{{isStartupGroupBuying?GroupBuyingPrice:Price}}</text>
      <text class="goods-item-costprice" wx:if="{{isShowPrice&&Price&&Price!=SalesPrice&&SalesPrice!=0}}">{{CurrencySign}}{{SalesPrice}}</text>
    </view>
    <!-- <scroll-view wx:if="{{isStartupPanicBuying}}" class="goods-item-info" scroll-x="{{true}}">
pages/template/goods-item/goods-item-template.wxss
@@ -30,8 +30,8 @@
  font-weight: bold;
}
 .price{
  padding: 0 10rpx 5rpx;
}
  padding: 0 10rpx 5rpx;
}
.goods-item-price {
  margin-bottom: 16rpx;
  font-size: 27rpx;
@@ -70,4 +70,9 @@
}
.info-text{
  color:#ff0000;
}
}
.group-tag {
  position: absolute;
  left: -2rpx;
  top: 10rpx;
}
project.config.json
@@ -23,6 +23,7 @@
    "compileHotReLoad": false,
    "useMultiFrameRuntime": true,
    "useApiHook": true,
    "useApiHostProcess": false,
    "babelSetting": {
      "ignore": [],
      "disablePlugins": [],
@@ -36,8 +37,7 @@
    "userConfirmedBundleSwitch": false,
    "packNpmManually": false,
    "packNpmRelationList": [],
    "minifyWXSS": true,
    "useApiHostProcess": true
    "minifyWXSS": true
  },
  "compileType": "miniprogram",
  "libVersion": "2.15.0",
@@ -119,10 +119,9 @@
          "scene": null
        },
        {
          "id": 9,
          "name": "订单详情",
          "pathName": "pages/orderDetailEdit/orderDetailEdit",
          "query": "doccode=WXD200402001",
          "query": "doccode=WXD201126003",
          "scene": null
        },
        {