index.vue 64 KB

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