order-submit.vue 50 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198
  1. <template>
  2. <app-layout>
  3. <view class="safe-area-inset-bottom">
  4. <!-- 地址、商户、配送、商品、优惠、费用信息 -->
  5. <view class="page" v-if="previewData">
  6. <view v-if="!previewData.hasCity && previewData.show_address !== false && previewData.hasRecipient" class="group">
  7. <app-address-bar :address="previewData.address" :has-ziti="previewData.has_ziti" :all-ziti="previewData.allZiti" @address-input="handleAddressInput"></app-address-bar>
  8. </view>
  9. <template v-for="(mch, mchIndex) in previewData.mch_list">
  10. <view v-if="previewData.hasCity && mchIndex === 0" class="group">
  11. <app-address-bar :address="mch.city.error ? null : mch.address" :has-city="true" :city="mch.city"></app-address-bar>
  12. </view>
  13. <view v-if="previewData.hasCity && mchIndex === 1" class="group">
  14. <app-address-bar :address="previewData.address" :has-ziti="previewData.has_ziti" :all-ziti="previewData.allZiti" :city="mch.city"></app-address-bar>
  15. </view>
  16. <view :key="mchIndex" class="group">
  17. <!-- 循环商户列表start -->
  18. <view style="padding: 26rpx 32rpx;">
  19. <view class="dir-left-nowrap cross-center" style="padding: 10rpx 0;">
  20. <!-- 商户名start -->
  21. <view class="box-grow-0">
  22. <image src="/static/image/icon/store-black.png" class="title-icon mr-12"></image>
  23. </view>
  24. <view class="box-grow-1 font-bold ellipsis-1">{{mch.mch.name}}</view>
  25. <view v-if="mch.mch.id > 0 && mch.delivery.send_type == 'offline' && mch.store && mch.store.distance != '-m'" class="box-grow-0 dir-left-nowrap cross-center">
  26. <image src="/static/image/icon/location.png" class="mr-12" style="display: block; width: 22rpx;height: 26rpx;"></image>
  27. <view>距您{{mch.store.distance}}</view>
  28. </view>
  29. </view><!-- 商户名end -->
  30. <template v-if="mch.delivery.send_type == 'offline'">
  31. <!-- 自提门店信息start -->
  32. <view v-if="mch.no_store && mch.no_store === true" :class="[themeTextClass]" style="padding: 10rpx 0;">暂无门店,请选择其他配送方式
  33. </view>
  34. <template v-else>
  35. <template v-if="mch.store">
  36. <view v-if="mch.mch.id == 0" class="dir-left-nowrap" style="padding: 10rpx 0;">
  37. <view @click="navigateStore(mchIndex)" class="box-grow-1 dir-left-nowrap cross-center">
  38. <view>
  39. <image src="/static/image/icon/navigation-black.png" class="title-icon mr-12"></image>
  40. </view>
  41. <view class="font-bold ellipsis-1 mr-12">
  42. {{mch.store.name}}
  43. </view>
  44. <view class="mr-12">
  45. <image src="/static/image/icon/right.png" class="mr-12" style="width: 12rpx; height: 22rpx;"></image>
  46. </view>
  47. </view>
  48. <view v-if="mch.store.distance != '-m' || getLocationFail" class="box-grow-0 dir-left-nowrap cross-center">
  49. <view>
  50. <image src="/static/image/icon/location.png" class="mr-12" style="display: block; width: 22rpx;height: 26rpx;"></image>
  51. </view>
  52. <view v-if="getLocationFail" @click.stop="openLocationSetting" :class="[`${theme}-color`, `${theme}-border`,]">获取位置
  53. </view>
  54. <view v-else-if="mch.store.distance != '-m'">距您{{mch.store.distance}}</view>
  55. </view>
  56. </view>
  57. <view style="padding: 10rpx 0;">
  58. <view class="font-gray ellipsis-2" style="line-height: 30rpx; max-height: 60rpx;">
  59. {{mch.store.address}}
  60. </view>
  61. </view>
  62. </template>
  63. <view v-else class="dir-left-nowrap cross-center" @click="navigateStore(mchIndex)" style="padding: 10rpx 0;">
  64. <view class="box-grow-1 dir-left-nowrap">
  65. <image src="/static/image/icon/navigation-black.png" class="title-icon mr-12"></image>
  66. <view class="mr-12 font-bold">选择门店</view>
  67. </view>
  68. <view class="box-grow-0 dir-left-nowrap cross-center">
  69. <view class="mr-12 font-gray">请选择门店</view>
  70. <image src="/static/image/icon/arrow-right.png" class="mr-12" style="width: 12rpx; height: 22rpx;"></image>
  71. </view>
  72. </view>
  73. </template>
  74. </template><!-- 自提门店信息end -->
  75. </view>
  76. <view class="line"></view>
  77. <view v-if="mch.show_delivery !== false" style="padding: 18rpx 32rpx;">
  78. <!-- 选择配送方式start -->
  79. <view class="dir-left-nowrap cross-center" style="padding: 18rpx 0;">
  80. <view class="box-grow-0">
  81. <image src="/static/image/icon/delivery.png" class="title-icon mr-12"></image>
  82. </view>
  83. <view class="box-grow-1 font-bold">配送方式</view>
  84. </view>
  85. <view class="dir-left-nowrap" style="padding: 18rpx 0;">
  86. <view v-for="(sendType, sendTypeIndex) in mch.delivery.send_type_list" :key="sendTypeIndex" class="send-type" :class="sendType.value == mch.delivery.send_type && userTheme ? `${theme}-background theme-color` : sendType.value == mch.delivery.send_type && !userTheme ? theme + '-m-back theme-color ' + theme : 'app-light-gray-back' " @click="changeSendType(mchIndex,sendType.value)">
  87. {{sendType.name}}
  88. </view>
  89. </view>
  90. </view><!-- 选择配送方式end -->
  91. <template v-if="mch.delivery.send_type == 'city' && mch.city">
  92. <!-- 同城配送信息start -->
  93. <view class="line"></view>
  94. <view v-if="mch.city.error" class="dir-left-nowrap cross-center" style="padding: 36rpx 32rpx;">
  95. <view class="box-grow-1">{{mch.city.error}}</view>
  96. <view class="box-grow-0 dir-left-nowrap delivery-coverage-btn" @click="jump(mchIndex)" style="margin: -12rpx 0;">查看配送范围
  97. </view>
  98. </view>
  99. <view v-else style="padding: 36rpx 32rpx;">
  100. <view style="padding: 10rpx 0;">发货地址:{{mch.city.address}}</view>
  101. <view class="dir-left-nowrap cross-center" style="padding: 10rpx 0;">
  102. <view class="box-grow-1">
  103. <view v-if="mch.city.explain">{{mch.city.explain}}</view>
  104. </view>
  105. <view class="box-grow-0 dir-left-nowrap delivery-coverage-btn" @click="jump(mchIndex)">查看配送范围
  106. </view>
  107. </view>
  108. </view>
  109. </template><!-- 同城配送信息end -->
  110. <view class="line"></view>
  111. <view v-if="!mch.pick_up_enable" style="height: 80rpx;line-height: 80rpx; background: #fff4f3;padding: 0 24rpx;">
  112. <view>以下商品满{{mch.pick_up_price}}元起送</view>
  113. </view>
  114. <app-submit-goods :theme="theme" v-on:updateList="updateList" :index="mchIndex" :plugin="plugin" :list="mch"></app-submit-goods>
  115. <view class="line"></view>
  116. <template v-if="(mch.coupon && mch.coupon.enabled) ||
  117. (mch.member_discount > 0 || mch.member_discount < 0) ||
  118. (mch.integral && mch.integral.can_use) ||
  119. mch.temp_vip_discount ||
  120. (mch.insert_rows && mch.insert_rows.length) ||
  121. (mch.full_reduce_discount > 0 || mch.full_reduce_discount < 0)">
  122. <view style="padding: 20rpx 32rpx;">
  123. <template v-if="mch.coupon && mch.coupon.enabled">
  124. <view @click="showCouponPicker(mchIndex)" style="padding: 16rpx 0;">
  125. <view class="dir-left-nowrap cross-center">
  126. <view class="box-grow-1">优惠券</view>
  127. <view class="box-grow-0 mr-12" v-if="mch.coupon.use" :class="[themeTextClass]">
  128. -¥{{mch.coupon.coupon_discount}}
  129. </view>
  130. <view class="box-grow-0 mr-12 font-gray" v-else-if="noCouponStatus(mchIndex)">
  131. 暂无优惠券可用
  132. </view>
  133. <view class="box-grow-0 mr-12 font-gray" v-else>选择优惠券</view>
  134. <view class="box-grow-0">
  135. <image src="/static/image/icon/arrow-right.png" style="width: 12rpx; height: 22rpx; margin-bottom: -2rpx;"></image>
  136. </view>
  137. </view>
  138. </view>
  139. <app-bottom-modal :visible.sync="mch.showCouponPicker" title="优惠券">
  140. <app-coupon-pick :plugin="plugin" :mch-index="mchIndex" @change="loadPreviewData" :no-coupons.sync="mch.noCoupons" :theme="theme"></app-coupon-pick>
  141. </app-bottom-modal>
  142. </template>
  143. <view v-if="mch.member_discount > 0 || mch.member_discount < 0" class="dir-left-nowrap" style="padding: 16rpx 0;">
  144. <view class="box-grow-1">会员价总优惠</view>
  145. <view class="box-grow-0" :class="[themeTextClass]">
  146. <template v-if="mch.member_discount>0">-¥{{mch.member_discount}}</template>
  147. <template v-else-if="mch.member_discount<0">+¥{{0-mch.member_discount}}</template>
  148. <template v-else>¥0.00</template>
  149. </view>
  150. </view>
  151. <view v-if="mch.full_reduce_discount > 0 || mch.full_reduce_discount < 0" class="dir-left-nowrap" style="padding: 16rpx 0;">
  152. <view class="box-grow-1">满减总优惠</view>
  153. <view class="box-grow-0" :class="[themeTextClass]">
  154. <template v-if="mch.full_reduce_discount>0">-¥{{mch.full_reduce_discount}}</template>
  155. <template v-else-if="mch.full_reduce_discount<0">+¥{{0-mch.full_reduce_discount}}</template>
  156. </view>
  157. </view>
  158. <view v-if="mch.integral && mch.integral.can_use" class="dir-left-nowrap" style="padding: 16rpx 0;">
  159. <view class="box-grow-1 dir-left-nowrap cross-center">
  160. 积分抵扣(使用 {{mch.integral.use_num}}积分)
  161. <image @click="showIntegralTip" style="width: 36rpx;height: 36rpx; margin: -12rpx 0;" src="/static/image/icon/warning.png"></image>
  162. </view>
  163. <view class="box-grow-0 dir-left-nowrap cross-center">
  164. <view class="mr-12" :class="[themeTextClass]">
  165. -¥{{mch.integral.deduction_price}}
  166. </view>
  167. <view style="margin: -6rpx 0">
  168. <app-submit-checkbox round :theme="theme" :value="mch.integral.use" border-color="#999999" @input="changeIntegral(mchIndex)"></app-submit-checkbox>
  169. </view>
  170. </view>
  171. </view>
  172. <view v-if="mch.temp_vip_discount" style="padding: 16rpx 0;">
  173. <view :style="{
  174. backgroundImage: `url(${appImg.order_submit.svip_bg})`,
  175. }" class="svip dir-left-nowrap cross-center">
  176. <view class="box-grow-1">
  177. <view v-if="mch.vip_card_detail">SVIP用户,本单优惠
  178. <text style="color: #ff4544;">{{mch.temp_vip_discount}}</text>
  179. </view>
  180. <template v-else>
  181. <view style="margin-bottom: 10rpx;">现在开卡,本单立减
  182. <text style="color: #ff4544;">{{mch.temp_vip_discount}}
  183. </text>
  184. </view>
  185. <view @click="navigateVipCardPrivilege" class="dir-left-nowrap cross-center">
  186. <view style="margin-right: 10rpx; font-size: 22rpx;">查看权益</view>
  187. <image src="/static/image/icon/order-submit/arrow-right-b.png" style="width: 12rpx;height: 22rpx; display: block;"></image>
  188. </view>
  189. </template>
  190. </view>
  191. <view class="box-grow-0 dir-left-nowrap cross-center" style="padding: 12rpx 22rpx 12rpx 0;" @click="navigateSvip(mchIndex)">
  192. <view class="vip-card-name" style="margin-right: 10rpx; line-height: 1.05;">
  193. <template v-if="mch.vip_card_detail">{{mch.vip_card_detail.name}}</template>
  194. <template v-else>请选择</template>
  195. </view>
  196. <image src="/static/image/icon/order-submit/arrow-right-a.png" style="width: 12rpx;height: 22rpx; display: block;"></image>
  197. </view>
  198. </view>
  199. </view>
  200. <view v-if="mch.insert_rows && mch.insert_rows.length" :class="[mch.showInsertRows?'show':'',]">
  201. <view class="dir-left-nowrap cross-center" @click="reversalShowInsertRows(mchIndex)" style="padding: 16rpx 0;">
  202. <view class="box-grow-1 dir-left-nowrap cross-center">
  203. <view class="mr-12">活动优惠</view>
  204. <image style="width: 22rpx; height: 12rpx;" class="bottom-icon" src="/static/image/icon/bottom.png"></image>
  205. </view>
  206. <view class="box-grow-0" :class="[themeTextClass]">
  207. {{mch.insert_total_discount}}
  208. </view>
  209. </view>
  210. <view class="insert-rows">
  211. <view class="font-small more-discount-info">
  212. <view v-for="(insertRow, insertRowIndex) in mch.insert_rows" :key="insertRowIndex" class="row dir-left-nowrap no-px">
  213. <view class="box-grow-1" style="color: #999;">{{insertRow.title}}</view>
  214. <view class="box-grow-0" :class="[themeTextClass]">
  215. {{insertRow.value}}
  216. </view>
  217. </view>
  218. </view>
  219. </view>
  220. </view>
  221. </view>
  222. <view class="line"></view>
  223. </template>
  224. <template v-if="mch.show_express_price !== false">
  225. <!-- 运费信息start -->
  226. <view class="dir-left-nowrap cross-center" style="height: 84rpx; padding: 0 32rpx;">
  227. <view class="box-grow-1">运费</view>
  228. <view class="box-grow-0" :class="[themeTextClass]" style="text-align: right;">
  229. <template v-if="mch.express_price_origin && mch.express_price_desc">
  230. <view :class="theme + '-m-text ' + theme">¥{{mch.express_price_origin}}</view>
  231. <view class="express-price-desc" :class="theme + '-m-text ' + theme">{{mch.express_price_desc}}
  232. </view>
  233. </template>
  234. <template v-else>¥{{mch.express_price}}</template>
  235. </view>
  236. </view>
  237. </template><!-- 运费信息end -->
  238. <template v-if="
  239. !(mch.order_form && mch.order_form.status == '1')
  240. && mch.show_remark !== false
  241. && mch.has_goods_form !== true">
  242. <view class="line"></view>
  243. <view class="row" style="padding-top: 0;padding-bottom: 0;">
  244. <app-input @input="inputRemark(mchIndex)" v-model="mch.remark" placeholder="买家留言" padding-left="0" height="100"></app-input>
  245. </view>
  246. </template>
  247. <view class="line"></view>
  248. <view class="dir-right-nowrap cross-center" style="height: 84rpx; padding: 0 32rpx;">
  249. <view class="box-grow-0 dir-left-nowrap">
  250. <view>小计:</view>
  251. <view :class="[themeTextClass]">¥{{mch.total_price}}</view>
  252. </view>
  253. <view class="box-grow-0 font-gray mr-12">共{{mch.goods_count}}件</view>
  254. </view>
  255. </view><!-- 循环商户列表end -->
  256. </template>
  257. <view v-for="(mch, mchIndex) in previewData.mch_list" :key="mchIndex">
  258. <view v-if="mch.order_form && mch.order_form.status == '1'" class="group">
  259. <view style="padding: 0 12rpx">
  260. <app-diy-form :title="mch.order_form.name" :list="mch.order_form.value" @input="handleOrderFormInput" @validate="handleOrderFormValidate" :sign="mchIndex" label-position="top" :show-scroll-btn="mch.order_form.show_scroll"></app-diy-form>
  261. </view>
  262. </view>
  263. <template v-if="mch.has_goods_form">
  264. <view v-for="(goodsItem, goodsIndex) in mch.goods_list" :key="goodsIndex" v-if="goodsItem.form && !goodsItem.form.same_form" class="group goods-form">
  265. <view style="padding: 36rpx 32rpx;" class="font-bold">{{goodsItem.form.name}}</view>
  266. <view class="line"></view>
  267. <view class="row goods-list" v-if="mch.diff_goods_form_count !== 1 || previewData.mch_list.length > 1">
  268. <view v-for="(subGoodsItem, subGoodsIndex) in mch.goods_list" :key="subGoodsIndex" v-if="subGoodsItem.form && subGoodsItem.form.id == goodsItem.form.id" class="dir-left-nowrap goods-item">
  269. <view class="box-grow-0">
  270. <image class="goods-image" :src="subGoodsItem.goods_attr.pic_url ? subGoodsItem.goods_attr.pic_url : subGoodsItem.cover_pic"></image>
  271. </view>
  272. <view class="box-grow-1">
  273. <view class="goods-name ellipsis-2">
  274. {{subGoodsItem.name}}
  275. </view>
  276. <view class="dir-left-wrap">
  277. <view v-for="(attrItem,attrIndex) in subGoodsItem.attr_list" :key="attrIndex" class="mr-12 font-gray font-small">
  278. {{attrItem.attr_group_name}}:{{attrItem.attr_name}}
  279. </view>
  280. </view>
  281. <view class="dir-left-nowrap">
  282. <view class="box-grow-1 font-gray font-small">×{{subGoodsItem.num}}</view>
  283. <view class="box-grow-0">
  284. <view class="font-small" style="text-align: right" :class="theme + '-m-text ' + theme">
  285. <text v-for="(customCurrency,customCurrencyIndex) in subGoodsItem.custom_currency" :key="customCurrencyIndex">
  286. {{customCurrency}}+
  287. </text>
  288. ¥{{subGoodsItem.total_original_price}}
  289. </view>
  290. <view v-for="(discount,discountIndex) in subGoodsItem.discounts" :key="discountIndex" style="text-align: right" :class="theme + '-m-text ' + theme">
  291. {{discount.name}}: {{discount.value}}
  292. </view>
  293. </view>
  294. </view>
  295. </view>
  296. </view>
  297. </view>
  298. <view style="padding: 0 12rpx">
  299. <app-diy-form :showRequiredIcon="true" :list="goodsItem.form.value" @input="handleGoodsFormInput" @validate="handleGoodsFormValidate" label-position="top" :label-fs28="true" :sign="`${mchIndex},${goodsIndex},${goodsItem.form.id}`"></app-diy-form>
  300. </view>
  301. </view>
  302. </template>
  303. </view>
  304. </view>
  305. </view>
  306. <!-- 结算底栏 -->
  307. <view class="submit-bar dir-left-nowrap safe-area-inset-bottom" v-if="previewData">
  308. <view class="box-grow-1 cross-center u-submit-bar-height">
  309. <view class="price-info">
  310. <view :class="[themeTextClass]" style="font-size: 26rpx;">
  311. {{totalTitle}}:
  312. <text v-for="(custom_currency, ccIndex) in previewData.custom_currency_all" :key="ccIndex">
  313. {{custom_currency}}+
  314. </text>
  315. <template v-if="previewData.vip_card_discount_total_price">
  316. ¥{{previewData.vip_card_discount_total_price}}
  317. </template>
  318. <template v-else>¥{{previewData.total_price}}</template>
  319. </view>
  320. <view v-if="previewData.vip_card_price > 0" :class="[themeTextClass]" style="font-size: 20rpx;">包含SVIP费用:
  321. ¥{{previewData.vip_card_price}}
  322. </view>
  323. </view>
  324. </view>
  325. <template v-if="previewData.address_enable && previewData.price_enable">
  326. <view @click="subscribe" class="submit-btn u-submit-bar-height box-grow-0 main-center cross-center" :class="[ submitLock? ' lock' : '', themeBgClass]">
  327. <view style="background-color: transparent;color:#ffffff; text-align: center;">提交</view>
  328. </view>
  329. </template>
  330. <template v-else>
  331. <view class="submit-btn u-submit-bar-height box-grow-0 main-center cross-center disabled" :class="[themeBgClass]">
  332. <view style="background-color: transparent;color: #ffffff; text-align: center;">提交</view>
  333. </view>
  334. </template>
  335. </view>
  336. <app-close v-if="showClose && mchList.length > 0" :toBack="true" :mch_list="mchList" @update="getMall"></app-close>
  337. </app-layout>
  338. </template>
  339. <script>
  340. import { mapGetters, mapState } from 'vuex';
  341. import AppDiyForm from "../../components/page-component/app-diy-form/app-diy-form";
  342. import appSubmitGoods from './app-submit-goods.vue';
  343. import AppCouponPick from "./app-coupon-pick";
  344. import AppBottomModal from "./app-bottom-modal";
  345. import AppAddressBar from "./app-address-bar";
  346. import AppSubmitCheckbox from "./app-submit-checkbox";
  347. import AppClose from '../../components/basic-component/app-close/app-close.vue';
  348. export default {
  349. name: 'order-submit',
  350. components: {
  351. AppSubmitCheckbox,
  352. AppAddressBar,
  353. AppBottomModal,
  354. AppCouponPick,
  355. AppDiyForm,
  356. appSubmitGoods,
  357. AppClose
  358. },
  359. data() {
  360. return {
  361. totalTitle: '合计',
  362. check: false,
  363. previewData: {
  364. mch_list: [],
  365. total_price: 0,
  366. vip_card_discount_total_price: null,
  367. custom_currency_all: []
  368. },
  369. getLocationFail: false,
  370. previewUrl: null,
  371. submitUrl: null,
  372. plugin: null,
  373. orderPageUrl: null,
  374. submitLock: false,
  375. getPayDataTimer: null,
  376. userTheme: null,
  377. payDataUrl: null,
  378. showPayResult: true,
  379. payCancelUrl: null,
  380. loadingPreviewData: true,
  381. showClose: false,
  382. is_open: false,
  383. mchList: '',
  384. };
  385. },
  386. mounted(){
  387. setTimeout(()=>{
  388. console.log(393)
  389. console.log(this.previewData.mch_list)
  390. },2000)
  391. },
  392. computed: {
  393. ...mapState({
  394. appImg: state => state.mallConfig.__wxapp_img,
  395. }),
  396. theme() {
  397. return this.userTheme ? this.userTheme : this.getTheme;
  398. },
  399. ...mapGetters('mallConfig', {
  400. getTheme: 'getTheme',
  401. }),
  402. themeBgClass() {
  403. if (this.theme.indexOf('gift') >= 0) {
  404. return `${this.theme} ${this.theme}-background`;
  405. } else {
  406. return `${this.theme} ${this.theme}-m-back`;
  407. }
  408. },
  409. themeTextClass() {
  410. if (this.theme.indexOf('gift') >= 0) {
  411. return `${this.theme} ${this.theme}-color`;
  412. } else {
  413. return `${this.theme} ${this.theme}-m-text`;
  414. }
  415. },
  416. },
  417. onLoad(options) {
  418. let mchList = JSON.parse(options.mch_list);
  419. console.log(416)
  420. console.log(mchList)
  421. let list = [];
  422. for(let item of mchList) {
  423. if(item.mch_id > 0) {
  424. list.push(item.mch_id)
  425. }
  426. }
  427. console.log(list)
  428. this.mchList = JSON.stringify(list);
  429. if (this.submitLock) return;
  430. this.setFormData(options);
  431. this.$event.on(this.$const.EVENT_USER_LOGIN).then(() => {
  432. this.loadPreviewData();
  433. });
  434. },
  435. onShow() {
  436. this.showClose = false;
  437. setTimeout(()=>{
  438. this.showClose = true;
  439. })
  440. },
  441. onUnload() {
  442. if (this.getPayDataTimer) {
  443. clearTimeout(this.getPayDataTimer);
  444. }
  445. },
  446. watch: {
  447. 'previewData.address.name': {
  448. handler() {
  449. this.changeZitiAddress();
  450. },
  451. },
  452. 'previewData.address.mobile': {
  453. handler() {
  454. this.changeZitiAddress();
  455. },
  456. },
  457. },
  458. methods: {
  459. getMall(e) {
  460. this.is_open = e.is_open == 1 ? true : false;
  461. if(this.is_open) {
  462. if (this.submitLock) return;
  463. // #ifdef MP-BAIDU
  464. setTimeout(() => {
  465. this.loadPreviewData();
  466. }, 50);
  467. // #endif
  468. // #ifndef MP-BAIDU
  469. this.loadPreviewData();
  470. // #endif
  471. }
  472. },
  473. noCouponStatus(mchIndex) {
  474. const mchNoCouponStatusList = this.$store.getters['orderSubmit/getMchNoCouponStatusList'];
  475. if (mchNoCouponStatusList[mchIndex])
  476. return true;
  477. else
  478. return false;
  479. },
  480. navigateVipCardPrivilege() {
  481. uni.navigateTo({
  482. url: '/plugins/vip_card/rights/rights?id=1',
  483. });
  484. },
  485. showCouponPicker(index) {
  486. this.previewData.mch_list[index].showCouponPicker = true;
  487. },
  488. reversalShowInsertRows(index) {
  489. this.previewData.mch_list[index].showInsertRows = !this.previewData.mch_list[index].showInsertRows;
  490. },
  491. updateList(e, index) {
  492. this.previewData.mch_list[index] = e;
  493. this.$forceUpdate();
  494. },
  495. setParams(options) {
  496. if (options.total_title) {
  497. this.totalTitle = options.total_title;
  498. }
  499. },
  500. handleOrderFormInput(data, sign) {
  501. const result = [];
  502. for (let i in data) {
  503. result[i] = {
  504. key: data[i].key,
  505. label: data[i].name,
  506. value: data[i].value,
  507. required: data[i].is_required,
  508. };
  509. }
  510. const formData = this.$store.state.orderSubmit.formData;
  511. formData.list[sign].order_form = result;
  512. this.$store.commit('orderSubmit/mutSetFormData', formData);
  513. },
  514. handleOrderFormValidate(result, sign) {
  515. const formData = this.$store.state.orderSubmit.formData;
  516. formData.list[sign].order_form_validate_result = result;
  517. this.$store.commit('orderSubmit/mutSetFormData', formData);
  518. },
  519. setFormData(options) {
  520. console.log(529)
  521. console.log(options)
  522. this.previewUrl = decodeURIComponent(options.preview_url || this.$api.order.preview);
  523. this.submitUrl = decodeURIComponent(options.submit_url || this.$api.order.submit);
  524. this.plugin = options.plugin || null;
  525. this.orderPageUrl = decodeURIComponent(options.order_page_url || '/pages/order/index/index?status=0');
  526. this.userTheme = options.theme || null;
  527. this.payDataUrl = decodeURIComponent(options.pay_data_url || this.$api.order.pay_data);
  528. this.payCancelUrl = options.pay_cancel_url ? decodeURIComponent(options.pay_cancel_url) : null;
  529. this.showPayResult = options.show_pay_result || true;
  530. if (this.showPayResult === 'true') this.showPayResult = true;
  531. if (this.showPayResult === 'false') this.showPayResult = false;
  532. const list = JSON.parse(options.mch_list);
  533. console.log(list)
  534. // 商户列表先做下排序,主商城必须在最前
  535. for (let i in list) {
  536. if (parseInt(list[i].mch_id) === 0) {
  537. const _mchItem = list[i];
  538. list.splice(i, 1);
  539. list.unshift(_mchItem);
  540. break;
  541. }
  542. }
  543. for (let i in list) {
  544. list[i].distance = 0;
  545. list[i].remark = '';
  546. list[i].order_form = [];
  547. list[i].use_integral = 0;
  548. list[i].user_coupon_id = 0;
  549. for (let j in list[i].goods_list) {
  550. list[i].goods_list[j].cart_id = list[i].goods_list[j].cart_id || 0;
  551. }
  552. }
  553. console.log(564)
  554. console.log(list)
  555. this.$store.commit('orderSubmit/mutSetFormData', {
  556. list: list,
  557. address_id: 0,
  558. });
  559. },
  560. loadPreviewData() {
  561. this.loadingPreviewData = true;
  562. uni.showLoading({
  563. mask: true,
  564. title: '加载中',
  565. });
  566. console.log(578)
  567. console.log(this.$store.state.orderSubmit)
  568. console.log(this.previewUrl)
  569. this.$request({
  570. url: this.previewUrl,
  571. method: 'post',
  572. data: {
  573. form_data: JSON.stringify(this.$store.state.orderSubmit.formData),
  574. },
  575. }).then(response => {
  576. this.loadingPreviewData = false;
  577. uni.hideLoading();
  578. if (response.code === 0) {
  579. console.log(591)
  580. console.log(response)
  581. if (response.data.allZiti && !response.data.address) {
  582. response.data.address = {
  583. name: '',
  584. mobile: '',
  585. };
  586. }
  587. console.log(response.data.mch_list)
  588. for (let i in response.data.mch_list) {
  589. response.data.mch_list[i].showCouponPicker = false;
  590. response.data.mch_list[i].noCoupons = false;
  591. response.data.mch_list[i].showInsertRows = false;
  592. }
  593. this.previewData = response.data;
  594. console.log(606)
  595. console.log(this.previewData)
  596. this.setDiyFormScrollStatus();
  597. this.checkCouponError();
  598. this.updateStoreDistance();
  599. this.updateGoodsCount();
  600. } else {
  601. uni.showModal({
  602. title: '提示',
  603. content: response.msg,
  604. showCancel: false,
  605. success: () => {
  606. uni.navigateBack();
  607. },
  608. });
  609. }
  610. }).catch(() => {
  611. this.loadingPreviewData = false;
  612. uni.hideLoading();
  613. });
  614. },
  615. navigateStore(mchIndex) {
  616. if (this.previewData.mch_list[mchIndex].mch.id != 0) {
  617. return;
  618. }
  619. let firstGoodsId = '';
  620. if (this.plugin === 'booking') {
  621. firstGoodsId = this.previewData.mch_list[0].goods_list[0].id;
  622. }
  623. let plugin = this.plugin || '';
  624. uni.navigateTo({
  625. url: `/pages/order-submit/store-pick?mchIndex=${mchIndex}&plugin=${plugin}&firstGoodsId=${firstGoodsId}`,
  626. });
  627. },
  628. navigateCoupon(mchIndex) {
  629. uni.navigateTo({
  630. url: `/pages/order-submit/coupon-pick?mchIndex=${mchIndex}`,
  631. });
  632. },
  633. navigateSvip(mchIndex) {
  634. uni.navigateTo({
  635. url: `/pages/order-submit/vip-card?mchIndex=${mchIndex}`,
  636. });
  637. },
  638. changeZitiAddress() {
  639. const formData = this.$store.state.orderSubmit.formData;
  640. formData.address = {
  641. name: this.previewData.address ? this.previewData.address.name : '',
  642. mobile: this.previewData.address ? this.previewData.address.mobile : '',
  643. };
  644. this.$store.commit('orderSubmit/mutSetFormData', formData);
  645. },
  646. changeSendType(mchIndex, value) {
  647. if (this.previewData.mch_list[mchIndex].delivery.send_type == value) return;
  648. const formData = this.$store.state.orderSubmit.formData;
  649. formData.list[mchIndex].send_type = value;
  650. this.$store.commit('orderSubmit/mutSetFormData', formData);
  651. this.previewData.mch_list[mchIndex].delivery.send_type = value;
  652. this.loadPreviewData();
  653. },
  654. updateStoreDistance() {
  655. if (!this.previewData) return;
  656. if (!this.previewData.has_ziti && this.plugin != 'booking') {
  657. return;
  658. }
  659. uni.getLocation({
  660. success: (res) => {
  661. for (let i in this.previewData.mch_list) {
  662. if (!this.previewData.mch_list[i].store) {
  663. continue;
  664. }
  665. if (this.previewData.mch_list[i].store.distance &&
  666. this.previewData.mch_list[i].store.distance != '-m') {
  667. continue;
  668. }
  669. if (
  670. this.previewData.mch_list[i].store.latitude == '' ||
  671. this.previewData.mch_list[i].store.longitude == '' ||
  672. isNaN(this.previewData.mch_list[i].store.latitude) ||
  673. isNaN(this.previewData.mch_list[i].store.longitude)
  674. ) {
  675. continue;
  676. }
  677. const distance = this.$utils.earthDistance({
  678. lat: res.latitude,
  679. lng: res.longitude
  680. }, {
  681. lat: this.previewData.mch_list[i].store.latitude,
  682. lng: this.previewData.mch_list[i].store.longitude
  683. });
  684. let distanceStr = '-m';
  685. if (distance > 1000) {
  686. distanceStr = (distance / 1000).toFixed(2) + 'km';
  687. } else {
  688. distanceStr = distance.toFixed(0) + 'm';
  689. }
  690. this.previewData.mch_list[i].store.distance = distanceStr;
  691. }
  692. },
  693. fail: () => {
  694. this.getLocationFail = true;
  695. },
  696. });
  697. },
  698. openLocationSetting() {
  699. this.getLocationFail = false;
  700. uni.openSetting({});
  701. },
  702. showIntegralTip() {
  703. uni.showModal({
  704. title: '积分抵扣说明',
  705. content: this.$store.state.mallConfig.mall.setting.member_integral_rule,
  706. showCancel: false,
  707. });
  708. },
  709. changeIntegral(mchIndex) {
  710. const formData = this.$store.state.orderSubmit.formData;
  711. const use = !this.previewData.mch_list[mchIndex].integral.use;
  712. formData.list[mchIndex].use_integral = use ? 1 : 0;
  713. this.previewData.mch_list[mchIndex].integral.use = use;
  714. this.loadPreviewData();
  715. },
  716. inputRemark(mchIndex) {
  717. const formData = this.$store.state.orderSubmit.formData;
  718. formData.list[mchIndex].remark = this.previewData.mch_list[mchIndex].remark;
  719. this.$store.commit('orderSubmit/mutSetFormData', formData);
  720. },
  721. submit() {
  722. uni.showLoading({
  723. mask: true,
  724. title: '提交中',
  725. });
  726. this.$request({
  727. url: this.submitUrl,
  728. method: 'post',
  729. data: {
  730. form_data: JSON.stringify(this.$store.state.orderSubmit.formData),
  731. },
  732. }).then(response => {
  733. if (response.code === 0) {
  734. this.getPayOrderId(response.data.queue_id, response.data.token);
  735. } else {
  736. this.submitLock = false;
  737. uni.hideLoading();
  738. uni.showModal({
  739. title: '提示',
  740. content: response.msg,
  741. showCancel: false,
  742. });
  743. }
  744. }).catch(e => {
  745. this.submitLock = false;
  746. uni.hideLoading();
  747. uni.showModal({
  748. title: '提示',
  749. content: e.errMsg,
  750. showCancel: false,
  751. });
  752. });
  753. },
  754. getPayOrderId(queue_id, token) {
  755. this.$request({
  756. url: this.payDataUrl,
  757. method: 'post',
  758. data: {
  759. queue_id: queue_id,
  760. token: token,
  761. },
  762. }).then(response => {
  763. if (response.code === 0) {
  764. if (response.data.retry && response.data.retry === 1) {
  765. this.getPayDataTimer = setTimeout(() => {
  766. this.getPayOrderId(queue_id, token);
  767. }, 1000);
  768. } else {
  769. uni.hideLoading();
  770. this.pay(response.data);
  771. }
  772. } else {
  773. this.submitLock = false;
  774. uni.hideLoading();
  775. uni.showModal({
  776. title: '提示',
  777. content: response.msg,
  778. showCancel: false,
  779. });
  780. }
  781. }).catch(e => {
  782. this.submitLock = false;
  783. uni.hideLoading();
  784. uni.showModal({
  785. title: '提示',
  786. content: e.errMsg,
  787. showCancel: false,
  788. });
  789. });
  790. },
  791. pay(data) {
  792. this.$payment.pay(data.id).then(res => {
  793. if (this.showPayResult) {
  794. uni.redirectTo({
  795. url: `/pages/order-submit/pay-result?payment_order_union_id=${data.id}&order_page_url=${encodeURIComponent(this.orderPageUrl)}`,
  796. });
  797. } else {
  798. let page_url = this.orderPageUrl;
  799. if (page_url.indexOf('?') === -1) {
  800. page_url += '?'
  801. } else {
  802. page_url += '&';
  803. }
  804. delete data.id;
  805. page_url += `pay_data=${JSON.stringify(data)}`;
  806. uni.redirectTo({
  807. url: page_url,
  808. });
  809. }
  810. }).catch(e => {
  811. if (this.payCancelUrl) {
  812. let page_url = this.payCancelUrl;
  813. if (page_url.indexOf('?') === -1) {
  814. page_url += '?'
  815. } else {
  816. page_url += '&';
  817. }
  818. page_url += `pay_data=${JSON.stringify(data)}`;
  819. uni.redirectTo({
  820. url: page_url,
  821. });
  822. } else {
  823. uni.showModal({
  824. title: '提交失败',
  825. content: e.errMsg,
  826. showCancel: false,
  827. success: () => {
  828. uni.redirectTo({
  829. url: this.orderPageUrl,
  830. });
  831. },
  832. });
  833. }
  834. });
  835. },
  836. jump(mchIndex) {
  837. uni.navigateTo({
  838. url: `/pages/order-submit/map`,
  839. });
  840. },
  841. checkCouponError() {
  842. for (let i in this.previewData.mch_list) {
  843. if (this.previewData.mch_list[i].coupon && this.previewData.mch_list[i].coupon.coupon_error) {
  844. uni.showModal({
  845. title: '',
  846. content: this.previewData.mch_list[i].coupon.coupon_error,
  847. showCancel: false,
  848. });
  849. return;
  850. }
  851. }
  852. },
  853. setDiyFormScrollStatus() {
  854. for (let i in this.previewData.mch_list) {
  855. if (
  856. this.previewData.mch_list[i].order_form
  857. ) {
  858. if (
  859. this.previewData.mch_list[i].order_form.value &&
  860. this.previewData.mch_list[i].order_form.value.length &&
  861. this.previewData.mch_list[i].order_form.value.length >= 5
  862. ) {
  863. this.previewData.mch_list[i].order_form.show_scroll = true;
  864. } else {
  865. this.previewData.mch_list[i].order_form.show_scroll = false;
  866. }
  867. }
  868. }
  869. },
  870. subscribe() {
  871. for (let i in this.$store.state.orderSubmit.formData.list) {
  872. const item = this.$store.state.orderSubmit.formData.list[i];
  873. if (!item.order_form_validate_result) continue;
  874. if (item.order_form_validate_result.hasError) {
  875. uni.showModal({
  876. title: '提示',
  877. content: item.order_form_validate_result.errors[0].msg,
  878. showCancel: false,
  879. });
  880. return;
  881. }
  882. }
  883. for (let i in this.$store.state.orderSubmit.formData.list) {
  884. for (let j in this.$store.state.orderSubmit.formData.list[i].goods_list) {
  885. const item = this.$store.state.orderSubmit.formData.list[i].goods_list[j];
  886. if (!item.goods_form_validate_result) continue;
  887. if (item.goods_form_validate_result.hasError) {
  888. uni.showModal({
  889. title: '提示',
  890. content: item.goods_form_validate_result.errors[0].msg,
  891. showCancel: false,
  892. });
  893. return;
  894. }
  895. }
  896. }
  897. if (this.submitLock) return;
  898. this.submitLock = true;
  899. this.$subscribe(this.previewData.template_message_list).then(res => {
  900. this.submit();
  901. }).catch(res => {
  902. this.submit();
  903. });
  904. },
  905. handleGoodsFormInput(data, sign) {
  906. const signArr = sign.split(',');
  907. const mchIndex = parseInt(signArr[0]);
  908. const goodsIndex = parseInt(signArr[1]);
  909. const formId = parseInt(signArr[2]);
  910. const result = [];
  911. for (let i in data) {
  912. result[i] = {
  913. key: data[i].key,
  914. label: data[i].name,
  915. value: data[i].value,
  916. required: data[i].is_required,
  917. };
  918. }
  919. const formData = this.$store.state.orderSubmit.formData;
  920. formData.list[mchIndex].goods_list[goodsIndex].form_data = result;
  921. this.$store.commit('orderSubmit/mutSetFormData', formData);
  922. },
  923. handleGoodsFormValidate(result, sign) {
  924. const signArr = sign.split(',');
  925. const mchIndex = parseInt(signArr[0]);
  926. const goodsIndex = parseInt(signArr[1]);
  927. const formData = this.$store.state.orderSubmit.formData;
  928. formData.list[mchIndex].goods_list[goodsIndex].goods_form_validate_result = result;
  929. this.$store.commit('orderSubmit/mutSetFormData', formData);
  930. },
  931. updateGoodsCount() {
  932. for (let i in this.previewData.mch_list) {
  933. let count = 0;
  934. for (let j in this.previewData.mch_list[i].goods_list) {
  935. count += parseInt(this.previewData.mch_list[i].goods_list[j].num);
  936. }
  937. this.previewData.mch_list[i].goods_count = count;
  938. }
  939. },
  940. handleAddressInput(e) {
  941. if (typeof e.name !== 'undefined') this.previewData.address.name = e.name;
  942. if (typeof e.mobile !== 'undefined') this.previewData.address.mobile = e.mobile;
  943. },
  944. },
  945. }
  946. </script>
  947. <style scoped lang="scss">
  948. $submitBarHeight: #{110rpx};
  949. $borderColor: $uni-weak-color-one;
  950. $xWidth: #{24rpx};
  951. $yWidth: #{24rpx};
  952. .page {
  953. padding-bottom: $submitBarHeight;
  954. font-size: #{28rpx};
  955. line-height: 1;
  956. color: #353535;
  957. }
  958. .u-submit-bar-height {
  959. height: $submitBarHeight;
  960. }
  961. .group {
  962. margin: #{20rpx} #{26rpx};
  963. background: #fff;
  964. border-radius: #{16rpx};
  965. overflow: hidden;
  966. box-shadow: 0 0 #{5rpx} rgba(0, 0, 0, 0.025);
  967. }
  968. .row {
  969. padding: #{12rpx} #{32rpx};
  970. }
  971. .row.no-px {
  972. padding-left: 0;
  973. padding-right: 0;
  974. }
  975. .line {
  976. height: 0;
  977. width: 100%;
  978. background: #e2e2e2;
  979. border-bottom: #{1rpx} solid #e2e2e2;
  980. }
  981. .font-bold {
  982. font-weight: bold;
  983. }
  984. .font-small {
  985. font-size: #{24rpx};
  986. }
  987. .font-gray {
  988. color: #999999;
  989. }
  990. .title-icon {
  991. width: #{28rpx};
  992. height: #{25rpx};
  993. display: block;
  994. }
  995. .mr-12 {
  996. margin-right: #{12rpx};
  997. }
  998. .ellipsis-1 {
  999. white-space: nowrap;
  1000. text-overflow: ellipsis;
  1001. overflow: hidden;
  1002. }
  1003. .ellipsis-2 {
  1004. display: -webkit-box;
  1005. -webkit-box-orient: vertical;
  1006. -webkit-line-clamp: 2;
  1007. text-overflow: ellipsis;
  1008. overflow: hidden;
  1009. }
  1010. .send-type {
  1011. display: inline-block;
  1012. padding: 0 0;
  1013. height: #{56rpx};
  1014. line-height: #{56rpx};
  1015. width: #{190rpx};
  1016. text-align: center;
  1017. border-radius: #{100rpx};
  1018. margin: 0 #{32rpx} 0 0;
  1019. font-size: #{28rpx};
  1020. }
  1021. .send-type:last-child {
  1022. margin-right: 0;
  1023. }
  1024. .delivery-coverage-btn {
  1025. display: inline-block;
  1026. padding: 0 #{20rpx};
  1027. height: #{56rpx};
  1028. line-height: #{56rpx};
  1029. text-align: center;
  1030. border-radius: #{100rpx};
  1031. font-size: #{24rpx};
  1032. border: #{1rpx} solid #e5e5e5;
  1033. color: #666;
  1034. }
  1035. .more-discount-info {
  1036. background: #f7f7f7;
  1037. padding: #{6rpx} #{14rpx};
  1038. position: relative;
  1039. border-radius: #{8rpx};
  1040. }
  1041. .more-discount-info:before {
  1042. display: block;
  1043. content: " ";
  1044. width: 0;
  1045. height: 0;
  1046. position: absolute;
  1047. right: #{30rpx};
  1048. top: -#{39rpx};
  1049. border: #{20rpx} solid transparent;
  1050. border-bottom-color: #f7f7f7;
  1051. }
  1052. .insert-rows {
  1053. height: 0;
  1054. overflow: hidden;
  1055. transition: 200ms;
  1056. padding: 0 0;
  1057. visibility: hidden;
  1058. view {
  1059. font-size: #{24rpx};
  1060. }
  1061. }
  1062. .show .insert-rows {
  1063. height: auto;
  1064. padding: #{24rpx} 0;
  1065. visibility: visible;
  1066. }
  1067. .show .bottom-icon,
  1068. .bottom-icon.show {
  1069. transform: rotate(180deg);
  1070. transition: 200ms;
  1071. }
  1072. .svip {
  1073. view {
  1074. color: #e4cdbb;
  1075. }
  1076. height: #{120rpx};
  1077. background-size: 100% 100%;
  1078. background-color: #3c352e;
  1079. padding-left: #{110rpx};
  1080. border-radius: #{12rpx};
  1081. .vip-card-name {
  1082. max-width: #{90rpx};
  1083. overflow: hidden;
  1084. white-space: nowrap;
  1085. text-overflow: ellipsis;
  1086. font-size: #{24rpx};
  1087. color: #f3be94;
  1088. }
  1089. }
  1090. .goods-form {
  1091. .goods-list {
  1092. padding-top: #{12rpx};
  1093. padding-bottom: #{12rpx};
  1094. }
  1095. .goods-item {
  1096. margin: #{12rpx} 0;
  1097. }
  1098. .goods-image {
  1099. width: #{200rpx};
  1100. height: #{200rpx};
  1101. margin-right: #{24rpx};
  1102. }
  1103. .goods-name {
  1104. line-height: #{35rpx};
  1105. height: #{70rpx};
  1106. margin-bottom: #{32rpx};
  1107. }
  1108. }
  1109. /* ---------- */
  1110. .submit-bar {
  1111. background: #fff;
  1112. border-top: #{1rpx} solid $uni-weak-color-two;
  1113. position: fixed;
  1114. left: 0;
  1115. bottom: 0;
  1116. width: 100%;
  1117. z-index: 1000;
  1118. .price-info {
  1119. padding: 0 #{24rpx};
  1120. >view {
  1121. margin: #{16rpx} 0;
  1122. }
  1123. }
  1124. .submit-btn {
  1125. width: #{300rpx};
  1126. text-align: center;
  1127. }
  1128. .submit-btn:active {
  1129. box-shadow: inset 0 0 #{500rpx} rgba(0, 0, 0, .15);
  1130. }
  1131. .submit-btn.lock {
  1132. box-shadow: inset 0 0 #{500rpx} rgba(255, 255, 255, 0.35);
  1133. }
  1134. .submit-btn.disabled {
  1135. background: $uni-general-color-two;
  1136. }
  1137. }
  1138. .theme-color {
  1139. color: #ffffff;
  1140. }
  1141. </style>