order.vue 58 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093
  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. uni.showModal({
  659. title: '请求相机权限',
  660. content: '是否允许访问相册用于上传图片信息?',
  661. cancelText: '拒绝',
  662. confirmText: '允许',
  663. success: res => {
  664. if(res.confirm){
  665. that.$util.uploadImageOne('upload/image', function(res) {
  666. that.newImg.push(res.data.url);
  667. that.$set(that.confirm[index], 'value', that.newImg);
  668. });
  669. }
  670. },
  671. });
  672. },
  673. // 不开发票
  674. invCancel() {
  675. this.invChecked = '';
  676. this.invTitle = '不开发票';
  677. this.invShow = false;
  678. },
  679. // 选择发票
  680. invChange(id) {
  681. this.invChecked = id;
  682. this.invShow = false;
  683. const result = this.invList.find(item => item.id === id);
  684. let name = '';
  685. name += result.header_type === 1 ? '个人' : '企业';
  686. name += result.type === 1 ? '普通' : '专用';
  687. name += '发票';
  688. this.invTitle = name;
  689. },
  690. // 关闭发票
  691. invClose() {
  692. this.invShow = false;
  693. this.getInvoiceList()
  694. },
  695. getInvoiceList() {
  696. uni.showLoading({
  697. title: '正在加载…'
  698. })
  699. invoiceList().then(res => {
  700. uni.hideLoading();
  701. this.invList = res.data.map(item => {
  702. item.id = item.id.toString();
  703. return item;
  704. });
  705. const result = this.invList.find(item => item.id == this.invChecked);
  706. if (result) {
  707. let name = '';
  708. name += result.header_type === 1 ? '个人' : '企业';
  709. name += result.type === 1 ? '普通' : '专用';
  710. name += '发票';
  711. this.invTitle = name;
  712. }
  713. }).catch(err => {
  714. uni.showToast({
  715. title: err,
  716. icon: 'none'
  717. });
  718. });
  719. },
  720. /**
  721. * 开发票
  722. */
  723. // goInvoice: function() {
  724. // this.getInvoiceList()
  725. // this.invShow = true;
  726. // this.urlQuery =
  727. // `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}`;
  728. // },
  729. /**
  730. * 授权回调事件
  731. *
  732. */
  733. onLoadFun: function() {
  734. this.getCheckShipping();
  735. this.isShowAuth = false;
  736. //调用子页面方法授权后执行获取地址列表
  737. // this.$scope.selectComponent('#address-window').getAddressList();
  738. },
  739. /**
  740. * 事件回调
  741. *
  742. */
  743. onChangeFun: function(e) {
  744. let opt = e;
  745. let action = opt.action || null;
  746. let value = opt.value != undefined ? opt.value : null;
  747. action && this[action] && this[action](value);
  748. },
  749. payClose: function() {
  750. this.pay_close = false;
  751. },
  752. goPay() {
  753. // this.pay_close = true;
  754. this.$refs.payment.goPay(this.cartArr[2].number, 'yue');
  755. },
  756. payCheck(type) {
  757. this.payType = type;
  758. this.SubOrder();
  759. },
  760. payAddress() {
  761. uni.navigateTo({
  762. // /pages/users/user_address/index?id=25&cartId=76179610656654229504&pinkId=0&couponId=0&new=1
  763. url: '/pages/users/user_address/index?id=' + this.id + '&new=' + this.news + '&cartId=' + this
  764. .cartId +
  765. '&pinkId=' +
  766. this.pinkId +
  767. '&couponId=' +
  768. this.couponId + '&delivery_type=' + this.deliveryType + '&addressId=' + this.addressId +
  769. '&store_id=' + this.storeId + '&store_name=' + this.system_store.name + '&product_id=' +
  770. this.product_id
  771. })
  772. },
  773. /**
  774. * 获取门店列表数据
  775. */
  776. getList: function(fromType, index) {
  777. let longitude = uni.getStorageSync("user_longitude"); //经度
  778. let latitude = uni.getStorageSync("user_latitude"); //纬度
  779. let data = {
  780. latitude: latitude, //纬度
  781. longitude: longitude, //经度
  782. page: 1,
  783. limit: 100,
  784. product_id: this.product_id,
  785. is_store: index
  786. }
  787. storeListApi(data).then(res => {
  788. let list = res.data.list.list || [];
  789. this.$set(this, 'storeList', list);
  790. this.$set(this, 'storeId', this.storeId ? this.storeId : list[0].id);
  791. list.forEach(item => {
  792. if(this.storeId == item.id){
  793. this.$set(this, 'system_store', item);
  794. }
  795. })
  796. if (fromType != 1) {
  797. this.getConfirm();
  798. }
  799. }).catch(err => {})
  800. },
  801. // 关闭地址弹窗;
  802. changeClose: function() {
  803. this.$set(this.address, 'address', false);
  804. },
  805. /*
  806. * 跳转门店列表
  807. */
  808. showStoreList: function() {
  809. let _this = this
  810. if (this.storeList.length > 0) {
  811. uni.navigateTo({
  812. url: `/pages/store/store_list/index?type=1&cartId=${_this.cartId}&new=${_this.news}&pinkId=${_this.pinkId}&couponId=${_this.couponId}`
  813. })
  814. }
  815. },
  816. changePayType(type) {
  817. this.payType = type
  818. // this.computedPrice()
  819. },
  820. // computedPrice: function() {
  821. // let shippingType = this.shippingType;
  822. // postOrderComputed(this.orderKey, {
  823. // addressId: this.addressId,
  824. // useIntegral: this.useIntegral ? 1 : 0,
  825. // couponId: this.priceGroup.couponPrice == 0 ? 0 : this.couponId,
  826. // shipping_type: parseInt(shippingType) + 1,
  827. // payType: this.payType
  828. // }).then(res => {
  829. // let result = res.data.result;
  830. // if (result) {
  831. // this.totalPrice = result.pay_price;
  832. // this.integral_price = result.deduction_price;
  833. // this.coupon_price = result.coupon_price;
  834. // this.promotions_detail = result.promotions_detail;
  835. // this.integral = this.useIntegral ? result.SurplusIntegral : this.userInfo.integral;
  836. // this.$set(this.priceGroup, 'storePostage', shippingType == 1 ? 0 : result.pay_postage);
  837. // this.$set(this.priceGroup, 'storePostageDiscount', result.storePostageDiscount);
  838. // }
  839. // }).catch(err => {
  840. // return that.$util.Tips({
  841. // title: err
  842. // });
  843. // })
  844. // },
  845. addressType: function(e, type) {
  846. let index = e;
  847. this.shippingType = parseInt(index);
  848. // this.computedPrice();
  849. if (index == 1) {
  850. this.getList(0, type);
  851. } else {
  852. this.getConfirm();
  853. }
  854. },
  855. bindPickerChange: function(e) {
  856. let value = e.detail.value;
  857. this.shippingType = value;
  858. // this.computedPrice();
  859. },
  860. ChangCouponsClone: function() {
  861. this.$set(this.coupon, 'coupon', false);
  862. },
  863. changeTextareaStatus: function() {
  864. for (let i = 0, len = this.coupon.list.length; i < len; i++) {
  865. this.coupon.list[i].use_title = '';
  866. this.coupon.list[i].is_use = 0;
  867. }
  868. this.textareaStatus = true;
  869. this.status = 0;
  870. this.$set(this.coupon, 'list', this.coupon.list);
  871. },
  872. /**
  873. * 处理点击优惠券后的事件
  874. *
  875. */
  876. ChangCoupons: function(e) {
  877. // this.usableCoupon = e
  878. // this.coupon.coupon = false
  879. let index = e,
  880. list = this.coupon.list,
  881. couponTitle = '请选择',
  882. couponId = 0;
  883. for (let i = 0, len = list.length; i < len; i++) {
  884. if (i != index) {
  885. list[i].use_title = '';
  886. list[i].is_use = 0;
  887. }
  888. }
  889. if (list[index].is_use) {
  890. //不使用优惠券
  891. list[index].use_title = '';
  892. list[index].is_use = 0;
  893. } else {
  894. //使用优惠券
  895. list[index].use_title = '不使用';
  896. list[index].is_use = 1;
  897. couponTitle = list[index].coupon_title;
  898. couponId = list[index].id;
  899. }
  900. this.couponTitle = couponTitle;
  901. this.couponId = couponId;
  902. this.$set(this.coupon, 'coupon', false);
  903. this.$set(this.coupon, 'list', list);
  904. this.getConfirm(1);
  905. },
  906. /**
  907. * 使用积分抵扣
  908. */
  909. ChangeIntegral: function() {
  910. this.useIntegral = !this.useIntegral;
  911. // this.computedPrice();
  912. },
  913. /**
  914. * 选择地址后改变事件
  915. * @param object e
  916. */
  917. OnChangeAddress: function(e) {
  918. this.textareaStatus = true;
  919. this.addressId = e;
  920. this.address.address = false;
  921. this.getConfirm()
  922. this.getaddressInfo();
  923. // this.computedPrice();
  924. },
  925. bindHideKeyboard: function(e) {
  926. this.mark = e.detail.value;
  927. },
  928. /**
  929. * 获取当前订单详细信息
  930. *
  931. */
  932. getConfirm: function(numType) {
  933. let that = this;
  934. let shippingType = parseInt(this.shippingType) + 1;
  935. let addressId = 0,
  936. storeid;
  937. if (shippingType == 1) {
  938. addressId = that.addressId
  939. if (this.deliveryType == 1) {
  940. storeid = 0
  941. } else {
  942. storeid = that.storeId
  943. }
  944. } else {
  945. addressId = ''
  946. storeid = that.storeId
  947. }
  948. orderConfirm(that.cartId, that.news, addressId, shippingType, storeid, that.couponId, that.luckRecordId).then(res => {
  949. if (res.data.upgrade_addr == 1) {
  950. that.id = res.data.addressInfo.id
  951. this.isaddress = true
  952. }
  953. if (numType != 1) {
  954. that.$set(that, 'confirm', res.data.custom_form);
  955. }
  956. that.$set(that, 'goodsType', res.data.type);
  957. that.$set(that, 'userInfo', res.data.userInfo);
  958. that.$set(that, 'integral', res.data.userInfo.integral);
  959. that.$set(that, 'contacts', res.data.userInfo.real_name);
  960. that.$set(that, 'contactsTel', res.data.userInfo.record_phone || '');
  961. that.$set(that, 'integralRatio', res.data.integralRatio);
  962. that.$set(that, 'offlinePostage', res.data.offlinePostage);
  963. that.$set(that, 'orderKey', res.data.orderKey);
  964. that.$set(that, 'valid_count', res.data.valid_count);
  965. that.$set(that, 'discount_id', res.data.discount_id)
  966. that.$set(that, 'priceGroup', res.data.priceGroup);
  967. that.$set(that, 'seckillId', parseInt(res.data.seckill_id));
  968. that.$set(that, 'BargainId', parseInt(res.data.bargain_id));
  969. that.$set(that, 'combinationId', parseInt(res.data.combination_id));
  970. that.$set(that, 'discountId', parseInt(res.data.discount_id));
  971. // that.$set(that, 'invoice_func', res.data.invoice_func);
  972. that.$set(that, 'special_invoice', res.data.special_invoice);
  973. that.$set(that, 'integral_ratio_status', res.data.integral_ratio_status);
  974. that.$set(that, 'store_self_mention', res.data.store_self_mention);
  975. that.$set(that, 'store_func_status', res.data.store_func_status);
  976. that.giveData.give_integral = res.data.give_integral;
  977. that.giveData.give_coupon = res.data.give_coupon;
  978. let cartInfo = res.data.cartInfo;
  979. let cartObj = [],
  980. giftObj = [];
  981. cartInfo.forEach(item => {
  982. if (item.is_gift == 1) {
  983. giftObj.push(item)
  984. } else {
  985. cartObj.push(item)
  986. }
  987. })
  988. that.$set(that, 'cartInfo', cartObj);
  989. that.$set(that, 'giveCartInfo', giftObj);
  990. let giveType = -1;
  991. giftObj.forEach(item => {
  992. if (item.product_type == 0) {
  993. return giveType = 0
  994. }
  995. })
  996. that.$set(that, 'product_type', (res.data.product_type == 0 || giveType == 0) ? 0 : 1);
  997. //微信支付是否开启
  998. that.cartArr[0].payStatus = res.data.pay_weixin_open || 0
  999. //支付宝是否开启
  1000. that.cartArr[1].payStatus = res.data.ali_pay_status || 0;
  1001. //#ifdef MP
  1002. that.cartArr[1].payStatus = 0;
  1003. //#endif
  1004. //余额支付是否开启
  1005. // that.cartArr[2].title = '可用余额:' + res.data.userInfo.now_money;
  1006. that.cartArr[2].number = res.data.userInfo.now_money;
  1007. that.cartArr[2].payStatus = res.data.yue_pay_status == 1 ? res.data.yue_pay_status : 0
  1008. if (res.data.offline_pay_status == 2) {
  1009. that.cartArr[3].payStatus = 0
  1010. } else {
  1011. that.cartArr[3].payStatus = 1
  1012. }
  1013. // that.$set(that, 'cartArr', that.cartArr);
  1014. // that.$set(that, 'ChangePrice', that.totalPrice);
  1015. that.getBargainId();
  1016. // that.getCouponList();
  1017. // that.computedPrice();
  1018. if (this.addressId || this.couponId) {
  1019. // this.computedPrice();
  1020. } else {
  1021. // that.$set(that, 'totalPrice', that.$util.$h.Add(parseFloat(res.data.priceGroup
  1022. // .totalPrice),
  1023. // parseFloat(res.data
  1024. // .priceGroup.storePostage)));
  1025. }
  1026. }).catch(err => {
  1027. return this.$util.Tips({
  1028. title: err
  1029. });
  1030. });
  1031. },
  1032. /*
  1033. * 提取砍价和拼团id
  1034. */
  1035. getBargainId: function() {
  1036. let that = this;
  1037. // let cartINfo = that.cartInfo;
  1038. // let BargainId = 0;
  1039. // let combinationId = 0;
  1040. // let discountId = 0;
  1041. // cartINfo.forEach(function(value, index, cartINfo) {
  1042. // BargainId = cartINfo[index].bargain_id,
  1043. // combinationId = cartINfo[index].combination_id,
  1044. // discountId = cartINfo[index].discount_id
  1045. // })
  1046. // that.$set(that, 'BargainId', parseInt(BargainId));
  1047. // that.$set(that, 'combinationId', parseInt(combinationId));
  1048. // that.$set(that, 'discountId', parseInt(discountId));
  1049. if (that.cartArr.length == 3 && (that.BargainId || that.combinationId || that.seckillId || that
  1050. .discountId)) {
  1051. that.cartArr[2].payStatus = 0;
  1052. that.$set(that, 'cartArr', that.cartArr);
  1053. }
  1054. },
  1055. /**
  1056. * 获取当前金额可用优惠券
  1057. *
  1058. */
  1059. // getCouponList: function() {
  1060. // let that = this;
  1061. // let data = {
  1062. // cartId: this.cartId,
  1063. // 'new': this.news,
  1064. // shipping_type: that.$util.$h.Add(that.shippingType, 1),
  1065. // store_id: that.system_store ? that.system_store.id : 0
  1066. // }
  1067. // getCouponsOrderPrice(this.totalPrice, data).then(res => {
  1068. // that.$set(that.coupon, 'list', res.data);
  1069. // that.openType = 1;
  1070. // });
  1071. // },
  1072. /*
  1073. * 获取默认收货地址或者获取某条地址信息
  1074. */
  1075. getaddressInfo: function() {
  1076. let that = this;
  1077. if (that.addressId) {
  1078. getAddressDetail(that.addressId).then(res => {
  1079. res.data.is_default = parseInt(res.data.is_default);
  1080. that.addressInfo = res.data || {};
  1081. that.addressId = res.data.id || 0;
  1082. that.address.addressId = res.data.id || 0;
  1083. })
  1084. } else {
  1085. getAddressDefault().then(res => {
  1086. res.data.is_default = parseInt(res.data.is_default);
  1087. that.addressInfo = res.data || {};
  1088. that.addressId = res.data.id || 0;
  1089. that.address.addressId = res.data.id || 0;
  1090. })
  1091. }
  1092. },
  1093. payItem: function(e) {
  1094. let that = this;
  1095. let active = e;
  1096. that.active = active;
  1097. that.animated = true;
  1098. that.payType = that.cartArr[active].value;
  1099. // that.computedPrice();
  1100. setTimeout(function() {
  1101. that.car();
  1102. }, 500);
  1103. },
  1104. couponTap: function() {
  1105. this.coupon.coupon = true;
  1106. this.coupon.list.forEach((item, index) => {
  1107. if (item.id == this.couponId) {
  1108. item.is_use = 1
  1109. } else {
  1110. item.is_use = 0
  1111. }
  1112. })
  1113. this.$set(this.coupon, 'list', this.coupon.list);
  1114. },
  1115. car: function() {
  1116. let that = this;
  1117. that.animated = false;
  1118. },
  1119. onAddress: function(name) {
  1120. let that = this;
  1121. if (name) {
  1122. that.textareaStatus = false;
  1123. that.address.address = true;
  1124. that.pagesUrl = '/pages/users/user_address_list/index?news=' + this.news + '&cartId=' + this
  1125. .cartId +
  1126. '&pinkId=' +
  1127. this.pinkId +
  1128. '&couponId=' +
  1129. this.couponId + '&delivery_type=' + this.deliveryType + '&addressId=' + this.addressId +
  1130. '&store_id=' + this.storeId + '&store_name=' + this.system_store.name + '&product_id=' + this
  1131. .product_id
  1132. } else {
  1133. uni.navigateTo({
  1134. url: '/pages/users/user_address/index?new=' + this.news + '&cartId=' + this.cartId +
  1135. '&pinkId=' +
  1136. this.pinkId +
  1137. '&couponId=' +
  1138. this.couponId + '&delivery_type=' + this.deliveryType + '&addressId=' + this
  1139. .addressId + '&store_id=' + this.storeId + '&store_name=' + this.system_store
  1140. .name + '&product_id=' + this.product_id
  1141. })
  1142. }
  1143. },
  1144. payment: function(data) {
  1145. let that = this;
  1146. orderCreate(that.orderKey, data).then(res => {
  1147. let status = res.data.status,
  1148. orderId = res.data.result.orderId,
  1149. jsConfig = res.data.result.jsConfig,
  1150. goPages = '/pages/goods/order_pay_status/index?order_id=' + orderId + '&msg=' + res
  1151. .msg +
  1152. '&type=3' + '&totalPrice=' + this.totalPrice
  1153. switch (status) {
  1154. case 'ORDER_EXIST':
  1155. case 'EXTEND_ORDER':
  1156. case 'PAY_ERROR':
  1157. uni.hideLoading();
  1158. return that.$util.Tips({
  1159. title: res.msg
  1160. }, {
  1161. tab: 5,
  1162. url: goPages
  1163. });
  1164. break;
  1165. case 'SUCCESS':
  1166. uni.hideLoading();
  1167. if (that.BargainId || that.combinationId || that.pinkId || that.seckillId || that
  1168. .discountId)
  1169. return that.$util.Tips({
  1170. title: res.msg,
  1171. icon: 'success'
  1172. }, {
  1173. tab: 4,
  1174. url: goPages
  1175. });
  1176. return that.$util.Tips({
  1177. title: res.msg,
  1178. icon: 'success'
  1179. }, {
  1180. tab: 5,
  1181. url: goPages
  1182. });
  1183. break;
  1184. case 'WECHAT_PAY':
  1185. that.toPay = true;
  1186. // #ifdef MP
  1187. /* that.toPay = true; */
  1188. let mp_pay_name = ''
  1189. if (uni.requestOrderPayment) {
  1190. mp_pay_name = 'requestOrderPayment'
  1191. } else {
  1192. mp_pay_name = 'requestPayment'
  1193. }
  1194. uni[mp_pay_name]({
  1195. timeStamp: jsConfig.timestamp,
  1196. nonceStr: jsConfig.nonceStr,
  1197. package: jsConfig.package,
  1198. signType: jsConfig.signType,
  1199. paySign: jsConfig.paySign,
  1200. success: function(res) {
  1201. uni.hideLoading();
  1202. if (that.BargainId || that.combinationId || that.pinkId || that
  1203. .seckillId || that.discountId)
  1204. return that.$util.Tips({
  1205. title: '支付成功',
  1206. icon: 'success'
  1207. }, {
  1208. tab: 4,
  1209. url: goPages
  1210. });
  1211. return that.$util.Tips({
  1212. title: '支付成功',
  1213. icon: 'success'
  1214. }, {
  1215. tab: 5,
  1216. url: goPages
  1217. });
  1218. },
  1219. fail: function(e) {
  1220. uni.hideLoading();
  1221. return that.$util.Tips({
  1222. title: '取消支付'
  1223. }, {
  1224. tab: 5,
  1225. url: goPages + '&status=2'
  1226. });
  1227. },
  1228. complete: function(e) {
  1229. uni.hideLoading();
  1230. //关闭当前页面跳转至订单状态
  1231. if (res.errMsg == 'requestPayment:cancel') return that.$util
  1232. .Tips({
  1233. title: '取消支付'
  1234. }, {
  1235. tab: 5,
  1236. url: goPages + '&status=2'
  1237. });
  1238. },
  1239. })
  1240. // #endif
  1241. // #ifdef H5
  1242. this.$wechat.pay(res.data.result.jsConfig).then(res => {
  1243. return that.$util.Tips({
  1244. title: '支付成功',
  1245. icon: 'success'
  1246. }, {
  1247. tab: 5,
  1248. url: goPages
  1249. });
  1250. }).catch(res => {
  1251. if (!this.$wechat.isWeixin()) {
  1252. uni.redirectTo({
  1253. url: goPages +
  1254. '&msg=支付失败&status=2'
  1255. })
  1256. }
  1257. if (res.errMsg == 'chooseWXPay:cancel') return that.$util.Tips({
  1258. title: '取消支付'
  1259. }, {
  1260. tab: 5,
  1261. url: goPages + '&status=2'
  1262. });
  1263. })
  1264. // #endif
  1265. // #ifdef APP-PLUS
  1266. uni.requestPayment({
  1267. provider: 'wxpay',
  1268. orderInfo: jsConfig,
  1269. success: (e) => {
  1270. let url = goPages;
  1271. uni.showToast({
  1272. title: "支付成功"
  1273. })
  1274. setTimeout(res => {
  1275. uni.redirectTo({
  1276. url: url
  1277. })
  1278. }, 2000)
  1279. },
  1280. fail: (e) => {
  1281. let url = '/pages/goods/order_pay_status/index?order_id=' +
  1282. orderId +
  1283. '&msg=支付失败';
  1284. uni.showModal({
  1285. content: "支付失败",
  1286. showCancel: false,
  1287. success: function(res) {
  1288. if (res.confirm) {
  1289. uni.redirectTo({
  1290. url: url
  1291. })
  1292. } else if (res.cancel) {
  1293. console.log('用户点击取消');
  1294. }
  1295. }
  1296. })
  1297. },
  1298. complete: () => {
  1299. uni.hideLoading();
  1300. },
  1301. });
  1302. // #endif
  1303. break;
  1304. case 'PAY_DEFICIENCY':
  1305. uni.hideLoading();
  1306. //余额不足
  1307. return that.$util.Tips({
  1308. title: res.msg
  1309. }, {
  1310. tab: 5,
  1311. url: goPages + '&status=1'
  1312. });
  1313. break;
  1314. case "WECHAT_H5_PAY":
  1315. uni.hideLoading();
  1316. that.$util.Tips({
  1317. title: '订单创建成功!'
  1318. }, {
  1319. tab: 4,
  1320. url: goPages + '&status=0'
  1321. });
  1322. setTimeout(() => {
  1323. location.href = res.data.result.jsConfig.mweb_url;
  1324. }, 2000);
  1325. break;
  1326. case 'ALIPAY_PAY':
  1327. //#ifdef H5
  1328. if (this.from === 'weixin') {
  1329. uni.redirectTo({
  1330. url: `/pages/users/alipay_invoke/index?id=${orderId}&pay_key=${res.data.result.pay_key}`
  1331. });
  1332. } else {
  1333. uni.hideLoading();
  1334. that.formContent = res.data.result.jsConfig;
  1335. that.$nextTick(() => {
  1336. document.getElementById('alipaysubmit').submit();
  1337. })
  1338. }
  1339. //#endif
  1340. // #ifdef MP
  1341. uni.navigateTo({
  1342. url: `/pages/users/alipay_invoke/index?id=${orderId}&link=${jsConfig.qrCode}`
  1343. });
  1344. // #endif
  1345. // #ifdef APP-PLUS
  1346. uni.requestPayment({
  1347. provider: 'alipay',
  1348. orderInfo: jsConfig,
  1349. success: (e) => {
  1350. uni.showToast({
  1351. title: "支付成功"
  1352. })
  1353. let url = '/pages/goods/order_pay_status/index?order_id=' +
  1354. orderId +
  1355. '&msg=支付成功';
  1356. setTimeout(res => {
  1357. uni.redirectTo({
  1358. url: url
  1359. })
  1360. }, 2000)
  1361. },
  1362. fail: (e) => {
  1363. let url = '/pages/goods/order_pay_status/index?order_id=' +
  1364. orderId +
  1365. '&msg=支付失败';
  1366. uni.showModal({
  1367. content: "支付失败",
  1368. showCancel: false,
  1369. success: function(res) {
  1370. if (res.confirm) {
  1371. uni.redirectTo({
  1372. url: url
  1373. })
  1374. } else if (res.cancel) {
  1375. console.log('用户点击取消');
  1376. }
  1377. }
  1378. })
  1379. },
  1380. complete: () => {
  1381. uni.hideLoading();
  1382. },
  1383. });
  1384. // #endif
  1385. break;
  1386. }
  1387. }).catch(err => {
  1388. uni.hideLoading();
  1389. return that.$util.Tips({
  1390. title: err
  1391. });
  1392. });
  1393. },
  1394. clickTextArea() {
  1395. this.$refs.textarea.focus()
  1396. },
  1397. bindDateChange: function(e, index) {
  1398. this.confirm[index].value = e.target.value
  1399. },
  1400. bindTimeChange: function(e, index) {
  1401. this.confirm[index].value = e.target.value
  1402. },
  1403. SubOrder: function(e) {
  1404. let that = this,
  1405. data = {};
  1406. if (!that.payType) return that.$util.Tips({
  1407. title: '请选择支付方式'
  1408. });
  1409. if (!that.addressId && !that.shippingType && !that.product_type) return that.$util.Tips({
  1410. title: '请选择收货地址'
  1411. });
  1412. if (that.shippingType == 1) {
  1413. if (that.contacts == "" || that.contactsTel == "") {
  1414. return that.$util.Tips({
  1415. title: '请填写联系人或联系人电话'
  1416. });
  1417. }
  1418. if (!/^1(3|4|5|7|8|9|6)\d{9}$/.test(that.contactsTel)) {
  1419. return that.$util.Tips({
  1420. title: '请填写正确的手机号'
  1421. });
  1422. }
  1423. if (!/^[\u4e00-\u9fa5\w]{2,16}$/.test(that.contacts)) {
  1424. return that.$util.Tips({
  1425. title: '请填写您的真实姓名'
  1426. });
  1427. }
  1428. if (that.storeList.length == 0) return that.$util.Tips({
  1429. title: '暂无门店,请选择其他方式'
  1430. });
  1431. }
  1432. for (var i = 0; i < that.confirm.length; i++) {
  1433. let data = that.confirm[i]
  1434. if (data.status || (data.label !== 'img' && data.value && data.value.trim())) {
  1435. if (data.label === 'text' || data.label === 'data' || data.label === 'time') {
  1436. if (!data.value || (data.value && !data.value.trim())) {
  1437. return that.$util.Tips({
  1438. title: `请填写${data.title}`
  1439. });
  1440. }
  1441. }
  1442. if (data.label === 'number') {
  1443. if (data.value <= 0) {
  1444. return that.$util.Tips({
  1445. title: `请填写大于0的${data.title}`
  1446. });
  1447. }
  1448. }
  1449. if (data.label === 'email') {
  1450. if (!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(data.value)) {
  1451. return that.$util.Tips({
  1452. title: `请填写正确的${data.title}`
  1453. });
  1454. }
  1455. }
  1456. if (data.label === 'phone') {
  1457. if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(data.value)) {
  1458. return that.$util.Tips({
  1459. title: `请填写正确的${data.title}`
  1460. });
  1461. }
  1462. }
  1463. if (data.label === 'id') {
  1464. if (!
  1465. /^[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
  1466. .test(data.value)) {
  1467. return that.$util.Tips({
  1468. title: `请填写正确的${data.title}`
  1469. });
  1470. }
  1471. }
  1472. if (data.label === 'img') {
  1473. if (!data.value.length) {
  1474. return that.$util.Tips({
  1475. title: `请上传${data.title}`
  1476. });
  1477. }
  1478. }
  1479. }
  1480. }
  1481. data = {
  1482. custom_form: that.confirm,
  1483. real_name: that.contacts,
  1484. phone: that.contactsTel,
  1485. addressId: that.addressId,
  1486. formId: '',
  1487. couponId: that.priceGroup.couponPrice == 0 ? 0 : that.couponId,
  1488. payType: that.payType,
  1489. useIntegral: that.useIntegral,
  1490. bargainId: that.BargainId,
  1491. combinationId: that.combinationId,
  1492. discountId: that.discountId,
  1493. pinkId: that.pinkId,
  1494. seckill_id: that.seckillId,
  1495. mark: that.mark,
  1496. store_id: that.deliveryType == 1 ? 0 : that.system_store.id || 0,
  1497. 'from': that.from,
  1498. shipping_type: that.$util.$h.Add(that.shippingType, 1),
  1499. 'new': that.news,
  1500. 'invoice_id': that.invChecked,
  1501. // #ifdef H5
  1502. quitUrl: location.protocol + '//' + location.hostname +
  1503. '/pages/goods/order_pay_status/index?' +
  1504. '&type=3' + '&totalPrice=' + this.totalPrice
  1505. // #endif
  1506. // #ifdef APP-PLUS
  1507. quitUrl: '/pages/goods/order_details/index?order_id=' + this.order_id
  1508. // #endif
  1509. };
  1510. if (data.payType == 'yue' && parseFloat(that.userInfo.now_money) < parseFloat(that.totalPrice))
  1511. return that.$util.Tips({
  1512. title: '余额不足!'
  1513. });
  1514. uni.showLoading({
  1515. title: '订单支付中'
  1516. });
  1517. // #ifdef MP
  1518. openPaySubscribe().then(() => {
  1519. that.payment(data);
  1520. });
  1521. // #endif
  1522. // #ifndef MP
  1523. that.payment(data);
  1524. // #endif
  1525. }
  1526. }
  1527. }
  1528. </script>
  1529. <style lang="scss" scoped>
  1530. .height-add {
  1531. height: calc(120rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  1532. height: calc(120rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  1533. }
  1534. /deep/uni-checkbox[disabled] .uni-checkbox-input {
  1535. background-color: #eee;
  1536. }
  1537. .confirmImg {
  1538. width: 100%;
  1539. }
  1540. /deep/.orderGoods {
  1541. margin-top: 20rpx;
  1542. border-radius: 14rpx;
  1543. }
  1544. .confirmImg .upload {
  1545. padding-bottom: 36rpx;
  1546. }
  1547. .confirmImg .upload .pictrue {
  1548. margin: 22rpx 23rpx 0 0;
  1549. width: 156rpx;
  1550. height: 156rpx;
  1551. position: relative;
  1552. font-size: 24rpx;
  1553. color: #bbb;
  1554. }
  1555. .confirmImg .upload .pictrue:nth-of-type(4n) {
  1556. margin-right: 0;
  1557. }
  1558. .confirmImg .upload .pictrue image {
  1559. width: 100%;
  1560. height: 100%;
  1561. border-radius: 3rpx;
  1562. }
  1563. .confirmImg .upload .pictrue .icon-guanbi1 {
  1564. position: absolute;
  1565. font-size: 45rpx;
  1566. top: -10rpx;
  1567. right: -10rpx;
  1568. }
  1569. .confirmImg .upload .pictrue .icon-icon25201 {
  1570. color: #bfbfbf;
  1571. font-size: 50rpx;
  1572. }
  1573. .confirmImg .upload .pictrue:nth-last-child(1) {
  1574. border: 1rpx solid #ddd;
  1575. box-sizing: border-box;
  1576. }
  1577. .alipaysubmit {
  1578. display: none;
  1579. }
  1580. .order-submission .line {
  1581. width: 100%;
  1582. height: 4rpx;
  1583. }
  1584. .order-submission .line image {
  1585. width: 100%;
  1586. height: 100%;
  1587. display: block;
  1588. }
  1589. .order-submission .headerCon {
  1590. background-color: #fff;
  1591. box-sizing: border-box;
  1592. .icon-s-bianji {
  1593. width: 44rpx;
  1594. height: 44rpx;
  1595. background: #F5F5F5;
  1596. border-radius: 50%;
  1597. text-align: center;
  1598. line-height: 44rpx;
  1599. font-size: 17rpx;
  1600. color: #666;
  1601. }
  1602. .add-title {
  1603. height: 72rpx;
  1604. padding: 0 26rpx;
  1605. border-bottom: 1px solid #eee;
  1606. .icon {
  1607. height: 32rpx;
  1608. background: #1890FF;
  1609. border-radius: 4rpx;
  1610. font-size: 20rpx;
  1611. font-weight: 400;
  1612. color: #FFFFFF;
  1613. text-align: center;
  1614. line-height: 32rpx;
  1615. padding: 0 6rpx;
  1616. &.orange {
  1617. background: #FE960F;
  1618. }
  1619. &.red {
  1620. background: #E93323;
  1621. }
  1622. }
  1623. .add-text {
  1624. margin-left: 14rpx;
  1625. width: 360rpx;
  1626. }
  1627. .text {
  1628. font-size: 24rpx;
  1629. font-weight: 400;
  1630. color: #999999;
  1631. .icon-jiantou {
  1632. display: inline-block;
  1633. font-size: 20rpx;
  1634. }
  1635. }
  1636. }
  1637. }
  1638. .order-submission .address {
  1639. padding: 0 26rpx;
  1640. height: 130rpx;
  1641. .icon {
  1642. .iconfont {
  1643. width: 44rpx;
  1644. height: 44rpx;
  1645. background: var(--view-minorColorT);
  1646. font-size: 20rpx;
  1647. border-radius: 50%;
  1648. text-align: center;
  1649. line-height: 44rpx;
  1650. color: var(--view-theme);
  1651. margin-left: 26rpx;
  1652. }
  1653. }
  1654. }
  1655. .order-submission .address .addressCon {
  1656. width: 502rpx;
  1657. font-size: 26rpx;
  1658. color: #666;
  1659. }
  1660. .order-submission .address .addressCon .name {
  1661. font-size: 30rpx;
  1662. color: #282828;
  1663. font-weight: bold;
  1664. margin-bottom: 10rpx;
  1665. .nameCon {
  1666. max-width: 244rpx;
  1667. &.on {
  1668. max-width: unset;
  1669. }
  1670. }
  1671. }
  1672. .order-submission .address .addressCon .name .phone {
  1673. margin-left: 50rpx;
  1674. }
  1675. .order-submission .address .addressCon .default {
  1676. margin-right: 12rpx;
  1677. }
  1678. .order-submission .address .addressCon .setaddress {
  1679. color: #333;
  1680. font-size: 28rpx;
  1681. }
  1682. .order-submission .allAddress {
  1683. width: 100%;
  1684. background: linear-gradient(to bottom, var(--view-theme) 0%, #f5f5f5 100%);
  1685. display: flex;
  1686. flex-direction: column;
  1687. justify-content: center;
  1688. align-items: center;
  1689. padding-top: 24rpx;
  1690. }
  1691. .order-submission .allAddress .nav {
  1692. width: 710rpx;
  1693. // margin: 0 auto;
  1694. }
  1695. .order-submission .allAddress .nav .item {
  1696. width: 355rpx;
  1697. }
  1698. .order-submission .allAddress .nav .item.on {
  1699. position: relative;
  1700. width: 250rpx;
  1701. }
  1702. .order-submission .allAddress .nav .item.on::before {
  1703. position: absolute;
  1704. bottom: 0;
  1705. content: "快递配送";
  1706. font-size: 28rpx;
  1707. display: block;
  1708. height: 0;
  1709. width: 336rpx;
  1710. border-width: 0 20rpx 80rpx 0;
  1711. border-style: none solid solid;
  1712. border-color: transparent transparent #fff;
  1713. z-index: 2;
  1714. border-radius: 7rpx 30rpx 0 0;
  1715. text-align: center;
  1716. // line-height: 80rpx;
  1717. }
  1718. .header-title {
  1719. font-size: 36rpx;
  1720. font-weight: 600;
  1721. color: #FFFFFF;
  1722. }
  1723. .order-submission .allAddress .nav .item:nth-of-type(2).on::before {
  1724. content: "到店自提";
  1725. border-width: 0 0 80rpx 20rpx;
  1726. border-radius: 30rpx 7rpx 0 0;
  1727. }
  1728. .order-submission .allAddress .nav .item.on2 {
  1729. position: relative;
  1730. }
  1731. .order-submission .allAddress .nav .item.on2::before {
  1732. position: absolute;
  1733. bottom: 0;
  1734. content: "到店自提";
  1735. font-size: 28rpx;
  1736. display: block;
  1737. height: 0;
  1738. width: 400rpx;
  1739. border-width: 0 0 60rpx 60rpx;
  1740. border-style: none solid solid;
  1741. border-color: transparent transparent rgba(255, 255, 255, 0.6);
  1742. border-radius: 40rpx 6rpx 0 0;
  1743. text-align: center;
  1744. // line-height: 60rpx;
  1745. }
  1746. .order-submission .allAddress .nav .item:nth-of-type(1).on2::before {
  1747. content: "快递配送";
  1748. border-width: 0 60rpx 60rpx 0;
  1749. border-radius: 6rpx 40rpx 0 0;
  1750. }
  1751. .order-submission .allAddress .headerCon {
  1752. width: 710rpx;
  1753. margin: 0 auto;
  1754. border-radius: 14rpx;
  1755. background-color: #fff;
  1756. }
  1757. .order-submission .allAddress .line {
  1758. width: 710rpx;
  1759. margin: 0 auto;
  1760. }
  1761. .order-submission .wrapper .item .discount .placeholder {
  1762. color: #ccc;
  1763. }
  1764. .placeholder-textarea {
  1765. position: relative;
  1766. .placeholder {
  1767. position: absolute;
  1768. color: #ccc;
  1769. top: 26rpx;
  1770. left: 30rpx;
  1771. }
  1772. }
  1773. .order-submission .wrapper {
  1774. background-color: #fff;
  1775. width: 710rpx;
  1776. border-radius: 14rpx;
  1777. margin: 0 auto;
  1778. margin-top: 14rpx;
  1779. }
  1780. .order-submission .wrapper .item .name {
  1781. position: relative;
  1782. width: 190rpx;
  1783. }
  1784. .order-submission .wrapper .item .asterisk {
  1785. position: absolute;
  1786. color: red;
  1787. left: -15rpx
  1788. }
  1789. .order-submission .wrapper .item {
  1790. padding: 27rpx 30rpx;
  1791. font-size: 30rpx;
  1792. color: #282828;
  1793. border-bottom: 1px solid #f0f0f0;
  1794. }
  1795. .order-submission .wrapper .item .discount {
  1796. font-size: 30rpx;
  1797. color: #999;
  1798. }
  1799. .order-submission .wrapper .item .discount input {
  1800. text-align: right;
  1801. width: 450rpx;
  1802. }
  1803. .order-submission .wrapper .item .discount .iconfont {
  1804. color: #515151;
  1805. font-size: 30rpx;
  1806. margin-left: 15rpx;
  1807. }
  1808. .order-submission .wrapper .item .discount .num {
  1809. font-size: 32rpx;
  1810. margin-right: 20rpx;
  1811. }
  1812. .order-submission .wrapper .item .shipping {
  1813. font-size: 30rpx;
  1814. color: #999;
  1815. position: relative;
  1816. padding-right: 58rpx;
  1817. }
  1818. .order-submission .wrapper .item .shipping .iconfont {
  1819. font-size: 35rpx;
  1820. color: #707070;
  1821. position: absolute;
  1822. right: 0;
  1823. top: 50%;
  1824. transform: translateY(-50%);
  1825. margin-left: 30rpx;
  1826. }
  1827. .order-submission .wrapper .item textarea {
  1828. background-color: #f9f9f9;
  1829. width: 690rpx;
  1830. height: 140rpx;
  1831. border-radius: 3rpx;
  1832. margin-top: 30rpx;
  1833. padding: 25rpx 28rpx;
  1834. box-sizing: border-box;
  1835. }
  1836. .order-submission .wrapper .item .placeholder {
  1837. color: #ccc;
  1838. }
  1839. .order-submission .wrapper .item .list {
  1840. margin-top: 35rpx;
  1841. }
  1842. .order-submission .wrapper .item .list .payItem {
  1843. border: 1px solid #eee;
  1844. border-radius: 6rpx;
  1845. height: 86rpx;
  1846. width: 100%;
  1847. box-sizing: border-box;
  1848. margin-top: 20rpx;
  1849. font-size: 28rpx;
  1850. color: #282828;
  1851. }
  1852. .order-submission .wrapper .item .list .payItem.on {
  1853. border-color: #fc5445;
  1854. color: #e93323;
  1855. }
  1856. .order-submission .wrapper .item .list .payItem .name {
  1857. width: 50%;
  1858. text-align: center;
  1859. border-right: 1px solid #eee;
  1860. padding-left: 80rpx;
  1861. }
  1862. .order-submission .wrapper .item .list .payItem .name .iconfont {
  1863. width: 44rpx;
  1864. height: 44rpx;
  1865. border-radius: 50%;
  1866. text-align: center;
  1867. line-height: 44rpx;
  1868. background-color: #fe960f;
  1869. color: #fff;
  1870. font-size: 30rpx;
  1871. margin-right: 15rpx;
  1872. }
  1873. .order-submission .wrapper .item .list .payItem .name .iconfont.icon-weixin2 {
  1874. background-color: #41b035;
  1875. }
  1876. .order-submission .wrapper .item .list .payItem .name .iconfont.icon-zhifubao {
  1877. background-color: #1677FF;
  1878. }
  1879. .order-submission .wrapper .item .list .payItem .tip {
  1880. width: 49%;
  1881. text-align: center;
  1882. font-size: 26rpx;
  1883. color: #aaa;
  1884. }
  1885. .order-submission .moneyList {
  1886. background-color: #fff;
  1887. padding: 30rpx;
  1888. width: 710rpx;
  1889. border-radius: 14rpx;
  1890. margin: 0 auto;
  1891. margin-top: 14rpx;
  1892. }
  1893. .order-submission .moneyList .item {
  1894. font-size: 28rpx;
  1895. color: #282828;
  1896. }
  1897. .order-submission .moneyList .item~.item {
  1898. margin-top: 20rpx;
  1899. }
  1900. .order-submission .moneyList .item .money {
  1901. color: #868686;
  1902. }
  1903. .order-submission .footer {
  1904. width: 100%;
  1905. height: 100rpx;
  1906. background-color: #fff;
  1907. padding: 0 30rpx;
  1908. font-size: 28rpx;
  1909. color: #333;
  1910. box-sizing: border-box;
  1911. position: fixed;
  1912. bottom: 0;
  1913. left: 0;
  1914. z-index: 9;
  1915. height: calc(100rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  1916. height: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  1917. padding-bottom: calc(0rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  1918. padding-bottom: calc(0rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  1919. }
  1920. .order-submission .footer .settlement {
  1921. font-size: 30rpx;
  1922. color: #fff;
  1923. width: 240rpx;
  1924. height: 70rpx;
  1925. background-color: var(--view-theme);
  1926. border-radius: 50rpx;
  1927. text-align: center;
  1928. line-height: 70rpx;
  1929. }
  1930. .footer .transparent {
  1931. opacity: 0
  1932. }
  1933. .tipaddress {
  1934. position: fixed;
  1935. left: 13%;
  1936. top: 25%;
  1937. // margin-left: -283rpx;
  1938. width: 560rpx;
  1939. height: 614rpx;
  1940. background-color: #fff;
  1941. border-radius: 10rpx;
  1942. z-index: 100;
  1943. text-align: center;
  1944. .top {
  1945. width: 560rpx;
  1946. height: 270rpx;
  1947. border-top-left-radius: 10rpx;
  1948. border-top-right-radius: 10rpx;
  1949. // background-image: url(../../../static/images/address.png);
  1950. background-repeat: round;
  1951. background-color: var(--view-theme);
  1952. .tipsphoto {
  1953. display: inline-block;
  1954. width: 200rpx;
  1955. height: 200rpx;
  1956. margin-top: 73rpx;
  1957. }
  1958. }
  1959. .bottom {
  1960. font-size: 32rpx;
  1961. font-weight: 400;
  1962. .font1 {
  1963. font-size: 36rpx;
  1964. font-weight: 600;
  1965. color: #333333;
  1966. margin: 32rpx 0rpx 22rpx;
  1967. }
  1968. .font2 {
  1969. color: #666666;
  1970. margin-bottom: 48rpx;
  1971. }
  1972. .btn {
  1973. width: 360rpx;
  1974. height: 82rpx;
  1975. border-radius: 42rpx;
  1976. background: linear-gradient(to left, var(--view-theme) 0%, #f5f5f5 100%);
  1977. color: #FFFFFF;
  1978. line-height: 82rpx;
  1979. margin: 0 auto;
  1980. }
  1981. }
  1982. }
  1983. .mark {
  1984. position: fixed;
  1985. top: 0;
  1986. left: 0;
  1987. bottom: 0;
  1988. right: 0;
  1989. background: rgba(0, 0, 0, 0.5);
  1990. z-index: 99;
  1991. }
  1992. </style>