order.vue 58 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082
  1. <template>
  2. <view :style="colorStyle">
  3. <view class='order-submission'>
  4. <view class="allAddress" v-if="product_type == 0">
  5. <!-- 地址 -->
  6. <view class='headerCon'>
  7. <view class="add-title acea-row row-between-wrapper">
  8. <view class="acea-row row-middle">
  9. <view class="icon" :class="deliveryType==1?'':deliveryType==3?'orange':'red'">
  10. {{deliveryType==1?'商城配送':deliveryType==2?'门店自提':'门店配送'}}
  11. </view>
  12. <view class="text add-text line1" v-if="deliveryType==1">由平台为您提供配送服务</view>
  13. <view class="text add-text line1" v-if="deliveryType==2">线上下单,到店自提</view>
  14. <view class="text add-text line1" v-if="deliveryType==3">{{system_store.name || '请选择门店'}}
  15. </view>
  16. </view>
  17. <view class="text" @tap='onDelivery'
  18. v-if="(isDisplay.length >1 || (isDisplay.length==1 && deliveryType !=1)) && store_func_status">
  19. 点击切换 <text class='iconfont icon-jiantou'></text></view>
  20. </view>
  21. <view class="address acea-row row-between-wrapper" @tap="onAddress(addressInfo.real_name)"
  22. v-if="deliveryType==1 || deliveryType==3">
  23. <view class="addressCon" v-if="addressInfo.real_name">
  24. <view class='name acea-row row-middle'>
  25. <view class="nameCon line1">{{addressInfo.real_name}}</view><text
  26. class='phone'>{{addressInfo.phone}}</text>
  27. </view>
  28. <view class="line1">
  29. <text class='default font-num'
  30. v-if="addressInfo.is_default">[默认]</text>{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{addressInfo.street}}{{addressInfo.detail}}
  31. </view>
  32. </view>
  33. <view class='addressCon' v-else>
  34. <view class='setaddress'>设置收货地址</view>
  35. </view>
  36. <view class="iconfont icon-s-bianji"></view>
  37. </view>
  38. <view class="address acea-row row-between-wrapper" v-else>
  39. <view class="addressCon" v-if="storeList.length>0">
  40. <view class='name acea-row row-middle'>
  41. <view class="nameCon line1 on">{{system_store.name || ''}}</view>
  42. </view>
  43. <view class="line1">
  44. {{system_store.address || ''}}{{system_store.detailed_address || ''}}
  45. </view>
  46. </view>
  47. <view class='addressCon' v-else>
  48. <view class='setaddress'>暂无门店信息</view>
  49. </view>
  50. <view class="icon acea-row row-middle" v-if="storeList.length>0">
  51. <view class="iconfont icon-dianhua" @click.stop="call(system_store.phone)"></view>
  52. <view class="iconfont icon-dingwei2" @click.stop="showMaoLocation(system_store)"></view>
  53. </view>
  54. </view>
  55. </view>
  56. <view class='line'>
  57. <image src='/static/images/line.jpg'></image>
  58. </view>
  59. </view>
  60. <view class="wrapper">
  61. <orderGoods :cartInfo="cartInfo" :giveData="giveData" :shippingType="shippingType"
  62. :product_type='product_type' :giveCartInfo="giveCartInfo"></orderGoods>
  63. </view>
  64. <view class='wrapper'>
  65. <!-- <view class='item acea-row row-between-wrapper' @tap='couponTap'
  66. v-if="!pinkId && !BargainId && !combinationId && !seckillId&& !noCoupon && !discountId && goodsType != 7 && priceGroup.firstOrderPrice==0">
  67. <view>优惠券</view>
  68. <view class='discount'>{{couponTitle}}
  69. <text class='iconfont icon-jiantou'></text>
  70. </view>
  71. </view>
  72. <view class='item acea-row row-between-wrapper'
  73. v-if="!pinkId && !BargainId && !combinationId && !seckillId && integral_ratio_status == 1">
  74. <view>积分抵扣</view>
  75. <view class='discount acea-row row-middle'>
  76. <view> {{useIntegral ? "剩余积分":"当前积分"}}
  77. <text class='num font-color'>{{integral || 0}}</text>
  78. </view>
  79. <checkbox-group @change="ChangeIntegral">
  80. <checkbox :disabled="integral<=0 && !useIntegral" :checked='useIntegral ? true : false' />
  81. </checkbox-group>
  82. </view>
  83. </view>
  84. <view v-if="invoice_func || special_invoice" class='item acea-row row-between-wrapper' @tap="goInvoice">
  85. <view>开具发票</view>
  86. <view class='discount'>
  87. {{invTitle}}
  88. <text class='iconfont icon-jiantou'></text>
  89. </view>
  90. </view> -->
  91. <!-- <view class='item acea-row row-between-wrapper' v-if="priceGroup.vipPrice > 0 && userInfo.vip && !pinkId && !BargainId && !combinationId && !seckillId">
  92. <view>会员优惠</view>
  93. <view class='discount'>-¥{{priceGroup.vipPrice}}</view>
  94. </view>
  95. <view class='item acea-row row-between-wrapper' v-if='shippingType==0'>
  96. <view>快递费用</view>
  97. <view class='discount' v-if='priceGroup.storePostage > 0'>+¥{{priceGroup.storePostage}}</view>
  98. <view class='discount' v-else>免运费</view>
  99. </view> -->
  100. <view v-if="shippingType == 1">
  101. <view class="item acea-row row-between-wrapper">
  102. <view>联系人</view>
  103. <view class="discount">
  104. <input v-model="contacts" type="text" placeholder="请填写您的联系姓名"
  105. placeholder-class="placeholder"></input>
  106. </view>
  107. </view>
  108. <view class="item acea-row row-between-wrapper">
  109. <view>联系电话</view>
  110. <view class="discount">
  111. <input type="number" maxlength="11" v-model="contactsTel" placeholder="请填写您的联系电话"
  112. placeholder-class="placeholder"></input>
  113. </view>
  114. </view>
  115. </view>
  116. <!-- <view class='item acea-row row-between-wrapper' wx:else>
  117. <view>自提门店</view>
  118. <view class='discount'>{{system_store.name}}</view>
  119. </view> -->
  120. <view class='item' v-if="textareaStatus">
  121. <view>备注信息</view>
  122. <!-- <view class="placeholder-textarea"> -->
  123. <textarea placeholder-class='placeholder' placeholder="请添加备注(150字以内)" v-if="!coupon.coupon"
  124. @input='bindHideKeyboard' :value="mark" :maxlength="150" name="mark">
  125. </textarea>
  126. <!-- <view class="placeholder" @click="clickTextArea" v-show="!mark">
  127. 请添加备注(150字以内)
  128. </view> -->
  129. <!-- </view> -->
  130. </view>
  131. </view>
  132. <view class='wrapper' v-if="confirm.length">
  133. <view class='item acea-row row-between-wrapper' v-for="(item,index) in confirm" :key="index">
  134. <view class="name">
  135. <span class="asterisk" v-if="item.status">*</span>
  136. {{ item.title }}
  137. </view>
  138. <!-- text -->
  139. <view v-if="item.label=='text'" class="discount">
  140. <input type="text" :placeholder="'请填写'+item.title" placeholder-class="placeholder"
  141. v-model="item.value" />
  142. </view>
  143. <!-- number -->
  144. <view v-if="item.label=='number'" class="discount">
  145. <input type="number" :placeholder="'请填写'+item.title" placeholder-class="placeholder"
  146. v-model="item.value" />
  147. </view>
  148. <!-- email -->
  149. <view v-if="item.label=='email'" class="discount">
  150. <input type="text" :placeholder="'请填写'+item.title" placeholder-class="placeholder"
  151. v-model="item.value" />
  152. </view>
  153. <!-- data -->
  154. <view v-if="item.label=='data'" class="discount">
  155. <picker mode="date" :value="item.value" @change="bindDateChange($event,index)">
  156. <view class="acea-row row-between-wrapper">
  157. <view v-if="item.value == ''">请选择{{item.title}}</view>
  158. <view v-else>{{item.value}}</view>
  159. <text class='iconfont icon-jiantou'></text>
  160. </view>
  161. </picker>
  162. </view>
  163. <!-- time -->
  164. <view v-if="item.label=='time'" class="discount">
  165. <picker mode="time" :value="item.value" @change="bindTimeChange($event,index)"
  166. :placeholder="'请填写'+item.title">
  167. <view class="acea-row row-between-wrapper">
  168. <view v-if="item.value == ''">请选择{{item.title}}</view>
  169. <view v-else>{{item.value}}</view>
  170. <text class='iconfont icon-jiantou'></text>
  171. </view>
  172. </picker>
  173. </view>
  174. <!-- id -->
  175. <view v-if="item.label=='id'" class="discount">
  176. <input type="idcard" :placeholder="'请填写'+item.title" placeholder-class="placeholder"
  177. v-model="item.value" />
  178. </view>
  179. <!-- phone -->
  180. <view v-if="item.label=='phone'" class="discount">
  181. <input type="tel" :placeholder="'请填写'+item.title" placeholder-class="placeholder"
  182. v-model="item.value" />
  183. </view>
  184. <!-- img -->
  185. <view v-if="item.label=='img'" class="confirmImg">
  186. <view class='upload acea-row row-middle'>
  187. <view class='pictrue' v-for="(items,indexs) in item.value" :key="indexs">
  188. <image :src='items' mode="aspectFill"></image>
  189. <view class='iconfont icon-guanbi1 font-num' @tap='DelPic(index,indexs)'></view>
  190. </view>
  191. <view class='pictrue acea-row row-center-wrapper row-column' @tap='uploadpic(index)'
  192. v-if="item.value.length < 8">
  193. <text class='iconfont icon-icon25201'></text>
  194. <view>上传图片</view>
  195. </view>
  196. </view>
  197. </view>
  198. </view>
  199. </view>
  200. <!-- <view class='moneyList'>
  201. <view class='item acea-row row-between-wrapper'>
  202. <view>商品总价:</view> -->
  203. <!-- {{(parseFloat(priceGroup.totalPrice)+parseFloat(priceGroup.vipPrice)).toFixed(2)}} -->
  204. <!-- <view class='money'>
  205. ¥{{priceGroup.sumPrice}}
  206. </view>
  207. </view>
  208. <view class='item acea-row row-between-wrapper' v-if="priceGroup.storePostage > 0">
  209. <view>配送运费:</view>
  210. <view class='money'>
  211. ¥{{(parseFloat(priceGroup.storePostage)+parseFloat(priceGroup.storePostageDiscount)).toFixed(2)}}
  212. </view>
  213. </view>
  214. <view class='item acea-row row-between-wrapper'
  215. v-if="priceGroup.vipPrice > 0 && userInfo.vip && !pinkId && !BargainId && !combinationId && !seckillId && !discountId">
  216. <view>会员商品优惠:</view>
  217. <view class='money'>-¥{{parseFloat(priceGroup.vipPrice).toFixed(2)}}</view>
  218. </view>
  219. <view class='item acea-row row-between-wrapper' v-if="priceGroup.storePostageDiscount > 0">
  220. <view>会员运费优惠:</view>
  221. <view class='money'>-¥{{parseFloat(priceGroup.storePostageDiscount).toFixed(2)}}</view>
  222. </view>
  223. <view class='item acea-row row-between-wrapper' v-if="coupon_price > 0">
  224. <view>优惠券抵扣:</view>
  225. <view class='money'>-¥{{parseFloat(coupon_price).toFixed(2)}}</view>
  226. </view>
  227. <view class='item acea-row row-between-wrapper' v-if="parseFloat(priceGroup.firstOrderPrice) > 0">
  228. <view>新人首单优惠:</view>
  229. <view class='money'>-¥{{parseFloat(priceGroup.firstOrderPrice).toFixed(2)}}</view>
  230. </view>
  231. <view class='item acea-row row-between-wrapper' v-if="integral_price > 0">
  232. <view>积分抵扣:</view>
  233. <view class='money'>-¥{{parseFloat(integral_price).toFixed(2)}}</view>
  234. </view>
  235. <view class='item acea-row row-between' v-for="(item,index) in promotions_detail" :key="index"
  236. v-if="parseFloat(item.promotions_price)">
  237. <view>{{item.title}}:</view>
  238. <view class='money'>-¥{{parseFloat(item.promotions_price).toFixed(2)}}</view>
  239. </view> -->
  240. <!-- <view class='item acea-row row-between-wrapper' v-if="priceGroup.storePostage > 0">
  241. <view>运费:</view>
  242. <view class='money'>+¥{{priceGroup.storePostage}}</view>
  243. </view>
  244. <view class='item acea-row row-between-wrapper' v-if="priceGroup.storePostageDiscount > 0">
  245. <view>会员运费抵扣:</view>
  246. <view class='money'>-¥{{priceGroup.storePostageDiscount}}</view>
  247. </view> -->
  248. <!-- </view> -->
  249. <view class="height-add"></view>
  250. <view class='footer acea-row row-between-wrapper'>
  251. <view>合计:
  252. <text class='font-color'>¥{{totalPrice || 0}}</text>
  253. </view>
  254. <!-- <view class='settlement' style='z-index:100' @tap.stop="goPay"
  255. v-if="(((valid_count>0&&!discount_id) || (valid_count==cartInfo.length&&discount_id)) && shippingType) || (!shippingType && addressId) || product_type != 0">
  256. 立即结算</view>
  257. <view class='settlement bg-color-hui' style='z-index:100' v-else>立即结算</view> -->
  258. <view class='settlement' style='z-index:100' @tap.stop="goPay" v-if="
  259. (((valid_count>0&&!discount_id) || (valid_count==cartInfo.length&&discount_id))) ||
  260. (deliveryType == 2 && !shippingType) ||
  261. (deliveryType == 3 && shippingType) ||
  262. product_type != 0">
  263. 提交订单</view>
  264. <view class='settlement bg-color-hui' style='z-index:100' v-else>提交订单</view>
  265. <!-- <view class='settlement' style='z-index:100' @tap.stop="goPay">提交订单</view> -->
  266. </view>
  267. </view>
  268. <view class="alipaysubmit" v-html="formContent"></view>
  269. <view class="tipaddress" v-show="isaddress">
  270. <view class="top"></view>
  271. <view class="bottom">
  272. <div class="font1">更新地址</div>
  273. <div class="font2">当前地址功能已更新,请重新修改</div>
  274. <div class="btn" @tap="payAddress">前往修改</div>
  275. </view>
  276. </view>
  277. <view class="mark" v-show="isaddress"></view>
  278. <!-- <couponListWindow :coupon='coupon' @ChangCouponsClone="ChangCouponsClone" :openType='openType' :cartId='cartId'
  279. @ChangCoupons="ChangCoupons"></couponListWindow> -->
  280. <addressWindow ref="addressWindow" @changeTextareaStatus="changeTextareaStatus" :news='news' :address='address'
  281. :pagesUrl="pagesUrl" @OnChangeAddress="OnChangeAddress" @changeClose="changeClose">
  282. </addressWindow>
  283. <home v-show="!invShow && navigation"></home>
  284. <!-- <invoice-picker :inv-show="invShow" :inv-list="invList" :inv-checked="invChecked" :is-special="special_invoice"
  285. :url-query="urlQuery" @inv-close="invClose" @inv-change="invChange" @inv-cancel="invCancel">
  286. </invoice-picker> -->
  287. <payment ref="payment" :payMode="cartArr" :pay_close="pay_close" :isCall="true" :totalPrice="totalPrice.toString()"
  288. @changePayType="changePayType" @onChangeFun="onChangeFun"></payment>
  289. <deliveryMethod ref="deliveryMethod" :isDisplay="isDisplay" :storeList="storeList"
  290. :storeSelfMention="store_self_mention" @deliveryFun="deliveryFun" @storeFun="storeFun"></deliveryMethod>
  291. <!-- #ifdef MP -->
  292. <!-- <authorize v-if="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize> -->
  293. <!-- #endif -->
  294. </view>
  295. </template>
  296. <script>
  297. import {
  298. orderConfirm,
  299. getCouponsOrderPrice,
  300. orderCreate,
  301. postOrderComputed,
  302. checkShipping
  303. } from '@/api/order.js';
  304. import {
  305. getAddressDefault,
  306. getAddressDetail,
  307. invoiceList,
  308. invoiceOrder
  309. } from '@/api/user.js';
  310. import {
  311. openPaySubscribe
  312. } from '@/utils/SubscribeMessage.js';
  313. import {
  314. storeListApi
  315. } from '@/api/store.js';
  316. import {
  317. CACHE_LONGITUDE,
  318. CACHE_LATITUDE
  319. } from '@/config/cache.js';
  320. import couponListWindow from '@/components/couponListWindow';
  321. import addressWindow from '@/components/addressWindow';
  322. import orderGoods from '@/components/orderGoods';
  323. import deliveryMethod from '../../components/deliveryMethod/index.vue'
  324. import home from '@/components/home';
  325. // import invoicePicker from '../components/invoicePicker';
  326. import {
  327. toLogin
  328. } from '@/libs/login.js';
  329. import {
  330. mapGetters
  331. } from "vuex";
  332. import payment from '@/components/payment';
  333. import colors from "@/mixins/color";
  334. export default {
  335. components: {
  336. payment,
  337. // invoicePicker,
  338. couponListWindow,
  339. addressWindow,
  340. orderGoods,
  341. home,
  342. deliveryMethod
  343. },
  344. mixins: [colors],
  345. data() {
  346. return {
  347. giveData: {
  348. give_integral: 0,
  349. give_coupon: []
  350. },
  351. giveCartInfo: [],
  352. confirm: [], //自定义留言
  353. id: 0,
  354. isaddress: false,
  355. textareaStatus: true,
  356. //支付方式
  357. cartArr: [{
  358. "name": "微信支付",
  359. "icon": "icon-weixin2",
  360. value: 'weixin',
  361. title: '使用微信快捷支付',
  362. payStatus: 1,
  363. },
  364. {
  365. "name": "支付宝支付",
  366. "icon": "icon-zhifubao",
  367. value: 'alipay',
  368. title: '使用线上支付宝支付',
  369. payStatus: 1,
  370. },
  371. {
  372. "name": "余额支付",
  373. "icon": "icon-yuezhifu",
  374. value: 'yue',
  375. title: '可用余额:',
  376. payStatus: 1,
  377. },
  378. {
  379. "name": "线下支付",
  380. "icon": "icon-yuezhifu1",
  381. value: 'offline',
  382. title: '选择线下付款方式',
  383. payStatus: 2,
  384. }
  385. ],
  386. formContent: '',
  387. payType: 'weixin', //支付方式
  388. openType: 1, //优惠券打开方式 1=使用
  389. active: 0, //支付方式切换
  390. coupon: {
  391. coupon: false,
  392. list: [],
  393. statusTile: '立即使用'
  394. }, //优惠券组件
  395. address: {
  396. address: false
  397. }, //地址组件
  398. addressInfo: {}, //地址信息
  399. // pinkId: 0, //拼团id
  400. addressId: 0, //地址id
  401. couponId: 0, //优惠券id
  402. cartId: '', //购物车id
  403. BargainId: 0,
  404. combinationId: 0,
  405. seckillId: 0,
  406. discountId: 0,
  407. userInfo: {}, //用户信息
  408. mark: '', //备注信息
  409. couponTitle: '请选择', //优惠券
  410. coupon_price: 0, //优惠券抵扣金额
  411. promotions_detail: [], //优惠活动金额明细
  412. // useIntegral: false, //是否使用积分
  413. integral_price: 0, //积分抵扣金额
  414. integral: 0,
  415. ChangePrice: 0, //使用积分抵扣变动后的金额
  416. formIds: [], //收集formid
  417. status: 0,
  418. is_address: false,
  419. toPay: false, //修复进入支付时页面隐藏从新刷新页面
  420. shippingType: 0,
  421. system_store: {},
  422. storePostage: 0,
  423. contacts: '',
  424. contactsTel: '',
  425. mydata: {},
  426. storeList: [],
  427. store_self_mention: 0, //是开启门店自提;
  428. store_func_status: false, //是否开启门店自提和门店配送;
  429. cartInfo: [],
  430. priceGroup: {},
  431. animated: false,
  432. totalPrice: 0,
  433. integralRatio: "0",
  434. pagesUrl: "",
  435. orderKey: "",
  436. // usableCoupon: {},
  437. offlinePostage: "",
  438. isAuto: false, //没有授权的不会自动授权
  439. isShowAuth: false, //是否隐藏授权
  440. from: '',
  441. news: 1,
  442. invTitle: '不开发票',
  443. special_invoice: false,
  444. // invoice_func: false,
  445. integral_ratio_status: 1,
  446. header_type: '',
  447. invShow: false,
  448. invList: [],
  449. invChecked: '',
  450. urlQuery: '',
  451. pay_close: false,
  452. noCoupon: 0,
  453. valid_count: 0,
  454. discount_id: 0,
  455. storeId: 0,
  456. product_type: 1,
  457. newImg: [],
  458. isDisplay: [],
  459. deliveryType: 1,
  460. goodsType: 0,
  461. product_id: 0
  462. };
  463. },
  464. computed: mapGetters(['isLogin']),
  465. onLoad: function(options) {
  466. // #ifdef H5
  467. this.from = this.$wechat.isWeixin() ? 'weixin' : 'weixinh5'
  468. // #endif
  469. // #ifdef MP
  470. this.from = 'routine'
  471. // #endif
  472. if (!options.cartId) return this.$util.Tips({
  473. title: '请先抽奖'
  474. }, {
  475. tab: 3,
  476. url: 1
  477. });
  478. // this.deliveryType = options.delivery_type || 1;
  479. // if (this.deliveryType == 1 || this.deliveryType == 3) {
  480. // this.addressId = options.addressId || 0;
  481. // this.system_store.name = options.store_name;
  482. // }
  483. // if (this.deliveryType == 2 || this.deliveryType == 3) {
  484. // this.storeId = options.store_id || 0;
  485. // this.system_store.id = options.store_id || 0;
  486. // }
  487. // this.couponId = options.couponId || 0;
  488. // this.noCoupon = options.noCoupon || 0;
  489. // this.product_id = options.product_id || 0;
  490. // this.pinkId = options.pinkId ? parseInt(options.pinkId) : 0;
  491. this.cartId = options.cartId;
  492. this.luckRecordId = options.luckRecordId;
  493. // this.is_address = options.is_address ? true : false;
  494. // this.news = !options.new || options.new === '0' ? 0 : 1;
  495. // this.news = 1;
  496. uni.setStorageSync('news', this.news);
  497. // this.invChecked = options.invoice_id || '';
  498. this.header_type = options.header_type || '1';
  499. // this.couponTitle = options.couponTitle || '请选择'
  500. // switch (options.invoice_type) {
  501. // case '1':
  502. // this.invTitle = '增值税电子普通发票';
  503. // break;
  504. // case '2':
  505. // this.invTitle = '增值税电子专用发票';
  506. // break;
  507. // }
  508. // if (options.invoice_name) {
  509. // this.invTitle = options.invoice_name;
  510. // }
  511. // #ifndef APP-PLUS
  512. this.textareaStatus = true;
  513. // #endif
  514. if (this.isLogin && this.toPay == false) {
  515. this.getCheckShipping();
  516. } else {
  517. toLogin();
  518. }
  519. },
  520. /**
  521. * 生命周期函数--监听页面显示
  522. */
  523. onShow: function() {
  524. uni.removeStorageSync('form_type_cart');
  525. let _this = this
  526. uni.$on("handClick", res => {
  527. if (res) {
  528. _this.system_store = res.address
  529. _this.storeId = _this.system_store.id
  530. _this.cartId = res.cartId
  531. _this.news = res.new
  532. // _this.pinkId = Number(res.pinkId)
  533. _this.couponId = res.couponId
  534. _this.getConfirm()
  535. }
  536. // 清除监听
  537. uni.$off('handClick');
  538. })
  539. },
  540. methods: {
  541. // 授权关闭
  542. authColse: function(e) {
  543. this.isShowAuth = e
  544. },
  545. showMaoLocation(e) {
  546. let self = this;
  547. // #ifdef H5
  548. if (self.$wechat.isWeixin()) {
  549. self.$wechat.seeLocation({
  550. latitude: Number(e.latitude),
  551. longitude: Number(e.longitude),
  552. name: e.name,
  553. scale: 13,
  554. address: `${e.address}-${e.detailed_address}`,
  555. }).then(res => {})
  556. } else {
  557. // #endif
  558. uni.openLocation({
  559. latitude: Number(e.latitude),
  560. longitude: Number(e.longitude),
  561. name: e.name,
  562. address: `${e.address}-${e.detailed_address}`,
  563. success: function() {
  564. Number
  565. }
  566. });
  567. // #ifdef H5
  568. }
  569. // #endif
  570. },
  571. call(phone) {
  572. uni.makePhoneCall({
  573. phoneNumber: phone,
  574. });
  575. },
  576. // 选中配送类型
  577. deliveryFun(e, item) {
  578. this.deliveryType = e;
  579. this.$refs.deliveryMethod.module = false;
  580. if (e == 2) {
  581. this.storeId = item.id;
  582. } else {
  583. if (e == 3) {
  584. this.storeId = item.id;
  585. if (this.isDisplay.length == 2 && this.isDisplay.includes("2") && this.isDisplay.includes("3")) {
  586. this.getaddressInfo();
  587. this.$nextTick(function() {
  588. this.$refs.addressWindow.getAddressList();
  589. })
  590. }
  591. }
  592. this.system_store = item;
  593. }
  594. if (e == 1 || e == 3) {
  595. this.addressType(0, e);
  596. } else {
  597. this.addressType(1, e);
  598. }
  599. },
  600. // 选择配送方式
  601. onDelivery() {
  602. this.$refs.deliveryMethod.module = true
  603. },
  604. // 子集调用门店列表接口
  605. storeFun(index) {
  606. this.getList(1, index);
  607. },
  608. // 是否显示快递配送
  609. getCheckShipping() {
  610. let data = {
  611. cartId: this.cartId,
  612. new: this.news
  613. }
  614. checkShipping(data).then(res => {
  615. // 1:快递配送,2:到店自提,3:门店配送
  616. res.data.type.sort((x, y) => x - y) //正序
  617. this.deliveryType = res.data.type[0];
  618. this.isDisplay = res.data.type;
  619. if ((this.isDisplay.includes("2") && this.isDisplay.length == 1) || this.deliveryType == 2 || (
  620. this.deliveryType == 3 && this.storeId > 0 && !this.system_store.name)) {
  621. this.addressType(1, this.deliveryType);
  622. if (this.deliveryType == 3) {
  623. this.getaddressInfo();
  624. this.$nextTick(function() {
  625. this.$refs.addressWindow.getAddressList();
  626. })
  627. }
  628. } else {
  629. this.getaddressInfo();
  630. this.getConfirm();
  631. this.$nextTick(function() {
  632. this.$refs.addressWindow.getAddressList();
  633. })
  634. }
  635. }).catch(err => {
  636. uni.showToast({
  637. title: err,
  638. icon: 'none'
  639. });
  640. })
  641. },
  642. /**
  643. * 删除图片
  644. *
  645. */
  646. DelPic: function(index, indexs) {
  647. let that = this,
  648. pic = this.confirm[index].value;
  649. that.confirm[index].value.splice(indexs, 1);
  650. that.$set(that.confirm[index], 'value', that.confirm[index].value);
  651. },
  652. /**
  653. * 上传文件
  654. *
  655. */
  656. uploadpic: function(index) {
  657. let that = this;
  658. this.$util.uploadImageOne('upload/image', function(res) {
  659. that.newImg.push(res.data.url);
  660. that.$set(that.confirm[index], 'value', that.newImg);
  661. });
  662. },
  663. // 不开发票
  664. invCancel() {
  665. this.invChecked = '';
  666. this.invTitle = '不开发票';
  667. this.invShow = false;
  668. },
  669. // 选择发票
  670. invChange(id) {
  671. this.invChecked = id;
  672. this.invShow = false;
  673. const result = this.invList.find(item => item.id === id);
  674. let name = '';
  675. name += result.header_type === 1 ? '个人' : '企业';
  676. name += result.type === 1 ? '普通' : '专用';
  677. name += '发票';
  678. this.invTitle = name;
  679. },
  680. // 关闭发票
  681. invClose() {
  682. this.invShow = false;
  683. this.getInvoiceList()
  684. },
  685. getInvoiceList() {
  686. uni.showLoading({
  687. title: '正在加载…'
  688. })
  689. invoiceList().then(res => {
  690. uni.hideLoading();
  691. this.invList = res.data.map(item => {
  692. item.id = item.id.toString();
  693. return item;
  694. });
  695. const result = this.invList.find(item => item.id == this.invChecked);
  696. if (result) {
  697. let name = '';
  698. name += result.header_type === 1 ? '个人' : '企业';
  699. name += result.type === 1 ? '普通' : '专用';
  700. name += '发票';
  701. this.invTitle = name;
  702. }
  703. }).catch(err => {
  704. uni.showToast({
  705. title: err,
  706. icon: 'none'
  707. });
  708. });
  709. },
  710. /**
  711. * 开发票
  712. */
  713. // goInvoice: function() {
  714. // this.getInvoiceList()
  715. // this.invShow = true;
  716. // this.urlQuery =
  717. // `new=${this.news}&cartId=${this.cartId}&pinkId=${this.pinkId}&couponId=${this.couponId}&addressId=${this.addressId}&specialInvoice=${this.special_invoice}&couponTitle=${this.couponTitle}&delivery_type=${this.deliveryType}&store_id=${this.storeId}&store_name=${this.system_store.name}&product_id=${this.product_id}`;
  718. // },
  719. /**
  720. * 授权回调事件
  721. *
  722. */
  723. onLoadFun: function() {
  724. this.getCheckShipping();
  725. this.isShowAuth = false;
  726. //调用子页面方法授权后执行获取地址列表
  727. // this.$scope.selectComponent('#address-window').getAddressList();
  728. },
  729. /**
  730. * 事件回调
  731. *
  732. */
  733. onChangeFun: function(e) {
  734. let opt = e;
  735. let action = opt.action || null;
  736. let value = opt.value != undefined ? opt.value : null;
  737. action && this[action] && this[action](value);
  738. },
  739. payClose: function() {
  740. this.pay_close = false;
  741. },
  742. goPay() {
  743. // this.pay_close = true;
  744. this.$refs.payment.goPay(this.cartArr[2].number, 'yue');
  745. },
  746. payCheck(type) {
  747. this.payType = type;
  748. this.SubOrder();
  749. },
  750. payAddress() {
  751. uni.navigateTo({
  752. // /pages/users/user_address/index?id=25&cartId=76179610656654229504&pinkId=0&couponId=0&new=1
  753. url: '/pages/users/user_address/index?id=' + this.id + '&new=' + this.news + '&cartId=' + this
  754. .cartId +
  755. '&pinkId=' +
  756. this.pinkId +
  757. '&couponId=' +
  758. this.couponId + '&delivery_type=' + this.deliveryType + '&addressId=' + this.addressId +
  759. '&store_id=' + this.storeId + '&store_name=' + this.system_store.name + '&product_id=' +
  760. this.product_id
  761. })
  762. },
  763. /**
  764. * 获取门店列表数据
  765. */
  766. getList: function(fromType, index) {
  767. let longitude = uni.getStorageSync("user_longitude"); //经度
  768. let latitude = uni.getStorageSync("user_latitude"); //纬度
  769. let data = {
  770. latitude: latitude, //纬度
  771. longitude: longitude, //经度
  772. page: 1,
  773. limit: 100,
  774. product_id: this.product_id,
  775. is_store: index
  776. }
  777. storeListApi(data).then(res => {
  778. let list = res.data.list.list || [];
  779. this.$set(this, 'storeList', list);
  780. this.$set(this, 'storeId', this.storeId ? this.storeId : list[0].id);
  781. list.forEach(item => {
  782. if(this.storeId == item.id){
  783. this.$set(this, 'system_store', item);
  784. }
  785. })
  786. if (fromType != 1) {
  787. this.getConfirm();
  788. }
  789. }).catch(err => {})
  790. },
  791. // 关闭地址弹窗;
  792. changeClose: function() {
  793. this.$set(this.address, 'address', false);
  794. },
  795. /*
  796. * 跳转门店列表
  797. */
  798. showStoreList: function() {
  799. let _this = this
  800. if (this.storeList.length > 0) {
  801. uni.navigateTo({
  802. url: `/pages/store/store_list/index?type=1&cartId=${_this.cartId}&new=${_this.news}&pinkId=${_this.pinkId}&couponId=${_this.couponId}`
  803. })
  804. }
  805. },
  806. changePayType(type) {
  807. this.payType = type
  808. // this.computedPrice()
  809. },
  810. // computedPrice: function() {
  811. // let shippingType = this.shippingType;
  812. // postOrderComputed(this.orderKey, {
  813. // addressId: this.addressId,
  814. // useIntegral: this.useIntegral ? 1 : 0,
  815. // couponId: this.priceGroup.couponPrice == 0 ? 0 : this.couponId,
  816. // shipping_type: parseInt(shippingType) + 1,
  817. // payType: this.payType
  818. // }).then(res => {
  819. // let result = res.data.result;
  820. // if (result) {
  821. // this.totalPrice = result.pay_price;
  822. // this.integral_price = result.deduction_price;
  823. // this.coupon_price = result.coupon_price;
  824. // this.promotions_detail = result.promotions_detail;
  825. // this.integral = this.useIntegral ? result.SurplusIntegral : this.userInfo.integral;
  826. // this.$set(this.priceGroup, 'storePostage', shippingType == 1 ? 0 : result.pay_postage);
  827. // this.$set(this.priceGroup, 'storePostageDiscount', result.storePostageDiscount);
  828. // }
  829. // }).catch(err => {
  830. // return that.$util.Tips({
  831. // title: err
  832. // });
  833. // })
  834. // },
  835. addressType: function(e, type) {
  836. let index = e;
  837. this.shippingType = parseInt(index);
  838. // this.computedPrice();
  839. if (index == 1) {
  840. this.getList(0, type);
  841. } else {
  842. this.getConfirm();
  843. }
  844. },
  845. bindPickerChange: function(e) {
  846. let value = e.detail.value;
  847. this.shippingType = value;
  848. // this.computedPrice();
  849. },
  850. ChangCouponsClone: function() {
  851. this.$set(this.coupon, 'coupon', false);
  852. },
  853. changeTextareaStatus: function() {
  854. for (let i = 0, len = this.coupon.list.length; i < len; i++) {
  855. this.coupon.list[i].use_title = '';
  856. this.coupon.list[i].is_use = 0;
  857. }
  858. this.textareaStatus = true;
  859. this.status = 0;
  860. this.$set(this.coupon, 'list', this.coupon.list);
  861. },
  862. /**
  863. * 处理点击优惠券后的事件
  864. *
  865. */
  866. ChangCoupons: function(e) {
  867. // this.usableCoupon = e
  868. // this.coupon.coupon = false
  869. let index = e,
  870. list = this.coupon.list,
  871. couponTitle = '请选择',
  872. couponId = 0;
  873. for (let i = 0, len = list.length; i < len; i++) {
  874. if (i != index) {
  875. list[i].use_title = '';
  876. list[i].is_use = 0;
  877. }
  878. }
  879. if (list[index].is_use) {
  880. //不使用优惠券
  881. list[index].use_title = '';
  882. list[index].is_use = 0;
  883. } else {
  884. //使用优惠券
  885. list[index].use_title = '不使用';
  886. list[index].is_use = 1;
  887. couponTitle = list[index].coupon_title;
  888. couponId = list[index].id;
  889. }
  890. this.couponTitle = couponTitle;
  891. this.couponId = couponId;
  892. this.$set(this.coupon, 'coupon', false);
  893. this.$set(this.coupon, 'list', list);
  894. this.getConfirm(1);
  895. },
  896. /**
  897. * 使用积分抵扣
  898. */
  899. ChangeIntegral: function() {
  900. this.useIntegral = !this.useIntegral;
  901. // this.computedPrice();
  902. },
  903. /**
  904. * 选择地址后改变事件
  905. * @param object e
  906. */
  907. OnChangeAddress: function(e) {
  908. this.textareaStatus = true;
  909. this.addressId = e;
  910. this.address.address = false;
  911. this.getConfirm()
  912. this.getaddressInfo();
  913. // this.computedPrice();
  914. },
  915. bindHideKeyboard: function(e) {
  916. this.mark = e.detail.value;
  917. },
  918. /**
  919. * 获取当前订单详细信息
  920. *
  921. */
  922. getConfirm: function(numType) {
  923. let that = this;
  924. let shippingType = parseInt(this.shippingType) + 1;
  925. let addressId = 0,
  926. storeid;
  927. if (shippingType == 1) {
  928. addressId = that.addressId
  929. if (this.deliveryType == 1) {
  930. storeid = 0
  931. } else {
  932. storeid = that.storeId
  933. }
  934. } else {
  935. addressId = ''
  936. storeid = that.storeId
  937. }
  938. orderConfirm(that.cartId, that.news, addressId, shippingType, storeid, that.couponId, that.luckRecordId).then(res => {
  939. if (res.data.upgrade_addr == 1) {
  940. that.id = res.data.addressInfo.id
  941. this.isaddress = true
  942. }
  943. if (numType != 1) {
  944. that.$set(that, 'confirm', res.data.custom_form);
  945. }
  946. that.$set(that, 'goodsType', res.data.type);
  947. that.$set(that, 'userInfo', res.data.userInfo);
  948. that.$set(that, 'integral', res.data.userInfo.integral);
  949. that.$set(that, 'contacts', res.data.userInfo.real_name);
  950. that.$set(that, 'contactsTel', res.data.userInfo.record_phone || '');
  951. that.$set(that, 'integralRatio', res.data.integralRatio);
  952. that.$set(that, 'offlinePostage', res.data.offlinePostage);
  953. that.$set(that, 'orderKey', res.data.orderKey);
  954. that.$set(that, 'valid_count', res.data.valid_count);
  955. that.$set(that, 'discount_id', res.data.discount_id)
  956. that.$set(that, 'priceGroup', res.data.priceGroup);
  957. that.$set(that, 'seckillId', parseInt(res.data.seckill_id));
  958. that.$set(that, 'BargainId', parseInt(res.data.bargain_id));
  959. that.$set(that, 'combinationId', parseInt(res.data.combination_id));
  960. that.$set(that, 'discountId', parseInt(res.data.discount_id));
  961. // that.$set(that, 'invoice_func', res.data.invoice_func);
  962. that.$set(that, 'special_invoice', res.data.special_invoice);
  963. that.$set(that, 'integral_ratio_status', res.data.integral_ratio_status);
  964. that.$set(that, 'store_self_mention', res.data.store_self_mention);
  965. that.$set(that, 'store_func_status', res.data.store_func_status);
  966. that.giveData.give_integral = res.data.give_integral;
  967. that.giveData.give_coupon = res.data.give_coupon;
  968. let cartInfo = res.data.cartInfo;
  969. let cartObj = [],
  970. giftObj = [];
  971. cartInfo.forEach(item => {
  972. if (item.is_gift == 1) {
  973. giftObj.push(item)
  974. } else {
  975. cartObj.push(item)
  976. }
  977. })
  978. that.$set(that, 'cartInfo', cartObj);
  979. that.$set(that, 'giveCartInfo', giftObj);
  980. let giveType = -1;
  981. giftObj.forEach(item => {
  982. if (item.product_type == 0) {
  983. return giveType = 0
  984. }
  985. })
  986. that.$set(that, 'product_type', (res.data.product_type == 0 || giveType == 0) ? 0 : 1);
  987. //微信支付是否开启
  988. that.cartArr[0].payStatus = res.data.pay_weixin_open || 0
  989. //支付宝是否开启
  990. that.cartArr[1].payStatus = res.data.ali_pay_status || 0;
  991. //#ifdef MP
  992. that.cartArr[1].payStatus = 0;
  993. //#endif
  994. //余额支付是否开启
  995. // that.cartArr[2].title = '可用余额:' + res.data.userInfo.now_money;
  996. that.cartArr[2].number = res.data.userInfo.now_money;
  997. that.cartArr[2].payStatus = res.data.yue_pay_status == 1 ? res.data.yue_pay_status : 0
  998. if (res.data.offline_pay_status == 2) {
  999. that.cartArr[3].payStatus = 0
  1000. } else {
  1001. that.cartArr[3].payStatus = 1
  1002. }
  1003. // that.$set(that, 'cartArr', that.cartArr);
  1004. // that.$set(that, 'ChangePrice', that.totalPrice);
  1005. that.getBargainId();
  1006. // that.getCouponList();
  1007. // that.computedPrice();
  1008. if (this.addressId || this.couponId) {
  1009. // this.computedPrice();
  1010. } else {
  1011. // that.$set(that, 'totalPrice', that.$util.$h.Add(parseFloat(res.data.priceGroup
  1012. // .totalPrice),
  1013. // parseFloat(res.data
  1014. // .priceGroup.storePostage)));
  1015. }
  1016. }).catch(err => {
  1017. return this.$util.Tips({
  1018. title: err
  1019. });
  1020. });
  1021. },
  1022. /*
  1023. * 提取砍价和拼团id
  1024. */
  1025. getBargainId: function() {
  1026. let that = this;
  1027. // let cartINfo = that.cartInfo;
  1028. // let BargainId = 0;
  1029. // let combinationId = 0;
  1030. // let discountId = 0;
  1031. // cartINfo.forEach(function(value, index, cartINfo) {
  1032. // BargainId = cartINfo[index].bargain_id,
  1033. // combinationId = cartINfo[index].combination_id,
  1034. // discountId = cartINfo[index].discount_id
  1035. // })
  1036. // that.$set(that, 'BargainId', parseInt(BargainId));
  1037. // that.$set(that, 'combinationId', parseInt(combinationId));
  1038. // that.$set(that, 'discountId', parseInt(discountId));
  1039. if (that.cartArr.length == 3 && (that.BargainId || that.combinationId || that.seckillId || that
  1040. .discountId)) {
  1041. that.cartArr[2].payStatus = 0;
  1042. that.$set(that, 'cartArr', that.cartArr);
  1043. }
  1044. },
  1045. /**
  1046. * 获取当前金额可用优惠券
  1047. *
  1048. */
  1049. // getCouponList: function() {
  1050. // let that = this;
  1051. // let data = {
  1052. // cartId: this.cartId,
  1053. // 'new': this.news,
  1054. // shipping_type: that.$util.$h.Add(that.shippingType, 1),
  1055. // store_id: that.system_store ? that.system_store.id : 0
  1056. // }
  1057. // getCouponsOrderPrice(this.totalPrice, data).then(res => {
  1058. // that.$set(that.coupon, 'list', res.data);
  1059. // that.openType = 1;
  1060. // });
  1061. // },
  1062. /*
  1063. * 获取默认收货地址或者获取某条地址信息
  1064. */
  1065. getaddressInfo: function() {
  1066. let that = this;
  1067. if (that.addressId) {
  1068. getAddressDetail(that.addressId).then(res => {
  1069. res.data.is_default = parseInt(res.data.is_default);
  1070. that.addressInfo = res.data || {};
  1071. that.addressId = res.data.id || 0;
  1072. that.address.addressId = res.data.id || 0;
  1073. })
  1074. } else {
  1075. getAddressDefault().then(res => {
  1076. res.data.is_default = parseInt(res.data.is_default);
  1077. that.addressInfo = res.data || {};
  1078. that.addressId = res.data.id || 0;
  1079. that.address.addressId = res.data.id || 0;
  1080. })
  1081. }
  1082. },
  1083. payItem: function(e) {
  1084. let that = this;
  1085. let active = e;
  1086. that.active = active;
  1087. that.animated = true;
  1088. that.payType = that.cartArr[active].value;
  1089. // that.computedPrice();
  1090. setTimeout(function() {
  1091. that.car();
  1092. }, 500);
  1093. },
  1094. couponTap: function() {
  1095. this.coupon.coupon = true;
  1096. this.coupon.list.forEach((item, index) => {
  1097. if (item.id == this.couponId) {
  1098. item.is_use = 1
  1099. } else {
  1100. item.is_use = 0
  1101. }
  1102. })
  1103. this.$set(this.coupon, 'list', this.coupon.list);
  1104. },
  1105. car: function() {
  1106. let that = this;
  1107. that.animated = false;
  1108. },
  1109. onAddress: function(name) {
  1110. let that = this;
  1111. if (name) {
  1112. that.textareaStatus = false;
  1113. that.address.address = true;
  1114. that.pagesUrl = '/pages/users/user_address_list/index?news=' + this.news + '&cartId=' + this
  1115. .cartId +
  1116. '&pinkId=' +
  1117. this.pinkId +
  1118. '&couponId=' +
  1119. this.couponId + '&delivery_type=' + this.deliveryType + '&addressId=' + this.addressId +
  1120. '&store_id=' + this.storeId + '&store_name=' + this.system_store.name + '&product_id=' + this
  1121. .product_id
  1122. } else {
  1123. uni.navigateTo({
  1124. url: '/pages/users/user_address/index?new=' + this.news + '&cartId=' + this.cartId +
  1125. '&pinkId=' +
  1126. this.pinkId +
  1127. '&couponId=' +
  1128. this.couponId + '&delivery_type=' + this.deliveryType + '&addressId=' + this
  1129. .addressId + '&store_id=' + this.storeId + '&store_name=' + this.system_store
  1130. .name + '&product_id=' + this.product_id
  1131. })
  1132. }
  1133. },
  1134. payment: function(data) {
  1135. let that = this;
  1136. orderCreate(that.orderKey, data).then(res => {
  1137. let status = res.data.status,
  1138. orderId = res.data.result.orderId,
  1139. jsConfig = res.data.result.jsConfig,
  1140. goPages = '/pages/goods/order_pay_status/index?order_id=' + orderId + '&msg=' + res
  1141. .msg +
  1142. '&type=3' + '&totalPrice=' + this.totalPrice
  1143. switch (status) {
  1144. case 'ORDER_EXIST':
  1145. case 'EXTEND_ORDER':
  1146. case 'PAY_ERROR':
  1147. uni.hideLoading();
  1148. return that.$util.Tips({
  1149. title: res.msg
  1150. }, {
  1151. tab: 5,
  1152. url: goPages
  1153. });
  1154. break;
  1155. case 'SUCCESS':
  1156. uni.hideLoading();
  1157. if (that.BargainId || that.combinationId || that.pinkId || that.seckillId || that
  1158. .discountId)
  1159. return that.$util.Tips({
  1160. title: res.msg,
  1161. icon: 'success'
  1162. }, {
  1163. tab: 4,
  1164. url: goPages
  1165. });
  1166. return that.$util.Tips({
  1167. title: res.msg,
  1168. icon: 'success'
  1169. }, {
  1170. tab: 5,
  1171. url: goPages
  1172. });
  1173. break;
  1174. case 'WECHAT_PAY':
  1175. that.toPay = true;
  1176. // #ifdef MP
  1177. /* that.toPay = true; */
  1178. let mp_pay_name = ''
  1179. if (uni.requestOrderPayment) {
  1180. mp_pay_name = 'requestOrderPayment'
  1181. } else {
  1182. mp_pay_name = 'requestPayment'
  1183. }
  1184. uni[mp_pay_name]({
  1185. timeStamp: jsConfig.timestamp,
  1186. nonceStr: jsConfig.nonceStr,
  1187. package: jsConfig.package,
  1188. signType: jsConfig.signType,
  1189. paySign: jsConfig.paySign,
  1190. success: function(res) {
  1191. uni.hideLoading();
  1192. if (that.BargainId || that.combinationId || that.pinkId || that
  1193. .seckillId || that.discountId)
  1194. return that.$util.Tips({
  1195. title: '支付成功',
  1196. icon: 'success'
  1197. }, {
  1198. tab: 4,
  1199. url: goPages
  1200. });
  1201. return that.$util.Tips({
  1202. title: '支付成功',
  1203. icon: 'success'
  1204. }, {
  1205. tab: 5,
  1206. url: goPages
  1207. });
  1208. },
  1209. fail: function(e) {
  1210. uni.hideLoading();
  1211. return that.$util.Tips({
  1212. title: '取消支付'
  1213. }, {
  1214. tab: 5,
  1215. url: goPages + '&status=2'
  1216. });
  1217. },
  1218. complete: function(e) {
  1219. uni.hideLoading();
  1220. //关闭当前页面跳转至订单状态
  1221. if (res.errMsg == 'requestPayment:cancel') return that.$util
  1222. .Tips({
  1223. title: '取消支付'
  1224. }, {
  1225. tab: 5,
  1226. url: goPages + '&status=2'
  1227. });
  1228. },
  1229. })
  1230. // #endif
  1231. // #ifdef H5
  1232. this.$wechat.pay(res.data.result.jsConfig).then(res => {
  1233. return that.$util.Tips({
  1234. title: '支付成功',
  1235. icon: 'success'
  1236. }, {
  1237. tab: 5,
  1238. url: goPages
  1239. });
  1240. }).catch(res => {
  1241. if (!this.$wechat.isWeixin()) {
  1242. uni.redirectTo({
  1243. url: goPages +
  1244. '&msg=支付失败&status=2'
  1245. })
  1246. }
  1247. if (res.errMsg == 'chooseWXPay:cancel') return that.$util.Tips({
  1248. title: '取消支付'
  1249. }, {
  1250. tab: 5,
  1251. url: goPages + '&status=2'
  1252. });
  1253. })
  1254. // #endif
  1255. // #ifdef APP-PLUS
  1256. uni.requestPayment({
  1257. provider: 'wxpay',
  1258. orderInfo: jsConfig,
  1259. success: (e) => {
  1260. let url = goPages;
  1261. uni.showToast({
  1262. title: "支付成功"
  1263. })
  1264. setTimeout(res => {
  1265. uni.redirectTo({
  1266. url: url
  1267. })
  1268. }, 2000)
  1269. },
  1270. fail: (e) => {
  1271. let url = '/pages/goods/order_pay_status/index?order_id=' +
  1272. orderId +
  1273. '&msg=支付失败';
  1274. uni.showModal({
  1275. content: "支付失败",
  1276. showCancel: false,
  1277. success: function(res) {
  1278. if (res.confirm) {
  1279. uni.redirectTo({
  1280. url: url
  1281. })
  1282. } else if (res.cancel) {
  1283. console.log('用户点击取消');
  1284. }
  1285. }
  1286. })
  1287. },
  1288. complete: () => {
  1289. uni.hideLoading();
  1290. },
  1291. });
  1292. // #endif
  1293. break;
  1294. case 'PAY_DEFICIENCY':
  1295. uni.hideLoading();
  1296. //余额不足
  1297. return that.$util.Tips({
  1298. title: res.msg
  1299. }, {
  1300. tab: 5,
  1301. url: goPages + '&status=1'
  1302. });
  1303. break;
  1304. case "WECHAT_H5_PAY":
  1305. uni.hideLoading();
  1306. that.$util.Tips({
  1307. title: '订单创建成功!'
  1308. }, {
  1309. tab: 4,
  1310. url: goPages + '&status=0'
  1311. });
  1312. setTimeout(() => {
  1313. location.href = res.data.result.jsConfig.mweb_url;
  1314. }, 2000);
  1315. break;
  1316. case 'ALIPAY_PAY':
  1317. //#ifdef H5
  1318. if (this.from === 'weixin') {
  1319. uni.redirectTo({
  1320. url: `/pages/users/alipay_invoke/index?id=${orderId}&pay_key=${res.data.result.pay_key}`
  1321. });
  1322. } else {
  1323. uni.hideLoading();
  1324. that.formContent = res.data.result.jsConfig;
  1325. that.$nextTick(() => {
  1326. document.getElementById('alipaysubmit').submit();
  1327. })
  1328. }
  1329. //#endif
  1330. // #ifdef MP
  1331. uni.navigateTo({
  1332. url: `/pages/users/alipay_invoke/index?id=${orderId}&link=${jsConfig.qrCode}`
  1333. });
  1334. // #endif
  1335. // #ifdef APP-PLUS
  1336. uni.requestPayment({
  1337. provider: 'alipay',
  1338. orderInfo: jsConfig,
  1339. success: (e) => {
  1340. uni.showToast({
  1341. title: "支付成功"
  1342. })
  1343. let url = '/pages/goods/order_pay_status/index?order_id=' +
  1344. orderId +
  1345. '&msg=支付成功';
  1346. setTimeout(res => {
  1347. uni.redirectTo({
  1348. url: url
  1349. })
  1350. }, 2000)
  1351. },
  1352. fail: (e) => {
  1353. let url = '/pages/goods/order_pay_status/index?order_id=' +
  1354. orderId +
  1355. '&msg=支付失败';
  1356. uni.showModal({
  1357. content: "支付失败",
  1358. showCancel: false,
  1359. success: function(res) {
  1360. if (res.confirm) {
  1361. uni.redirectTo({
  1362. url: url
  1363. })
  1364. } else if (res.cancel) {
  1365. console.log('用户点击取消');
  1366. }
  1367. }
  1368. })
  1369. },
  1370. complete: () => {
  1371. uni.hideLoading();
  1372. },
  1373. });
  1374. // #endif
  1375. break;
  1376. }
  1377. }).catch(err => {
  1378. uni.hideLoading();
  1379. return that.$util.Tips({
  1380. title: err
  1381. });
  1382. });
  1383. },
  1384. clickTextArea() {
  1385. this.$refs.textarea.focus()
  1386. },
  1387. bindDateChange: function(e, index) {
  1388. this.confirm[index].value = e.target.value
  1389. },
  1390. bindTimeChange: function(e, index) {
  1391. this.confirm[index].value = e.target.value
  1392. },
  1393. SubOrder: function(e) {
  1394. let that = this,
  1395. data = {};
  1396. if (!that.payType) return that.$util.Tips({
  1397. title: '请选择支付方式'
  1398. });
  1399. if (!that.addressId && !that.shippingType && !that.product_type) return that.$util.Tips({
  1400. title: '请选择收货地址'
  1401. });
  1402. if (that.shippingType == 1) {
  1403. if (that.contacts == "" || that.contactsTel == "") {
  1404. return that.$util.Tips({
  1405. title: '请填写联系人或联系人电话'
  1406. });
  1407. }
  1408. if (!/^1(3|4|5|7|8|9|6)\d{9}$/.test(that.contactsTel)) {
  1409. return that.$util.Tips({
  1410. title: '请填写正确的手机号'
  1411. });
  1412. }
  1413. if (!/^[\u4e00-\u9fa5\w]{2,16}$/.test(that.contacts)) {
  1414. return that.$util.Tips({
  1415. title: '请填写您的真实姓名'
  1416. });
  1417. }
  1418. if (that.storeList.length == 0) return that.$util.Tips({
  1419. title: '暂无门店,请选择其他方式'
  1420. });
  1421. }
  1422. for (var i = 0; i < that.confirm.length; i++) {
  1423. let data = that.confirm[i]
  1424. if (data.status || (data.label !== 'img' && data.value && data.value.trim())) {
  1425. if (data.label === 'text' || data.label === 'data' || data.label === 'time') {
  1426. if (!data.value || (data.value && !data.value.trim())) {
  1427. return that.$util.Tips({
  1428. title: `请填写${data.title}`
  1429. });
  1430. }
  1431. }
  1432. if (data.label === 'number') {
  1433. if (data.value <= 0) {
  1434. return that.$util.Tips({
  1435. title: `请填写大于0的${data.title}`
  1436. });
  1437. }
  1438. }
  1439. if (data.label === 'email') {
  1440. if (!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(data.value)) {
  1441. return that.$util.Tips({
  1442. title: `请填写正确的${data.title}`
  1443. });
  1444. }
  1445. }
  1446. if (data.label === 'phone') {
  1447. if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(data.value)) {
  1448. return that.$util.Tips({
  1449. title: `请填写正确的${data.title}`
  1450. });
  1451. }
  1452. }
  1453. if (data.label === 'id') {
  1454. if (!
  1455. /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/i
  1456. .test(data.value)) {
  1457. return that.$util.Tips({
  1458. title: `请填写正确的${data.title}`
  1459. });
  1460. }
  1461. }
  1462. if (data.label === 'img') {
  1463. if (!data.value.length) {
  1464. return that.$util.Tips({
  1465. title: `请上传${data.title}`
  1466. });
  1467. }
  1468. }
  1469. }
  1470. }
  1471. data = {
  1472. custom_form: that.confirm,
  1473. real_name: that.contacts,
  1474. phone: that.contactsTel,
  1475. addressId: that.addressId,
  1476. formId: '',
  1477. couponId: that.priceGroup.couponPrice == 0 ? 0 : that.couponId,
  1478. payType: that.payType,
  1479. useIntegral: that.useIntegral,
  1480. bargainId: that.BargainId,
  1481. combinationId: that.combinationId,
  1482. discountId: that.discountId,
  1483. pinkId: that.pinkId,
  1484. seckill_id: that.seckillId,
  1485. mark: that.mark,
  1486. store_id: that.deliveryType == 1 ? 0 : that.system_store.id || 0,
  1487. 'from': that.from,
  1488. shipping_type: that.$util.$h.Add(that.shippingType, 1),
  1489. 'new': that.news,
  1490. 'invoice_id': that.invChecked,
  1491. // #ifdef H5
  1492. quitUrl: location.protocol + '//' + location.hostname +
  1493. '/pages/goods/order_pay_status/index?' +
  1494. '&type=3' + '&totalPrice=' + this.totalPrice
  1495. // #endif
  1496. // #ifdef APP-PLUS
  1497. quitUrl: '/pages/goods/order_details/index?order_id=' + this.order_id
  1498. // #endif
  1499. };
  1500. if (data.payType == 'yue' && parseFloat(that.userInfo.now_money) < parseFloat(that.totalPrice))
  1501. return that.$util.Tips({
  1502. title: '余额不足!'
  1503. });
  1504. uni.showLoading({
  1505. title: '订单支付中'
  1506. });
  1507. // #ifdef MP
  1508. openPaySubscribe().then(() => {
  1509. that.payment(data);
  1510. });
  1511. // #endif
  1512. // #ifndef MP
  1513. that.payment(data);
  1514. // #endif
  1515. }
  1516. }
  1517. }
  1518. </script>
  1519. <style lang="scss" scoped>
  1520. .height-add {
  1521. height: calc(120rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  1522. height: calc(120rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  1523. }
  1524. /deep/uni-checkbox[disabled] .uni-checkbox-input {
  1525. background-color: #eee;
  1526. }
  1527. .confirmImg {
  1528. width: 100%;
  1529. }
  1530. /deep/.orderGoods {
  1531. margin-top: 20rpx;
  1532. border-radius: 14rpx;
  1533. }
  1534. .confirmImg .upload {
  1535. padding-bottom: 36rpx;
  1536. }
  1537. .confirmImg .upload .pictrue {
  1538. margin: 22rpx 23rpx 0 0;
  1539. width: 156rpx;
  1540. height: 156rpx;
  1541. position: relative;
  1542. font-size: 24rpx;
  1543. color: #bbb;
  1544. }
  1545. .confirmImg .upload .pictrue:nth-of-type(4n) {
  1546. margin-right: 0;
  1547. }
  1548. .confirmImg .upload .pictrue image {
  1549. width: 100%;
  1550. height: 100%;
  1551. border-radius: 3rpx;
  1552. }
  1553. .confirmImg .upload .pictrue .icon-guanbi1 {
  1554. position: absolute;
  1555. font-size: 45rpx;
  1556. top: -10rpx;
  1557. right: -10rpx;
  1558. }
  1559. .confirmImg .upload .pictrue .icon-icon25201 {
  1560. color: #bfbfbf;
  1561. font-size: 50rpx;
  1562. }
  1563. .confirmImg .upload .pictrue:nth-last-child(1) {
  1564. border: 1rpx solid #ddd;
  1565. box-sizing: border-box;
  1566. }
  1567. .alipaysubmit {
  1568. display: none;
  1569. }
  1570. .order-submission .line {
  1571. width: 100%;
  1572. height: 4rpx;
  1573. }
  1574. .order-submission .line image {
  1575. width: 100%;
  1576. height: 100%;
  1577. display: block;
  1578. }
  1579. .order-submission .headerCon {
  1580. background-color: #fff;
  1581. box-sizing: border-box;
  1582. .icon-s-bianji {
  1583. width: 44rpx;
  1584. height: 44rpx;
  1585. background: #F5F5F5;
  1586. border-radius: 50%;
  1587. text-align: center;
  1588. line-height: 44rpx;
  1589. font-size: 17rpx;
  1590. color: #666;
  1591. }
  1592. .add-title {
  1593. height: 72rpx;
  1594. padding: 0 26rpx;
  1595. border-bottom: 1px solid #eee;
  1596. .icon {
  1597. height: 32rpx;
  1598. background: #1890FF;
  1599. border-radius: 4rpx;
  1600. font-size: 20rpx;
  1601. font-weight: 400;
  1602. color: #FFFFFF;
  1603. text-align: center;
  1604. line-height: 32rpx;
  1605. padding: 0 6rpx;
  1606. &.orange {
  1607. background: #FE960F;
  1608. }
  1609. &.red {
  1610. background: #E93323;
  1611. }
  1612. }
  1613. .add-text {
  1614. margin-left: 14rpx;
  1615. width: 360rpx;
  1616. }
  1617. .text {
  1618. font-size: 24rpx;
  1619. font-weight: 400;
  1620. color: #999999;
  1621. .icon-jiantou {
  1622. display: inline-block;
  1623. font-size: 20rpx;
  1624. }
  1625. }
  1626. }
  1627. }
  1628. .order-submission .address {
  1629. padding: 0 26rpx;
  1630. height: 130rpx;
  1631. .icon {
  1632. .iconfont {
  1633. width: 44rpx;
  1634. height: 44rpx;
  1635. background: var(--view-minorColorT);
  1636. font-size: 20rpx;
  1637. border-radius: 50%;
  1638. text-align: center;
  1639. line-height: 44rpx;
  1640. color: var(--view-theme);
  1641. margin-left: 26rpx;
  1642. }
  1643. }
  1644. }
  1645. .order-submission .address .addressCon {
  1646. width: 502rpx;
  1647. font-size: 26rpx;
  1648. color: #666;
  1649. }
  1650. .order-submission .address .addressCon .name {
  1651. font-size: 30rpx;
  1652. color: #282828;
  1653. font-weight: bold;
  1654. margin-bottom: 10rpx;
  1655. .nameCon {
  1656. max-width: 244rpx;
  1657. &.on {
  1658. max-width: unset;
  1659. }
  1660. }
  1661. }
  1662. .order-submission .address .addressCon .name .phone {
  1663. margin-left: 50rpx;
  1664. }
  1665. .order-submission .address .addressCon .default {
  1666. margin-right: 12rpx;
  1667. }
  1668. .order-submission .address .addressCon .setaddress {
  1669. color: #333;
  1670. font-size: 28rpx;
  1671. }
  1672. .order-submission .allAddress {
  1673. width: 100%;
  1674. background: linear-gradient(to bottom, var(--view-theme) 0%, #f5f5f5 100%);
  1675. display: flex;
  1676. flex-direction: column;
  1677. justify-content: center;
  1678. align-items: center;
  1679. padding-top: 24rpx;
  1680. }
  1681. .order-submission .allAddress .nav {
  1682. width: 710rpx;
  1683. // margin: 0 auto;
  1684. }
  1685. .order-submission .allAddress .nav .item {
  1686. width: 355rpx;
  1687. }
  1688. .order-submission .allAddress .nav .item.on {
  1689. position: relative;
  1690. width: 250rpx;
  1691. }
  1692. .order-submission .allAddress .nav .item.on::before {
  1693. position: absolute;
  1694. bottom: 0;
  1695. content: "快递配送";
  1696. font-size: 28rpx;
  1697. display: block;
  1698. height: 0;
  1699. width: 336rpx;
  1700. border-width: 0 20rpx 80rpx 0;
  1701. border-style: none solid solid;
  1702. border-color: transparent transparent #fff;
  1703. z-index: 2;
  1704. border-radius: 7rpx 30rpx 0 0;
  1705. text-align: center;
  1706. // line-height: 80rpx;
  1707. }
  1708. .header-title {
  1709. font-size: 36rpx;
  1710. font-weight: 600;
  1711. color: #FFFFFF;
  1712. }
  1713. .order-submission .allAddress .nav .item:nth-of-type(2).on::before {
  1714. content: "到店自提";
  1715. border-width: 0 0 80rpx 20rpx;
  1716. border-radius: 30rpx 7rpx 0 0;
  1717. }
  1718. .order-submission .allAddress .nav .item.on2 {
  1719. position: relative;
  1720. }
  1721. .order-submission .allAddress .nav .item.on2::before {
  1722. position: absolute;
  1723. bottom: 0;
  1724. content: "到店自提";
  1725. font-size: 28rpx;
  1726. display: block;
  1727. height: 0;
  1728. width: 400rpx;
  1729. border-width: 0 0 60rpx 60rpx;
  1730. border-style: none solid solid;
  1731. border-color: transparent transparent rgba(255, 255, 255, 0.6);
  1732. border-radius: 40rpx 6rpx 0 0;
  1733. text-align: center;
  1734. // line-height: 60rpx;
  1735. }
  1736. .order-submission .allAddress .nav .item:nth-of-type(1).on2::before {
  1737. content: "快递配送";
  1738. border-width: 0 60rpx 60rpx 0;
  1739. border-radius: 6rpx 40rpx 0 0;
  1740. }
  1741. .order-submission .allAddress .headerCon {
  1742. width: 710rpx;
  1743. margin: 0 auto;
  1744. border-radius: 14rpx;
  1745. background-color: #fff;
  1746. }
  1747. .order-submission .allAddress .line {
  1748. width: 710rpx;
  1749. margin: 0 auto;
  1750. }
  1751. .order-submission .wrapper .item .discount .placeholder {
  1752. color: #ccc;
  1753. }
  1754. .placeholder-textarea {
  1755. position: relative;
  1756. .placeholder {
  1757. position: absolute;
  1758. color: #ccc;
  1759. top: 26rpx;
  1760. left: 30rpx;
  1761. }
  1762. }
  1763. .order-submission .wrapper {
  1764. background-color: #fff;
  1765. width: 710rpx;
  1766. border-radius: 14rpx;
  1767. margin: 0 auto;
  1768. margin-top: 14rpx;
  1769. }
  1770. .order-submission .wrapper .item .name {
  1771. position: relative;
  1772. width: 190rpx;
  1773. }
  1774. .order-submission .wrapper .item .asterisk {
  1775. position: absolute;
  1776. color: red;
  1777. left: -15rpx
  1778. }
  1779. .order-submission .wrapper .item {
  1780. padding: 27rpx 30rpx;
  1781. font-size: 30rpx;
  1782. color: #282828;
  1783. border-bottom: 1px solid #f0f0f0;
  1784. }
  1785. .order-submission .wrapper .item .discount {
  1786. font-size: 30rpx;
  1787. color: #999;
  1788. }
  1789. .order-submission .wrapper .item .discount input {
  1790. text-align: right;
  1791. width: 450rpx;
  1792. }
  1793. .order-submission .wrapper .item .discount .iconfont {
  1794. color: #515151;
  1795. font-size: 30rpx;
  1796. margin-left: 15rpx;
  1797. }
  1798. .order-submission .wrapper .item .discount .num {
  1799. font-size: 32rpx;
  1800. margin-right: 20rpx;
  1801. }
  1802. .order-submission .wrapper .item .shipping {
  1803. font-size: 30rpx;
  1804. color: #999;
  1805. position: relative;
  1806. padding-right: 58rpx;
  1807. }
  1808. .order-submission .wrapper .item .shipping .iconfont {
  1809. font-size: 35rpx;
  1810. color: #707070;
  1811. position: absolute;
  1812. right: 0;
  1813. top: 50%;
  1814. transform: translateY(-50%);
  1815. margin-left: 30rpx;
  1816. }
  1817. .order-submission .wrapper .item textarea {
  1818. background-color: #f9f9f9;
  1819. width: 690rpx;
  1820. height: 140rpx;
  1821. border-radius: 3rpx;
  1822. margin-top: 30rpx;
  1823. padding: 25rpx 28rpx;
  1824. box-sizing: border-box;
  1825. }
  1826. .order-submission .wrapper .item .placeholder {
  1827. color: #ccc;
  1828. }
  1829. .order-submission .wrapper .item .list {
  1830. margin-top: 35rpx;
  1831. }
  1832. .order-submission .wrapper .item .list .payItem {
  1833. border: 1px solid #eee;
  1834. border-radius: 6rpx;
  1835. height: 86rpx;
  1836. width: 100%;
  1837. box-sizing: border-box;
  1838. margin-top: 20rpx;
  1839. font-size: 28rpx;
  1840. color: #282828;
  1841. }
  1842. .order-submission .wrapper .item .list .payItem.on {
  1843. border-color: #fc5445;
  1844. color: #e93323;
  1845. }
  1846. .order-submission .wrapper .item .list .payItem .name {
  1847. width: 50%;
  1848. text-align: center;
  1849. border-right: 1px solid #eee;
  1850. padding-left: 80rpx;
  1851. }
  1852. .order-submission .wrapper .item .list .payItem .name .iconfont {
  1853. width: 44rpx;
  1854. height: 44rpx;
  1855. border-radius: 50%;
  1856. text-align: center;
  1857. line-height: 44rpx;
  1858. background-color: #fe960f;
  1859. color: #fff;
  1860. font-size: 30rpx;
  1861. margin-right: 15rpx;
  1862. }
  1863. .order-submission .wrapper .item .list .payItem .name .iconfont.icon-weixin2 {
  1864. background-color: #41b035;
  1865. }
  1866. .order-submission .wrapper .item .list .payItem .name .iconfont.icon-zhifubao {
  1867. background-color: #1677FF;
  1868. }
  1869. .order-submission .wrapper .item .list .payItem .tip {
  1870. width: 49%;
  1871. text-align: center;
  1872. font-size: 26rpx;
  1873. color: #aaa;
  1874. }
  1875. .order-submission .moneyList {
  1876. background-color: #fff;
  1877. padding: 30rpx;
  1878. width: 710rpx;
  1879. border-radius: 14rpx;
  1880. margin: 0 auto;
  1881. margin-top: 14rpx;
  1882. }
  1883. .order-submission .moneyList .item {
  1884. font-size: 28rpx;
  1885. color: #282828;
  1886. }
  1887. .order-submission .moneyList .item~.item {
  1888. margin-top: 20rpx;
  1889. }
  1890. .order-submission .moneyList .item .money {
  1891. color: #868686;
  1892. }
  1893. .order-submission .footer {
  1894. width: 100%;
  1895. height: 100rpx;
  1896. background-color: #fff;
  1897. padding: 0 30rpx;
  1898. font-size: 28rpx;
  1899. color: #333;
  1900. box-sizing: border-box;
  1901. position: fixed;
  1902. bottom: 0;
  1903. left: 0;
  1904. z-index: 9;
  1905. height: calc(100rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  1906. height: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  1907. padding-bottom: calc(0rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  1908. padding-bottom: calc(0rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  1909. }
  1910. .order-submission .footer .settlement {
  1911. font-size: 30rpx;
  1912. color: #fff;
  1913. width: 240rpx;
  1914. height: 70rpx;
  1915. background-color: var(--view-theme);
  1916. border-radius: 50rpx;
  1917. text-align: center;
  1918. line-height: 70rpx;
  1919. }
  1920. .footer .transparent {
  1921. opacity: 0
  1922. }
  1923. .tipaddress {
  1924. position: fixed;
  1925. left: 13%;
  1926. top: 25%;
  1927. // margin-left: -283rpx;
  1928. width: 560rpx;
  1929. height: 614rpx;
  1930. background-color: #fff;
  1931. border-radius: 10rpx;
  1932. z-index: 100;
  1933. text-align: center;
  1934. .top {
  1935. width: 560rpx;
  1936. height: 270rpx;
  1937. border-top-left-radius: 10rpx;
  1938. border-top-right-radius: 10rpx;
  1939. // background-image: url(../../../static/images/address.png);
  1940. background-repeat: round;
  1941. background-color: var(--view-theme);
  1942. .tipsphoto {
  1943. display: inline-block;
  1944. width: 200rpx;
  1945. height: 200rpx;
  1946. margin-top: 73rpx;
  1947. }
  1948. }
  1949. .bottom {
  1950. font-size: 32rpx;
  1951. font-weight: 400;
  1952. .font1 {
  1953. font-size: 36rpx;
  1954. font-weight: 600;
  1955. color: #333333;
  1956. margin: 32rpx 0rpx 22rpx;
  1957. }
  1958. .font2 {
  1959. color: #666666;
  1960. margin-bottom: 48rpx;
  1961. }
  1962. .btn {
  1963. width: 360rpx;
  1964. height: 82rpx;
  1965. border-radius: 42rpx;
  1966. background: linear-gradient(to left, var(--view-theme) 0%, #f5f5f5 100%);
  1967. color: #FFFFFF;
  1968. line-height: 82rpx;
  1969. margin: 0 auto;
  1970. }
  1971. }
  1972. }
  1973. .mark {
  1974. position: fixed;
  1975. top: 0;
  1976. left: 0;
  1977. bottom: 0;
  1978. right: 0;
  1979. background: rgba(0, 0, 0, 0.5);
  1980. z-index: 99;
  1981. }
  1982. </style>