order-submit.vue 51 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232
  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. hasCancel:true,//默认不弹窗
  385. };
  386. },
  387. mounted(){
  388. setTimeout(()=>{
  389. console.log(393)
  390. console.log(this.previewData.mch_list)
  391. },2000)
  392. },
  393. computed: {
  394. ...mapState({
  395. appImg: state => state.mallConfig.__wxapp_img,
  396. }),
  397. theme() {
  398. return this.userTheme ? this.userTheme : this.getTheme;
  399. },
  400. ...mapGetters('mallConfig', {
  401. getTheme: 'getTheme',
  402. }),
  403. themeBgClass() {
  404. if (this.theme.indexOf('gift') >= 0) {
  405. return `${this.theme} ${this.theme}-background`;
  406. } else {
  407. return `${this.theme} ${this.theme}-m-back`;
  408. }
  409. },
  410. themeTextClass() {
  411. if (this.theme.indexOf('gift') >= 0) {
  412. return `${this.theme} ${this.theme}-color`;
  413. } else {
  414. return `${this.theme} ${this.theme}-m-text`;
  415. }
  416. },
  417. },
  418. onLoad(options) {
  419. let mchList = JSON.parse(options.mch_list);
  420. this.hasCancel=options.hasScreen==1? false:true;
  421. console.log(416)
  422. console.log(mchList)
  423. this.hasCancel=mchList[0].hasScreen==1? false:true;
  424. let list = [];
  425. for(let item of mchList) {
  426. if(item.mch_id > 0) {
  427. list.push(item.mch_id)
  428. }
  429. }
  430. console.log(list)
  431. this.mchList = JSON.stringify(list);
  432. if (this.submitLock) return;
  433. this.setFormData(options);
  434. this.$event.on(this.$const.EVENT_USER_LOGIN).then(() => {
  435. this.loadPreviewData();
  436. });
  437. },
  438. onShow() {
  439. this.showClose = false;
  440. setTimeout(()=>{
  441. this.showClose = true;
  442. })
  443. },
  444. onUnload() {
  445. if (this.getPayDataTimer) {
  446. clearTimeout(this.getPayDataTimer);
  447. }
  448. },
  449. watch: {
  450. 'previewData.address.name': {
  451. handler() {
  452. this.changeZitiAddress();
  453. },
  454. },
  455. 'previewData.address.mobile': {
  456. handler() {
  457. this.changeZitiAddress();
  458. },
  459. },
  460. },
  461. methods: {
  462. getMall(e) {
  463. this.is_open = e.is_open == 1 ? true : false;
  464. if(this.is_open) {
  465. if (this.submitLock) return;
  466. // #ifdef MP-BAIDU
  467. setTimeout(() => {
  468. this.loadPreviewData();
  469. }, 50);
  470. // #endif
  471. // #ifndef MP-BAIDU
  472. this.loadPreviewData();
  473. // #endif
  474. }
  475. },
  476. noCouponStatus(mchIndex) {
  477. const mchNoCouponStatusList = this.$store.getters['orderSubmit/getMchNoCouponStatusList'];
  478. if (mchNoCouponStatusList[mchIndex])
  479. return true;
  480. else
  481. return false;
  482. },
  483. navigateVipCardPrivilege() {
  484. uni.navigateTo({
  485. url: '/plugins/vip_card/rights/rights?id=1',
  486. });
  487. },
  488. showCouponPicker(index) {
  489. this.previewData.mch_list[index].showCouponPicker = true;
  490. },
  491. reversalShowInsertRows(index) {
  492. this.previewData.mch_list[index].showInsertRows = !this.previewData.mch_list[index].showInsertRows;
  493. },
  494. updateList(e, index) {
  495. this.previewData.mch_list[index] = e;
  496. this.$forceUpdate();
  497. },
  498. setParams(options) {
  499. if (options.total_title) {
  500. this.totalTitle = options.total_title;
  501. }
  502. },
  503. handleOrderFormInput(data, sign) {
  504. const result = [];
  505. for (let i in data) {
  506. result[i] = {
  507. key: data[i].key,
  508. label: data[i].name,
  509. value: data[i].value,
  510. required: data[i].is_required,
  511. };
  512. }
  513. const formData = this.$store.state.orderSubmit.formData;
  514. formData.list[sign].order_form = result;
  515. this.$store.commit('orderSubmit/mutSetFormData', formData);
  516. },
  517. handleOrderFormValidate(result, sign) {
  518. const formData = this.$store.state.orderSubmit.formData;
  519. formData.list[sign].order_form_validate_result = result;
  520. this.$store.commit('orderSubmit/mutSetFormData', formData);
  521. },
  522. setFormData(options) {
  523. console.log(529)
  524. console.log(options)
  525. this.previewUrl = decodeURIComponent(options.preview_url || this.$api.order.preview);
  526. this.submitUrl = decodeURIComponent(options.submit_url || this.$api.order.submit);
  527. this.plugin = options.plugin || null;
  528. this.orderPageUrl = decodeURIComponent(options.order_page_url || '/pages/order/index/index?status=0');
  529. this.userTheme = options.theme || null;
  530. this.payDataUrl = decodeURIComponent(options.pay_data_url || this.$api.order.pay_data);
  531. this.payCancelUrl = options.pay_cancel_url ? decodeURIComponent(options.pay_cancel_url) : null;
  532. this.showPayResult = options.show_pay_result || true;
  533. if (this.showPayResult === 'true') this.showPayResult = true;
  534. if (this.showPayResult === 'false') this.showPayResult = false;
  535. const list = JSON.parse(options.mch_list);
  536. console.log(list)
  537. // 商户列表先做下排序,主商城必须在最前
  538. for (let i in list) {
  539. if (parseInt(list[i].mch_id) === 0) {
  540. const _mchItem = list[i];
  541. list.splice(i, 1);
  542. list.unshift(_mchItem);
  543. break;
  544. }
  545. }
  546. for (let i in list) {
  547. list[i].distance = 0;
  548. list[i].remark = '';
  549. list[i].order_form = [];
  550. list[i].use_integral = 0;
  551. list[i].user_coupon_id = 0;
  552. for (let j in list[i].goods_list) {
  553. list[i].goods_list[j].cart_id = list[i].goods_list[j].cart_id || 0;
  554. }
  555. }
  556. console.log(564)
  557. console.log(list)
  558. this.$store.commit('orderSubmit/mutSetFormData', {
  559. list: list,
  560. address_id: 0,
  561. });
  562. },
  563. loadPreviewData() {
  564. this.loadingPreviewData = true;
  565. uni.showLoading({
  566. mask: true,
  567. title: '加载中',
  568. });
  569. console.log(578)
  570. console.log(this.$store.state.orderSubmit)
  571. console.log(this.previewUrl)
  572. this.$request({
  573. url: this.previewUrl,
  574. method: 'post',
  575. data: {
  576. form_data: JSON.stringify(this.$store.state.orderSubmit.formData),
  577. },
  578. }).then(response => {
  579. this.loadingPreviewData = false;
  580. uni.hideLoading();
  581. if (response.code === 0) {
  582. console.log(591)
  583. console.log(response)
  584. if (response.data.allZiti && !response.data.address) {
  585. response.data.address = {
  586. name: '',
  587. mobile: '',
  588. };
  589. }
  590. console.log(response.data.mch_list)
  591. for (let i in response.data.mch_list) {
  592. response.data.mch_list[i].showCouponPicker = false;
  593. response.data.mch_list[i].noCoupons = false;
  594. response.data.mch_list[i].showInsertRows = false;
  595. }
  596. this.previewData = response.data;
  597. console.log(606)
  598. console.log(this.previewData)
  599. this.setDiyFormScrollStatus();
  600. this.checkCouponError();
  601. this.updateStoreDistance();
  602. this.updateGoodsCount();
  603. } else {
  604. uni.showModal({
  605. title: '提示',
  606. content: response.msg,
  607. showCancel: false,
  608. success: () => {
  609. uni.navigateBack();
  610. },
  611. });
  612. }
  613. }).catch(() => {
  614. this.loadingPreviewData = false;
  615. uni.hideLoading();
  616. });
  617. },
  618. navigateStore(mchIndex) {
  619. if (this.previewData.mch_list[mchIndex].mch.id != 0) {
  620. return;
  621. }
  622. let firstGoodsId = '';
  623. if (this.plugin === 'booking') {
  624. firstGoodsId = this.previewData.mch_list[0].goods_list[0].id;
  625. }
  626. let plugin = this.plugin || '';
  627. uni.navigateTo({
  628. url: `/pages/order-submit/store-pick?mchIndex=${mchIndex}&plugin=${plugin}&firstGoodsId=${firstGoodsId}`,
  629. });
  630. },
  631. navigateCoupon(mchIndex) {
  632. uni.navigateTo({
  633. url: `/pages/order-submit/coupon-pick?mchIndex=${mchIndex}`,
  634. });
  635. },
  636. navigateSvip(mchIndex) {
  637. uni.navigateTo({
  638. url: `/pages/order-submit/vip-card?mchIndex=${mchIndex}`,
  639. });
  640. },
  641. changeZitiAddress() {
  642. const formData = this.$store.state.orderSubmit.formData;
  643. formData.address = {
  644. name: this.previewData.address ? this.previewData.address.name : '',
  645. mobile: this.previewData.address ? this.previewData.address.mobile : '',
  646. };
  647. this.$store.commit('orderSubmit/mutSetFormData', formData);
  648. },
  649. changeSendType(mchIndex, value) {
  650. if (this.previewData.mch_list[mchIndex].delivery.send_type == value) return;
  651. const formData = this.$store.state.orderSubmit.formData;
  652. formData.list[mchIndex].send_type = value;
  653. this.$store.commit('orderSubmit/mutSetFormData', formData);
  654. this.previewData.mch_list[mchIndex].delivery.send_type = value;
  655. this.loadPreviewData();
  656. },
  657. updateStoreDistance() {
  658. if (!this.previewData) return;
  659. if (!this.previewData.has_ziti && this.plugin != 'booking') {
  660. return;
  661. }
  662. uni.getLocation({
  663. success: (res) => {
  664. for (let i in this.previewData.mch_list) {
  665. if (!this.previewData.mch_list[i].store) {
  666. continue;
  667. }
  668. if (this.previewData.mch_list[i].store.distance &&
  669. this.previewData.mch_list[i].store.distance != '-m') {
  670. continue;
  671. }
  672. if (
  673. this.previewData.mch_list[i].store.latitude == '' ||
  674. this.previewData.mch_list[i].store.longitude == '' ||
  675. isNaN(this.previewData.mch_list[i].store.latitude) ||
  676. isNaN(this.previewData.mch_list[i].store.longitude)
  677. ) {
  678. continue;
  679. }
  680. const distance = this.$utils.earthDistance({
  681. lat: res.latitude,
  682. lng: res.longitude
  683. }, {
  684. lat: this.previewData.mch_list[i].store.latitude,
  685. lng: this.previewData.mch_list[i].store.longitude
  686. });
  687. let distanceStr = '-m';
  688. if (distance > 1000) {
  689. distanceStr = (distance / 1000).toFixed(2) + 'km';
  690. } else {
  691. distanceStr = distance.toFixed(0) + 'm';
  692. }
  693. this.previewData.mch_list[i].store.distance = distanceStr;
  694. }
  695. },
  696. fail: () => {
  697. this.getLocationFail = true;
  698. },
  699. });
  700. },
  701. openLocationSetting() {
  702. this.getLocationFail = false;
  703. uni.openSetting({});
  704. },
  705. showIntegralTip() {
  706. uni.showModal({
  707. title: '积分抵扣说明',
  708. content: this.$store.state.mallConfig.mall.setting.member_integral_rule,
  709. showCancel: false,
  710. });
  711. },
  712. changeIntegral(mchIndex) {
  713. const formData = this.$store.state.orderSubmit.formData;
  714. const use = !this.previewData.mch_list[mchIndex].integral.use;
  715. formData.list[mchIndex].use_integral = use ? 1 : 0;
  716. this.previewData.mch_list[mchIndex].integral.use = use;
  717. this.loadPreviewData();
  718. },
  719. inputRemark(mchIndex) {
  720. const formData = this.$store.state.orderSubmit.formData;
  721. formData.list[mchIndex].remark = this.previewData.mch_list[mchIndex].remark;
  722. this.$store.commit('orderSubmit/mutSetFormData', formData);
  723. },
  724. submit() {
  725. uni.showLoading({
  726. mask: true,
  727. title: '提交中',
  728. });
  729. this.$request({
  730. url: this.submitUrl,
  731. method: 'post',
  732. data: {
  733. form_data: JSON.stringify(this.$store.state.orderSubmit.formData),
  734. },
  735. }).then(response => {
  736. if (response.code === 0) {
  737. this.getPayOrderId(response.data.queue_id, response.data.token);
  738. } else {
  739. this.submitLock = false;
  740. uni.hideLoading();
  741. uni.showModal({
  742. title: '提示',
  743. content: response.msg,
  744. showCancel: false,
  745. });
  746. }
  747. }).catch(e => {
  748. this.submitLock = false;
  749. uni.hideLoading();
  750. uni.showModal({
  751. title: '提示',
  752. content: e.errMsg,
  753. showCancel: false,
  754. });
  755. });
  756. },
  757. getPayOrderId(queue_id, token) {
  758. this.$request({
  759. url: this.payDataUrl,
  760. method: 'post',
  761. data: {
  762. queue_id: queue_id,
  763. token: token,
  764. },
  765. }).then(response => {
  766. if (response.code === 0) {
  767. if (response.data.retry && response.data.retry === 1) {
  768. this.getPayDataTimer = setTimeout(() => {
  769. this.getPayOrderId(queue_id, token);
  770. }, 1000);
  771. } else {
  772. uni.hideLoading();
  773. this.pay(response.data);
  774. }
  775. } else {
  776. this.submitLock = false;
  777. uni.hideLoading();
  778. uni.showModal({
  779. title: '提示',
  780. content: response.msg,
  781. showCancel: false,
  782. });
  783. }
  784. }).catch(e => {
  785. this.submitLock = false;
  786. uni.hideLoading();
  787. uni.showModal({
  788. title: '提示',
  789. content: e.errMsg,
  790. showCancel: false,
  791. });
  792. });
  793. },
  794. pay(data) {
  795. this.$payment.pay(data.id).then(res => {
  796. if (this.showPayResult) {
  797. uni.redirectTo({
  798. url: `/pages/order-submit/pay-result?payment_order_union_id=${data.id}&order_page_url=${encodeURIComponent(this.orderPageUrl)}`,
  799. });
  800. } else {
  801. let page_url = this.orderPageUrl;
  802. if (page_url.indexOf('?') === -1) {
  803. page_url += '?'
  804. } else {
  805. page_url += '&';
  806. }
  807. delete data.id;
  808. page_url += `pay_data=${JSON.stringify(data)}`;
  809. uni.redirectTo({
  810. url: page_url,
  811. });
  812. }
  813. }).catch(e => {
  814. if (this.payCancelUrl) {
  815. let page_url = this.payCancelUrl;
  816. if (page_url.indexOf('?') === -1) {
  817. page_url += '?'
  818. } else {
  819. page_url += '&';
  820. }
  821. page_url += `pay_data=${JSON.stringify(data)}`;
  822. uni.redirectTo({
  823. url: page_url,
  824. });
  825. } else {
  826. uni.showModal({
  827. title: '提交失败',
  828. content: e.errMsg,
  829. showCancel: false,
  830. success: () => {
  831. uni.redirectTo({
  832. url: this.orderPageUrl,
  833. });
  834. },
  835. });
  836. }
  837. });
  838. },
  839. jump(mchIndex) {
  840. uni.navigateTo({
  841. url: `/pages/order-submit/map`,
  842. });
  843. },
  844. checkCouponError() {
  845. for (let i in this.previewData.mch_list) {
  846. if (this.previewData.mch_list[i].coupon && this.previewData.mch_list[i].coupon.coupon_error) {
  847. uni.showModal({
  848. title: '',
  849. content: this.previewData.mch_list[i].coupon.coupon_error,
  850. showCancel: false,
  851. });
  852. return;
  853. }
  854. }
  855. },
  856. setDiyFormScrollStatus() {
  857. for (let i in this.previewData.mch_list) {
  858. if (
  859. this.previewData.mch_list[i].order_form
  860. ) {
  861. if (
  862. this.previewData.mch_list[i].order_form.value &&
  863. this.previewData.mch_list[i].order_form.value.length &&
  864. this.previewData.mch_list[i].order_form.value.length >= 5
  865. ) {
  866. this.previewData.mch_list[i].order_form.show_scroll = true;
  867. } else {
  868. this.previewData.mch_list[i].order_form.show_scroll = false;
  869. }
  870. }
  871. }
  872. },
  873. subscribe() {
  874. let hasServiceData= this.previewData.mch_list.filter((item)=>{
  875. let serviceData= item.goods_list.filter(good=>{
  876. return good.service_list['id']||0;
  877. })
  878. return serviceData.length;
  879. });
  880. console.log(this.hasCancel,"=======------------")
  881. console.log()
  882. if(this.hasCancel &&hasServiceData.length==0){
  883. let sthat=this;
  884. uni.showModal({
  885. title:"温馨提示",
  886. content:"您购买碎屏险了吗 ?",
  887. showCancel:true,
  888. confirmText: '去购买',
  889. success:(res)=>{
  890. if (res.confirm) {
  891. uni.navigateBack({
  892. })
  893. } else if (res.cancel) {
  894. console.log('用户点击取消');
  895. sthat.hasCancel=false;
  896. }
  897. }
  898. })
  899. return;
  900. }
  901. for (let i in this.$store.state.orderSubmit.formData.list) {
  902. const item = this.$store.state.orderSubmit.formData.list[i];
  903. if (!item.order_form_validate_result) continue;
  904. if (item.order_form_validate_result.hasError) {
  905. uni.showModal({
  906. title: '提示',
  907. content: item.order_form_validate_result.errors[0].msg,
  908. showCancel: false,
  909. });
  910. return;
  911. }
  912. }
  913. for (let i in this.$store.state.orderSubmit.formData.list) {
  914. for (let j in this.$store.state.orderSubmit.formData.list[i].goods_list) {
  915. const item = this.$store.state.orderSubmit.formData.list[i].goods_list[j];
  916. if (!item.goods_form_validate_result) continue;
  917. if (item.goods_form_validate_result.hasError) {
  918. uni.showModal({
  919. title: '提示',
  920. content: item.goods_form_validate_result.errors[0].msg,
  921. showCancel: false,
  922. });
  923. return;
  924. }
  925. }
  926. }
  927. if (this.submitLock) return;
  928. this.submitLock = true;
  929. this.$subscribe(this.previewData.template_message_list).then(res => {
  930. this.submit();
  931. }).catch(res => {
  932. this.submit();
  933. });
  934. },
  935. handleGoodsFormInput(data, sign) {
  936. const signArr = sign.split(',');
  937. const mchIndex = parseInt(signArr[0]);
  938. const goodsIndex = parseInt(signArr[1]);
  939. const formId = parseInt(signArr[2]);
  940. const result = [];
  941. for (let i in data) {
  942. result[i] = {
  943. key: data[i].key,
  944. label: data[i].name,
  945. value: data[i].value,
  946. required: data[i].is_required,
  947. };
  948. }
  949. const formData = this.$store.state.orderSubmit.formData;
  950. formData.list[mchIndex].goods_list[goodsIndex].form_data = result;
  951. this.$store.commit('orderSubmit/mutSetFormData', formData);
  952. },
  953. handleGoodsFormValidate(result, sign) {
  954. const signArr = sign.split(',');
  955. const mchIndex = parseInt(signArr[0]);
  956. const goodsIndex = parseInt(signArr[1]);
  957. const formData = this.$store.state.orderSubmit.formData;
  958. formData.list[mchIndex].goods_list[goodsIndex].goods_form_validate_result = result;
  959. this.$store.commit('orderSubmit/mutSetFormData', formData);
  960. },
  961. updateGoodsCount() {
  962. for (let i in this.previewData.mch_list) {
  963. let count = 0;
  964. for (let j in this.previewData.mch_list[i].goods_list) {
  965. count += parseInt(this.previewData.mch_list[i].goods_list[j].num);
  966. }
  967. this.previewData.mch_list[i].goods_count = count;
  968. }
  969. },
  970. handleAddressInput(e) {
  971. if (typeof e.name !== 'undefined') this.previewData.address.name = e.name;
  972. if (typeof e.mobile !== 'undefined') this.previewData.address.mobile = e.mobile;
  973. },
  974. },
  975. }
  976. </script>
  977. <style scoped lang="scss">
  978. $submitBarHeight: #{110rpx};
  979. $borderColor: $uni-weak-color-one;
  980. $xWidth: #{24rpx};
  981. $yWidth: #{24rpx};
  982. .page {
  983. padding-bottom: $submitBarHeight;
  984. font-size: #{28rpx};
  985. line-height: 1;
  986. color: #353535;
  987. }
  988. .u-submit-bar-height {
  989. height: $submitBarHeight;
  990. }
  991. .group {
  992. margin: #{20rpx} #{26rpx};
  993. background: #fff;
  994. border-radius: #{16rpx};
  995. overflow: hidden;
  996. box-shadow: 0 0 #{5rpx} rgba(0, 0, 0, 0.025);
  997. }
  998. .row {
  999. padding: #{12rpx} #{32rpx};
  1000. }
  1001. .row.no-px {
  1002. padding-left: 0;
  1003. padding-right: 0;
  1004. }
  1005. .line {
  1006. height: 0;
  1007. width: 100%;
  1008. background: #e2e2e2;
  1009. border-bottom: #{1rpx} solid #e2e2e2;
  1010. }
  1011. .font-bold {
  1012. font-weight: bold;
  1013. }
  1014. .font-small {
  1015. font-size: #{24rpx};
  1016. }
  1017. .font-gray {
  1018. color: #999999;
  1019. }
  1020. .title-icon {
  1021. width: #{28rpx};
  1022. height: #{25rpx};
  1023. display: block;
  1024. }
  1025. .mr-12 {
  1026. margin-right: #{12rpx};
  1027. }
  1028. .ellipsis-1 {
  1029. white-space: nowrap;
  1030. text-overflow: ellipsis;
  1031. overflow: hidden;
  1032. }
  1033. .ellipsis-2 {
  1034. display: -webkit-box;
  1035. -webkit-box-orient: vertical;
  1036. -webkit-line-clamp: 2;
  1037. text-overflow: ellipsis;
  1038. overflow: hidden;
  1039. }
  1040. .send-type {
  1041. display: inline-block;
  1042. padding: 0 0;
  1043. height: #{56rpx};
  1044. line-height: #{56rpx};
  1045. width: #{190rpx};
  1046. text-align: center;
  1047. border-radius: #{100rpx};
  1048. margin: 0 #{32rpx} 0 0;
  1049. font-size: #{28rpx};
  1050. }
  1051. .send-type:last-child {
  1052. margin-right: 0;
  1053. }
  1054. .delivery-coverage-btn {
  1055. display: inline-block;
  1056. padding: 0 #{20rpx};
  1057. height: #{56rpx};
  1058. line-height: #{56rpx};
  1059. text-align: center;
  1060. border-radius: #{100rpx};
  1061. font-size: #{24rpx};
  1062. border: #{1rpx} solid #e5e5e5;
  1063. color: #666;
  1064. }
  1065. .more-discount-info {
  1066. background: #f7f7f7;
  1067. padding: #{6rpx} #{14rpx};
  1068. position: relative;
  1069. border-radius: #{8rpx};
  1070. }
  1071. .more-discount-info:before {
  1072. display: block;
  1073. content: " ";
  1074. width: 0;
  1075. height: 0;
  1076. position: absolute;
  1077. right: #{30rpx};
  1078. top: -#{39rpx};
  1079. border: #{20rpx} solid transparent;
  1080. border-bottom-color: #f7f7f7;
  1081. }
  1082. .insert-rows {
  1083. height: 0;
  1084. overflow: hidden;
  1085. transition: 200ms;
  1086. padding: 0 0;
  1087. visibility: hidden;
  1088. view {
  1089. font-size: #{24rpx};
  1090. }
  1091. }
  1092. .show .insert-rows {
  1093. height: auto;
  1094. padding: #{24rpx} 0;
  1095. visibility: visible;
  1096. }
  1097. .show .bottom-icon,
  1098. .bottom-icon.show {
  1099. transform: rotate(180deg);
  1100. transition: 200ms;
  1101. }
  1102. .svip {
  1103. view {
  1104. color: #e4cdbb;
  1105. }
  1106. height: #{120rpx};
  1107. background-size: 100% 100%;
  1108. background-color: #3c352e;
  1109. padding-left: #{110rpx};
  1110. border-radius: #{12rpx};
  1111. .vip-card-name {
  1112. max-width: #{90rpx};
  1113. overflow: hidden;
  1114. white-space: nowrap;
  1115. text-overflow: ellipsis;
  1116. font-size: #{24rpx};
  1117. color: #f3be94;
  1118. }
  1119. }
  1120. .goods-form {
  1121. .goods-list {
  1122. padding-top: #{12rpx};
  1123. padding-bottom: #{12rpx};
  1124. }
  1125. .goods-item {
  1126. margin: #{12rpx} 0;
  1127. }
  1128. .goods-image {
  1129. width: #{200rpx};
  1130. height: #{200rpx};
  1131. margin-right: #{24rpx};
  1132. }
  1133. .goods-name {
  1134. line-height: #{35rpx};
  1135. height: #{70rpx};
  1136. margin-bottom: #{32rpx};
  1137. }
  1138. }
  1139. /* ---------- */
  1140. .submit-bar {
  1141. background: #fff;
  1142. border-top: #{1rpx} solid $uni-weak-color-two;
  1143. position: fixed;
  1144. left: 0;
  1145. bottom: 0;
  1146. width: 100%;
  1147. z-index: 1000;
  1148. .price-info {
  1149. padding: 0 #{24rpx};
  1150. >view {
  1151. margin: #{16rpx} 0;
  1152. }
  1153. }
  1154. .submit-btn {
  1155. width: #{300rpx};
  1156. text-align: center;
  1157. }
  1158. .submit-btn:active {
  1159. box-shadow: inset 0 0 #{500rpx} rgba(0, 0, 0, .15);
  1160. }
  1161. .submit-btn.lock {
  1162. box-shadow: inset 0 0 #{500rpx} rgba(255, 255, 255, 0.35);
  1163. }
  1164. .submit-btn.disabled {
  1165. background: $uni-general-color-two;
  1166. }
  1167. }
  1168. .theme-color {
  1169. color: #ffffff;
  1170. }
  1171. </style>