integral_order.vue 45 KB

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