order-submit.vue 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230
  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. if(!this.hasCancel &&hasServiceData.length==0){
  881. let sthat=this;
  882. uni.showModal({
  883. title:"温馨提示",
  884. content:"您购买碎屏险了吗 ?",
  885. showCancel:true,
  886. confirmText: '去购买',
  887. success:(res)=>{
  888. if (res.confirm) {
  889. uni.navigateBack({
  890. })
  891. } else if (res.cancel) {
  892. console.log('用户点击取消');
  893. sthat.hasCancel=true;
  894. }
  895. }
  896. })
  897. return;
  898. }
  899. for (let i in this.$store.state.orderSubmit.formData.list) {
  900. const item = this.$store.state.orderSubmit.formData.list[i];
  901. if (!item.order_form_validate_result) continue;
  902. if (item.order_form_validate_result.hasError) {
  903. uni.showModal({
  904. title: '提示',
  905. content: item.order_form_validate_result.errors[0].msg,
  906. showCancel: false,
  907. });
  908. return;
  909. }
  910. }
  911. for (let i in this.$store.state.orderSubmit.formData.list) {
  912. for (let j in this.$store.state.orderSubmit.formData.list[i].goods_list) {
  913. const item = this.$store.state.orderSubmit.formData.list[i].goods_list[j];
  914. if (!item.goods_form_validate_result) continue;
  915. if (item.goods_form_validate_result.hasError) {
  916. uni.showModal({
  917. title: '提示',
  918. content: item.goods_form_validate_result.errors[0].msg,
  919. showCancel: false,
  920. });
  921. return;
  922. }
  923. }
  924. }
  925. if (this.submitLock) return;
  926. this.submitLock = true;
  927. this.$subscribe(this.previewData.template_message_list).then(res => {
  928. this.submit();
  929. }).catch(res => {
  930. this.submit();
  931. });
  932. },
  933. handleGoodsFormInput(data, sign) {
  934. const signArr = sign.split(',');
  935. const mchIndex = parseInt(signArr[0]);
  936. const goodsIndex = parseInt(signArr[1]);
  937. const formId = parseInt(signArr[2]);
  938. const result = [];
  939. for (let i in data) {
  940. result[i] = {
  941. key: data[i].key,
  942. label: data[i].name,
  943. value: data[i].value,
  944. required: data[i].is_required,
  945. };
  946. }
  947. const formData = this.$store.state.orderSubmit.formData;
  948. formData.list[mchIndex].goods_list[goodsIndex].form_data = result;
  949. this.$store.commit('orderSubmit/mutSetFormData', formData);
  950. },
  951. handleGoodsFormValidate(result, sign) {
  952. const signArr = sign.split(',');
  953. const mchIndex = parseInt(signArr[0]);
  954. const goodsIndex = parseInt(signArr[1]);
  955. const formData = this.$store.state.orderSubmit.formData;
  956. formData.list[mchIndex].goods_list[goodsIndex].goods_form_validate_result = result;
  957. this.$store.commit('orderSubmit/mutSetFormData', formData);
  958. },
  959. updateGoodsCount() {
  960. for (let i in this.previewData.mch_list) {
  961. let count = 0;
  962. for (let j in this.previewData.mch_list[i].goods_list) {
  963. count += parseInt(this.previewData.mch_list[i].goods_list[j].num);
  964. }
  965. this.previewData.mch_list[i].goods_count = count;
  966. }
  967. },
  968. handleAddressInput(e) {
  969. if (typeof e.name !== 'undefined') this.previewData.address.name = e.name;
  970. if (typeof e.mobile !== 'undefined') this.previewData.address.mobile = e.mobile;
  971. },
  972. },
  973. }
  974. </script>
  975. <style scoped lang="scss">
  976. $submitBarHeight: #{110rpx};
  977. $borderColor: $uni-weak-color-one;
  978. $xWidth: #{24rpx};
  979. $yWidth: #{24rpx};
  980. .page {
  981. padding-bottom: $submitBarHeight;
  982. font-size: #{28rpx};
  983. line-height: 1;
  984. color: #353535;
  985. }
  986. .u-submit-bar-height {
  987. height: $submitBarHeight;
  988. }
  989. .group {
  990. margin: #{20rpx} #{26rpx};
  991. background: #fff;
  992. border-radius: #{16rpx};
  993. overflow: hidden;
  994. box-shadow: 0 0 #{5rpx} rgba(0, 0, 0, 0.025);
  995. }
  996. .row {
  997. padding: #{12rpx} #{32rpx};
  998. }
  999. .row.no-px {
  1000. padding-left: 0;
  1001. padding-right: 0;
  1002. }
  1003. .line {
  1004. height: 0;
  1005. width: 100%;
  1006. background: #e2e2e2;
  1007. border-bottom: #{1rpx} solid #e2e2e2;
  1008. }
  1009. .font-bold {
  1010. font-weight: bold;
  1011. }
  1012. .font-small {
  1013. font-size: #{24rpx};
  1014. }
  1015. .font-gray {
  1016. color: #999999;
  1017. }
  1018. .title-icon {
  1019. width: #{28rpx};
  1020. height: #{25rpx};
  1021. display: block;
  1022. }
  1023. .mr-12 {
  1024. margin-right: #{12rpx};
  1025. }
  1026. .ellipsis-1 {
  1027. white-space: nowrap;
  1028. text-overflow: ellipsis;
  1029. overflow: hidden;
  1030. }
  1031. .ellipsis-2 {
  1032. display: -webkit-box;
  1033. -webkit-box-orient: vertical;
  1034. -webkit-line-clamp: 2;
  1035. text-overflow: ellipsis;
  1036. overflow: hidden;
  1037. }
  1038. .send-type {
  1039. display: inline-block;
  1040. padding: 0 0;
  1041. height: #{56rpx};
  1042. line-height: #{56rpx};
  1043. width: #{190rpx};
  1044. text-align: center;
  1045. border-radius: #{100rpx};
  1046. margin: 0 #{32rpx} 0 0;
  1047. font-size: #{28rpx};
  1048. }
  1049. .send-type:last-child {
  1050. margin-right: 0;
  1051. }
  1052. .delivery-coverage-btn {
  1053. display: inline-block;
  1054. padding: 0 #{20rpx};
  1055. height: #{56rpx};
  1056. line-height: #{56rpx};
  1057. text-align: center;
  1058. border-radius: #{100rpx};
  1059. font-size: #{24rpx};
  1060. border: #{1rpx} solid #e5e5e5;
  1061. color: #666;
  1062. }
  1063. .more-discount-info {
  1064. background: #f7f7f7;
  1065. padding: #{6rpx} #{14rpx};
  1066. position: relative;
  1067. border-radius: #{8rpx};
  1068. }
  1069. .more-discount-info:before {
  1070. display: block;
  1071. content: " ";
  1072. width: 0;
  1073. height: 0;
  1074. position: absolute;
  1075. right: #{30rpx};
  1076. top: -#{39rpx};
  1077. border: #{20rpx} solid transparent;
  1078. border-bottom-color: #f7f7f7;
  1079. }
  1080. .insert-rows {
  1081. height: 0;
  1082. overflow: hidden;
  1083. transition: 200ms;
  1084. padding: 0 0;
  1085. visibility: hidden;
  1086. view {
  1087. font-size: #{24rpx};
  1088. }
  1089. }
  1090. .show .insert-rows {
  1091. height: auto;
  1092. padding: #{24rpx} 0;
  1093. visibility: visible;
  1094. }
  1095. .show .bottom-icon,
  1096. .bottom-icon.show {
  1097. transform: rotate(180deg);
  1098. transition: 200ms;
  1099. }
  1100. .svip {
  1101. view {
  1102. color: #e4cdbb;
  1103. }
  1104. height: #{120rpx};
  1105. background-size: 100% 100%;
  1106. background-color: #3c352e;
  1107. padding-left: #{110rpx};
  1108. border-radius: #{12rpx};
  1109. .vip-card-name {
  1110. max-width: #{90rpx};
  1111. overflow: hidden;
  1112. white-space: nowrap;
  1113. text-overflow: ellipsis;
  1114. font-size: #{24rpx};
  1115. color: #f3be94;
  1116. }
  1117. }
  1118. .goods-form {
  1119. .goods-list {
  1120. padding-top: #{12rpx};
  1121. padding-bottom: #{12rpx};
  1122. }
  1123. .goods-item {
  1124. margin: #{12rpx} 0;
  1125. }
  1126. .goods-image {
  1127. width: #{200rpx};
  1128. height: #{200rpx};
  1129. margin-right: #{24rpx};
  1130. }
  1131. .goods-name {
  1132. line-height: #{35rpx};
  1133. height: #{70rpx};
  1134. margin-bottom: #{32rpx};
  1135. }
  1136. }
  1137. /* ---------- */
  1138. .submit-bar {
  1139. background: #fff;
  1140. border-top: #{1rpx} solid $uni-weak-color-two;
  1141. position: fixed;
  1142. left: 0;
  1143. bottom: 0;
  1144. width: 100%;
  1145. z-index: 1000;
  1146. .price-info {
  1147. padding: 0 #{24rpx};
  1148. >view {
  1149. margin: #{16rpx} 0;
  1150. }
  1151. }
  1152. .submit-btn {
  1153. width: #{300rpx};
  1154. text-align: center;
  1155. }
  1156. .submit-btn:active {
  1157. box-shadow: inset 0 0 #{500rpx} rgba(0, 0, 0, .15);
  1158. }
  1159. .submit-btn.lock {
  1160. box-shadow: inset 0 0 #{500rpx} rgba(255, 255, 255, 0.35);
  1161. }
  1162. .submit-btn.disabled {
  1163. background: $uni-general-color-two;
  1164. }
  1165. }
  1166. .theme-color {
  1167. color: #ffffff;
  1168. }
  1169. </style>