integral_order.vue 45 KB

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