order-submit.vue 50 KB

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