order-submit.vue 51 KB

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