index.wxml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <block wx:if="{{ bindMobileStatus == 2 }}">
  2. <view class="login-box">
  3. <image class="logo" src="/images/wx.jpg" mode="widthFix"></image>
  4. <view class="line"></view>
  5. <view class="title">申请获取以下权限</view>
  6. <view class="profile">授权绑定手机号码</view>
  7. <view class="btn">
  8. <van-button type="primary" block round open-type="getPhoneNumber" bind:getphonenumber="getPhoneNumber">绑定手机号码</van-button>
  9. </view>
  10. </view>
  11. </block>
  12. <block wx:if="{{ bindMobileStatus == 1 }}">
  13. <van-card
  14. wx:for="{{goodsList}}" wx:key="index"
  15. num="{{item.number}}"
  16. price="{{item.price}}"
  17. title="{{item.name}}"
  18. thumb="{{ item.pic }}"
  19. centered
  20. >
  21. <view slot="desc">
  22. {{item.label}}
  23. <block wx:for="{{item.sku}}" wx:for-item="option" wx:key="index">
  24. {{option.optionName}}:{{option.optionValueName}}
  25. </block>
  26. <block wx:for="{{item.additions}}" wx:for-item="option" wx:key="index">
  27. {{option.pname}}:{{option.name}}
  28. </block>
  29. </view>
  30. </van-card>
  31. <view class="container-box cell-group">
  32. <view class="peisong-way">
  33. <view class="row-box" wx:if="{{isNeedLogistics > 0}}">
  34. <view class="row-label">配送方式</view>
  35. <radio-group bindchange="radioChange">
  36. <label class="radio">
  37. <radio value="kd" checked="{{peisongType == 'kd'}}" /> 快递
  38. </label>
  39. <label class="radio">
  40. <radio value="zq" checked="{{peisongType == 'zq'}}" /> 到店自取
  41. </label>
  42. </radio-group>
  43. </view>
  44. <picker wx:if="{{peisongType == 'zq' && shops}}" bindchange="shopSelect" value="{{shopIndex}}" range="{{shops}}" range-key="name">
  45. <van-cell title="选择自提门店" value="{{shopIndex == -1 ? '请选择':shops[shopIndex].name}}" required is-link />
  46. </picker>
  47. <van-cell wx:if="{{peisongType == 'zq' && shopIndex != -1}}" title="电话" value="{{shops[shopIndex].linkPhone}}" is-link bind:click="callMobile" />
  48. <van-cell wx:if="{{peisongType == 'zq' && shopIndex != -1}}" title="地址" title-width="64rpx" value="{{shops[shopIndex].address}}" is-link bind:click="goMap" />
  49. <view class="address-box" wx:if="{{peisongType == 'kd' && isNeedLogistics > 0}}">
  50. <van-cell wx:if="{{!curAddressData}}" icon="add-o" title="新增收货地址" is-link bind:click="addAddress" />
  51. <view class="show-address" hidden="{{!curAddressData}}" bindtap="selectAddress">
  52. <view class="l">
  53. <view class="name-tel">{{curAddressData.linkMan}} {{curAddressData.mobile}}</view>
  54. <view class="addr-text">{{curAddressData.address}}</view>
  55. </view>
  56. <view class="r">
  57. <image class="next" src="/images/icon/next.png"></image>
  58. </view>
  59. </view>
  60. </view>
  61. <van-field
  62. wx:if="{{peisongType == 'zq'}}"
  63. size="large"
  64. model:value="{{ name }}"
  65. label="联系人"
  66. focus
  67. clearable
  68. required
  69. placeholder="请输入联系人"
  70. />
  71. <van-field
  72. wx:if="{{peisongType == 'zq'}}"
  73. size="large"
  74. model:value="{{ mobile }}"
  75. label="联系电话"
  76. type="number"
  77. clearable
  78. required
  79. placeholder="请输入手机号码">
  80. <van-button slot="button" size="small" type="danger" open-type="getPhoneNumber" bind:getphonenumber="getPhoneNumber">自动获取</van-button>
  81. </van-field>
  82. <view class="row-box">
  83. <view class="row-label">备注</view>
  84. <view class="right-text">
  85. <input bindinput="remarkChange" type="text" class="liuyan" placeholder="如需备注请输入" />
  86. </view>
  87. </view>
  88. </view>
  89. <view class="peisong-way" hidden="{{hasNoCoupons}}">
  90. <view class="row-box" style="border-bottom:none;">
  91. <view class="row-label t">使用优惠券</view>
  92. </view>
  93. <picker bindchange="bindChangeCoupon" range="{{coupons}}" range-key="nameExt">
  94. <view class="row-box" style="border-bottom:none;">
  95. <view class="row-label">{{curCouponShowText}}</view>
  96. <image class="next" src="/images/icon/next.png"></image>
  97. </view>
  98. </picker>
  99. </view>
  100. </view>
  101. <!-- 选择积分抵扣 -->
  102. <van-radio-group wx:if="{{ scoreDeductionRules && scoreDeductionRules.length > 0 }}" value="{{ deductionScore }}" bind:change="deductionScoreChange">
  103. <van-cell-group title="积分抵扣">
  104. <van-cell title="不使用积分" clickable data-name="0" bind:click="deductionScoreClick">
  105. <van-radio slot="right-icon" name="0" />
  106. </van-cell>
  107. <van-cell wx:for="{{scoreDeductionRules}}" wx:key="id" title="使用{{ item.score }}积分抵扣¥{{ item.money }}" clickable data-name="{{ item.score }}" bind:click="deductionScoreClick">
  108. <van-radio slot="right-icon" name="{{ item.score }}" />
  109. </van-cell>
  110. </van-cell-group>
  111. </van-radio-group>
  112. <van-cell-group title="小计">
  113. <van-cell wx:if="{{ yunPrice }}" title="运费" value="¥{{yunPrice}}" />
  114. <van-cell wx:if="{{deductionMoney}}" title="积分抵扣" value="-¥{{deductionMoney}}" />
  115. <van-cell wx:if="{{couponAmount}}" title="优惠金额" value="-¥{{couponAmount}}" />
  116. <van-cell wx:if="{{balance}}" title="账户余额" value="¥{{balance}}" />
  117. </van-cell-group>
  118. <view class="bottom-box"></view>
  119. <van-submit-bar
  120. price="{{ allGoodsAndYunPrice*100 }}"
  121. suffix-label="+{{totalScoreToPay}} 积分"
  122. button-text="提交订单"
  123. bind:submit="goCreateOrder"
  124. />
  125. </block>