integral_order.vue 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620
  1. <template>
  2. <view :style="colorStyle">
  3. <view class='order-submission'>
  4. <view class="allAddress" :style="store_self_mention ? '':'padding-top:10rpx'" v-if="!product_type">
  5. <view class='address acea-row row-between-wrapper' @tap='onAddress' v-if='shippingType == 0'>
  6. <view class='addressCon' v-if="addressInfo.real_name">
  7. <view class='name'>{{addressInfo.real_name}}
  8. <text class='phone'>{{addressInfo.phone}}</text>
  9. </view>
  10. <view class="line1">
  11. <text class='default font-num'
  12. v-if="addressInfo.is_default">[默认]</text>{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{addressInfo.detail}}
  13. </view>
  14. <!-- <view class='setaddress'>设置收货地址</view> -->
  15. </view>
  16. <view class='addressCon' v-else>
  17. <view class='setaddress'>设置收货地址</view>
  18. </view>
  19. <view class='iconfont icon-jiantou'></view>
  20. </view>
  21. <view class='line'>
  22. <image src='/static/images/line.jpg'></image>
  23. </view>
  24. </view>
  25. <view class="orderGoods" :class="product_type?'on':''">
  26. <view class='total'>共{{resData.num}}件商品</view>
  27. <view class='goodWrapper'>
  28. <view class='item acea-row row-between-wrapper' @click="jumpCon(cartInfo.product_id)">
  29. <view class='pictrue'>
  30. <image :src='cartInfo.image'></image>
  31. </view>
  32. <view class='text'>
  33. <view class='acea-row row-between-wrapper'>
  34. <view class='name line1'>{{cartInfo.store_name}}</view>
  35. <view class='num'>x {{resData.num}}</view>
  36. </view>
  37. <view class='attr line1' v-if="cartInfo.attrInfo">{{cartInfo.attrInfo.suk}}
  38. </view>
  39. <view class='money font-color' v-if="cartInfo.attrInfo">
  40. <text v-if="parseFloat(cartInfo.attrInfo.integral)">{{cartInfo.attrInfo.integral}}积分</text>
  41. <text v-if="parseFloat(cartInfo.attrInfo.integral) && parseFloat(cartInfo.attrInfo.price)">+</text>
  42. <text v-if="parseFloat(cartInfo.attrInfo.price)">{{cartInfo.attrInfo.price}}元</text>
  43. </view>
  44. <view class='money font-color' v-else>
  45. <text v-if="parseFloat(cartInfo.integral)">{{cartInfo.integral}}积分</text>
  46. <text v-if="parseFloat(cartInfo.integral) && parseFloat(cartInfo.price)">+</text>
  47. <text v-if="parseFloat(cartInfo.price)">{{cartInfo.price}}元</text>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. <view class='wrapper' v-if="confirm.length">
  54. <view class='item acea-row row-between-wrapper' :class="{on:(item.name=='radios' || item.name=='checkboxs'),on2:item.name == 'dateranges',on3:item.name == 'citys'}" v-for="(item,index) in confirm" :key="index">
  55. <view class="name">
  56. <span class="asterisk" v-if="item.titleShow.val">*</span>
  57. {{ item.titleConfig.value }}
  58. </view>
  59. <!-- radio -->
  60. <view v-if="item.name=='radios'" class="discount">
  61. <radio-group @change="radioChange(e, index, item)" class="acea-row row-middle row-right">
  62. <label class="radio" v-for="(j,jindex) in item.wordsConfig.list" :key="jindex">
  63. <view class="acea-row row-middle">
  64. <!-- #ifndef MP -->
  65. <radio :value="jindex.toString()" :checked='j.show'/>
  66. <!-- #endif -->
  67. <!-- #ifdef MP -->
  68. <radio :value="jindex" :checked='j.show'/>
  69. <!-- #endif -->
  70. <view>{{j.val}}</view>
  71. </view>
  72. </label>
  73. </radio-group>
  74. </view>
  75. <!-- checkbox -->
  76. <view v-if="item.name=='checkboxs'" class="discount">
  77. <checkbox-group @change="checkboxChange($event, index, item)" class="acea-row row-middle row-right">
  78. <label class="radio" v-for="(j,jindex) in item.wordsConfig.list" :key="jindex">
  79. <view class="acea-row row-middle">
  80. <!-- #ifndef MP -->
  81. <checkbox :value="jindex.toString()" :checked="j.show" style="transform:scale(0.9)" />
  82. <!-- #endif -->
  83. <!-- #ifdef MP -->
  84. <checkbox :value="jindex" :checked="j.show" style="transform:scale(0.9)" />
  85. <!-- #endif -->
  86. <view>{{j.val}}</view>
  87. </view>
  88. </label>
  89. </checkbox-group>
  90. </view>
  91. <!-- text -->
  92. <view v-if="item.name=='texts' && item.valConfig.tabVal == 0" class="discount">
  93. <input type="text" :placeholder="item.tipConfig.value" placeholder-class="placeholder" v-model="item.value" />
  94. </view>
  95. <!-- number -->
  96. <view v-if="item.name=='texts' && item.valConfig.tabVal == 4" class="discount">
  97. <input type="number" :placeholder="item.tipConfig.value" placeholder-class="placeholder" v-model="item.value" />
  98. </view>
  99. <!-- email -->
  100. <view v-if="item.name=='texts' && item.valConfig.tabVal == 3" class="discount">
  101. <input type="text" :placeholder="item.tipConfig.value" placeholder-class="placeholder" v-model="item.value" />
  102. </view>
  103. <!-- data -->
  104. <view v-if="item.name=='dates'" class="discount">
  105. <picker mode="date" :value="item.value" @change="bindDateChange($event,index)">
  106. <view class="acea-row row-between-wrapper">
  107. <view v-if="item.value == ''">{{item.tipConfig.value}}</view>
  108. <view v-else>{{item.value}}</view>
  109. <text class='iconfont icon-jiantou'></text>
  110. </view>
  111. </picker>
  112. </view>
  113. <!-- dateranges -->
  114. <view v-if="item.name=='dateranges'" class="discount">
  115. <uni-datetime-picker v-model="item.value" type="daterange" @maskClick="maskClick">
  116. {{item.value.length?item.value[0]+' - '+item.value[1]:item.tipConfig.value}}
  117. <text class='iconfont icon-jiantou'></text>
  118. </uni-datetime-picker>
  119. </view>
  120. <!-- time -->
  121. <view v-if="item.name=='times'" class="discount">
  122. <picker mode="time" :value="item.value" @change="bindTimeChange($event,index)"
  123. :placeholder="item.tipConfig.value">
  124. <view class="acea-row row-between-wrapper">
  125. <view v-if="item.value == ''">{{item.tipConfig.value}}</view>
  126. <view v-else>{{item.value}}</view>
  127. <text class='iconfont icon-jiantou'></text>
  128. </view>
  129. </picker>
  130. </view>
  131. <!-- timeranges -->
  132. <view v-if="item.name=='timeranges'" class="discount acea-row row-between-wrapper" @click="getTimeranges(index)">
  133. <view v-if="item.value">{{item.value}}</view>
  134. <view v-else>{{item.tipConfig.value}}</view>
  135. <text class='iconfont icon-jiantou'></text>
  136. </view>
  137. <!-- select -->
  138. <view v-if="item.name=='selects'" class="discount">
  139. <picker :value="item.value" :range="item.wordsConfig.list" @change="bindSelectChange($event,index,item)" range-key="val">
  140. <view class="acea-row row-between-wrapper">
  141. <view v-if="item.value == ''">请选择</view>
  142. <view v-else>{{item.value}}</view>
  143. <text class='iconfont icon-jiantou'></text>
  144. </view>
  145. </picker>
  146. </view>
  147. <!-- city -->
  148. <view v-if="item.name=='citys'" class="discount" @click="changeRegion(index)">
  149. <view class="acea-row row-middle row-right">
  150. <view class="city" v-if="item.value == ''">{{item.tipConfig.value}}</view>
  151. <view class="city" v-else>{{item.value}}</view>
  152. <text class='iconfont icon-jiantou'></text>
  153. </view>
  154. </view>
  155. <!-- id -->
  156. <view v-if="item.name=='texts' && item.valConfig.tabVal == 2" class="discount">
  157. <input type="idcard" :placeholder="item.tipConfig.value" placeholder-class="placeholder" v-model="item.value" />
  158. </view>
  159. <!-- phone -->
  160. <view v-if="item.name=='texts' && item.valConfig.tabVal == 1" class="discount">
  161. <input type="number" :placeholder="item.tipConfig.value" placeholder-class="placeholder" v-model="item.value" />
  162. </view>
  163. <!-- img -->
  164. <view v-if="item.name=='uploadPicture'" class="confirmImg">
  165. <view class='upload acea-row row-middle'>
  166. <view class='pictrue' v-for="(items,indexs) in item.value" :key="indexs">
  167. <image :src='items' mode="aspectFill"></image>
  168. <!-- <view class='iconfont icon-guanbi1 font-num' @tap='DelPic(index,indexs)'></view> -->
  169. <view class="close acea-row row-center-wrapper" @tap='DelPic(index,indexs)'>
  170. <view class="iconfont icon-guanbi5"></view>
  171. </view>
  172. </view>
  173. <view class='pictrue acea-row row-center-wrapper row-column' @tap='uploadpic(index)'
  174. v-if="item.value.length < item.numConfig.val">
  175. <text class='iconfont icon-icon25201'></text>
  176. <view>上传图片</view>
  177. </view>
  178. </view>
  179. </view>
  180. </view>
  181. </view>
  182. <view class='wrapper'>
  183. <view class='item acea-row row-between-wrapper'>
  184. <view>可用积分</view>
  185. <view class='discount'>{{resData.integral}}
  186. </view>
  187. </view>
  188. <view class='item acea-row row-between-wrapper'>
  189. <view>抵扣积分</view>
  190. <view class='discount'>{{resData.total_integral}}
  191. </view>
  192. </view>
  193. <view class='item acea-row row-between-wrapper'>
  194. <view>快递费用</view>
  195. <view class='discount'>免运费
  196. </view>
  197. </view>
  198. <view class='item' v-if="textareaStatus">
  199. <view>备注信息</view>
  200. <textarea placeholder-class='placeholder' placeholder="请添加备注(150字以内)" v-if="!coupon.coupon"
  201. @input='bindHideKeyboard' :value="mark" :maxlength="150" name="mark">
  202. </textarea>
  203. </view>
  204. </view>
  205. <view style='height:120rpx;'></view>
  206. <view class='footer acea-row row-between-wrapper'>
  207. <view>合计:
  208. <text class='font-color' v-if="parseFloat(resData.total_integral)">{{resData.total_integral || 0}}积分</text>
  209. <text class="font-color" v-if="parseFloat(resData.total_integral) && parseFloat(resData.total_price)">+</text>
  210. <text class="font-color" v-if="parseFloat(resData.total_price)">{{resData.total_price || 0}}元</text>
  211. </view>
  212. <view class='settlement' style='z-index:100' @tap="goPay">立即兑换</view>
  213. </view>
  214. </view>
  215. <view class="alipaysubmit" v-html="formContent"></view>
  216. <couponListWindow :coupon='coupon' @ChangCouponsClone="ChangCouponsClone" :openType='openType' :cartId='cartId'
  217. @ChangCoupons="ChangCoupons"></couponListWindow>
  218. <addressWindow ref="addressWindow" @changeTextareaStatus="changeTextareaStatus" :news='news' :address='address'
  219. :pagesUrl="pagesUrl" @OnChangeAddress="OnChangeAddress" @changeClose="changeClose"></addressWindow>
  220. <home v-show="!invShow && navigation"></home>
  221. <payment :payMode="cartArr" :pay_close="pay_close" :isCall="true" :totalPrice="totalPrice.toString()"
  222. @changePayType="changePayType" @onChangeFun="onChangeFun"></payment>
  223. <!-- #ifdef MP -->
  224. <authorize v-if="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize>
  225. <!-- #endif -->
  226. <timeranges :isShow='isShow' :time='timeranges' @confrim="confrim" @cancel="cancels"></timeranges>
  227. <areaWindow ref="areaWindow" :display="display" :address='addressInfoArea' :cityShow='cityShow' @submit="OnAreaAddress" @changeClose="changeAddressClose"></areaWindow>
  228. </view>
  229. </template>
  230. <script>
  231. const CACHE_CITY = {};
  232. import dayjs from '@/plugin/dayjs/dayjs.min.js';
  233. import {
  234. openPaySubscribe
  235. } from '@/utils/SubscribeMessage.js';
  236. import {
  237. integralOrderConfirm,
  238. integralOrderCreate,
  239. } from '@/api/activity.js';
  240. import {
  241. getAddressDefault,
  242. getAddressDetail,
  243. invoiceList,
  244. invoiceOrder
  245. } from '@/api/user.js';
  246. import {
  247. storeListApi
  248. } from '@/api/store.js';
  249. import {
  250. CACHE_LONGITUDE,
  251. CACHE_LATITUDE
  252. } from '@/config/cache.js';
  253. import areaWindow from '@/components/areaWindow';
  254. import timeranges from '@/components/timeranges';
  255. import couponListWindow from '@/components/couponListWindow';
  256. import addressWindow from '@/components/addressWindow';
  257. import orderGoods from '@/components/orderGoods';
  258. import home from '@/components/home';
  259. import {
  260. toLogin
  261. } from '@/libs/login.js';
  262. import {
  263. mapGetters
  264. } from "vuex";
  265. import payment from '@/components/payment';
  266. import colors from "@/mixins/color";
  267. export default {
  268. components: {
  269. payment,
  270. couponListWindow,
  271. addressWindow,
  272. orderGoods,
  273. home,
  274. timeranges,
  275. areaWindow
  276. },
  277. mixins: [colors],
  278. data() {
  279. return {
  280. addressInfoArea: [],
  281. cityShow: 2,
  282. display: false,
  283. timeranges:[],
  284. isShow:false,
  285. confirm:[],
  286. textareaStatus: true,
  287. //支付方式
  288. cartArr: [{
  289. "name": "微信支付",
  290. "icon": "icon-weixin2",
  291. value: 'weixin',
  292. title: '使用微信快捷支付',
  293. payStatus: 1,
  294. },
  295. {
  296. "name": "支付宝支付",
  297. "icon": "icon-zhifubao",
  298. value: 'alipay',
  299. title: '使用线上支付宝支付',
  300. payStatus: 1,
  301. },
  302. {
  303. "name": "余额支付",
  304. "icon": "icon-yuezhifu",
  305. value: 'yue',
  306. title: '可用余额:',
  307. payStatus: 1,
  308. },
  309. // {
  310. // "name": "线下支付",
  311. // "icon": "icon-yuezhifu1",
  312. // value: 'offline',
  313. // title: '选择线下付款方式',
  314. // payStatus: 2,
  315. // }
  316. ],
  317. formContent: '',
  318. payType: 'weixin', //支付方式
  319. openType: 1, //优惠券打开方式 1=使用
  320. active: 0, //支付方式切换
  321. coupon: {
  322. coupon: false,
  323. list: [],
  324. statusTile: '立即使用'
  325. }, //优惠券组件
  326. address: {
  327. address: false
  328. }, //地址组件
  329. addressInfo: {}, //地址信息
  330. pinkId: 0, //拼团id
  331. addressId: 0, //地址id
  332. couponId: 0, //优惠券id
  333. cartId: '', //购物车id
  334. BargainId: 0,
  335. combinationId: 0,
  336. seckillId: 0,
  337. userInfo: {}, //用户信息
  338. mark: '', //备注信息
  339. couponTitle: '请选择', //优惠券
  340. coupon_price: 0, //优惠券抵扣金额
  341. useIntegral: false, //是否使用积分
  342. integral_price: 0, //积分抵扣金额
  343. integral: 0,
  344. ChangePrice: 0, //使用积分抵扣变动后的金额
  345. formIds: [], //收集formid
  346. status: 0,
  347. is_address: false,
  348. toPay: false, //修复进入支付时页面隐藏从新刷新页面
  349. shippingType: 0,
  350. system_store: {},
  351. storePostage: 0,
  352. contacts: '',
  353. contactsTel: '',
  354. mydata: {},
  355. storeList: [],
  356. store_self_mention: 0,
  357. cartInfo: {},
  358. priceGroup: {},
  359. animated: false,
  360. totalPrice: 0,
  361. integralRatio: "0",
  362. pagesUrl: "",
  363. orderKey: "",
  364. // usableCoupon: {},
  365. offlinePostage: "",
  366. isAuto: false, //没有授权的不会自动授权
  367. isShowAuth: false, //是否隐藏授权
  368. from: '',
  369. news: 1,
  370. invTitle: '不开发票',
  371. special_invoice: false,
  372. invoice_func: false,
  373. header_type: '',
  374. invShow: false,
  375. invList: [],
  376. invChecked: '',
  377. urlQuery: '',
  378. pay_close: false,
  379. resData: {},
  380. product_type:1,
  381. newImg: [],
  382. selectIndex:0,
  383. timerangesIndex:0
  384. };
  385. },
  386. computed: mapGetters(['isLogin']),
  387. onLoad: function(options) {
  388. // #ifdef H5
  389. this.from = this.$wechat.isWeixin() ? 'weixin' : 'weixinh5'
  390. // #endif
  391. // #ifdef MP
  392. this.from = 'routine'
  393. // #endif
  394. if (!options.unique) return this.$util.Tips({
  395. title: '请选择要购买的商品'
  396. }, {
  397. tab: 3,
  398. url: 1
  399. });
  400. this.unique = options.unique
  401. this.num = options.num
  402. this.couponId = options.couponId || 0;
  403. this.pinkId = options.pinkId ? parseInt(options.pinkId) : 0;
  404. this.addressId = options.addressId || 0;
  405. this.cartId = options.cartId;
  406. this.is_address = options.is_address ? true : false;
  407. this.news = !options.new || options.new === '0' ? 0 : 1;
  408. this.invChecked = options.invoice_id || '';
  409. this.header_type = options.header_type || '1';
  410. this.couponTitle = options.couponTitle || '请选择'
  411. // #ifndef APP-PLUS
  412. this.textareaStatus = true;
  413. // #endif
  414. if (this.isLogin && this.toPay == false) {
  415. this.getFun();
  416. } else {
  417. //#ifndef MP
  418. toLogin();
  419. //#endif
  420. //#ifdef MP
  421. this.isShowAuth = true;
  422. //#endif
  423. }
  424. },
  425. /**
  426. * 生命周期函数--监听页面显示
  427. */
  428. onShow: function() {
  429. uni.removeStorageSync('form_type_cart');
  430. let _this = this
  431. uni.$on("handClick", res => {
  432. if (res) {
  433. _this.system_store = res.address
  434. }
  435. // 清除监听
  436. uni.$off('handClick');
  437. })
  438. let current = (dayjs(new Date(Number(new Date().getTime()))).format('HH:mm')).split(':');
  439. let currentArray = current;
  440. currentArray.push(0);
  441. let arrayNew = [];
  442. [...currentArray,...current].forEach(item=>{
  443. arrayNew.push(Number(item))
  444. })
  445. this.timeranges = arrayNew;
  446. },
  447. methods: {
  448. OnAreaAddress(address){
  449. let addr = '';
  450. if (address.length==4){
  451. addr = address[0].label+'/'+address[1].label+'/'+address[2].label+'/'+address[3].label;
  452. }else if (address.length==3){
  453. addr = address[0].label+'/'+address[1].label+'/'+address[2].label;
  454. }else if(address.length==2){
  455. addr = address[0].label+'/'+address[1].label;
  456. }else{
  457. addr = address[0].label;
  458. }
  459. this.confirm[this.timerangesIndex].value = addr;
  460. CACHE_CITY[this.timerangesIndex] = address;
  461. },
  462. changeRegion(index){
  463. if(!this.confirm[index].value){
  464. this.addressInfoArea = [];
  465. }
  466. this.timerangesIndex = index;
  467. this.cityShow = Number(this.confirm[index].valConfig.tabVal) + 1;
  468. this.display = true;
  469. if(CACHE_CITY[index]){
  470. this.addressInfoArea = CACHE_CITY[index];
  471. }
  472. },
  473. // 关闭地址弹窗;
  474. changeAddressClose: function() {
  475. this.display = false;
  476. },
  477. maskClick(e) {
  478. console.log(e);
  479. },
  480. getFun(){
  481. this.getaddressInfo();
  482. this.getConfirm();
  483. this.$nextTick(function() {
  484. this.$refs.addressWindow.getAddressList();
  485. })
  486. },
  487. onLoadFun(){
  488. this.getFun();
  489. this.isShowAuth = false
  490. },
  491. // 授权关闭
  492. authColse: function(e) {
  493. this.isShowAuth = e
  494. },
  495. jumpCon: function(id) {
  496. uni.navigateTo({
  497. url: `/pages/goods_details/index?id=${id}`
  498. })
  499. },
  500. /**
  501. * 删除图片
  502. *
  503. */
  504. DelPic: function(index, indexs) {
  505. let that = this,
  506. pic = this.confirm[index].value;
  507. that.confirm[index].value.splice(indexs, 1);
  508. that.$set(that.confirm[index], 'value', that.confirm[index].value);
  509. },
  510. /**
  511. * 上传文件
  512. *
  513. */
  514. uploadpic: function(index) {
  515. let that = this;
  516. this.$util.uploadImageOne('upload/image', function(res) {
  517. that.newImg.push(res.data.url);
  518. that.$set(that.confirm[index], 'value', that.newImg);
  519. });
  520. },
  521. getInvoiceList() {
  522. uni.showLoading({
  523. title: '正在加载…'
  524. })
  525. invoiceList().then(res => {
  526. uni.hideLoading();
  527. this.invList = res.data.map(item => {
  528. item.id = item.id.toString();
  529. return item;
  530. });
  531. const result = this.invList.find(item => item.id == this.invChecked);
  532. if (result) {
  533. let name = '';
  534. name += result.header_type === 1 ? '个人' : '企业';
  535. name += result.type === 1 ? '普通' : '专用';
  536. name += '发票';
  537. this.invTitle = name;
  538. }
  539. }).catch(err => {
  540. uni.showToast({
  541. title: err,
  542. icon: 'none'
  543. });
  544. });
  545. },
  546. /**
  547. * 事件回调
  548. *
  549. */
  550. onChangeFun: function(e) {
  551. let opt = e;
  552. let action = opt.action || null;
  553. let value = opt.value != undefined ? opt.value : null;
  554. action && this[action] && this[action](value);
  555. },
  556. payClose: function() {
  557. this.pay_close = false;
  558. },
  559. payCheck(type) {
  560. this.payType = type;
  561. this.SubOrder();
  562. },
  563. goPay(){
  564. let that = this;
  565. if (!that.addressId && !that.product_type) {
  566. return that.$util.Tips({
  567. title: '请选择收货地址'
  568. });
  569. }
  570. if (parseFloat(that.resData.integral) < parseFloat(that.resData.total_integral))
  571. return that.$util.Tips({
  572. title: '积分不足!'
  573. });
  574. if(parseFloat(this.resData.total_price)){
  575. this.pay_close = true;
  576. }
  577. if(!parseFloat(this.resData.total_price)){
  578. this.SubOrder();
  579. }
  580. },
  581. SubOrder() {
  582. let that = this
  583. if(parseFloat(this.resData.total_price)){
  584. if (!that.payType) return that.$util.Tips({
  585. title: '请选择支付方式'
  586. });
  587. }
  588. for (var i = 0; i < that.confirm.length; i++) {
  589. let data = that.confirm[i]
  590. if (['radios'].indexOf(data.name) == -1 && (data.titleShow.val || (['uploadPicture','dateranges'].indexOf(data.name) == -1 && data.value && data.value.trim()))) {
  591. if ((data.name === 'texts' && data.valConfig.tabVal == 0) || ['dates','times','selects','citys','checkboxs'].indexOf(data.name) != -1) {
  592. if (!data.value || (data.value && !data.value.trim())) {
  593. return that.$util.Tips({
  594. title: `请填写${data.titleConfig.value}`
  595. });
  596. }
  597. }
  598. if(data.name === 'timeranges'){
  599. if(!data.value){
  600. return that.$util.Tips({
  601. title: `请选择${data.titleConfig.value}`
  602. });
  603. }
  604. }
  605. if (data.name === 'dateranges') {
  606. if (!data.value.length) {
  607. return that.$util.Tips({
  608. title: `请选择${data.titleConfig.value}`
  609. });
  610. }
  611. }
  612. if (data.name === 'texts' && data.valConfig.tabVal == 4) {
  613. if (data.value <= 0) {
  614. return that.$util.Tips({
  615. title: `请填写大于0的${data.titleConfig.value}`
  616. });
  617. }
  618. }
  619. if (data.name === 'texts' && data.valConfig.tabVal == 3) {
  620. if (!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(data.value)) {
  621. return that.$util.Tips({
  622. title: `请填写正确的${data.titleConfig.value}`
  623. });
  624. }
  625. }
  626. if (data.name === 'texts' && data.valConfig.tabVal == 1) {
  627. if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(data.value)) {
  628. return that.$util.Tips({
  629. title: `请填写正确的${data.titleConfig.value}`
  630. });
  631. }
  632. }
  633. if (data.name === 'texts' && data.valConfig.tabVal == 2) {
  634. if (!
  635. /^[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
  636. .test(data.value)) {
  637. return that.$util.Tips({
  638. title: `请填写正确的${data.titleConfig.value}`
  639. });
  640. }
  641. }
  642. if (data.name === 'uploadPicture') {
  643. if (!data.value.length) {
  644. return that.$util.Tips({
  645. title: `请上传${data.titleConfig.value}`
  646. });
  647. }
  648. }
  649. }
  650. }
  651. let data = {
  652. custom_form: that.confirm,
  653. addressId: that.addressId,
  654. mark: that.mark,
  655. unique: this.cartInfo.unique,
  656. num: this.resData.num,
  657. 'from': that.from,
  658. payType: that.payType,
  659. // #ifdef H5
  660. quitUrl: location.protocol + '//' + location.hostname +
  661. '/pages/points_mall/integral_order_status'
  662. // #endif
  663. // #ifdef APP-PLUS
  664. quitUrl: '/pages/points_mall/integral_order_details'
  665. // #endif
  666. }
  667. if(parseFloat(this.resData.total_price)){
  668. if (data.payType == 'yue' && parseFloat(that.resData.now_money) < parseFloat(that.totalPrice))
  669. return that.$util.Tips({
  670. title: '余额不足!'
  671. });
  672. uni.showLoading({
  673. title: '订单支付中'
  674. });
  675. // #ifdef MP
  676. openPaySubscribe().then(() => {
  677. that.payment(data);
  678. });
  679. // #endif
  680. // #ifndef MP
  681. that.payment(data);
  682. // #endif
  683. }else{
  684. integralOrderCreate(data).then(res => {
  685. uni.redirectTo({
  686. url: `/pages/points_mall/integral_order_status?order_id=${res.data.result.orderId}`
  687. })
  688. }).catch(err => {
  689. uni.hideLoading();
  690. return that.$util.Tips({
  691. title: err
  692. });
  693. });
  694. }
  695. },
  696. payment: function(data) {
  697. let that = this;
  698. integralOrderCreate(data).then(res => {
  699. let status = res.data.status,
  700. orderId = res.data.result.orderId,
  701. jsConfig = res.data.result.jsConfig,
  702. goPages = '/pages/points_mall/integral_order_status?order_id=' + orderId
  703. switch (status) {
  704. case 'ORDER_EXIST':
  705. case 'EXTEND_ORDER':
  706. case 'PAY_ERROR':
  707. uni.hideLoading();
  708. return that.$util.Tips({
  709. title: res.msg
  710. }, {
  711. tab: 5,
  712. url: goPages
  713. });
  714. break;
  715. case 'SUCCESS':
  716. uni.hideLoading();
  717. if (that.BargainId || that.combinationId || that.pinkId || that.seckillId || that
  718. .discountId)
  719. return that.$util.Tips({
  720. title: res.msg,
  721. icon: 'success'
  722. }, {
  723. tab: 4,
  724. url: goPages
  725. });
  726. return that.$util.Tips({
  727. title: res.msg,
  728. icon: 'success'
  729. }, {
  730. tab: 5,
  731. url: goPages
  732. });
  733. break;
  734. case 'WECHAT_PAY':
  735. that.toPay = true;
  736. // #ifdef MP
  737. /* that.toPay = true; */
  738. uni.requestPayment({
  739. timeStamp: jsConfig.timestamp,
  740. nonceStr: jsConfig.nonceStr,
  741. package: jsConfig.package,
  742. signType: jsConfig.signType,
  743. paySign: jsConfig.paySign,
  744. success: function(res) {
  745. uni.hideLoading();
  746. if (that.BargainId || that.combinationId || that.pinkId || that
  747. .seckillId || that.discountId)
  748. return that.$util.Tips({
  749. title: '支付成功',
  750. icon: 'success'
  751. }, {
  752. tab: 4,
  753. url: goPages
  754. });
  755. return that.$util.Tips({
  756. title: '支付成功',
  757. icon: 'success'
  758. }, {
  759. tab: 5,
  760. url: goPages
  761. });
  762. },
  763. fail: function(e) {
  764. uni.hideLoading();
  765. return that.$util.Tips({
  766. title: '取消支付'
  767. }, {
  768. tab: 5,
  769. url: goPages + '&status=2'
  770. });
  771. },
  772. complete: function(e) {
  773. uni.hideLoading();
  774. //关闭当前页面跳转至订单状态
  775. if (res.errMsg == 'requestPayment:cancel') return that.$util
  776. .Tips({
  777. title: '取消支付'
  778. }, {
  779. tab: 5,
  780. url: goPages + '&status=2'
  781. });
  782. },
  783. })
  784. // #endif
  785. // #ifdef H5
  786. this.$wechat.pay(res.data.result.jsConfig).then(res => {
  787. return that.$util.Tips({
  788. title: '支付成功',
  789. icon: 'success'
  790. }, {
  791. tab: 5,
  792. url: goPages
  793. });
  794. }).catch(res => {
  795. if (!this.$wechat.isWeixin()) {
  796. uni.redirectTo({
  797. url: goPages +
  798. '&msg=支付失败&status=2'
  799. })
  800. }
  801. if (res.errMsg == 'chooseWXPay:cancel') return that.$util.Tips({
  802. title: '取消支付'
  803. }, {
  804. tab: 5,
  805. url: goPages + '&status=2'
  806. });
  807. })
  808. // #endif
  809. // #ifdef APP-PLUS
  810. uni.requestPayment({
  811. provider: 'wxpay',
  812. orderInfo: jsConfig,
  813. success: (e) => {
  814. let url = goPages;
  815. uni.showToast({
  816. title: "支付成功"
  817. })
  818. setTimeout(res => {
  819. uni.redirectTo({
  820. url: url
  821. })
  822. }, 2000)
  823. },
  824. fail: (e) => {
  825. let url = '/pages/points_mall/integral_order_status?order_id=' + orderId +
  826. '&msg=支付失败';
  827. uni.showModal({
  828. content: "支付失败",
  829. showCancel: false,
  830. success: function(res) {
  831. if (res.confirm) {
  832. uni.redirectTo({
  833. url: url
  834. })
  835. } else if (res.cancel) {
  836. console.log('用户点击取消');
  837. }
  838. }
  839. })
  840. },
  841. complete: () => {
  842. uni.hideLoading();
  843. },
  844. });
  845. // #endif
  846. break;
  847. case 'PAY_DEFICIENCY':
  848. uni.hideLoading();
  849. //余额不足
  850. return that.$util.Tips({
  851. title: res.msg
  852. }, {
  853. tab: 5,
  854. url: goPages + '&status=1'
  855. });
  856. break;
  857. case "WECHAT_H5_PAY":
  858. uni.hideLoading();
  859. that.$util.Tips({
  860. title: '订单创建成功!'
  861. }, {
  862. tab: 4,
  863. url: goPages + '&status=0'
  864. });
  865. setTimeout(() => {
  866. location.href = res.data.result.jsConfig.mweb_url;
  867. }, 2000);
  868. break;
  869. case 'ALIPAY_PAY':
  870. //#ifdef H5
  871. if (this.from === 'weixin') {
  872. uni.redirectTo({
  873. url: `/pages/users/alipay_invoke/index?id=${orderId}&pay_key=${res.data.result.pay_key}`
  874. });
  875. } else {
  876. uni.hideLoading();
  877. that.formContent = res.data.result.jsConfig;
  878. that.$nextTick(() => {
  879. document.getElementById('alipaysubmit').submit();
  880. })
  881. }
  882. //#endif
  883. // #ifdef MP
  884. uni.navigateTo({
  885. url: `/pages/users/alipay_invoke/index?id=${orderId}&link=${jsConfig.qrCode}`
  886. });
  887. // #endif
  888. // #ifdef APP-PLUS
  889. uni.requestPayment({
  890. provider: 'alipay',
  891. orderInfo: jsConfig,
  892. success: (e) => {
  893. uni.showToast({
  894. title: "支付成功"
  895. })
  896. let url = '/pages/points_mall/integral_order_status?order_id=' + orderId +
  897. '&msg=支付成功';
  898. setTimeout(res => {
  899. uni.redirectTo({
  900. url: url
  901. })
  902. }, 2000)
  903. },
  904. fail: (e) => {
  905. let url = '/pages/points_mall/integral_order_status?order_id=' + orderId +
  906. '&msg=支付失败';
  907. uni.showModal({
  908. content: "支付失败",
  909. showCancel: false,
  910. success: function(res) {
  911. if (res.confirm) {
  912. uni.redirectTo({
  913. url: url
  914. })
  915. } else if (res.cancel) {
  916. console.log('用户点击取消');
  917. }
  918. }
  919. })
  920. },
  921. complete: () => {
  922. uni.hideLoading();
  923. },
  924. });
  925. // #endif
  926. break;
  927. }
  928. }).catch(err => {
  929. uni.hideLoading();
  930. return that.$util.Tips({
  931. title: err
  932. });
  933. });
  934. },
  935. // 关闭地址弹窗;
  936. changeClose: function() {
  937. this.$set(this.address, 'address', false);
  938. },
  939. changePayType(type) {
  940. this.payType = type
  941. },
  942. computedPrice: function() {
  943. let shippingType = this.shippingType;
  944. postOrderComputed(this.orderKey, {
  945. addressId: this.addressId,
  946. useIntegral: this.useIntegral ? 1 : 0,
  947. couponId: this.couponId,
  948. shipping_type: parseInt(shippingType) + 1,
  949. payType: this.payType
  950. }).then(res => {
  951. let result = res.data.result;
  952. if (result) {
  953. this.totalPrice = result.pay_price;
  954. this.integral_price = result.deduction_price;
  955. this.coupon_price = result.coupon_price;
  956. this.integral = this.useIntegral ? result.SurplusIntegral : this.userInfo.integral;
  957. this.$set(this.priceGroup, 'storePostage', shippingType == 1 ? 0 : result.pay_postage);
  958. this.$set(this.priceGroup, 'storePostageDiscount', result.storePostageDiscount);
  959. }
  960. })
  961. },
  962. ChangCouponsClone: function() {
  963. this.$set(this.coupon, 'coupon', false);
  964. },
  965. changeTextareaStatus: function() {
  966. for (let i = 0, len = this.coupon.list.length; i < len; i++) {
  967. this.coupon.list[i].use_title = '';
  968. this.coupon.list[i].is_use = 0;
  969. }
  970. this.textareaStatus = true;
  971. this.status = 0;
  972. this.$set(this.coupon, 'list', this.coupon.list);
  973. },
  974. /**
  975. * 选择地址后改变事件
  976. * @param object e
  977. */
  978. OnChangeAddress: function(e) {
  979. this.textareaStatus = true;
  980. this.addressId = e;
  981. this.address.address = false;
  982. this.getaddressInfo();
  983. },
  984. bindHideKeyboard: function(e) {
  985. this.mark = e.detail.value;
  986. },
  987. // 对象转数组
  988. objToArr(data) {
  989. let obj = Object.keys(data);
  990. let m = obj.map(key => data[key]);
  991. return m;
  992. },
  993. /**
  994. * 获取当前订单详细信息
  995. *
  996. */
  997. getConfirm: function() {
  998. let that = this;
  999. // return;
  1000. integralOrderConfirm({
  1001. unique: this.unique,
  1002. num: this.num
  1003. }).then(res => {
  1004. let confirm = this.objToArr(res.data.custom_form);
  1005. confirm.forEach((item, index, arr)=>{
  1006. CACHE_CITY[index] = '';
  1007. if(item.name == 'texts'){
  1008. if(item.defaultValConfig.value){
  1009. item.value = item.defaultValConfig.value
  1010. }else{
  1011. item.value = ''
  1012. }
  1013. }else if(item.name == 'radios'){
  1014. item.value = item.wordsConfig.list[0].val
  1015. }else if(item.name == 'uploadPicture'){
  1016. item.value = [];
  1017. }else if(item.name == 'dateranges'){
  1018. if(item.valConfig.tabVal==0){
  1019. if(item.valConfig.tabData==0){
  1020. let obj = dayjs(new Date(Number(new Date().getTime()))).format('YYYY-MM-DD');
  1021. item.value = [obj,obj]
  1022. }else{
  1023. let data1 = dayjs(new Date(Number(new Date(item.valConfig.specifyDate[0]).getTime()))).format('YYYY-MM-DD');
  1024. let data2 = dayjs(new Date(Number(new Date(item.valConfig.specifyDate[1]).getTime()))).format('YYYY-MM-DD');
  1025. item.value = [data1,data2];
  1026. }
  1027. }else{
  1028. item.value = [];
  1029. }
  1030. }else{
  1031. if(['times','dates','timeranges'].indexOf(item.name) != -1){
  1032. if(item.valConfig.tabVal==0){
  1033. if(item.valConfig.tabData==0){
  1034. if(item.name == 'times'){
  1035. item.value = dayjs(new Date(Number(new Date().getTime()))).format('HH:mm');
  1036. }else if(item.name == 'dates'){
  1037. item.value = dayjs(new Date(Number(new Date().getTime()))).format('YYYY-MM-DD');
  1038. }else{
  1039. let current = dayjs(new Date(Number(new Date().getTime()))).format('HH:mm');
  1040. item.value = current+' - '+current;
  1041. }
  1042. }else{
  1043. if(item.name == 'times' || item.name == 'dates'){
  1044. item.value = item.valConfig.specifyDate;
  1045. }else{
  1046. item.value = item.valConfig.specifyDate[0]+' - '+item.valConfig.specifyDate[1];
  1047. }
  1048. }
  1049. }else{
  1050. item.value = '';
  1051. }
  1052. }else{
  1053. item.value = '';
  1054. }
  1055. }
  1056. })
  1057. function sortNumber(a, b) {
  1058. return a.timestamp - b.timestamp;
  1059. }
  1060. confirm.sort(sortNumber);
  1061. that.$set(that, 'confirm', confirm);
  1062. let productType = parseInt(res.data.productInfo.product_type);
  1063. that.$set(that, 'product_type', (productType==0 || productType==4)?0:1);
  1064. that.$set(that, 'resData', res.data);
  1065. that.$set(that, 'cartInfo', res.data.productInfo);
  1066. that.$set(that, 'totalPrice', res.data.total_price);
  1067. //微信支付是否开启
  1068. that.cartArr[0].payStatus = res.data.pay_weixin_open || 0
  1069. //支付宝是否开启
  1070. that.cartArr[1].payStatus = res.data.ali_pay_status || 0;
  1071. //#ifdef MP
  1072. that.cartArr[1].payStatus = 0;
  1073. //#endif
  1074. that.cartArr[2].number = res.data.now_money;
  1075. that.cartArr[2].payStatus = res.data.yue_pay_status == 1 ? res.data.yue_pay_status : 0
  1076. if(res.data.offline_pay_status){
  1077. if (res.data.offline_pay_status == 2) {
  1078. that.cartArr[3].payStatus = 0
  1079. } else {
  1080. that.cartArr[3].payStatus = 1
  1081. }
  1082. }
  1083. }).catch(err => {
  1084. return this.$util.Tips({
  1085. title: err
  1086. });
  1087. });
  1088. },
  1089. bindDateChange: function(e, index) {
  1090. this.confirm[index].value = e.target.value
  1091. },
  1092. bindTimeChange: function(e, index) {
  1093. this.confirm[index].value = e.target.value
  1094. },
  1095. bindSelectChange: function(e, index, item) {
  1096. this.confirm[index].value = item.wordsConfig.list[e.detail.value].val
  1097. },
  1098. getTimeranges(index){
  1099. this.isShow = true
  1100. this.timerangesIndex = index
  1101. },
  1102. confrim(e){
  1103. this.isShow = false;
  1104. this.confirm[this.timerangesIndex].value = e.time;
  1105. let arrayNew = [];
  1106. e.val.forEach(item=>{
  1107. arrayNew.push(Number(item))
  1108. })
  1109. this.timeranges = arrayNew;
  1110. },
  1111. cancels(){
  1112. this.isShow = false;
  1113. },
  1114. // 单选
  1115. radioChange(e, index, item){
  1116. this.confirm[index].value = item.wordsConfig.list[e.detail.value].val
  1117. },
  1118. // 多选
  1119. checkboxChange(e, index, item){
  1120. let obj = e.detail.value;
  1121. let val = '';
  1122. item.wordsConfig.list.forEach((j,jindex)=>{
  1123. obj.forEach(x=>{
  1124. if(jindex == x){
  1125. val = val +(val?',':'') + j.val;
  1126. }
  1127. })
  1128. })
  1129. this.confirm[index].value = val
  1130. },
  1131. /*
  1132. * 提取砍价和拼团id
  1133. */
  1134. getBargainId: function() {
  1135. let that = this;
  1136. let cartINfo = that.cartInfo;
  1137. let BargainId = 0;
  1138. let combinationId = 0;
  1139. cartINfo.forEach(function(value, index, cartINfo) {
  1140. BargainId = cartINfo[index].bargain_id,
  1141. combinationId = cartINfo[index].combination_id
  1142. })
  1143. that.$set(that, 'BargainId', parseInt(BargainId));
  1144. that.$set(that, 'combinationId', parseInt(combinationId));
  1145. if (that.cartArr.length == 3 && (BargainId || combinationId || that.seckillId)) {
  1146. that.cartArr[2].payStatus = 0;
  1147. that.$set(that, 'cartArr', that.cartArr);
  1148. }
  1149. },
  1150. /*
  1151. * 获取默认收货地址或者获取某条地址信息
  1152. */
  1153. getaddressInfo: function() {
  1154. let that = this;
  1155. if (that.addressId) {
  1156. getAddressDetail(that.addressId).then(res => {
  1157. res.data.is_default = parseInt(res.data.is_default);
  1158. that.addressInfo = res.data || {};
  1159. that.addressId = res.data.id || 0;
  1160. that.address.addressId = res.data.id || 0;
  1161. })
  1162. } else {
  1163. getAddressDefault().then(res => {
  1164. res.data.is_default = parseInt(res.data.is_default);
  1165. that.addressInfo = res.data || {};
  1166. that.addressId = res.data.id || 0;
  1167. that.address.addressId = res.data.id || 0;
  1168. })
  1169. }
  1170. },
  1171. couponTap: function() {
  1172. this.coupon.coupon = true;
  1173. this.coupon.list.forEach((item, index) => {
  1174. if (item.id == this.couponId) {
  1175. item.is_use = 1
  1176. } else {
  1177. item.is_use = 0
  1178. }
  1179. })
  1180. this.$set(this.coupon, 'list', this.coupon.list);
  1181. },
  1182. car: function() {
  1183. let that = this;
  1184. that.animated = false;
  1185. },
  1186. onAddress: function() {
  1187. let that = this;
  1188. that.textareaStatus = false;
  1189. that.address.address = true;
  1190. that.pagesUrl = `/pages/points_mall/user_address?unique=${this.unique}&num=${this.num}`
  1191. },
  1192. clickTextArea() {
  1193. this.$nextTick(() => {
  1194. this.$refs.getFocus.focus()
  1195. })
  1196. },
  1197. }
  1198. }
  1199. </script>
  1200. <style lang="scss" scoped>
  1201. /deep/.uni-date-x--border{
  1202. border: 0;
  1203. }
  1204. /deep/.uni-icons{
  1205. font-size: 0 !important;
  1206. }
  1207. /deep/.uni-date-x{
  1208. color: #999;
  1209. font-size: 15px;
  1210. }
  1211. /deep/.uni-date__x-input{
  1212. font-size: 15px;
  1213. }
  1214. /deep/uni-checkbox[disabled] .uni-checkbox-input {
  1215. background-color: #eee;
  1216. }
  1217. .confirmImg{
  1218. width: 100%;
  1219. }
  1220. .confirmImg .upload {
  1221. padding-bottom: 36rpx;
  1222. }
  1223. .confirmImg .upload .pictrue {
  1224. margin: 22rpx 23rpx 0 0;
  1225. width: 146rpx;
  1226. height: 146rpx;
  1227. position: relative;
  1228. font-size: 24rpx;
  1229. color: #bbb;
  1230. }
  1231. .confirmImg .upload .pictrue:nth-of-type(4n) {
  1232. margin-right: 0;
  1233. }
  1234. .confirmImg .upload .pictrue image {
  1235. width: 100%;
  1236. height: 100%;
  1237. border-radius: 8rpx;
  1238. }
  1239. .confirmImg .upload .pictrue .icon-guanbi1 {
  1240. position: absolute;
  1241. font-size: 45rpx;
  1242. top: -10rpx;
  1243. right: -10rpx;
  1244. }
  1245. .confirmImg .upload .pictrue .close{
  1246. position: absolute;
  1247. width: 26rpx;
  1248. height: 26rpx;
  1249. border-radius: 0 8rpx 0 8rpx;
  1250. background-color: rgba(0, 0, 0, 0.6);
  1251. top: 0;
  1252. right: 0;
  1253. }
  1254. .confirmImg .upload .pictrue .close .iconfont{
  1255. font-size: 24rpx;
  1256. }
  1257. .confirmImg .upload .pictrue .icon-icon25201 {
  1258. color: #bfbfbf;
  1259. font-size: 50rpx;
  1260. }
  1261. .confirmImg .upload .pictrue:nth-last-child(1) {
  1262. border: 1rpx solid #ddd;
  1263. box-sizing: border-box;
  1264. }
  1265. .goodWrapper{
  1266. padding: 0 30rpx;
  1267. .item{
  1268. padding: 20rpx 0;
  1269. }
  1270. }
  1271. .alipaysubmit {
  1272. display: none;
  1273. }
  1274. .order-submission .line {
  1275. width: 100%;
  1276. height: 3rpx;
  1277. }
  1278. .order-submission .line image {
  1279. width: 100%;
  1280. height: 100%;
  1281. display: block;
  1282. }
  1283. .order-submission .address {
  1284. padding: 28rpx 30rpx;
  1285. background-color: #fff;
  1286. box-sizing: border-box;
  1287. }
  1288. .order-submission .address .addressCon {
  1289. width: 610rpx;
  1290. font-size: 26rpx;
  1291. color: #666;
  1292. }
  1293. .order-submission .address .addressCon .name {
  1294. font-size: 30rpx;
  1295. color: #282828;
  1296. font-weight: bold;
  1297. margin-bottom: 10rpx;
  1298. }
  1299. .order-submission .address .addressCon .name .phone {
  1300. margin-left: 50rpx;
  1301. }
  1302. .order-submission .address .addressCon .default {
  1303. margin-right: 12rpx;
  1304. }
  1305. .order-submission .address .addressCon .setaddress {
  1306. color: #333;
  1307. font-size: 28rpx;
  1308. }
  1309. .order-submission .address .iconfont {
  1310. font-size: 35rpx;
  1311. color: #707070;
  1312. }
  1313. .order-submission .allAddress {
  1314. width: 100%;
  1315. background: linear-gradient(to bottom, var(--view-theme) 0%, #f5f5f5 100%);
  1316. padding-top: 100rpx;
  1317. }
  1318. .order-submission .allAddress .nav {
  1319. width: 710rpx;
  1320. margin: 0 auto;
  1321. }
  1322. .order-submission .allAddress .nav .item {
  1323. width: 355rpx;
  1324. }
  1325. .order-submission .allAddress .nav .item.on {
  1326. position: relative;
  1327. width: 250rpx;
  1328. }
  1329. .order-submission .allAddress .nav .item.on::before {
  1330. position: absolute;
  1331. bottom: 0;
  1332. content: "快递配送";
  1333. font-size: 28rpx;
  1334. display: block;
  1335. height: 0;
  1336. width: 336rpx;
  1337. border-width: 0 20rpx 80rpx 0;
  1338. border-style: none solid solid;
  1339. border-color: transparent transparent #fff;
  1340. z-index: 2;
  1341. border-radius: 7rpx 30rpx 0 0;
  1342. text-align: center;
  1343. line-height: 80rpx;
  1344. }
  1345. .order-submission .allAddress .nav .item:nth-of-type(2).on::before {
  1346. content: "到店自提";
  1347. border-width: 0 0 80rpx 20rpx;
  1348. border-radius: 30rpx 7rpx 0 0;
  1349. }
  1350. .order-submission .allAddress .nav .item.on2 {
  1351. position: relative;
  1352. }
  1353. .order-submission .allAddress .nav .item.on2::before {
  1354. position: absolute;
  1355. bottom: 0;
  1356. content: "到店自提";
  1357. font-size: 28rpx;
  1358. display: block;
  1359. height: 0;
  1360. width: 400rpx;
  1361. border-width: 0 0 60rpx 60rpx;
  1362. border-style: none solid solid;
  1363. border-color: transparent transparent #f7c1bd;
  1364. border-radius: 40rpx 6rpx 0 0;
  1365. text-align: center;
  1366. line-height: 60rpx;
  1367. }
  1368. .order-submission .allAddress .nav .item:nth-of-type(1).on2::before {
  1369. content: "快递配送";
  1370. border-width: 0 60rpx 60rpx 0;
  1371. border-radius: 6rpx 40rpx 0 0;
  1372. }
  1373. .order-submission .allAddress .address {
  1374. width: 710rpx;
  1375. height: 150rpx;
  1376. margin: 0 auto;
  1377. }
  1378. .order-submission .allAddress .line {
  1379. width: 710rpx;
  1380. margin: 0 auto;
  1381. }
  1382. .order-submission .wrapper .item .discount .placeholder {
  1383. color: #ccc;
  1384. }
  1385. .placeholder-textarea {
  1386. position: relative;
  1387. .placeholder {
  1388. position: absolute;
  1389. color: #ccc;
  1390. top: 26rpx;
  1391. left: 30rpx;
  1392. }
  1393. }
  1394. .order-submission .wrapper {
  1395. background-color: #fff;
  1396. margin-top: 13rpx;
  1397. }
  1398. .order-submission .wrapper .item .name{
  1399. position: relative;
  1400. }
  1401. .order-submission .wrapper .item .asterisk{
  1402. position: absolute;
  1403. color:red;
  1404. left:-15rpx
  1405. }
  1406. .order-submission .wrapper .item {
  1407. padding: 27rpx 30rpx;
  1408. font-size: 30rpx;
  1409. color: #282828;
  1410. border-bottom: 1px solid #f0f0f0;
  1411. }
  1412. .order-submission .wrapper .item.on{
  1413. padding: 17rpx 14rpx 17rpx 30rpx;
  1414. align-items: baseline;
  1415. }
  1416. .order-submission .wrapper .item.on3{
  1417. align-items: baseline;
  1418. }
  1419. .order-submission .wrapper .item.on2{
  1420. padding: 17rpx 30rpx;
  1421. }
  1422. .order-submission .wrapper .item .discount {
  1423. font-size: 30rpx;
  1424. color: #999;
  1425. }
  1426. .order-submission .wrapper .item.on .discount,
  1427. .order-submission .wrapper .item.on3 .discount{
  1428. width: 460rpx;
  1429. text-align: right;
  1430. }
  1431. .order-submission .wrapper .item.on3 .discount .city{
  1432. width: 400rpx;
  1433. }
  1434. .order-submission .wrapper .item .discount input {
  1435. text-align: end;
  1436. }
  1437. .order-submission .wrapper .item .discount .iconfont {
  1438. color: #515151;
  1439. font-size: 30rpx;
  1440. margin-left: 15rpx;
  1441. }
  1442. .order-submission .wrapper .item .discount .num {
  1443. font-size: 32rpx;
  1444. margin-right: 20rpx;
  1445. }
  1446. .order-submission .wrapper .item .discount .radio{
  1447. margin: 0 22rpx 0 22rpx;
  1448. padding: 10rpx 0;
  1449. }
  1450. .order-submission .wrapper .item .discount .radio /deep/uni-checkbox .uni-checkbox-input{
  1451. border-radius: 0
  1452. }
  1453. .order-submission .wrapper .item .shipping {
  1454. font-size: 30rpx;
  1455. color: #999;
  1456. position: relative;
  1457. padding-right: 58rpx;
  1458. }
  1459. .order-submission .wrapper .item .shipping .iconfont {
  1460. font-size: 35rpx;
  1461. color: #707070;
  1462. position: absolute;
  1463. right: 0;
  1464. top: 50%;
  1465. transform: translateY(-50%);
  1466. margin-left: 30rpx;
  1467. }
  1468. .order-submission .wrapper .item textarea {
  1469. background-color: #f9f9f9;
  1470. width: 690rpx;
  1471. height: 140rpx;
  1472. border-radius: 3rpx;
  1473. margin-top: 30rpx;
  1474. padding: 25rpx 28rpx;
  1475. box-sizing: border-box;
  1476. }
  1477. .order-submission .wrapper .item .placeholder {
  1478. color: #ccc;
  1479. }
  1480. .order-submission .wrapper .item .list {
  1481. margin-top: 35rpx;
  1482. }
  1483. .order-submission .moneyList {
  1484. margin-top: 12rpx;
  1485. background-color: #fff;
  1486. padding: 30rpx;
  1487. }
  1488. .order-submission .moneyList .item {
  1489. font-size: 28rpx;
  1490. color: #282828;
  1491. }
  1492. .order-submission .moneyList .item~.item {
  1493. margin-top: 20rpx;
  1494. }
  1495. .order-submission .moneyList .item .money {
  1496. color: #868686;
  1497. }
  1498. .order-submission .footer {
  1499. width: 100%;
  1500. height: 100rpx;
  1501. background-color: #fff;
  1502. padding: 0 30rpx;
  1503. font-size: 28rpx;
  1504. color: #333;
  1505. box-sizing: border-box;
  1506. position: fixed;
  1507. bottom: 0;
  1508. left: 0;
  1509. height: calc(100rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  1510. height: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  1511. padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
  1512. padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
  1513. }
  1514. .order-submission .footer .settlement {
  1515. font-size: 30rpx;
  1516. color: #fff;
  1517. width: 240rpx;
  1518. height: 70rpx;
  1519. background-color: var(--view-theme);
  1520. border-radius: 50rpx;
  1521. text-align: center;
  1522. line-height: 70rpx;
  1523. }
  1524. .footer .transparent {
  1525. opacity: 0
  1526. }
  1527. .orderGoods {
  1528. background-color: #fff;
  1529. margin-top: 12rpx;
  1530. &.on{
  1531. margin-top: 0;
  1532. }
  1533. }
  1534. .orderGoods .total {
  1535. width: 100%;
  1536. height: 86rpx;
  1537. padding: 0 30rpx;
  1538. border-bottom: 2rpx solid #f0f0f0;
  1539. font-size: 30rpx;
  1540. color: #282828;
  1541. line-height: 86rpx;
  1542. box-sizing: border-box;
  1543. }
  1544. .pictrue image {
  1545. width: 130rpx;
  1546. height: 130rpx;
  1547. }
  1548. </style>