index.vue 55 KB

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