index.vue 72 KB

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